gnu: python2-cairocffi: Remove.
[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 python-decorator
6429 (package
6430 (name "python-decorator")
6431 (version "4.3.0")
6432 (source
6433 (origin
6434 (method url-fetch)
6435 (uri (pypi-uri "decorator" version))
6436 (sha256
6437 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6438 (build-system python-build-system)
6439 (home-page "https://pypi.org/project/decorator/")
6440 (synopsis "Python module to simplify usage of decorators")
6441 (description
6442 "The aim of the decorator module is to simplify the usage of decorators
6443 for the average programmer, and to popularize decorators usage giving examples
6444 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6445 etc. The core of this module is a decorator factory.")
6446 (license license:expat)))
6447
6448 (define-public python2-decorator
6449 (package-with-python2 python-decorator))
6450
6451 (define-public python-drmaa
6452 (package
6453 (name "python-drmaa")
6454 (version "0.7.7")
6455 (source
6456 (origin
6457 (method url-fetch)
6458 (uri (pypi-uri "drmaa" version))
6459 (sha256
6460 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6461 (build-system python-build-system)
6462 ;; The test suite requires libdrmaa which is provided by the cluster
6463 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6464 ;; should be set to the path of the libdrmaa library.
6465 (arguments '(#:tests? #f))
6466 (native-inputs
6467 `(("python-nose" ,python-nose)))
6468 (home-page "https://pypi.org/project/drmaa/")
6469 (synopsis "Python bindings for the DRMAA library")
6470 (description
6471 "A Python package for Distributed Resource Management (DRM) job
6472 submission and control. This package is an implementation of the DRMAA 1.0
6473 Python language binding specification.")
6474 (license license:bsd-3)))
6475
6476 (define-public python2-drmaa
6477 (package-with-python2 python-drmaa))
6478
6479 (define-public python-grako
6480 (package
6481 (name "python-grako")
6482 (version "3.99.9")
6483 (source
6484 (origin
6485 (method url-fetch)
6486 (uri
6487 (pypi-uri "grako" version ".zip"))
6488 (sha256
6489 (base32
6490 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6491 (build-system python-build-system)
6492 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6493 (native-inputs
6494 `(("unzip" ,unzip)
6495 ("python-pytest" ,python-pytest)
6496 ("python-pytest-runner" ,python-pytest-runner)))
6497 (home-page "https://bitbucket.org/neogeny/grako")
6498 (synopsis "EBNF parser generator")
6499 (description
6500 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6501 memoizing PEG/Packrat parser in Python.")
6502 (license license:bsd-3)))
6503
6504 (define-public python2-grako
6505 (package-with-python2 python-grako))
6506
6507 (define-public python-grandalf
6508 (package
6509 (name "python-grandalf")
6510 (version "0.7")
6511 (source
6512 (origin
6513 ;; There's no source tarball on PyPI.
6514 (method git-fetch)
6515 (uri (git-reference
6516 (url "https://github.com/bdcht/grandalf")
6517 (commit (string-append "v" version))))
6518 (file-name (git-file-name name version))
6519 (sha256
6520 (base32
6521 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6522 (build-system python-build-system)
6523 (arguments
6524 '(#:phases
6525 (modify-phases %standard-phases
6526 (replace 'check
6527 (lambda _
6528 (invoke "python" "setup.py" "pytest"))))))
6529 (native-inputs
6530 `(("python-pytest" ,python-pytest)
6531 ("python-pytest-runner" ,python-pytest-runner)))
6532 (propagated-inputs
6533 `(("python-numpy" ,python-numpy)
6534 ("python-ply" ,python-ply)))
6535 (home-page "https://github.com/bdcht/grandalf")
6536 (synopsis "Graph and drawing algorithms framework")
6537 (description
6538 "Grandalf is a Python package made for experimentations with graphs
6539 drawing algorithms. It is written in pure Python, and currently implements
6540 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6541 minimization approach. While not as fast or featured as graphviz or other
6542 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6543 than thousands of nodes, while keeping the source code simple enough to tweak
6544 and hack any part of it for experimental purpose. With a total of about 1500
6545 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6546 in less than 600 lines. The energy minimization approach is comprised of only
6547 250 lines!
6548
6549 Grandalf does only 2 not-so-simple things:
6550 @itemize
6551 @item computing the nodes (x,y) coordinates (based on provided nodes
6552 dimensions, and a chosen layout)
6553 @item routing the edges with lines or nurbs
6554 @end itemize
6555
6556 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6557 will help you find where to draw things like nodes and edges, but it’s up to
6558 you to actually draw things with your favorite toolkit.")
6559 ;; The user can choose either license.
6560 (license (list license:gpl2 license:epl1.0))))
6561
6562 (define-public python-gridmap
6563 (package
6564 (name "python-gridmap")
6565 (version "0.14.0")
6566 (source
6567 (origin
6568 (method git-fetch)
6569 (uri (git-reference
6570 (url "https://github.com/pygridtools/gridmap")
6571 (commit (string-append "v" version))))
6572 (file-name (git-file-name name version))
6573 (sha256
6574 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6575 (build-system python-build-system)
6576 (arguments
6577 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6578 (propagated-inputs
6579 `(("python-psutil" ,python-psutil)
6580 ("python-drmaa" ,python-drmaa)
6581 ("python-pyzmq" ,python-pyzmq)))
6582 (home-page "https://github.com/pygridtools/gridmap")
6583 (synopsis "Create jobs on a cluster directly from Python")
6584 (description
6585 "Gridmap is a Python package to allow you to easily create jobs on the
6586 cluster directly from Python. You can directly map Python functions onto the
6587 cluster without needing to write any wrapper code yourself.")
6588 (license license:gpl3+)))
6589
6590 (define-public python2-gridmap
6591 (package-with-python2 python-gridmap))
6592
6593 (define-public python-honcho
6594 (package
6595 (name "python-honcho")
6596 (version "1.0.1")
6597 (source
6598 (origin
6599 (method git-fetch)
6600 (uri (git-reference
6601 (url "https://github.com/nickstenning/honcho")
6602 (commit (string-append "v" version))))
6603 (file-name (git-file-name name version))
6604 (sha256
6605 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6606 (build-system python-build-system)
6607 (native-inputs
6608 `(("python-pytest" ,python-pytest)
6609 ("python-mock" ,python-mock)
6610 ("python-tox" ,python-tox)
6611 ("which" ,which))) ;for tests
6612 (propagated-inputs
6613 `(("python-jinja2" ,python-jinja2)))
6614 (arguments
6615 `(#:phases
6616 (modify-phases %standard-phases
6617 (delete 'check)
6618 (add-after 'install 'check
6619 (lambda* (#:key outputs inputs #:allow-other-keys)
6620 ;; fix honcho path in testsuite
6621 (substitute* "tests/conftest.py"
6622 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6623 "/bin/honcho" "'")))
6624 ;; It's easier to run tests after install.
6625 ;; Make installed package available for running the tests
6626 (add-installed-pythonpath inputs outputs)
6627 (invoke "py.test" "-v"))))))
6628 (home-page "https://github.com/nickstenning/honcho")
6629 (synopsis "Manage Procfile-based applications")
6630 (description
6631 "A Procfile is a file which describes how to run an application
6632 consisting of several processes. honcho starts all listed processes.
6633 The output of all running processes is collected by honcho and
6634 displayed.")
6635 (license license:expat)))
6636
6637 (define-public python-pexpect
6638 (package
6639 (name "python-pexpect")
6640 (version "4.8.0")
6641 (source
6642 (origin
6643 (method url-fetch)
6644 (uri (pypi-uri "pexpect" version))
6645 (sha256
6646 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6647 (build-system python-build-system)
6648 (arguments
6649 `(#:phases
6650 (modify-phases %standard-phases
6651 (add-before 'check 'prepare-tests
6652 (lambda _
6653 (substitute* (find-files "tests")
6654 (("/bin/ls") (which "ls"))
6655 (("/bin/echo") (which "echo"))
6656 (("/bin/which") (which "which"))
6657 ;; Many tests try to use the /bin directory which
6658 ;; is not present in the build environment.
6659 ;; Use one that's non-empty and unlikely to change.
6660 (("/bin'") "/dev'")
6661 ;; Disable failing test. See upstream bug report
6662 ;; https://github.com/pexpect/pexpect/issues/568
6663 (("def test_bash") "def _test_bash"))
6664 ;; XXX: Socket connection test gets "Connection reset by peer".
6665 ;; Why does it not work? Delete for now.
6666 (delete-file "tests/test_socket.py")
6667 #t))
6668 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6669 (native-inputs
6670 `(("python-nose" ,python-nose)
6671 ("python-pytest" ,python-pytest)
6672 ("man-db" ,man-db)
6673 ("which" ,which)
6674 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6675 (propagated-inputs
6676 `(("python-ptyprocess" ,python-ptyprocess)))
6677 (home-page "http://pexpect.readthedocs.org/")
6678 (synopsis "Controlling interactive console applications")
6679 (description
6680 "Pexpect is a pure Python module for spawning child applications;
6681 controlling them; and responding to expected patterns in their output.
6682 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6683 child application and control it as if a human were typing commands.")
6684 (license license:isc)))
6685
6686 (define-public python2-pexpect
6687 (package-with-python2 python-pexpect))
6688
6689 (define-public python-setuptools-scm
6690 (package
6691 (name "python-setuptools-scm")
6692 (version "3.4.3")
6693 (source (origin
6694 (method url-fetch)
6695 (uri (pypi-uri "setuptools_scm" version))
6696 (sha256
6697 (base32
6698 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6699 (build-system python-build-system)
6700 (home-page "https://github.com/pypa/setuptools_scm/")
6701 (synopsis "Manage Python package versions in SCM metadata")
6702 (description
6703 "Setuptools_scm handles managing your Python package versions in
6704 @dfn{software configuration management} (SCM) metadata instead of declaring
6705 them as the version argument or in a SCM managed file.")
6706 (license license:expat)))
6707
6708 ;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
6709 (define-public python-setuptools-scm/next
6710 (package
6711 (inherit python-setuptools-scm)
6712 (version "5.0.1")
6713 (source
6714 (origin
6715 (method url-fetch)
6716 (uri (pypi-uri "setuptools_scm" version))
6717 (sha256
6718 (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
6719
6720 (define-public python2-setuptools-scm
6721 (package-with-python2 python-setuptools-scm))
6722
6723 (define-public python-sexpdata
6724 (package
6725 (name "python-sexpdata")
6726 (version "0.0.3")
6727 (source
6728 (origin
6729 (method url-fetch)
6730 (uri (pypi-uri "sexpdata" version))
6731 (sha256
6732 (base32
6733 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6734 (build-system python-build-system)
6735 (home-page "https://github.com/jd-boyd/sexpdata")
6736 (synopsis "S-expression parser for Python")
6737 (description
6738 "Sexpdata is an S-expression parser/serializer. It has load and dump
6739 functions like pickle, json or PyYAML module.")
6740 (license license:bsd-3)))
6741
6742 (define-public python-pathlib2
6743 (package
6744 (name "python-pathlib2")
6745 (version "2.3.3")
6746 (source
6747 (origin
6748 (method url-fetch)
6749 (uri (pypi-uri "pathlib2" version))
6750 (sha256
6751 (base32
6752 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6753 (build-system python-build-system)
6754 (propagated-inputs
6755 `(("python-scandir" ,python-scandir)
6756 ("python-six" ,python-six)))
6757 (home-page "https://pypi.org/project/pathlib2/")
6758 (synopsis "Object-oriented file system paths")
6759 (description "The goal of pathlib2 is to provide a backport of the
6760 standard @code{pathlib} module which tracks the standard library module, so
6761 all the newest features of the standard @code{pathlib} can be used also on
6762 older Python versions.")
6763 (license license:expat)))
6764
6765 (define-public python-importlib-resources
6766 (package
6767 (name "python-importlib-resources")
6768 (version "3.0.0")
6769 (source
6770 (origin
6771 (method url-fetch)
6772 (uri (pypi-uri "importlib_resources" version))
6773 (sha256
6774 (base32
6775 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6776 (build-system python-build-system)
6777 (native-inputs
6778 `(("python-setuptools-scm" ,python-setuptools-scm)
6779 ("python-toml" ,python-toml)))
6780 (home-page "http://importlib-resources.readthedocs.io/")
6781 (synopsis "Read resources from Python packages")
6782 (description
6783 "@code{importlib_resources} is a backport of Python 3's standard library
6784 @code{importlib.resources} module for Python 2.7, and Python 3.")
6785 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6786 (license license:asl2.0)))
6787
6788 (define-public python2-importlib-resources
6789 (package
6790 (name "python2-importlib-resources")
6791 (version "1.0.2")
6792 (source (origin
6793 (method url-fetch)
6794 (uri (pypi-uri "importlib_resources" version))
6795 (sha256
6796 (base32
6797 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6798 (build-system python-build-system)
6799 (arguments
6800 `(#:python ,python-2
6801 #:phases (modify-phases %standard-phases
6802 ;; The build system tests for python-wheel, but it is
6803 ;; not required for Guix nor the test suite. Just drop
6804 ;; it to make bootstrapping pytest easier.
6805 (add-after 'unpack 'drop-wheel-dependency
6806 (lambda _
6807 (substitute* "setup.cfg"
6808 (("^[[:blank:]]+wheel")
6809 ""))
6810 #t)))))
6811 (propagated-inputs
6812 `(("python-pathlib2" ,python2-pathlib2)
6813 ("python-typing" ,python2-typing)))
6814 (home-page "https://gitlab.com/python-devs/importlib_resources")
6815 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6816 (description
6817 "This package provides an implementation of @code{importlib.resources}
6818 for older versions of Python.")
6819 (license license:asl2.0)))
6820
6821 ;; For importlib-metadata-bootstrap below.
6822 (define-public python2-importlib-resources-bootstrap
6823 (hidden-package
6824 (package/inherit
6825 python2-importlib-resources
6826 (name "python2-importlib-resources-bootstrap")
6827 (propagated-inputs
6828 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6829 ("python-typing" ,python2-typing))))))
6830
6831 (define-public python-importlib-metadata
6832 (package
6833 (name "python-importlib-metadata")
6834 (version "1.5.0")
6835 (source
6836 (origin
6837 (method url-fetch)
6838 (uri (pypi-uri "importlib_metadata" version))
6839 (sha256
6840 (base32
6841 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6842 (build-system python-build-system)
6843 (propagated-inputs
6844 `(("python-zipp" ,python-zipp)))
6845 (native-inputs
6846 `(("python-setuptools-scm" ,python-setuptools-scm)
6847 ("python-pyfakefs" ,python-pyfakefs)
6848 ("python-packaging" ,python-packaging)))
6849 (home-page "https://importlib-metadata.readthedocs.io/")
6850 (synopsis "Read metadata from Python packages")
6851 (description
6852 "@code{importlib_metadata} is a library which provides an API for
6853 accessing an installed Python package's metadata, such as its entry points or
6854 its top-level name. This functionality intends to replace most uses of
6855 @code{pkg_resources} entry point API and metadata API. Along with
6856 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6857 need to use the older and less efficient @code{pkg_resources} package.")
6858 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6859 (license license:asl2.0)))
6860
6861 (define-public python2-importlib-metadata
6862 (let ((base (package-with-python2 (strip-python2-variant
6863 python-importlib-metadata))))
6864 (package/inherit
6865 base
6866 (name "python2-importlib-metadata")
6867 (native-inputs
6868 `(("python-setuptools-scm" ,python2-setuptools-scm)
6869 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6870 ("python-packaging" ,python2-packaging-bootstrap)))
6871 (propagated-inputs
6872 `(("python-configparser" ,python2-configparser)
6873 ("python-contextlib2" ,python2-contextlib2)
6874 ("python-importlib-resources" ,python2-importlib-resources)
6875 ("python-pathlib2" ,python2-pathlib2)
6876 ,@(package-propagated-inputs base))))))
6877
6878 ;; This package is used by python2-pytest, and thus must not depend on it.
6879 (define-public python2-importlib-metadata-bootstrap
6880 (hidden-package
6881 (package/inherit
6882 python2-importlib-metadata
6883 (name "python2-importlib-metadata-bootstrap")
6884 (arguments
6885 `(#:tests? #f
6886 ,@(package-arguments python2-importlib-metadata)))
6887 (propagated-inputs
6888 `(("python-zipp" ,python2-zipp-bootstrap)
6889 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6890 ("python-configparser" ,python2-configparser)
6891 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6892 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6893
6894 (define-public python-importmagic
6895 (package
6896 (name "python-importmagic")
6897 (version "0.1.7")
6898 (source
6899 (origin
6900 (method url-fetch)
6901 (uri (pypi-uri "importmagic" version))
6902 (sha256
6903 (base32
6904 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6905 (build-system python-build-system)
6906 (home-page "https://github.com/alecthomas/importmagic")
6907 (synopsis "Library for adding, removing and managing Python imports")
6908 (description
6909 "Importmagic is a Python library for automatically managing imports by
6910 finding unresolved symbols in Python code and their corresponding imports.")
6911 (license license:bsd-3)))
6912
6913 (define-public python-inotify-simple
6914 (package
6915 (name "python-inotify-simple")
6916 (version "1.3.5")
6917 (source
6918 (origin
6919 (method git-fetch)
6920 (uri (git-reference
6921 (url "https://github.com/chrisjbillington/inotify_simple")
6922 (commit version)))
6923 (file-name (git-file-name name version))
6924 (sha256
6925 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
6926 (build-system python-build-system)
6927 (home-page
6928 "https://github.com/chrisjbillington/inotify_simple")
6929 (synopsis "Simple wrapper around inotify library")
6930 (description
6931 "@code{inotify-simple} is a simple wrapper around inotify library.")
6932 (license license:bsd-3)))
6933
6934 (define-public python-jaraco-packaging
6935 (package
6936 (name "python-jaraco-packaging")
6937 (version "6.1")
6938 (source
6939 (origin
6940 (method url-fetch)
6941 (uri (pypi-uri "jaraco.packaging" version))
6942 (sha256
6943 (base32
6944 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6945 (build-system python-build-system)
6946 (propagated-inputs
6947 `(("python-pytest" ,python-pytest)
6948 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6949 ("python-pytest-flake8" ,python-pytest-flake8)
6950 ("python-rst.linker" ,python-rst.linker)
6951 ("python-setuptools" ,python-setuptools)
6952 ("python-setuptools-scm" ,python-setuptools-scm)
6953 ("python-six" ,python-six)
6954 ("python-sphinx" ,python-sphinx)))
6955 (home-page "https://github.com/jaraco/jaraco.packaging")
6956 (synopsis "Tools to supplement packaging Python releases")
6957 (description
6958 "This package provides various tools to supplement packaging Python
6959 releases.")
6960 (license license:expat)))
6961
6962 (define-public python-pathpy
6963 (package
6964 (name "python-pathpy")
6965 (version "11.5.1")
6966 (source
6967 (origin
6968 (method url-fetch)
6969 (uri (pypi-uri "path.py" version))
6970 (sha256
6971 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6972 (outputs '("out" "doc"))
6973 (build-system python-build-system)
6974 (propagated-inputs
6975 `(("python-appdirs" ,python-appdirs)
6976 ("python-importlib-metadata" ,python-importlib-metadata)))
6977 (native-inputs
6978 `(("python-setuptools-scm" ,python-setuptools-scm)
6979 ("python-sphinx" ,python-sphinx)
6980 ("python-rst.linker" ,python-rst.linker)
6981 ("python-pytest" ,python-pytest)
6982 ("python-pytest-runner" ,python-pytest-runner)
6983 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6984 (arguments
6985 `(#:phases
6986 (modify-phases %standard-phases
6987 (add-after 'build 'build-doc
6988 (lambda _
6989 (setenv "LANG" "en_US.UTF-8")
6990 (invoke "python" "setup.py" "build_sphinx")))
6991 (add-after 'install 'install-doc
6992 (lambda* (#:key outputs #:allow-other-keys)
6993 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6994 (doc (string-append data "/doc/" ,name "-" ,version))
6995 (html (string-append doc "/html")))
6996 (mkdir-p html)
6997 (for-each (lambda (file)
6998 (copy-file file (string-append doc "/" file)))
6999 '("README.rst" "CHANGES.rst"))
7000 (copy-recursively "build/sphinx/html" html)
7001 #t)))
7002 (replace 'check
7003 (lambda _
7004 ;; The import time test aborts if an import takes longer than
7005 ;; 100ms. It may very well take a little longer than that.
7006 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
7007 (home-page "https://github.com/jaraco/path.py")
7008 (synopsis "Python module wrapper for built-in os.path")
7009 (description
7010 "@code{path.py} implements path objects as first-class entities, allowing
7011 common operations on files to be invoked on those path objects directly.")
7012 (license license:expat)))
7013
7014 (define-public python-simplegeneric
7015 (package
7016 (name "python-simplegeneric")
7017 (version "0.8.1")
7018 (source
7019 (origin
7020 (method url-fetch)
7021 (uri (pypi-uri "simplegeneric" version ".zip"))
7022 (sha256
7023 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
7024 (build-system python-build-system)
7025 (native-inputs
7026 `(("unzip" ,unzip)))
7027 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
7028 (synopsis "Python module for simple generic functions")
7029 (description
7030 "The simplegeneric module lets you define simple single-dispatch generic
7031 functions, akin to Python’s built-in generic functions like @code{len()},
7032 @code{iter()} and so on. However, instead of using specially-named methods,
7033 these generic functions use simple lookup tables, akin to those used by
7034 e.g. @code{pickle.dump()} and other generic functions found in the Python
7035 standard library.")
7036 (license license:zpl2.1)))
7037
7038 (define-public python2-simplegeneric
7039 (package-with-python2 python-simplegeneric))
7040
7041 (define-public python-ipython-genutils
7042 ;; TODO: This package is retired, check if can be removed, see description.
7043 (package
7044 (name "python-ipython-genutils")
7045 (version "0.1.0")
7046 (source
7047 (origin
7048 (method url-fetch)
7049 (uri (pypi-uri "ipython_genutils" version))
7050 (sha256
7051 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7052 (build-system python-build-system)
7053 (arguments `(#:tests? #f)) ; no tests
7054 (home-page "https://ipython.org")
7055 (synopsis "Vestigial utilities from IPython")
7056 (description
7057 "This package provides retired utilities from IPython. No packages
7058 outside IPython/Jupyter should depend on it.
7059
7060 This package shouldn't exist. It contains some common utilities shared by
7061 Jupyter and IPython projects during The Big Split. As soon as possible, those
7062 packages will remove their dependency on this, and this package will go
7063 away.")
7064 (license license:bsd-3)))
7065
7066 (define-public python2-ipython-genutils
7067 (package-with-python2 python-ipython-genutils))
7068
7069 (define-public python-ipyparallel
7070 (package
7071 (name "python-ipyparallel")
7072 (version "6.2.4")
7073 (source
7074 (origin
7075 (method url-fetch)
7076 (uri (pypi-uri "ipyparallel" version))
7077 (sha256
7078 (base32
7079 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7080 (build-system python-build-system)
7081 (arguments
7082 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7083 #:phases
7084 (modify-phases %standard-phases
7085 (add-before 'check 'prepare-for-tests
7086 (lambda _
7087 (setenv "HOME" (getcwd))
7088 #t)))))
7089 (propagated-inputs
7090 `(("python-dateutil" ,python-dateutil)
7091 ("python-decorator" ,python-decorator)
7092 ("python-ipykernel" ,python-ipykernel)
7093 ("python-ipython" ,python-ipython)
7094 ("python-ipython-genutils" ,python-ipython-genutils)
7095 ("python-jupyter-client" ,python-jupyter-client)
7096 ("python-pyzmq" ,python-pyzmq)
7097 ("python-tornado" ,python-tornado)
7098 ("python-traitlets" ,python-traitlets)))
7099 (native-inputs
7100 `(("python-ipython" ,python-ipython)
7101 ("python-mock" ,python-mock)
7102 ("python-nose" ,python-nose)
7103 ("python-pytest" ,python-pytest)
7104 ("python-pytest-cov" ,python-pytest-cov)
7105 ("python-testpath" ,python-testpath)))
7106 (home-page "https://ipython.org/")
7107 (synopsis "Interactive Parallel Computing with IPython")
7108 (description
7109 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7110 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7111 CLI scripts:
7112 @enumerate
7113 @item ipcluster - start/stop a cluster
7114 @item ipcontroller - start a scheduler
7115 @item ipengine - start an engine
7116 @end enumerate")
7117 (license license:bsd-3)))
7118
7119 (define-public python2-ipyparallel
7120 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
7121 (package/inherit ipyparallel
7122 (propagated-inputs
7123 `(("python2-futures" ,python2-futures)
7124 ,@(package-propagated-inputs ipyparallel))))))
7125
7126 (define-public python-ipython-cluster-helper
7127 (package
7128 (name "python-ipython-cluster-helper")
7129 (version "0.6.4")
7130 (source
7131 (origin
7132 (method url-fetch)
7133 (uri (pypi-uri "ipython-cluster-helper" version))
7134 (sha256
7135 (base32
7136 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
7137 (modules '((guix build utils)))
7138 (snippet
7139 '(begin (substitute* "requirements.txt"
7140 (("ipython.*") "ipython\n"))
7141 #t))))
7142 (build-system python-build-system)
7143 (arguments
7144 `(#:tests? #f ; Test suite can't find IPython.
7145 #:phases
7146 (modify-phases %standard-phases
7147 (replace 'check
7148 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7149 (if tests?
7150 (begin
7151 (setenv "HOME" (getcwd))
7152 (add-installed-pythonpath inputs outputs)
7153 (invoke "python" "example/example.py" "--local"))
7154 #t))))))
7155 (propagated-inputs
7156 `(("python-ipyparallel" ,python-ipyparallel)
7157 ("python-ipython" ,python-ipython)
7158 ("python-netifaces" ,python-netifaces)
7159 ("python-pyzmq" ,python-pyzmq)
7160 ("python-setuptools" ,python-setuptools)
7161 ("python-six" ,python-six)))
7162 (home-page "https://github.com/roryk/ipython-cluster-helper")
7163 (synopsis
7164 "Simplify IPython cluster start up and use for multiple schedulers")
7165 (description
7166 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
7167 profile, launches a cluster and returns a view. On program exit it shuts the
7168 cluster down and deletes the throwaway profile.")
7169 (license license:expat)))
7170
7171 (define-public python2-ipython-cluster-helper
7172 (package-with-python2 python-ipython-cluster-helper))
7173
7174 (define-public python-traitlets
7175 (package
7176 (name "python-traitlets")
7177 (version "4.3.3")
7178 (source
7179 (origin
7180 (method url-fetch)
7181 (uri (pypi-uri "traitlets" version))
7182 (sha256
7183 (base32
7184 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
7185 (build-system python-build-system)
7186 (arguments
7187 `(#:phases
7188 (modify-phases %standard-phases
7189 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
7190 (propagated-inputs
7191 `(("python-ipython-genutils" ,python-ipython-genutils)
7192 ("python-decorator" ,python-decorator)))
7193 (native-inputs
7194 `(("python-pytest" ,python-pytest)))
7195 (properties `((python2-variant . ,(delay python2-traitlets))))
7196 (home-page "https://ipython.org")
7197 (synopsis "Configuration system for Python applications")
7198 (description
7199 "Traitlets is a framework that lets Python classes have attributes with
7200 type checking, dynamically calculated default values, and ‘on change’
7201 callbacks. The package also includes a mechanism to use traitlets for
7202 configuration, loading values from files or from command line arguments. This
7203 is a distinct layer on top of traitlets, so you can use traitlets in your code
7204 without using the configuration machinery.")
7205 (license license:bsd-3)))
7206
7207 (define-public python2-traitlets
7208 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
7209 (package/inherit traitlets
7210 (propagated-inputs
7211 `(("python2-enum34" ,python2-enum34)
7212 ,@(package-propagated-inputs traitlets))))))
7213
7214 (define-public python-jupyter-core
7215 (package
7216 (name "python-jupyter-core")
7217 (version "4.4.0")
7218 (source
7219 (origin
7220 (method url-fetch)
7221 (uri (string-append (pypi-uri "jupyter_core" version)))
7222 (sha256
7223 (base32
7224 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
7225 (build-system python-build-system)
7226 ;; FIXME: not sure how to run the tests
7227 (arguments `(#:tests? #f))
7228 (propagated-inputs
7229 `(("python-traitlets" ,python-traitlets)))
7230 (home-page "https://jupyter.org/")
7231 (synopsis "Jupyter base package")
7232 (description
7233 "Jupyter core is the base package on which Jupyter projects rely.")
7234 (license license:bsd-3)))
7235
7236 (define-public python2-jupyter-core
7237 (package-with-python2 python-jupyter-core))
7238
7239 (define-public python-jupyter-client
7240 (package
7241 (name "python-jupyter-client")
7242 (version "5.2.4")
7243 (source
7244 (origin
7245 (method url-fetch)
7246 (uri (pypi-uri "jupyter_client" version))
7247 (sha256
7248 (base32
7249 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
7250 (build-system python-build-system)
7251 ;; Tests fail because of missing native python kernel which I assume is
7252 ;; provided by the ipython package, which we cannot use because it would
7253 ;; cause a dependency cycle.
7254 (arguments
7255 `(#:tests? #f
7256
7257 #:phases (modify-phases %standard-phases
7258 (add-after 'unpack 'set-tool-file-names
7259 (lambda* (#:key inputs #:allow-other-keys)
7260 (let ((iproute (assoc-ref inputs "iproute")))
7261 (substitute* "jupyter_client/localinterfaces.py"
7262 (("'ip'")
7263 (string-append "'" iproute "/sbin/ip'")))
7264 #t))))))
7265 (inputs
7266 `(("iproute" ,iproute)))
7267 (propagated-inputs
7268 `(("python-pyzmq" ,python-pyzmq)
7269 ("python-traitlets" ,python-traitlets)
7270 ("python-jupyter-core" ,python-jupyter-core)))
7271 (home-page "https://jupyter.org/")
7272 (synopsis "Jupyter protocol implementation and client libraries")
7273 (description
7274 "The @code{jupyter_client} package contains the reference implementation
7275 of the Jupyter protocol. It also provides client and kernel management APIs
7276 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7277 installing @code{kernelspec}s for use with Jupyter frontends.")
7278 (license license:bsd-3)))
7279
7280 (define-public python2-jupyter-client
7281 (package-with-python2 python-jupyter-client))
7282
7283 (define-public python-ipykernel
7284 (package
7285 (name "python-ipykernel")
7286 (version "5.1.3")
7287 (source
7288 (origin
7289 (method url-fetch)
7290 (uri (pypi-uri "ipykernel" version))
7291 (sha256
7292 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
7293 (build-system python-build-system)
7294 (arguments
7295 `(#:phases
7296 (modify-phases %standard-phases
7297 (replace 'check
7298 (lambda _
7299 (setenv "HOME" "/tmp")
7300 (invoke "pytest" "-v")
7301 #t))
7302 (add-after 'install 'set-python-file-name
7303 (lambda* (#:key outputs #:allow-other-keys)
7304 ;; Record the absolute file name of the 'python' executable in
7305 ;; 'kernel.json'.
7306 (let ((out (assoc-ref outputs "out")))
7307 (substitute* (string-append out "/share/jupyter"
7308 "/kernels/python3/kernel.json")
7309 (("\"python\"")
7310 (string-append "\"" (which "python") "\"")))
7311 #t))))))
7312 (propagated-inputs
7313 `(("python-ipython" ,python-ipython)
7314 ;; imported at runtime during connect
7315 ("python-jupyter-client" ,python-jupyter-client)))
7316 (native-inputs
7317 `(("python-flaky" ,python-flaky)
7318 ("python-nose" ,python-nose)
7319 ("python-pytest" ,python-pytest)))
7320 (home-page "https://ipython.org")
7321 (synopsis "IPython Kernel for Jupyter")
7322 (description
7323 "This package provides the IPython kernel for Jupyter.")
7324 (properties `((python2-variant . ,(delay python2-ipykernel))))
7325 (license license:bsd-3)))
7326
7327 ;; Version 5.x and above no longer support Python 2.
7328 (define-public python2-ipykernel
7329 (package
7330 (name "python2-ipykernel")
7331 (version "4.10.1")
7332 (source
7333 (origin
7334 (method url-fetch)
7335 (uri (pypi-uri "ipykernel" version))
7336 (sha256
7337 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
7338 (build-system python-build-system)
7339 (arguments
7340 `(#:python ,python-2))
7341 (propagated-inputs
7342 `(("python2-ipython" ,python2-ipython)
7343 ;; imported at runtime during connect
7344 ("python2-jupyter-client" ,python2-jupyter-client)
7345 ("python2-tornado" ,python2-tornado)
7346 ("python2-traitlets" ,python2-traitlets)))
7347 (native-inputs
7348 `(("python2-mock" ,python2-mock)
7349 ("python2-nose" ,python2-nose)
7350 ("python2-pytest" ,python2-pytest)
7351 ("python2-pytest-cov" ,python2-pytest-cov)))
7352 (home-page "https://ipython.org")
7353 (synopsis "IPython Kernel for Jupyter")
7354 (description
7355 "This package provides the IPython kernel for Jupyter.")
7356 (license license:bsd-3)))
7357
7358 (define-public python-pari-jupyter
7359 (package
7360 (name "python-pari-jupyter")
7361 (version "1.3.2")
7362 (source
7363 (origin
7364 (method url-fetch)
7365 (uri (pypi-uri "pari_jupyter" version))
7366 (sha256
7367 (base32
7368 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7369 (build-system python-build-system)
7370 (propagated-inputs
7371 `(("python-ipykernel" ,python-ipykernel)))
7372 (inputs
7373 `(("pari-gp" ,pari-gp)
7374 ("readline" ,readline)))
7375 (arguments
7376 `(#:tests? #f)) ; no test suite
7377 (home-page
7378 "https://github.com/jdemeyer/pari_jupyter")
7379 (synopsis "A Jupyter kernel for PARI/GP")
7380 (description "The package provides a PARI/GP kernel for Jupyter.")
7381 (license license:gpl3+)))
7382
7383 (define-public python-backcall
7384 (package
7385 (name "python-backcall")
7386 (version "0.1.0")
7387 (source
7388 (origin
7389 (method url-fetch)
7390 (uri (pypi-uri "backcall" version))
7391 (sha256
7392 (base32
7393 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
7394 (build-system python-build-system)
7395 (home-page "https://github.com/takluyver/backcall/")
7396 (synopsis "Specifications for callback functions passed in to an API")
7397 (description
7398 "If your code lets other people supply callback functions, it's important
7399 to specify the function signature you expect, and check that functions support
7400 that. Adding extra parameters later would break other peoples code unless
7401 you're careful. The @code{backcall} package provides a way of specifying the
7402 callback signature using a prototype function.")
7403 (license license:bsd-3)))
7404
7405 (define-public python-ipython
7406 (package
7407 (name "python-ipython")
7408 (version "7.9.0")
7409 (source
7410 (origin
7411 (method url-fetch)
7412 (uri (pypi-uri "ipython" version ".tar.gz"))
7413 (sha256
7414 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7415 (build-system python-build-system)
7416 (propagated-inputs
7417 `(("python-backcall" ,python-backcall)
7418 ("python-pyzmq" ,python-pyzmq)
7419 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7420 ("python-terminado" ,python-terminado)
7421 ("python-matplotlib" ,python-matplotlib)
7422 ("python-numpy" ,python-numpy)
7423 ("python-numpydoc" ,python-numpydoc)
7424 ("python-jedi" ,python-jedi)
7425 ("python-jinja2" ,python-jinja2)
7426 ("python-mistune" ,python-mistune)
7427 ("python-pexpect" ,python-pexpect)
7428 ("python-pickleshare" ,python-pickleshare)
7429 ("python-simplegeneric" ,python-simplegeneric)
7430 ("python-jsonschema" ,python-jsonschema)
7431 ("python-traitlets" ,python-traitlets)
7432 ("python-nbformat" ,python-nbformat)
7433 ("python-pygments" ,python-pygments)))
7434 (inputs
7435 `(("readline" ,readline)
7436 ("which" ,which)))
7437 (native-inputs
7438 `(("graphviz" ,graphviz)
7439 ("pkg-config" ,pkg-config)
7440 ("python-requests" ,python-requests) ;; for tests
7441 ("python-testpath" ,python-testpath)
7442 ("python-nose" ,python-nose)))
7443 (arguments
7444 `(#:phases
7445 (modify-phases %standard-phases
7446 (add-after 'unpack 'make-docs-reproducible
7447 (lambda _
7448 (substitute* "IPython/sphinxext/ipython_directive.py"
7449 ((".*import datetime") "")
7450 ((".*datetime.datetime.now\\(\\)") "")
7451 (("%timeit") "# %timeit"))
7452 #t))
7453 ;; Tests can only be run after the library has been installed and not
7454 ;; within the source directory.
7455 (delete 'check)
7456 (add-after 'install 'check
7457 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7458 (if tests?
7459 (begin
7460 ;; Make installed package available for running the tests
7461 (add-installed-pythonpath inputs outputs)
7462 (setenv "HOME" "/tmp/") ;; required by a test
7463 ;; We only test the core because one of the other tests
7464 ;; tries to import ipykernel.
7465 (invoke "python" "IPython/testing/iptest.py"
7466 "-v" "IPython/core/tests"))
7467 #t)))
7468 (add-before 'check 'fix-tests
7469 (lambda* (#:key inputs #:allow-other-keys)
7470 (substitute* "./IPython/utils/_process_posix.py"
7471 (("/usr/bin/env', 'which") (which "which")))
7472 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7473 (("#!/usr/bin/env python")
7474 (string-append "#!" (which "python"))))
7475 ;; This test introduces a circular dependency on ipykernel
7476 ;; (which depends on ipython).
7477 (delete-file "IPython/core/tests/test_display.py")
7478 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7479 (delete-file "IPython/core/tests/test_interactiveshell.py")
7480 #t)))))
7481 (home-page "https://ipython.org")
7482 (synopsis "IPython is a tool for interactive computing in Python")
7483 (description
7484 "IPython provides a rich architecture for interactive computing with:
7485 Powerful interactive shells, a browser-based notebook, support for interactive
7486 data visualization, embeddable interpreters and tools for parallel
7487 computing.")
7488 (properties `((python2-variant . ,(delay python2-ipython))))
7489 (license license:bsd-3)))
7490
7491 ;; This is the latest release of the LTS version of ipython with support for
7492 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7493 ;; dropped support for Python 2.7.
7494 (define-public python2-ipython
7495 (package
7496 (name "python2-ipython")
7497 (version "5.8.0")
7498 (source
7499 (origin
7500 (method url-fetch)
7501 (uri (pypi-uri "ipython" version ".tar.gz"))
7502 (sha256
7503 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7504 (build-system python-build-system)
7505 (propagated-inputs
7506 `(("python2-backports-shutil-get-terminal-size"
7507 ,python2-backports-shutil-get-terminal-size)
7508 ("python2-pathlib2" ,python2-pathlib2)
7509 ("python2-pyzmq" ,python2-pyzmq)
7510 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7511 ("python2-terminado" ,python2-terminado)
7512 ("python2-matplotlib" ,python2-matplotlib)
7513 ("python2-numpy" ,python2-numpy)
7514 ("python2-numpydoc" ,python2-numpydoc)
7515 ("python2-jinja2" ,python2-jinja2)
7516 ("python2-mistune" ,python2-mistune)
7517 ("python2-pexpect" ,python2-pexpect)
7518 ("python2-pickleshare" ,python2-pickleshare)
7519 ("python2-simplegeneric" ,python2-simplegeneric)
7520 ("python2-jsonschema" ,python2-jsonschema)
7521 ("python2-traitlets" ,python2-traitlets)
7522 ("python2-nbformat" ,python2-nbformat)
7523 ("python2-pygments" ,python2-pygments)))
7524 (inputs
7525 `(("readline" ,readline)
7526 ("which" ,which)))
7527 (native-inputs
7528 `(("graphviz" ,graphviz)
7529 ("pkg-config" ,pkg-config)
7530 ("python2-requests" ,python2-requests) ;; for tests
7531 ("python2-testpath" ,python2-testpath)
7532 ("python2-mock" ,python2-mock)
7533 ("python2-nose" ,python2-nose)))
7534 (arguments
7535 `(#:python ,python-2
7536 #:phases
7537 (modify-phases %standard-phases
7538 (add-before 'check 'delete-broken-tests
7539 (lambda* (#:key inputs #:allow-other-keys)
7540 ;; These tests throw errors for unknown reasons.
7541 (delete-file "IPython/core/tests/test_displayhook.py")
7542 (delete-file "IPython/core/tests/test_magic_terminal.py")
7543 (delete-file "IPython/core/tests/test_profile.py")
7544 #t)))))
7545 (home-page "https://ipython.org")
7546 (synopsis "IPython is a tool for interactive computing in Python")
7547 (description
7548 "IPython provides a rich architecture for interactive computing with:
7549 Powerful interactive shells, a browser-based notebook, support for interactive
7550 data visualization, embeddable interpreters and tools for parallel
7551 computing.")
7552 (license license:bsd-3)))
7553
7554 (define-public python-ipython-documentation
7555 (package
7556 (inherit python-ipython)
7557 (name "python-ipython-documentation")
7558 (version (package-version python-ipython))
7559 (arguments
7560 `(#:phases
7561 (modify-phases %standard-phases
7562 (delete 'build)
7563 (delete 'check)
7564 (replace 'install
7565 (lambda* (#:key outputs #:allow-other-keys)
7566 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7567 (doc (string-append data "/doc/" ,name "-" ,version))
7568 (html (string-append doc "/html"))
7569 (man1 (string-append data "/man/man1"))
7570 (info (string-append data "/info"))
7571 (examples (string-append doc "/examples"))
7572 (python-arg (string-append "PYTHON=" (which "python"))))
7573 (setenv "LANG" "en_US.utf8")
7574 (with-directory-excursion "docs"
7575 ;; FIXME: pdf fails to build
7576 ;;(system* "make" "pdf" "PAPER=a4")
7577 (system* "make" python-arg "html")
7578 ;; FIXME: the generated texi file contains ^@^@, which trips
7579 ;; up the parser.
7580 ;; (system* "make" python-arg "info")
7581 )
7582 (copy-recursively "docs/man" man1)
7583 (copy-recursively "examples" examples)
7584 (copy-recursively "docs/build/html" html)
7585 ;; (copy-file "docs/build/latex/ipython.pdf"
7586 ;; (string-append doc "/ipython.pdf"))
7587 (mkdir-p info)
7588 ;; (copy-file "docs/build/texinfo/ipython.info"
7589 ;; (string-append info "/ipython.info"))
7590 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7591 #t)))))
7592 (inputs
7593 `(("python-ipython" ,python-ipython)
7594 ("python-ipykernel" ,python-ipykernel)))
7595 (native-inputs
7596 `(("python-sphinx" ,python-sphinx)
7597 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7598 ;; FIXME: It's possible that a smaller union would work just as well.
7599 ("texlive" ,(texlive-union (list texlive-amsfonts
7600 texlive-fonts-ec
7601 texlive-generic-ifxetex
7602 texlive-generic-pdftex
7603 texlive-latex-capt-of
7604 texlive-latex-cmap
7605 texlive-latex-environ
7606 texlive-latex-eqparbox
7607 texlive-latex-etoolbox
7608 texlive-latex-expdlist
7609 texlive-latex-fancyhdr
7610 texlive-latex-fancyvrb
7611 texlive-latex-fncychap
7612 texlive-latex-float
7613 texlive-latex-framed
7614 texlive-latex-geometry
7615 texlive-latex-graphics
7616 texlive-latex-hyperref
7617 texlive-latex-mdwtools
7618 texlive-latex-multirow
7619 texlive-latex-needspace
7620 texlive-latex-oberdiek
7621 texlive-latex-parskip
7622 texlive-latex-preview
7623 texlive-latex-tabulary
7624 texlive-latex-threeparttable
7625 texlive-latex-titlesec
7626 texlive-latex-trimspaces
7627 texlive-latex-ucs
7628 texlive-latex-upquote
7629 texlive-latex-url
7630 texlive-latex-varwidth
7631 texlive-latex-wrapfig)))
7632 ("texinfo" ,texinfo)))))
7633
7634 (define-public python-urwid
7635 (package
7636 (name "python-urwid")
7637 (version "2.1.0")
7638 (source
7639 (origin
7640 (method url-fetch)
7641 (uri (pypi-uri "urwid" version))
7642 (sha256
7643 (base32
7644 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7645 (build-system python-build-system)
7646 (home-page "http://urwid.org")
7647 (synopsis "Console user interface library for Python")
7648 (description
7649 "Urwid is a curses-based UI/widget library for Python. It includes many
7650 features useful for text console applications.")
7651 (license license:lgpl2.1+)))
7652
7653 (define-public python2-urwid
7654 (package-with-python2 python-urwid))
7655
7656 (define-public python-urwidtrees
7657 (package
7658 (name "python-urwidtrees")
7659 (version "1.0.2")
7660 (source
7661 (origin
7662 (method git-fetch)
7663 ;; package author intends on distributing via github rather than pypi:
7664 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7665 (uri (git-reference
7666 (url "https://github.com/pazz/urwidtrees")
7667 (commit version)))
7668 (file-name (git-file-name name version))
7669 (sha256
7670 (base32
7671 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7672 (build-system python-build-system)
7673 (arguments
7674 '(#:use-setuptools? #f
7675 #:tests? #f)) ; no tests
7676 (propagated-inputs `(("python-urwid" ,python-urwid)))
7677 (home-page "https://github.com/pazz/urwidtrees")
7678 (synopsis "Tree widgets for urwid")
7679 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7680 toolkit. Use it to build trees of widgets.")
7681 (license license:gpl3+)))
7682
7683 (define-public python2-urwidtrees
7684 (package-with-python2 python-urwidtrees))
7685
7686 (define-public python-ua-parser
7687 (package
7688 (name "python-ua-parser")
7689 (version "0.8.0")
7690 (source
7691 (origin
7692 (method url-fetch)
7693 (uri (pypi-uri "ua-parser" version))
7694 (sha256
7695 (base32
7696 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7697 (build-system python-build-system)
7698 (arguments
7699 `(#:tests? #f)) ;no test suite in release
7700 (native-inputs
7701 `(("python-pyyaml" ,python-pyyaml)))
7702 (home-page "https://github.com/ua-parser/uap-python")
7703 (synopsis "User agent parser")
7704 (description
7705 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7706 (license license:asl2.0)))
7707
7708 (define-public python2-ua-parser
7709 (package-with-python2 python-ua-parser))
7710
7711 (define-public python-user-agents
7712 (package
7713 (name "python-user-agents")
7714 (version "1.1.0")
7715 (source
7716 (origin
7717 (method url-fetch)
7718 (uri (pypi-uri "user-agents" version))
7719 (sha256
7720 (base32
7721 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7722 (build-system python-build-system)
7723 (arguments
7724 `(#:tests? #f)) ;missing devices.json test file in release
7725 (propagated-inputs
7726 `(("python-ua-parser" ,python-ua-parser)))
7727 (home-page "https://github.com/selwin/python-user-agents")
7728 (synopsis "User Agent strings parsing library")
7729 (description
7730 "A library to identify devices (phones, tablets) and their capabilities by
7731 parsing (browser/HTTP) user agent strings.")
7732 (license license:expat)))
7733
7734 (define-public python2-user-agents
7735 (package-with-python2 python-user-agents))
7736
7737 (define-public python-dbus
7738 (package
7739 (name "python-dbus")
7740 (version "1.2.16")
7741 (source
7742 (origin
7743 (method url-fetch)
7744 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7745 "dbus-python-" version ".tar.gz"))
7746 (sha256
7747 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7748 (build-system gnu-build-system)
7749 (native-inputs
7750 `(("pkg-config" ,pkg-config)))
7751 (inputs
7752 `(("python" ,python-wrapper)
7753 ("dbus-glib" ,dbus-glib)))
7754 (synopsis "Python bindings for D-bus")
7755 (description "python-dbus provides bindings for libdbus, the reference
7756 implementation of D-Bus.")
7757 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7758 (license license:expat)))
7759
7760 (define-public python2-dbus
7761 (package/inherit python-dbus
7762 (name "python2-dbus")
7763 (inputs `(("python" ,python-2)
7764 ,@(alist-delete "python"
7765 (package-inputs python-dbus)
7766 equal?)))))
7767
7768 (define-public python-notify2
7769 (package
7770 (name "python-notify2")
7771 (version "0.3.1")
7772 (source
7773 (origin
7774 (method url-fetch)
7775 (uri (pypi-uri "notify2" version))
7776 (sha256
7777 (base32
7778 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7779 (build-system python-build-system)
7780 (arguments `(#:tests? #f)) ; tests depend on system state
7781 (native-inputs
7782 `(("python-dbus" ,python-dbus)))
7783 (home-page "https://bitbucket.org/takluyver/pynotify2")
7784 (synopsis "Python interface to D-Bus notifications")
7785 (description
7786 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7787 It is a reimplementation of pynotify in pure Python, and an alternative to
7788 the GObject Introspection bindings to libnotify for non-GTK applications.")
7789 (license (list license:bsd-2
7790 license:lgpl2.1+))))
7791
7792 (define-public python2-notify2
7793 (package-with-python2 python-notify2))
7794
7795 ;; beautifulsoup4 has a totally different namespace than 3.x,
7796 ;; and pypi seems to put it under its own name, so I guess we should too
7797 (define-public python-beautifulsoup4
7798 (package
7799 (name "python-beautifulsoup4")
7800 (version "4.9.1")
7801 (source
7802 (origin
7803 (method url-fetch)
7804 (uri (pypi-uri "beautifulsoup4" version))
7805 (sha256
7806 (base32
7807 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7808 (build-system python-build-system)
7809 (arguments
7810 `(#:phases
7811 (modify-phases %standard-phases
7812 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7813 ;; must use this conversion script when building with Python 3. The
7814 ;; conversion script also runs the tests.
7815 ;; For more information, see the file 'convert-py3k' in the source
7816 ;; distribution.
7817 (replace 'check
7818 (lambda _ (invoke "./convert-py3k"))))))
7819 (propagated-inputs
7820 `(("python-soupsieve" ,python-soupsieve)))
7821 (home-page
7822 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7823 (synopsis
7824 "Python screen-scraping library")
7825 (description
7826 "Beautiful Soup is a Python library designed for rapidly setting up
7827 screen-scraping projects. It offers Pythonic idioms for navigating,
7828 searching, and modifying a parse tree, providing a toolkit for
7829 dissecting a document and extracting what you need. It automatically
7830 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7831 (license license:expat)
7832 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7833
7834 (define-public python2-beautifulsoup4
7835 (let ((base (package-with-python2
7836 (strip-python2-variant python-beautifulsoup4))))
7837 (package/inherit base
7838 (arguments `(#:python ,python-2)))))
7839
7840 (define-public python-soupsieve
7841 (package
7842 (name "python-soupsieve")
7843 (version "2.0.1")
7844 (source
7845 (origin
7846 (method url-fetch)
7847 (uri (pypi-uri "soupsieve" version))
7848 (sha256
7849 (base32
7850 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7851 (build-system python-build-system)
7852 (arguments `(#:tests? #f))
7853 ;;XXX: 2 tests fail currently despite claming they were to be
7854 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7855 ;;don't want to create a circular dependency.
7856 (home-page "https://github.com/facelessuser/soupsieve")
7857 (synopsis "CSS selector library")
7858 (description
7859 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7860 Soup 4. It aims to provide selecting, matching, and filtering using modern
7861 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7862 specifications up through the latest CSS level 4 drafts and beyond (though
7863 some are not yet implemented).")
7864 (properties `((python2-variant . ,(delay python2-soupsieve))))
7865 (license license:expat)))
7866
7867 ;; This is the last version that supports python-2
7868 (define-public python2-soupsieve
7869 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7870 (package
7871 (inherit base)
7872 (version "1.9.6")
7873 (source
7874 (origin
7875 (method url-fetch)
7876 (uri (pypi-uri "soupsieve" version))
7877 (sha256
7878 (base32
7879 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7880 (propagated-inputs
7881 `(("python2-backports-functools-lru-cache"
7882 ,python2-backports-functools-lru-cache)
7883 ,@(package-propagated-inputs base))))))
7884
7885 (define-public python-netifaces
7886 (package
7887 (name "python-netifaces")
7888 (version "0.10.9")
7889 (source
7890 (origin
7891 (method url-fetch)
7892 (uri (pypi-uri "netifaces" version))
7893 (sha256
7894 (base32
7895 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7896 (build-system python-build-system)
7897 (home-page "https://github.com/al45tair/netifaces")
7898 (synopsis
7899 "Python module for portable network interface information")
7900 (description
7901 "Netifaces is a Python module providing information on network
7902 interfaces in an easy and portable manner.")
7903 (license license:expat)))
7904
7905 (define-public python2-netifaces
7906 (package-with-python2 python-netifaces))
7907
7908 (define-public python-networkx
7909 (package
7910 (name "python-networkx")
7911 (version "2.5")
7912 (source
7913 (origin
7914 (method url-fetch)
7915 (uri (pypi-uri "networkx" version))
7916 (sha256
7917 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7918 (build-system python-build-system)
7919 (arguments
7920 '(#:phases (modify-phases %standard-phases
7921 (replace 'check
7922 (lambda* (#:key tests? #:allow-other-keys)
7923 (if tests?
7924 (invoke "pytest" "-vv" "--pyargs" "networkx")
7925 (format #t "test suite not run~%"))
7926 #t)))))
7927 ;; python-decorator is needed at runtime.
7928 (propagated-inputs
7929 `(("python-decorator" ,python-decorator)))
7930 (native-inputs
7931 `(("python-pytest" ,python-pytest)))
7932 (home-page "https://networkx.github.io/")
7933 (synopsis "Python module for creating and manipulating graphs and networks")
7934 (description
7935 "NetworkX is a Python package for the creation, manipulation, and study
7936 of the structure, dynamics, and functions of complex networks.")
7937 (properties `((python2-variant . ,(delay python2-networkx))))
7938 (license license:bsd-3)))
7939
7940 ;; NetworkX 2.2 is the last version with support for Python 2.
7941 (define-public python2-networkx
7942 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7943 (package
7944 (inherit base)
7945 (version "2.2")
7946 (source (origin
7947 (method url-fetch)
7948 (uri (pypi-uri "networkx" version ".zip"))
7949 (sha256
7950 (base32
7951 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7952 (arguments
7953 `(#:python ,python-2))
7954 (native-inputs
7955 `(("python-nose" ,python2-nose)
7956 ("unzip" ,unzip))))))
7957
7958 (define-public python-datrie
7959 (package
7960 (name "python-datrie")
7961 (version "0.8.2")
7962 (source
7963 (origin
7964 (method url-fetch)
7965 (uri (pypi-uri "datrie" version))
7966 (sha256
7967 (base32
7968 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7969 (build-system python-build-system)
7970 (native-inputs
7971 `(("python-cython" ,python-cython)
7972 ("python-hypothesis" ,python-hypothesis)
7973 ("python-pytest" ,python-pytest)
7974 ("python-pytest-runner" ,python-pytest-runner)))
7975 (home-page "https://github.com/kmike/datrie")
7976 (synopsis "Fast, efficiently stored trie for Python")
7977 (description
7978 "This package provides a fast, efficiently stored trie implementation for
7979 Python.")
7980 (license license:lgpl2.1+)))
7981
7982 (define-public python-amply
7983 (package
7984 (name "python-amply")
7985 (version "0.1.4")
7986 (source
7987 (origin
7988 (method url-fetch)
7989 (uri (pypi-uri "amply" version))
7990 (sha256
7991 (base32
7992 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
7993 (build-system python-build-system)
7994 (propagated-inputs
7995 `(("python-docutils" ,python-docutils)
7996 ("python-pyparsing" ,python-pyparsing)))
7997 (native-inputs
7998 `(("python-setuptools-scm" ,python-setuptools-scm)))
7999 (home-page "https://github.com/willu47/amply")
8000 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
8001 (description
8002 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
8003 structures.")
8004 (license license:epl1.0)))
8005
8006 (define-public python-pulp
8007 (package
8008 (name "python-pulp")
8009 (version "2.4")
8010 (source
8011 (origin
8012 (method url-fetch)
8013 (uri (pypi-uri "PuLP" version))
8014 (sha256
8015 (base32
8016 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
8017 (build-system python-build-system)
8018 (propagated-inputs
8019 `(("python-amply" ,python-amply)))
8020 (home-page "https://github.com/coin-or/pulp")
8021 (synopsis "Linear Programming modeler")
8022 (description
8023 "PuLP is a Linear Programming modeler written in Python. PuLP can
8024 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
8025 solve linear problems.")
8026 (license license:expat)))
8027
8028 (define-public python-toposort
8029 (package
8030 (name "python-toposort")
8031 (version "1.6")
8032 (source
8033 (origin
8034 (method url-fetch)
8035 (uri (pypi-uri "toposort" version))
8036 (sha256
8037 (base32
8038 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
8039 (build-system python-build-system)
8040 (home-page "https://gitlab.com/ericvsmith/toposort")
8041 (synopsis "Topological sort algorithm")
8042 (description
8043 "This package provides an implementation of a topological sort
8044 algorithm.")
8045 (license license:asl2.0)))
8046
8047 (define-public snakemake
8048 (package
8049 (name "snakemake")
8050 (version "5.32.2")
8051 (source
8052 (origin
8053 (method url-fetch)
8054 (uri (pypi-uri "snakemake" version))
8055 (sha256
8056 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
8057 (build-system python-build-system)
8058 (arguments
8059 ;; TODO: Package missing test dependencies.
8060 '(#:tests? #f
8061 #:phases
8062 (modify-phases %standard-phases
8063 ;; For cluster execution Snakemake will call Python. Since there is
8064 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
8065 ;; this by calling the snakemake wrapper instead.
8066 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
8067 (lambda* (#:key outputs #:allow-other-keys)
8068 (substitute* "snakemake/executors/__init__.py"
8069 (("\\{sys.executable\\} -m snakemake")
8070 (string-append (assoc-ref outputs "out")
8071 "/bin/snakemake")))
8072 #t)))))
8073 (propagated-inputs
8074 `(("python-appdirs" ,python-appdirs)
8075 ("python-configargparse" ,python-configargparse)
8076 ("python-datrie" ,python-datrie)
8077 ("python-docutils" ,python-docutils)
8078 ("python-gitpython" ,python-gitpython)
8079 ("python-jinja2" ,python-jinja2)
8080 ("python-jsonschema" ,python-jsonschema)
8081 ("python-nbformat" ,python-nbformat)
8082 ("python-networkx" ,python-networkx)
8083 ("python-psutil" ,python-psutil)
8084 ("python-pulp" ,python-pulp)
8085 ("python-pyyaml" ,python-pyyaml)
8086 ("python-ratelimiter" ,python-ratelimiter)
8087 ("python-requests" ,python-requests)
8088 ("python-toposort" ,python-toposort)
8089 ("python-wrapt" ,python-wrapt)))
8090 (home-page "https://snakemake.readthedocs.io")
8091 (synopsis "Python-based execution environment for make-like workflows")
8092 (description
8093 "Snakemake aims to reduce the complexity of creating workflows by
8094 providing a clean and modern domain specific specification language (DSL) in
8095 Python style, together with a fast and comfortable execution environment.")
8096 (license license:expat)))
8097
8098 (define-public python-pyqrcode
8099 (package
8100 (name "python-pyqrcode")
8101 (version "1.2.1")
8102 (source
8103 (origin
8104 (method url-fetch)
8105 (uri (pypi-uri "PyQRCode" version))
8106 (sha256
8107 (base32
8108 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8109 (build-system python-build-system)
8110 (home-page
8111 "https://github.com/mnooner256/pyqrcode")
8112 (synopsis "QR code generator")
8113 (description
8114 "Pyqrcode is a QR code generator written purely in Python with
8115 SVG, EPS, PNG and terminal output.")
8116 (license license:bsd-3)))
8117
8118 (define-public python-seaborn
8119 (package
8120 (name "python-seaborn")
8121 (version "0.10.0")
8122 (source
8123 (origin
8124 (method url-fetch)
8125 (uri (pypi-uri "seaborn" version))
8126 (sha256
8127 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
8128 (build-system python-build-system)
8129 (arguments
8130 `(#:phases
8131 (modify-phases %standard-phases
8132 (add-before 'check 'start-xserver
8133 (lambda* (#:key inputs #:allow-other-keys)
8134 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8135 ;; There must be a running X server and make check doesn't
8136 ;; start one. Therefore we must do it.
8137 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8138 (setenv "DISPLAY" ":1")
8139 #t)))
8140 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
8141 (propagated-inputs
8142 `(("python-pandas" ,python-pandas)
8143 ("python-matplotlib" ,python-matplotlib)
8144 ("python-numpy" ,python-numpy)
8145 ("python-scipy" ,python-scipy)))
8146 (native-inputs
8147 `(("python-pytest" ,python-pytest)
8148 ("xorg-server" ,xorg-server-for-tests)))
8149 (home-page "https://seaborn.pydata.org/")
8150 (synopsis "Statistical data visualization")
8151 (description
8152 "Seaborn is a library for making attractive and informative statistical
8153 graphics in Python. It is built on top of matplotlib and tightly integrated
8154 with the PyData stack, including support for numpy and pandas data structures
8155 and statistical routines from scipy and statsmodels.")
8156 (properties `((python2-variant . ,(delay python2-seaborn))))
8157 (license license:bsd-3)))
8158
8159 ;; 0.9.1 is the last release with support for Python 2.
8160 (define-public python2-seaborn
8161 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8162 (package
8163 (inherit base)
8164 (version "0.9.1")
8165 (source (origin
8166 (method url-fetch)
8167 (uri (pypi-uri "seaborn" version))
8168 (sha256
8169 (base32
8170 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8171
8172 (define-public python-mpmath
8173 (package
8174 (name "python-mpmath")
8175 (version "1.1.0")
8176 (source (origin
8177 (method url-fetch)
8178 (uri (pypi-uri "mpmath" version))
8179 (file-name (git-file-name name version))
8180 (sha256
8181 (base32
8182 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8183 (build-system python-build-system)
8184 (native-inputs
8185 `(("python-pytest" ,python-pytest)))
8186 (arguments
8187 '(#:phases
8188 (modify-phases %standard-phases
8189 (replace 'check
8190 (lambda _
8191 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8192 (home-page "https://mpmath.org")
8193 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8194 (description
8195 "@code{mpmath} can be used as an arbitrary-precision substitute for
8196 Python's float/complex types and math/cmath modules, but also does much
8197 more advanced mathematics.")
8198 (license license:bsd-3)))
8199
8200 (define-public python2-mpmath
8201 (package-with-python2 python-mpmath))
8202
8203 (define-public python-bigfloat
8204 (package
8205 (name "python-bigfloat")
8206 (version "0.3.0")
8207 (source
8208 (origin
8209 (method url-fetch)
8210 (uri (pypi-uri "bigfloat" version))
8211 (sha256
8212 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8213 (build-system python-build-system)
8214 (inputs
8215 `(("mpfr" ,mpfr)))
8216 (home-page "https://github.com/mdickinson/bigfloat")
8217 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8218 (description
8219 "This package provides a Python interface to the MPFR library for
8220 multiprecision arithmetic.")
8221 (license license:lgpl3+)))
8222
8223 (define-public python2-bigfloat
8224 (package-with-python2 python-bigfloat))
8225
8226 (define-public python-sympy
8227 (package
8228 (name "python-sympy")
8229 (version "1.7.1")
8230 (source
8231 (origin
8232 (method url-fetch)
8233 (uri (pypi-uri "sympy" version))
8234 (sha256
8235 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8236 (build-system python-build-system)
8237 (arguments
8238 `(#:phases
8239 (modify-phases %standard-phases
8240 (replace 'check
8241 (lambda* (#:key outputs #:allow-other-keys)
8242 (invoke
8243 (or (which "python3") (which "python"))
8244 "-c" "import sympy; sympy.test(\"/core\")"))))))
8245 (propagated-inputs
8246 `(("python-mpmath" ,python-mpmath)))
8247 (home-page "https://www.sympy.org/")
8248 (synopsis "Python library for symbolic mathematics")
8249 (description
8250 "SymPy is a Python library for symbolic mathematics. It aims to become a
8251 full-featured computer algebra system (CAS) while keeping the code as simple
8252 as possible in order to be comprehensible and easily extensible.")
8253 (license license:bsd-3)))
8254
8255 (define-public python2-sympy
8256 (package
8257 (inherit (package-with-python2 python-sympy))
8258 (version "1.5.1") ; last release for python2
8259 (source
8260 (origin
8261 (method url-fetch)
8262 (uri (pypi-uri "sympy" version))
8263 (sha256
8264 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8265
8266 (define-public python-q
8267 (package
8268 (name "python-q")
8269 (version "2.6")
8270 (source
8271 (origin
8272 (method url-fetch)
8273 (uri (pypi-uri "q" version))
8274 (sha256
8275 (base32
8276 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
8277 (build-system python-build-system)
8278 (home-page "https://github.com/zestyping/q")
8279 (synopsis "Quick-and-dirty debugging output for tired programmers")
8280 (description
8281 "q is a Python module for \"print\" style of debugging Python code. It
8282 provides convenient short API for print out of values, tracebacks, and
8283 falling into the Python interpreter.")
8284 (license license:asl2.0)))
8285
8286 (define-public python2-q
8287 (package-with-python2 python-q))
8288
8289 (define-public python-xlib
8290 (package
8291 (name "python-xlib")
8292 (version "0.29")
8293 (source
8294 (origin
8295 (method git-fetch)
8296 (uri (git-reference
8297 (url "https://github.com/python-xlib/python-xlib")
8298 (commit version)))
8299 (file-name (git-file-name name version))
8300 (sha256
8301 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
8302 (build-system python-build-system)
8303 (arguments
8304 `(#:phases
8305 (modify-phases %standard-phases
8306 (add-before 'check 'start-xserver
8307 (lambda* (#:key inputs #:allow-other-keys)
8308 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8309 ;; There must be a running X server and make check doesn't
8310 ;; start one. Therefore we must do it.
8311 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8312 (setenv "DISPLAY" ":1")
8313 #t))))))
8314 (native-inputs
8315 `(("python-mock" ,python-mock)
8316 ("python-setuptools-scm" ,python-setuptools-scm)
8317 ("xorg-server" ,xorg-server)))
8318 (propagated-inputs
8319 `(("python-six" ,python-six)))
8320 (home-page "https://github.com/python-xlib/python-xlib")
8321 (synopsis "Python X11 client library")
8322 (description
8323 "The Python X Library is intended to be a fully functional
8324 X client library for Python programs. It is useful to implement
8325 low-level X clients. It is written entirely in Python.")
8326 (license license:gpl2+)))
8327
8328 (define-public python2-xlib
8329 (package-with-python2 python-xlib))
8330
8331 (define-public python-singledispatch
8332 (package
8333 (name "python-singledispatch")
8334 (version "3.4.0.3")
8335 (source
8336 (origin
8337 (method url-fetch)
8338 (uri (pypi-uri "singledispatch" version))
8339 (sha256
8340 (base32
8341 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8342 (build-system python-build-system)
8343 (native-inputs
8344 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8345 (home-page
8346 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8347 (synopsis "Backport of singledispatch feature from Python 3.4")
8348 (description
8349 "This library brings functools.singledispatch from Python 3.4 to Python
8350 2.6-3.3.")
8351 (license license:expat)))
8352
8353 (define-public python2-singledispatch
8354 (package-with-python2 python-singledispatch))
8355
8356 ;; the python- version can be removed with python-3.5
8357 (define-public python-backports-abc
8358 (package
8359 (name "python-backports-abc")
8360 (version "0.5")
8361 (source
8362 (origin
8363 (method url-fetch)
8364 (uri (pypi-uri "backports_abc" version))
8365 (sha256
8366 (base32
8367 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
8368 (build-system python-build-system)
8369 (home-page "https://github.com/cython/backports_abc")
8370 (synopsis "Backport of additions to the 'collections.abc' module")
8371 (description
8372 "Python-backports-abc provides a backport of additions to the
8373 @code{collections.abc} module in Python-3.5.")
8374 (license license:psfl)))
8375
8376 (define-public python2-backports-abc
8377 (package-with-python2 python-backports-abc))
8378
8379 (define-public python-backports-csv
8380 (package
8381 (name "python-backports-csv")
8382 (version "1.0.7")
8383 (source
8384 (origin
8385 (method url-fetch)
8386 (uri (pypi-uri "backports.csv" version))
8387 (sha256
8388 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8389 (build-system python-build-system)
8390 (home-page "https://github.com/ryanhiebert/backports.csv")
8391 (synopsis "Backport of Python 3's csv module for Python 2")
8392 (description
8393 "Provides a backport of Python 3's @code{csv} module for parsing
8394 comma separated values. The API of the @code{csv} module in Python 2
8395 is drastically different from the @code{csv} module in Python 3.
8396 This is due, for the most part, to the difference between str in
8397 Python 2 and Python 3.")
8398 (license license:psfl)))
8399
8400 (define-public python2-backports-csv
8401 (package-with-python2 python-backports-csv))
8402
8403 (define-public python2-backports-shutil-get-terminal-size
8404 (package
8405 (name "python2-backports-shutil-get-terminal-size")
8406 (version "1.0.0")
8407 (source
8408 (origin
8409 (method url-fetch)
8410 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8411 (sha256
8412 (base32
8413 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8414 (build-system python-build-system)
8415 (arguments
8416 `(#:python ,python-2
8417 #:phases
8418 (modify-phases %standard-phases
8419 (replace 'check
8420 (lambda _
8421 (setenv "PYTHONPATH" (string-append "./build/lib:"
8422 (getenv "PYTHONPATH")))
8423 (invoke "py.test" "-v"))))))
8424 (native-inputs
8425 `(("python2-pytest" ,python2-pytest)))
8426 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8427 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8428 (description
8429 "This package provides a backport of the @code{get_terminal_size
8430 function} from Python 3.3's @code{shutil}.
8431 Unlike the original version it is written in pure Python rather than C,
8432 so it might be a tiny bit slower.")
8433 (license license:expat)))
8434
8435 (define-public python-waf
8436 (package
8437 (name "python-waf")
8438 (version "2.0.19")
8439 (source (origin
8440 (method url-fetch)
8441 (uri (string-append "https://waf.io/"
8442 "waf-" version ".tar.bz2"))
8443 (sha256
8444 (base32
8445 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8446 (build-system python-build-system)
8447 (arguments
8448 '(#:phases
8449 (modify-phases %standard-phases
8450 (replace 'build
8451 (lambda _
8452 ;; XXX: Find a way to add all extra tools.
8453 (let ((tools '("gccdeps"
8454 "clang_compilation_database")))
8455 (invoke "python" "waf-light" "configure" "build"
8456 (string-append "--tools="
8457 (string-join tools ","))))))
8458 (replace 'check
8459 (lambda _
8460 (invoke "python" "waf" "--version")))
8461 (replace 'install
8462 (lambda* (#:key outputs #:allow-other-keys)
8463 (let ((out (assoc-ref outputs "out")))
8464 (install-file "waf" (string-append out "/bin")))
8465 #t))
8466 ;; waf breaks when it is wrapped.
8467 (delete 'wrap))))
8468 (home-page "https://waf.io/")
8469 (synopsis "Python-based build system")
8470 (description
8471 "Waf is a Python-based framework for configuring, compiling and installing
8472 applications.")
8473 (license license:bsd-3)))
8474
8475 (define-public python2-waf
8476 (package-with-python2 python-waf))
8477
8478 (define-public python-pyzmq
8479 (package
8480 (name "python-pyzmq")
8481 (version "17.1.2")
8482 (source
8483 (origin
8484 (method url-fetch)
8485 (uri (pypi-uri "pyzmq" version))
8486 (sha256
8487 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8488 (build-system python-build-system)
8489 (arguments
8490 `(#:configure-flags
8491 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8492 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8493 ;; --inplace' for 'python setup.py test' to work.
8494 #:tests? #f))
8495 (inputs
8496 `(("zeromq" ,zeromq)))
8497 (native-inputs
8498 `(("pkg-config" ,pkg-config)
8499 ("python-nose" ,python-nose)))
8500 (home-page "https://github.com/zeromq/pyzmq")
8501 (synopsis "Python bindings for 0MQ")
8502 (description
8503 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8504 (license license:bsd-4)))
8505
8506 (define-public python2-pyzmq
8507 (package-with-python2 python-pyzmq))
8508
8509 (define-public python-pep8
8510 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8511 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8512 ;; some dependents' test suites, and nothing more.
8513 (package
8514 (name "python-pep8")
8515 (version "1.7.0")
8516 (source
8517 (origin
8518 (method url-fetch)
8519 (uri (pypi-uri "pep8" version))
8520 (sha256
8521 (base32
8522 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8523 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8524 (build-system python-build-system)
8525 (home-page "https://pep8.readthedocs.org/")
8526 (synopsis "Python style guide checker")
8527 (description
8528 "This tools checks Python code against some of the style conventions in
8529 PEP 8.")
8530 (license license:expat)))
8531
8532 (define-public python2-pep8
8533 (package-with-python2 python-pep8))
8534
8535 (define-public python-pep517
8536 (package
8537 (inherit python-pep517-bootstrap)
8538 (name "python-pep517")
8539 (arguments
8540 '(#:phases
8541 (modify-phases %standard-phases
8542 (replace 'check
8543 (lambda* (#:key tests? #:allow-other-keys)
8544 (delete-file "pytest.ini")
8545 ;; This test tries to connect to the internet
8546 (delete-file "tests/test_meta.py")
8547 (if tests?
8548 (invoke "pytest")
8549 #t))))))
8550 (native-inputs
8551 `(("python-mock" ,python-mock)
8552 ("python-pytest" ,python-pytest)
8553 ("python-testpath" ,python-testpath)))
8554 (properties `((python2-variant . ,(delay python2-pep517))))))
8555
8556 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8557 (define-public python2-pep517
8558 (let ((base (package-with-python2
8559 (strip-python2-variant python-pep517))))
8560 (package/inherit base
8561 (name "python2-pep517")
8562 (arguments
8563 `(#:tests? #f
8564 ,@(package-arguments base)))
8565 (native-inputs `()))))
8566
8567 (define-public python-pyflakes
8568 (package
8569 (name "python-pyflakes")
8570 (version "2.2.0")
8571 (source
8572 (origin
8573 (method url-fetch)
8574 (uri (pypi-uri "pyflakes" version))
8575 (sha256
8576 (base32
8577 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8578 (build-system python-build-system)
8579 (home-page
8580 "https://github.com/pyflakes/pyflakes")
8581 (synopsis "Passive checker of Python programs")
8582 (description
8583 "Pyflakes statically checks Python source code for common errors.")
8584 (license license:expat)))
8585
8586 (define-public python2-pyflakes
8587 (package-with-python2 python-pyflakes))
8588
8589 (define-public python-mccabe
8590 (package
8591 (name "python-mccabe")
8592 (version "0.6.1")
8593 (source
8594 (origin
8595 (method url-fetch)
8596 (uri (pypi-uri "mccabe" version))
8597 (sha256
8598 (base32
8599 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8600 (build-system python-build-system)
8601 (native-inputs
8602 `(("python-pytest" ,python-pytest-bootstrap)
8603 ("python-pytest-runner" ,python-pytest-runner)))
8604 (home-page "https://github.com/flintwork/mccabe")
8605 (synopsis "McCabe checker, plugin for flake8")
8606 (description
8607 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8608 complexity of Python source code.")
8609 (license license:expat)))
8610
8611 (define-public python2-mccabe
8612 (package-with-python2 python-mccabe))
8613
8614 (define-public python-flake8
8615 (package
8616 (name "python-flake8")
8617 (version "3.8.4")
8618 (source (origin
8619 (method url-fetch)
8620 (uri (pypi-uri "flake8" version))
8621 (sha256
8622 (base32
8623 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8624 (build-system python-build-system)
8625 (arguments
8626 `(#:phases
8627 (modify-phases %standard-phases
8628 (delete 'check)
8629 (add-after 'install 'check
8630 (lambda* (#:key inputs outputs #:allow-other-keys)
8631 (add-installed-pythonpath inputs outputs)
8632 (invoke "pytest" "-v")
8633 #t)))))
8634 (propagated-inputs
8635 `(("python-pycodestyle" ,python-pycodestyle)
8636 ("python-entrypoints" ,python-entrypoints)
8637 ("python-pyflakes" ,python-pyflakes)
8638 ("python-mccabe" ,python-mccabe)))
8639 (native-inputs
8640 `(("python-mock" ,python-mock)
8641 ("python-pytest" ,python-pytest-bootstrap)))
8642 (home-page "https://gitlab.com/pycqa/flake8")
8643 (synopsis
8644 "The modular source code checker: pep8, pyflakes and co")
8645 (description
8646 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8647 (properties `((python2-variant . ,(delay python2-flake8))))
8648 (license license:expat)))
8649
8650 (define-public python2-flake8
8651 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8652 (package/inherit base
8653 (propagated-inputs
8654 `(("python2-configparser" ,python2-configparser)
8655 ("python2-enum34" ,python2-enum34)
8656 ("python2-functools32" ,python2-functools32)
8657 ("python2-typing" ,python2-typing)
8658 ,@(package-propagated-inputs base))))))
8659
8660 (define-public python-flake8-bugbear
8661 (package
8662 (name "python-flake8-bugbear")
8663 (version "20.1.4")
8664 (source
8665 (origin
8666 (method url-fetch)
8667 (uri (pypi-uri "flake8-bugbear" version))
8668 (sha256
8669 (base32
8670 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8671 (build-system python-build-system)
8672 (arguments
8673 '(#:phases
8674 (modify-phases %standard-phases
8675 (add-before 'check 'disable-test
8676 (lambda _
8677 ;; This test fails on slow computers.
8678 (substitute* "tests/test_bugbear.py"
8679 (("def test_does_not_crash_on_any_valid_code")
8680 "def _test_does_not_crash_on_any_valid_code")))))))
8681 (native-inputs
8682 `(("python-hypothesis" ,python-hypothesis)
8683 ("python-hypothesmith" ,python-hypothesmith)))
8684 (propagated-inputs
8685 `(("python-attrs" ,python-attrs)
8686 ("python-flake8" ,python-flake8)))
8687 (home-page "https://github.com/PyCQA/flake8-bugbear")
8688 (synopsis
8689 "Flake8 plugin for finding likely bugs and design problems in your program")
8690 (description
8691 "This package contains a plugin for Flake8 finding likely bugs and
8692 design problems in your program. It contains warnings that don't belong
8693 in pyflakes and pycodestyle.")
8694 (license license:expat)))
8695
8696 (define-public python-flake8-implicit-str-concat
8697 (package
8698 (name "python-flake8-implicit-str-concat")
8699 (version "0.2.0")
8700 (source
8701 (origin
8702 (method url-fetch)
8703 (uri (pypi-uri "flake8_implicit_str_concat" version))
8704 (sha256
8705 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
8706 (build-system python-build-system)
8707 (propagated-inputs
8708 `(("python-attrs" ,python-attrs)
8709 ("python-more-itertools" ,python-more-itertools)))
8710 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
8711 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
8712 (description
8713 "This is a plugin for the Python code checking tool Flake8 to encourage
8714 correct string literal concatenation.
8715
8716 It looks for style problems like implicitly concatenated string literals on
8717 the same line (which can be introduced by the code formating tool Black), or
8718 unnecessary plus operators for explicit string literal concatenation.")
8719 (license license:expat)))
8720
8721 (define-public python-flake8-polyfill
8722 (package
8723 (name "python-flake8-polyfill")
8724 (version "1.0.2")
8725 (source
8726 (origin
8727 (method url-fetch)
8728 (uri (pypi-uri "flake8-polyfill" version))
8729 (sha256
8730 (base32
8731 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8732 (build-system python-build-system)
8733 (arguments
8734 '(#:phases
8735 (modify-phases %standard-phases
8736 (replace 'check
8737 (lambda _
8738 ;; Be compatible with Pytest 4:
8739 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8740 (substitute* "setup.cfg"
8741 (("\\[pytest\\]")
8742 "[tool:pytest]"))
8743
8744 (setenv "PYTHONPATH"
8745 (string-append (getcwd) "/build/lib:"
8746 (getenv "PYTHONPATH")))
8747 (invoke "py.test" "-v"))))))
8748 (native-inputs
8749 `(("python-flake8" ,python-flake8)
8750 ("python-mock" ,python-mock)
8751 ("python-pep8" ,python-pep8)
8752 ("python-pycodestyle" ,python-pycodestyle)
8753 ("python-pytest" ,python-pytest)))
8754 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8755 (synopsis "Polyfill package for Flake8 plugins")
8756 (description
8757 "This package that provides some compatibility helpers for Flake8
8758 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8759 (license license:expat)))
8760
8761 (define-public python2-flake8-polyfill
8762 (package-with-python2 python-flake8-polyfill))
8763
8764 (define-public python-flake8-print
8765 (package
8766 (name "python-flake8-print")
8767 (version "4.0.0")
8768 (source
8769 (origin
8770 (method url-fetch)
8771 (uri (pypi-uri "flake8-print" version))
8772 (sha256
8773 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
8774 (build-system python-build-system)
8775 (propagated-inputs
8776 `(("python-flake8" ,python-flake8)
8777 ("python-pycodestyle" ,python-pycodestyle)
8778 ("python-six" ,python-six)))
8779 (home-page "https://github.com/jbkahn/flake8-print")
8780 (synopsis "Print statement checker plugin for Flake8")
8781 (description
8782 "This plugin for Flake8 checks for @code{print} statements in Python
8783 files.")
8784 (license license:expat)))
8785
8786 (define-public python-flake8-pyi
8787 (package
8788 (name "python-flake8-pyi")
8789 (version "20.5.0")
8790 (source
8791 (origin
8792 (method url-fetch)
8793 (uri (pypi-uri "flake8-pyi" version))
8794 (sha256
8795 (base32
8796 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8797 (build-system python-build-system)
8798 (propagated-inputs
8799 `(("python-attrs" ,python-attrs)
8800 ("python-flake8" ,python-flake8)
8801 ("python-pyflakes" ,python-pyflakes)))
8802 (home-page "https://github.com/ambv/flake8-pyi")
8803 (synopsis
8804 "Flake8 plugin that provides specializations for type hinting stub files")
8805 (description
8806 "This package contains a plugin that provides specializations for
8807 type hinting stub files, especially interesting for linting typeshed. It
8808 adds the @file{.pyi} extension to the default value of the @code{--filename}
8809 command-line argument to Flake8. This means stubs are linted by default with
8810 this plugin enabled, without needing to explicitly list every file. It
8811 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8812 expressions after the entire file has been read. This enables support for
8813 first-class forward references that stub files use.")
8814 (license license:expat)))
8815
8816 (define-public python-flake8-pie
8817 (package
8818 (name "python-flake8-pie")
8819 (version "0.5.0")
8820 (source
8821 (origin
8822 (method url-fetch)
8823 (uri (pypi-uri "flake8-pie" version))
8824 (sha256
8825 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8826 (build-system python-build-system)
8827 (home-page "https://github.com/sbdchd/flake8-pie")
8828 (synopsis "Flake8 extension that implements lints")
8829 (description
8830 "This package provides a flake8 extension that implements miscellaneous
8831 lints.")
8832 (license license:bsd-2)))
8833
8834 (define-public python-autoflake
8835 (package
8836 (name "python-autoflake")
8837 (version "1.3.1")
8838 (source
8839 (origin
8840 (method url-fetch)
8841 (uri (pypi-uri "autoflake" version))
8842 (sha256
8843 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8844 (build-system python-build-system)
8845 (propagated-inputs
8846 `(("python-pyflakes" ,python-pyflakes)))
8847 (home-page "https://github.com/myint/autoflake")
8848 (synopsis "Removes unused imports and unused variables")
8849 (description
8850 "@code{autoflake} removes unused imports and unused variables from Python
8851 code as reported by @code{pyflakes}.
8852
8853 By default, it only removes unused imports for modules that are part of the
8854 standard library. Removal of unused variables is also disabled by default.
8855 It also removes useless @code{pass} statements.")
8856 (license license:expat)))
8857
8858 (define-public python-mistune
8859 (package
8860 (name "python-mistune")
8861 (version "0.8.4")
8862 (source
8863 (origin
8864 (method url-fetch)
8865 (uri (pypi-uri "mistune" version))
8866 (sha256
8867 (base32
8868 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8869 (build-system python-build-system)
8870 (native-inputs
8871 `(("python-nose" ,python-nose)
8872 ("python-cython" ,python-cython)))
8873 (home-page "https://github.com/lepture/mistune")
8874 (synopsis "Markdown parser in pure Python")
8875 (description "This package provides a fast markdown parser in pure
8876 Python.")
8877 (license license:bsd-3)))
8878
8879 (define-public python2-mistune
8880 (package-with-python2 python-mistune))
8881
8882 (define-public python-markdown
8883 (package
8884 (name "python-markdown")
8885 (version "3.2.1")
8886 (source
8887 (origin
8888 (method url-fetch)
8889 (uri (pypi-uri "Markdown" version))
8890 (sha256
8891 (base32
8892 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8893 (build-system python-build-system)
8894 (native-inputs
8895 `(("python-nose" ,python-nose)
8896 ("python-pyyaml" ,python-pyyaml)))
8897 (home-page "https://python-markdown.github.io/")
8898 (synopsis "Python implementation of Markdown")
8899 (description
8900 "This package provides a Python implementation of John Gruber's
8901 Markdown. The library features international input, various Markdown
8902 extensions, and several HTML output formats. A command line wrapper
8903 markdown_py is also provided to convert Markdown files to HTML.")
8904 (properties `((python2-variant . ,(delay python2-markdown))))
8905 (license license:bsd-3)))
8906
8907 ;; Markdown 3.2 dropped support for Python 2.
8908 (define-public python2-markdown
8909 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8910 (package/inherit
8911 base
8912 (version "3.1.1")
8913 (source (origin
8914 (method url-fetch)
8915 (uri (pypi-uri "Markdown" version))
8916 (sha256
8917 (base32
8918 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8919
8920 (define-public python-ptyprocess
8921 (package
8922 (name "python-ptyprocess")
8923 (version "0.5.2")
8924 (source
8925 (origin
8926 (method url-fetch)
8927 (uri (pypi-uri "ptyprocess" version))
8928 (sha256
8929 (base32
8930 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8931 (build-system python-build-system)
8932 (native-inputs
8933 `(("python-nose" ,python-nose)))
8934 (arguments
8935 `(#:phases
8936 (modify-phases %standard-phases
8937 (replace 'check
8938 (lambda _ (invoke "nosetests"))))))
8939 (home-page "https://github.com/pexpect/ptyprocess")
8940 (synopsis "Run a subprocess in a pseudo terminal")
8941 (description
8942 "This package provides a Python library used to launch a subprocess in a
8943 pseudo terminal (pty), and interact with both the process and its pty.")
8944 (license license:isc)))
8945
8946 (define-public python2-ptyprocess
8947 (package-with-python2 python-ptyprocess))
8948
8949 (define-public python-cram
8950 (package
8951 (name "python-cram")
8952 (version "0.7")
8953 (home-page "https://bitheap.org/cram/")
8954 (source (origin
8955 (method url-fetch)
8956 (uri (list (string-append home-page "cram-"
8957 version ".tar.gz")
8958 (pypi-uri "cram" version)))
8959 (sha256
8960 (base32
8961 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8962 (arguments
8963 '(#:phases
8964 (modify-phases %standard-phases
8965 (add-after 'unpack 'patch-source
8966 (lambda _
8967 (substitute* (find-files "cram" ".*\\.py$")
8968 ;; Replace default shell path.
8969 (("/bin/sh") (which "sh")))
8970 (substitute* (find-files "tests" ".*\\.t$")
8971 (("md5") "md5sum")
8972 (("/bin/bash") (which "bash"))
8973 (("/bin/sh") (which "sh")))
8974 (substitute* "cram/_test.py"
8975 ;; This hack works around a bug triggered by substituting
8976 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8977 ;; "cram -h", which breaks the output at 80 characters. This
8978 ;; causes the line showing the default shell to break into two
8979 ;; lines, but the test expects a single line...
8980 (("env\\['COLUMNS'\\] = '80'")
8981 "env['COLUMNS'] = '160'"))
8982
8983 (substitute* "Makefile"
8984 ;; Recent versions of python-coverage have caused the test
8985 ;; coverage to decrease (as of version 0.7). Allow that.
8986 (("--fail-under=100")
8987 "--fail-under=90"))
8988
8989 #t))
8990 (replace 'check
8991 ;; The test phase uses the built library and executable.
8992 (lambda* (#:key inputs outputs #:allow-other-keys)
8993 (add-installed-pythonpath inputs outputs)
8994 (setenv "PATH" (string-append (getenv "PATH") ":"
8995 (assoc-ref outputs "out") "/bin"))
8996 (invoke "make" "test"))))))
8997 (build-system python-build-system)
8998 (native-inputs
8999 `(("python-coverage" ,python-coverage)
9000 ("which" ,which)))
9001 (synopsis "Simple testing framework for command line applications")
9002 (description
9003 "Cram is a functional testing framework for command line applications.
9004 Cram tests look like snippets of interactive shell sessions. Cram runs each
9005 command and compares the command output in the test with the command’s actual
9006 output.")
9007 (license license:gpl2+)))
9008
9009 (define-public python2-cram
9010 (package-with-python2 python-cram))
9011
9012 (define-public python-crashtest
9013 (package
9014 (name "python-crashtest")
9015 (version "0.3.1")
9016 (source
9017 (origin
9018 (method url-fetch)
9019 (uri (pypi-uri "crashtest" version))
9020 (sha256
9021 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
9022 (build-system python-build-system)
9023 (home-page "https://github.com/sdispater/crashtest")
9024 (synopsis "Manage Python errors with ease")
9025 (description
9026 "Python library that makes exceptions handling and inspection easier.")
9027 (license license:expat)))
9028
9029 (define-public python-straight-plugin
9030 (package
9031 (name "python-straight-plugin")
9032 (version "1.4.1")
9033 (source
9034 (origin
9035 (method url-fetch)
9036 (uri (pypi-uri "straight.plugin" version))
9037 (sha256
9038 (base32
9039 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
9040 (build-system python-build-system)
9041 (home-page "https://github.com/ironfroggy/straight.plugin")
9042 (synopsis "Simple namespaced plugin facility")
9043 (description "Straight Plugin provides a type of plugin you can create from
9044 almost any existing Python modules, and an easy way for outside developers to
9045 add functionality and customization to your projects with their own plugins.")
9046 (license license:expat)))
9047
9048 (define-public python2-straight-plugin
9049 (package-with-python2 python-straight-plugin))
9050
9051 (define-public python-fonttools
9052 (package
9053 (name "python-fonttools")
9054 (version "4.6.0")
9055 (source (origin
9056 (method url-fetch)
9057 (uri (pypi-uri "fonttools" version ".zip"))
9058 (sha256
9059 (base32
9060 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
9061 (build-system python-build-system)
9062 (native-inputs
9063 `(("unzip" ,unzip)
9064 ("python-pytest" ,python-pytest)
9065 ("python-pytest-runner" ,python-pytest-runner)))
9066 (home-page "https://github.com/fonttools/fonttools")
9067 (synopsis "Tools to manipulate font files")
9068 (description
9069 "FontTools/TTX is a library to manipulate font files from Python. It
9070 supports reading and writing of TrueType/OpenType fonts, reading and writing
9071 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
9072 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
9073 from an XML-based format.")
9074 (license license:expat)))
9075
9076 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
9077 (define-public python2-fonttools
9078 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
9079 (package/inherit
9080 base
9081 (version "3.44.0")
9082 (source (origin
9083 (method url-fetch)
9084 (uri (pypi-uri "fonttools" version ".zip"))
9085 (sha256
9086 (base32
9087 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
9088
9089 (define-public python-ly
9090 (package
9091 (name "python-ly")
9092 (version "0.9.5")
9093 (source
9094 (origin
9095 (method url-fetch)
9096 (uri (pypi-uri name version))
9097 (sha256
9098 (base32
9099 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
9100 (build-system python-build-system)
9101 (arguments
9102 ;; FIXME: Some tests need network access.
9103 '(#:tests? #f))
9104 (synopsis "Tool and library for manipulating LilyPond files")
9105 (description "This package provides a Python library to parse, manipulate
9106 or create documents in LilyPond format. A command line program ly is also
9107 provided that can be used to do various manipulations with LilyPond files.")
9108 (home-page "https://pypi.org/project/python-ly/")
9109 (license license:gpl2+)))
9110
9111 (define-public python-appdirs
9112 (package
9113 (name "python-appdirs")
9114 (version "1.4.3")
9115 (source
9116 (origin
9117 (method url-fetch)
9118 (uri (pypi-uri "appdirs" version))
9119 (sha256
9120 (base32
9121 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9122 (build-system python-build-system)
9123 (home-page "https://github.com/ActiveState/appdirs")
9124 (synopsis
9125 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9126 (description
9127 "This module provides a portable way of finding out where user data
9128 should be stored on various operating systems.")
9129 (license license:expat)))
9130
9131 (define-public python2-appdirs
9132 (package-with-python2 python-appdirs))
9133
9134 (define-public python-gorilla
9135 (package
9136 (name "python-gorilla")
9137 (version "0.3.0")
9138 (source (origin
9139 (method url-fetch)
9140 (uri (pypi-uri "gorilla" version))
9141 (sha256
9142 (base32
9143 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9144 (build-system python-build-system)
9145 (home-page "https://github.com/christophercrouzet/gorilla")
9146 (synopsis "Convenient monkey patching with Python")
9147 (description
9148 "Gorilla is a Python library that provides a convenient approach to
9149 monkey patching. Monkey patching is the process of modifying module and
9150 class attributes at runtime with the purpose of replacing or extending
9151 third-party code.")
9152 (license license:expat)))
9153
9154 (define-public python-llfuse
9155 (package
9156 (name "python-llfuse")
9157 (version "1.3.8")
9158 (source (origin
9159 (method url-fetch)
9160 (uri (pypi-uri "llfuse" version))
9161 (sha256
9162 (base32
9163 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9164 (build-system python-build-system)
9165 (inputs
9166 `(("fuse" ,fuse)
9167 ("attr" ,attr)))
9168 (native-inputs
9169 `(("pkg-config" ,pkg-config)))
9170 (synopsis "Python bindings for FUSE")
9171 (description
9172 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9173 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9174 (license license:lgpl2.0+)
9175 (properties `((python2-variant . ,(delay python2-llfuse))))))
9176
9177 (define-public python2-llfuse
9178 (let ((base (package-with-python2
9179 (strip-python2-variant python-llfuse))))
9180 (package/inherit base
9181 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
9182
9183 (define-public python-msgpack
9184 (package
9185 (name "python-msgpack")
9186 (version "1.0.0")
9187 (source (origin
9188 (method url-fetch)
9189 (uri (pypi-uri "msgpack" version))
9190 (sha256
9191 (base32
9192 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
9193 (build-system python-build-system)
9194 (arguments
9195 `(#:modules ((guix build utils)
9196 (guix build python-build-system)
9197 (ice-9 ftw)
9198 (srfi srfi-1)
9199 (srfi srfi-26))
9200 #:phases
9201 (modify-phases %standard-phases
9202 (replace 'check
9203 (lambda _
9204 (let ((cwd (getcwd)))
9205 (setenv "PYTHONPATH"
9206 (string-append cwd "/build/"
9207 (find (cut string-prefix? "lib" <>)
9208 (scandir (string-append cwd "/build")))
9209 ":"
9210 (getenv "PYTHONPATH")))
9211 (invoke "pytest" "-v" "test")))))))
9212 (native-inputs
9213 `(("python-pytest" ,python-pytest)))
9214 (synopsis "MessagePack (de)serializer")
9215 (description "MessagePack is a fast, compact binary serialization format,
9216 suitable for similar data to JSON. This package provides CPython bindings for
9217 reading and writing MessagePack data.")
9218 (home-page "https://pypi.org/project/msgpack/")
9219 (license license:asl2.0)))
9220
9221 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
9222 ;; release 0.5. Some packages like borg still call it by the old name for now.
9223 ;; <https://bugs.gnu.org/30662>
9224 (define-public python-msgpack-transitional
9225 (package
9226 (inherit python-msgpack)
9227 (name "python-msgpack-transitional")
9228 (version "0.5.6")
9229 (source (origin
9230 (method url-fetch)
9231 (uri (pypi-uri "msgpack" version))
9232 (sha256
9233 (base32
9234 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
9235 (arguments
9236 (substitute-keyword-arguments (package-arguments python-msgpack)
9237 ((#:phases phases)
9238 `(modify-phases ,phases
9239 (add-after 'unpack 'configure-transitional
9240 (lambda _
9241 ;; Keep using the old name.
9242 (substitute* "setup.py"
9243 (("TRANSITIONAL = False")
9244 "TRANSITIONAL = 1"))
9245 #t))))))))
9246
9247 (define-public python2-msgpack
9248 (package-with-python2 python-msgpack))
9249
9250 (define-public python-netaddr
9251 (package
9252 (name "python-netaddr")
9253 (version "0.7.19")
9254 (source
9255 (origin
9256 (method url-fetch)
9257 (uri (pypi-uri "netaddr" version))
9258 (sha256
9259 (base32
9260 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
9261 (build-system python-build-system)
9262 (arguments `(#:tests? #f)) ;; No tests.
9263 (home-page "https://github.com/drkjam/netaddr/")
9264 (synopsis "Pythonic manipulation of network addresses")
9265 (description
9266 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
9267 and MAC network addresses.")
9268 (license license:bsd-3)))
9269
9270 (define-public python2-netaddr
9271 (package-with-python2 python-netaddr))
9272
9273 (define-public python2-pyroute2
9274 (package
9275 (name "python2-pyroute2")
9276 (version "0.5.6")
9277 (source
9278 (origin
9279 (method url-fetch)
9280 (uri (pypi-uri "pyroute2" version))
9281 (sha256
9282 (base32
9283 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
9284 (build-system python-build-system)
9285 (arguments
9286 `(#:python ,python-2)) ;Python 3.x is not supported
9287 (home-page "https://github.com/svinota/pyroute2")
9288 (synopsis "Python netlink library")
9289 (description
9290 "Pyroute2 is a pure Python netlink library with minimal dependencies.
9291 Supported netlink families and protocols include:
9292 @itemize
9293 @item rtnl, network settings - addresses, routes, traffic controls
9294 @item nfnetlink - netfilter API: ipset, nftables, ...
9295 @item ipq - simplest userspace packet filtering, iptables QUEUE target
9296 @item devlink - manage and monitor devlink-enabled hardware
9297 @item generic - generic netlink families
9298 @itemize
9299 @item nl80211 - wireless functions API (basic support)
9300 @item taskstats - extended process statistics
9301 @item acpi_events - ACPI events monitoring
9302 @item thermal_events - thermal events monitoring
9303 @item VFS_DQUOT - disk quota events monitoring
9304 @end itemize
9305 @end itemize")
9306 (license license:gpl2+)))
9307
9308 (define-public python-wrapt
9309 (package
9310 (name "python-wrapt")
9311 (version "1.11.2")
9312 (source
9313 (origin
9314 (method url-fetch)
9315 (uri (pypi-uri "wrapt" version))
9316 (sha256
9317 (base32
9318 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
9319 (build-system python-build-system)
9320 (arguments
9321 ;; Tests are not included in the tarball, they are only available in the
9322 ;; git repository.
9323 `(#:tests? #f))
9324 (home-page "https://github.com/GrahamDumpleton/wrapt")
9325 (synopsis "Module for decorators, wrappers and monkey patching")
9326 (description
9327 "The aim of the wrapt module is to provide a transparent object proxy for
9328 Python, which can be used as the basis for the construction of function
9329 wrappers and decorator functions.")
9330 (license license:bsd-2)))
9331
9332 (define-public python2-wrapt
9333 (package-with-python2 python-wrapt))
9334
9335 (define-public python-commonmark
9336 (package
9337 (name "python-commonmark")
9338 (version "0.9.1")
9339 (source
9340 (origin
9341 (method url-fetch)
9342 (uri (pypi-uri "commonmark" version))
9343 (sha256
9344 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
9345 (build-system python-build-system)
9346 (arguments
9347 `(#:phases
9348 (modify-phases %standard-phases
9349 (replace 'check
9350 (lambda* (#:key inputs outputs #:allow-other-keys)
9351 (add-installed-pythonpath inputs outputs)
9352 (invoke "python" "setup.py" "test"))))))
9353 (home-page "https://github.com/readthedocs/commonmark.py")
9354 (synopsis "Python parser for the CommonMark Markdown spec")
9355 (description
9356 "This module is a pure Python port of jgm's @code{commonmark.js}, a
9357 Markdown parser and renderer for the CommonMark specification, using only
9358 native modules.")
9359 (license license:bsd-3)))
9360
9361 (define-public python-xlrd
9362 (package
9363 (name "python-xlrd")
9364 (version "1.2.0")
9365 (source (origin
9366 (method url-fetch)
9367 (uri (pypi-uri "xlrd" version))
9368 (sha256
9369 (base32
9370 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
9371 (build-system python-build-system)
9372 (arguments
9373 `(#:phases
9374 (modify-phases %standard-phases
9375 ;; Some tests depend on writing a temporary file to the user's home
9376 ;; directory.
9377 (add-after 'unpack 'fix-tests
9378 (lambda _
9379 (delete-file "tests/test_open_workbook.py")
9380 #t)))))
9381 (home-page "http://www.python-excel.org/")
9382 (synopsis "Library for extracting data from Excel files")
9383 (description "This package provides a library to extract data from
9384 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
9385 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
9386 Unicode-aware. It is not intended as an end-user tool.")
9387 (license license:bsd-3)))
9388
9389 (define-public python2-xlrd
9390 (package-with-python2 python-xlrd))
9391
9392 (define-public python-immutables
9393 (package
9394 (name "python-immutables")
9395 (version "0.14")
9396 (source
9397 (origin
9398 (method url-fetch)
9399 (uri (pypi-uri "immutables" version))
9400 (sha256
9401 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9402 (build-system python-build-system)
9403 (home-page "https://github.com/MagicStack/immutables")
9404 (synopsis "High-performance immutable mapping type for Python")
9405 (description
9406 "An immutable mapping type for Python. The underlying datastructure is a
9407 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9408 functional languages.")
9409 (license license:asl2.0)))
9410
9411 (define-public python-prettytable
9412 (package
9413 (name "python-prettytable")
9414 (version "0.7.2")
9415 (source
9416 (origin
9417 (method url-fetch)
9418 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9419 (sha256
9420 (base32
9421 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9422 (build-system python-build-system)
9423 (home-page "https://code.google.com/archive/p/prettytable/")
9424 (synopsis "Display tabular data in an ASCII table format")
9425 (description
9426 "A library designed to represent tabular data in visually appealing ASCII
9427 tables. PrettyTable allows for selection of which columns are to be printed,
9428 independent alignment of columns (left or right justified or centred) and
9429 printing of sub-tables by specifying a row range.")
9430 (license license:bsd-3)))
9431
9432 (define-public python2-prettytable
9433 (package-with-python2 python-prettytable))
9434
9435 (define-public python-curio
9436 (package
9437 (name "python-curio")
9438 (version "1.2")
9439 (source
9440 (origin
9441 (method url-fetch)
9442 (uri (pypi-uri "curio" version))
9443 (sha256
9444 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9445 (build-system python-build-system)
9446 (arguments
9447 `(#:phases
9448 (modify-phases %standard-phases
9449 (replace 'check
9450 (lambda* (#:key inputs outputs #:allow-other-keys)
9451 (add-installed-pythonpath inputs outputs)
9452 (invoke "pytest" "-vv" "-k"
9453 ;; Tries to open an outgoing connection.
9454 "not test_ssl_outgoing"))))))
9455 (native-inputs
9456 `(("python-pytest" ,python-pytest)))
9457 (home-page "https://github.com/dabeaz/curio")
9458 (synopsis "Coroutine-based library for concurrent Python")
9459 (description
9460 "Curio is a coroutine-based library for concurrent Python systems
9461 programming. It provides standard programming abstractions such as as
9462 tasks, sockets, files, locks, and queues.")
9463 (license license:bsd-3)))
9464
9465 (define-public python-tables
9466 (package
9467 (name "python-tables")
9468 (version "3.6.1")
9469 (source
9470 (origin
9471 (method url-fetch)
9472 (uri (pypi-uri "tables" version))
9473 (sha256
9474 (base32
9475 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9476 (modules '((guix build utils)))
9477 (snippet
9478 '(begin
9479 ;; Remove pre-compiled .pyc files from source.
9480 (for-each delete-file-recursively
9481 (find-files "." "__pycache__" #:directories? #t))
9482 (for-each delete-file (find-files "." "\\.pyc$"))
9483 #t))))
9484 (build-system python-build-system)
9485 (arguments
9486 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9487 ;; or "check", so we must override the build and check phases.
9488 #:phases
9489 (modify-phases %standard-phases
9490 (add-after 'unpack 'use-gcc
9491 (lambda _
9492 (substitute* "setup.py"
9493 (("^( +)compiler = new_compiler\\(\\)" line indent)
9494 (string-append line
9495 "\n"
9496 indent
9497 "compiler.set_executables(compiler='gcc',"
9498 "compiler_so='gcc',"
9499 "linker_exe='gcc',"
9500 "linker_so='gcc -shared')")))
9501 #t))
9502 (add-after 'unpack 'disable-tuning
9503 (lambda _
9504 (substitute* "setup.py"
9505 (("cpu_flags = .*")
9506 "cpu_flags = ['sse2']\n"))
9507 #t))
9508 (replace 'build
9509 (lambda* (#:key inputs #:allow-other-keys)
9510 (invoke "python" "setup.py" "build"
9511 (string-append "--hdf5="
9512 (assoc-ref inputs "hdf5")))))
9513 (replace 'check
9514 (lambda* (#:key inputs #:allow-other-keys)
9515 (invoke "python" "setup.py" "check"
9516 (string-append "--hdf5="
9517 (assoc-ref inputs "hdf5"))))))))
9518 (propagated-inputs
9519 `(("python-numexpr" ,python-numexpr)
9520 ("python-numpy" ,python-numpy)))
9521 (native-inputs
9522 `(("python-cython" ,python-cython)
9523 ("pkg-config" ,pkg-config)))
9524 (inputs
9525 `(("hdf5" ,hdf5-1.10)
9526 ("bzip2" ,bzip2)
9527 ("zlib" ,zlib)))
9528 (home-page "https://www.pytables.org/")
9529 (synopsis "Hierarchical datasets for Python")
9530 (description "PyTables is a package for managing hierarchical datasets and
9531 designed to efficiently cope with extremely large amounts of data.")
9532 (license license:bsd-3)))
9533
9534 (define-public python2-tables
9535 (package-with-python2 python-tables))
9536
9537 (define-public python-sniffio
9538 (package
9539 (name "python-sniffio")
9540 (version "1.1.0")
9541 (source
9542 (origin
9543 (method url-fetch)
9544 (uri (pypi-uri "sniffio" version))
9545 (sha256
9546 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9547 (build-system python-build-system)
9548 (arguments
9549 `(#:phases
9550 (modify-phases %standard-phases
9551 (replace 'check
9552 (lambda _
9553 (invoke "pytest" "-vv"))))))
9554 (native-inputs
9555 `(("python-curio" ,python-curio)
9556 ("python-pytest" ,python-pytest)
9557 ("python-pytest-cov" ,python-pytest-cov)))
9558 (home-page "https://github.com/python-trio/sniffio")
9559 (synopsis "Detect which async library a program is running under")
9560 (description "This package detects which async library a program is
9561 running under. It supports multiple async I/O packages, like Trio, and
9562 asyncio.")
9563 ;; Either license applies.
9564 (license (list license:expat license:asl2.0))))
9565
9566 (define-public python-pytest-black
9567 (package
9568 (name "python-pytest-black")
9569 (version "0.3.8")
9570 (source
9571 (origin
9572 (method url-fetch)
9573 (uri (pypi-uri "pytest-black" version))
9574 (sha256
9575 (base32
9576 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9577 (build-system python-build-system)
9578 (propagated-inputs
9579 `(("python-pytest" ,python-pytest)
9580 ("python-black" ,python-black)
9581 ("python-toml" ,python-toml)))
9582 (native-inputs
9583 `(("python-setuptools-scm" ,python-setuptools-scm)))
9584 (home-page "https://github.com/shopkeep/pytest-black")
9585 (synopsis "Pytest plugin to enable format checking with black")
9586 (description
9587 "This package provides a pytest plugin to enable format checking with the
9588 Python code formatter \"black\".")
9589 (license license:expat)))
9590
9591 (define-public python-get-version
9592 (package
9593 (name "python-get-version")
9594 (version "2.1")
9595 (source
9596 (origin
9597 (method url-fetch)
9598 (uri (pypi-uri "get_version" version))
9599 (sha256
9600 (base32
9601 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9602 (build-system python-build-system)
9603 (propagated-inputs
9604 `(("python-pygments" ,python-pygments)
9605 ("python-pytest" ,python-pytest)
9606 ("python-pytest-black" ,python-pytest-black)
9607 ("python-pytest-cov" ,python-pytest-cov)
9608 ("python-setuptools" ,python-setuptools)
9609 ("python-testpath" ,python-testpath)))
9610 (home-page "https://github.com/flying-sheep/get_version")
9611 (synopsis "Version helper in the spirit of versioneer")
9612 (description
9613 "This package provides a version helper that lets you automatically use
9614 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9615 also supports getting the version from Python source distributions or, once
9616 your package is installed, via @code{pkg_resources} (part of
9617 @code{setuptools}).")
9618 (license license:gpl3+)))
9619
9620 (define-public python-legacy-api-wrap
9621 (package
9622 (name "python-legacy-api-wrap")
9623 (version "1.2")
9624 (source
9625 (origin
9626 (method url-fetch)
9627 (uri (pypi-uri "legacy-api-wrap" version))
9628 (sha256
9629 (base32
9630 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9631 (build-system python-build-system)
9632 (propagated-inputs
9633 `(("python-get-version" ,python-get-version)
9634 ("python-pytest" ,python-pytest)
9635 ("python-pytest-black" ,python-pytest-black)
9636 ("python-pytest-cov" ,python-pytest-cov)
9637 ("python-setuptools" ,python-setuptools)))
9638 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9639 (synopsis "Legacy API wrapper")
9640 (description "This module defines a decorator to wrap legacy APIs. The
9641 primary use case is APIs defined before keyword-only parameters existed.")
9642 (license license:gpl3+)))
9643
9644 (define-public python-pyasn1
9645 (package
9646 (name "python-pyasn1")
9647 (version "0.4.8")
9648 (source
9649 (origin
9650 (method url-fetch)
9651 (uri (pypi-uri "pyasn1" version))
9652 (sha256
9653 (base32
9654 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9655 (build-system python-build-system)
9656 (home-page "http://pyasn1.sourceforge.net/")
9657 (synopsis "ASN.1 types and codecs")
9658 (description
9659 "This is an implementation of ASN.1 types and codecs in Python. It is
9660 suitable for a wide range of protocols based on the ASN.1 specification.")
9661 (license license:bsd-2)))
9662
9663 (define-public python2-pyasn1
9664 (package-with-python2 python-pyasn1))
9665
9666 (define-public python-pyasn1-modules
9667 (package
9668 (name "python-pyasn1-modules")
9669 (version "0.2.2")
9670 (source
9671 (origin
9672 (method url-fetch)
9673 (uri (pypi-uri "pyasn1-modules" version))
9674 (sha256
9675 (base32
9676 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9677 (build-system python-build-system)
9678 (propagated-inputs
9679 `(("python-pyasn1" ,python-pyasn1)))
9680 (home-page "https://sourceforge.net/projects/pyasn1/")
9681 (synopsis "ASN.1 codec implementations")
9682 (description
9683 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9684 implementations of ASN.1-based codecs and protocols.")
9685 (license license:bsd-3)))
9686
9687 (define-public python2-pyasn1-modules
9688 (package-with-python2 python-pyasn1-modules))
9689
9690 (define-public python-ipaddress
9691 (package
9692 (name "python-ipaddress")
9693 (version "1.0.22")
9694 (source (origin
9695 (method url-fetch)
9696 (uri (pypi-uri "ipaddress" version))
9697 (sha256
9698 (base32
9699 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9700 (build-system python-build-system)
9701 (home-page "https://github.com/phihag/ipaddress")
9702 (synopsis "IP address manipulation library")
9703 (description
9704 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9705 in Python. This library is used to create, poke at, and manipulate IPv4 and
9706 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9707 module to older versions of Python.")
9708 (license license:psfl)))
9709
9710 (define-public python2-ipaddress
9711 (package-with-python2 python-ipaddress))
9712
9713 (define-public python2-ipaddr
9714 (package
9715 (name "python2-ipaddr")
9716 (version "2.1.11")
9717 (source
9718 (origin
9719 (method url-fetch)
9720 (uri (pypi-uri "ipaddr" version))
9721 (sha256
9722 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9723 (build-system python-build-system)
9724 (arguments
9725 `(#:python ,python-2 ;version 2 only
9726 #:phases
9727 (modify-phases %standard-phases
9728 (replace 'check
9729 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9730 (home-page "https://github.com/google/ipaddr-py")
9731 (synopsis "IP address manipulation library")
9732 (description
9733 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9734 IPv6 addresses and networks.
9735
9736 For new implementations you may prefer to use the standard module
9737 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9738 versions of Python.")
9739 (license license:asl2.0)))
9740
9741 (define-public python-idna
9742 (package
9743 (name "python-idna")
9744 (version "2.10")
9745 (source
9746 (origin
9747 (method url-fetch)
9748 (uri (pypi-uri "idna" version))
9749 (sha256
9750 (base32
9751 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9752 (build-system python-build-system)
9753 (home-page "https://github.com/kjd/idna")
9754 (synopsis "Internationalized domain names in applications")
9755 (description
9756 "This is a library to support the Internationalised Domain Names in
9757 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9758 protocol is often referred to as “IDNA2008” and can produce different results
9759 from the earlier standard from 2003. The library is also intended to act as a
9760 suitable drop-in replacement for the “encodings.idna” module that comes with
9761 the Python standard library but currently only supports the older 2003
9762 specification.")
9763 (license license:bsd-4)))
9764
9765 (define-public python-idna-2.7
9766 (package (inherit python-idna)
9767 (version "2.7")
9768 (source (origin
9769 (method url-fetch)
9770 (uri (pypi-uri "idna" version))
9771 (sha256
9772 (base32
9773 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9774
9775
9776 (define-public python2-idna
9777 (package-with-python2 python-idna))
9778
9779 (define-public python-libsass
9780 (package
9781 (name "python-libsass")
9782 (version "0.20.1")
9783 (source
9784 (origin
9785 ;; PyPI tarball is missing some test files.
9786 (method git-fetch)
9787 (uri (git-reference
9788 (url "https://github.com/sass/libsass-python")
9789 (commit version)))
9790 (file-name (git-file-name name version))
9791 (sha256
9792 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9793 (build-system python-build-system)
9794 (arguments
9795 `(#:phases
9796 (modify-phases %standard-phases
9797 ;; Use Guix package of libsass instead of compiling from a checkout.
9798 (add-before 'build 'set-libsass
9799 (lambda _
9800 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9801 #t))
9802 (replace 'check
9803 (lambda* (#:key inputs outputs #:allow-other-keys)
9804 (add-installed-pythonpath inputs outputs)
9805 (invoke "pytest" "sasstests.py"))))))
9806 (native-inputs
9807 `(("python-pytest" ,python-pytest)
9808 ("python-werkzeug" ,python-werkzeug)))
9809 (inputs
9810 `(("libsass" ,libsass)))
9811 (propagated-inputs
9812 `(("python-six" ,python-six)))
9813 (home-page "https://sass.github.io/libsass-python/")
9814 (synopsis "Straightforward binding of libsass for Python")
9815 (description
9816 "This package provides a simple Python extension module @code{sass} which
9817 is binding LibSass.")
9818 (license license:expat)))
9819
9820 (define-public python-idna-ssl
9821 (package
9822 (name "python-idna-ssl")
9823 (version "1.0.1")
9824 (source
9825 (origin
9826 (method url-fetch)
9827 (uri (pypi-uri "idna-ssl" version))
9828 (sha256
9829 (base32
9830 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9831 (build-system python-build-system)
9832 (arguments
9833 `(#:tests? #f)) ;circular dependency with python-aiohttp
9834 (home-page "https://github.com/aio-libs/idna-ssl")
9835 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9836 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9837 domains support.")
9838 (license license:expat)))
9839
9840 (define-public python-pretend
9841 (package
9842 (name "python-pretend")
9843 (version "1.0.9")
9844 (source
9845 (origin
9846 (method url-fetch)
9847 (uri (pypi-uri "pretend" version))
9848 (sha256
9849 (base32
9850 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9851 (build-system python-build-system)
9852 (home-page "https://github.com/alex/pretend")
9853 (synopsis "Library for stubbing in Python")
9854 (description
9855 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9856 technique for writing tests. You may hear the term mixed up with mocks,
9857 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9858 responses, rather than doing any computation.")
9859 (license license:bsd-3)))
9860
9861 (define-public python2-pretend
9862 (package-with-python2 python-pretend))
9863
9864 (define-public python-pip
9865 (package
9866 (name "python-pip")
9867 (version "20.2.4")
9868 (source
9869 (origin
9870 (method url-fetch)
9871 (uri (pypi-uri "pip" version))
9872 (sha256
9873 (base32
9874 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
9875 (build-system python-build-system)
9876 (arguments
9877 '(#:tests? #f)) ; there are no tests in the pypi archive.
9878 (home-page "https://pip.pypa.io/")
9879 (synopsis "Package manager for Python software")
9880 (description
9881 "Pip is a package manager for Python software, that finds packages on the
9882 Python Package Index (PyPI).")
9883 (license license:expat)))
9884
9885 (define-public python2-pip
9886 (package-with-python2 python-pip))
9887
9888 (define-public python-tlsh
9889 (package
9890 (name "python-tlsh")
9891 (version "3.4.5")
9892 (home-page "https://github.com/trendmicro/tlsh")
9893 (source
9894 (origin
9895 (method git-fetch)
9896 (uri (git-reference
9897 (url "https://github.com/trendmicro/tlsh")
9898 (commit (string-append "v" version))))
9899 (file-name (git-file-name name version))
9900 (sha256
9901 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9902 (build-system cmake-build-system)
9903 (arguments
9904 '(#:out-of-source? #f
9905 #:phases (modify-phases %standard-phases
9906 (replace
9907 'install
9908 (lambda* (#:key outputs #:allow-other-keys)
9909 ;; Build and install the Python bindings. The underlying
9910 ;; C++ library is apparently not meant to be installed.
9911 (let ((out (assoc-ref outputs "out")))
9912 (with-directory-excursion "py_ext"
9913 (and (system* "python" "setup.py" "build")
9914 (system* "python" "setup.py" "install"
9915 (string-append "--prefix=" out))))))))))
9916 (inputs `(("python" ,python-wrapper))) ;for the bindings
9917 (synopsis "Fuzzy matching library for Python")
9918 (description
9919 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9920 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9921 value which can be used for similarity comparisons. Similar objects have
9922 similar hash values, which allows for the detection of similar objects by
9923 comparing their hash values. The byte stream should have a sufficient amount
9924 of complexity; for example, a byte stream of identical bytes will not generate
9925 a hash value.")
9926 (license license:asl2.0)))
9927
9928 (define-public python2-tlsh
9929 (package/inherit python-tlsh
9930 (name "python2-tlsh")
9931 (inputs `(("python" ,python-2)))))
9932
9933 (define-public python-termcolor
9934 (package
9935 (name "python-termcolor")
9936 (version "1.1.0")
9937 (source
9938 (origin
9939 (method url-fetch)
9940 (uri (pypi-uri "termcolor" version))
9941 (sha256
9942 (base32
9943 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9944 (build-system python-build-system)
9945 (arguments
9946 ;; There are no tests.
9947 `(#:tests? #f))
9948 (home-page "https://pypi.org/project/termcolor/")
9949 (synopsis "ANSII Color formatting for terminal output")
9950 (description
9951 "This package provides ANSII Color formatting for output in terminals.")
9952 (license license:expat)))
9953
9954 (define-public python2-termcolor
9955 (package-with-python2 python-termcolor))
9956
9957 (define-public python-terminaltables
9958 (package
9959 (name "python-terminaltables")
9960 (version "3.1.0")
9961 (source
9962 (origin
9963 (method url-fetch)
9964 (uri (pypi-uri "terminaltables" version))
9965 (sha256
9966 (base32
9967 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9968 (build-system python-build-system)
9969 (home-page "https://github.com/Robpol86/terminaltables")
9970 (synopsis
9971 "Generate simple tables in terminals from a nested list of strings")
9972 (description
9973 "This package makes it easy to draw tables in terminal/console
9974 applications from a list of lists of strings. It supports multi-line rows.")
9975 (license license:expat)))
9976
9977 (define-public python-libarchive-c
9978 (package
9979 (name "python-libarchive-c")
9980 (version "2.9")
9981 (source (origin
9982 (method url-fetch)
9983 (uri (pypi-uri "libarchive-c" version))
9984 (sha256
9985 (base32
9986 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9987 (build-system python-build-system)
9988 (arguments
9989 '(#:phases (modify-phases %standard-phases
9990 (add-before
9991 'build 'reference-libarchive
9992 (lambda* (#:key inputs #:allow-other-keys)
9993 ;; Retain the absolute file name of libarchive.so.
9994 (let ((libarchive (assoc-ref inputs "libarchive")))
9995 (substitute* "libarchive/ffi.py"
9996 (("find_library\\('archive'\\)")
9997 (string-append "'" libarchive
9998 "/lib/libarchive.so'"))))))
9999 (replace 'check
10000 (lambda _ (invoke "pytest" "-vv"))))))
10001 (native-inputs
10002 `(("python-mock" ,python-mock)
10003 ("python-pytest" ,python-pytest)))
10004 (inputs
10005 `(("libarchive" ,libarchive)))
10006 (home-page "https://github.com/Changaco/python-libarchive-c")
10007 (synopsis "Python interface to libarchive")
10008 (description
10009 "This package provides Python bindings to libarchive, a C library to
10010 access possibly compressed archives in many different formats. It uses
10011 Python's @code{ctypes} foreign function interface (FFI).")
10012 (license license:lgpl2.0+)))
10013
10014 (define-public python2-libarchive-c
10015 (package-with-python2 python-libarchive-c))
10016
10017 (define-public python-file
10018 (package/inherit file
10019 (name "python-file")
10020 (build-system python-build-system)
10021 (arguments
10022 '(#:tests? #f ;no tests
10023 #:configure-flags '("--single-version-externally-managed" "--root=/")
10024 #:phases (modify-phases %standard-phases
10025 (add-before 'build 'change-directory
10026 (lambda _
10027 (chdir "python")
10028 #t))
10029 (add-before 'build 'set-library-file-name
10030 (lambda* (#:key inputs #:allow-other-keys)
10031 (let ((file (assoc-ref inputs "file")))
10032 (substitute* "magic.py"
10033 (("find_library\\('magic'\\)")
10034 (string-append "'" file "/lib/libmagic.so'")))
10035 #t))))))
10036 (inputs `(("file" ,file)))
10037 (native-inputs (if (%current-target-system)
10038 `(("self" ,this-package))
10039 '()))
10040 (synopsis "Python bindings to the libmagic file type guesser")
10041 (description "This package provides Python bindings to the libmagic file
10042 type guesser.
10043
10044 Note that this module and the @code{python-magic} module both provide a
10045 @file{magic.py} file; these two modules, which are different and were
10046 developed separately, both serve the same purpose: provide Python bindings for
10047 libmagic.")))
10048
10049 (define-public python2-file
10050 (package-with-python2 python-file))
10051
10052 (define-public python-debian
10053 (package
10054 (name "python-debian")
10055 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
10056 (version "0.1.36")
10057 (source
10058 (origin
10059 ;; Use git-fetch, as pypi doesn't include test suite.
10060 (method git-fetch)
10061 (uri (git-reference
10062 (url home-page)
10063 (commit version)))
10064 (file-name (git-file-name name version))
10065 (sha256
10066 (base32
10067 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
10068 (build-system python-build-system)
10069 (arguments
10070 `(#:phases (modify-phases %standard-phases
10071 (add-after 'unpack 'remove-debian-specific-tests
10072 ;; python-apt, apt and dpkg are not yet available in guix,
10073 ;; and these tests heavily depend on them.
10074 (lambda _
10075 (delete-file "lib/debian/tests/test_deb822.py")
10076 (delete-file "lib/debian/tests/test_debfile.py")
10077 #t)))))
10078 (propagated-inputs
10079 `(("python-six" ,python-six)
10080 ("python-chardet" ,python-chardet)))
10081 (synopsis "Debian package related modules")
10082 (description
10083 ;; XXX: Use @enumerate instead of @itemize to work around
10084 ;; <http://bugs.gnu.org/21772>.
10085 "This package provides Python modules that abstract many formats of
10086 Debian-related files, such as:
10087
10088 @enumerate
10089 @item Debtags information;
10090 @item @file{debian/changelog} files;
10091 @item packages files, pdiffs;
10092 @item control files of single or multiple RFC822-style paragraphs---e.g.
10093 @file{debian/control}, @file{.changes}, @file{.dsc};
10094 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
10095 contained files and meta-information.
10096 @end enumerate\n")
10097
10098 ;; Modules are either GPLv2+ or GPLv3+.
10099 (license license:gpl3+)))
10100
10101 (define-public python-nbformat
10102 (package
10103 (name "python-nbformat")
10104 (version "4.4.0")
10105 (source
10106 (origin
10107 (method url-fetch)
10108 (uri (pypi-uri "nbformat" version))
10109 (sha256
10110 (base32
10111 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
10112 (build-system python-build-system)
10113 (arguments `(#:tests? #f)) ; no test target
10114 (propagated-inputs
10115 `(("python-ipython-genutils" ,python-ipython-genutils)
10116 ("python-jsonschema" ,python-jsonschema)
10117 ("python-jupyter-core" ,python-jupyter-core)
10118 ("python-traitlets" ,python-traitlets)))
10119 (home-page "https://jupyter.org")
10120 (synopsis "Jupyter Notebook format")
10121 (description "This package provides the reference implementation of the
10122 Jupyter Notebook format and Python APIs for working with notebooks.")
10123 (license license:bsd-3)))
10124
10125 (define-public python2-nbformat
10126 (package-with-python2 python-nbformat))
10127
10128 (define-public python-bleach
10129 (package
10130 (name "python-bleach")
10131 (version "3.1.5")
10132 (source
10133 (origin
10134 (method url-fetch)
10135 (uri (pypi-uri "bleach" version))
10136 (sha256
10137 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
10138 (build-system python-build-system)
10139 (propagated-inputs
10140 `(("python-webencodings" ,python-webencodings)
10141 ("python-six" ,python-six)))
10142 (native-inputs
10143 `(("python-datrie" ,python-datrie)
10144 ("python-genshi" ,python-genshi)
10145 ("python-lxml" ,python-lxml)
10146 ("python-pytest" ,python-pytest)))
10147 (home-page "https://github.com/mozilla/bleach")
10148 (synopsis "Whitelist-based HTML-sanitizing tool")
10149 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
10150 (license license:asl2.0)))
10151
10152 (define-public python2-bleach
10153 (package-with-python2 python-bleach))
10154
10155 (define-public python-entrypoints
10156 (package
10157 (name "python-entrypoints")
10158 (version "0.3")
10159 (source
10160 (origin
10161 (method url-fetch)
10162 (uri (pypi-uri "entrypoints" version))
10163 (sha256
10164 (base32
10165 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
10166 (build-system python-build-system)
10167 ;; The package does not come with a setup.py file, so we have to generate
10168 ;; one ourselves.
10169 (arguments
10170 `(#:tests? #f
10171 #:phases
10172 (modify-phases %standard-phases
10173 (add-after 'unpack 'create-setup.py
10174 (lambda _
10175 (call-with-output-file "setup.py"
10176 (lambda (port)
10177 (format port "\
10178 from setuptools import setup
10179 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
10180 " ,version))))))))
10181 (home-page "https://github.com/takluyver/entrypoints")
10182 (synopsis "Discover and load entry points from installed Python packages")
10183 (description "Entry points are a way for Python packages to advertise
10184 objects with some common interface. The most common examples are
10185 @code{console_scripts} entry points, which define shell commands by
10186 identifying a Python function to run. The @code{entrypoints} module contains
10187 functions to find and load entry points.")
10188 (license license:expat)))
10189
10190 (define-public python2-entrypoints
10191 (package-with-python2 python-entrypoints))
10192
10193 (define-public python-epc
10194 (package
10195 (name "python-epc")
10196 (version "0.0.5")
10197 (source
10198 (origin
10199 (method url-fetch)
10200 (uri (pypi-uri "epc" version))
10201 (sha256
10202 (base32
10203 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
10204 (build-system python-build-system)
10205 (propagated-inputs
10206 `(("python-sexpdata" ,python-sexpdata)))
10207 (native-inputs
10208 `(("python-nose" ,python-nose)))
10209 (home-page "https://github.com/tkf/python-epc")
10210 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
10211 (description
10212 "Python-EPC can call elisp functions from Python and Python functions
10213 from elisp.")
10214 (license license:gpl3)))
10215
10216 (define-public python-forex-python
10217 (package
10218 (name "python-forex-python")
10219 (version "1.5")
10220 (source
10221 (origin
10222 (method url-fetch)
10223 (uri (pypi-uri "forex-python" version))
10224 (sha256
10225 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
10226 (build-system python-build-system)
10227 (arguments
10228 ;; Tests are not included in the PyPI tarball. Also, the tests in the
10229 ;; repository require online data.
10230 `(#:tests? #f))
10231 (propagated-inputs
10232 `(("python-requests" ,python-requests)
10233 ("python-simplejson" ,python-simplejson)))
10234 (home-page "https://github.com/MicroPyramid/forex-python")
10235 (synopsis "Foreign exchange rates and currency conversion")
10236 (description
10237 "@code{python-forex-python} can be used to manipulate foreign
10238 exchange rates and to operate currency conversions.
10239
10240 Features:
10241 @itemize
10242 @item List all currency rates.
10243 @item BitCoin price for all currencies.
10244 @item Converting amount to BitCoins.
10245 @item Get historical rates for any day since 1999.
10246 @item Conversion rate for one currency(ex; USD to INR).
10247 @item Convert amount from one currency to other.('USD 10$' to INR).
10248 @item Currency symbols.
10249 @item Currency names.
10250 @end itemize")
10251 (license license:expat)))
10252
10253 (define-public python-simpleeval
10254 (package
10255 (name "python-simpleeval")
10256 (version "0.9.10")
10257 (source
10258 (origin
10259 (method url-fetch)
10260 (uri (pypi-uri "simpleeval" version))
10261 (sha256
10262 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
10263 (build-system python-build-system)
10264 (home-page "https://github.com/danthedeckie/simpleeval")
10265 (synopsis "Simple, safe single expression evaluator library")
10266 (description
10267 "This package provides a quick single file library for easily adding
10268 evaluatable expressions into python projects. Say you want to allow a user
10269 to set an alarm volume, which could depend on the time of day, alarm level,
10270 how many previous alarms had gone off, and if there is music playing at the
10271 time.")
10272 (license license:expat)))
10273
10274 (define-public python-nbconvert
10275 (package
10276 (name "python-nbconvert")
10277 (version "5.0.0b1")
10278 (source
10279 (origin
10280 (method url-fetch)
10281 (uri (pypi-uri "nbconvert" version))
10282 (sha256
10283 (base32
10284 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
10285 (build-system python-build-system)
10286 (arguments
10287 `(;; The "bdist_egg" target is disabled by default, causing the installation
10288 ;; to fail.
10289 #:configure-flags (list "bdist_egg")
10290 ;; FIXME: 5 failures, 40 errors.
10291 #:tests? #f))
10292 ;; #:phases
10293 ;; (modify-phases %standard-phases
10294 ;; (replace 'check
10295 ;; (lambda _
10296 ;; (zero? (system* "py.test" "-v")))))
10297 (native-inputs
10298 `(("python-pytest" ,python-pytest)))
10299 (propagated-inputs
10300 `(("python-bleach" ,python-bleach)
10301 ("python-entrypoints" ,python-entrypoints)
10302 ("python-jinja2" ,python-jinja2)
10303 ("python-jupyter-core" ,python-jupyter-core)
10304 ("python-mistune" ,python-mistune)
10305 ("python-nbformat" ,python-nbformat)
10306 ("python-pygments" ,python-pygments)
10307 ("python-traitlets" ,python-traitlets)))
10308 (home-page "https://jupyter.org")
10309 (synopsis "Converting Jupyter Notebooks")
10310 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
10311 notebooks to various other formats via Jinja templates. It allows you to
10312 convert an @code{.ipynb} notebook file into various static formats including:
10313
10314 @enumerate
10315 @item HTML
10316 @item LaTeX
10317 @item PDF
10318 @item Reveal JS
10319 @item Markdown (md)
10320 @item ReStructured Text (rst)
10321 @item executable script
10322 @end enumerate\n")
10323 (license license:bsd-3)))
10324
10325 (define-public python2-nbconvert
10326 (package-with-python2 python-nbconvert))
10327
10328 (define-public python-notebook
10329 (package
10330 (name "python-notebook")
10331 (version "5.7.4")
10332 (source (origin
10333 (method url-fetch)
10334 (uri (pypi-uri "notebook" version))
10335 (sha256
10336 (base32
10337 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
10338 (build-system python-build-system)
10339 (arguments
10340 `(#:phases
10341 (modify-phases %standard-phases
10342 (replace 'check
10343 (lambda _
10344 ;; These tests require a browser
10345 (delete-file-recursively "notebook/tests/selenium")
10346 ;; Some tests need HOME
10347 (setenv "HOME" "/tmp")
10348 ;; This file contains "warningfilters", which are not supported
10349 ;; by this version of nose.
10350 (delete-file "setup.cfg")
10351 (with-directory-excursion "/tmp"
10352 (invoke "nosetests" "-v"))
10353 #t)))))
10354 (propagated-inputs
10355 `(("python-jupyter-core" ,python-jupyter-core)
10356 ("python-nbformat" ,python-nbformat)
10357 ("python-nbconvert" ,python-nbconvert)
10358 ("python-prometheus-client" ,python-prometheus-client)
10359 ("python-send2trash" ,python-send2trash)
10360 ("python-terminado" ,python-terminado)))
10361 (native-inputs
10362 `(("python-nose" ,python-nose)
10363 ("python-sphinx" ,python-sphinx)
10364 ("python-requests" ,python-requests)))
10365 (home-page "https://jupyter.org/")
10366 (synopsis "Web-based notebook environment for interactive computing")
10367 (description
10368 "The Jupyter HTML notebook is a web-based notebook environment for
10369 interactive computing.")
10370 (properties `((python2-variant . ,(delay python2-notebook))))
10371 (license license:bsd-3)))
10372
10373 (define-public python2-notebook
10374 (let ((base (package-with-python2
10375 (strip-python2-variant python-notebook))))
10376 (package/inherit base
10377 (native-inputs
10378 `(("python2-mock" ,python2-mock)
10379 ,@(package-native-inputs base)))
10380 (arguments
10381 (substitute-keyword-arguments (package-arguments base)
10382 ((#:phases phases)
10383 `(modify-phases ,phases
10384 (add-before 'check 'disable-test-case
10385 ;; The test requires network access to localhost. Curiously it
10386 ;; fails with Python 2 only. Simply make the test-case return
10387 ;; immediately.
10388 (lambda _
10389 (substitute*
10390 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
10391 (("formats = self.nbconvert_api") "return #")))))))))))
10392
10393 (define-public python-widgetsnbextension
10394 (package
10395 (name "python-widgetsnbextension")
10396 (version "3.5.1")
10397 (source
10398 (origin
10399 (method url-fetch)
10400 (uri (pypi-uri "widgetsnbextension" version))
10401 (sha256
10402 (base32
10403 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10404 (build-system python-build-system)
10405 (propagated-inputs
10406 `(("python-ipykernel" ,python-ipykernel)
10407 ("python-notebook" ,python-notebook)))
10408 (native-inputs
10409 `(("python-certifi" ,python-certifi)
10410 ("python-nose" ,python-nose)))
10411 (home-page "https://ipython.org")
10412 (synopsis "IPython HTML widgets for Jupyter")
10413 (description "This package provides interactive HTML widgets for Jupyter
10414 notebooks.")
10415 (license license:bsd-3)))
10416
10417 (define-public python2-widgetsnbextension
10418 (package-with-python2 python-widgetsnbextension))
10419
10420 (define-public python-ipywidgets
10421 (package
10422 (name "python-ipywidgets")
10423 (version "7.5.1")
10424 (source
10425 (origin
10426 (method url-fetch)
10427 (uri (pypi-uri "ipywidgets" version))
10428 (sha256
10429 (base32
10430 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10431 (build-system python-build-system)
10432 (propagated-inputs
10433 `(("python-ipython" ,python-ipython)
10434 ("python-traitlets" ,python-traitlets)
10435 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10436 (native-inputs
10437 `(("python-nose" ,python-nose)
10438 ("python-pytest" ,python-pytest)))
10439 (home-page "https://ipython.org")
10440 (synopsis "IPython HTML widgets for Jupyter")
10441 (description "Ipywidgets are interactive HTML widgets for Jupyter
10442 notebooks and the IPython kernel. Notebooks come alive when interactive
10443 widgets are used. Users gain control of their data and can visualize changes
10444 in the data.")
10445 (license license:bsd-3)))
10446
10447 (define-public python2-ipywidgets
10448 (package-with-python2 python-ipywidgets))
10449
10450 (define-public python-jupyter-console
10451 (package
10452 (name "python-jupyter-console")
10453 (version "6.1.0")
10454 (source
10455 (origin
10456 (method url-fetch)
10457 (uri (pypi-uri "jupyter_console" version))
10458 (sha256
10459 (base32
10460 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10461 (build-system python-build-system)
10462 (propagated-inputs
10463 `(("python-ipykernel" ,python-ipykernel)
10464 ("python-jupyter-client" ,python-jupyter-client)
10465 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10466 ("python-pygments" ,python-pygments)))
10467 (native-inputs
10468 `(("python-nose" ,python-nose)))
10469 (home-page "https://jupyter.org")
10470 (synopsis "Jupyter terminal console")
10471 (description "This package provides a terminal-based console frontend for
10472 Jupyter kernels. It also allows for console-based interaction with non-Python
10473 Jupyter kernels such as IJulia and IRKernel.")
10474 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10475 (license license:bsd-3)))
10476
10477 (define-public python2-jupyter-console
10478 (package
10479 (name "python2-jupyter-console")
10480 (version "5.2.0")
10481 (source
10482 (origin
10483 (method url-fetch)
10484 (uri (pypi-uri "jupyter_console" version))
10485 (sha256
10486 (base32
10487 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10488 (build-system python-build-system)
10489 (arguments
10490 `(#:python ,python-2
10491 #:tests? #f)) ; Tests only run in a TTY.
10492 (propagated-inputs
10493 `(("python2-ipykernel" ,python2-ipykernel)
10494 ("python2-jupyter-client" ,python2-jupyter-client)
10495 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10496 ("python2-pygments" ,python2-pygments)))
10497 (native-inputs
10498 `(("python2-nose" ,python2-nose)))
10499 (home-page "https://jupyter.org")
10500 (synopsis "Jupyter terminal console")
10501 (description "This package provides a terminal-based console frontend for
10502 Jupyter kernels. It also allows for console-based interaction with non-Python
10503 Jupyter kernels such as IJulia and IRKernel.")
10504 (license license:bsd-3)))
10505
10506 ;; The python-ipython and python-jupyter-console require each other. To get
10507 ;; the functionality in both packages working, strip down the
10508 ;; python-jupyter-console package when using it as an input to python-ipython.
10509 (define python-jupyter-console-minimal
10510 (package/inherit python-jupyter-console
10511 (name "python-jupyter-console-minimal")
10512 (arguments
10513 (substitute-keyword-arguments
10514 (package-arguments python-jupyter-console)
10515 ((#:phases phases)
10516 `(modify-phases ,phases
10517 (add-after 'install 'delete-bin
10518 (lambda* (#:key outputs #:allow-other-keys)
10519 ;; Delete the bin files, to avoid conflicts in profiles
10520 ;; where python-ipython and python-jupyter-console are
10521 ;; both present.
10522 (delete-file-recursively
10523 (string-append
10524 (assoc-ref outputs "out") "/bin"))))))))
10525 ;; Remove the python-ipython propagated input, to avoid the cycle
10526 (propagated-inputs
10527 (alist-delete
10528 "python-ipython"
10529 (package-propagated-inputs python-jupyter-console)))))
10530
10531 (define-public python-qtconsole
10532 (package
10533 (name "python-qtconsole")
10534 (version "4.4.3")
10535 (source
10536 (origin
10537 (method url-fetch)
10538 (uri (pypi-uri "qtconsole" version))
10539 (sha256
10540 (base32
10541 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10542 (build-system python-build-system)
10543 (arguments
10544 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10545 ;; but we only have the LTS version 5.x. This means that there might be
10546 ;; runtime errors, but since this is a dependency of the Jupyter package,
10547 ;; and Jupyter can be used without the qtconsole we can overlook this for
10548 ;; now.
10549 `(#:tests? #f
10550 #:phases
10551 (modify-phases %standard-phases
10552 (add-before 'check 'pre-check
10553 (lambda _
10554 (setenv "QT_QPA_PLATFORM" "offscreen")
10555 #t)))))
10556 (propagated-inputs
10557 `(("python-ipykernel" ,python-ipykernel)
10558 ("python-ipython" ,python-ipython)))
10559 (native-inputs
10560 `(("python-pytest" ,python-pytest)))
10561 (home-page "https://jupyter.org")
10562 (synopsis "Jupyter Qt console")
10563 (description "This package provides a Qt-based console for Jupyter with
10564 support for rich media output.")
10565 (license license:bsd-3)))
10566
10567 (define-public python-jsbeautifier
10568 (package
10569 (name "python-jsbeautifier")
10570 (version "1.10.2")
10571 (home-page "https://github.com/beautify-web/js-beautify")
10572 (source (origin
10573 (method git-fetch)
10574 (uri (git-reference
10575 (url home-page)
10576 (commit (string-append "v" version))))
10577 (file-name (git-file-name name version))
10578 (sha256
10579 (base32
10580 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10581 (build-system python-build-system)
10582 (arguments
10583 `(#:phases (modify-phases %standard-phases
10584 (add-after 'unpack 'chdir
10585 (lambda _
10586 ;; The upstream Git repository contains all the code,
10587 ;; but this package only builds the python code.
10588 (chdir "python")
10589 #t))
10590 (add-after 'unpack 'patch-python-six-requirements
10591 (lambda _
10592 (substitute* "python/setup.py"
10593 (("six>=1.12.0")
10594 "six>=1.11.0"))
10595 #t)))))
10596 (propagated-inputs
10597 `(("python-editorconfig" ,python-editorconfig)
10598 ("python-six" ,python-six)))
10599 (native-inputs
10600 `(("python-pytest" ,python-pytest)))
10601 (synopsis "JavaScript unobfuscator and beautifier")
10602 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10603 popular online obfuscators.")
10604 (license license:expat)))
10605
10606 (define-public jupyter
10607 (package
10608 (name "jupyter")
10609 (version "1.0.0")
10610 (source
10611 (origin
10612 (method url-fetch)
10613 (uri (pypi-uri "jupyter" version))
10614 (sha256
10615 (base32
10616 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10617 (build-system python-build-system)
10618 (arguments '(#:tests? #f)) ; there are none.
10619 (propagated-inputs
10620 `(("python-ipykernel" ,python-ipykernel)
10621 ("python-ipywidgets" ,python-ipywidgets)
10622 ("python-jupyter-console" ,python-jupyter-console)
10623 ("python-nbconvert" ,python-nbconvert)
10624 ("python-notebook" ,python-notebook)
10625 ("python-qtconsole" ,python-qtconsole)))
10626 (native-search-paths
10627 (list (search-path-specification
10628 (variable "JUPYTER_PATH")
10629 (files '("share/jupyter")))))
10630 (home-page "https://jupyter.org")
10631 (synopsis "Web application for interactive documents")
10632 (description
10633 "The Jupyter Notebook is a web application that allows you to create and
10634 share documents that contain live code, equations, visualizations and
10635 explanatory text. Uses include: data cleaning and transformation, numerical
10636 simulation, statistical modeling, machine learning and much more.")
10637 (license license:bsd-3)))
10638
10639 (define-public python-chardet
10640 (package
10641 (name "python-chardet")
10642 (version "3.0.4")
10643 (source
10644 (origin
10645 (method url-fetch)
10646 (uri (pypi-uri "chardet" version))
10647 (sha256
10648 (base32
10649 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10650 (native-inputs
10651 `(("python-hypothesis" ,python-hypothesis)
10652 ("python-pytest" ,python-pytest)
10653 ("python-pytest-runner" ,python-pytest-runner)))
10654 (build-system python-build-system)
10655 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10656 (arguments `(#:tests? #f))
10657 (home-page "https://github.com/chardet/chardet")
10658 (synopsis "Universal encoding detector for Python 2 and 3")
10659 (description
10660 "This package provides @code{chardet}, a Python module that can
10661 automatically detect a wide range of file encodings.")
10662 (license license:lgpl2.1+)))
10663
10664 (define-public python2-chardet
10665 (package-with-python2 python-chardet))
10666
10667 (define-public python-docopt
10668 (package
10669 (name "python-docopt")
10670 (version "0.6.2")
10671 (source
10672 (origin
10673 (method git-fetch)
10674 ;; The release on PyPI does not include tests.
10675 (uri (git-reference
10676 (url "https://github.com/docopt/docopt")
10677 (commit version)))
10678 (file-name (git-file-name name version))
10679 (sha256
10680 (base32
10681 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10682 (build-system python-build-system)
10683 (native-inputs
10684 `(("python-pytest" ,python-pytest)))
10685 (arguments
10686 `(#:phases
10687 (modify-phases %standard-phases
10688 (replace 'check
10689 (lambda _ (invoke "py.test"))))))
10690 (home-page "http://docopt.org")
10691 (synopsis "Command-line interface description language for Python")
10692 (description "This library allows the user to define a command-line
10693 interface from a program's help message rather than specifying it
10694 programmatically with command-line parsers like @code{getopt} and
10695 @code{argparse}.")
10696 (license license:expat)))
10697
10698 (define-public python2-docopt
10699 (package-with-python2 python-docopt))
10700
10701 (define-public python-pythondialog
10702 (package
10703 (name "python-pythondialog")
10704 (version "3.4.0")
10705 (source
10706 (origin
10707 (method url-fetch)
10708 (uri (pypi-uri "pythondialog" version))
10709 (sha256
10710 (base32
10711 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10712 (build-system python-build-system)
10713 (arguments
10714 `(#:phases
10715 (modify-phases %standard-phases
10716 (add-after 'unpack 'patch-path
10717 (lambda* (#:key inputs #:allow-other-keys)
10718 (let* ((dialog (assoc-ref inputs "dialog")))
10719 ;; Since this library really wants to grovel the search path, we
10720 ;; must hardcode dialog's store path into it.
10721 (substitute* "dialog.py"
10722 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10723 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10724 #t))))
10725 #:tests? #f)) ; no test suite
10726 (propagated-inputs
10727 `(("dialog" ,dialog)))
10728 (home-page "http://pythondialog.sourceforge.net/")
10729 (synopsis "Python interface to the UNIX dialog utility")
10730 (description "A Python wrapper for the dialog utility. Its purpose is to
10731 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10732 This allows one to make simple text-mode user interfaces on Unix-like systems")
10733 (license license:lgpl2.1)
10734 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10735
10736 (define-public python2-pythondialog
10737 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10738 (package
10739 (inherit base)
10740 (version (package-version python-pythondialog))
10741 (source (origin
10742 (method url-fetch)
10743 (uri (pypi-uri "python2-pythondialog" version))
10744 (sha256
10745 (base32
10746 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10747
10748 (define-public python-configobj
10749 (package
10750 (name "python-configobj")
10751 (version "5.0.6")
10752 (source (origin
10753 (method url-fetch)
10754 (uri (pypi-uri "configobj" version))
10755 (sha256
10756 (base32
10757 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10758 ;; Patch setup.py so it looks for python-setuptools, which is
10759 ;; required to parse the keyword 'install_requires' in setup.py.
10760 (patches (search-patches "python-configobj-setuptools.patch"))))
10761 (build-system python-build-system)
10762 (propagated-inputs
10763 `(("python-six" ,python-six)))
10764 (synopsis "Config file reading, writing and validation")
10765 (description "ConfigObj is a simple but powerful config file reader and
10766 writer: an ini file round tripper. Its main feature is that it is very easy to
10767 use, with a straightforward programmer’s interface and a simple syntax for
10768 config files.")
10769 (home-page "https://github.com/DiffSK/configobj")
10770 (license license:bsd-3)))
10771
10772 (define-public python2-configobj
10773 (package-with-python2 python-configobj))
10774
10775 (define-public python-configargparse
10776 (package
10777 (name "python-configargparse")
10778 (version "1.2.3")
10779 (source (origin
10780 (method url-fetch)
10781 (uri (pypi-uri "ConfigArgParse" version))
10782 (sha256
10783 (base32
10784 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
10785 (build-system python-build-system)
10786 (native-inputs
10787 `(("python-pyyaml" ,python-pyyaml)))
10788 (arguments
10789 `(#:phases
10790 (modify-phases %standard-phases
10791 (replace 'check
10792 (lambda _
10793 ;; Bypass setuptools-shim because one test relies on "setup.py"
10794 ;; being the first argument passed to the python call.
10795 ;;
10796 ;; NOTE: Many tests do not run because they rely on Python's
10797 ;; built-in test.test_argparse, but we remove the unit tests from
10798 ;; our Python installation.
10799 (invoke "python" "setup.py" "test"))))))
10800 (synopsis "Replacement for argparse")
10801 (description "A drop-in replacement for argparse that allows options to also
10802 be set via config files and/or environment variables.")
10803 (home-page "https://github.com/bw2/ConfigArgParse")
10804 (license license:expat)))
10805
10806 (define-public python-argparse-manpage
10807 (package
10808 (name "python-argparse-manpage")
10809 (version "1.1")
10810 (source
10811 (origin
10812 (method url-fetch)
10813 (uri (pypi-uri "argparse-manpage" version))
10814 (sha256
10815 (base32
10816 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10817 (build-system python-build-system)
10818 (home-page "https://github.com/praiskup/argparse-manpage")
10819 (synopsis "Build manual page from Python's ArgumentParser object")
10820 (description
10821 "This package provides tools to build manual pages from Python's
10822 @code{ArgumentParser} object.")
10823 (license license:asl2.0)))
10824
10825 (define-public python-contextlib2
10826 (package
10827 (name "python-contextlib2")
10828 (version "0.6.0.post1")
10829 (source
10830 (origin
10831 (method url-fetch)
10832 (uri (pypi-uri "contextlib2" version))
10833 (sha256
10834 (base32
10835 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10836 (build-system python-build-system)
10837 (home-page "https://contextlib2.readthedocs.org/")
10838 (synopsis "Tools for decorators and context managers")
10839 (description "This module is primarily a backport of the Python
10840 3.2 contextlib to earlier Python versions. Like contextlib, it
10841 provides utilities for common tasks involving decorators and context
10842 managers. It also contains additional features that are not part of
10843 the standard library.")
10844 (properties `((python2-variant . ,(delay python2-contextlib2))))
10845 (license license:psfl)))
10846
10847 (define-public python2-contextlib2
10848 (let ((base (package-with-python2
10849 (strip-python2-variant python-contextlib2))))
10850 (package/inherit base
10851 (arguments
10852 (substitute-keyword-arguments (package-arguments base)
10853 ((#:phases phases)
10854 `(modify-phases ,phases
10855 (replace 'check
10856 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10857 (native-inputs
10858 `(("python2-unittest2" ,python2-unittest2))))))
10859
10860 ;; This package is used by python2-pytest via python2-importlib-metadata,
10861 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10862 (define-public python2-contextlib2-bootstrap
10863 (hidden-package
10864 (package/inherit
10865 python2-contextlib2
10866 (name "python2-contextlib2-bootstrap")
10867 (arguments
10868 `(#:tests? #f
10869 ,@(package-arguments python2-contextlib2)))
10870 (native-inputs '()))))
10871
10872 (define-public python-texttable
10873 (package
10874 (name "python-texttable")
10875 (version "1.6.2")
10876 (source
10877 (origin
10878 (method url-fetch)
10879 (uri (pypi-uri "texttable" version))
10880 (sha256
10881 (base32
10882 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10883 (build-system python-build-system)
10884 (arguments
10885 `(#:phases
10886 (modify-phases %standard-phases
10887 (replace 'check
10888 (lambda _ (invoke "pytest" "tests.py"))))))
10889 (native-inputs
10890 `(("python-pytest" ,python-pytest)))
10891 (home-page "https://github.com/foutaise/texttable/")
10892 (synopsis "Python module for creating simple ASCII tables")
10893 (description "Texttable is a Python module for creating simple ASCII
10894 tables.")
10895 (license license:expat)))
10896
10897 (define-public python2-texttable
10898 (package-with-python2 python-texttable))
10899
10900 (define-public python-atomicwrites
10901 (package
10902 (name "python-atomicwrites")
10903 (version "1.3.0")
10904 (source (origin
10905 (method url-fetch)
10906 (uri (pypi-uri "atomicwrites" version))
10907 (sha256
10908 (base32
10909 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10910 (build-system python-build-system)
10911 (synopsis "Atomic file writes in Python")
10912 (description "Library for atomic file writes using platform dependent tools
10913 for atomic file system operations.")
10914 (home-page "https://github.com/untitaker/python-atomicwrites")
10915 (license license:expat)))
10916
10917 (define-public python2-atomicwrites
10918 (package-with-python2 python-atomicwrites))
10919
10920 (define-public python-click-threading
10921 (package
10922 (name "python-click-threading")
10923 (version "0.4.4")
10924 (source (origin
10925 (method url-fetch)
10926 (uri (pypi-uri "click-threading" version))
10927 (sha256
10928 (base32
10929 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10930 (build-system python-build-system)
10931 (propagated-inputs
10932 `(("python-click" ,python-click)))
10933 (synopsis "Utilities for multithreading in Click")
10934 (description "This package provides utilities for multithreading in Click
10935 applications.")
10936 (home-page "https://github.com/click-contrib/click-threading")
10937 (license license:expat)))
10938
10939 (define-public python-click-log
10940 (package
10941 (name "python-click-log")
10942 (version "0.3.2")
10943 (source (origin
10944 (method url-fetch)
10945 (uri (pypi-uri "click-log" version))
10946 (sha256
10947 (base32
10948 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10949 (build-system python-build-system)
10950 (propagated-inputs
10951 `(("python-click" ,python-click)))
10952 (synopsis "Logging for click applications")
10953 (description "This package provides a Python library for logging Click
10954 applications.")
10955 (home-page "https://github.com/click-contrib/click-log")
10956 (license license:expat)))
10957
10958 (define-public python-click-default-group
10959 (package
10960 (name "python-click-default-group")
10961 (version "1.2.2")
10962 (source (origin
10963 (method url-fetch)
10964 (uri (pypi-uri "click-default-group" version))
10965 (sha256
10966 (base32
10967 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
10968 (build-system python-build-system)
10969 (arguments
10970 `(#:tests? #f)) ; no target
10971 (propagated-inputs
10972 `(("python-click" ,python-click)))
10973 (synopsis "Extends click.Group")
10974 (description "This package extends click.Group to invoke a command without
10975 explicit subcommand name.")
10976 (home-page "https://github.com/click-contrib/click-default-group")
10977 (license license:bsd-3)))
10978
10979 (define-public python-structlog
10980 (package
10981 (name "python-structlog")
10982 (version "20.2.0")
10983 (source
10984 (origin
10985 (method url-fetch)
10986 (uri (pypi-uri "structlog" version))
10987 (sha256
10988 (base32
10989 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
10990 (build-system python-build-system)
10991 (arguments
10992 `(#:phases
10993 (modify-phases %standard-phases
10994 (replace 'check
10995 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10996 (when tests?
10997 (add-installed-pythonpath inputs outputs)
10998 (invoke "pytest"))
10999 #t)))))
11000 (native-inputs
11001 `(("python-coverage" ,python-coverage)
11002 ("python-freezegun" ,python-freezegun)
11003 ("python-pretend" ,python-pretend)
11004 ("python-pytest" ,python-pytest)
11005 ("python-pytest-asyncio" ,python-pytest-asyncio)
11006 ("python-simplejson" ,python-simplejson)
11007 ("python-twisted" ,python-twisted)))
11008 (home-page "https://www.structlog.org/")
11009 (synopsis "Structured Logging for Python")
11010 (description "@code{structlog} changes logging in Python by adding structure
11011 to your log entries.")
11012 (license (list license:asl2.0 license:expat))))
11013
11014 (define-public python-apipkg
11015 (package
11016 (name "python-apipkg")
11017 (version "1.5")
11018 (source (origin
11019 (method url-fetch)
11020 (uri (pypi-uri "apipkg" version))
11021 (sha256
11022 (base32
11023 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
11024 (build-system python-build-system)
11025 (native-inputs
11026 `(("python-pytest" ,python-pytest)
11027 ("python-setuptools-scm" ,python-setuptools-scm)))
11028 (synopsis "Namespace control and lazy-import mechanism")
11029 (description "With apipkg you can control the exported namespace of a Python
11030 package and greatly reduce the number of imports for your users. It is a small
11031 pure Python module that works on virtually all Python versions.")
11032 (home-page "https://github.com/pytest-dev/apipkg")
11033 (license license:expat)))
11034
11035 (define-public python-execnet
11036 (package
11037 (name "python-execnet")
11038 (version "1.4.1")
11039 (source (origin
11040 (method url-fetch)
11041 (uri (pypi-uri "execnet" version))
11042 (sha256
11043 (base32
11044 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
11045 (build-system python-build-system)
11046 (arguments
11047 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
11048 ;; The two test failures are caused by the lack of an `ssh` executable.
11049 ;; The test suite can be run with pytest after the 'install' phase.
11050 #:tests? #f))
11051 (native-inputs
11052 `(("python-pytest" ,python-pytest)
11053 ("python-setuptools-scm" ,python-setuptools-scm)))
11054 (propagated-inputs
11055 `(("python-apipkg" ,python-apipkg)))
11056 (synopsis "Rapid multi-Python deployment")
11057 (description "Execnet provides a share-nothing model with
11058 channel-send/receive communication for distributing execution across many
11059 Python interpreters across version, platform and network barriers. It has a
11060 minimal and fast API targeting the following uses:
11061 @enumerate
11062 @item distribute tasks to (many) local or remote CPUs
11063 @item write and deploy hybrid multi-process applications
11064 @item write scripts to administer multiple environments
11065 @end enumerate")
11066 (home-page "https://codespeak.net/execnet/")
11067 (license license:expat)))
11068
11069 (define-public python2-execnet
11070 (package-with-python2 python-execnet))
11071
11072 (define-public python-icalendar
11073 (package
11074 (name "python-icalendar")
11075 (version "4.0.5")
11076 (source (origin
11077 (method url-fetch)
11078 (uri (pypi-uri "icalendar" version))
11079 (sha256
11080 (base32
11081 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
11082 (build-system python-build-system)
11083 (propagated-inputs
11084 `(("python-dateutil" ,python-dateutil)
11085 ("python-pytz" ,python-pytz)))
11086 (synopsis "Python library for parsing iCalendar files")
11087 (description "The icalendar package is a parser/generator of iCalendar
11088 files for use with Python.")
11089 (home-page "https://github.com/collective/icalendar")
11090 (license license:bsd-2)))
11091
11092 (define-public python-args
11093 (package
11094 (name "python-args")
11095 (version "0.1.0")
11096 (source (origin
11097 (method url-fetch)
11098 (uri (pypi-uri "args" version))
11099 (sha256
11100 (base32
11101 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
11102 (build-system python-build-system)
11103 (home-page "https://github.com/kennethreitz/args")
11104 (synopsis "Command-line argument parser")
11105 (description
11106 "This library provides a Python module to parse command-line arguments.")
11107 (license license:bsd-3)))
11108
11109 (define-public python2-args
11110 (package-with-python2 python-args))
11111
11112 (define-public python-clint
11113 (package
11114 (name "python-clint")
11115 (version "0.5.1")
11116 (source (origin
11117 (method url-fetch)
11118 (uri (pypi-uri "clint" version))
11119 (sha256
11120 (base32
11121 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
11122 (build-system python-build-system)
11123 (arguments
11124 '(#:phases
11125 (modify-phases %standard-phases
11126 (replace 'check
11127 (lambda _ (invoke "py.test" "-v"))))))
11128 (native-inputs
11129 `(("python-pytest" ,python-pytest)))
11130 (propagated-inputs
11131 `(("python-args" ,python-args)))
11132 (home-page "https://github.com/kennethreitz/clint")
11133 (synopsis "Command-line interface tools")
11134 (description
11135 "Clint is a Python module filled with a set of tools for developing
11136 command-line applications, including tools for colored and indented
11137 output, progress bar display, and pipes.")
11138 (license license:isc)))
11139
11140 (define-public python2-clint
11141 (package-with-python2 python-clint))
11142
11143 (define-public python-rply
11144 (package
11145 (name "python-rply")
11146 (version "0.7.5")
11147 (source (origin
11148 (method url-fetch)
11149 (uri (pypi-uri "rply" version))
11150 (sha256
11151 (base32
11152 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
11153 (build-system python-build-system)
11154 (propagated-inputs
11155 `(("python-appdirs" ,python-appdirs)))
11156 (home-page "https://github.com/alex/rply")
11157 (synopsis "Parser generator for Python")
11158 (description
11159 "This package provides a pure Python based parser generator, that also
11160 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
11161 with a new public API, and RPython support.")
11162 (license license:bsd-3)))
11163
11164 (define-public python2-rply
11165 (package-with-python2 python-rply))
11166
11167 (define-public python-hy
11168 (package
11169 (name "python-hy")
11170 (version "0.18.0")
11171 (source (origin
11172 (method url-fetch)
11173 (uri (pypi-uri "hy" version))
11174 (sha256
11175 (base32
11176 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
11177 (build-system python-build-system)
11178 (arguments
11179 '(#:phases
11180 (modify-phases %standard-phases
11181 (add-before 'install 'set-HOME
11182 (lambda _
11183 (setenv "HOME" "/tmp") #t))
11184 (replace 'check
11185 (lambda _
11186 ;; Tests require write access to HOME.
11187 (setenv "HOME" "/tmp")
11188 (invoke "nosetests"))))))
11189 (native-inputs
11190 `(("python-coverage" ,python-coverage)
11191 ("python-nose" ,python-nose)))
11192 (propagated-inputs
11193 `(("python-astor" ,python-astor)
11194 ("python-colorama" ,python-colorama)
11195 ("python-rply" ,python-rply)
11196 ("python-funcparserlib"
11197 ,python-funcparserlib)))
11198 (home-page "http://hylang.org/")
11199 (synopsis "Lisp frontend to Python")
11200 (description
11201 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
11202 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
11203 Python at your fingertips, in Lisp form.")
11204 (license license:expat)))
11205
11206 (define-public python2-functools32
11207 (package
11208 (name "python2-functools32")
11209 (version "3.2.3-2")
11210 (source
11211 (origin
11212 (method url-fetch)
11213 (uri (pypi-uri "functools32" version))
11214 (sha256
11215 (base32
11216 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
11217 (build-system python-build-system)
11218 (arguments
11219 `(#:python ,python-2
11220 #:tests? #f)) ; no test target
11221 (home-page "https://github.com/MiCHiLU/python-functools32")
11222 (synopsis
11223 "Backport of the functools module from Python 3.2.3")
11224 (description
11225 "This package is a backport of the @code{functools} module from Python
11226 3.2.3 for use with older versions of Python and PyPy.")
11227 (license license:expat)))
11228
11229 (define-public python2-subprocess32
11230 (package
11231 (name "python2-subprocess32")
11232 (version "3.2.7")
11233 (source (origin
11234 (method url-fetch)
11235 (uri (pypi-uri "subprocess32" version))
11236 (sha256
11237 (base32
11238 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
11239 (patches
11240 (search-patches "python2-subprocess32-disable-input-test.patch"))))
11241 (build-system python-build-system)
11242 (arguments
11243 `(#:python ,python-2
11244 ;; The test suite fails with Python > 2.7.13:
11245 ;; import test.support
11246 ;; ImportError: No module named support
11247 #:tests? #f
11248 #:phases
11249 (modify-phases %standard-phases
11250 (add-after 'unpack 'patch-/bin/sh
11251 (lambda _
11252 (substitute* '("subprocess32.py"
11253 "test_subprocess32.py")
11254 (("/bin/sh") (which "sh")))
11255 #t)))))
11256 (home-page "https://github.com/google/python-subprocess32")
11257 (synopsis "Backport of the subprocess module from Python 3.2")
11258 (description
11259 "This is a backport of the @code{subprocess} standard library module
11260 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
11261 new features. On POSIX systems it is guaranteed to be reliable when used
11262 in threaded applications. It includes timeout support from Python 3.3 but
11263 otherwise matches 3.2’s API.")
11264 (license license:psfl)))
11265
11266 (define-public python2-futures
11267 (package
11268 (name "python2-futures")
11269 (version "3.2.0")
11270 (source
11271 (origin
11272 (method url-fetch)
11273 (uri (pypi-uri "futures" version))
11274 (sha256
11275 (base32
11276 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
11277 (build-system python-build-system)
11278 (arguments
11279 `(#:python ,python-2
11280 #:phases
11281 (modify-phases %standard-phases
11282 (replace 'check
11283 (lambda _
11284 (invoke "python" "test_futures.py")
11285 #t)))))
11286 (home-page "https://github.com/agronholm/pythonfutures")
11287 (synopsis
11288 "Backport of the concurrent.futures package from Python 3.2")
11289 (description
11290 "The concurrent.futures module provides a high-level interface for
11291 asynchronously executing callables. This package backports the
11292 concurrent.futures package from Python 3.2")
11293 (license license:bsd-3)))
11294
11295 (define-public python-promise
11296 (package
11297 (name "python-promise")
11298 (version "0.4.2")
11299 (source
11300 (origin
11301 (method url-fetch)
11302 (uri (pypi-uri "promise" version))
11303 (sha256
11304 (base32
11305 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
11306 (build-system python-build-system)
11307 ;; Tests wants python-futures, which is a python2 only program, and
11308 ;; can't be found by python-promise at test time.
11309 (arguments `(#:tests? #f))
11310 (home-page "https://github.com/syrusakbary/promise")
11311 (synopsis "Promises/A+ implementation for Python")
11312 (description
11313 "Promises/A+ implementation for Python")
11314 (properties `((python2-variant . ,(delay python2-promise))))
11315 (license license:expat)))
11316
11317 (define-public python2-promise
11318 (let ((promise (package-with-python2
11319 (strip-python2-variant python-promise))))
11320 (package/inherit promise
11321 (arguments (substitute-keyword-arguments (package-arguments promise)
11322 ((#:tests? _) #t)))
11323 (native-inputs
11324 `(("python2-futures" ,python2-futures)
11325 ("python2-pytest" ,python2-pytest)
11326 ,@(package-native-inputs promise))))))
11327
11328 (define-public python-progressbar2
11329 (package
11330 (name "python-progressbar2")
11331 (version "3.51.3")
11332 (source
11333 (origin
11334 (method url-fetch)
11335 (uri (pypi-uri "progressbar2" version))
11336 (sha256
11337 (base32
11338 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
11339 (build-system python-build-system)
11340 (propagated-inputs
11341 `(("python-six" ,python-six)
11342 ("python-utils" ,python-utils)))
11343 (native-inputs
11344 `(("python-flake8" ,python-flake8)
11345 ("python-freezegun" ,python-freezegun)
11346 ("python-pycodestyle" ,python-pycodestyle)
11347 ("python-pytest" ,python-pytest)
11348 ("python-pytest-cache" ,python-pytest-cache)
11349 ("python-pytest-cov" ,python-pytest-cov)
11350 ("python-pytest-flakes" ,python-pytest-flakes)
11351 ("python-pytest-pep8" ,python-pytest-pep8)
11352 ("python-sphinx" ,python-sphinx)))
11353 (home-page "https://github.com/WoLpH/python-progressbar")
11354 (synopsis "Text progress bar library for Python")
11355 (description
11356 "This package provides a Python progressbar library to provide
11357 visual (yet text based) progress to long running operations.")
11358 (license license:bsd-3)))
11359
11360 (define-public python-progressbar33
11361 (package
11362 (name "python-progressbar33")
11363 (version "2.4")
11364 (source
11365 (origin
11366 (method url-fetch)
11367 (uri (pypi-uri "progressbar33" version))
11368 (sha256
11369 (base32
11370 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
11371 (build-system python-build-system)
11372 (home-page "https://github.com/germangh/python-progressbar")
11373 (synopsis "Text progress bar library for Python")
11374 (description
11375 "This package provides a text progress bar library for Python. This
11376 version only differs from the original @code{progressbar} package in that it
11377 uses relative package imports instead of absolute imports, which is necessary
11378 for the module to work under Python 3.3.")
11379 ;; Either or both of these licenses may be selected.
11380 (license (list license:lgpl2.1+ license:bsd-3))))
11381
11382 (define-public python-colorama
11383 (package
11384 (name "python-colorama")
11385 (version "0.4.4")
11386 (source
11387 (origin
11388 (method url-fetch)
11389 (uri (pypi-uri "colorama" version))
11390 (sha256
11391 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
11392 (build-system python-build-system)
11393 (synopsis "Colored terminal text rendering for Python")
11394 (description "Colorama is a Python library for rendering colored terminal
11395 text.")
11396 (home-page "https://pypi.org/project/colorama/")
11397 (license license:bsd-3)))
11398
11399 (define-public python2-colorama
11400 (package-with-python2 python-colorama))
11401
11402 (define-public python-moto
11403 (package
11404 (name "python-moto")
11405 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
11406 (version "1.3.16.dev134")
11407 (source (origin
11408 (method url-fetch)
11409 (uri (pypi-uri "moto" version))
11410 (sha256
11411 (base32
11412 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
11413 (build-system python-build-system)
11414 (arguments
11415 `(#:phases (modify-phases %standard-phases
11416 (add-after 'unpack 'patch-hardcoded-executable-names
11417 (lambda _
11418 (substitute* "moto/batch/models.py"
11419 (("/bin/sh")
11420 (which "sh")))
11421 (substitute* (find-files "tests" "\\.py$")
11422 (("#!/bin/bash")
11423 (string-append "#!" (which "bash"))))
11424 #t))
11425 (replace 'check
11426 (lambda _
11427 (setenv "PYTHONPATH" (string-append "./build/lib:"
11428 (getenv "PYTHONPATH")))
11429 (invoke "pytest" "-vv" "-m" "not network"
11430 ;; These tests require Docker.
11431 "-k" "not test_terminate_job \
11432 and not test_invoke_function_from_sqs_exception"))))))
11433 (native-inputs
11434 `(("python-flask" ,python-flask)
11435 ("python-flask-cors" ,python-flask-cors)
11436 ("python-freezegun" ,python-freezegun)
11437 ("python-parameterized" ,python-parameterized)
11438 ("python-pytest" ,python-pytest)
11439 ("python-sure" ,python-sure)))
11440 (propagated-inputs
11441 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
11442 ("python-boto" ,python-boto)
11443 ("python-boto3" ,python-boto3)
11444 ("python-botocore" ,python-botocore)
11445 ("python-cfn-lint" ,python-cfn-lint)
11446 ("python-cryptography" ,python-cryptography)
11447 ("python-dateutil" ,python-dateutil)
11448 ("python-docker" ,python-docker)
11449 ("python-idna" ,python-idna)
11450 ("python-jinja2" ,python-jinja2)
11451 ("python-jose" ,python-jose)
11452 ("python-jsondiff" ,python-jsondiff)
11453 ("python-mock" ,python-mock)
11454 ("python-pytz" ,python-pytz)
11455 ("python-pyyaml" ,python-pyyaml)
11456 ("python-requests" ,python-requests)
11457 ("python-responses" ,python-responses)
11458 ("python-six" ,python-six)
11459 ("python-sshpubkeys" ,python-sshpubkeys)
11460 ("python-werkzeug" ,python-werkzeug)
11461 ("python-xmltodict" ,python-xmltodict)))
11462 (home-page "https://github.com/spulec/moto")
11463 (synopsis "Mock out the boto library")
11464 (description
11465 "@code{moto} is a library designed to easily mock out the
11466 @code{boto} library.")
11467 (license license:asl2.0)))
11468
11469 (define-public python-rsa
11470 (package
11471 (name "python-rsa")
11472 (version "3.4.2")
11473 (source
11474 (origin
11475 (method url-fetch)
11476 (uri (pypi-uri "rsa" version))
11477 (sha256
11478 (base32
11479 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11480 (build-system python-build-system)
11481 (propagated-inputs
11482 `(("python-pyasn1" ,python-pyasn1)))
11483 (synopsis "Pure-Python RSA implementation")
11484 (description "Python-RSA is a pure-Python RSA implementation. It supports
11485 encryption and decryption, signing and verifying signatures, and key
11486 generation according to PKCS#1 version 1.5. It can be used as a Python
11487 library as well as on the command line.")
11488 (home-page "https://stuvel.eu/rsa")
11489 (license license:asl2.0)))
11490
11491 (define-public python2-rsa
11492 (package-with-python2 python-rsa))
11493
11494 (define-public python-pluggy
11495 (package
11496 (name "python-pluggy")
11497 (version "0.13.1")
11498 (source
11499 (origin
11500 (method url-fetch)
11501 (uri (pypi-uri "pluggy" version))
11502 (sha256
11503 (base32
11504 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11505 (build-system python-build-system)
11506 (native-inputs
11507 `(("python-setuptools-scm" ,python-setuptools-scm)))
11508 (synopsis "Plugin and hook calling mechanism for Python")
11509 (description "Pluggy is an extraction of the plugin manager as used by
11510 Pytest but stripped of Pytest specific details.")
11511 (home-page "https://pypi.org/project/pluggy/")
11512 (properties `((python2-variant . ,(delay python2-pluggy))))
11513 (license license:expat)))
11514
11515 (define-public python2-pluggy
11516 (let ((base (package-with-python2 (strip-python2-variant
11517 python-pluggy))))
11518 (package/inherit
11519 base
11520 (propagated-inputs
11521 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11522
11523 ;; This package requires python2-importlib-metadata, but that package
11524 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11525 ;; variant to solve the circular dependency.
11526 (define-public python2-pluggy-bootstrap
11527 (hidden-package
11528 (package/inherit
11529 python2-pluggy
11530 (name "python2-pluggy-bootstrap")
11531 (arguments
11532 `(#:tests? #f
11533 ,@(package-arguments python2-pluggy)))
11534 (propagated-inputs
11535 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11536
11537 (define-public python-tox
11538 (package
11539 (name "python-tox")
11540 (version "3.20.0")
11541 (source
11542 (origin
11543 (method url-fetch)
11544 (uri (pypi-uri "tox" version))
11545 (sha256
11546 (base32
11547 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11548 (build-system python-build-system)
11549 (arguments
11550 ;; FIXME: Tests require pytest-timeout, which itself requires
11551 ;; pytest>=2.8.0 for installation.
11552 '(#:tests? #f))
11553 (propagated-inputs
11554 `(("python-filelock" ,python-filelock)
11555 ("python-packaging" ,python-packaging)
11556 ("python-pluggy" ,python-pluggy)
11557 ("python-py" ,python-py)
11558 ("python-six" ,python-six)
11559 ("python-toml" ,python-toml)
11560 ("python-virtualenv" ,python-virtualenv)))
11561 (native-inputs
11562 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11563 ("python-pytest" ,python-pytest) ; >= 2.3.5
11564 ("python-setuptools-scm" ,python-setuptools-scm)))
11565 (home-page "https://tox.readthedocs.io")
11566 (synopsis "Virtualenv-based automation of test activities")
11567 (description "Tox is a generic virtualenv management and test command line
11568 tool. It can be used to check that a package installs correctly with
11569 different Python versions and interpreters, or run tests in each type of
11570 supported environment, or act as a frontend to continuous integration
11571 servers.")
11572 (license license:expat)))
11573
11574 (define-public python-jmespath
11575 (package
11576 (name "python-jmespath")
11577 (version "0.9.4")
11578 (source
11579 (origin
11580 (method url-fetch)
11581 (uri (pypi-uri "jmespath" version))
11582 (sha256
11583 (base32
11584 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11585 (build-system python-build-system)
11586 (native-inputs
11587 `(("python-nose" ,python-nose)))
11588 (synopsis "JSON Matching Expressions")
11589 (description "JMESPath (pronounced “james path”) is a Python library that
11590 allows one to declaratively specify how to extract elements from a JSON
11591 document.")
11592 (home-page "https://github.com/jmespath/jmespath.py")
11593 (license license:expat)))
11594
11595 (define-public python2-jmespath
11596 (package-with-python2 python-jmespath))
11597
11598 (define-public python-symengine
11599 (package
11600 (name "python-symengine")
11601 (version "0.6.1")
11602 (source
11603 (origin
11604 (method url-fetch)
11605 (uri (pypi-uri "symengine" version))
11606 (sha256
11607 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11608 (build-system python-build-system)
11609 (native-inputs
11610 `(("cmake" ,cmake)
11611 ("python-cython" ,python-cython)))
11612 (inputs
11613 `(("symengine" ,symengine)))
11614 (home-page "https://github.com/symengine/symengine.py")
11615 (synopsis "Python library providing wrappers to SymEngine")
11616 (description
11617 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11618 manipulation library.")
11619 (license license:expat)))
11620
11621 (define-public python-uncertainties
11622 (package
11623 (name "python-uncertainties")
11624 (version "3.1.5")
11625 (source
11626 (origin
11627 (method url-fetch)
11628 (uri (pypi-uri "uncertainties" version))
11629 (sha256
11630 (base32
11631 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
11632 (build-system python-build-system)
11633 ;; While there are test files, there is no "tests" directory, so the tests
11634 ;; fail.
11635 (arguments '(#:tests? #false))
11636 (propagated-inputs
11637 `(("python-future" ,python-future)))
11638 (native-inputs
11639 `(("python-nose" ,python-nose)
11640 ("python-numpy" ,python-numpy)))
11641 (home-page "https://uncertainties-python-package.readthedocs.io/")
11642 (synopsis "Calculations with uncertainties")
11643 (description
11644 "The uncertainties package transparently handles calculations with
11645 numbers with uncertainties. It can also yield the derivatives of any
11646 expression.")
11647 (license license:bsd-3)))
11648
11649 (define-public python-asteval
11650 (package
11651 (name "python-asteval")
11652 (version "0.9.23")
11653 (source
11654 (origin
11655 (method url-fetch)
11656 (uri (pypi-uri "asteval" version))
11657 (sha256
11658 (base32
11659 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
11660 (build-system python-build-system)
11661 (native-inputs
11662 `(("python-pytest" ,python-pytest)))
11663 (home-page "https://github.com/newville/asteval")
11664 (synopsis "Minimalistic evaluator of Python expressions")
11665 (description
11666 "This package provides a minimalistic evaluator of Python expression
11667 using the @code{ast} module")
11668 (license license:expat)))
11669
11670 (define-public python-lmfit
11671 (package
11672 (name "python-lmfit")
11673 (version "1.0.2")
11674 (source
11675 (origin
11676 (method url-fetch)
11677 (uri (pypi-uri "lmfit" version))
11678 (sha256
11679 (base32
11680 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
11681 (build-system python-build-system)
11682 (propagated-inputs
11683 `(("python-asteval" ,python-asteval)
11684 ("python-numpy" ,python-numpy)
11685 ("python-scipy" ,python-scipy)
11686 ("python-uncertainties" ,python-uncertainties)))
11687 (native-inputs
11688 `(("python-pytest" ,python-pytest)))
11689 (home-page "https://lmfit.github.io/lmfit-py/")
11690 (synopsis "Least-Squares minimization with bounds and constraints")
11691 (description
11692 "Lmfit provides a high-level interface to non-linear optimization and
11693 curve fitting problems for Python. It builds on and extends many of the
11694 optimization methods of @code{scipy.optimize}. Initially inspired by (and
11695 named for) extending the Levenberg-Marquardt method from
11696 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
11697 enhancements to optimization and data fitting problems.")
11698 (license license:bsd-3)))
11699
11700 (define-public python-boto
11701 (package
11702 (name "python-boto")
11703 (version "2.49.0")
11704 (source (origin
11705 (method url-fetch)
11706 (uri (pypi-uri "boto" version))
11707 (sha256
11708 (base32
11709 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
11710 (build-system python-build-system)
11711 (arguments
11712 ;; XXX: This package is unmaintained and has problems with newer versions
11713 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
11714 ;; subset of this library, so keep it around for now, but disable tests.
11715 '(#:tests? #f))
11716 (propagated-inputs
11717 `(("python-paramiko" ,python-paramiko)
11718 ("python-requests" ,python-requests)))
11719 (home-page "https://github.com/boto/boto")
11720 (synopsis "Python interfaces for Amazon Web Services")
11721 (description
11722 "This package provides various facilities for interacting with Amazon
11723 Web Services through Python.
11724
11725 This software is unmaintained, and new projects should use @code{boto3} instead.")
11726 (license license:expat)))
11727
11728 (define-public python-botocore
11729 ;; Note: When updating botocore, also make sure that boto3 and awscli
11730 ;; are compatible.
11731 (package
11732 (name "python-botocore")
11733 (version "1.19.22")
11734 (source
11735 (origin
11736 (method url-fetch)
11737 (uri (pypi-uri "botocore" version))
11738 (sha256
11739 (base32
11740 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
11741 (build-system python-build-system)
11742 (arguments
11743 ;; FIXME: Many tests are failing.
11744 '(#:tests? #f))
11745 (propagated-inputs
11746 `(("python-dateutil" ,python-dateutil)
11747 ("python-jmespath" ,python-jmespath)
11748 ("python-urllib3" ,python-urllib3)))
11749 (home-page "https://github.com/boto/botocore")
11750 (synopsis "Low-level interface to AWS")
11751 (description "Botocore is a Python library that provides a low-level
11752 interface to the Amazon Web Services (AWS) API.")
11753 (license license:asl2.0)))
11754
11755 (define-public python2-botocore
11756 (package-with-python2 python-botocore))
11757
11758 (define-public python-boto3
11759 (package
11760 (name "python-boto3")
11761 (version "1.16.22")
11762 (home-page "https://github.com/boto/boto3")
11763 (source (origin
11764 (method git-fetch)
11765 (uri (git-reference (url home-page) (commit version)))
11766 (file-name (git-file-name name version))
11767 (sha256
11768 (base32
11769 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
11770 (arguments
11771 `(#:phases
11772 (modify-phases %standard-phases
11773 (add-after 'unpack 'delete-network-tests
11774 ;; Deleting integration tests because they are trying to connect to AWS.
11775 (lambda _
11776 (delete-file-recursively "tests/integration")
11777 #t)))))
11778 (build-system python-build-system)
11779 (native-inputs
11780 `(("python-nose" ,python-nose)
11781 ("python-mock" ,python-mock)))
11782 (propagated-inputs
11783 `(("python-botocore" ,python-botocore)
11784 ("python-jmespath" ,python-jmespath)
11785 ("python-s3transfer" ,python-s3transfer)))
11786 (synopsis "AWS SDK for Python")
11787 (description
11788 "Boto3 is a Python library for writing programs that interact with
11789 @acronym{AWS,Amazon Web Services}.")
11790 (license license:asl2.0)))
11791
11792 (define-public python-pyfiglet
11793 (package
11794 (name "python-pyfiglet")
11795 (version "0.8.post1")
11796 (source
11797 (origin
11798 (method url-fetch)
11799 (uri (pypi-uri "pyfiglet" version))
11800 (sha256
11801 (base32
11802 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11803 (build-system python-build-system)
11804 (home-page "https://github.com/pwaller/pyfiglet")
11805 (synopsis "Draw ASCII art big letters in Python")
11806 (description "This module lets you draw large letter from ordinary characters
11807 in pure Python.")
11808 (license license:expat)))
11809
11810 (define-public python-xdo
11811 (package
11812 (name "python-xdo")
11813 (version "0.3")
11814 (source (origin
11815 (method url-fetch)
11816 (uri (string-append
11817 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11818 "python-xdo_" version ".orig.tar.gz"))
11819 (sha256
11820 (base32
11821 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11822 (build-system python-build-system)
11823 (arguments
11824 '(#:phases
11825 (modify-phases %standard-phases
11826 (add-before 'install 'patch-libxdo-path
11827 ;; Hardcode the path of dynamically loaded libxdo library.
11828 (lambda* (#:key inputs #:allow-other-keys)
11829 (let ((libxdo (string-append
11830 (assoc-ref inputs "xdotool")
11831 "/lib/libxdo.so")))
11832 (substitute* "xdo/_xdo.py"
11833 (("find_library\\(\"xdo\"\\)")
11834 (simple-format #f "\"~a\"" libxdo)))
11835 #t))))
11836 #:tests? #f)) ; no tests provided
11837 (propagated-inputs
11838 `(("python-six" ,python-six)))
11839 (inputs
11840 `(("xdotool" ,xdotool)
11841 ("libX11" ,libx11)))
11842 (home-page "https://tracker.debian.org/pkg/python-xdo")
11843 (synopsis "Python library for simulating X11 keyboard/mouse input")
11844 (description "Provides bindings to libxdo for manipulating X11 via simulated
11845 input. (Note that this is mostly a legacy library; you may wish to look at
11846 python-xdo for newer bindings.)")
11847 (license license:bsd-3)))
11848
11849 (define-public python2-xdo
11850 (package-with-python2 python-xdo))
11851
11852 (define-public python-mako
11853 (package
11854 (name "python-mako")
11855 (version "1.1.3")
11856 (source
11857 (origin
11858 (method url-fetch)
11859 (uri (pypi-uri "Mako" version))
11860 (sha256
11861 (base32
11862 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11863 (build-system python-build-system)
11864 (arguments
11865 `(#:phases (modify-phases %standard-phases
11866 (replace 'check
11867 (lambda* (#:key tests? #:allow-other-keys)
11868 (if tests?
11869 (invoke "nosetests" "-v")
11870 (format #t "test suite not run~%"))
11871 #t)))))
11872 (propagated-inputs
11873 `(("python-markupsafe" ,python-markupsafe)))
11874 (native-inputs
11875 `(("python-mock" ,python-mock)
11876 ("python-nose" ,python-nose)))
11877 (home-page "https://www.makotemplates.org/")
11878 (synopsis "Templating language for Python")
11879 (description "Mako is a templating language for Python that compiles
11880 templates into Python modules.")
11881 (license license:expat)))
11882
11883 (define-public python2-mako
11884 (package-with-python2 python-mako))
11885
11886 (define-public python-waitress
11887 (package
11888 (name "python-waitress")
11889 (version "1.1.0")
11890 (source
11891 (origin
11892 (method url-fetch)
11893 (uri (pypi-uri "waitress" version))
11894 (patches (search-patches "python-waitress-fix-tests.patch"))
11895 (sha256
11896 (base32
11897 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11898 (build-system python-build-system)
11899 (home-page "https://github.com/Pylons/waitress")
11900 (synopsis "Waitress WSGI server")
11901 (description "Waitress is meant to be a production-quality pure-Python WSGI
11902 server with very acceptable performance.")
11903 (license license:zpl2.1)))
11904
11905 (define-public python2-waitress
11906 (package-with-python2 python-waitress))
11907
11908 (define-public python-whichcraft
11909 (package
11910 (name "python-whichcraft")
11911 (version "0.6.1")
11912 (source
11913 (origin
11914 (method url-fetch)
11915 (uri (pypi-uri "whichcraft" version))
11916 (sha256
11917 (base32
11918 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11919 (build-system python-build-system)
11920 (native-inputs
11921 `(("python-pytest" ,python-pytest)))
11922 (home-page "https://github.com/pydanny/whichcraft")
11923 (synopsis "Cross-platform cross-python shutil.which functionality")
11924 (description
11925 "This package provides a shim of the shutil.which function that's
11926 designed to work across multiple versions of Python.")
11927 (license license:bsd-3)))
11928
11929 (define-public python-cookiecutter
11930 (package
11931 (name "python-cookiecutter")
11932 (version "1.7.2")
11933 (source
11934 (origin
11935 (method url-fetch)
11936 (uri (pypi-uri "cookiecutter" version))
11937 (sha256
11938 (base32
11939 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11940 (build-system python-build-system)
11941 (native-inputs
11942 `(("python-freezegun" ,python-freezegun)
11943 ("python-pytest" ,python-pytest)
11944 ("python-pytest-catchlog" ,python-pytest-catchlog)
11945 ("python-pytest-cov" ,python-pytest-cov)
11946 ("python-pytest-mock" ,python-pytest-mock)))
11947 (propagated-inputs
11948 `(("python-binaryornot" ,python-binaryornot)
11949 ("python-click" ,python-click)
11950 ("python-future" ,python-future)
11951 ("python-jinja2" ,python-jinja2)
11952 ("python-jinja2-time" ,python-jinja2-time)
11953 ("python-poyo" ,python-poyo)
11954 ("python-requests" ,python-requests)
11955 ("python-slugify" ,python-slugify)
11956 ("python-text-unidecode" ,python-text-unidecode)
11957 ("python-whichcraft" ,python-whichcraft)))
11958 (home-page "https://github.com/cookiecutter/cookiecutter")
11959 (synopsis
11960 "Command-line utility that creates projects from project templates")
11961 (description
11962 "This package provides a command-line utility that creates projects from
11963 project templates, e.g. creating a Python package project from a Python package
11964 project template.")
11965 (license license:bsd-3)))
11966
11967 (define-public python-pyquery
11968 (package
11969 (name "python-pyquery")
11970 (version "1.2.17")
11971 (source
11972 (origin
11973 (method url-fetch)
11974 (uri (pypi-uri "pyquery" version))
11975 (sha256
11976 (base32
11977 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11978 (build-system python-build-system)
11979 (native-inputs
11980 `(("python-webob" ,python-webob)
11981 ("python-webtest" ,python-webtest)))
11982 (propagated-inputs
11983 `(("python-lxml" ,python-lxml)
11984 ("python-cssselect" ,python-cssselect)))
11985 (home-page "https://github.com/gawel/pyquery")
11986 (synopsis "Make jQuery-like queries on xml documents")
11987 (description "pyquery allows you to make jQuery queries on xml documents.
11988 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11989 fast xml and html manipulation.")
11990 (license license:bsd-3)))
11991
11992 (define-public python-anyjson
11993 (package
11994 (name "python-anyjson")
11995 (version "0.3.3")
11996 (source
11997 (origin
11998 (method url-fetch)
11999 (uri (pypi-uri "anyjson" version))
12000 (sha256
12001 (base32
12002 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
12003 (build-system python-build-system)
12004 (arguments
12005 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
12006 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
12007 ;; whatever) so this transformation needs to be done before the tests
12008 ;; can be run. Maybe we could add a build step to transform beforehand
12009 ;; but it could be annoying/difficult.
12010 ;; We can enable tests for the Python 2 version, though, and do below.
12011 #:tests? #f))
12012 (home-page "https://bitbucket.org/runeh/anyjson/")
12013 (synopsis
12014 "Wraps best available JSON implementation in a common interface")
12015 (description
12016 "Anyjson loads whichever is the fastest JSON module installed
12017 and provides a uniform API regardless of which JSON implementation is used.")
12018 (license license:bsd-3)
12019 (properties `((python2-variant . ,(delay python2-anyjson))))))
12020
12021 (define-public python2-anyjson
12022 (let ((anyjson (package-with-python2
12023 (strip-python2-variant python-anyjson))))
12024 (package/inherit anyjson
12025 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
12026 #:tests? #t
12027 ,@(package-arguments anyjson)))
12028 (native-inputs `(("python2-nose" ,python2-nose))))))
12029
12030 (define-public python-amqp
12031 (package
12032 (name "python-amqp")
12033 (version "2.3.2")
12034 (source
12035 (origin
12036 (method url-fetch)
12037 (uri (pypi-uri "amqp" version))
12038 (sha256
12039 (base32
12040 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
12041 (build-system python-build-system)
12042 (native-inputs
12043 `(("python-case" ,python-case)
12044 ("python-pytest-sugar" ,python-pytest-sugar)
12045 ("python-mock" ,python-mock)))
12046 (propagated-inputs
12047 `(("python-vine" ,python-vine)))
12048 (home-page "https://github.com/celery/py-amqp")
12049 (synopsis
12050 "Low-level AMQP client for Python (fork of amqplib)")
12051 (description
12052 "This is a fork of amqplib which was originally written by Barry Pederson.
12053 It is maintained by the Celery project, and used by kombu as a pure python
12054 alternative when librabbitmq is not available.")
12055 (license license:lgpl2.1+)
12056 (properties `((python2-variant . ,(delay python2-amqp))))))
12057
12058 (define-public python2-amqp
12059 (let ((amqp (package-with-python2
12060 (strip-python2-variant python-amqp))))
12061 (package/inherit amqp
12062 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
12063 ;; unmaintained. Weirdly, does not do this on the python 3
12064 ;; version?
12065 #:tests? #f
12066 ,@(package-arguments amqp))))))
12067
12068 (define-public python-txamqp
12069 (package
12070 (name "python-txamqp")
12071 (version "0.8.2")
12072 (source
12073 (origin
12074 (method url-fetch)
12075 (uri (pypi-uri "txAMQP" version))
12076 (sha256
12077 (base32
12078 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
12079 (build-system python-build-system)
12080 (propagated-inputs
12081 `(("python-six" ,python-six)
12082 ("python-twisted" ,python-twisted)))
12083 (home-page "https://github.com/txamqp/txamqp")
12084 (synopsis "Communicate with AMQP peers and brokers using Twisted")
12085 (description
12086 "This package provides a Python library for communicating with AMQP peers
12087 and brokers using the asynchronous networking framework Twisted. It contains
12088 all the necessary code to connect, send and receive messages to/from an
12089 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
12090 also includes support for using Thrift RPC over AMQP in Twisted
12091 applications.")
12092 (license license:asl2.0)))
12093
12094 (define-public python2-txamqp
12095 (package-with-python2 python-txamqp))
12096
12097 (define-public python-kombu
12098 (package
12099 (name "python-kombu")
12100 (version "4.2.2")
12101 (source
12102 (origin
12103 (method url-fetch)
12104 (uri (pypi-uri "kombu" version))
12105 (sha256
12106 (base32
12107 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
12108 (build-system python-build-system)
12109 (native-inputs
12110 `(("python-mock" ,python-mock)
12111 ("python-case" ,python-case)
12112 ("python-pyro4" ,python-pyro4)
12113 ("python-pytest-sugar" ,python-pytest-sugar)
12114 ("python-pytz" ,python-pytz)))
12115 (propagated-inputs
12116 `(("python-anyjson" ,python-anyjson)
12117 ("python-amqp" ,python-amqp)
12118 ("python-redis" ,python-redis)))
12119 (home-page "https://kombu.readthedocs.io")
12120 (synopsis "Message passing library for Python")
12121 (description "The aim of Kombu is to make messaging in Python as easy as
12122 possible by providing an idiomatic high-level interface for the AMQ protocol,
12123 and also provide proven and tested solutions to common messaging problems.
12124 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
12125 message orientation, queuing, routing, reliability and security, for which the
12126 RabbitMQ messaging server is the most popular implementation.")
12127 (license license:bsd-3)
12128 (properties `((python2-variant . ,(delay python2-kombu))))))
12129
12130 (define-public python2-kombu
12131 (let ((kombu (package-with-python2
12132 (strip-python2-variant python-kombu))))
12133 (package/inherit kombu
12134 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
12135 ;; It works fine on the python3 variant.
12136 #:tests? #f
12137 ,@(package-arguments kombu)))
12138 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12139 ,@(package-native-inputs kombu))))))
12140
12141 (define-public python-billiard
12142 (package
12143 (name "python-billiard")
12144 (version "3.5.0.5")
12145 (source
12146 (origin
12147 (method url-fetch)
12148 (uri (pypi-uri "billiard" version))
12149 (sha256
12150 (base32
12151 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
12152 (build-system python-build-system)
12153 (native-inputs
12154 `(("python-case" ,python-case)
12155 ("python-pytest" ,python-pytest)))
12156 (home-page "https://github.com/celery/billiard")
12157 (synopsis
12158 "Python multiprocessing fork with improvements and bugfixes")
12159 (description
12160 "Billiard is a fork of the Python 2.7 multiprocessing package. The
12161 multiprocessing package itself is a renamed and updated version of R Oudkerk's
12162 pyprocessing package. This standalone variant is intended to be compatible with
12163 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
12164 (license license:bsd-3)
12165 (properties `((python2-variant . ,(delay python2-billiard))))))
12166
12167 (define-public python2-billiard
12168 (let ((billiard (package-with-python2
12169 (strip-python2-variant python-billiard))))
12170 (package/inherit billiard
12171 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12172 ("python2-mock" ,python2-mock)
12173 ,@(package-native-inputs billiard))))))
12174
12175 (define-public python-celery
12176 (package
12177 (name "python-celery")
12178 (version "4.2.1")
12179 (source
12180 (origin
12181 (method url-fetch)
12182 (uri (pypi-uri "celery" version))
12183 (sha256
12184 (base32
12185 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
12186 (build-system python-build-system)
12187 (arguments
12188 '(;; TODO The tests fail with Python 3.7
12189 ;; https://github.com/celery/celery/issues/4849
12190 #:tests? #f
12191 #:phases
12192 (modify-phases %standard-phases
12193 (add-after 'unpack 'patch-requirements
12194 (lambda _
12195 (substitute* "requirements/test.txt"
12196 (("pytest>=3\\.0,<3\\.3")
12197 "pytest>=3.0"))
12198 #t)))))
12199 (native-inputs
12200 `(("python-case" ,python-case)
12201 ("python-pytest" ,python-pytest)))
12202 (propagated-inputs
12203 `(("python-pytz" ,python-pytz)
12204 ("python-billiard" ,python-billiard)
12205 ("python-kombu" ,python-kombu)))
12206 (home-page "https://celeryproject.org")
12207 (synopsis "Distributed Task Queue")
12208 (description "Celery is an asynchronous task queue/job queue based on
12209 distributed message passing. It is focused on real-time operation, but
12210 supports scheduling as well. The execution units, called tasks, are executed
12211 concurrently on a single or more worker servers using multiprocessing,
12212 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
12213 synchronously (wait until ready).")
12214 (license license:bsd-3)
12215 (properties `((python2-variant . ,(delay python2-celery))))))
12216
12217 (define-public python2-celery
12218 (let ((celery (package-with-python2
12219 (strip-python2-variant python-celery))))
12220 (package/inherit celery
12221 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12222 ("python2-mock" ,python2-mock)
12223 ,@(package-native-inputs celery))))))
12224
12225 (define-public python-translitcodec
12226 (package
12227 (name "python-translitcodec")
12228 (version "0.4.0")
12229 (source
12230 (origin
12231 (method url-fetch)
12232 (uri (pypi-uri "translitcodec" version))
12233 (sha256
12234 (base32
12235 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
12236 (build-system python-build-system)
12237 (arguments
12238 `(#:tests? #f)) ; no tests provided
12239 (home-page
12240 "https://github.com/claudep/translitcodec")
12241 (synopsis
12242 "Unicode to 8-bit charset transliteration codec")
12243 (description
12244 "This package contains codecs for transliterating ISO 10646 texts into
12245 best-effort representations using smaller coded character sets (ASCII,
12246 ISO 8859, etc.).")
12247 (license license:expat)))
12248
12249 (define-public python2-translitcodec
12250 (package-with-python2 python-translitcodec))
12251
12252 (define-public python-editor
12253 (package
12254 (name "python-editor")
12255 (version "1.0.4")
12256 (source
12257 (origin
12258 (method url-fetch)
12259 (uri (pypi-uri "python-editor" version))
12260 (sha256
12261 (base32
12262 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
12263 (build-system python-build-system)
12264 (arguments
12265 '(#:tests? #f)) ;XXX: needs a TTY and an editor
12266 (home-page "https://github.com/fmoo/python-editor")
12267 (synopsis "Programmatically open an editor, capture the result")
12268 (description
12269 "python-editor is a library that provides the editor module for
12270 programmatically interfacing with your system's $EDITOR.")
12271 (license license:asl2.0)))
12272
12273 (define-public python2-editor
12274 (package-with-python2 python-editor))
12275
12276 (define-public python-multiprocessing-logging
12277 (package
12278 (name "python-multiprocessing-logging")
12279 (version "0.3.1")
12280 (home-page "https://github.com/jruere/multiprocessing-logging")
12281 (source (origin
12282 (method git-fetch)
12283 (uri (git-reference
12284 (url home-page)
12285 (commit (string-append "v" version))))
12286 (file-name (git-file-name name version))
12287 (sha256
12288 (base32
12289 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
12290 (build-system python-build-system)
12291 (synopsis "Manage logs from multiple processes")
12292 (description
12293 "This Python module implements a multiprocessing-aware @code{Handler}
12294 that, when set on the root @code{Logger}, will tunnel log records to the
12295 main process so that they are handled correctly.")
12296 (license license:lgpl3+)))
12297
12298 (define-public python-vobject
12299 (package
12300 (name "python-vobject")
12301 (version "0.9.6.1")
12302 (source (origin
12303 (method url-fetch)
12304 (uri (pypi-uri "vobject" version))
12305 (sha256
12306 (base32
12307 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
12308 (build-system python-build-system)
12309 (arguments
12310 '(;; The test suite relies on some non-portable Windows interfaces.
12311 #:tests? #f))
12312 (propagated-inputs
12313 `(("python-dateutil" ,python-dateutil)
12314 ("python-pyicu" ,python-pyicu)))
12315 (synopsis "Parse and generate vCard and vCalendar files")
12316 (description "Vobject is intended to be a full featured Python package for
12317 parsing and generating vCard and vCalendar files. Currently, iCalendar files
12318 are supported and well tested. vCard 3.0 files are supported, and all data
12319 should be imported, but only a few components are understood in a sophisticated
12320 way.")
12321 (home-page "https://eventable.github.io/vobject/")
12322 (license license:asl2.0)))
12323
12324 (define-public python2-vobject
12325 (package-with-python2 python-vobject))
12326
12327 (define-public python-munkres
12328 (package
12329 (name "python-munkres")
12330 (version "1.0.8")
12331 (source (origin
12332 (method url-fetch)
12333 (uri (pypi-uri "munkres" version))
12334 (sha256
12335 (base32
12336 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
12337 (build-system python-build-system)
12338 (arguments
12339 '(#:tests? #f)) ; no test suite
12340 (home-page "https://software.clapper.org/munkres/")
12341 (synopsis "Implementation of the Munkres algorithm")
12342 (description "The Munkres module provides an implementation of the Munkres
12343 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
12344 useful for solving the Assignment Problem.")
12345 (license license:bsd-3)))
12346
12347 (define-public python2-munkres
12348 (package-with-python2 python-munkres))
12349
12350 (define-public python-whoosh
12351 (package
12352 (name "python-whoosh")
12353 (version "2.7.4")
12354 (source
12355 (origin
12356 (method url-fetch)
12357 (uri (pypi-uri "Whoosh" version))
12358 (sha256
12359 (base32
12360 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
12361 (build-system python-build-system)
12362 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
12363 (native-inputs
12364 `(("python-pytest" ,python-pytest)))
12365 (home-page "https://bitbucket.org/mchaput/whoosh")
12366 (synopsis "Full text indexing, search, and spell checking library")
12367 (description
12368 "Whoosh is a fast, pure-Python full text indexing, search, and spell
12369 checking library.")
12370 (license license:bsd-2)))
12371
12372 (define-public python2-whoosh
12373 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
12374 (package/inherit whoosh
12375 (propagated-inputs
12376 `(("python2-backport-ssl-match-hostname"
12377 ,python2-backport-ssl-match-hostname)
12378 ,@(package-propagated-inputs whoosh))))))
12379
12380 (define-public python-pathlib
12381 (package
12382 (name "python-pathlib")
12383 (version "1.0.1")
12384 (source (origin
12385 (method url-fetch)
12386 (uri (pypi-uri "pathlib" version))
12387 (sha256
12388 (base32
12389 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
12390 (build-system python-build-system)
12391 ;; The tests depend on the internal "test" module, which does not provide
12392 ;; a stable interface.
12393 (arguments `(#:tests? #f))
12394 (home-page "https://pathlib.readthedocs.org/")
12395 (synopsis "Object-oriented file system paths")
12396 (description "Pathlib offers a set of classes to handle file system paths.
12397 It offers the following advantages over using string objects:
12398
12399 @enumerate
12400 @item No more cumbersome use of os and os.path functions. Everything can
12401 be done easily through operators, attribute accesses, and method calls.
12402 @item Embodies the semantics of different path types. For example,
12403 comparing Windows paths ignores casing.
12404 @item Well-defined semantics, eliminating any inconsistencies or
12405 ambiguities (forward vs. backward slashes, etc.).
12406 @end enumerate
12407
12408 Note: In Python 3.4, pathlib is now part of the standard library. For other
12409 Python versions please consider python-pathlib2 instead, which tracks the
12410 standard library module. This module (python-pathlib) isn't maintained
12411 anymore.")
12412 (license license:expat)))
12413
12414 (define-public python2-pathlib
12415 (package-with-python2 python-pathlib))
12416
12417 (define-public python2-pathlib2
12418 (package
12419 (name "python2-pathlib2")
12420 (version "2.3.5")
12421 (source (origin
12422 (method url-fetch)
12423 (uri (pypi-uri "pathlib2" version))
12424 (sha256
12425 (base32
12426 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
12427 (build-system python-build-system)
12428 ;; We only need the the Python 2 variant, since for Python 3 our minimum
12429 ;; version is 3.4 which already includes this package as part of the
12430 ;; standard library.
12431 (arguments
12432 `(#:python ,python-2))
12433 (propagated-inputs
12434 `(("python2-scandir" ,python2-scandir)
12435 ("python2-six" ,python2-six)))
12436 (home-page "https://pypi.org/project/pathlib2/")
12437 (synopsis "Object-oriented file system paths - backport of standard
12438 pathlib module")
12439 (description "The goal of pathlib2 is to provide a backport of standard
12440 pathlib module which tracks the standard library module, so all the newest
12441 features of the standard pathlib can be used also on older Python versions.
12442
12443 Pathlib offers a set of classes to handle file system paths. It offers the
12444 following advantages over using string objects:
12445
12446 @enumerate
12447 @item No more cumbersome use of os and os.path functions. Everything can
12448 be done easily through operators, attribute accesses, and method calls.
12449 @item Embodies the semantics of different path types. For example,
12450 comparing Windows paths ignores casing.
12451 @item Well-defined semantics, eliminating any inconsistencies or
12452 ambiguities (forward vs. backward slashes, etc.).
12453 @end enumerate")
12454 (license license:expat)))
12455
12456 (define-public python2-pathlib2-bootstrap
12457 (hidden-package
12458 (package
12459 (inherit python2-pathlib2)
12460 (name "python2-pathlib2-bootstrap")
12461 (propagated-inputs
12462 `(("python2-scandir" ,python2-scandir)
12463 ("python2-six" ,python2-six-bootstrap))))))
12464
12465 (define-public python-jellyfish
12466 (package
12467 (name "python-jellyfish")
12468 (version "0.5.6")
12469 (source (origin
12470 (method url-fetch)
12471 (uri (pypi-uri "jellyfish" version))
12472 (sha256
12473 (base32
12474 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
12475 (build-system python-build-system)
12476 (native-inputs
12477 `(("python-pytest" ,python-pytest)))
12478 (home-page "https://github.com/jamesturk/jellyfish")
12479 (synopsis "Approximate and phonetic matching of strings")
12480 (description "Jellyfish uses a variety of string comparison and phonetic
12481 encoding algorithms to do fuzzy string matching.")
12482 (license license:bsd-2)
12483 (properties `((python2-variant . ,(delay python2-jellyfish))))))
12484
12485 (define-public python2-jellyfish
12486 (let ((jellyfish (package-with-python2
12487 (strip-python2-variant python-jellyfish))))
12488 (package/inherit jellyfish
12489 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
12490 ,@(package-native-inputs jellyfish))))))
12491
12492 (define-public python2-unicodecsv
12493 (package
12494 (name "python2-unicodecsv")
12495 (version "0.14.1")
12496 (source (origin
12497 (method git-fetch)
12498 ;; The test suite is not included in the PyPi release.
12499 ;; https://github.com/jdunck/python-unicodecsv/issues/19
12500 (uri (git-reference
12501 (url "https://github.com/jdunck/python-unicodecsv")
12502 (commit version)))
12503 (file-name (git-file-name name version))
12504 (sha256
12505 (base32
12506 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
12507 (build-system python-build-system)
12508 (arguments
12509 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
12510 #:python ,python-2))
12511 (native-inputs
12512 `(("python2-unittest2" ,python2-unittest2)))
12513 (home-page "https://github.com/jdunck/python-unicodecsv")
12514 (synopsis "Unicode CSV module for Python 2")
12515 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
12516 module, adding support for Unicode strings.")
12517 (license license:bsd-2)))
12518
12519 (define-public python-pdfminer-six
12520 (package
12521 (name "python-pdfminer-six")
12522 (version "20201018")
12523 ;; There are no tests in the PyPI tarball.
12524 (source
12525 (origin
12526 (method git-fetch)
12527 (uri (git-reference
12528 (url "https://github.com/pdfminer/pdfminer.six")
12529 (commit version)))
12530 (file-name (git-file-name name version))
12531 (sha256
12532 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
12533 (build-system python-build-system)
12534 (arguments
12535 `(#:phases
12536 (modify-phases %standard-phases
12537 ;; Tests write to the source tree.
12538 (add-after 'unpack 'make-git-checkout-writable
12539 (lambda _
12540 (for-each make-file-writable (find-files "."))
12541 #t))
12542 (replace 'check
12543 (lambda _
12544 (invoke "make" "test")))
12545 (add-before 'reset-gzip-timestamps 'make-files-writable
12546 (lambda* (#:key outputs #:allow-other-keys)
12547 (let ((out (assoc-ref outputs "out")))
12548 (for-each make-file-writable
12549 (find-files out "\\.gz$"))
12550 #t))))))
12551 (propagated-inputs
12552 `(("python-chardet" ,python-chardet)
12553 ("python-cryptography" ,python-cryptography)
12554 ("python-sortedcontainers" ,python-sortedcontainers)))
12555 (native-inputs
12556 `(("python-nose" ,python-nose)
12557 ("python-tox" ,python-tox)))
12558 (home-page "https://github.com/pdfminer/pdfminer.six")
12559 (synopsis "PDF parser and analyzer")
12560 (description "@code{pdfminer.six} is a community maintained fork of
12561 the original PDFMiner. It is a tool for extracting information from PDF
12562 documents. It focuses on getting and analyzing text data. Pdfminer.six
12563 extracts the text from a page directly from the sourcecode of the PDF. It
12564 can also be used to get the exact location, font or color of the text.")
12565 (license license:expat)))
12566
12567 (define-public python-rarfile
12568 (package
12569 (name "python-rarfile")
12570 (version "2.8")
12571 (source (origin
12572 (method url-fetch)
12573 (uri (pypi-uri "rarfile" version))
12574 (sha256
12575 (base32
12576 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
12577 (build-system python-build-system)
12578 (arguments
12579 '(#:phases
12580 (modify-phases %standard-phases
12581 (replace 'check
12582 ;; Many tests fail, but the installation proceeds.
12583 (lambda _ (invoke "make" "-C" "test" "test"))))))
12584 (native-inputs
12585 `(("which" ,which))) ; required for tests
12586 (propagated-inputs
12587 `(("libarchive" ,libarchive)))
12588 (home-page "https://github.com/markokr/rarfile")
12589 (synopsis "RAR archive reader for Python")
12590 (description "This is Python module for RAR archive reading. The interface
12591 is made as zipfile like as possible.")
12592 (license license:isc)))
12593
12594 (define-public python2-rarfile
12595 (package-with-python2 python-rarfile))
12596
12597 (define-public python-magic
12598 (package
12599 (name "python-magic")
12600 (version "0.4.15")
12601 (source
12602 (origin
12603 (method url-fetch)
12604 (uri (pypi-uri "python-magic" version))
12605 (sha256
12606 (base32
12607 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
12608 (file-name (string-append name "-" version "-checkout"))))
12609 (build-system python-build-system)
12610 (arguments
12611 ;; The tests are unreliable, so don't run them. The tests fail
12612 ;; under Python3 because they were written for Python2 and
12613 ;; contain import statements that do not work in Python3. One of
12614 ;; the tests fails under Python2 because its assertions are
12615 ;; overly stringent; it relies on comparing output strings which
12616 ;; are brittle and can change depending on the version of
12617 ;; libmagic being used and the system on which the test is
12618 ;; running. In my case, under GuixSD 0.10.0, only one test
12619 ;; failed, and it seems to have failed only because the version
12620 ;; of libmagic that is packaged in Guix outputs a slightly
12621 ;; different (but not wrong) string than the one that the test
12622 ;; expected.
12623 '(#:tests? #f
12624 #:phases (modify-phases %standard-phases
12625 ;; Replace a specific method call with a hard-coded
12626 ;; path to the necessary libmagic.so file in the
12627 ;; store. If we don't do this, then the method call
12628 ;; will fail to find the libmagic.so file, which in
12629 ;; turn will cause any application using
12630 ;; python-magic to fail.
12631 (add-before 'build 'hard-code-path-to-libmagic
12632 (lambda* (#:key inputs #:allow-other-keys)
12633 (let ((file (assoc-ref inputs "file")))
12634 (substitute* "magic.py"
12635 (("ctypes.util.find_library\\('magic'\\)")
12636 (string-append "'" file "/lib/libmagic.so'")))
12637 #t)))
12638 (add-before 'install 'disable-egg-compression
12639 (lambda _
12640 (let ((port (open-file "setup.cfg" "a")))
12641 (display "\n[easy_install]\nzip_ok = 0\n"
12642 port)
12643 (close-port port)
12644 #t))))))
12645 (inputs
12646 ;; python-magic needs to be able to find libmagic.so.
12647 `(("file" ,file)))
12648 (home-page
12649 "https://github.com/ahupp/python-magic")
12650 (synopsis
12651 "File type identification using libmagic")
12652 (description
12653 "This module uses ctypes to access the libmagic file type
12654 identification library. It makes use of the local magic database and
12655 supports both textual and MIME-type output. Note that this module and
12656 the python-file module both provide a \"magic.py\" file; these two
12657 modules, which are different and were developed separately, both serve
12658 the same purpose: to provide Python bindings for libmagic.")
12659 (license license:expat)))
12660
12661 (define-public python2-magic
12662 (package-with-python2 python-magic))
12663
12664 (define-public python2-s3cmd
12665 (package
12666 (name "python2-s3cmd")
12667 (version "1.6.1")
12668 (source
12669 (origin
12670 (method url-fetch)
12671 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12672 "s3cmd-" version ".tar.gz"))
12673 (sha256
12674 (base32
12675 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12676 (build-system python-build-system)
12677 (arguments
12678 ;; s3cmd is written for python2 only and contains no tests.
12679 `(#:python ,python-2
12680 #:tests? #f))
12681 (propagated-inputs
12682 `(("python2-dateutil" ,python2-dateutil)
12683 ;; The python-file package also provides a magic.py module.
12684 ;; This is an unfortunate state of affairs; however, s3cmd
12685 ;; fails to install if it cannot find specifically the
12686 ;; python-magic package. Thus we include it, instead of using
12687 ;; python-file. Ironically, s3cmd sometimes works better
12688 ;; without libmagic bindings at all:
12689 ;; https://github.com/s3tools/s3cmd/issues/198
12690 ("python2-magic" ,python2-magic)))
12691 (home-page "https://s3tools.org/s3cmd")
12692 (synopsis "Command line tool for S3-compatible storage services")
12693 (description
12694 "S3cmd is a command line tool for uploading, retrieving and managing data
12695 in storage services that are compatible with the Amazon Simple Storage
12696 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12697 GnuPG encryption, and more. It also supports management of Amazon's
12698 CloudFront content delivery network.")
12699 (license license:gpl2+)))
12700
12701 (define-public python-pkgconfig
12702 (package
12703 (name "python-pkgconfig")
12704 (version "1.3.1")
12705 (source
12706 (origin
12707 (method url-fetch)
12708 (uri (pypi-uri "pkgconfig" version))
12709 (sha256
12710 (base32
12711 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
12712 (build-system python-build-system)
12713 (native-inputs
12714 `(("python-nose" ,python-nose)))
12715 (inputs
12716 `(("pkg-config" ,pkg-config)))
12717 (arguments
12718 `(#:phases
12719 (modify-phases %standard-phases
12720 (add-before 'build 'patch
12721 ;; Hard-code the path to pkg-config.
12722 (lambda _
12723 (substitute* "pkgconfig/pkgconfig.py"
12724 (("cmd = 'pkg-config")
12725 (string-append "cmd = '" (which "pkg-config"))))
12726 #t))
12727 (replace 'check
12728 (lambda _
12729 (invoke "nosetests" "test.py"))))))
12730 (home-page "https://github.com/matze/pkgconfig")
12731 (synopsis "Python interface for pkg-config")
12732 (description "This module provides a Python interface to pkg-config. It
12733 can be used to find all pkg-config packages, check if a package exists,
12734 check if a package meets certain version requirements, query CFLAGS and
12735 LDFLAGS and parse the output to build extensions with setup.py.")
12736 (license license:expat)))
12737
12738 (define-public python2-pkgconfig
12739 (package-with-python2 python-pkgconfig))
12740
12741 (define-public python-bz2file
12742 (package
12743 (name "python-bz2file")
12744 (version "0.98")
12745 (source
12746 (origin
12747 (method url-fetch)
12748 (uri (pypi-uri "bz2file" version))
12749 (sha256
12750 (base32
12751 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12752 (build-system python-build-system)
12753 (arguments
12754 `(#:tests? #f)) ; Tests use deprecated python modules.
12755 (home-page "https://github.com/nvawda/bz2file")
12756 (synopsis "Read and write bzip2-compressed files")
12757 (description
12758 "Bz2file is a Python library for reading and writing bzip2-compressed
12759 files. It contains a drop-in replacement for the I/O interface in the
12760 standard library's @code{bz2} module, including features from the latest
12761 development version of CPython that are not available in older releases.")
12762 (license license:asl2.0)))
12763
12764 (define-public python2-bz2file
12765 (package-with-python2 python-bz2file))
12766
12767 (define-public python-future
12768 (package
12769 (name "python-future")
12770 (version "0.17.1")
12771 (source
12772 (origin
12773 (method url-fetch)
12774 (uri (pypi-uri "future" version))
12775 (sha256
12776 (base32
12777 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12778 (build-system python-build-system)
12779 ;; Many tests connect to the network or are otherwise flawed.
12780 ;; https://github.com/PythonCharmers/python-future/issues/210
12781 (arguments
12782 `(#:tests? #f))
12783 (home-page "https://python-future.org")
12784 (synopsis "Single-source support for Python 3 and 2")
12785 (description
12786 "@code{python-future} is the missing compatibility layer between Python 2 and
12787 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12788 to support both Python 2 and Python 3 with minimal overhead.")
12789 (license license:expat)))
12790
12791 (define-public python2-future
12792 (package-with-python2 python-future))
12793
12794 (define-public python-cysignals
12795 (package
12796 (name "python-cysignals")
12797 (version "1.9.0")
12798 (source
12799 (origin
12800 (method url-fetch)
12801 (uri (pypi-uri "cysignals" version))
12802 (sha256
12803 (base32
12804 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12805 (build-system python-build-system)
12806 (native-inputs
12807 `(("python-cython" ,python-cython)
12808 ("python-sphinx" ,python-sphinx)))
12809 (inputs
12810 `(("pari-gp" ,pari-gp)))
12811 (arguments
12812 `(#:modules ((guix build python-build-system)
12813 ((guix build gnu-build-system) #:prefix gnu:)
12814 (guix build utils))
12815 ;; FIXME: Tests are executed after installation and currently fail
12816 ;; when not installing into standard locations; the author is working
12817 ;; on a fix.
12818 #:tests? #f
12819 #:phases
12820 (modify-phases %standard-phases
12821 (add-before
12822 'build 'configure
12823 (assoc-ref gnu:%standard-phases 'configure)))))
12824 (home-page
12825 "https://github.com/sagemath/cysignals")
12826 (synopsis
12827 "Handling of interrupts and signals for Cython")
12828 (description
12829 "The cysignals package provides mechanisms to handle interrupts (and
12830 other signals and errors) in Cython code, using two related approaches,
12831 for mixed Cython/Python code or external C libraries and pure Cython code,
12832 respectively.")
12833 (license license:lgpl3+)))
12834
12835 (define-public python2-cysignals
12836 (package-with-python2 python-cysignals))
12837
12838 (define-public python2-shedskin
12839 (package
12840 (name "python2-shedskin")
12841 (version "0.9.4")
12842 (source
12843 (origin
12844 (method url-fetch)
12845 (uri (string-append "https://github.com/shedskin/shedskin/"
12846 "releases/download/v" version
12847 "/shedskin-" version ".tgz"))
12848 (sha256
12849 (base32
12850 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12851 (build-system python-build-system)
12852 (arguments
12853 `(#:python ,python-2
12854 #:phases (modify-phases %standard-phases
12855 (add-after 'unpack 'fix-resulting-include-libs
12856 (lambda* (#:key inputs #:allow-other-keys)
12857 (let ((libgc (assoc-ref inputs "libgc"))
12858 (pcre (assoc-ref inputs "pcre")))
12859 (substitute* "shedskin/makefile.py"
12860 (("variable == 'CCFLAGS':[ ]*")
12861 (string-append "variable == 'CCFLAGS':\n"
12862 " line += ' -I " pcre "/include"
12863 " -I " libgc "/include'"))
12864 (("variable == 'LFLAGS':[ ]*")
12865 (string-append "variable == 'LFLAGS':\n"
12866 " line += ' -L" pcre "/lib"
12867 " -L " libgc "/lib'")))
12868 #t))))))
12869 (inputs `(("pcre" ,pcre)
12870 ("libgc" ,libgc)))
12871 (home-page "https://shedskin.github.io/")
12872 (synopsis "Experimental Python-2 to C++ Compiler")
12873 (description (string-append "This is an experimental compiler for a subset of
12874 Python. It generates C++ code and a Makefile."))
12875 (license (list license:gpl3 license:bsd-3 license:expat))))
12876
12877 (define-public python2-rope
12878 (package
12879 (name "python2-rope")
12880 (version "0.11.0")
12881 (source
12882 (origin
12883 (method url-fetch)
12884 (uri (pypi-uri "rope" version))
12885 (sha256
12886 (base32
12887 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12888 (arguments
12889 ;; Rope has only partial python3 support, see `python-rope'
12890 `(#:python ,python-2))
12891 (build-system python-build-system)
12892 (native-inputs
12893 `(("python2-unittest2" ,python2-unittest2)))
12894 (home-page "https://github.com/python-rope/rope")
12895 (synopsis "Refactoring library for Python")
12896 (description "Rope is a refactoring library for Python. It facilitates
12897 the renaming, moving and extracting of attributes, functions, modules, fields
12898 and parameters in Python 2 source code. These refactorings can also be applied
12899 to occurrences in strings and comments.")
12900 (license license:gpl2)))
12901
12902 (define-public python-rope
12903 (package/inherit python2-rope
12904 (name "python-rope")
12905 (arguments `(#:python ,python-wrapper
12906 ;; XXX: Only partial python3 support, results in some failing
12907 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12908 #:tests? #f))
12909 (properties `((python2-variant . ,(delay python2-rope))))))
12910
12911 (define-public python-py3status
12912 (package
12913 (name "python-py3status")
12914 (version "3.21")
12915 (source
12916 (origin
12917 (method url-fetch)
12918 (uri (pypi-uri "py3status" version))
12919 (sha256
12920 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12921 (build-system python-build-system)
12922 (inputs
12923 `(("file" ,file)))
12924 (arguments
12925 '(#:phases
12926 (modify-phases %standard-phases
12927 ;; 'file' is used for detection of configuration file encoding
12928 ;; let's make link the dependency to particular input
12929 (add-before 'build 'patch-file-path
12930 (lambda* (#:key inputs #:allow-other-keys)
12931 (let ((file-path (assoc-ref inputs "file")))
12932 (substitute* "py3status/parse_config.py"
12933 (("\\[\"file\", \"-b\"")
12934 (string-append "['" file-path "/bin/file', '-b'")))
12935 #t))))
12936 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12937 (home-page "https://github.com/ultrabug/py3status")
12938 (synopsis "Extensible i3status wrapper written in Python")
12939 (description "py3status is an i3status wrapper which extends i3status
12940 functionality in a modular way, allowing you to extend your panel with your
12941 own code, responding to click events and updating clock every second.")
12942 (license license:bsd-3)))
12943
12944 (define-public python2-selectors2
12945 (package
12946 (name "python2-selectors2")
12947 (version "2.0.1")
12948 (source (origin
12949 (method url-fetch)
12950 (uri (pypi-uri "selectors2" version))
12951 (sha256
12952 (base32
12953 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12954 (build-system python-build-system)
12955 (arguments
12956 `(#:python ,python-2))
12957 (native-inputs
12958 `(("python2-mock" ,python2-mock)
12959 ("python2-psutil" ,python2-psutil)))
12960 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12961 (synopsis "Backport of the selectors module from Python 3.5+")
12962 (description
12963 "This package provides a drop-in replacement for the @code{selectors}
12964 module in Python 3.5 and later.")
12965 (license license:expat)))
12966
12967 (define-public python-tblib
12968 (package
12969 (name "python-tblib")
12970 (version "1.6.0")
12971 (source (origin
12972 (method url-fetch)
12973 (uri (pypi-uri "tblib" version))
12974 (sha256
12975 (base32
12976 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12977 (build-system python-build-system)
12978 (arguments
12979 `(#:phases
12980 (modify-phases %standard-phases
12981 (replace 'check
12982 (lambda _
12983 ;; Upstream runs tests after installation and the package itself
12984 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12985 ;; found.
12986 (setenv "PYTHONPATH"
12987 (string-append (getcwd) "/build/lib:"
12988 (getenv "PYTHONPATH")))
12989 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12990 (native-inputs
12991 `(("python-pytest" ,python-pytest)
12992 ("python-six" ,python-six)))
12993 (home-page "https://github.com/ionelmc/python-tblib")
12994 (synopsis "Traceback serialization library")
12995 (description
12996 "Traceback serialization allows you to:
12997
12998 @enumerate
12999 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
13000 different processes. This allows better error handling when running code over
13001 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
13002
13003 @item Parse traceback strings and raise with the parsed tracebacks.
13004 @end enumerate\n")
13005 (license license:bsd-3)))
13006
13007 (define-public python2-tblib
13008 (package-with-python2 python-tblib))
13009
13010 (define-public python-greenlet
13011 (package
13012 (name "python-greenlet")
13013 (version "1.0.0")
13014 (source (origin
13015 (method url-fetch)
13016 (uri (pypi-uri "greenlet" version))
13017 (sha256
13018 (base32
13019 "1y6wbg9yhm9dw6m768n4yslp56h85pnxkk3drz6icn15g6f1d7ki"))))
13020 (build-system python-build-system)
13021 (home-page "https://greenlet.readthedocs.io/")
13022 (synopsis "Lightweight in-process concurrent programming")
13023 (description
13024 "Greenlet package is a spin-off of Stackless, a version of CPython
13025 that supports micro-threads called \"tasklets\". Tasklets run
13026 pseudo-concurrently (typically in a single or a few OS-level threads) and
13027 are synchronized with data exchanges on \"channels\".")
13028 (license (list license:psfl license:expat))))
13029
13030 (define-public python-objgraph
13031 (package
13032 (name "python-objgraph")
13033 (version "3.4.1")
13034 (source
13035 (origin
13036 (method url-fetch)
13037 (uri (pypi-uri "objgraph" version))
13038 (sha256
13039 (base32
13040 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
13041 (build-system python-build-system)
13042 (propagated-inputs
13043 `(("python-graphviz" ,python-graphviz)))
13044 (native-inputs
13045 `(("python-mock" ,python-mock)
13046 ("graphviz" ,graphviz)))
13047 (home-page "https://mg.pov.lt/objgraph/")
13048 (synopsis "Draw Python object reference graphs with graphviz")
13049 (description
13050 "This package provides tools to draw Python object reference graphs with
13051 graphviz.")
13052 (license license:expat)))
13053
13054 (define-public python2-objgraph
13055 (package-with-python2 python-objgraph))
13056
13057 (define-public python-gevent
13058 (package
13059 (name "python-gevent")
13060 (version "21.1.2")
13061 (source (origin
13062 (method url-fetch)
13063 (uri (pypi-uri "gevent" version))
13064 (sha256
13065 (base32
13066 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
13067 (modules '((guix build utils)))
13068 (snippet
13069 '(begin
13070 ;; unbunding libev and c-ares
13071 (delete-file-recursively "deps")))))
13072 (build-system python-build-system)
13073 (arguments
13074 `(#:modules ((ice-9 ftw)
13075 (ice-9 match)
13076 (srfi srfi-26)
13077 (guix build utils)
13078 (guix build python-build-system))
13079 #:phases (modify-phases %standard-phases
13080 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
13081 (lambda _
13082 (substitute* "src/gevent/subprocess.py"
13083 (("/bin/sh") (which "sh")))
13084 (for-each (lambda (file)
13085 (substitute* file
13086 (("/bin/sh") (which "sh"))
13087 (("/bin/true") (which "true"))))
13088 (find-files "src/greentest" "\\.py$"))))
13089 (add-before 'build 'do-not-use-bundled-sources
13090 (lambda _
13091 (setenv "GEVENTSETUP_EMBED" "0")
13092
13093 ;; Prevent building bundled libev.
13094 (substitute* "setup.py"
13095 (("run_make=_BUILDING")
13096 "run_make=False"))))
13097 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
13098 (lambda* (#:key inputs #:allow-other-keys)
13099 (let ((greenlet (string-append
13100 (assoc-ref inputs "python-greenlet")
13101 "/include")))
13102 (match (scandir greenlet
13103 (lambda (item)
13104 (string-prefix? "python" item)))
13105 ((python)
13106 (setenv "C_INCLUDE_PATH"
13107 (string-append greenlet "/" python ":"
13108 (or (getenv "C_INCLUDE_PATH")
13109 ""))))))))
13110 (add-before 'check 'pretend-to-be-CI
13111 (lambda _
13112 ;; A few tests are skipped due to network constraints or
13113 ;; get longer timeouts when running in a CI environment.
13114 ;; Piggy-back on that, as we need the same adjustments.
13115 (setenv "TRAVIS" "1")
13116 (setenv "APPVEYOR" "1")))
13117 (add-before 'check 'adjust-tests
13118 (lambda _
13119 (let ((disabled-tests
13120 '(;; These tests relies on networking which is
13121 ;; not available in the build container.
13122 "test__getaddrinfo_import.py"
13123 "test__server_pywsgi.py"
13124 ;; XXX: These tests borrow functionality from the
13125 ;; Python builtin 'test' module, but it is not
13126 ;; installed with the Guix Python distribution.
13127 "test_smtpd.py"
13128 "test_wsgiref.py"
13129 "test_urllib2.py"
13130 "test_thread.py"
13131 "test_threading.py"
13132 "test__threading_2.py"
13133 ;; These tests rely on KeyboardInterrupts which do not
13134 ;; work inside the build container for some reason
13135 ;; (lack of controlling terminal?).
13136 "test_subprocess.py"
13137 "test__issues461_471.py"
13138 ;; TODO: Patch out the tests that use getprotobyname, etc
13139 ;; instead of disabling all the tests from these files.
13140 "test__resolver_dnspython.py"
13141 "test__doctests.py"
13142 "test__all__.py"
13143 "test___config.py"
13144 "test__execmodules.py")))
13145 (call-with-output-file "skipped_tests.txt"
13146 (lambda (port)
13147 (format port "~a~%"
13148 (string-join disabled-tests "\n")))))))
13149 (replace 'check
13150 (lambda _
13151 ;; Make sure the build directory is on PYTHONPATH.
13152 (setenv "PYTHONPATH"
13153 (string-append
13154 (getenv "PYTHONPATH") ":"
13155 (getcwd) "/build/"
13156 (car (scandir "build" (cut string-prefix? "lib." <>)))))
13157
13158 ;; Use the build daemons configured number of workers.
13159 (setenv "NWORKERS" (number->string (parallel-job-count)))
13160
13161 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
13162 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
13163 (propagated-inputs
13164 `(("python-greenlet" ,python-greenlet)
13165 ("python-objgraph" ,python-objgraph)
13166 ("python-zope.event" ,python-zope-event)
13167 ("python-zope.interface" ,python-zope-interface)))
13168 (native-inputs
13169 `(("python-six" ,python-six)
13170
13171 ;; For tests.
13172 ("python-dnspython" ,python-dnspython)
13173 ("python-psutil" ,python-psutil)))
13174 (inputs
13175 `(("c-ares" ,c-ares)
13176 ("libev" ,libev)))
13177 (home-page "https://www.gevent.org/")
13178 (synopsis "Coroutine-based network library")
13179 (description
13180 "@code{gevent} is a coroutine-based Python networking library that uses
13181 @code{greenlet} to provide a high-level synchronous API on top of the
13182 @code{libev} event loop.")
13183 (license license:expat)))
13184
13185 (define-public python-fastimport
13186 (package
13187 (name "python-fastimport")
13188 (version "0.9.8")
13189 (source
13190 (origin
13191 (method url-fetch)
13192 (uri (pypi-uri "fastimport" version))
13193 (sha256
13194 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
13195 (build-system python-build-system)
13196 (home-page "https://github.com/jelmer/python-fastimport")
13197 (synopsis "VCS fastimport parser and generator in Python")
13198 (description "This package provides a parser for and generator of the Git
13199 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
13200 format.")
13201 (license license:gpl2+)))
13202
13203 (define-public python2-fastimport
13204 (package-with-python2 python-fastimport))
13205
13206 (define-public python-twisted
13207 (package
13208 (name "python-twisted")
13209 (version "19.7.0")
13210 (source (origin
13211 (method url-fetch)
13212 (uri (pypi-uri "Twisted" version ".tar.bz2"))
13213 (sha256
13214 (base32
13215 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
13216 (build-system python-build-system)
13217 (arguments
13218 '(#:tests? #f)) ; FIXME: some tests fail
13219 (propagated-inputs
13220 `(("python-zope-interface" ,python-zope-interface)
13221 ("python-pyhamcrest" ,python-pyhamcrest)
13222 ("python-incremental" ,python-incremental)
13223 ("python-hyperlink" ,python-hyperlink)
13224 ("python-constantly" ,python-constantly)
13225 ("python-automat" ,python-automat)))
13226 (home-page "https://twistedmatrix.com/")
13227 (synopsis "Asynchronous networking framework written in Python")
13228 (description
13229 "Twisted is an extensible framework for Python programming, with special
13230 focus on event-based network programming and multiprotocol integration.")
13231 (license license:expat)))
13232
13233 (define-public python2-twisted
13234 (package-with-python2 python-twisted))
13235
13236 (define-public python-pika
13237 (package
13238 (name "python-pika")
13239 (version "0.12.0")
13240 (source
13241 (origin
13242 (method url-fetch)
13243 (uri (pypi-uri "pika" version))
13244 (sha256
13245 (base32
13246 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
13247 (build-system python-build-system)
13248 (native-inputs
13249 `(("python-pyev" ,python-pyev)
13250 ("python-tornado" ,python-tornado)
13251 ("python-twisted" ,python-twisted)))
13252 (home-page "https://pika.readthedocs.org")
13253 (synopsis "Pure Python AMQP Client Library")
13254 (description
13255 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
13256 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
13257 network support library.")
13258 (license license:bsd-3)))
13259
13260 (define-public python2-pika
13261 (package-with-python2 python-pika))
13262
13263 (define-public python-ply
13264 (package
13265 (name "python-ply")
13266 (version "3.11")
13267 (source
13268 (origin
13269 (method url-fetch)
13270 (uri (pypi-uri "ply" version))
13271 (sha256
13272 (base32
13273 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
13274 (build-system python-build-system)
13275 (home-page "http://www.dabeaz.com/ply/")
13276 (synopsis "Python Lex & Yacc")
13277 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
13278 It uses LR parsing and does extensive error checking.")
13279 (license license:bsd-3)))
13280
13281 (define-public python-tabulate
13282 (package
13283 (name "python-tabulate")
13284 (version "0.8.7")
13285 (source (origin
13286 (method url-fetch)
13287 (uri (pypi-uri "tabulate" version))
13288 (sha256
13289 (base32
13290 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
13291 (build-system python-build-system)
13292 (arguments
13293 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
13294 ;; and the latest release is not tagged in the upstream repository.
13295 '(#:tests? #f))
13296 (home-page "https://bitbucket.org/astanin/python-tabulate")
13297 (synopsis "Pretty-print tabular data")
13298 (description
13299 "Tabulate is a library and command-line utility to pretty-print tabular
13300 data in Python.")
13301 (license license:expat)))
13302
13303 (define-public python2-tabulate
13304 (package-with-python2 python-tabulate))
13305
13306 (define-public python-kazoo
13307 (package
13308 (name "python-kazoo")
13309 (version "2.4.0")
13310 (source
13311 (origin
13312 (method url-fetch)
13313 (uri (pypi-uri "kazoo" version))
13314 (sha256
13315 (base32
13316 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
13317 (build-system python-build-system)
13318 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
13319 (propagated-inputs
13320 `(("python-six" ,python-six)))
13321 (home-page "https://kazoo.readthedocs.org")
13322 (synopsis "High-level Zookeeper client library")
13323 (description
13324 "Kazoo is a Python client library for the Apache Zookeeper distributed
13325 application service. It is designed to be easy to use and to avoid common
13326 programming errors.")
13327 (license license:asl2.0)))
13328
13329 (define-public python2-kazoo
13330 (package-with-python2 python-kazoo))
13331
13332 (define-public python-pykafka
13333 (package
13334 (name "python-pykafka")
13335 (version "2.4.0")
13336 (source (origin
13337 (method url-fetch)
13338 (uri (pypi-uri "pykafka" version))
13339 (sha256
13340 (base32
13341 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
13342 (build-system python-build-system)
13343 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
13344 (propagated-inputs
13345 `(("python-gevent" ,python-gevent)
13346 ("python-kazoo" ,python-kazoo)
13347 ("python-tabulate" ,python-tabulate)))
13348 (inputs
13349 `(("librdkafka" ,librdkafka)))
13350 (home-page "https://pykafka.readthedocs.io/")
13351 (synopsis "Apache Kafka client for Python")
13352 (description
13353 "PyKafka is a client for the Apache Kafka distributed messaging system.
13354 It includes Python implementations of Kafka producers and consumers, which
13355 are optionally backed by a C extension built on librdkafka.")
13356 (license license:asl2.0)))
13357
13358 (define-public python-wcwidth
13359 (package
13360 (name "python-wcwidth")
13361 (version "0.1.8")
13362 (source (origin
13363 (method url-fetch)
13364 (uri (pypi-uri "wcwidth" version))
13365 (sha256
13366 (base32
13367 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
13368 (build-system python-build-system)
13369 (home-page "https://github.com/jquast/wcwidth")
13370 (synopsis "Measure number of terminal column cells of wide-character codes")
13371 (description "Wcwidth measures the number of terminal column cells of
13372 wide-character codes. It is useful for those implementing a terminal emulator,
13373 or programs that carefully produce output to be interpreted by one. It is a
13374 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
13375 specified in POSIX.1-2001 and POSIX.1-2008.")
13376 (license license:expat)))
13377
13378 (define-public python2-wcwidth
13379 (package-with-python2 python-wcwidth))
13380
13381 (define-public python2-jsonrpclib
13382 (package
13383 (name "python2-jsonrpclib")
13384 (version "0.1.7")
13385 (source (origin
13386 (method url-fetch)
13387 (uri (pypi-uri "jsonrpclib" version))
13388 (sha256
13389 (base32
13390 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
13391 (build-system python-build-system)
13392 (arguments
13393 `(#:tests? #f
13394 #:python ,python-2))
13395 (home-page "https://github.com/joshmarshall/jsonrpclib/")
13396 (synopsis "Implementation of JSON-RPC specification for Python")
13397 (description
13398 "This library is an implementation of the JSON-RPC specification.
13399 It supports both the original 1.0 specification, as well as the
13400 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
13401 etc.")
13402 (license license:asl2.0)))
13403
13404 (define-public python-chai
13405 (package
13406 (name "python-chai")
13407 (version "1.1.2")
13408 (source (origin
13409 (method url-fetch)
13410 (uri (pypi-uri "chai" version))
13411 (sha256
13412 (base32
13413 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
13414 (build-system python-build-system)
13415 (home-page "https://github.com/agoragames/chai")
13416 (synopsis "Mocking framework for Python")
13417 (description
13418 "Chai provides an api for mocking, stubbing and spying your python
13419 objects, patterned after the Mocha library for Ruby.")
13420 (license license:bsd-3)))
13421
13422 (define-public python2-chai
13423 (package-with-python2 python-chai))
13424
13425 (define-public python-inflection
13426 (package
13427 (name "python-inflection")
13428 (version "0.3.1")
13429 (source
13430 (origin (method url-fetch)
13431 (uri (pypi-uri "inflection" version))
13432 (sha256
13433 (base32
13434 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
13435 (build-system python-build-system)
13436 (native-inputs
13437 `(("python-pytest" ,python-pytest)))
13438 (home-page "https://github.com/jpvanhal/inflection")
13439 (synopsis "Python string transformation library")
13440 (description
13441 "Inflection is a string transformation library. It singularizes
13442 and pluralizes English words, and transforms strings from CamelCase to
13443 underscored string.")
13444 (license license:expat)))
13445
13446 (define-public python2-inflection
13447 (package-with-python2 python-inflection))
13448
13449 (define-public python-pylev
13450 (package
13451 (name "python-pylev")
13452 (version "1.3.0")
13453 (source (origin
13454 (method url-fetch)
13455 (uri (pypi-uri "pylev" version))
13456 (sha256
13457 (base32
13458 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
13459 (build-system python-build-system)
13460 (home-page "https://github.com/toastdriven/pylev")
13461 (synopsis "Levenshtein distance implementation in Python")
13462 (description "Pure Python Levenshtein implementation, based off the
13463 Wikipedia code samples at
13464 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
13465 (license license:bsd-3)))
13466
13467 (define-public python2-pylev
13468 (package-with-python2 python-pylev))
13469
13470 (define-public python-cleo
13471 (package
13472 (name "python-cleo")
13473 (version "0.8.1")
13474 (source (origin
13475 (method url-fetch)
13476 (uri (pypi-uri "cleo" version))
13477 (sha256
13478 (base32
13479 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
13480 (build-system python-build-system)
13481 (native-inputs
13482 `( ;; For testing
13483 ("python-mock" ,python-mock)
13484 ("python-pytest-mock" ,python-pytest-mock)
13485 ("python-pytest" ,python-pytest)))
13486 (propagated-inputs
13487 `(("python-backpack" ,python-backpack)
13488 ("python-clikit" ,python-clikit)
13489 ("python-pastel" ,python-pastel)
13490 ("python-pylev" ,python-pylev)))
13491 (home-page "https://github.com/sdispater/cleo")
13492 (synopsis "Command-line arguments library for Python")
13493 (description
13494 "Cleo allows you to create command-line commands with signature in
13495 docstring and colored output.")
13496 (license license:expat)))
13497
13498 (define-public python2-cleo
13499 (package-with-python2 python-cleo))
13500
13501 (define-public python-tomlkit
13502 (package
13503 (name "python-tomlkit")
13504 (version "0.7.0")
13505 (source
13506 (origin
13507 (method url-fetch)
13508 (uri (pypi-uri "tomlkit" version))
13509 (sha256
13510 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
13511 (build-system python-build-system)
13512 (native-inputs
13513 `(("python-pytest" ,python-pytest)
13514 ("python-pyyaml" ,python-pyyaml)))
13515 (home-page "https://github.com/sdispater/tomlkit")
13516 (synopsis "Style-preserving TOML library")
13517 (description
13518 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
13519 preserves all comments, indentations, whitespace and internal element ordering,
13520 and makes them accessible and editable via an intuitive API. It can also
13521 create new TOML documents from scratch using the provided helpers. Part of the
13522 implementation has been adapted, improved, and fixed from Molten.")
13523 (license license:expat)))
13524
13525 (define-public python-shellingham
13526 (package
13527 (name "python-shellingham")
13528 (version "1.3.2")
13529 (source
13530 (origin
13531 (method url-fetch)
13532 (uri (pypi-uri "shellingham" version))
13533 (sha256
13534 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
13535 (build-system python-build-system)
13536 (arguments
13537 `(#:phases
13538 (modify-phases %standard-phases
13539 (add-after 'unpack 'restore-setup.py
13540 ;; setup.py will return in the next release.
13541 ;; <https://github.com/sarugaku/shellingham/issues/33>
13542 (lambda _
13543 (with-output-to-file "setup.py"
13544 (lambda _
13545 (display "from setuptools import setup\nsetup()\n")))
13546 #t)))))
13547 (home-page "https://github.com/sarugaku/shellingham")
13548 (synopsis "Tool to detect surrounding shell")
13549 (description
13550 "Shellingham detects what shell the current Python executable is
13551 running in.")
13552 (license license:isc)))
13553
13554 (define-public python-memcached
13555 (package
13556 (name "python-memcached")
13557 (version "1.59")
13558 (source
13559 (origin
13560 (method url-fetch)
13561 (uri (pypi-uri "python-memcached" version))
13562 (sha256
13563 (base32
13564 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13565 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13566 (build-system python-build-system)
13567 (propagated-inputs `(("python-six" ,python-six)))
13568 (home-page
13569 "https://github.com/linsomniac/python-memcached")
13570 (synopsis "Pure python memcached client")
13571 (description
13572 "This software is a pure Python interface to the memcached memory cache
13573 daemon. It is the client side software which allows storing values in one or
13574 more, possibly remote, memcached servers.")
13575 (license license:psfl)))
13576
13577 (define-public python-clikit
13578 (package
13579 (name "python-clikit")
13580 (version "0.6.2")
13581 (source
13582 (origin
13583 (method url-fetch)
13584 (uri (pypi-uri "clikit" version))
13585 (sha256
13586 (base32
13587 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13588 (build-system python-build-system)
13589 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13590 (propagated-inputs
13591 `(("python-crashtest" ,python-crashtest)
13592 ("python-pastel" ,python-pastel)
13593 ("python-pylev" ,python-pylev)))
13594 (home-page "https://github.com/sdispater/clikit")
13595 (synopsis "Group of utilities to build command line interfaces")
13596 (description
13597 "CliKit is a group of utilities to build testable command line
13598 interfaces.")
13599 (properties `((python2-variant . ,(delay python2-clikit))))
13600 (license license:expat)))
13601
13602 (define-public python2-clikit
13603 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13604 (package/inherit
13605 base
13606 (propagated-inputs
13607 `(("python-enum34" ,python2-enum34)
13608 ("python-typing" ,python2-typing)
13609 ,@(package-propagated-inputs base))))))
13610
13611 (define-public python-msgpack-python
13612 (package
13613 (name "python-msgpack-python")
13614 (version "0.5.6")
13615 (source
13616 (origin
13617 (method url-fetch)
13618 (uri (pypi-uri "msgpack-python" version))
13619 (sha256
13620 (base32
13621 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13622 (build-system python-build-system)
13623 (home-page "https://msgpack.org/")
13624 (synopsis "Package to deserialize messages in MessagePack binary format")
13625 (description
13626 "MessagePack is an efficient binary serialization format. It lets you
13627 exchange data among multiple languages like JSON. But it's faster and
13628 smaller. Small integers are encoded into a single byte, and typical short
13629 strings require only one extra byte in addition to the strings themselves.")
13630 (license license:asl2.0)))
13631
13632 (define-public python-cachy
13633 (package
13634 (name "python-cachy")
13635 (version "0.3.0")
13636 (source
13637 (origin
13638 (method url-fetch)
13639 (uri (pypi-uri "cachy" version))
13640 (sha256
13641 (base32
13642 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13643 (build-system python-build-system)
13644 (arguments
13645 '(#:phases
13646 (modify-phases %standard-phases
13647 (replace 'check
13648 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13649 "pytest"))))))
13650 (native-inputs
13651 `(("memcached" ,memcached)
13652 ("python-fakeredis" ,python-fakeredis)
13653 ("python-flexmock" ,python-flexmock)
13654 ("python-pifpaf" ,python-pifpaf)
13655 ("python-pytest" ,python-pytest)))
13656 (propagated-inputs
13657 `(("python-memcached" ,python-memcached)
13658 ("python-msgpack-python" ,python-msgpack-python)
13659 ("python-redis" ,python-redis)))
13660 (home-page "https://github.com/sdispater/cachy")
13661 (synopsis "Simple yet effective caching library")
13662 (description
13663 "Cachy provides a simple yet effective caching library. A simple but
13664 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13665 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13666 (license license:expat)))
13667
13668 (define-public poetry
13669 (package
13670 (name "poetry")
13671 (version "1.1.5")
13672 ;; Poetry can only be built from source with Poetry.
13673 (source
13674 (origin
13675 (method url-fetch)
13676 (uri (pypi-uri "poetry" version))
13677 (sha256
13678 (base32
13679 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
13680 (build-system python-build-system)
13681 (arguments
13682 `(#:tests? #f ;; Pypi does not have tests.
13683 #:phases
13684 (modify-phases %standard-phases
13685 (add-before 'build 'patch-setup-py
13686 (lambda _
13687 (substitute* "setup.py"
13688 ;; Allow newer versions of python-keyring.
13689 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
13690 ;; TODO: remove after the next release cycle,
13691 ;; when packaging has been updated.
13692 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
13693 #t)))))
13694 (propagated-inputs
13695 `(("python-cachecontrol" ,python-cachecontrol)
13696 ("python-cachy" ,python-cachy)
13697 ("python-cleo" ,python-cleo)
13698 ("python-clikit" ,python-clikit)
13699 ("python-html5lib" ,python-html5lib)
13700 ("python-keyring" ,python-keyring)
13701 ("python-msgpack-transitional" ,python-msgpack-transitional)
13702 ("python-packaging" ,python-packaging)
13703 ("python-pexpect" ,python-pexpect)
13704 ("python-pip" ,python-pip)
13705 ("python-pkginfo" ,python-pkginfo)
13706 ("python-poetry-core" ,python-poetry-core)
13707 ("python-requests" ,python-requests)
13708 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
13709 ("python-shellingham" ,python-shellingham)
13710 ("python-tomlkit" ,python-tomlkit)
13711 ("python-virtualenv" ,python-virtualenv)))
13712 (home-page "https://python-poetry.org")
13713 (synopsis "Python dependency management and packaging made easy")
13714 (description "Poetry is a tool for dependency management and packaging
13715 in Python. It allows you to declare the libraries your project depends on and
13716 it will manage (install/update) them for you.")
13717 (license license:expat)))
13718
13719 (define-public python-lark-parser
13720 (package
13721 (name "python-lark-parser")
13722 (version "0.9.0")
13723 (source (origin
13724 (method url-fetch)
13725 (uri (pypi-uri "lark-parser" version))
13726 (sha256
13727 (base32
13728 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13729 (build-system python-build-system)
13730 (home-page "https://github.com/lark-parser/lark")
13731 (synopsis "Multi-language parser for Python")
13732 (description
13733 "Lark is a parser built with a focus on ergonomics, performance and
13734 resilience. Lark can parse all context-free languages. That means it is
13735 capable of parsing almost any programming language out there, and to
13736 some degree most natural languages too.")
13737 (license license:expat)))
13738
13739 (define-public python-libcst
13740 (package
13741 (name "python-libcst")
13742 (version "0.3.8")
13743 (source (origin
13744 (method url-fetch)
13745 (uri (pypi-uri "libcst" version))
13746 (sha256
13747 (base32
13748 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13749 (build-system python-build-system)
13750 (arguments
13751 `(#:phases
13752 (modify-phases %standard-phases
13753 (add-after 'unpack 'remove-failing-tests
13754 (lambda _
13755 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13756 (delete-file "libcst/tests/test_fuzz.py")
13757 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13758 (delete-file "libcst/tests/test_pyre_integration.py")
13759 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13760 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13761 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13762 #t))
13763 (add-before 'check 'generate-test-data
13764 (lambda _
13765 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13766 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13767 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13768 (replace 'check
13769 (lambda _
13770 (invoke "python" "-m" "unittest")
13771 #t)))))
13772 (native-inputs
13773 `(("python-black" ,python-black)
13774 ("python-isort" ,python-isort)))
13775 (propagated-inputs
13776 `(("python-typing-extensions" ,python-typing-extensions)
13777 ("python-typing-inspect" ,python-typing-inspect)
13778 ("python-pyyaml" ,python-pyyaml)))
13779 (home-page "https://github.com/Instagram/LibCST")
13780 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13781 (description
13782 "LibCST parses Python source code as a CST tree that keeps all
13783 formatting details (comments, whitespaces, parentheses, etc). It's useful
13784 for building automated refactoring (codemod) applications and linters.
13785 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13786 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13787 naming node types and fields, LibCST creates a lossless CST that looks and
13788 feels like an AST.")
13789 (license (list license:expat
13790 ;; Some files unde libcst/_parser/ are under Python Software
13791 ;; Foundation license (see LICENSE file for details)
13792 license:psfl
13793 ;; libcst/_add_slots.py
13794 license:asl2.0))))
13795
13796 (define-public python-typing-inspect
13797 (package
13798 (name "python-typing-inspect")
13799 (version "0.6.0")
13800 (source (origin
13801 (method url-fetch)
13802 (uri (pypi-uri "typing_inspect" version))
13803 (sha256
13804 (base32
13805 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13806 (build-system python-build-system)
13807 (propagated-inputs
13808 `(("python-mypy-extensions" ,python-mypy-extensions)
13809 ("python-typing-extensions" ,python-typing-extensions)))
13810 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13811 (synopsis "API for inspection of types in the Python @code{typing} module")
13812 (description
13813 "The @code{typing_inspect} module defines experimental API for runtime
13814 inspection of types defined in the Python standard typing module.")
13815 (license license:expat)))
13816
13817 (define-public python-lazy-object-proxy
13818 (package
13819 (name "python-lazy-object-proxy")
13820 (version "1.5.1")
13821 (source (origin
13822 (method url-fetch)
13823 (uri (pypi-uri "lazy-object-proxy" version))
13824 (sha256
13825 (base32
13826 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13827 (native-inputs
13828 `(("python-setuptools-scm" ,python-setuptools-scm)))
13829 (build-system python-build-system)
13830 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13831 (synopsis "Lazy object proxy for python")
13832 (description
13833 "Lazy object proxy is an object that wraps a callable but defers the call
13834 until the object is actually required, and caches the result of said call.")
13835 (license license:bsd-2)))
13836
13837 (define-public python2-lazy-object-proxy
13838 (package-with-python2 python-lazy-object-proxy))
13839
13840 (define-public python-dnspython
13841 (package
13842 (name "python-dnspython")
13843 (version "2.0.0")
13844 (source (origin
13845 (method url-fetch)
13846 (uri (pypi-uri "dnspython" version ".zip"))
13847 (sha256
13848 (base32
13849 "1dyip5ygqqhrgcaiy7qzjpndl9xciip186paxqwkm726fj9z0jh4"))))
13850 (build-system python-build-system)
13851 (native-inputs `(("unzip" ,unzip)))
13852 (arguments '(#:tests? #f)) ; XXX: requires internet access
13853 (home-page "https://www.dnspython.org")
13854 (synopsis "DNS toolkit for Python")
13855 (description
13856 "dnspython is a DNS toolkit for Python. It supports almost all record
13857 types. It can be used for queries, zone transfers, and dynamic updates.
13858 It supports TSIG authenticated messages and EDNS0.")
13859 (license license:expat)))
13860
13861 (define-public python-dnspython-1.16
13862 (package
13863 (inherit python-dnspython)
13864 (version "1.16.0")
13865 (source (origin
13866 (method url-fetch)
13867 (uri (string-append "http://www.dnspython.org/kits/"
13868 version "/dnspython-" version ".tar.gz"))
13869 (sha256
13870 (base32
13871 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13872 (native-inputs '())))
13873
13874 (define-public python2-dnspython-1.16
13875 (package-with-python2 python-dnspython-1.16))
13876
13877 (define-public python-py3dns
13878 (package
13879 (name "python-py3dns")
13880 (version "3.2.1")
13881 (source
13882 (origin
13883 (method url-fetch)
13884 (uri (pypi-uri "py3dns" version))
13885 (sha256
13886 (base32
13887 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13888 (build-system python-build-system)
13889 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13890 ;; removing functionality so we copy from Nix and "just don't build it".
13891 (arguments
13892 `(#:phases
13893 (modify-phases %standard-phases
13894 (add-after 'unpack 'patch-source
13895 (lambda _
13896 (substitute* "setup.py"
13897 (("import DNS") "")
13898 (("DNS.__version__") (string-append "\"" ,version "\"")))
13899 #t)))
13900 #:tests? #f)) ; Also skip the tests.
13901 (home-page "https://launchpad.net/py3dns")
13902 (synopsis "Python 3 DNS library")
13903 (description "This Python 3 module provides a DNS API for looking up DNS
13904 entries from within Python 3 modules and applications. This module is a
13905 simple, lightweight implementation.")
13906 (license license:psfl)))
13907
13908 (define-public python-email-validator
13909 (package
13910 (name "python-email-validator")
13911 (version "1.0.2")
13912 (source
13913 (origin (method url-fetch)
13914 (uri (pypi-uri "email_validator" version))
13915 (sha256
13916 (base32
13917 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13918 (build-system python-build-system)
13919 (arguments
13920 '(#:phases
13921 (modify-phases %standard-phases
13922 (add-before 'build 'use-dnspython
13923 (lambda _
13924 (substitute* "setup.py"
13925 (("dnspython3") "dnspython"))
13926 #t)))))
13927 (propagated-inputs
13928 `(("python-dnspython" ,python-dnspython)
13929 ("python-idna" ,python-idna)))
13930 (home-page "https://github.com/JoshData/python-email-validator")
13931 (synopsis "Email address validation library for Python")
13932 (description
13933 "This library validates email address syntax and deliverability.")
13934 (license license:cc0)))
13935
13936 (define-public python2-email-validator
13937 (package-with-python2 python-email-validator))
13938
13939 (define-public python-ukpostcodeparser
13940 (package
13941 (name "python-ukpostcodeparser")
13942 (version "1.0.3")
13943 (source (origin
13944 (method url-fetch)
13945 (uri (pypi-uri "UkPostcodeParser" version))
13946 (sha256
13947 (base32
13948 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13949 (build-system python-build-system)
13950 (home-page "https://github.com/hamstah/ukpostcodeparser")
13951 (synopsis "UK Postcode parser for Python")
13952 (description
13953 "This library provides the @code{parse_uk_postcode} function for
13954 parsing UK postcodes.")
13955 (license license:expat)))
13956
13957 (define-public python2-ukpostcodeparser
13958 (package-with-python2 python-ukpostcodeparser))
13959
13960 (define-public python-faker
13961 (package
13962 (name "python-faker")
13963 (version "4.0.2")
13964 (source (origin
13965 (method url-fetch)
13966 (uri (pypi-uri "Faker" version))
13967 (sha256
13968 (base32
13969 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13970 (build-system python-build-system)
13971 (arguments
13972 '(#:phases
13973 (modify-phases %standard-phases
13974 (replace 'check
13975 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13976 (native-inputs
13977 `(;; For testing
13978 ("python-freezegun" ,python-freezegun)
13979 ("python-pytest" ,python-pytest)
13980 ("python-random2" ,python-random2)
13981 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13982 ("python-validators" ,python-validators)))
13983 (propagated-inputs
13984 `(("python-dateutil" ,python-dateutil)
13985 ("python-text-unidecode" ,python-text-unidecode)))
13986 (home-page "https://github.com/joke2k/faker")
13987 (synopsis "Python package that generates fake data")
13988 (description
13989 "Faker is a Python package that generates fake data such as names,
13990 addresses, and phone numbers.")
13991 (license license:expat)
13992 (properties `((python2-variant . ,(delay python2-faker))))))
13993
13994 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13995 (define-public python2-faker
13996 (let ((base (package-with-python2 (strip-python2-variant
13997 python-faker))))
13998 (package
13999 (inherit base)
14000 (version "3.0.1")
14001 (source (origin
14002 (method url-fetch)
14003 (uri (pypi-uri "Faker" version))
14004 (sha256
14005 (base32
14006 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
14007 (native-inputs
14008 `(("python-mock" ,python2-mock)
14009 ,@(package-native-inputs base)))
14010 (propagated-inputs
14011 `(("python2-ipaddress" ,python2-ipaddress)
14012 ("python2-six" ,python2-six)
14013 ,@(package-propagated-inputs base))))))
14014
14015 (define-public python-pyaml
14016 (package
14017 (name "python-pyaml")
14018 (version "18.11.0")
14019 (source (origin
14020 (method url-fetch)
14021 (uri (pypi-uri "pyaml" version))
14022 (sha256
14023 (base32
14024 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
14025 (build-system python-build-system)
14026 (native-inputs
14027 `(("python-unidecode" ,python-unidecode)))
14028 (propagated-inputs
14029 `(("python-pyyaml" ,python-pyyaml)))
14030 (home-page "https://github.com/mk-fg/pretty-yaml")
14031 (synopsis "YAML pretty-print library for Python")
14032 (description
14033 "pyaml is a PyYAML based python module to produce pretty and readable
14034 YAML-serialized data.")
14035 (license license:wtfpl2)))
14036
14037 (define-public python2-pyaml
14038 (package-with-python2 python-pyaml))
14039
14040 (define-public python-backpack
14041 (package
14042 (name "python-backpack")
14043 (version "0.1")
14044 (source
14045 (origin
14046 (method url-fetch)
14047 (uri (pypi-uri "backpack" version))
14048 (sha256
14049 (base32
14050 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
14051 (build-system python-build-system)
14052 (native-inputs
14053 `(("python-pytest" ,python-pytest)
14054 ("python-nose" ,python-nose)))
14055 (propagated-inputs
14056 `(("python-simplejson" ,python-simplejson)))
14057 (home-page "https://github.com/sdispater/backpack")
14058 (synopsis "Utilities for working with Python collections")
14059 (description "Backpack provides some useful utilities for working with
14060 collections of data.")
14061 (license license:expat)))
14062
14063 (define-public python2-backpack
14064 (package-with-python2 python-backpack))
14065
14066 (define-public python-prompt-toolkit
14067 (package
14068 (name "python-prompt-toolkit")
14069 (version "3.0.9")
14070 (source
14071 (origin
14072 (method url-fetch)
14073 (uri (pypi-uri "prompt_toolkit" version))
14074 (sha256
14075 (base32 "0bvjp62cs6aj9lrh7njzxdjgg8pjfw3qgmr551243d9ivmcapvn5"))))
14076 (build-system python-build-system)
14077 (arguments
14078 `(#:phases
14079 (modify-phases %standard-phases
14080 (delete 'check)
14081 (add-after 'install 'post-install-check
14082 (lambda* (#:key inputs outputs #:allow-other-keys)
14083 ;; HOME is needed for the test
14084 ;; "test_pathcompleter_can_expanduser".
14085 (setenv "HOME" "/tmp")
14086 (add-installed-pythonpath inputs outputs)
14087 (invoke "py.test"))))))
14088 (propagated-inputs
14089 `(("python-wcwidth" ,python-wcwidth)))
14090 (native-inputs
14091 `(("python-pytest" ,python-pytest)))
14092 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
14093 (synopsis "Library for building command line interfaces in Python")
14094 (description
14095 "Prompt-Toolkit is a library for building interactive command line
14096 interfaces in Python. It's like GNU Readline but it also features syntax
14097 highlighting while typing, out-of-the-box multi-line input editing, advanced
14098 code completion, incremental search, support for Chinese double-width
14099 characters, mouse support, and auto suggestions.")
14100 (license license:bsd-3)
14101 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
14102
14103 (define-public python-prompt-toolkit-2
14104 (package (inherit python-prompt-toolkit)
14105 (name "python-prompt-toolkit")
14106 (version "2.0.7")
14107 (source
14108 (origin
14109 (method url-fetch)
14110 (uri (pypi-uri "prompt_toolkit" version))
14111 (sha256
14112 (base32
14113 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
14114 (propagated-inputs
14115 `(("python-wcwidth" ,python-wcwidth)
14116 ("python-six" ,python-six)
14117 ("python-pygments" ,python-pygments)))
14118 (properties '())))
14119
14120 (define-public python2-prompt-toolkit
14121 (package-with-python2 python-prompt-toolkit-2))
14122
14123 (define-public python-prompt-toolkit-1
14124 (package (inherit python-prompt-toolkit-2)
14125 (version "1.0.15")
14126 (source
14127 (origin
14128 (method url-fetch)
14129 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
14130 (sha256
14131 (base32
14132 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
14133
14134 (define-public python2-prompt-toolkit-1
14135 (package-with-python2 python-prompt-toolkit-1))
14136
14137 (define-public python-jedi
14138 (package
14139 (name "python-jedi")
14140 (version "0.17.2")
14141 (source
14142 (origin
14143 (method url-fetch)
14144 (uri (pypi-uri "jedi" version))
14145 (sha256
14146 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
14147 (build-system python-build-system)
14148 (arguments
14149 `(#:phases
14150 (modify-phases %standard-phases
14151 (replace 'check
14152 (lambda* (#:key tests? #:allow-other-keys)
14153 (when tests?
14154 (setenv "HOME" "/tmp")
14155 (invoke "python" "-m" "pytest" "-vv"))
14156 #t)))))
14157 (native-inputs
14158 `(("python-pytest" ,python-pytest)
14159 ("python-docopt" ,python-docopt)))
14160 (propagated-inputs
14161 `(("python-parso" ,python-parso)))
14162 (home-page "https://github.com/davidhalter/jedi")
14163 (synopsis "Autocompletion and static analysis library for Python")
14164 (description
14165 "Jedi is a static analysis tool for Python that can be used in Integrated
14166 Development Environments (@dfn{IDE}s) and text editors. It understands Python
14167 on a deeper level than many other static analysis frameworks for Python.
14168
14169 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
14170 well.")
14171 (license license:expat)))
14172
14173 (define-public python2-jedi
14174 (package-with-python2 python-jedi))
14175
14176 (define-public ptpython
14177 (package
14178 (name "ptpython")
14179 (version "3.0.5")
14180 (source (origin
14181 (method url-fetch)
14182 (uri (pypi-uri "ptpython" version))
14183 (sha256
14184 (base32
14185 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
14186 (build-system python-build-system)
14187 (arguments
14188 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
14189 (propagated-inputs
14190 `(("python-appdirs" ,python-appdirs)
14191 ("python-jedi" ,python-jedi)
14192 ("python-prompt-toolkit" ,python-prompt-toolkit)
14193 ("python-pygments" ,python-pygments)))
14194 (home-page "https://github.com/jonathanslenders/ptpython")
14195 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
14196 (description
14197 "ptpython is a Python read-eval-print loop with IDE-like features.
14198 It supports syntax highlighting, multiline editing, autocompletion, mouse,
14199 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
14200 etc.")
14201 (license license:bsd-3)
14202 (properties `((python2-variant . ,(delay ptpython-2))))))
14203
14204 (define-public ptpython-2
14205 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
14206 (package/inherit base
14207 (name "ptpython2"))))
14208
14209 (define-public python-stem
14210 (package
14211 (name "python-stem")
14212 (version "1.8.0")
14213 (source
14214 (origin
14215 (method url-fetch)
14216 (uri (pypi-uri "stem" version))
14217 (sha256
14218 (base32
14219 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
14220 (build-system python-build-system)
14221 (arguments
14222 `(#:phases
14223 (modify-phases %standard-phases
14224 (replace 'check
14225 (lambda _
14226 (invoke "./run_tests.py" "--unit")
14227 #t)))))
14228 (native-inputs
14229 `(("python-mock" ,python-mock)
14230 ("python-pycodestyle" ,python-pycodestyle)
14231 ("python-pyflakes" ,python-pyflakes)))
14232 (home-page "https://stem.torproject.org/")
14233 (synopsis
14234 "Python controller library that allows applications to interact with Tor")
14235 (description
14236 "Stem is a Python controller library for Tor. With it you can use Tor's
14237 control protocol to script against the Tor process and read descriptor data
14238 relays publish about themselves.")
14239 (license license:lgpl3)))
14240
14241 (define-public python2-stem
14242 (package-with-python2 python-stem))
14243
14244 (define-public python-pyserial
14245 (package
14246 (name "python-pyserial")
14247 (version "3.4")
14248 (source
14249 (origin
14250 (method url-fetch)
14251 (uri (pypi-uri "pyserial" version))
14252 (sha256
14253 (base32
14254 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
14255 (build-system python-build-system)
14256 (arguments
14257 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
14258 ;; #:phases
14259 ;; (modify-phases %standard-phases
14260 ;; (replace 'check
14261 ;; (lambda _
14262 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
14263 (home-page
14264 "https://github.com/pyserial/pyserial")
14265 (synopsis "Python Serial Port Bindings")
14266 (description "@code{pyserial} provide serial port bindings for Python. It
14267 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
14268 and/or Xon/Xoff. The port is accessed in RAW mode.")
14269 (license license:bsd-3)))
14270
14271 (define-public python2-pyserial
14272 (package-with-python2 python-pyserial))
14273
14274 (define-public python-kivy
14275 (package
14276 (name "python-kivy")
14277 (version "1.10.1")
14278 (source
14279 (origin
14280 (method url-fetch)
14281 (uri (pypi-uri "Kivy" version))
14282 (file-name (string-append name "-" version ".tar.gz"))
14283 (sha256
14284 (base32
14285 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
14286 (build-system python-build-system)
14287 (arguments
14288 `(#:tests? #f ; Tests require many optional packages
14289 #:phases
14290 (modify-phases %standard-phases
14291 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
14292 (lambda* (#:key inputs #:allow-other-keys)
14293 (setenv "KIVY_SDL2_PATH"
14294 (string-append (assoc-ref inputs "sdl-union")
14295 "/include/SDL2"))
14296 #t)))))
14297 (native-inputs
14298 `(("pkg-config" ,pkg-config)
14299 ("python-cython" ,python-cython)))
14300 (inputs
14301 `(("gstreamer" ,gstreamer)
14302 ("mesa" ,mesa)
14303 ("sdl-union"
14304 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
14305 (home-page "https://kivy.org")
14306 (synopsis
14307 "Multitouch application framework")
14308 (description
14309 "A software library for rapid development of
14310 hardware-accelerated multitouch applications.")
14311 (license license:expat)))
14312
14313 (define-public python2-kivy
14314 (package-with-python2 python-kivy))
14315
14316 (define-public python-binaryornot
14317 (package
14318 (name "python-binaryornot")
14319 (version "0.4.4")
14320 (source (origin
14321 (method url-fetch)
14322 (uri (pypi-uri "binaryornot" version))
14323 (sha256
14324 (base32
14325 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
14326 (build-system python-build-system)
14327 (arguments
14328 `(#:phases
14329 (modify-phases %standard-phases
14330 (add-after 'unpack 'patch-tests
14331 (lambda _
14332 ;; TypeError: binary() got an unexpected keyword argument
14333 ;; 'average_size'.
14334 (substitute* "tests/test_check.py"
14335 (("average_size=512") ""))
14336 #t)))))
14337 (propagated-inputs
14338 `(("python-chardet" ,python-chardet)
14339 ("python-hypothesis" ,python-hypothesis)))
14340 (home-page "https://github.com/audreyr/binaryornot")
14341 (synopsis "Package to check if a file is binary or text")
14342 (description "Ultra-lightweight pure Python package to check if a file is
14343 binary or text.")
14344 (license license:bsd-3)
14345 (properties `((python2-variant . ,(delay python2-binaryornot))))))
14346
14347 (define-public python2-binaryornot
14348 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
14349 (package/inherit base
14350 (propagated-inputs
14351 `(("python2-enum34" ,python2-enum34)
14352 ,@(package-propagated-inputs base))))))
14353
14354 (define-public python-binwalk
14355 (package
14356 (name "python-binwalk")
14357 (version "2.2.0")
14358 (source
14359 (origin
14360 (method git-fetch)
14361 (uri (git-reference
14362 (url "https://github.com/ReFirmLabs/binwalk")
14363 (commit (string-append "v" version))))
14364 (file-name (git-file-name name version))
14365 (sha256
14366 (base32
14367 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
14368 (build-system python-build-system)
14369 (arguments
14370 `(#:phases
14371 (modify-phases %standard-phases
14372 (add-before 'check 'set-pythonpath
14373 (lambda _
14374 (setenv "PYTHONPATH"
14375 (string-append
14376 (getcwd) "/src/"
14377 ":" (getenv "PYTHONPATH")))
14378 (setenv "HOME" "")
14379 #t)))))
14380 (native-inputs
14381 `(("python-coverage" ,python-coverage)
14382 ("python-nose" ,python-nose)))
14383 (home-page "https://github.com/ReFirmLabs/binwalk")
14384 (synopsis "Firmware analysis tool")
14385 (description "Binwalk is a tool for analyzing, reverse engineering, and
14386 extracting firmware images")
14387 (license license:expat)))
14388
14389 (define-public python-nltk
14390 (package
14391 (name "python-nltk")
14392 (version "3.2.1")
14393 (source (origin
14394 (method url-fetch)
14395 (uri (pypi-uri "nltk" version))
14396 (sha256
14397 (base32
14398 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
14399 (build-system python-build-system)
14400 (arguments
14401 '(;; The tests require some extra resources to be downloaded.
14402 ;; TODO Try packaging these resources.
14403 #:tests? #f))
14404 (home-page "http://nltk.org/")
14405 (synopsis "Natural Language Toolkit")
14406 (description "It provides interfaces to over 50 corpora and lexical
14407 resources such as WordNet, along with a suite of text processing libraries
14408 for classification, tokenization, stemming, tagging, parsing, and semantic
14409 reasoning, wrappers for natural language processing libraries.")
14410 (license license:asl2.0)))
14411
14412 (define-public python2-nltk
14413 (package-with-python2 python-nltk))
14414
14415 (define-public python-pymongo
14416 (package
14417 (name "python-pymongo")
14418 (version "3.7.2")
14419 (source (origin
14420 (method url-fetch)
14421 (uri (pypi-uri "pymongo" version))
14422 (sha256
14423 (base32
14424 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
14425 (build-system python-build-system)
14426 (propagated-inputs
14427 `(("python-certifi" ,python-certifi)))
14428 (home-page "https://github.com/mongodb/mongo-python-driver")
14429 (synopsis "Python driver for MongoDB")
14430 (description "Python driver for MongoDB.")
14431 (license license:asl2.0)))
14432
14433 (define-public python2-pymongo
14434 (package-with-python2 python-pymongo))
14435
14436 (define-public python-consul
14437 (package
14438 (name "python-consul")
14439 (version "0.6.1")
14440 (source
14441 (origin
14442 (method url-fetch)
14443 (uri (pypi-uri "python-consul" version))
14444 (sha256
14445 (base32
14446 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
14447 (build-system python-build-system)
14448 (arguments
14449 '(#:tests? #f)) ; The tests are not distributed
14450 (propagated-inputs
14451 `(("python-requests" ,python-requests)
14452 ("python-six" ,python-six)))
14453 (home-page "https://github.com/cablehead/python-consul")
14454 (synopsis "Python client for Consul")
14455 (description
14456 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
14457 discovery, monitoring and configuration.")
14458 (license license:expat)))
14459
14460 (define-public python2-consul
14461 (package-with-python2 python-consul))
14462
14463 (define-public python-schematics
14464 (package
14465 (name "python-schematics")
14466 (version "1.1.1")
14467 (source
14468 (origin
14469 (method git-fetch)
14470 (uri (git-reference
14471 (url "https://github.com/schematics/schematics")
14472 (commit (string-append "v" version))))
14473 (file-name (git-file-name name version))
14474 (sha256
14475 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
14476 (build-system python-build-system)
14477 (propagated-inputs
14478 `(("python-six" ,python-six)))
14479 (arguments
14480 ;; The tests require a bunch of not very nice packages with fixed
14481 ;; version requirements (e.g. python-coveralls).
14482 `(#:tests? #f))
14483 (home-page "https://github.com/schematics/schematics")
14484 (synopsis "Python Data Structures for Humans")
14485 (description "Python Data Structures for Humans.")
14486 (license license:bsd-3)))
14487
14488 (define-public python2-schematics
14489 (package-with-python2 python-schematics))
14490
14491 (define-public python-odfpy
14492 (package
14493 (name "python-odfpy")
14494 (version "1.4.1")
14495 (source (origin
14496 (method url-fetch)
14497 (uri (pypi-uri "odfpy" version))
14498 (sha256
14499 (base32
14500 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
14501 (arguments
14502 `(#:phases
14503 (modify-phases %standard-phases
14504 (replace 'check
14505 (lambda _
14506 (setenv "PYTHONPATH" (string-append "./build/lib:"
14507 (getenv "PYTHONPATH")))
14508 (invoke "pytest" "-vv"))))))
14509 (build-system python-build-system)
14510 (native-inputs
14511 `(("python-pytest" ,python-pytest)))
14512 (propagated-inputs
14513 `(("python-defusedxml" ,python-defusedxml)))
14514 (home-page "https://github.com/eea/odfpy")
14515 (synopsis "Python API and tools to manipulate OpenDocument files")
14516 (description "Collection of libraries and utility programs written in
14517 Python to manipulate OpenDocument 1.2 files.")
14518 (license
14519 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
14520 ;; number of files with other licenses.
14521 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
14522
14523 (define-public python2-odfpy
14524 (package-with-python2 python-odfpy))
14525
14526 (define-public python-natsort
14527 (package
14528 (name "python-natsort")
14529 (version "7.0.1")
14530 (source (origin
14531 (method url-fetch)
14532 (uri (pypi-uri "natsort" version))
14533 (sha256
14534 (base32
14535 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14536 (build-system python-build-system)
14537 (arguments
14538 `(#:modules ((guix build utils)
14539 (guix build python-build-system)
14540 (srfi srfi-1)
14541 (srfi srfi-26)
14542 (ice-9 ftw))
14543 #:phases
14544 (modify-phases %standard-phases
14545 (add-before 'check 'set-cachedir
14546 ;; Tests require write access to $HOME by default
14547 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14548 (replace 'check
14549 (lambda _
14550 (let ((cwd (getcwd)))
14551 (setenv "PYTHONPATH"
14552 (string-append
14553 cwd "/build/"
14554 (find (cut string-prefix? "lib" <>)
14555 (scandir (string-append cwd "/build")))
14556 ":"
14557 (getenv "PYTHONPATH")))
14558 (invoke "pytest" "-v")))))))
14559 (native-inputs
14560 `(("python-hypothesis" ,python-hypothesis)
14561 ("python-pytest-cov" ,python-pytest-cov)
14562 ("python-pytest-mock" ,python-pytest-mock)
14563 ("python-pytest" ,python-pytest)))
14564 (propagated-inputs ; TODO: Add python-fastnumbers.
14565 `(("python-pyicu" ,python-pyicu)))
14566 (home-page "https://github.com/SethMMorton/natsort")
14567 (synopsis "Natural sorting for python and shell")
14568 (description
14569 "Natsort lets you apply natural sorting on lists instead of
14570 lexicographical. If you use the built-in @code{sorted} method in python
14571 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14572 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14573 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14574 identifies numbers and sorts them separately from strings. It can also sort
14575 version numbers, real numbers, mixed types and more, and comes with a shell
14576 command @command{natsort} that exposes this functionality in the command line.")
14577 (license license:expat)
14578 (properties `((python2-variant . ,(delay python2-natsort))))))
14579
14580 ;; Natsort 6.x are the last versions with support for Python 2.
14581 (define-public python2-natsort
14582 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14583 (package (inherit base)
14584 (version "6.2.1")
14585 (source (origin
14586 (method url-fetch)
14587 (uri (pypi-uri "natsort" version))
14588 (sha256
14589 (base32
14590 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14591 (native-inputs
14592 `(("python2-pathlib" ,python2-pathlib)
14593 ,@(package-native-inputs base))))))
14594
14595 (define-public glances
14596 (package
14597 (name "glances")
14598 (version "3.1.6")
14599 (source
14600 (origin
14601 (method url-fetch)
14602 (uri (pypi-uri "Glances" version))
14603 (sha256
14604 (base32 "11xbm8jgcxha191ly7q76nab1ilabiz14mqf6i3y6aw5xvgg017c"))
14605 (modules '((guix build utils)))
14606 (snippet
14607 '(begin
14608 ;; Glances phones PyPI for weekly update checks by default.
14609 ;; Disable these. The user can re-enable them if desired.
14610 (substitute* "glances/outdated.py"
14611 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14612 (string-append indentation
14613 "self.args.disable_check_update = True\n"
14614 line)))
14615 #t))))
14616 (build-system python-build-system)
14617 (propagated-inputs
14618 `(("python-future" ,python-future)
14619 ("python-psutil" ,python-psutil)))
14620 (home-page "https://github.com/nicolargo/glances")
14621 (synopsis "Cross-platform curses-based monitoring tool")
14622 (description
14623 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14624 Glances uses the PsUtil library to get information from your system. It
14625 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14626 (license license:lgpl3+)))
14627
14628 (define-public python-glances
14629 (deprecated-package "python-glances" glances))
14630
14631 (define-public python-graphql-core
14632 (package
14633 (name "python-graphql-core")
14634 (version "3.1.2")
14635 (source
14636 (origin
14637 (method url-fetch)
14638 (uri (pypi-uri "graphql-core" version))
14639 (sha256
14640 (base32
14641 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
14642 (build-system python-build-system)
14643 (arguments
14644 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14645 #:phases
14646 (modify-phases %standard-phases
14647 (add-after 'unpack 'patch-hardcoded-version
14648 (lambda _ (substitute*
14649 "setup.py"
14650 (("'gevent==1.1rc1'") "'gevent'"))
14651 #t)))))
14652 (native-inputs
14653 `(("python-gevent" ,python-gevent)
14654 ("python-mock" ,python-mock)
14655 ("python-pytest-mock" ,python-pytest-mock)))
14656 (propagated-inputs
14657 `(("python-promise" ,python-promise)
14658 ("python-six" ,python-six)))
14659 (home-page "https://github.com/graphql-python/graphql-core")
14660 (synopsis "GraphQL implementation for Python")
14661 (description
14662 "GraphQL implementation for Python. GraphQL is a data query language and
14663 runtime designed and used to request and deliver data to mobile and web apps.
14664 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14665 to Python.")
14666 (license license:expat)))
14667
14668 (define-public python2-graphql-core
14669 (package-with-python2 python-graphql-core))
14670
14671 (define-public python-graphql-relay
14672 (package
14673 (name "python-graphql-relay")
14674 (version "0.4.5")
14675 (source
14676 (origin
14677 (method url-fetch)
14678 (uri (pypi-uri "graphql-relay" version))
14679 (sha256
14680 (base32
14681 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14682 (build-system python-build-system)
14683 (arguments
14684 '(#:tests? #f)) ; The tests are not distributed
14685 (propagated-inputs
14686 `(("python-graphql-core" ,python-graphql-core)
14687 ("python-promise" ,python-promise)
14688 ("python-six" ,python-six)))
14689 (home-page "https://github.com/graphql-python/graphql-relay-py")
14690 (synopsis "Relay implementation for Python")
14691 (description
14692 "This is a library to allow the easy creation of Relay-compliant servers
14693 using the GraphQL Python reference implementation of a GraphQL server. It
14694 should be noted that the code is a exact port of the original
14695 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14696 from Facebook.")
14697 (license license:expat)))
14698
14699 (define-public python-graphene
14700 (package
14701 (name "python-graphene")
14702 (version "0.10.2")
14703 (source
14704 (origin
14705 (method url-fetch)
14706 (uri (pypi-uri "graphene" version))
14707 (sha256
14708 (base32
14709 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14710 (build-system python-build-system)
14711 (propagated-inputs
14712 `(("python-graphql-core" ,python-graphql-core)
14713 ("python-graphql-relay" ,python-graphql-relay)
14714 ("python-iso8601" ,python-iso8601)
14715 ("python-promise" ,python-promise)
14716 ("python-six" ,python-six)))
14717 (arguments
14718 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14719 (home-page "https://graphene-python.org/")
14720 (synopsis "GraphQL Framework for Python")
14721 (description
14722 "Graphene is a Python library for building GraphQL schemas/types.
14723 A GraphQL schema describes your data model, and provides a GraphQL server
14724 with an associated set of resolve methods that know how to fetch data.")
14725 (license license:expat)))
14726
14727 (define-public python-nautilus
14728 (package
14729 (name "python-nautilus")
14730 (version "0.4.9")
14731 (source
14732 (origin
14733 (method url-fetch)
14734 (uri (pypi-uri "nautilus" version))
14735 (sha256
14736 (base32
14737 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14738 (build-system python-build-system)
14739 (arguments `(#:tests? #f)) ; fails to import test modules
14740 (propagated-inputs
14741 `(("python-bcrypt" ,python-bcrypt)
14742 ("python-click" ,python-click)
14743 ("python-consul" ,python-consul)
14744 ("python-graphene" ,python-graphene)
14745 ("python-jinja2" ,python-jinja2)
14746 ("python-peewee" ,python-peewee)
14747 ("python-pika" ,python-pika)
14748 ("python-tornado" ,python-tornado)
14749 ("python-wtforms" ,python-wtforms)))
14750 (native-inputs
14751 `(("python-nose2" ,python-nose2)))
14752 (home-page "https://github.com/AlecAivazis/nautilus")
14753 (synopsis "Library for creating microservice applications")
14754 (description
14755 "Nautilus is a framework for flux based microservices that looks to
14756 provide extendible implementations of common aspects of a cloud so that you can
14757 focus on building massively scalable web applications.")
14758 (license license:expat)))
14759
14760 (define-public python-random2
14761 (package
14762 (name "python-random2")
14763 (version "1.0.1")
14764 (source (origin
14765 (method url-fetch)
14766 (uri (pypi-uri "random2" version ".zip"))
14767 (sha256
14768 (base32
14769 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14770 (build-system python-build-system)
14771 (native-inputs `(("unzip" ,unzip)))
14772 (home-page "http://pypi.python.org/pypi/random2")
14773 (synopsis "Python 3 version of the Python 2 @code{random} module")
14774 (description
14775 "This package provides a Python 3 ported version of Python 2.7’s
14776 @code{random} module. It has also been back-ported to work in Python 2.6.
14777
14778 In Python 3, the implementation of @code{randrange()} was changed, so that
14779 even with the same seed you get different sequences in Python 2 and 3.
14780
14781 This package closes that gap, allowing stable random number generation
14782 between the different Python versions.")
14783 (license license:psfl)))
14784
14785 (define-public python2-random2
14786 (package-with-python2 python-random2))
14787
14788 (define-public python-snowballstemmer
14789 (package
14790 (name "python-snowballstemmer")
14791 (version "2.0.0")
14792 (source (origin
14793 (method url-fetch)
14794 (uri (pypi-uri "snowballstemmer" version))
14795 (sha256
14796 (base32
14797 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14798 (build-system python-build-system)
14799 (arguments
14800 `(;; No tests exist
14801 #:tests? #f))
14802 (home-page "https://github.com/shibukawa/snowball_py")
14803 (synopsis "Snowball stemming library collection for Python")
14804 (description "This package provides 16 word stemmer algorithms generated
14805 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14806 English stemmer.")
14807 (license license:bsd-3)))
14808
14809 (define-public python2-snowballstemmer
14810 (package-with-python2 python-snowballstemmer))
14811
14812 (define-public python-setproctitle
14813 (package
14814 (name "python-setproctitle")
14815 (version "1.1.10")
14816 (source
14817 (origin
14818 (method url-fetch)
14819 (uri (pypi-uri "setproctitle" version))
14820 (sha256
14821 (base32
14822 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14823 (build-system python-build-system)
14824 (arguments
14825 '(#:phases
14826 (modify-phases %standard-phases
14827 (add-before 'check 'patch-Makefile
14828 ;; Stricly this is only required for the python2 variant.
14829 ;; But adding a phase in an inherited package seems to be
14830 ;; cumbersum. So we patch even for python3.
14831 (lambda _
14832 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14833 (when nose
14834 (substitute* "Makefile"
14835 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14836 (string-append nose "/bin/nosetests "))))
14837 #t)))
14838 (replace 'check
14839 (lambda _
14840 (setenv "PYTHON" (or (which "python3") (which "python")))
14841 (setenv "PYCONFIG" (if (which "python3-config")
14842 "python3-config --embed"
14843 "python-config"))
14844 (setenv "CC" "gcc")
14845 ;; No need to extend PYTHONPATH to find the built package, since
14846 ;; the Makefile will build anyway
14847 (invoke "make" "check"))))))
14848 (native-inputs
14849 `(("procps" ,procps))) ; required for tests
14850 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14851 (synopsis
14852 "Setproctitle implementation for Python to customize the process title")
14853 (description "The library allows a process to change its title (as displayed
14854 by system tools such as ps and top).
14855
14856 Changing the title is mostly useful in multi-process systems, for
14857 example when a master process is forked: changing the children's title
14858 allows identifying the task each process is busy with. The technique
14859 is used by PostgreSQL and the OpenSSH Server for example.")
14860 (license license:bsd-3)
14861 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14862
14863 (define-public python2-setproctitle
14864 (let ((base (package-with-python2
14865 (strip-python2-variant python-setproctitle))))
14866 (package/inherit base
14867 (native-inputs `(("python2-nose" ,python2-nose)
14868 ,@(package-native-inputs base))))))
14869
14870 (define-public python-validictory
14871 (package
14872 (name "python-validictory")
14873 (version "1.0.1")
14874 (source
14875 (origin
14876 (method url-fetch)
14877 (uri (pypi-uri "validictory" version))
14878 (sha256
14879 (base32
14880 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14881 (build-system python-build-system)
14882 (arguments
14883 '(#:phases
14884 (modify-phases %standard-phases
14885 (add-after 'unpack 'bootstrap
14886 ;; Move the tests out of the package directory to avoid
14887 ;; packaging them.
14888 (lambda* _
14889 (rename-file "validictory/tests" "tests")
14890 (delete-file "tests/__init__.py")))
14891 (replace 'check
14892 (lambda _
14893 ;; Extend PYTHONPATH so the built package will be found.
14894 (setenv "PYTHONPATH"
14895 (string-append (getcwd) "/build/lib:"
14896 (getenv "PYTHONPATH")))
14897 (invoke "py.test" "-vv" ))))))
14898 (native-inputs
14899 `(("python-pytest" ,python-pytest)))
14900 (home-page
14901 "https://github.com/jamesturk/validictory")
14902 (synopsis "General purpose Python data validator")
14903 (description "It allows validation of arbitrary Python data structures.
14904
14905 The schema format is based on the JSON Schema
14906 proposal (http://json-schema.org), so combined with json the library is also
14907 useful as a validator for JSON data.")
14908 (license license:expat)))
14909
14910 (define-public python2-validictory
14911 (package-with-python2 python-validictory))
14912
14913 (define-public python-pyelftools
14914 (package
14915 (name "python-pyelftools")
14916 (version "0.25")
14917 (source
14918 (origin
14919 (method url-fetch)
14920 (uri (pypi-uri "pyelftools" version))
14921 (sha256
14922 (base32
14923 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14924 (build-system python-build-system)
14925 (arguments
14926 `(#:phases
14927 (modify-phases %standard-phases
14928 (add-before 'check 'set-pythonpath
14929 (lambda _
14930 (setenv "PYTHONPATH"
14931 (string-append
14932 (getcwd) "/test/"
14933 ":" (getenv "PYTHONPATH")))
14934 #t)))))
14935 (home-page
14936 "https://github.com/eliben/pyelftools")
14937 (synopsis
14938 "Analyze binary and library file information")
14939 (description "This Python library provides interfaces for parsing and
14940 analyzing two binary and library file formats; the Executable and Linking
14941 Format (ELF), and debugging information in the Debugging With Attributed
14942 Record Format (DWARF).")
14943 (license license:public-domain)))
14944
14945 (define-public python-pyev
14946 (package
14947 (name "python-pyev")
14948 (version "0.9.0")
14949 (source
14950 (origin
14951 (method url-fetch)
14952 (uri (pypi-uri "pyev" version))
14953 (sha256
14954 (base32
14955 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14956 (build-system python-build-system)
14957 (arguments
14958 `(#:tests? #f ; no test suite
14959 #:phases
14960 (modify-phases %standard-phases
14961 (add-after 'unpack 'patch
14962 (lambda* (#:key inputs #:allow-other-keys)
14963 (let ((libev (string-append (assoc-ref inputs "libev")
14964 "/lib/libev.so.4")))
14965 (substitute* "setup.py"
14966 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14967 (string-append "libev_dll_name = \"" libev "\"")))))))))
14968 (inputs
14969 `(("libev" ,libev)))
14970 (home-page "https://github.com/gabrielfalcao/pyev")
14971 (synopsis "Python libev interface")
14972 (description "Pyev provides a Python interface to libev.")
14973 (license license:gpl3)))
14974
14975 (define-public python2-pyev
14976 (package-with-python2 python-pyev))
14977
14978 (define-public python-imagesize
14979 (package
14980 (name "python-imagesize")
14981 (version "1.2.0")
14982 (source
14983 (origin
14984 (method url-fetch)
14985 (uri (pypi-uri "imagesize" version))
14986 (sha256
14987 (base32
14988 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14989 (build-system python-build-system)
14990 (home-page "https://github.com/shibukawa/imagesize_py")
14991 (synopsis "Gets image size of files in various formats in Python")
14992 (description
14993 "This package allows determination of image size from
14994 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14995 (license license:expat)))
14996
14997 (define-public python2-imagesize
14998 (package-with-python2 python-imagesize))
14999
15000 (define-public python-termstyle
15001 (package
15002 (name "python-termstyle")
15003 (version "0.1.11")
15004 (source
15005 (origin
15006 (method url-fetch)
15007 (uri (pypi-uri "termstyle" version))
15008 (sha256
15009 (base32
15010 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
15011 (build-system python-build-system)
15012 (arguments
15013 '(#:phases
15014 (modify-phases %standard-phases
15015 (replace 'check
15016 (lambda _
15017 (invoke "python" "test3.py"))))))
15018 (home-page "https://github.com/gfxmonk/termstyle")
15019 (synopsis "Console text coloring for Python")
15020 (description "This package provides console text coloring for Python.")
15021 (license license:bsd-3)))
15022
15023 (define-public python-argcomplete
15024 (package
15025 (name "python-argcomplete")
15026 (version "1.11.1")
15027 (source
15028 (origin
15029 (method url-fetch)
15030 (uri (pypi-uri "argcomplete" version))
15031 (sha256
15032 (base32
15033 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
15034 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
15035 (build-system python-build-system)
15036 (native-inputs
15037 `(("python-coverage" ,python-coverage)
15038 ("python-flake8" ,python-flake8)
15039 ("python-pexpect" ,python-pexpect)
15040 ("python-wheel" ,python-wheel)
15041 ("tcsh" ,tcsh)
15042 ("fish" ,fish)
15043 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
15044 (home-page "https://github.com/kislyuk/argcomplete")
15045 (synopsis "Shell tab completion for Python argparse")
15046 (description "argcomplete provides extensible command line tab completion
15047 of arguments and options for Python scripts using @code{argparse}. It's
15048 particularly useful for programs with many options or sub-parsers that can
15049 dynamically suggest completions; for example, when browsing resources over the
15050 network.")
15051 (license license:asl2.0)
15052 (properties `((python2-variant . ,(delay python2-argcomplete))))))
15053
15054 (define-public python2-argcomplete
15055 (let ((variant (package-with-python2
15056 (strip-python2-variant python-argcomplete))))
15057 (package/inherit variant
15058 (arguments
15059 (substitute-keyword-arguments (package-arguments variant)
15060 ((#:phases phases '%standard-phases)
15061 `(modify-phases ,phases
15062 (add-after 'unpack 'set-my-HOME
15063 (lambda _ (setenv "HOME" "/tmp")))))))
15064 (native-inputs
15065 `(("python2-importlib-metadata" ,python2-importlib-metadata)
15066 ,@(package-native-inputs variant))))))
15067
15068 (define-public python-csscompressor
15069 (package
15070 (name "python-csscompressor")
15071 (version "0.9.5")
15072 (source
15073 (origin
15074 (method url-fetch)
15075 (uri (pypi-uri "csscompressor" version))
15076 (sha256
15077 (base32
15078 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
15079 (build-system python-build-system)
15080 (arguments
15081 '(#:phases
15082 (modify-phases %standard-phases
15083 (replace 'check
15084 (lambda _
15085 (invoke "py.test"))))))
15086 (native-inputs
15087 `(("python-pytest" ,python-pytest)))
15088 (home-page "https://github.com/sprymix/csscompressor")
15089 (synopsis "Python port of YUI CSS Compressor")
15090 (description
15091 "This package provides a python port of YUI CSS Compressor.")
15092 (license license:bsd-3)))
15093
15094 (define-public python-rcssmin
15095 (package
15096 (name "python-rcssmin")
15097 (version "1.0.6")
15098 (source
15099 (origin
15100 (method url-fetch)
15101 (uri (pypi-uri "rcssmin" version))
15102 (sha256
15103 (base32
15104 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
15105 (build-system python-build-system)
15106 (arguments
15107 '(#:phases
15108 (modify-phases %standard-phases
15109 (replace 'check
15110 (lambda _
15111 (invoke "python" "run_tests.py" "tests"))))))
15112 (home-page "http://opensource.perlig.de/rcssmin/")
15113 (synopsis "CSS Minifier")
15114 (description "The minifier is based on the semantics of the YUI compressor,
15115 which itself is based on the rule list by Isaac Schlueter.")
15116 (license license:asl2.0)))
15117
15118 (define-public python-rjsmin
15119 (package
15120 (name "python-rjsmin")
15121 (version "1.1.0")
15122 (source
15123 (origin
15124 (method url-fetch)
15125 (uri (pypi-uri "rjsmin" version))
15126 (sha256
15127 (base32
15128 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
15129 (modules '((guix build utils)))
15130 (snippet
15131 '(begin
15132 (for-each delete-file (find-files "bench" "\\.js$"))
15133 #t))))
15134 (build-system python-build-system)
15135 (arguments
15136 '(#:tests? #f ; Not all test files included.
15137 #:phases
15138 (modify-phases %standard-phases
15139 (replace 'check
15140 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
15141 (add-installed-pythonpath inputs outputs)
15142 (if tests?
15143 (invoke "py.test" "-vv" "tests")
15144 #t))))))
15145 (native-inputs
15146 `(("python-pytest" ,python-pytest)))
15147 (home-page "http://opensource.perlig.de/rjsmin/")
15148 (synopsis "Javascript Minifier")
15149 (description "@code{rJSmin} is a javascript minifier written in Python. The
15150 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
15151 is a re-implementation aiming for speed, so it can be used at runtime (rather
15152 than during a preprocessing step).")
15153 (license license:asl2.0)))
15154
15155 (define-public python-xopen
15156 (package
15157 (name "python-xopen")
15158 (version "0.5.0")
15159 (source
15160 (origin
15161 (method url-fetch)
15162 (uri (pypi-uri "xopen" version))
15163 (sha256
15164 (base32
15165 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
15166 (build-system python-build-system)
15167 (propagated-inputs
15168 `(("python-setuptools-scm" ,python-setuptools-scm)))
15169 (home-page "https://github.com/marcelm/xopen/")
15170 (synopsis "Open compressed files transparently")
15171 (description "This module provides an @code{xopen} function that works like
15172 Python's built-in @code{open} function, but can also deal with compressed files.
15173 Supported compression formats are gzip, bzip2 and, xz, and are automatically
15174 recognized by their file extensions. The focus is on being as efficient as
15175 possible on all supported Python versions.")
15176 (license license:expat)))
15177
15178 (define-public python2-xopen
15179 (let ((base (package-with-python2
15180 (strip-python2-variant python-xopen))))
15181 (package/inherit base
15182 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
15183 ,@(package-propagated-inputs base))))))
15184
15185 (define-public python-cheetah
15186 (package
15187 (name "python-cheetah")
15188 (version "3.2.4")
15189 (source
15190 (origin
15191 (method url-fetch)
15192 (uri (pypi-uri "Cheetah3" version))
15193 (sha256
15194 (base32
15195 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
15196 (build-system python-build-system)
15197 (arguments
15198 `(#:modules ((guix build utils)
15199 (guix build python-build-system)
15200 (ice-9 ftw)
15201 (srfi srfi-1)
15202 (srfi srfi-26))
15203 #:phases (modify-phases %standard-phases
15204 (add-after 'unpack 'use-absolute-python
15205 (lambda _
15206 (substitute* "Cheetah/CheetahWrapper.py"
15207 (("#!/usr/bin/env python")
15208 (string-append "#!" (which "python"))))
15209 #t))
15210 (add-after 'unpack 'fix-tests
15211 (lambda _
15212 (substitute* "Cheetah/Tests/ImportHooks.py"
15213 (("os.path.dirname\\(__file__\\)")
15214 (string-append "'" (getcwd) "/Cheetah/Tests'")))
15215 #t))
15216 (replace 'check
15217 (lambda _
15218 (let ((cwd (getcwd)))
15219 (setenv "PYTHONPATH"
15220 (string-append
15221 cwd "/build/"
15222 (find (cut string-prefix? "lib" <>)
15223 (scandir (string-append cwd "/build")))
15224 ":" (getenv "PYTHONPATH")))
15225 (setenv "PATH"
15226 (string-append (getenv "PATH")
15227 ":" cwd "/bin"))
15228 (setenv "TMPDIR" "/tmp")
15229
15230 (substitute* "Cheetah/Tests/Test.py"
15231 (("unittest.TextTestRunner\\(\\)")
15232 "unittest.TextTestRunner(verbosity=2)"))
15233
15234 (invoke "python" "Cheetah/Tests/Test.py")))))))
15235 (propagated-inputs
15236 `(("python-markdown" ,python-markdown))) ;optional
15237 (home-page "https://cheetahtemplate.org/")
15238 (synopsis "Template engine")
15239 (description "Cheetah is a text-based template engine and Python code
15240 generator.
15241
15242 Cheetah can be used as a standalone templating utility or referenced as
15243 a library from other Python applications. It has many potential uses,
15244 but web developers looking for a viable alternative to ASP, JSP, PHP and
15245 PSP are expected to be its principle user group.
15246
15247 Features:
15248 @enumerate
15249 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
15250 text-based format.
15251 @item Cleanly separates content, graphic design, and program code.
15252 @item Blends the power and flexibility of Python with a simple template language
15253 that non-programmers can understand.
15254 @item Gives template writers full access to any Python data structure, module,
15255 function, object, or method in their templates.
15256 @item Makes code reuse easy by providing an object-orientated interface to
15257 templates that is accessible from Python code or other Cheetah templates.
15258 One template can subclass another and selectively reimplement sections of it.
15259 @item Provides a simple, yet powerful, caching mechanism that can dramatically
15260 improve the performance of a dynamic website.
15261 @item Compiles templates into optimized, yet readable, Python code.
15262 @end enumerate")
15263 (license (license:x11-style "file://LICENSE"))))
15264
15265 (define-public python2-cheetah
15266 (package-with-python2 python-cheetah))
15267
15268 (define-public python-dulwich
15269 (package
15270 (name "python-dulwich")
15271 (version "0.19.16")
15272 (source
15273 (origin
15274 (method url-fetch)
15275 (uri (list (string-append "https://www.dulwich.io/releases/"
15276 "dulwich-" version ".tar.gz")
15277 (pypi-uri "dulwich" version)))
15278 (sha256
15279 (base32
15280 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
15281 (build-system python-build-system)
15282 (arguments
15283 `(#:phases
15284 (modify-phases %standard-phases
15285 (add-before 'check 'fix-tests
15286 (lambda* (#:key inputs #:allow-other-keys)
15287 ;; The tests use Popen with a custom environment which doesn't
15288 ;; include PATH.
15289 (substitute* "dulwich/tests/compat/utils.py"
15290 (("'git'") (string-append "'"
15291 (which "git")
15292 "'")))
15293 (substitute* '("dulwich/tests/test_repository.py"
15294 "dulwich/tests/test_hooks.py")
15295 (("#!/bin/sh") (string-append "#!" (which "sh"))))
15296 (setenv "TEST_RUNNER" "unittest")
15297 (setenv "PYTHONHASHSEED" "random")
15298 #t)))))
15299 (propagated-inputs
15300 `(("python-fastimport" ,python-fastimport)
15301 ("python-urllib3" ,python-urllib3)))
15302 (native-inputs
15303 `(("python-mock" ,python-mock)
15304 ("python-geventhttpclient" ,python-geventhttpclient)
15305 ("git" ,git)))
15306 (home-page "https://www.dulwich.io/")
15307 (synopsis "Git implementation in Python")
15308 (description "Dulwich is an implementation of the Git file formats and
15309 protocols written in pure Python.")
15310 ;; Can be used with either license.
15311 (license (list license:asl2.0 license:gpl2+))))
15312
15313 (define-public python2-dulwich
15314 (package-with-python2 python-dulwich))
15315
15316 (define-public python-pbkdf2
15317 (package
15318 (name "python-pbkdf2")
15319 (version "1.3")
15320 (source
15321 (origin
15322 (method url-fetch)
15323 (uri (pypi-uri "pbkdf2" version))
15324 (sha256
15325 (base32
15326 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
15327 (build-system python-build-system)
15328 (arguments
15329 '(#:phases
15330 (modify-phases %standard-phases
15331 (replace 'check
15332 (lambda _
15333 (setenv "PYTHONPATH"
15334 (string-append (getcwd) "/build/lib:"
15335 (getenv "PYTHONPATH")))
15336 (invoke "python" "test/test_pbkdf2.py"))))))
15337 (propagated-inputs
15338 `(("python-pycrypto" ,python-pycrypto))) ; optional
15339 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
15340 (synopsis "Password-based key derivation")
15341 (description "This module implements the password-based key derivation
15342 function, PBKDF2, specified in RSA PKCS#5 v2.0.
15343
15344 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
15345 is part of the RSA Public Key Cryptography Standards series. The provided
15346 implementation takes a password or a passphrase and a salt value (and
15347 optionally a iteration count, a digest module, and a MAC module) and provides
15348 a file-like object from which an arbitrarily-sized key can be read.")
15349 (license license:expat)))
15350
15351 (define-public python2-pbkdf2
15352 (package-with-python2 python-pbkdf2))
15353
15354 (define-public python-qrcode
15355 (package
15356 (name "python-qrcode")
15357 (version "6.1")
15358 (source
15359 (origin
15360 (method url-fetch)
15361 (uri (pypi-uri "qrcode" version))
15362 (sha256
15363 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
15364 (build-system python-build-system)
15365 (arguments
15366 ;; FIXME: Tests require packaging 'pymaging'.
15367 '(#:tests? #f))
15368 (propagated-inputs
15369 `(("python-lxml" ,python-lxml) ; for SVG output
15370 ("python-pillow" ,python-pillow) ; for PNG output
15371 ("python-six" ,python-six)))
15372 (home-page "https://github.com/lincolnloop/python-qrcode")
15373 (synopsis "QR Code image generator")
15374 (description "This package provides a pure Python QR Code generator
15375 module. It uses the Python Imaging Library (PIL) to allow for the generation
15376 of QR Codes.
15377
15378 In addition this package provides a command line tool to generate QR codes and
15379 either write these QR codes to a file or do the output as ascii art at the
15380 console.")
15381 (license license:bsd-3)))
15382
15383 (define-public python2-qrcode
15384 (package-with-python2 python-qrcode))
15385
15386 (define-public python-rst2ansi
15387 (package
15388 (name "python-rst2ansi")
15389 (version "0.1.5")
15390 (source
15391 (origin
15392 (method url-fetch)
15393 (uri (pypi-uri "rst2ansi" version))
15394 (sha256
15395 (base32
15396 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
15397 (build-system python-build-system)
15398 (propagated-inputs
15399 `(("python-docutils" ,python-docutils)))
15400 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
15401 (synopsis "Convert RST to ANSI-decorated console output")
15402 (description
15403 "Python module dedicated to rendering RST (reStructuredText) documents
15404 to ansi-escaped strings suitable for display in a terminal.")
15405 (license license:expat)))
15406
15407 (define-public python-ansi2html
15408 (package
15409 (name "python-ansi2html")
15410 (version "1.2.0")
15411 (source
15412 (origin
15413 (method url-fetch)
15414 (uri (pypi-uri "ansi2html" version))
15415 (sha256
15416 (base32
15417 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
15418 (build-system python-build-system)
15419 (native-inputs
15420 `(("python-mock" ,python-mock)
15421 ("python-nose" ,python-nose)))
15422 (propagated-inputs
15423 `(("python-six" ,python-six)))
15424 (home-page "https://github.com/ralphbean/ansi2html")
15425 (synopsis "Convert ANSI-decorated console output to HTML")
15426 (description
15427 "@command{ansi2html} is a Python library and command line utility for
15428 converting text with ANSI color codes to HTML or LaTeX.")
15429 (license license:gpl3+)))
15430
15431 (define-public python2-ansi2html
15432 (package-with-python2 python-ansi2html))
15433
15434 (define-public python-ddt
15435 (package
15436 (name "python-ddt")
15437 (version "1.4.1")
15438 (source
15439 (origin
15440 (method url-fetch)
15441 (uri (pypi-uri "ddt" version))
15442 (sha256
15443 (base32
15444 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
15445 (build-system python-build-system)
15446 (native-inputs
15447 `(("python-pytest" ,python-pytest)))
15448 (propagated-inputs
15449 `(("python-pyyaml" ,python-pyyaml)))
15450 (home-page "https://github.com/datadriventests/ddt")
15451 (synopsis "Data-Driven Tests")
15452 (description
15453 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
15454 running it with different test data, and make it appear as multiple test
15455 cases.")
15456 (license license:expat)))
15457
15458 (define-public python-pycountry
15459 (package
15460 (name "python-pycountry")
15461 (version "18.5.26")
15462 (source
15463 (origin
15464 (method url-fetch)
15465 (uri (pypi-uri "pycountry" version))
15466 (sha256
15467 (base32
15468 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
15469 (build-system python-build-system)
15470 (home-page "https://bitbucket.org/flyingcircus/pycountry")
15471 (synopsis "ISO databases for languages, countries, currencies, etc.")
15472 (description
15473 "@code{pycountry} provides the ISO databases for the standards:
15474 @enumerate
15475 @item 639-3 (Languages)
15476 @item 3166 (Countries)
15477 @item 3166-3 (Deleted Countries)
15478 @item 3166-2 (Subdivisions of countries)
15479 @item 4217 (Currencies)
15480 @item 15924 (Scripts)
15481 @end enumerate
15482 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
15483 through a Python API.")
15484 (license license:lgpl2.1+)))
15485
15486 (define-public python2-pycountry
15487 (package-with-python2 python-pycountry))
15488
15489 (define-public python-pycosat
15490 (package
15491 (name "python-pycosat")
15492 (version "0.6.3")
15493 (source
15494 (origin
15495 (method url-fetch)
15496 (uri (pypi-uri "pycosat" version ".zip"))
15497 (sha256
15498 (base32
15499 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
15500 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
15501 (build-system python-build-system)
15502 (native-inputs
15503 `(("unzip" ,unzip)))
15504 (home-page "https://github.com/ContinuumIO/pycosat")
15505 (synopsis "Bindings to picosat (a SAT solver)")
15506 (description
15507 "This package provides efficient Python bindings to @code{picosat} on
15508 the C level. When importing pycosat, the @code{picosat} solver becomes part
15509 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
15510 Problem} (SAT) solver.")
15511 (license license:expat)))
15512
15513 (define-public python2-pycosat
15514 (package-with-python2 python-pycosat))
15515
15516 (define-public python2-ruamel.ordereddict
15517 (package
15518 (name "python2-ruamel.ordereddict")
15519 (version "0.4.9")
15520 (source
15521 (origin
15522 (method url-fetch)
15523 (uri (pypi-uri "ruamel.ordereddict" version))
15524 (sha256
15525 (base32
15526 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
15527 (build-system python-build-system)
15528 (arguments
15529 `(#:python ,python-2
15530 #:phases
15531 (modify-phases %standard-phases
15532 (delete 'check)
15533 (add-after 'install 'check
15534 (lambda* (#:key inputs outputs #:allow-other-keys)
15535 (add-installed-pythonpath inputs outputs)
15536 (invoke "python" "test/testordereddict.py"))))))
15537 (home-page "https://bitbucket.org/ruamel/ordereddict")
15538 (synopsis "Version of dict that keeps keys in insertion order")
15539 (description
15540 "This is an implementation of an ordered dictionary with @dfn{Key
15541 Insertion Order} (KIO: updates of values do not affect the position of the
15542 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15543 removed and put at the back). The standard library module @code{OrderedDict},
15544 implemented later, implements a subset of @code{ordereddict} functionality.
15545 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15546 Order} (KSO, no sorting function can be specified, but a transform can be
15547 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15548 (license license:expat)))
15549
15550 (define-public python-pypeg2
15551 (package
15552 (name "python-pypeg2")
15553 (version "2.15.2")
15554 (source
15555 (origin
15556 (method url-fetch)
15557 (uri (pypi-uri "pyPEG2" version))
15558 (sha256
15559 (base32
15560 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15561 (build-system python-build-system)
15562 (propagated-inputs `(("python-lxml" ,python-lxml)))
15563 (arguments
15564 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15565 '(#:tests? #f))
15566 (home-page "https://fdik.org/pyPEG/")
15567 (synopsis "Parsering Expression Grammars in Python")
15568 (description "PyPEG is an intrinsic parser interpreter framework for
15569 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15570 parse many formal languages.")
15571 (license license:gpl2)))
15572
15573 (define-public python-incremental
15574 (package
15575 (name "python-incremental")
15576 (version "17.5.0")
15577 (source
15578 (origin
15579 (method url-fetch)
15580 (uri (pypi-uri "incremental" version))
15581 (sha256
15582 (base32
15583 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15584 (build-system python-build-system)
15585 (home-page "https://github.com/hawkowl/incremental")
15586 (synopsis "Library for versioning Python projects")
15587 (description "Incremental is a small library that versions your Python
15588 projects.")
15589 (license license:expat)))
15590
15591 (define-public python2-incremental
15592 (package-with-python2 python-incremental))
15593
15594 (define-public python-invoke
15595 (package
15596 (name "python-invoke")
15597 (home-page "https://www.pyinvoke.org/")
15598 (version "1.5.0")
15599 (source (origin
15600 (method url-fetch)
15601 (uri (pypi-uri "invoke" version))
15602 (sha256
15603 (base32
15604 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
15605 (build-system python-build-system)
15606 (arguments
15607 ;; XXX: Requires many dependencies that are not yet in Guix.
15608 `(#:tests? #f
15609 #:phases
15610 (modify-phases %standard-phases
15611 (add-after 'unpack 'fix-bash-path
15612 (lambda* (#:key inputs #:allow-other-keys)
15613 (let ((bash (assoc-ref inputs "bash")))
15614 (substitute* "invoke/config.py"
15615 (("shell = \"/bin/bash\"")
15616 (string-append "shell = \"" bash "/bin/bash\""))
15617 )
15618 #t))))))
15619 (inputs
15620 `(("bash" ,bash-minimal)))
15621 (synopsis "Pythonic task execution")
15622 (description
15623 "Invoke is a Python task execution tool and library, drawing inspiration
15624 from various sources to arrive at a powerful and clean feature set. It is
15625 evolved from the Fabric project, but focuses on local and abstract concerns
15626 instead of servers and network commands.")
15627 (license license:bsd-3)))
15628
15629 (define-public python2-invoke
15630 (package-with-python2 python-invoke))
15631
15632 (define-public python-automat
15633 (package
15634 (name "python-automat")
15635 (version "20.2.0")
15636 (source (origin
15637 (method url-fetch)
15638 (uri (pypi-uri "Automat" version))
15639 (sha256
15640 (base32
15641 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15642 (build-system python-build-system)
15643 ;; We disable the tests because they require python-twisted, while
15644 ;; python-twisted depends on python-automat. Twisted is optional, but the
15645 ;; tests fail if it is not available. Also see
15646 ;; <https://github.com/glyph/automat/issues/71>.
15647 (arguments '(#:tests? #f))
15648 (native-inputs
15649 `(("python-m2r" ,python-m2r)
15650 ("python-setuptools-scm" ,python-setuptools-scm)
15651 ("python-graphviz" ,python-graphviz)))
15652 (propagated-inputs
15653 `(("python-six" ,python-six)
15654 ("python-attrs" ,python-attrs)))
15655 (home-page "https://github.com/glyph/Automat")
15656 (synopsis "Self-service finite-state machines")
15657 (description "Automat is a library for concise, idiomatic Python
15658 expression of finite-state automata (particularly deterministic finite-state
15659 transducers).")
15660 (license license:expat)))
15661
15662 (define-public python2-automat
15663 (package-with-python2 python-automat))
15664
15665 (define-public python-m2r
15666 (package
15667 (name "python-m2r")
15668 (version "0.2.1")
15669 (source (origin
15670 (method url-fetch)
15671 (uri (pypi-uri "m2r" version))
15672 (sha256
15673 (base32
15674 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15675 (build-system python-build-system)
15676 (propagated-inputs
15677 `(("python-docutils" ,python-docutils)
15678 ("python-mistune" ,python-mistune)))
15679 (native-inputs
15680 `(("python-pygments" ,python-pygments)
15681 ("python-mock" ,python-mock)))
15682 (home-page "https://github.com/miyakogi/m2r")
15683 (synopsis "Markdown to reStructuredText converter")
15684 (description "M2R converts a markdown file including reST markups to valid
15685 reST format.")
15686 (license license:expat)))
15687
15688 (define-public python2-m2r
15689 (package-with-python2 python-m2r))
15690
15691 (define-public python-constantly
15692 (package
15693 (name "python-constantly")
15694 (version "15.1.0")
15695 (source (origin
15696 (method url-fetch)
15697 (uri (pypi-uri "constantly" version))
15698 (sha256
15699 (base32
15700 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15701 (build-system python-build-system)
15702 (home-page "https://github.com/twisted/constantly")
15703 (synopsis "Symbolic constants in Python")
15704 (description "Constantly is a Python library that provides symbolic
15705 constant support. It includes collections and constants with text, numeric,
15706 and bit flag values.")
15707 (license license:expat)))
15708
15709 (define-public python2-constantly
15710 (package-with-python2 python-constantly))
15711
15712 (define-public python-attrs
15713 (package
15714 (name "python-attrs")
15715 (version "19.3.0")
15716 (source (origin
15717 (method url-fetch)
15718 (uri (pypi-uri "attrs" version))
15719 (sha256
15720 (base32
15721 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15722 (build-system python-build-system)
15723 (arguments
15724 `(#:modules ((guix build utils)
15725 (guix build python-build-system)
15726 (ice-9 ftw)
15727 (srfi srfi-1)
15728 (srfi srfi-26))
15729 #:phases (modify-phases %standard-phases
15730 (replace 'check
15731 (lambda _
15732 (let ((cwd (getcwd)))
15733 (setenv "PYTHONPATH"
15734 (string-append
15735 cwd "/build/"
15736 (find (cut string-prefix? "lib" <>)
15737 (scandir (string-append cwd "/build")))
15738 ":"
15739 (getenv "PYTHONPATH")))
15740 (invoke "python" "-m" "pytest")))))))
15741 (native-inputs
15742 `(("python-coverage" ,python-coverage)
15743 ("python-hypothesis" ,python-hypothesis)
15744 ("python-pympler" ,python-pympler)
15745 ("python-pytest" ,python-pytest)
15746 ("python-six" ,python-six)
15747 ("python-sphinx" ,python-sphinx)
15748 ("python-zope-interface" ,python-zope-interface)))
15749 (home-page "https://github.com/python-attrs/attrs/")
15750 (synopsis "Attributes without boilerplate")
15751 (description "@code{attrs} is a Python package with class decorators that
15752 ease the chores of implementing the most common attribute-related object
15753 protocols.")
15754 (license license:expat)))
15755
15756 (define-public python2-attrs
15757 (package-with-python2 python-attrs))
15758
15759 (define-public python-attrs-bootstrap
15760 (package
15761 (inherit python-attrs)
15762 (name "python-attrs-bootstrap")
15763 (native-inputs `())
15764 (arguments `(#:tests? #f))))
15765
15766 (define-public python2-attrs-bootstrap
15767 (package-with-python2 python-attrs-bootstrap))
15768
15769 (define-public python2-cliapp
15770 (package
15771 (name "python2-cliapp")
15772 (version "1.20180812.1")
15773 (source
15774 (origin
15775 (method url-fetch)
15776 (uri (string-append
15777 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15778 version ".tar.gz"))
15779 (sha256
15780 (base32
15781 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15782 (build-system python-build-system)
15783 (arguments
15784 `(#:python ,python-2
15785 #:phases
15786 (modify-phases %standard-phases
15787 ;; check phase needs to be run before the build phase. If not,
15788 ;; coverage-test-runner looks for tests for the built source files,
15789 ;; and fails.
15790 (delete 'check)
15791 (add-before 'build 'check
15792 (lambda _
15793 ;; Disable python3 tests
15794 (substitute* "check"
15795 (("python3") "# python3"))
15796 (invoke "./check"))))))
15797 (native-inputs
15798 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15799 ("python2-pep8" ,python2-pep8)))
15800 (propagated-inputs
15801 `(("python2-pyaml" ,python2-pyaml)))
15802 (home-page "https://liw.fi/cliapp/")
15803 (synopsis "Python framework for command line programs")
15804 (description "@code{python2-cliapp} is a python framework for
15805 command line programs. It contains the typical stuff such programs
15806 need to do, such as parsing the command line for options, and
15807 iterating over input files.")
15808 (license license:gpl2+)))
15809
15810 (define-public python2-ttystatus
15811 (package
15812 (name "python2-ttystatus")
15813 (version "0.38")
15814 (source
15815 (origin
15816 (method git-fetch)
15817 (uri (git-reference
15818 (url "http://git.liw.fi/ttystatus")
15819 ;; There are no tags after ttystatus-0.36.
15820 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15821 (sha256
15822 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15823 (file-name (git-file-name name version))))
15824 (build-system python-build-system)
15825 (native-inputs
15826 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15827 ("python2-pep8" ,python2-pep8)))
15828 (arguments
15829 `(#:python ,python-2
15830 #:phases
15831 (modify-phases %standard-phases
15832 ;; check phase needs to be run before the build phase. If not,
15833 ;; coverage-test-runner looks for tests for the built source files,
15834 ;; and fails.
15835 (delete 'check)
15836 (add-before 'build 'check
15837 (lambda _ (invoke "make" "check"))))))
15838 (home-page "https://liw.fi/ttystatus/")
15839 (synopsis "Python library for showing progress reporting and
15840 status updates on terminals")
15841 (description "@code{python2-ttystatus} is a python library for
15842 showing progress reporting and status updates on terminals, for
15843 command line programs. Output is automatically adapted to the width
15844 of the terminal: truncated if it does not fit, and resized if the
15845 terminal size changes.")
15846 (license license:gpl3+)))
15847
15848 (define-public python2-tracing
15849 (package
15850 (name "python2-tracing")
15851 (version "0.10")
15852 (source
15853 (origin
15854 (method url-fetch)
15855 (uri (string-append
15856 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15857 version ".tar.gz"))
15858 (sha256
15859 (base32
15860 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15861 (build-system python-build-system)
15862 (arguments
15863 `(#:python ,python-2))
15864 (home-page "https://liw.fi/tracing/")
15865 (synopsis "Python debug logging helper")
15866 (description "@code{python2-tracing} is a python library for
15867 logging debug messages. It provides a way to turn debugging messages
15868 on and off, based on the filename they occur in. It is much faster
15869 than using @code{logging.Filter} to accomplish the same thing, which
15870 matters when code is run in production mode. The actual logging still
15871 happens using the @code{logging} library.")
15872 (license license:gpl3+)))
15873
15874 (define-public python2-larch
15875 (package
15876 (name "python2-larch")
15877 (version "1.20151025")
15878 (source
15879 (origin
15880 (method url-fetch)
15881 (uri (string-append
15882 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15883 version ".tar.gz"))
15884 (patches (search-patches
15885 "python2-larch-coverage-4.0a6-compatibility.patch"))
15886 (sha256
15887 (base32
15888 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15889 (build-system python-build-system)
15890 (arguments
15891 `(#:python ,python-2
15892 #:phases
15893 (modify-phases %standard-phases
15894 ;; check phase needs to be run before the build phase. If not,
15895 ;; coverage-test-runner looks for tests for the built source files,
15896 ;; and fails.
15897 (delete 'check)
15898 (add-before 'build 'check
15899 (lambda _ (invoke "make" "check"))))))
15900 (native-inputs
15901 `(("cmdtest" ,cmdtest)
15902 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15903 (propagated-inputs
15904 `(("python2-tracing" ,python2-tracing)))
15905 (home-page "https://liw.fi/larch/")
15906 (synopsis "Python copy-on-write B-tree library")
15907 (description "@code{python2-larch} is an implementation of
15908 particular kind of B-tree, based on research by Ohad Rodeh. See
15909 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15910 on the data structure.
15911
15912 The distinctive feature of this B-tree is that a node is never
15913 (conceptually) modified. Instead, all updates are done by
15914 copy-on-write. This makes it easy to clone a tree, and modify only the
15915 clone, while other processes access the original tree.")
15916 (license license:gpl3+)))
15917
15918 (define-public python-astroid
15919 (package
15920 (name "python-astroid")
15921 (version "2.4.2")
15922 (source
15923 (origin
15924 (method url-fetch)
15925 (uri (pypi-uri "astroid" version))
15926 (sha256
15927 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15928 (modules '((guix build utils)))
15929 (snippet
15930 '(begin
15931 ;; Check to see if the version pinning has been removed.
15932 (substitute* "astroid/__pkginfo__.py"
15933 (("==1\\.4\\.\\*") ">=1.4.0"))
15934 #t))))
15935 (build-system python-build-system)
15936 (propagated-inputs
15937 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15938 ("python-six" ,python-six)
15939 ("python-wrapt" ,python-wrapt)))
15940 (native-inputs
15941 `(("python-dateutil" ,python-dateutil)
15942 ("python-pytest" ,python-pytest)
15943 ("python-pytest-runner" ,python-pytest-runner)))
15944 (home-page "https://github.com/PyCQA/astroid")
15945 (synopsis "Common base representation of python source code for pylint and
15946 other projects")
15947 (description "@code{python-astroid} provides a common base representation
15948 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15949
15950 It provides a compatible representation which comes from the _ast module. It
15951 rebuilds the tree generated by the builtin _ast module by recursively walking
15952 down the AST and building an extended ast. The new node classes have
15953 additional methods and attributes for different usages. They include some
15954 support for static inference and local name scopes. Furthermore, astroid
15955 builds partial trees by inspecting living objects.")
15956 (license license:lgpl2.1+)
15957 (properties `((python2-variant . ,(delay python2-astroid))))))
15958
15959 (define-public python2-astroid
15960 (let ((base (package-with-python2
15961 (strip-python2-variant python-astroid))))
15962 (package (inherit base)
15963 ;; Version 2.x removes python2 support.
15964 (version "1.6.5")
15965 (source
15966 (origin
15967 (method url-fetch)
15968 (uri (pypi-uri "astroid" version))
15969 (sha256
15970 (base32
15971 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15972 (arguments
15973 (substitute-keyword-arguments (package-arguments base)
15974 ((#:phases phases)
15975 `(modify-phases ,phases
15976 (add-after 'unpack 'remove-spurious-test
15977 (lambda _
15978 ;; https://github.com/PyCQA/astroid/issues/276
15979 (delete-file "astroid/tests/unittest_brain.py")
15980 #t))
15981 (replace 'check
15982 (lambda _
15983 (invoke"python" "-m" "unittest" "discover"
15984 "-p" "unittest*.py")))))))
15985 (native-inputs `())
15986 (propagated-inputs
15987 `(("python2-backports-functools-lru-cache"
15988 ,python2-backports-functools-lru-cache)
15989 ("python2-enum34" ,python2-enum34)
15990 ("python2-singledispatch" ,python2-singledispatch)
15991 ,@(alist-delete "python-typed-ast"
15992 (package-propagated-inputs base)))))))
15993
15994 (define-public python-isbnlib
15995 (package
15996 (name "python-isbnlib")
15997 (version "3.10.4")
15998 (source
15999 (origin
16000 (method url-fetch)
16001 (uri (pypi-uri "isbnlib" version))
16002 (sha256
16003 (base32
16004 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
16005 (build-system python-build-system)
16006 (arguments '(#:tests? #f)) ; No test
16007 (home-page "https://github.com/xlcnd/isbnlib")
16008 (synopsis "Python library to work with ISBN strings")
16009 (description "@code{python-isbnlib} is a (pure) python library that provides
16010 several useful methods and functions to validate, clean, transform, hyphenate and
16011 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
16012 version, is suitable to be include as a dependency in other projects.")
16013 (license license:lgpl3+)))
16014
16015 (define-public python-isort
16016 (package
16017 (name "python-isort")
16018 (version "4.3.4")
16019 (source
16020 (origin
16021 (method git-fetch)
16022 (uri (git-reference
16023 ;; Tests pass only from the Github sources
16024 (url "https://github.com/timothycrosley/isort")
16025 (commit version)))
16026 (file-name (git-file-name name version))
16027 (sha256
16028 (base32
16029 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
16030 (build-system python-build-system)
16031 (native-inputs
16032 `(("python-mock" ,python-mock)
16033 ("python-pytest" ,python-pytest)))
16034 (home-page "https://github.com/timothycrosley/isort")
16035 (synopsis "Python utility/library to sort python imports")
16036 (description "@code{python-isort} is a python utility/library to sort
16037 imports alphabetically, and automatically separated into sections. It
16038 provides a command line utility, a python library and plugins for various
16039 editors.")
16040 (license license:expat)
16041 (properties `((python2-variant . ,(delay python2-isort))))))
16042
16043 (define-public python2-isort
16044 (let ((base (package-with-python2
16045 (strip-python2-variant python-isort))))
16046 (package/inherit base
16047 (native-inputs
16048 `(("python2-futures" ,python2-futures)
16049 ,@(package-native-inputs base))))))
16050
16051 (define-public python2-backports-functools-lru-cache
16052 (package
16053 (name "python2-backports-functools-lru-cache")
16054 (version "1.6.1")
16055 (source
16056 (origin
16057 (method url-fetch)
16058 ;; only the pypi tarballs contain the necessary metadata
16059 (uri (pypi-uri "backports.functools_lru_cache" version))
16060 (sha256
16061 (base32
16062 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
16063 (build-system python-build-system)
16064 (native-inputs
16065 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
16066 (arguments
16067 `(#:python ,python-2))
16068 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
16069 (synopsis "Backport of functools.lru_cache from Python 3.3")
16070 (description "@code{python2-backports-functools-lru-cache} is a backport
16071 of @code{functools.lru_cache} from python 3.3.")
16072 (license license:expat)))
16073
16074 (define-public python-configparser
16075 (package
16076 (name "python-configparser")
16077 (version "4.0.2")
16078 (source
16079 (origin
16080 (method url-fetch)
16081 (uri (pypi-uri "configparser" version))
16082 (sha256
16083 (base32
16084 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
16085 (native-inputs
16086 `(("python-setuptools_scm" ,python-setuptools-scm)))
16087 (build-system python-build-system)
16088 (home-page "https://github.com/jaraco/configparser/")
16089 (synopsis "Backport of configparser from python 3.5")
16090 (description "@code{python-configparser} is a backport of
16091 @code{configparser} from Python 3.5 so that it can be used directly
16092 in other versions.")
16093 (license license:expat)))
16094
16095 (define-public python2-configparser
16096 (package-with-python2 python-configparser))
16097
16098 (define-public python-iniconfig
16099 (package
16100 (name "python-iniconfig")
16101 (version "1.1.1")
16102 (source
16103 (origin
16104 (method url-fetch)
16105 (uri (pypi-uri "iniconfig" version))
16106 (sha256
16107 (base32
16108 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
16109 (build-system python-build-system)
16110 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
16111 (synopsis "Simple INI-file parser")
16112 (description "The @code{iniconfig} package provides a small and simple
16113 INI-file parser module having a unique set of features; @code{iniconfig}
16114 @itemize
16115 @item maintains the order of sections and entries;
16116 @item supports multi-line values with or without line-continuations;
16117 @item supports \"#\" comments everywhere;
16118 @item raises errors with proper line-numbers;
16119 @item raises an error when two sections have the same name.
16120 @end itemize")
16121 (license license:expat)))
16122
16123 (define-public python-mamba
16124 (package
16125 (name "python-mamba")
16126 (version "0.11.2")
16127 (source (origin
16128 (method url-fetch)
16129 (uri (pypi-uri "mamba" version))
16130 (sha256
16131 (base32
16132 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
16133 (build-system python-build-system)
16134 (arguments `(#:tests? #f)) ; No test
16135 (propagated-inputs
16136 `(("python-clint" ,python-clint)
16137 ("python-coverage" ,python-coverage)))
16138 (home-page "https://nestorsalceda.com/mamba/")
16139 (synopsis "Test runner for Python")
16140 (description
16141 "Mamba is a Behaviour-Driven Development tool for Python developers.
16142 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
16143 (license license:expat)))
16144
16145 (define-public python-mando
16146 (package
16147 (name "python-mando")
16148 (version "0.6.4")
16149 (source (origin
16150 (method url-fetch)
16151 (uri (pypi-uri "mando" version))
16152 (sha256
16153 (base32
16154 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
16155 (build-system python-build-system)
16156 (propagated-inputs
16157 `(("python-rst2ansi" ,python-rst2ansi)
16158 ("python-six" ,python-six)))
16159 (native-inputs
16160 `(("python-pytest" ,python-pytest)))
16161 (home-page "https://mando.readthedocs.org/")
16162 (synopsis
16163 "Wrapper around argparse, allowing creation of complete CLI applications")
16164 (description
16165 "This package is a wrapper around argparse, allowing you to write complete CLI
16166 applications in seconds while maintaining all the flexibility.")
16167 (license license:expat)))
16168
16169 (define-public python2-mando
16170 (package-with-python2 python-mando))
16171
16172 (define-public python2-argparse
16173 (package
16174 (name "python2-argparse")
16175 (version "1.4.0")
16176 (source
16177 (origin
16178 (method url-fetch)
16179 (uri (pypi-uri "argparse" version))
16180 (sha256
16181 (base32
16182 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
16183 (build-system python-build-system)
16184 (arguments
16185 `(#:python ,python-2))
16186 (home-page "https://github.com/ThomasWaldmann/argparse/")
16187 (synopsis "Python command-line parsing library")
16188 (description
16189 "This package is mostly for people who want to have @code{argparse} on
16190 older Pythons because it was not part of the standard library back then.")
16191 (license license:psfl)))
16192
16193 (define-public python-fudge
16194 (package
16195 (name "python-fudge")
16196 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
16197 ;; package, which is currently the only use of this package.
16198 (version "0.9.6")
16199 (source
16200 (origin
16201 (method url-fetch)
16202 (uri (pypi-uri "fudge" version))
16203 (sha256
16204 (base32
16205 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
16206 (build-system python-build-system)
16207 (arguments
16208 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
16209 (home-page "https://github.com/fudge-py/fudge")
16210 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
16211 (description
16212 "Fudge is a Python module for using fake objects (mocks and stubs) to
16213 test real ones.
16214
16215 In readable Python code, you declare the methods available on your fake object
16216 and how they should be called. Then you inject that into your application and
16217 start testing. This declarative approach means you don’t have to record and
16218 playback actions and you don’t have to inspect your fakes after running code.
16219 If the fake object was used incorrectly then you’ll see an informative
16220 exception message with a traceback that points to the culprit.")
16221 (license license:expat)))
16222
16223 (define-public python2-fudge
16224 (package-with-python2 python-fudge))
16225
16226 (define-public python-mwclient
16227 (package
16228 (name "python-mwclient")
16229 (version "0.10.1")
16230 (source
16231 (origin
16232 (method git-fetch)
16233 ;; The PyPI version wouldn't contain tests.
16234 (uri (git-reference
16235 (url "https://github.com/mwclient/mwclient")
16236 (commit (string-append "v" version))))
16237 (file-name (git-file-name name version))
16238 (sha256
16239 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
16240 (build-system python-build-system)
16241 (propagated-inputs
16242 `(("python-requests-oauthlib" ,python-requests-oauthlib)
16243 ("python-six" ,python-six)))
16244 (native-inputs
16245 `(("python-mock" ,python-mock)
16246 ("python-pytest" ,python-pytest)
16247 ("python-pytest-cov" ,python-pytest-cov)
16248 ("python-pytest-runner" ,python-pytest-runner)
16249 ("python-responses" ,python-responses)))
16250 (home-page "https://github.com/btongminh/mwclient")
16251 (synopsis "MediaWiki API client")
16252 (description "This package provides a MediaWiki API client.")
16253 (license license:expat)))
16254
16255 (define-public python-utils
16256 (package
16257 (name "python-utils")
16258 (version "2.4.0")
16259 (source (origin
16260 (method url-fetch)
16261 (uri (pypi-uri "python-utils" version))
16262 (sha256
16263 (base32
16264 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
16265 (build-system python-build-system)
16266 (arguments
16267 `(#:phases
16268 (modify-phases %standard-phases
16269 (replace 'check
16270 (lambda* (#:key inputs outputs #:allow-other-keys)
16271 (add-installed-pythonpath inputs outputs)
16272 (delete-file "pytest.ini")
16273 (invoke "pytest" "-vv"))))))
16274 (native-inputs
16275 `(("pytest-runner" ,python-pytest-runner)
16276 ("pytest" ,python-pytest)
16277 ("six" ,python-six)))
16278 (home-page "https://github.com/WoLpH/python-utils")
16279 (synopsis "Convenient utilities not included with the standard Python install")
16280 (description
16281 "Python Utils is a collection of small Python functions and classes which
16282 make common patterns shorter and easier.")
16283 (license license:bsd-2)))
16284
16285 (define-public python2-utils
16286 (package-with-python2 python-utils))
16287
16288 (define-public python-diff-match-patch
16289 (package
16290 (name "python-diff-match-patch")
16291 (version "20121119")
16292 (source
16293 (origin
16294 (method url-fetch)
16295 (uri (pypi-uri "diff-match-patch" version))
16296 (sha256
16297 (base32
16298 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
16299 (build-system python-build-system)
16300 (home-page "https://code.google.com/p/google-diff-match-patch")
16301 (synopsis "Synchronize plain text")
16302 (description "Diff Match and Patch libraries offer robust algorithms to
16303 perform the operations required for synchronizing plain text.")
16304 (license license:asl2.0)))
16305
16306 (define-public python2-diff-match-patch
16307 (package-with-python2 python-diff-match-patch))
16308
16309 (define-public python-dirsync
16310 (package
16311 (name "python-dirsync")
16312 (version "2.2.5")
16313 (source
16314 (origin
16315 (method url-fetch)
16316 (uri (pypi-uri "dirsync" version))
16317 (sha256
16318 (base32
16319 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
16320 (build-system python-build-system)
16321 (propagated-inputs
16322 `(("six" ,python-six)))
16323 (home-page "https://github.com/tkhyn/dirsync")
16324 (synopsis "Advanced directory tree synchronisation tool")
16325 (description "Advanced directory tree synchronisation tool.")
16326 (license license:expat)))
16327
16328 (define-public python2-dirsync
16329 (package-with-python2 python-dirsync))
16330
16331 (define-public python-levenshtein
16332 (package
16333 (name "python-levenshtein")
16334 (version "0.12.0")
16335 (source
16336 (origin
16337 (method url-fetch)
16338 (uri (pypi-uri "python-Levenshtein" version))
16339 (sha256
16340 (base32
16341 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
16342 (build-system python-build-system)
16343 (home-page "https://github.com/ztane/python-Levenshtein")
16344 (synopsis "Fast computation of Levenshtein distance and string similarity")
16345 (description
16346 "The Levenshtein Python C extension module contains functions for fast computation of
16347 @enumerate
16348 @item Levenshtein (edit) distance, and edit operations
16349 @item string similarity
16350 @item approximate median strings, and generally string averaging
16351 @item string sequence and set similarity
16352 @end enumerate
16353 It supports both normal and Unicode strings.")
16354 (license license:gpl2+)))
16355
16356 (define-public python2-levenshtein
16357 (package-with-python2 python-levenshtein))
16358
16359 (define-public python-scandir
16360 (package
16361 (name "python-scandir")
16362 (version "1.10.0")
16363 (source
16364 (origin
16365 (method url-fetch)
16366 (uri (pypi-uri "scandir" version))
16367 (sha256
16368 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
16369 (build-system python-build-system)
16370 (arguments
16371 `(#:phases (modify-phases %standard-phases
16372 (replace 'check
16373 (lambda _
16374 (invoke "python" "test/run_tests.py"))))))
16375 (home-page "https://github.com/benhoyt/scandir")
16376 (synopsis "Directory iteration function")
16377 (description
16378 "Directory iteration function like os.listdir(), except that instead of
16379 returning a list of bare filenames, it yields DirEntry objects that include
16380 file type and stat information along with the name. Using scandir() increases
16381 the speed of os.walk() by 2-20 times (depending on the platform and file
16382 system) by avoiding unnecessary calls to os.stat() in most cases.
16383
16384 This package is part of the Python standard library since version 3.5.")
16385 (license license:bsd-3)))
16386
16387 (define-public python2-scandir
16388 (package-with-python2 python-scandir))
16389
16390 (define-public python2-stemming
16391 (package
16392 (name "python2-stemming")
16393 (version "1.0.1")
16394 (source
16395 (origin
16396 (method url-fetch)
16397 (uri (pypi-uri "stemming" version))
16398 (sha256
16399 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
16400 (build-system python-build-system)
16401 (arguments
16402 `(#:python ,python-2))
16403 (home-page "https://bitbucket.org/mchaput/stemming/overview")
16404 (synopsis "Python implementations of various stemming algorithms")
16405 (description
16406 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
16407 stemming algorithms for English. These implementations are straightforward and
16408 efficient, unlike some Python versions of the same algorithms available on the
16409 Web. This package is an extraction of the stemming code included in the Whoosh
16410 search engine.")
16411 (license license:public-domain)))
16412
16413 (define-public python-factory-boy
16414 (package
16415 (name "python-factory-boy")
16416 (version "2.8.1")
16417 (source
16418 (origin
16419 (method url-fetch)
16420 (uri (pypi-uri "factory_boy" version))
16421 (sha256
16422 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
16423 (build-system python-build-system)
16424 (arguments
16425 ;; Tests are not included in the tarball.
16426 `(#:tests? #f))
16427 (propagated-inputs
16428 `(("faker" ,python-faker)))
16429 (home-page "https://github.com/benhoyt/scandir")
16430 (synopsis "Versatile test fixtures replacement")
16431 (description
16432 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
16433
16434 As a fixtures replacement tool, it aims to replace static, hard to maintain
16435 fixtures with easy-to-use factories for complex object.
16436
16437 Instead of building an exhaustive test setup with every possible combination
16438 of corner cases, factory_boy allows you to use objects customized for the
16439 current test, while only declaring the test-specific fields")
16440 (license license:expat)))
16441
16442 (define-public python2-factory-boy
16443 (package-with-python2 python-factory-boy))
16444
16445 (define-public python-translate-toolkit
16446 (package
16447 (name "python-translate-toolkit")
16448 (version "2.1.0")
16449 (source
16450 (origin
16451 (method url-fetch)
16452 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
16453 (sha256
16454 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
16455 (build-system python-build-system)
16456 (native-inputs
16457 `(("python-pytest" ,python-pytest)
16458 ("python-sphinx" ,python-sphinx)))
16459 (propagated-inputs
16460 `(("python-babel" ,python-babel)
16461 ("python-beautifulsoup4" ,python-beautifulsoup4)
16462 ("python-chardet" ,python-chardet)
16463 ("python-diff-match-patch" ,python-diff-match-patch)
16464 ("python-levenshtein" ,python-levenshtein)
16465 ("python-lxml" ,python-lxml)
16466 ("python-six" ,python-six)
16467 ("python-vobject" ,python-vobject)
16468 ("python-pyyaml" ,python-pyyaml)))
16469 (arguments
16470 ;; TODO: tests are not run, because they end with
16471 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
16472 ;; 'parse_funcs'
16473 ;; during test setup.
16474 `(#:tests? #f))
16475 (home-page "https://toolkit.translatehouse.org")
16476 (synopsis "Tools and API for translation and localization engineering")
16477 (description
16478 "Tools and API for translation and localization engineering. It contains
16479 several utilities, as well as an API for building localization tools.")
16480 (license license:gpl2+)))
16481
16482 (define-public python2-translate-toolkit
16483 (package-with-python2 python-translate-toolkit))
16484
16485 (define-public python-packaging
16486 (package
16487 (name "python-packaging")
16488 (version "20.0")
16489 (source
16490 (origin
16491 (method url-fetch)
16492 (uri (pypi-uri "packaging" version))
16493 ;; XXX: The URL in the patch file is wrong, it should be
16494 ;; <https://github.com/pypa/packaging/pull/256>.
16495 (patches (search-patches "python-packaging-test-arch.patch"))
16496 (sha256
16497 (base32
16498 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
16499 (build-system python-build-system)
16500 (arguments
16501 `(#:phases (modify-phases %standard-phases
16502 (replace 'check
16503 (lambda* (#:key tests? #:allow-other-keys)
16504 (if tests?
16505 (invoke "py.test" "-vv")
16506 (format #t "test suite not run~%"))
16507 #t)))))
16508 (native-inputs
16509 `(("python-pretend" ,python-pretend)
16510 ("python-pytest" ,python-pytest)))
16511 (propagated-inputs
16512 `(("python-pyparsing" ,python-pyparsing)
16513 ("python-six" ,python-six)))
16514 (home-page "https://github.com/pypa/packaging")
16515 (synopsis "Core utilities for Python packages")
16516 (description "Packaging is a Python module for dealing with Python packages.
16517 It offers an interface for working with package versions, names, and dependency
16518 information.")
16519 ;; From 'LICENSE': This software is made available under the terms of
16520 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
16521 ;; Contributions to this software is made under the terms of *both* these
16522 ;; licenses.
16523 (license (list license:asl2.0 license:bsd-2))))
16524
16525 (define-public python2-packaging
16526 (package-with-python2 python-packaging))
16527
16528 ;; Variants with minimal dependencies, for bootstrapping Pytest.
16529 (define-public python-packaging-bootstrap
16530 (hidden-package
16531 (package/inherit
16532 python-packaging
16533 (name "python-packaging-bootstrap")
16534 (native-inputs '())
16535 (propagated-inputs
16536 `(("python-pyparsing" ,python-pyparsing)))
16537 (arguments '(#:tests? #f)))))
16538
16539 (define-public python2-packaging-bootstrap
16540 (hidden-package
16541 (package/inherit
16542 python2-packaging
16543 (name "python2-packaging-bootstrap")
16544 (native-inputs '())
16545 (propagated-inputs
16546 `(("python-pyparsing" ,python2-pyparsing)))
16547 (arguments
16548 `(#:tests? #f
16549 ,@(package-arguments python2-packaging))))))
16550
16551 (define-public python-relatorio
16552 (package
16553 (name "python-relatorio")
16554 (version "0.8.0")
16555 (source
16556 (origin
16557 (method url-fetch)
16558 (uri (pypi-uri "relatorio" version))
16559 (sha256
16560 (base32
16561 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16562 (build-system python-build-system)
16563 (propagated-inputs
16564 `(("python-lxml" ,python-lxml)
16565 ("python-genshi" ,python-genshi)))
16566 (native-inputs
16567 `(("python-magic" ,python-magic)))
16568 (home-page "https://relatorio.tryton.org/")
16569 (synopsis "Templating library able to output ODT and PDF files")
16570 (description "Relatorio is a templating library which provides a way to
16571 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16572 for more filetypes can be easily added by creating plugins for them.")
16573 (license license:gpl3+)))
16574
16575 (define-public python2-relatorio
16576 (package-with-python2 python-relatorio))
16577
16578 (define-public python-radon
16579 (package
16580 (name "python-radon")
16581 (version "4.1.0")
16582 (source
16583 (origin
16584 (method url-fetch)
16585 (uri (pypi-uri "radon" version))
16586 (sha256
16587 (base32
16588 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
16589 (build-system python-build-system)
16590 (arguments
16591 `(#:phases (modify-phases %standard-phases
16592 (replace 'check
16593 (lambda _
16594 (invoke "python" "radon/tests/run.py"))))))
16595 (propagated-inputs
16596 `(("python-colorama" ,python-colorama)
16597 ("python-flake8-polyfill" ,python-flake8-polyfill)
16598 ("python-mando" ,python-mando)))
16599 (native-inputs
16600 `(("python-pytest" ,python-pytest)
16601 ("python-pytest-mock" ,python-pytest-mock)))
16602 (home-page "https://radon.readthedocs.org/")
16603 (synopsis "Code Metrics in Python")
16604 (description "Radon is a Python tool which computes various code metrics.
16605 Supported metrics are:
16606 @itemize @bullet
16607 @item raw metrics: SLOC, comment lines, blank lines, &c.
16608 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16609 @item Halstead metrics (all of them)
16610 @item the Maintainability Index (a Visual Studio metric)
16611 @end itemize")
16612 (properties `((python2-variant . ,(delay python2-radon))))
16613 (license license:expat)))
16614
16615 (define-public python2-radon
16616 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16617 (package/inherit base
16618 (propagated-inputs
16619 `(("python-configparser" ,python2-configparser)
16620 ("python-future" ,python2-future)
16621 ,@(package-propagated-inputs base))))))
16622
16623 (define-public python-sure
16624 (package
16625 (name "python-sure")
16626 (version "1.4.11")
16627 (source
16628 (origin
16629 (method url-fetch)
16630 (uri (pypi-uri "sure" version))
16631 (sha256
16632 (base32
16633 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16634 (build-system python-build-system)
16635 (propagated-inputs
16636 `(("python-mock" ,python-mock)
16637 ("python-six" ,python-six)))
16638 (native-inputs
16639 `(("python-nose" ,python-nose)))
16640 (home-page "https://github.com/gabrielfalcao/sure")
16641 (synopsis "Automated testing library in python for python")
16642 (description
16643 "Sure is a python library that leverages a DSL for writing assertions.
16644 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16645 (license license:gpl3+)))
16646
16647 (define-public python2-sure
16648 (package-with-python2 python-sure))
16649
16650 (define-public python2-couleur
16651 ;; This package does not seem to support python3 at all, hence,
16652 ;; only the python2 variant definition is provided.
16653 (package
16654 (name "python2-couleur")
16655 (version "0.6.2")
16656 (source
16657 (origin
16658 (method url-fetch)
16659 (uri (pypi-uri "couleur" version))
16660 (sha256
16661 (base32
16662 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16663 (build-system python-build-system)
16664 (arguments
16665 `(#:python ,python-2))
16666 (home-page "https://github.com/gabrielfalcao/couleur")
16667 (synopsis
16668 "ANSI terminal tool for python, colored shell and other handy fancy features")
16669 (description
16670 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16671 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16672 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16673 ;; https://github.com/gabrielfalcao/couleur/issues/11
16674 (license license:lgpl3+)))
16675
16676 (define-public python-misaka
16677 (package
16678 (name "python-misaka")
16679 (version "2.1.1")
16680 (source
16681 (origin
16682 (method url-fetch)
16683 (uri (pypi-uri "misaka" version))
16684 (sha256
16685 (base32
16686 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16687 (build-system python-build-system)
16688 (arguments
16689 `(;; Line 37 of setup.py calls self.run_command('develop')
16690 ;; in the 'check' phase. This command seems to be trying
16691 ;; to write to
16692 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16693 ;; for which it does not have the permission to write.
16694 #:tests? #f))
16695 (propagated-inputs
16696 `(("python-cffi" ,python-cffi)))
16697 (home-page "https://github.com/FSX/misaka")
16698 (synopsis "Python binding for Hoedown")
16699 (description
16700 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16701 library written in C. It features a fast HTML renderer and functionality to make custom
16702 renderers (e.g. man pages or LaTeX).")
16703 (license license:expat)))
16704
16705 (define-public python2-misaka
16706 (package-with-python2 python-misaka))
16707
16708 (define-public python2-steadymark
16709 ;; This is forced into being a python2 only variant
16710 ;; due to its dependence on couleur that has no support
16711 ;; for python3
16712 (package
16713 (name "python2-steadymark")
16714 (version "0.7.3")
16715 (source
16716 (origin
16717 (method url-fetch)
16718 (uri (pypi-uri "steadymark" version))
16719 (sha256
16720 (base32
16721 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16722 (build-system python-build-system)
16723 (native-inputs
16724 `(("python-couleur" ,python2-couleur)
16725 ("python-sure" ,python2-sure)
16726 ("python-misaka" ,python2-misaka)))
16727 (arguments
16728 `(#:python ,python-2
16729 #:phases
16730 (modify-phases %standard-phases
16731 (add-before 'build 'patch-setup-py
16732 (lambda _
16733 ;; Update requirements from dependency==version
16734 ;; to dependency>=version
16735 (substitute* "setup.py"
16736 (("==") ">="))
16737 #t)))))
16738 (home-page "https://github.com/gabrielfalcao/steadymark")
16739 (synopsis "Markdown-based test runner for python")
16740 (description
16741 "@code{Steadymark} allows documentation to be written in github-flavoured
16742 markdown. The documentation may contain snippets of code surrounded by python
16743 code blocks and @code{Steadymark} will find these snippets and run them, making
16744 sure that there are no old malfunctional examples in the documentation examples.")
16745 (license license:expat)))
16746
16747 (define-public python-jsonpointer
16748 (package
16749 (name "python-jsonpointer")
16750 (version "1.10")
16751 (source
16752 (origin
16753 (method url-fetch)
16754 (uri (pypi-uri "jsonpointer" version))
16755 (sha256
16756 (base32
16757 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16758 (build-system python-build-system)
16759 (home-page "https://github.com/stefankoegl/python-json-pointer")
16760 (synopsis "Identify specific nodes in a JSON document")
16761 (description "@code{jsonpointer} allows you to access specific nodes
16762 by path in a JSON document (see RFC 6901).")
16763 (license license:bsd-3)))
16764
16765 (define-public python2-jsonpointer
16766 (package-with-python2 python-jsonpointer))
16767
16768 (define-public python-jsonpatch
16769 (package
16770 (name "python-jsonpatch")
16771 (version "1.16")
16772 (source
16773 (origin
16774 (method git-fetch)
16775 ;; pypi version lacks tests.js
16776 (uri (git-reference
16777 (url "https://github.com/stefankoegl/python-json-patch")
16778 (commit (string-append "v" version))))
16779 (file-name (git-file-name name version))
16780 (sha256
16781 (base32
16782 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16783 (build-system python-build-system)
16784 (propagated-inputs
16785 `(("python-jsonpointer" ,python-jsonpointer)))
16786 (home-page "https://github.com/stefankoegl/python-json-patch")
16787 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16788 (description "@code{jsonpatch} is a library and program that allows
16789 applying JSON Patches according to RFC 6902.")
16790 (license license:bsd-3)))
16791
16792 (define-public python2-jsonpatch
16793 (package-with-python2 python-jsonpatch))
16794
16795 (define-public python-jsonpatch-0.4
16796 (package (inherit python-jsonpatch)
16797 (name "python-jsonpatch")
16798 (version "0.4")
16799 (source
16800 (origin
16801 (method git-fetch)
16802 (uri (git-reference
16803 (url "https://github.com/stefankoegl/python-json-patch")
16804 (commit (string-append "v" version))))
16805 (file-name (git-file-name name version))
16806 (sha256
16807 (base32
16808 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16809
16810 (define-public python2-jsonpatch-0.4
16811 (package-with-python2 python-jsonpatch-0.4))
16812
16813 (define-public python-rfc3986
16814 (package
16815 (name "python-rfc3986")
16816 (version "1.4.0")
16817 (source (origin
16818 (method url-fetch)
16819 (uri (pypi-uri "rfc3986" version))
16820 (sha256
16821 (base32
16822 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16823 (build-system python-build-system)
16824 (arguments
16825 `(#:modules ((guix build utils)
16826 (guix build python-build-system)
16827 (ice-9 ftw)
16828 (srfi srfi-1)
16829 (srfi srfi-26))
16830 #:phases
16831 (modify-phases %standard-phases
16832 (replace 'check
16833 (lambda _
16834 (let ((cwd (getcwd)))
16835 (setenv "PYTHONPATH"
16836 (string-append cwd "/build/"
16837 (find (cut string-prefix? "lib" <>)
16838 (scandir (string-append cwd "/build")))
16839 ":"
16840 (getenv "PYTHONPATH")))
16841 (invoke "pytest" "-v")))))))
16842 (native-inputs
16843 `(("python-pytest" ,python-pytest)))
16844 (home-page "https://rfc3986.readthedocs.io/")
16845 (synopsis "Parse and validate URI references")
16846 (description
16847 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16848 validation and authority parsing. This module also supports RFC@tie{}6874
16849 which adds support for zone identifiers to IPv6 addresses.")
16850 (license license:asl2.0)))
16851
16852 (define-public python2-rfc3986
16853 (package-with-python2 python-rfc3986))
16854
16855 (define-public python-rfc3987
16856 (package
16857 (name "python-rfc3987")
16858 (version "1.3.7")
16859 (source
16860 (origin
16861 (method url-fetch)
16862 (uri (pypi-uri "rfc3987" version))
16863 (sha256
16864 (base32
16865 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16866 (build-system python-build-system)
16867 (home-page "https://pypi.org/project/rfc3987/")
16868 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16869 (description "@code{rfc3987} provides routines for parsing and
16870 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16871 (license license:gpl3+)))
16872
16873 (define-public python2-rfc3987
16874 (package-with-python2 python-rfc3987))
16875
16876 ;; The latest commit contains fixes for building with both python3 and python2.
16877 (define-public python-rfc6555
16878 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16879 (revision "1"))
16880 (package
16881 (name "python-rfc6555")
16882 (version (git-version "0.0.0" revision commit))
16883 (source (origin
16884 (method git-fetch)
16885 (uri (git-reference
16886 (url "https://github.com/sethmlarson/rfc6555")
16887 (commit commit)))
16888 (file-name (git-file-name name version))
16889 (sha256
16890 (base32
16891 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16892 (build-system python-build-system)
16893 (arguments
16894 '(#:phases
16895 (modify-phases %standard-phases
16896 (replace 'check
16897 (lambda* (#:key tests? #:allow-other-keys)
16898 (if tests?
16899 ;; Other tests require network access.
16900 (invoke "pytest" "tests/test_ipv6.py")
16901 #t))))))
16902 (native-inputs
16903 `(("python-pytest" ,python-pytest)))
16904 (home-page "https://pypi.org/project/rfc6555/")
16905 (synopsis "Python implementation of RFC 6555")
16906 (description
16907 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16908 6555. Provided with a single file and dead-simple API to allow easy vendoring
16909 and integration into other projects.")
16910 (properties `((python2-variant . ,(delay python2-rfc6555))))
16911 (license license:asl2.0))))
16912
16913 (define-public python2-rfc6555
16914 (let ((base (package-with-python2
16915 (strip-python2-variant python-rfc6555))))
16916 (package/inherit base
16917 (propagated-inputs
16918 `(("python2-selectors2" ,python2-selectors2))))))
16919
16920 (define-public python-bagit
16921 (package
16922 (name "python-bagit")
16923 (version "1.7.0")
16924 (source
16925 (origin
16926 (method url-fetch)
16927 (uri (pypi-uri "bagit" version))
16928 (sha256
16929 (base32
16930 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
16931 (build-system python-build-system)
16932 (native-inputs
16933 `(("python-setuptools-scm" ,python-setuptools-scm)
16934 ("python-coverage" ,python-coverage)
16935 ("python-mock" ,python-mock)))
16936 (home-page "https://libraryofcongress.github.io/bagit-python/")
16937 (synopsis "Create and validate BagIt packages")
16938 (description "Bagit is a Python library and command line utility for working
16939 with BagIt style packages. BagIt is a minimalist packaging format for digital
16940 preservation.")
16941 (license license:cc0)))
16942
16943 (define-public python-prov
16944 (package
16945 (name "python-prov")
16946 (version "2.0.0")
16947 (source
16948 (origin
16949 (method url-fetch)
16950 (uri (pypi-uri "prov" version))
16951 (sha256
16952 (base32
16953 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
16954 (build-system python-build-system)
16955 (propagated-inputs
16956 `(("python-dateutil" ,python-dateutil)
16957 ("python-lxml" ,python-lxml)
16958 ("python-networkx" ,python-networkx)
16959 ("python-rdflib" ,python-rdflib)))
16960 (native-inputs
16961 `(("graphviz" ,graphviz)
16962 ("python-pydot" ,python-pydot)))
16963 (home-page "https://github.com/trungdong/prov")
16964 (synopsis
16965 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
16966 (description
16967 "This package provides a library for W3C Provenance Data Model supporting
16968 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
16969 (license license:expat)))
16970
16971 (define-public python-arcp
16972 (package
16973 (name "python-arcp")
16974 (version "0.2.1")
16975 (source
16976 (origin
16977 (method url-fetch)
16978 (uri (pypi-uri "arcp" version))
16979 (sha256
16980 (base32
16981 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
16982 (build-system python-build-system)
16983 (native-inputs
16984 `(("python-pytest" ,python-pytest)))
16985 (home-page "http://arcp.readthedocs.io/")
16986 (synopsis
16987 "Archive and Package URI parser and generator")
16988 (description
16989 "@acronym{arcp, Archive and Package} provides functions for creating
16990 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
16991 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
16992 consume or reference hypermedia resources bundled inside a file archive or an
16993 application package, as well as to resolve URIs for archive resources within a
16994 programmatic framework. This URI scheme provides mechanisms to generate a
16995 unique base URI to represent the root of the archive, so that relative URI
16996 references in a bundled resource can be resolved within the archive without
16997 having to extract the archive content on the local file system. An arcp URI can
16998 be used for purposes of isolation (e.g. when consuming multiple archives),
16999 security constraints (avoiding \"climb out\" from the archive), or for
17000 externally identiyfing sub-resources referenced by hypermedia formats.")
17001 (license license:asl2.0)))
17002
17003 (define-public python-shellescape
17004 (package
17005 (name "python-shellescape")
17006 (version "3.8.1")
17007 (source
17008 (origin
17009 (method git-fetch)
17010 (uri (git-reference
17011 (url "https://github.com/chrissimpkins/shellescape")
17012 (commit (string-append "v" version))))
17013 (file-name (git-file-name name version))
17014 (sha256
17015 (base32
17016 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
17017 (build-system python-build-system)
17018 (arguments
17019 '(#:phases
17020 (modify-phases %standard-phases
17021 (replace 'check
17022 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
17023 (when tests?
17024 (add-installed-pythonpath inputs outputs)
17025 (invoke "python" "tests/test_shellescape.py"))
17026 #t)))))
17027 (native-inputs
17028 `(("python-pytest" ,python-pytest)))
17029 (home-page "https://github.com/chrissimpkins/shellescape")
17030 (synopsis
17031 "Shell escape a string to safely use it as a token in a shell command")
17032 (description
17033 "The shellescape Python module defines the @code{shellescape.quote()}
17034 function that returns a shell-escaped version of a Python string. This is a
17035 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
17036 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
17037 (license license:expat)))
17038
17039 (define-public python-validators
17040 (package
17041 (name "python-validators")
17042 (version "0.14.2")
17043 (source (origin
17044 (method url-fetch)
17045 (uri (pypi-uri "validators" version))
17046 (sha256
17047 (base32
17048 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
17049 (build-system python-build-system)
17050 (arguments
17051 '(#:phases (modify-phases %standard-phases
17052 (replace 'check
17053 (lambda _
17054 (invoke "pytest" "-vv"))))))
17055 (propagated-inputs
17056 `(("python-decorator" ,python-decorator)
17057 ("python-six" ,python-six)))
17058 (native-inputs
17059 `(("python-flake8" ,python-flake8)
17060 ("python-isort" ,python-isort)
17061 ("python-pytest" ,python-pytest)))
17062 (home-page "https://github.com/kvesteri/validators")
17063 (synopsis "Data validation library")
17064 (description
17065 "This package contains validators for different things such as email
17066 addresses, IP addresses, URLs, hashes and more. It has been designed to
17067 be easy to use and not require defining a schema or form just to validate
17068 some input.")
17069 (license license:expat)))
17070
17071 (define-public python2-validators
17072 (package-with-python2 python-validators))
17073
17074 (define-public python-validate-email
17075 (package
17076 (name "python-validate-email")
17077 (version "1.3")
17078 (source
17079 (origin
17080 (method url-fetch)
17081 (uri (pypi-uri "validate_email" version))
17082 (sha256
17083 (base32
17084 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
17085 (build-system python-build-system)
17086 (home-page "https://github.com/syrusakbary/validate_email")
17087 (synopsis "Verifies if an email address is valid and really exists")
17088 (description "@code{validate_email} can be used to verify if an email
17089 address is valid and really exists.")
17090 (license license:lgpl3+)))
17091
17092 (define-public python2-validate-email
17093 (package-with-python2 python-validate-email))
17094
17095 (define-public python-flex
17096 (package
17097 (name "python-flex")
17098 (version "6.10.0")
17099 (source
17100 (origin
17101 (method url-fetch)
17102 (uri (pypi-uri "flex" version))
17103 (sha256
17104 (base32
17105 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
17106 (build-system python-build-system)
17107 (propagated-inputs
17108 `(("python-click" ,python-click)
17109 ("python-iso8601" ,python-iso8601)
17110 ("python-jsonpointer" ,python-jsonpointer)
17111 ("python-pyyaml" ,python-pyyaml)
17112 ("python-requests" ,python-requests)
17113 ("python-rfc3987" ,python-rfc3987)
17114 ("python-six" ,python-six)
17115 ("python-validate-email" ,python-validate-email)))
17116 (home-page "https://github.com/pipermerriam/flex")
17117 (synopsis "Validates Swagger schemata")
17118 (description "@code{flex} can be used to validate Swagger schemata.")
17119 (license license:bsd-3)))
17120
17121 (define-public python2-flex
17122 (package-with-python2 python-flex))
17123
17124 (define-public python-marshmallow
17125 (package
17126 (name "python-marshmallow")
17127 (version "3.9.1")
17128 (source
17129 (origin
17130 (method url-fetch)
17131 (uri (pypi-uri "marshmallow" version))
17132 (sha256
17133 (base32
17134 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
17135 (build-system python-build-system)
17136 (propagated-inputs
17137 `(("python-dateutil" ,python-dateutil)
17138 ("python-simplejson" ,python-simplejson)))
17139 (native-inputs
17140 `(("python-pytest" ,python-pytest)
17141 ("python-pytz" ,python-pytz)))
17142 (home-page "https://github.com/marshmallow-code/marshmallow")
17143 (synopsis "Convert complex datatypes to and from native
17144 Python datatypes.")
17145 (description "@code{marshmallow} provides a library for converting
17146 complex datatypes to and from native Python datatypes.")
17147 (license license:expat)))
17148
17149 (define-public python-apispec
17150 (package
17151 (name "python-apispec")
17152 (version "4.0.0")
17153 (source
17154 (origin
17155 (method url-fetch)
17156 (uri (pypi-uri "apispec" version))
17157 (sha256
17158 (base32
17159 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
17160 (build-system python-build-system)
17161 (arguments
17162 '(#:phases (modify-phases %standard-phases
17163 (add-after 'unpack 'disable-prance-tests
17164 (lambda _
17165 ;; Disable validation tests since they require the
17166 ;; optional 'prance' library which is not yet in Guix.
17167 (substitute* "tests/test_ext_marshmallow_openapi.py"
17168 (("def test_openapi_tools_validate.*" all)
17169 (string-append "@pytest.mark.xfail\n" all)))))
17170 (replace 'check
17171 (lambda _
17172 (setenv "PYTHONPATH"
17173 (string-append "./build/lib:"
17174 (getenv "PYTHONPATH")))
17175 (invoke "pytest" "-vv"))))))
17176 (propagated-inputs
17177 `(("python-pyyaml" ,python-pyyaml)))
17178 (native-inputs
17179 `(("python-pytest" ,python-pytest)
17180 ("python-marshmallow" ,python-marshmallow)))
17181 (home-page "https://github.com/marshmallow-code/apispec")
17182 (synopsis "Swagger/OpenAPI specification generator")
17183 (description "@code{python-apispec} is a pluggable API specification
17184 generator. It currently supports the OpenAPI specification, formerly known
17185 as Swagger.")
17186 (license license:expat)))
17187
17188 (define-public python-flasgger
17189 (package
17190 (name "python-flasgger")
17191 (version "0.6.3")
17192 (source
17193 (origin
17194 (method git-fetch)
17195 (uri (git-reference
17196 (url "https://github.com/rochacbruno/flasgger")
17197 (commit version)))
17198 (file-name (git-file-name name version))
17199 (sha256
17200 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
17201 (build-system python-build-system)
17202 (arguments
17203 `(#:phases
17204 (modify-phases %standard-phases
17205 (replace 'check
17206 (lambda* (#:key inputs outputs #:allow-other-keys)
17207 (substitute* "Makefile"
17208 (("flake8 flasgger --ignore=F403")
17209 "flake8 flasgger --ignore=E731,F403"))
17210 (setenv "PYTHONPATH" (string-append (getcwd)
17211 ":"
17212 (getenv "PYTHONPATH")))
17213 (invoke "py.test"))))))
17214 (propagated-inputs
17215 `(("python-flask" ,python-flask)
17216 ("python-pyyaml" ,python-pyyaml)
17217 ("python-jsonschema" ,python-jsonschema)
17218 ("python-mistune" ,python-mistune)
17219 ("python-six" ,python-six)))
17220 (native-inputs
17221 `(("python-decorator" ,python-decorator)
17222 ("python-flake8" ,python-flake8)
17223 ("python-flask-restful" ,python-flask-restful)
17224 ("python-flex" ,python-flex)
17225 ("python-pytest" ,python-pytest)
17226 ("python-pytest-cov" ,python-pytest-cov)
17227 ("python-marshmallow" ,python-marshmallow)
17228 ("python-apispec" ,python-apispec)))
17229 (home-page "https://github.com/rochacbruno/flasgger/")
17230 (synopsis "Extract Swagger specs from your Flask project")
17231 (description "@code{python-flasgger} allows extracting Swagger specs
17232 from your Flask project. It is a fork of Flask-Swagger.")
17233 (license license:expat)))
17234
17235 (define-public python-swagger-spec-validator
17236 (package
17237 (name "python-swagger-spec-validator")
17238 (version "2.4.3")
17239 (source
17240 (origin
17241 (method url-fetch)
17242 (uri (pypi-uri "swagger-spec-validator" version))
17243 (sha256
17244 (base32
17245 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
17246 (build-system python-build-system)
17247 (propagated-inputs
17248 `(("python-jsonschema" ,python-jsonschema)
17249 ("python-pyyaml" ,python-pyyaml)
17250 ("python-six" ,python-six)))
17251 (home-page
17252 "https://github.com/Yelp/swagger_spec_validator")
17253 (synopsis "Validation of Swagger specifications")
17254 (description "@code{swagger_spec_validator} provides a library for
17255 validating Swagger API specifications.")
17256 (license license:asl2.0)))
17257
17258 (define-public python2-swagger-spec-validator
17259 (package-with-python2 python-swagger-spec-validator))
17260
17261 (define-public python-apache-libcloud
17262 (package
17263 (name "python-apache-libcloud")
17264 (version "3.1.0")
17265 (source
17266 (origin
17267 (method url-fetch)
17268 (uri (pypi-uri "apache-libcloud" version))
17269 (sha256
17270 (base32
17271 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
17272 (build-system python-build-system)
17273 (arguments
17274 `(#:phases
17275 (modify-phases %standard-phases
17276 (add-after 'unpack 'patch-ssh
17277 (lambda* (#:key inputs #:allow-other-keys)
17278 (substitute* "libcloud/compute/ssh.py"
17279 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
17280 "/bin/ssh" "'")))
17281 #t))
17282 (add-after 'unpack 'patch-tests
17283 (lambda _
17284 (substitute* "libcloud/test/compute/test_ssh_client.py"
17285 (("class ShellOutSSHClientTests")
17286 "@unittest.skip(\"Guix container doesn't have ssh service\")
17287 class ShellOutSSHClientTests"))
17288 #t))
17289 (add-before 'check 'copy-secret
17290 (lambda _
17291 (copy-file "libcloud/test/secrets.py-dist"
17292 "libcloud/test/secrets.py")
17293 #t)))))
17294 (inputs
17295 `(("openssh" ,openssh)))
17296 (propagated-inputs
17297 `(("python-paramiko" ,python-paramiko)
17298 ("python-requests" ,python-requests)))
17299 (native-inputs
17300 `(("python-lockfile" ,python-lockfile)
17301 ("python-mock" ,python-mock)
17302 ("python-pytest" ,python-pytest)
17303 ("python-pytest-runner" ,python-pytest-runner)
17304 ("python-requests-mock" ,python-requests-mock)))
17305 (home-page "https://libcloud.apache.org/")
17306 (synopsis "Unified Cloud API")
17307 (description "@code{libcloud} is a Python library for interacting with
17308 many of the popular cloud service providers using a unified API.")
17309 (license license:asl2.0)))
17310
17311 (define-public python-smmap
17312 (package
17313 (name "python-smmap")
17314 (version "3.0.1")
17315 (source
17316 (origin
17317 (method url-fetch)
17318 (uri (pypi-uri "smmap" version))
17319 (sha256
17320 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
17321 (build-system python-build-system)
17322 (native-inputs
17323 `(("python-nosexcover" ,python-nosexcover)))
17324 (home-page "https://github.com/Byron/smmap")
17325 (synopsis "Python sliding window memory map manager")
17326 (description "@code{smmap} is a pure Python implementation of a sliding
17327 window memory map manager.")
17328 (license license:bsd-3)))
17329
17330 (define-public python-smmap2
17331 (deprecated-package "python-smmap2" python-smmap))
17332
17333 (define-public python2-smmap
17334 (package-with-python2 python-smmap))
17335
17336 (define-public python2-smmap2
17337 (deprecated-package "python2-smmap2" python2-smmap))
17338
17339 (define-public python-regex
17340 (package
17341 (name "python-regex")
17342 (version "2020.6.8")
17343 (source (origin
17344 (method url-fetch)
17345 (uri (pypi-uri "regex" version))
17346 (sha256
17347 (base32
17348 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
17349 (build-system python-build-system)
17350 (arguments
17351 '(#:phases
17352 (modify-phases %standard-phases
17353 (replace 'check
17354 (lambda* (#:key inputs outputs #:allow-other-keys)
17355 (add-installed-pythonpath inputs outputs)
17356 (invoke "python" "-c"
17357 "from regex.test_regex import test_main; test_main()"))))))
17358 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
17359 (synopsis "Alternative regular expression module")
17360 (description "This regular expression implementation is backwards-
17361 compatible with the standard @code{re} module, but offers additional
17362 functionality like full case-folding for case-insensitive matches in Unicode.")
17363 (license license:psfl)))
17364
17365 (define-public python2-regex
17366 (package-with-python2 python-regex))
17367
17368 (define-public python-pyopengl
17369 (package
17370 (name "python-pyopengl")
17371 (version "3.1.5")
17372 (source
17373 (origin
17374 (method url-fetch)
17375 (uri (pypi-uri "PyOpenGL" version))
17376 (sha256
17377 (base32
17378 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
17379 (build-system python-build-system)
17380 (inputs
17381 `(("mesa" ,mesa)
17382 ("freeglut" ,freeglut)
17383 ("glu" ,glu)))
17384 (arguments
17385 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
17386 ;attribute 'OSMesa'
17387 #:phases
17388 (modify-phases %standard-phases
17389 (add-before 'build 'fix-paths
17390 (lambda* (#:key inputs outputs #:allow-other-keys)
17391 (substitute* '("OpenGL/platform/ctypesloader.py")
17392 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
17393 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
17394 (("'GL'")
17395 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
17396 (("'GLU'")
17397 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
17398 (("'glut',")
17399 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
17400 (("'GLESv1_CM'")
17401 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
17402 (("'GLESv2'")
17403 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
17404 ;; Not providing libgle. It seems to be very old.
17405 #t)))))
17406 (home-page "http://pyopengl.sourceforge.net")
17407 (synopsis "Standard OpenGL bindings for Python")
17408 (description
17409 "PyOpenGL is the most common cross platform Python binding to OpenGL and
17410 related APIs. The binding is created using the standard @code{ctypes}
17411 library.")
17412 (license license:bsd-3)))
17413
17414 (define-public python-pyopengl-accelerate
17415 (package
17416 (inherit python-pyopengl)
17417 (name "python-pyopengl-accelerate")
17418 (version "3.1.5")
17419 (source
17420 (origin
17421 (method url-fetch)
17422 (uri (pypi-uri "PyOpenGL-accelerate" version))
17423 (sha256
17424 (base32
17425 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
17426 (inputs
17427 `(("mesa" ,mesa)
17428 ("python-numpy" ,python-numpy))) ; for cython module
17429 ; numpy_formathandler, thus not propagated
17430 (arguments
17431 `(#:tests? #f
17432 #:phases
17433 (modify-phases %standard-phases
17434 (delete 'fix-paths))))
17435 (synopsis "Acceleration code for PyOpenGL")
17436 (description
17437 "This is the Cython-coded accelerator module for PyOpenGL.")))
17438
17439 (define-public python-rencode
17440 (package
17441 (name "python-rencode")
17442 (version "1.0.5")
17443 (source
17444 (origin
17445 (method url-fetch)
17446 (uri (pypi-uri "rencode" version))
17447 (sha256
17448 (base32
17449 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
17450 (build-system python-build-system)
17451 (arguments
17452 `(#:phases
17453 (modify-phases %standard-phases
17454 (add-before 'check 'delete-bogus-test
17455 ;; This test requires /home/aresch/Downloads, which is not provided by
17456 ;; the build environment.
17457 (lambda _
17458 (delete-file "rencode/t.py")
17459 #t)))))
17460 (native-inputs `(("pkg-config" ,pkg-config)
17461 ("python-cython" ,python-cython)))
17462 (home-page "https://github.com/aresch/rencode")
17463 (synopsis "Serialization of heterogeneous data structures")
17464 (description
17465 "The @code{rencode} module is a data structure serialization library,
17466 similar to @code{bencode} from the BitTorrent project. For complex,
17467 heterogeneous data structures with many small elements, r-encoding stake up
17468 significantly less space than b-encodings. This version of rencode is a
17469 complete rewrite in Cython to attempt to increase the performance over the
17470 pure Python module.")
17471 (license license:bsd-3)))
17472
17473 (define-public python2-rencode
17474 (package-with-python2 python-rencode))
17475
17476 (define-public python-xenon
17477 (package
17478 (name "python-xenon")
17479 (version "0.7.0")
17480 (source
17481 (origin
17482 (method url-fetch)
17483 (uri (pypi-uri "xenon" version))
17484 (sha256
17485 (base32
17486 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
17487 (build-system python-build-system)
17488 (native-inputs
17489 `(("python-pyyaml" ,python-pyyaml)
17490 ("python-radon" ,python-radon)
17491 ("python-requests" ,python-requests)
17492 ("python-flake8" ,python-flake8)
17493 ("python-tox" ,python-tox)))
17494 (arguments
17495 `(#:tests? #f ;test suite not shipped with the PyPI archive
17496 #:phases
17497 (modify-phases %standard-phases
17498 (add-before 'build 'patch-test-requirements
17499 (lambda _
17500 ;; Remove httpretty dependency for tests.
17501 (substitute* "setup.py"
17502 (("httpretty") ""))
17503 #t)))))
17504 (home-page "https://xenon.readthedocs.org/")
17505 (synopsis "Monitor code metrics for Python on your CI server")
17506 (description
17507 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
17508 Ideally, @code{xenon} is run every time code is committed. Through command
17509 line options, various thresholds can be set for the complexity of code. It
17510 will fail (i.e. it will exit with a non-zero exit code) when any of these
17511 requirements is not met.")
17512 (license license:expat)))
17513
17514 (define-public python-pysocks
17515 (package
17516 (name "python-pysocks")
17517 (version "1.7.1")
17518 (source
17519 (origin
17520 (method url-fetch)
17521 (uri (pypi-uri "PySocks" version))
17522 (sha256
17523 (base32
17524 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
17525 (build-system python-build-system)
17526 (arguments `(#:tests? #f))
17527 (home-page "https://github.com/Anorov/PySocks")
17528 (synopsis "SOCKS client module")
17529 (description "@code{pysocks} is an updated and semi-actively maintained
17530 version of @code{SocksiPy} with bug fixes and extra features.")
17531 (license license:bsd-3)))
17532
17533 (define-public python2-pysocks
17534 (package-with-python2 python-pysocks))
17535
17536 (define-public python-pydiff
17537 (package
17538 (name "python-pydiff")
17539 (version "0.2")
17540 (source
17541 (origin
17542 (method url-fetch)
17543 (uri (pypi-uri "pydiff" version))
17544 (sha256
17545 (base32
17546 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17547 (build-system python-build-system)
17548 (home-page "https://github.com/myint/pydiff")
17549 (synopsis "Library to diff two Python files at the bytecode level")
17550 (description
17551 "@code{pydiff} makes it easy to look for actual code changes while
17552 ignoring formatting changes.")
17553 (license license:expat)))
17554
17555 (define-public python2-pydiff
17556 (package-with-python2 python-pydiff))
17557
17558 (define-public python-pydub
17559 (package
17560 (name "python-pydub")
17561 (version "0.24.1")
17562 (source
17563 (origin
17564 (method url-fetch)
17565 (uri (pypi-uri "pydub" version))
17566 (sha256
17567 (base32
17568 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17569 (build-system python-build-system)
17570 (arguments
17571 `(#:phases
17572 (modify-phases %standard-phases
17573 (add-after 'unpack 'fix-ffmpeg-path
17574 (lambda* (#:key inputs #:allow-other-keys)
17575 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17576 (substitute* '("pydub/utils.py")
17577 (("return \"ffmpeg\"")
17578 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17579 (("return \"ffplay\"")
17580 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17581 (("return \"ffprobe\"")
17582 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17583 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17584 #t))))))
17585 (home-page "https://pydub.com")
17586 (inputs
17587 `(("ffmpeg" ,ffmpeg)))
17588 (propagated-inputs
17589 `(("python-scipy" ,python-scipy)))
17590 (synopsis "Manipulate audio with a high level interface in Python")
17591 (description
17592 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17593 @code{ffmpeg} to open various audio formats.")
17594 (license license:expat))) ; MIT license
17595
17596 (define-public python-tqdm
17597 (package
17598 (name "python-tqdm")
17599 (version "4.43.0")
17600 (source
17601 (origin
17602 (method url-fetch)
17603 (uri (pypi-uri "tqdm" version))
17604 (sha256
17605 (base32
17606 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17607 (build-system python-build-system)
17608 (arguments
17609 '(#:phases (modify-phases %standard-phases
17610 (replace 'check
17611 (lambda* (#:key inputs outputs #:allow-other-keys)
17612 (add-installed-pythonpath inputs outputs)
17613 ;; This invokation is taken from tox.ini.
17614 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17615 "-d" "-v" "tqdm/"))))))
17616 (native-inputs
17617 `(("python-nose" ,python-nose)))
17618 (home-page "https://github.com/tqdm/tqdm")
17619 (synopsis "Fast, extensible progress meter")
17620 (description
17621 "Make loops show a progress bar on the console by just wrapping any
17622 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17623 design and layout.")
17624 (license (list license:mpl2.0 license:expat))))
17625
17626 (define-public python2-tqdm
17627 (package-with-python2 python-tqdm))
17628
17629 (define-public python-pkginfo
17630 (package
17631 (name "python-pkginfo")
17632 (version "1.7.0")
17633 (source
17634 (origin
17635 (method url-fetch)
17636 (uri (pypi-uri "pkginfo" version))
17637 (sha256
17638 (base32
17639 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
17640 (build-system python-build-system)
17641 (arguments
17642 `(#:phases
17643 (modify-phases %standard-phases
17644 (add-before 'check 'patch-tests
17645 (lambda _
17646 (substitute* "pkginfo/tests/test_installed.py"
17647 (("test_ctor_w_package_no_PKG_INFO")
17648 "_test_ctor_w_package_no_PKG_INFO"))
17649 #t)))))
17650 (home-page
17651 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17652 (synopsis
17653 "Query metadatdata from sdists, bdists, and installed packages")
17654 (description
17655 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17656 source distriubtion (an sdist) or a binary distribution (e.g., created by
17657 running bdist_egg). It can also query the EGG-INFO directory of an installed
17658 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17659 created by running @code{python setup.py develop}).")
17660 (license license:expat)))
17661
17662 (define-public python2-pkginfo
17663 (package-with-python2 python-pkginfo))
17664
17665 (define-public python-twine
17666 (package
17667 (name "python-twine")
17668 (version "1.15.0")
17669 (source
17670 (origin
17671 (method url-fetch)
17672 (uri (pypi-uri "twine" version))
17673 (sha256
17674 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17675 (build-system python-build-system)
17676 (propagated-inputs
17677 `(("python-tqdm" ,python-tqdm)
17678 ("python-packaging" ,python-packaging)
17679 ("python-pkginfo" ,python-pkginfo)
17680 ("python-readme-renderer" ,python-readme-renderer)
17681 ("python-requests" ,python-requests)
17682 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17683 (home-page "https://github.com/pypa/twine")
17684 (synopsis "Collection of utilities for interacting with PyPI")
17685 (description
17686 "@code{twine} currently supports registering projects and uploading
17687 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17688 their files and supports any packaging format (including wheels).")
17689 (license license:asl2.0)))
17690
17691 (define-public python2-twine
17692 (package-with-python2 python-twine))
17693
17694 (define-public python-linecache2
17695 (package
17696 (name "python-linecache2")
17697 (version "1.0.0")
17698 (source
17699 (origin
17700 (method url-fetch)
17701 (uri (pypi-uri "linecache2" version))
17702 (sha256
17703 (base32
17704 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17705 (build-system python-build-system)
17706 (arguments
17707 `(;; The tests depend on unittest2, and our version is a bit too old.
17708 #:tests? #f))
17709 (native-inputs
17710 `(("python-pbr" ,python-pbr-minimal)))
17711 (home-page
17712 "https://github.com/testing-cabal/linecache2")
17713 (synopsis "Backports of the linecache module")
17714 (description
17715 "The linecache module allows one to get any line from any file, while
17716 attempting to optimize internally, using a cache, the common case where many
17717 lines are read from a single file.")
17718 (license license:psfl)))
17719
17720 (define-public python2-linecache2
17721 (package-with-python2 python-linecache2))
17722
17723 (define-public python-traceback2
17724 (package
17725 (name "python-traceback2")
17726 (version "1.4.0")
17727 (source
17728 (origin
17729 (method url-fetch)
17730 (uri (pypi-uri "traceback2" version))
17731 (sha256
17732 (base32
17733 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17734 (build-system python-build-system)
17735 (arguments
17736 `(;; python-traceback2 and python-unittest2 depend on one another.
17737 #:tests? #f))
17738 (native-inputs
17739 `(("python-pbr" ,python-pbr-minimal)))
17740 (propagated-inputs
17741 `(("python-linecache2" ,python-linecache2)))
17742 (home-page
17743 "https://github.com/testing-cabal/traceback2")
17744 (synopsis "Backports of the traceback module")
17745 (description
17746 "This module provides a standard interface to extract, format and print
17747 stack traces of Python programs. It exactly mimics the behavior of the Python
17748 interpreter when it prints a stack trace.")
17749 (license license:psfl)))
17750
17751 (define-public python2-traceback2
17752 (package-with-python2 python-traceback2))
17753
17754 (define-public python-ratelimiter
17755 (package
17756 (name "python-ratelimiter")
17757 (version "1.2.0")
17758 (source
17759 (origin
17760 (method url-fetch)
17761 (uri (pypi-uri "ratelimiter" version))
17762 (sha256
17763 (base32
17764 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17765 (build-system python-build-system)
17766 (arguments
17767 '(#:tests? #f)) ; There are no tests in the pypi archive.
17768 (home-page "https://github.com/RazerM/ratelimiter")
17769 (synopsis "Simple rate limiting object")
17770 (description
17771 "The @code{ratelimiter} module ensures that an operation will not be
17772 executed more than a given number of times during a given period.")
17773 (license license:asl2.0)))
17774
17775 (define-public python2-ratelimiter
17776 (package-with-python2 python-ratelimiter))
17777
17778 (define-public python-dukpy
17779 (package
17780 (name "python-dukpy")
17781 (version "0.3")
17782 (source
17783 (origin
17784 (method git-fetch)
17785 (uri (git-reference
17786 (url "https://github.com/kovidgoyal/dukpy")
17787 (commit (string-append "v" version))))
17788 (file-name (git-file-name name version))
17789 (sha256
17790 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17791 (build-system python-build-system)
17792 (home-page "https://github.com/kovidgoyal/dukpy")
17793 (synopsis "Run JavaScript in python")
17794 (description
17795 "dukpy is a JavaScript runtime environment for Python using the duktape
17796 embeddable JavaScript engine.")
17797 ;; Dukpy is licensed under MIT like the embedded duktape library,
17798 ;; with 'errors.c' as GPL3.
17799 (license (list license:expat license:gpl3))))
17800
17801 (define-public python2-dukpy
17802 (package-with-python2 python-dukpy))
17803
17804 (define-public python-jsonrpclib-pelix
17805 (package
17806 (name "python-jsonrpclib-pelix")
17807 (version "0.3.2")
17808 (source
17809 (origin
17810 (method url-fetch)
17811 (uri (pypi-uri "jsonrpclib-pelix" version))
17812 (sha256
17813 (base32
17814 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17815 (build-system python-build-system)
17816 (arguments
17817 `(#:tests? #f)) ; no tests in PyPI tarball
17818 (home-page "https://github.com/tcalmant/jsonrpclib/")
17819 (synopsis "JSON-RPC 2.0 client library for Python")
17820 (description
17821 "This library implements the JSON-RPC v2.0
17822 specification (backwards-compatible) as a client library for Python. This
17823 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17824 services.")
17825 (license license:asl2.0)))
17826
17827 (define-public python2-jsonrpclib-pelix
17828 (package-with-python2 python-jsonrpclib-pelix))
17829
17830 (define-public python-setuptools-scm-git-archive
17831 (package
17832 (name "python-setuptools-scm-git-archive")
17833 (version "1.0")
17834 (source
17835 (origin
17836 (method url-fetch)
17837 (uri (pypi-uri "setuptools_scm_git_archive" version))
17838 (sha256
17839 (base32
17840 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17841 (build-system python-build-system)
17842 (native-inputs
17843 `(("python-pytest" ,python-pytest)))
17844 (propagated-inputs
17845 `(("python-setuptools-scm" ,python-setuptools-scm)))
17846 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17847 (synopsis "Setuptools_scm plugin for git archives")
17848 (description
17849 "The setuptools_scm_git_archive package is a plugin to
17850 setuptools_scm, which supports obtaining versions from git archives that
17851 belong to tagged versions.")
17852 (license license:expat)))
17853
17854 (define-public python2-setuptools-scm-git-archive
17855 (package-with-python2 python-setuptools-scm-git-archive))
17856
17857 (define-public python-setuptools-git
17858 (package
17859 (name "python-setuptools-git")
17860 (version "1.2")
17861 (source
17862 (origin
17863 (method url-fetch)
17864 (uri (pypi-uri "setuptools-git" version))
17865 (sha256
17866 (base32
17867 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17868 (build-system python-build-system)
17869 (arguments
17870 `(#:phases
17871 (modify-phases %standard-phases
17872 ;; This is needed for tests.
17873 (add-after 'unpack 'configure-git
17874 (lambda _
17875 (setenv "HOME" "/tmp")
17876 (invoke "git" "config" "--global" "user.email" "guix")
17877 (invoke "git" "config" "--global" "user.name" "guix")
17878 #t)))))
17879 (native-inputs
17880 `(("git" ,git-minimal)))
17881 (home-page "https://github.com/msabramo/setuptools-git")
17882 (synopsis "Setuptools revision control system plugin for Git")
17883 (description
17884 "This package provides a plugin for Setuptools for revision control with
17885 Git.")
17886 (license license:bsd-3)))
17887
17888 (define-public python-pyclipper
17889 (package
17890 (name "python-pyclipper")
17891 (version "1.1.0.post3")
17892 (source
17893 (origin
17894 (method url-fetch)
17895 (uri (pypi-uri "pyclipper" version ".zip"))
17896 (sha256
17897 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17898 (modules '((guix build utils)))
17899 (snippet
17900 '(begin
17901 ;; This file is generated by Cython.
17902 (delete-file "pyclipper/pyclipper.cpp") #t))))
17903 (build-system python-build-system)
17904 (arguments
17905 `(#:phases
17906 (modify-phases %standard-phases
17907 (add-before 'build 'cythonize-sources
17908 (lambda _
17909 (with-directory-excursion "pyclipper"
17910 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17911 (propagated-inputs
17912 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17913 (native-inputs
17914 `(("python-cython" ,python-cython)
17915 ("python-pytest" ,python-pytest)
17916 ("python-pytest-runner" ,python-pytest-runner)
17917 ("python-unittest2" ,python-unittest2)
17918 ("unzip" ,unzip)))
17919 (home-page "https://github.com/greginvm/pyclipper")
17920 (synopsis "Wrapper for Angus Johnson's Clipper library")
17921 (description
17922 "Pyclipper is a Cython wrapper for the C++ translation of the
17923 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17924 (license license:expat)))
17925
17926 (define-public python2-pyclipper
17927 (package-with-python2 python-pyclipper))
17928
17929 (define-public python2-booleanoperations
17930 (package
17931 (name "python2-booleanoperations")
17932 (version "0.7.1")
17933 (source
17934 (origin
17935 (method url-fetch)
17936 (uri (pypi-uri "booleanOperations" version ".zip"))
17937 (sha256
17938 (base32
17939 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17940 (build-system python-build-system)
17941 (arguments
17942 `(#:python ,python-2))
17943 (native-inputs
17944 `(("unzip" ,unzip)
17945 ("python2-pytest" ,python2-pytest)
17946 ("python2-pytest-runner" ,python2-pytest-runner)))
17947 (propagated-inputs
17948 `(("python-fonttools" ,python2-fonttools)
17949 ("python-pyclipper" ,python2-pyclipper)
17950 ("python-ufolib" ,python2-ufolib)))
17951 (home-page "https://github.com/typemytype/booleanOperations")
17952 (synopsis "Boolean operations on paths")
17953 (description
17954 "BooleanOperations provides a Python library that enables
17955 boolean operations on paths.")
17956 (license license:expat)))
17957
17958 (define-public python-tempdir
17959 (package
17960 (name "python-tempdir")
17961 (version "0.7.1")
17962 (source
17963 (origin
17964 (method url-fetch)
17965 (uri (pypi-uri "tempdir" version))
17966 (sha256
17967 (base32
17968 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17969 (build-system python-build-system)
17970 (home-page "https://pypi.org/project/tempdir/")
17971 (arguments
17972 ;; the package has no tests
17973 '(#:tests? #f))
17974 (synopsis "Python library for managing temporary directories")
17975 (description
17976 "This library manages temporary directories that are automatically
17977 deleted with all their contents when they are no longer needed. It is
17978 particularly convenient for use in tests.")
17979 (license license:expat)))
17980
17981 (define-public python2-tempdir
17982 (package-with-python2 python-tempdir))
17983
17984 (define-public python-activepapers
17985 (package
17986 (name "python-activepapers")
17987 (version "0.2.2")
17988 (source
17989 (origin
17990 (method url-fetch)
17991 (uri (pypi-uri "ActivePapers.Py" version))
17992 (sha256
17993 (base32
17994 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17995 (build-system python-build-system)
17996 (arguments
17997 `(#:modules ((ice-9 ftw)
17998 (srfi srfi-1)
17999 (guix build utils)
18000 (guix build python-build-system))
18001
18002 #:phases
18003 (modify-phases %standard-phases
18004 (add-after 'unpack 'delete-python2-code
18005 (lambda _
18006 (for-each delete-file
18007 '("lib/activepapers/builtins2.py"
18008 "lib/activepapers/standardlib2.py"
18009 "lib/activepapers/utility2.py"))))
18010 (replace 'check
18011 (lambda _
18012 ;; Deactivate the test cases that download files
18013 (setenv "NO_NETWORK_ACCESS" "1")
18014 ;; For some strange reason, some tests fail if nosetests runs all
18015 ;; test modules in a single execution. They pass if each test
18016 ;; module is run individually.
18017 (for-each (lambda (filename)
18018 (invoke "nosetests"
18019 (string-append "tests/" filename)))
18020 (scandir "tests"
18021 (lambda (filename)
18022 (string-suffix? ".py" filename)))))))))
18023 (native-inputs
18024 `(("python-tempdir" ,python-tempdir)
18025 ("python-nose" ,python-nose)))
18026 (propagated-inputs
18027 `(("python-h5py" ,python-h5py)))
18028 (home-page "https://www.activepapers.org/")
18029 (synopsis "Executable papers for scientific computing")
18030 (description
18031 "ActivePapers is a tool for working with executable papers, which
18032 combine data, code, and documentation in single-file packages,
18033 suitable for publication as supplementary material or on repositories
18034 such as figshare or Zenodo.")
18035 (properties `((python2-variant . ,(delay python2-activepapers))))
18036 (license license:bsd-3)))
18037
18038 (define-public python2-activepapers
18039 (let ((base (package-with-python2
18040 (strip-python2-variant python-activepapers))))
18041 (package/inherit base
18042 (arguments
18043 (substitute-keyword-arguments (package-arguments base)
18044 ((#:phases phases)
18045 `(modify-phases ,phases
18046 (delete 'delete-python2-code)
18047 (add-after 'unpack 'delete-python3-code
18048 (lambda _
18049 (for-each delete-file
18050 '("lib/activepapers/builtins3.py"
18051 "lib/activepapers/standardlib3.py"
18052 "lib/activepapers/utility3.py")))))))))))
18053
18054 (define-public python-semver
18055 (package
18056 (name "python-semver")
18057 (version "2.9.0")
18058 (source
18059 (origin
18060 (method url-fetch)
18061 (uri (pypi-uri "semver" version))
18062 (sha256
18063 (base32
18064 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
18065 (build-system python-build-system)
18066 (arguments
18067 `(#:phases (modify-phases %standard-phases
18068 (replace 'check
18069 (lambda _
18070 (delete-file "setup.cfg")
18071 (invoke "py.test"))))))
18072 (native-inputs
18073 `(("python-pytest" ,python-pytest)))
18074 (home-page "https://github.com/k-bx/python-semver")
18075 (synopsis "Python helper for Semantic Versioning")
18076 (description "This package provides a Python library for
18077 @url{Semantic Versioning, http://semver.org/}.")
18078 (license license:bsd-3)))
18079
18080 (define-public python2-semver
18081 (package-with-python2 python-semver))
18082
18083 (define-public python-pyro4
18084 (package
18085 (name "python-pyro4")
18086 (version "4.77")
18087 (source
18088 (origin
18089 (method url-fetch)
18090 (uri (pypi-uri "Pyro4" version))
18091 (sha256
18092 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
18093 (build-system python-build-system)
18094 (arguments
18095 '(#:tests? #f)) ;FIXME: Some tests require network access.
18096 (native-inputs
18097 `(("python-cloudpickle" ,python-cloudpickle)
18098 ("python-dill" ,python-dill)
18099 ("python-msgpack" ,python-msgpack)))
18100 (propagated-inputs
18101 `(("python-serpent" ,python-serpent)))
18102 (home-page "https://pyro4.readthedocs.io")
18103 (synopsis "Distributed object middleware for Python")
18104 (description
18105 "Pyro enables you to build applications in which objects can talk to each
18106 other over the network. You can just use normal Python method calls to call
18107 objects on other machines, also known as remote procedure calls (RPC).")
18108 (license license:expat)))
18109
18110 (define-public python2-pyro
18111 (package
18112 (name "python2-pyro")
18113 (version "3.16")
18114 (source
18115 (origin
18116 (method url-fetch)
18117 (uri (pypi-uri "Pyro" version))
18118 (file-name (string-append "Pyro-" version ".tar.gz"))
18119 (sha256
18120 (base32
18121 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
18122 (build-system python-build-system)
18123 (arguments
18124 ;; Pyro is not compatible with Python 3
18125 `(#:python ,python-2
18126 ;; Pyro has no test cases for automatic execution
18127 #:tests? #f))
18128 (home-page "https://pythonhosted.org/Pyro/")
18129 (synopsis "Distributed object manager for Python")
18130 (description "Pyro is a Distributed Object Technology system
18131 written in Python that is designed to be easy to use. It resembles
18132 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
18133 which is a system and language independent Distributed Object Technology
18134 and has much more to offer than Pyro or RMI. Pyro 3.x is no
18135 longer maintained. New projects should use Pyro4 instead, which
18136 is the new Pyro version that is actively developed.")
18137 (license license:expat)))
18138
18139 (define-public python2-scientific
18140 (package
18141 (name "python2-scientific")
18142 (version "2.9.4")
18143 (source
18144 (origin
18145 (method git-fetch)
18146 (uri (git-reference
18147 (url "https://github.com/khinsen/ScientificPython")
18148 (commit (string-append "rel" version))))
18149 (file-name (git-file-name name version))
18150 (sha256
18151 (base32
18152 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
18153 (build-system python-build-system)
18154 (inputs
18155 `(("netcdf" ,netcdf)))
18156 (propagated-inputs
18157 `(("python-numpy" ,python2-numpy-1.8)
18158 ("python-pyro" ,python2-pyro)))
18159 (arguments
18160 ;; ScientificPython is not compatible with Python 3
18161 `(#:python ,python-2
18162 #:tests? #f ; No test suite
18163 #:phases
18164 (modify-phases %standard-phases
18165 (replace 'build
18166 (lambda* (#:key inputs #:allow-other-keys)
18167 (invoke "python" "setup.py" "build"
18168 (string-append "--netcdf_prefix="
18169 (assoc-ref inputs "netcdf"))))))))
18170 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
18171 (synopsis "Python modules for scientific computing")
18172 (description "ScientificPython is a collection of Python modules that are
18173 useful for scientific computing. Most modules are rather general (Geometry,
18174 physical units, automatic derivatives, ...) whereas others are more
18175 domain-specific (e.g. netCDF and PDB support). The library is currently
18176 not actively maintained and works only with Python 2 and NumPy < 1.9.")
18177 (license license:cecill-c)))
18178
18179 (define-public python2-mmtk
18180 (package
18181 (name "python2-mmtk")
18182 (version "2.7.12")
18183 (source
18184 (origin
18185 (method git-fetch)
18186 (uri (git-reference
18187 (url "https://github.com/khinsen/MMTK")
18188 (commit (string-append "rel" version))))
18189 (file-name (git-file-name name version))
18190 (sha256
18191 (base32
18192 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
18193 (build-system python-build-system)
18194 (native-inputs
18195 `(("netcdf" ,netcdf)))
18196 (propagated-inputs
18197 `(("python-scientific" ,python2-scientific)
18198 ("python-tkinter" ,python-2 "tk")))
18199 (arguments
18200 `(#:python ,python-2
18201 #:tests? #f
18202 #:phases
18203 (modify-phases %standard-phases
18204 (add-before 'build 'includes-from-scientific
18205 (lambda* (#:key inputs #:allow-other-keys)
18206 (mkdir-p "Include/Scientific")
18207 (copy-recursively
18208 (string-append
18209 (assoc-ref inputs "python-scientific")
18210 "/include/python2.7/Scientific")
18211 "Include/Scientific"))))))
18212 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
18213 (synopsis "Python library for molecular simulation")
18214 (description "MMTK is a library for molecular simulations with an emphasis
18215 on biomolecules. It provides widely used methods such as Molecular Dynamics
18216 and normal mode analysis, but also basic routines for implementing new methods
18217 for simulation and analysis. The library is currently not actively maintained
18218 and works only with Python 2 and NumPy < 1.9.")
18219 (license license:cecill-c)))
18220
18221 (define-public python-phonenumbers
18222 (package
18223 (name "python-phonenumbers")
18224 (version "8.9.1")
18225 (source
18226 (origin
18227 (method url-fetch)
18228 (uri (pypi-uri "phonenumbers" version))
18229 (sha256
18230 (base32
18231 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
18232 (build-system python-build-system)
18233 (home-page
18234 "https://github.com/daviddrysdale/python-phonenumbers")
18235 (synopsis
18236 "Python library for dealing with international phone numbers")
18237 (description
18238 "This package provides a Python port of Google's libphonenumber library.")
18239 (license license:asl2.0)))
18240
18241 (define-public python2-phonenumbers
18242 (package-with-python2 python-phonenumbers))
18243
18244 (define-public python-send2trash
18245 (package
18246 (name "python-send2trash")
18247 (version "1.5.0")
18248 (source
18249 (origin (method git-fetch)
18250 ;; Source tarball on PyPI doesn't include tests.
18251 (uri (git-reference
18252 (url "https://github.com/hsoft/send2trash")
18253 (commit version)))
18254 (file-name (git-file-name name version))
18255 (sha256
18256 (base32
18257 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
18258 (build-system python-build-system)
18259 (arguments
18260 '(#:phases
18261 (modify-phases %standard-phases
18262 (add-before 'check 'pre-check
18263 (lambda _
18264 (mkdir-p "/tmp/foo")
18265 (setenv "HOME" "/tmp/foo")
18266 #t)))))
18267 (home-page "https://github.com/hsoft/send2trash")
18268 (synopsis "Send files to the user's @file{~/Trash} directory")
18269 (description "This package provides a Python library to send files to the
18270 user's @file{~/Trash} directory.")
18271 (properties `((python2-variant . ,(delay python2-send2trash))))
18272 (license license:bsd-3)))
18273
18274 (define-public python2-send2trash
18275 (let ((base (package-with-python2
18276 (strip-python2-variant python-send2trash))))
18277 (package/inherit base
18278 (arguments
18279 (substitute-keyword-arguments (package-arguments python-send2trash)
18280 ((#:phases phases)
18281 `(modify-phases ,phases
18282 (add-before 'check 'setenv
18283 (lambda _
18284 (setenv "PYTHONPATH"
18285 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18286 #t)))))))))
18287
18288 (define-public python-pyfavicon
18289 (package
18290 (name "python-pyfavicon")
18291 (version "0.1.1")
18292 (source
18293 (origin
18294 (method url-fetch)
18295 (uri (pypi-uri "pyfavicon" version))
18296 (sha256
18297 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
18298 (build-system python-build-system)
18299 (arguments
18300 ;; There are no tests in the PyPI tarball and the tests from the
18301 ;; repository require online data.
18302 '(#:tests? #f))
18303 (propagated-inputs
18304 `(("python-aiohttp" ,python-aiohttp)
18305 ("python-beautifulsoup4" ,python-beautifulsoup4)
18306 ("python-pillow" ,python-pillow)))
18307 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
18308 (synopsis "Async favicon fetcher")
18309 (description
18310 "@code{pyfavicon} is an async favicon fetcher.")
18311 (license license:expat)))
18312
18313 (define-public python-yamllint
18314 (package
18315 (name "python-yamllint")
18316 (version "1.26.0")
18317 (source
18318 (origin
18319 (method url-fetch)
18320 (uri (pypi-uri "yamllint" version))
18321 (sha256
18322 (base32 "11qhs1jk9pwvyk5k3q5blh9sq42dh1ywdf1f3i2zixf7hncwir5h"))))
18323 (build-system python-build-system)
18324 (propagated-inputs
18325 `(("python-pathspec" ,python-pathspec)
18326 ("python-pyyaml" ,python-pyyaml)
18327 ("python-setuptools" ,python-setuptools)))
18328 (home-page "https://github.com/adrienverge/yamllint")
18329 (synopsis "Linter for YAML files")
18330 (description
18331 "Yamllint is a linter for YAML files. yamllint does not only check for
18332 syntax validity, but for weirdnesses like key repetition and cosmetic problems
18333 such as lines length, trailing spaces, indentation, etc.")
18334 (license license:gpl3+)))
18335
18336 (define-public python-yapf
18337 (package
18338 (name "python-yapf")
18339 (version "0.29.0")
18340 (source
18341 (origin
18342 (method url-fetch)
18343 (uri (pypi-uri "yapf" version))
18344 (sha256
18345 (base32
18346 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
18347 (build-system python-build-system)
18348 (home-page "https://github.com/google/yapf")
18349 (synopsis "Formatter for Python code")
18350 (description "YAPF is a formatter for Python code. It's based off of
18351 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
18352 takes the code and reformats it to the best formatting that conforms to the
18353 style guide, even if the original code didn't violate the style guide.")
18354 (license license:asl2.0)))
18355
18356 (define-public python2-yapf
18357 (package-with-python2 python-yapf))
18358
18359 (define-public python-yq
18360 (package
18361 (name "python-yq")
18362 (version "2.11.1")
18363 (source
18364 (origin
18365 (method url-fetch)
18366 (uri (pypi-uri "yq" version))
18367 (sha256
18368 (base32
18369 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
18370 (build-system python-build-system)
18371 (arguments
18372 '(#:phases
18373 (modify-phases %standard-phases
18374 (add-after 'unpack 'patch
18375 (lambda* (#:key inputs #:allow-other-keys)
18376 (substitute* "yq/__init__.py"
18377 (("Popen\\(\\[\"jq")
18378 (string-append
18379 "Popen([\""
18380 (assoc-ref inputs "jq")
18381 "/bin/jq")))
18382 #t)))))
18383 (inputs
18384 `(("python-argcomplete" ,python-argcomplete)
18385 ("python-pyyaml" ,python-pyyaml)
18386 ("python-xmltodict" ,python-xmltodict)
18387 ("jq" ,jq)))
18388 (native-inputs
18389 `(("python-coverage" ,python-coverage)
18390 ("python-flake8" ,python-flake8)
18391 ("python-wheel" ,python-wheel)))
18392 (home-page "https://github.com/kislyuk/yq")
18393 (synopsis "Command-line YAML/XML processor")
18394 (description
18395 "This package provides @command{yq} and @command{xq} for processing YAML
18396 and XML respectively. The processing is done through @command{jq}, @command{jq}
18397 filters can be used to process the data as it passes through.")
18398 (license license:asl2.0)))
18399
18400 (define-public python-gyp
18401 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
18402 (revision "0"))
18403 (package
18404 (name "python-gyp")
18405 ;; Google does not release versions,
18406 ;; based on second most recent commit date.
18407 (version (git-version "0.0.0" revision commit))
18408 (source
18409 (origin
18410 ;; Google does not release tarballs,
18411 ;; git checkout is needed.
18412 (method git-fetch)
18413 (uri (git-reference
18414 (url "https://chromium.googlesource.com/external/gyp")
18415 (commit commit)))
18416 (file-name (git-file-name name version))
18417 (sha256
18418 (base32
18419 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
18420 (build-system python-build-system)
18421 (home-page "https://gyp.gsrc.io/")
18422 (synopsis "GYP is a Meta-Build system")
18423 (description
18424 "GYP builds build systems for large, cross platform applications.
18425 It can be used to generate XCode projects, Visual Studio projects, Ninja build
18426 files, and Makefiles.")
18427 (license license:bsd-3))))
18428
18429 (define-public python2-gyp
18430 (package-with-python2 python-gyp))
18431
18432 (define-public python-whatever
18433 (package
18434 (name "python-whatever")
18435 (version "0.6")
18436 (source
18437 (origin
18438 (method git-fetch)
18439 (uri (git-reference
18440 (url "https://github.com/Suor/whatever")
18441 (commit version)))
18442 (file-name (git-file-name name version))
18443 (sha256
18444 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
18445 (build-system python-build-system)
18446 (arguments
18447 `(#:phases
18448 (modify-phases %standard-phases
18449 (replace 'check
18450 (lambda _
18451 (invoke "py.test"))))))
18452 (native-inputs
18453 `(("python-pytest" ,python-pytest)))
18454 (home-page "https://github.com/Suor/whatever")
18455 (synopsis "Make anonymous functions by partial application of operators")
18456 (description "@code{whatever} provides an easy way to make anonymous
18457 functions by partial application of operators.")
18458 (license license:bsd-3)))
18459
18460 (define-public python2-whatever
18461 (package-with-python2 python-whatever))
18462
18463 (define-public python-funcy
18464 (package
18465 (name "python-funcy")
18466 (version "1.11")
18467 (source
18468 (origin
18469 (method git-fetch)
18470 (uri (git-reference
18471 (url "https://github.com/Suor/funcy")
18472 (commit version)))
18473 (sha256
18474 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
18475 (file-name (git-file-name name version))))
18476 (build-system python-build-system)
18477 (arguments
18478 `(#:phases
18479 (modify-phases %standard-phases
18480 (replace 'check
18481 (lambda _
18482 (invoke "py.test"))))))
18483 (native-inputs
18484 `(("python-pytest" ,python-pytest)
18485 ("python-whatever" ,python-whatever)))
18486 (home-page "https://github.com/Suor/funcy")
18487 (synopsis "Functional tools")
18488 (description "@code{funcy} is a library that provides functional tools.
18489 Examples are:
18490 @enumerate
18491 @item merge - Merges collections of the same type
18492 @item walk - Type-preserving map
18493 @item select - Selects a part of a collection
18494 @item take - Takes the first n items of a collection
18495 @item first - Takes the first item of a collection
18496 @item remove - Predicated-removes items of a collection
18497 @item concat - Concatenates two collections
18498 @item flatten - Flattens a collection with subcollections
18499 @item distinct - Returns only distinct items
18500 @item split - Predicated-splits a collection
18501 @item split_at - Splits a collection at a given item
18502 @item group_by - Groups items by group
18503 @item pairwise - Pairs off adjacent items
18504 @item partial - Partially-applies a function
18505 @item curry - Curries a function
18506 @item compose - Composes functions
18507 @item complement - Complements a predicate
18508 @item all_fn - \"all\" with predicate
18509 @end enumerate")
18510 (license license:bsd-3)))
18511
18512 (define-public python2-funcy
18513 (package-with-python2 python-funcy))
18514
18515 (define-public python-isoweek
18516 (package
18517 (name "python-isoweek")
18518 (version "1.3.3")
18519 (source
18520 (origin
18521 (method url-fetch)
18522 (uri (pypi-uri "isoweek" version))
18523 (sha256
18524 (base32
18525 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
18526 (build-system python-build-system)
18527 (home-page "https://github.com/gisle/isoweek")
18528 (synopsis "Objects representing a week")
18529 (description "The @code{isoweek} module provide the class Week that
18530 implements the week definition of ISO 8601. This standard also defines
18531 a notation for identifying weeks; yyyyWww (where the W is a literal).
18532 Week instances stringify to this form.")
18533 (license license:bsd-3)))
18534
18535 (define-public python2-isoweek
18536 (package-with-python2 python-isoweek))
18537
18538 (define-public python-pyzbar
18539 (package
18540 (name "python-pyzbar")
18541 (version "0.1.8")
18542 (source
18543 (origin
18544 ;; There's no source tarball on PyPI.
18545 (method git-fetch)
18546 (uri (git-reference
18547 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
18548 (commit (string-append "v" version))))
18549 (file-name (git-file-name name version))
18550 (sha256
18551 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
18552 (build-system python-build-system)
18553 (arguments
18554 `(#:phases
18555 (modify-phases %standard-phases
18556 (add-after 'unpack 'remove-failing-test
18557 (lambda _
18558 ;; This tests if find_library was called once, but we remove
18559 ;; the call in the stage below to make the library find libzbar.
18560 (delete-file "pyzbar/tests/test_zbar_library.py")
18561 #t))
18562 (add-before 'build 'set-library-file-name
18563 (lambda* (#:key inputs #:allow-other-keys)
18564 (let ((libzbar (assoc-ref inputs "zbar")))
18565 (substitute* "pyzbar/zbar_library.py"
18566 (("find_library\\('zbar'\\)")
18567 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18568 #t))))))
18569 (native-inputs
18570 `(("pkg-config" ,pkg-config)
18571 ("python-numpy" ,python-numpy)
18572 ("python-pillow" ,python-pillow)))
18573 (inputs
18574 `(("zbar" ,zbar)))
18575 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18576 (synopsis "Read one-dimensional barcodes and QR codes")
18577 (description
18578 "Read one-dimensional barcodes and QR codes using the zbar library.
18579
18580 Features:
18581
18582 @itemize
18583 @item Pure python
18584 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18585 @item Decodes locations of barcodes
18586 @item No dependencies, other than the zbar library itself
18587 @end itemize")
18588 (license license:expat)))
18589
18590 (define-public python-tokenize-rt
18591 (package
18592 (name "python-tokenize-rt")
18593 (version "2.0.1")
18594 (source
18595 (origin
18596 (method url-fetch)
18597 (uri (pypi-uri "tokenize-rt" version))
18598 (sha256
18599 (base32
18600 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
18601 (build-system python-build-system)
18602 (home-page "https://github.com/asottile/tokenize-rt")
18603 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
18604 (description
18605 "This Python library is a wrapper around @code{tokenize} from the Python
18606 standard library. It provides two additional tokens @code{ESCAPED_NL} and
18607 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
18608 and @code{tokens_to_src} to roundtrip.")
18609 (license license:expat)))
18610
18611 (define-public python-future-fstrings
18612 (package
18613 (name "python-future-fstrings")
18614 (version "0.4.1")
18615 (source
18616 (origin
18617 (method url-fetch)
18618 (uri (pypi-uri "future_fstrings" version))
18619 (sha256
18620 (base32
18621 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18622 (build-system python-build-system)
18623 (propagated-inputs
18624 `(("python-tokenize-rt" ,python-tokenize-rt)))
18625 (home-page "https://github.com/asottile/future-fstrings")
18626 (synopsis "Backport of fstrings to Python < 3.6")
18627 (description
18628 "This package provides a UTF-8 compatible encoding
18629 @code{future_fstrings}, which performs source manipulation. It decodes the
18630 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18631 @code{f} strings.")
18632 (license license:expat)))
18633
18634 (define-public python-typed-ast
18635 (package
18636 (name "python-typed-ast")
18637 (version "1.4.0")
18638 (source
18639 (origin
18640 (method git-fetch)
18641 (uri (git-reference
18642 (url "https://github.com/python/typed_ast")
18643 (commit version)))
18644 (sha256
18645 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18646 (file-name (git-file-name name version))))
18647 (build-system python-build-system)
18648 (arguments
18649 `(#:modules ((guix build utils)
18650 (guix build python-build-system)
18651 (ice-9 ftw)
18652 (srfi srfi-1)
18653 (srfi srfi-26))
18654 #:phases
18655 (modify-phases %standard-phases
18656 (replace 'check
18657 (lambda _
18658 (let ((cwd (getcwd)))
18659 (setenv "PYTHONPATH"
18660 (string-append cwd "/build/"
18661 (find (cut string-prefix? "lib" <>)
18662 (scandir (string-append cwd "/build")))
18663 ":"
18664 (getenv "PYTHONPATH"))))
18665 (invoke "pytest")
18666 #t)))))
18667 (native-inputs `(("python-pytest" ,python-pytest)))
18668 (home-page "https://github.com/python/typed_ast")
18669 (synopsis "Fork of Python @code{ast} modules with type comment support")
18670 (description "This package provides a parser similar to the standard
18671 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18672 include PEP 484 type comments and are independent of the version of Python
18673 under which they are run. The @code{typed_ast} parsers produce the standard
18674 Python AST (plus type comments), and are both fast and correct, as they are
18675 based on the CPython 2.7 and 3.7 parsers.")
18676 ;; See the file "LICENSE" for the details.
18677 (license (list license:psfl
18678 license:asl2.0
18679 license:expat)))) ;ast27/Parser/spark.py
18680
18681 (define-public python-typer
18682 (package
18683 (name "python-typer")
18684 (version "0.3.2")
18685 (source
18686 (origin
18687 ;; Building `python-typer` from the git repository requires the `flit-core`
18688 ;; Python package that is not installed by `python-flit`.
18689 (method url-fetch)
18690 (uri (pypi-uri "typer" version))
18691 (sha256
18692 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
18693 (build-system python-build-system)
18694 (arguments
18695 `(#:phases
18696 (modify-phases %standard-phases
18697 (add-before 'check 'disable-failing-tests
18698 (lambda _
18699 (substitute* "tests/test_completion/test_completion.py"
18700 (("def test_show_completion")
18701 "def _test_show_completion")
18702 (("def test_install_completion")
18703 "def _test_install_completion"))
18704 (substitute* "tests/test_completion/test_completion_install.py"
18705 (("def test_completion_install_bash")
18706 "def _test_completion_install_bash")
18707 (("def test_completion_install_zsh")
18708 "def _test_completion_install_zsh")
18709 (("def test_completion_install_fish")
18710 "def _test_completion_install_fish")
18711 (("def test_completion_install_powershell")
18712 "def _test_completion_install_powershell"))
18713 #t))
18714 (replace 'check
18715 (lambda _
18716 (setenv "PYTHONPATH"
18717 (string-append (getcwd) ":"
18718 (getenv "PYTHONPATH")))
18719 (invoke "python" "-m" "pytest" "tests/")
18720 #t)))))
18721 (propagated-inputs
18722 `(("python-click" ,python-click)))
18723 (native-inputs
18724 `(("python-coverage" ,python-coverage)
18725 ("python-pytest" ,python-pytest)
18726 ("python-shellingham" ,python-shellingham)))
18727 (home-page "https://github.com/tiangolo/typer")
18728 (synopsis
18729 "Typer builds CLI based on Python type hints")
18730 (description
18731 "Typer is a library for building CLI applications. It's based on
18732 Python 3.6+ type hints.")
18733 ;; MIT license
18734 (license license:expat)))
18735
18736 (define-public python-typing
18737 (package
18738 (name "python-typing")
18739 (version "3.7.4.3")
18740 (source
18741 (origin
18742 (method url-fetch)
18743 (uri (pypi-uri "typing" version))
18744 (sha256
18745 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18746 (build-system python-build-system)
18747 (home-page "https://docs.python.org/3/library/typing.html")
18748 (synopsis "Type hints for Python")
18749 (description "This is a backport of the standard library @code{typing}
18750 module to Python versions older than 3.5. Typing defines a standard notation
18751 for Python function and variable type annotations. The notation can be used
18752 for documenting code in a concise, standard format, and it has been designed
18753 to also be used by static and runtime type checkers, static analyzers, IDEs
18754 and other tools.")
18755 (license license:psfl)))
18756
18757 (define-public python2-typing
18758 (package-with-python2 python-typing))
18759
18760 (define-public python-typing-extensions
18761 (package
18762 (name "python-typing-extensions")
18763 (version "3.7.4.3")
18764 (source
18765 (origin
18766 (method url-fetch)
18767 (uri (pypi-uri "typing_extensions" version))
18768 (sha256
18769 (base32
18770 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
18771 (build-system python-build-system)
18772 (home-page
18773 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18774 (synopsis "Experimental type hints for Python")
18775 (description
18776 "The typing_extensions module contains additional @code{typing} hints not
18777 yet present in the of the @code{typing} standard library.
18778 Included are implementations of:
18779 @enumerate
18780 @item ClassVar
18781 @item ContextManager
18782 @item Counter
18783 @item DefaultDict
18784 @item Deque
18785 @item NewType
18786 @item NoReturn
18787 @item overload
18788 @item Protocol
18789 @item runtime
18790 @item Text
18791 @item Type
18792 @item TYPE_CHECKING
18793 @item AsyncGenerator
18794 @end enumerate\n")
18795 (license license:psfl)))
18796
18797 (define-public bpython
18798 (package
18799 (name "bpython")
18800 (version "0.20.1")
18801 (source
18802 (origin
18803 (method url-fetch)
18804 (uri (pypi-uri "bpython" version))
18805 (sha256
18806 (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
18807 (build-system python-build-system)
18808 (arguments
18809 `(#:phases
18810 (modify-phases %standard-phases
18811 (add-after 'unpack 'remove-failing-test
18812 (lambda _
18813 ;; Remove failing test. FIXME: make it pass
18814 (delete-file "bpython/test/test_args.py")
18815 #t))
18816 (add-after 'wrap 'add-aliases
18817 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18818 (lambda* (#:key outputs #:allow-other-keys)
18819 (let ((out (assoc-ref outputs "out")))
18820 (for-each
18821 (lambda (old new)
18822 (symlink old (string-append out "/bin/" new)))
18823 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18824 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18825 #t)))))
18826 (propagated-inputs
18827 `(("python-pygments" ,python-pygments)
18828 ("python-requests" ,python-requests)
18829 ("python-curtsies" ,python-curtsies)
18830 ("python-greenlet" ,python-greenlet)
18831 ("python-six" ,python-six)
18832 ("python-wcwidth" ,python-wcwidth)
18833 ;; optional dependencies
18834 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18835 ("python-watchdog" ,python-watchdog)
18836 ("python-jedi" ,python-jedi)))
18837 (native-inputs
18838 `(("python-sphinx" ,python-sphinx)
18839 ("python-mock" ,python-mock)))
18840 (home-page "https://bpython-interpreter.org/")
18841 (synopsis "Fancy interface to the Python interpreter")
18842 (description "Bpython is a fancy interface to the Python
18843 interpreter. bpython's main features are
18844
18845 @enumerate
18846 @item in-line syntax highlighting,
18847 @item readline-like autocomplete with suggestions displayed as you type,
18848 @item expected parameter list for any Python function,
18849 @item \"rewind\" function to pop the last line of code from memory and
18850 re-evaluate,
18851 @item send the code you've entered off to a pastebin,
18852 @item save the code you've entered to a file, and
18853 @item auto-indentation.
18854 @end enumerate")
18855 (license license:expat)))
18856
18857 (define-public python-pyinotify
18858 (package
18859 (name "python-pyinotify")
18860 (version "0.9.6")
18861 (source (origin
18862 (method url-fetch)
18863 (uri (pypi-uri "pyinotify" version))
18864 (sha256
18865 (base32
18866 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18867 (build-system python-build-system)
18868 (arguments `(#:tests? #f)) ;no tests
18869 (home-page "https://github.com/seb-m/pyinotify")
18870 (synopsis "Python library for monitoring inotify events")
18871 (description
18872 "@code{pyinotify} provides a Python interface for monitoring
18873 file system events on Linux.")
18874 (license license:expat)))
18875
18876 (define-public python2-pyinotify
18877 (package-with-python2 python-pyinotify))
18878
18879 ;; Ada parser uses this version.
18880 (define-public python2-quex-0.67.3
18881 (package
18882 (name "python2-quex")
18883 (version "0.67.3")
18884 (source
18885 (origin
18886 (method url-fetch)
18887 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18888 (version-major+minor version)
18889 "/quex-" version ".zip"))
18890 (sha256
18891 (base32
18892 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18893 (build-system python-build-system)
18894 (native-inputs
18895 `(("unzip" ,unzip)))
18896 (arguments
18897 `(#:python ,python-2
18898 #:tests? #f
18899 #:phases
18900 (modify-phases %standard-phases
18901 (delete 'configure)
18902 (delete 'build)
18903 (replace 'install
18904 (lambda* (#:key outputs #:allow-other-keys)
18905 (let* ((out (assoc-ref outputs "out"))
18906 (share/quex (string-append out "/share/quex"))
18907 (bin (string-append out "/bin")))
18908 (copy-recursively "." share/quex)
18909 (mkdir-p bin)
18910 (symlink (string-append share/quex "/quex-exe.py")
18911 (string-append bin "/quex"))
18912 #t))))))
18913 (native-search-paths
18914 (list (search-path-specification
18915 (variable "QUEX_PATH")
18916 (files '("share/quex")))))
18917 (home-page "http://quex.sourceforge.net/")
18918 (synopsis "Lexical analyzer generator in Python")
18919 (description "@code{quex} is a lexical analyzer generator in Python.")
18920 (license license:lgpl2.1+))) ; Non-military
18921
18922 (define-public python2-quex
18923 (package (inherit python2-quex-0.67.3)
18924 (name "python2-quex")
18925 (version "0.68.1")
18926 (source
18927 (origin
18928 (method url-fetch)
18929 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18930 (sha256
18931 (base32
18932 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18933 (file-name (string-append name "-" version ".tar.gz"))))))
18934
18935 (define-public python-more-itertools
18936 (package
18937 (name "python-more-itertools")
18938 (version "8.2.0")
18939 (source
18940 (origin
18941 (method url-fetch)
18942 (uri (pypi-uri "more-itertools" version))
18943 (sha256
18944 (base32
18945 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18946 (build-system python-build-system)
18947 (home-page "https://github.com/erikrose/more-itertools")
18948 (synopsis "More routines for operating on iterables, beyond itertools")
18949 (description "Python's built-in @code{itertools} module implements a
18950 number of iterator building blocks inspired by constructs from APL, Haskell,
18951 and SML. @code{more-itertools} includes additional building blocks for
18952 working with iterables.")
18953 (properties `((python2-variant . ,(delay python2-more-itertools))))
18954 (license license:expat)))
18955
18956 ;; The 5.x series are the last versions supporting Python 2.7.
18957 (define-public python2-more-itertools
18958 (package
18959 (inherit python-more-itertools)
18960 (name "python2-more-itertools")
18961 (version "5.0.0")
18962 (source (origin
18963 (method url-fetch)
18964 (uri (pypi-uri "more-itertools" version))
18965 (sha256
18966 (base32
18967 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18968 (arguments
18969 `(#:python ,python-2))
18970 (propagated-inputs
18971 `(("python2-six" ,python2-six-bootstrap)))))
18972
18973 (define-public python-latexcodec
18974 (package
18975 (name "python-latexcodec")
18976 (version "1.0.7")
18977 (source
18978 (origin
18979 (method url-fetch)
18980 (uri (pypi-uri "latexcodec" version))
18981 (sha256
18982 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18983 (build-system python-build-system)
18984 (inputs
18985 `(("python-six" ,python-six)))
18986 (home-page "https://readthedocs.org/projects/latexcodec/")
18987 (synopsis "Work with LaTeX code in Python")
18988 (description "Lexer and codec to work with LaTeX code in Python.")
18989 (license license:expat)))
18990
18991 (define-public python-pybtex
18992 (package
18993 (name "python-pybtex")
18994 (version "0.22.2")
18995 (source
18996 (origin
18997 (method url-fetch)
18998 (uri (pypi-uri "pybtex" version))
18999 (sha256
19000 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
19001 (build-system python-build-system)
19002 (native-inputs
19003 `(("python-nose" ,python-nose)))
19004 (inputs
19005 `(("python-latexcodec" ,python-latexcodec)
19006 ("python-pyyaml" ,python-pyyaml)
19007 ("python-six" ,python-six)))
19008 (arguments
19009 `(#:test-target "nosetests"))
19010 (home-page "https://pybtex.org/")
19011 (synopsis "BibTeX-compatible bibliography processor")
19012 (description "Pybtex is a BibTeX-compatible bibliography processor written
19013 in Python. You can simply type pybtex instead of bibtex.")
19014 (license license:expat)))
19015
19016 (define-public python-onetimepass
19017 (package
19018 (name "python-onetimepass")
19019 (version "1.0.1")
19020 (source
19021 (origin
19022 (method url-fetch)
19023 (uri (pypi-uri "onetimepass" version))
19024 (sha256
19025 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
19026 (build-system python-build-system)
19027 (propagated-inputs `(("python-six" ,python-six)))
19028 (home-page "https://github.com/tadeck/onetimepass/")
19029 (synopsis "One-time password library")
19030 (description "Python one-time password library for HMAC-based (HOTP) and
19031 time-based (TOTP) passwords.")
19032 (license license:expat)))
19033
19034 (define-public python-parso
19035 (package
19036 (name "python-parso")
19037 (version "0.7.1")
19038 (source
19039 (origin
19040 (method url-fetch)
19041 (uri (pypi-uri "parso" version))
19042 (sha256
19043 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
19044 (native-inputs
19045 `(("python-pytest" ,python-pytest)))
19046 (build-system python-build-system)
19047 (arguments
19048 `(#:phases (modify-phases %standard-phases
19049 (replace 'check
19050 (lambda _ (invoke "pytest" "-vv"))))))
19051 (home-page "https://github.com/davidhalter/parso")
19052 (synopsis "Python Parser")
19053 (description "Parso is a Python parser that supports error recovery and
19054 round-trip parsing for different Python versions (in multiple Python versions).
19055 Parso is also able to list multiple syntax errors in your Python file.")
19056 (license license:expat)))
19057
19058 (define-public python2-parso
19059 (package-with-python2 python-parso))
19060
19061 (define-public python-async-generator
19062 (package
19063 (name "python-async-generator")
19064 (version "1.10")
19065 (source
19066 (origin
19067 (method url-fetch)
19068 (uri (pypi-uri "async_generator" version))
19069 (sha256
19070 (base32
19071 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
19072 (build-system python-build-system)
19073 (native-inputs
19074 `(("python-pytest" ,python-pytest)))
19075 (home-page "https://github.com/python-trio/async_generator")
19076 (synopsis "Async generators and context managers for Python 3.5+")
19077 (description "@code{async_generator} back-ports Python 3.6's native async
19078 generators and Python 3.7's context managers into Python 3.5.")
19079 ;; Dual licensed.
19080 (license (list license:expat license:asl2.0))))
19081
19082 (define-public python-async-timeout
19083 (package
19084 (name "python-async-timeout")
19085 (version "3.0.1")
19086 (source
19087 (origin
19088 (method url-fetch)
19089 (uri (pypi-uri "async-timeout" version))
19090 (sha256
19091 (base32
19092 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
19093 (build-system python-build-system)
19094 (home-page "https://github.com/aio-libs/async_timeout/")
19095 (synopsis "Timeout context manager for asyncio programs")
19096 (description "@code{async-timeout} provides a timeout timeout context
19097 manager compatible with @code{asyncio}.")
19098 (license license:asl2.0)))
19099
19100 (define-public python-glob2
19101 (package
19102 (name "python-glob2")
19103 (version "0.7")
19104 (source
19105 (origin
19106 (method git-fetch)
19107 (uri (git-reference
19108 (url "https://github.com/miracle2k/python-glob2")
19109 (commit (string-append "v" version))))
19110 (file-name (git-file-name name version))
19111 (sha256
19112 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
19113 (build-system python-build-system)
19114 (home-page "https://github.com/miracle2k/python-glob2/")
19115 (synopsis "Extended Version of the python buildin glob module")
19116 (description "This is an extended version of the Python
19117 @url{http://docs.python.org/library/glob.html, built-in glob module} which
19118 adds:
19119
19120 @itemize
19121 @item The ability to capture the text matched by glob patterns, and return
19122 those matches alongside the file names.
19123 @item A recursive @code{**} globbing syntax, akin for example to the
19124 @code{globstar} option of Bash.
19125 @item The ability to replace the file system functions used, in order to glob
19126 on virtual file systems.
19127 @item Compatible with Python 2 and Python 3 (tested with 3.3).
19128 @end itemize
19129
19130 Glob2 currently based on the glob code from Python 3.3.1.")
19131 (license license:bsd-2)))
19132
19133 (define-public python2-glob2
19134 (package-with-python2 python-glob2))
19135
19136 (define-public python-gipc
19137 (package
19138 (name "python-gipc")
19139 (version "0.6.0")
19140 (source
19141 (origin
19142 (method url-fetch)
19143 (uri (pypi-uri "gipc" version ".zip"))
19144 (sha256
19145 (base32
19146 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
19147 (build-system python-build-system)
19148 (native-inputs
19149 `(("unzip" ,unzip)))
19150 (propagated-inputs
19151 `(("python-gevent" ,python-gevent)))
19152 (home-page "https://gehrcke.de/gipc/")
19153 (synopsis "Child process management in the context of gevent")
19154 (description "Usage of Python's multiprocessing package in a
19155 gevent-powered application may raise problems. With @code{gipc},
19156 process-based child processes can safely be created anywhere within a
19157 gevent-powered application.")
19158 (license license:expat)))
19159
19160 (define-public python-beautifultable
19161 (package
19162 (name "python-beautifultable")
19163 (version "1.0.0")
19164 (source
19165 (origin
19166 (method url-fetch)
19167 (uri (pypi-uri "beautifultable" version))
19168 (sha256
19169 (base32
19170 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
19171 (build-system python-build-system)
19172 (propagated-inputs
19173 `(("python-wcwidth" ,python-wcwidth)))
19174 (arguments
19175 `(#:phases
19176 (modify-phases %standard-phases
19177 (add-after 'unpack 'patch-setup.py
19178 (lambda _
19179 (substitute* "setup.py"
19180 (("setup\\(")
19181 "setup(\n test_suite=\"test\",")))))))
19182 (home-page "https://github.com/pri22296/beautifultable")
19183 (synopsis "Print ASCII tables for terminals")
19184 (description "@code{python-beautifultable} provides a class for easily
19185 printing tabular data in a visually appealing ASCII format to a terminal.
19186
19187 Features include, but are not limited to:
19188 @itemize
19189 @item Full customization of the look and feel of the table
19190 @item Row and column accessors.
19191 @item Full support for colors using ANSI sequences or any library.
19192 @item Plenty of predefined styles and option to create custom ones.
19193 @item Support for Unicode characters.
19194 @item Supports streaming table when data is slow to retrieve.
19195 @end itemize")
19196 (license license:expat)))
19197
19198 (define-public python-globber
19199 (package
19200 (name "python-globber")
19201 (version "0.2.1")
19202 (source
19203 (origin
19204 (method git-fetch)
19205 (uri (git-reference
19206 (url "https://github.com/asharov/globber")
19207 (commit version)))
19208 (file-name (git-file-name name version))
19209 (sha256
19210 (base32
19211 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
19212 (build-system python-build-system)
19213 (home-page "https://github.com/asharov/globber")
19214 (synopsis "Library for string matching with glob patterns")
19215 (description
19216 "Globber is a Python library for matching file names against glob patterns.
19217 In contrast to other glob-matching libraries, it matches arbitrary strings and
19218 doesn't require the matched names to be existing files. In addition, it
19219 supports the globstar @code{**} operator to match an arbitrary number of
19220 path components.")
19221 (license license:asl2.0)))
19222
19223 (define-public python-git-hammer
19224 (package
19225 (name "python-git-hammer")
19226 (version "0.3.1")
19227 (source
19228 (origin
19229 (method git-fetch)
19230 (uri (git-reference
19231 (url "https://github.com/asharov/git-hammer")
19232 (commit version)))
19233 (file-name (git-file-name name version))
19234 (sha256
19235 (base32
19236 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
19237 (build-system python-build-system)
19238 (arguments
19239 `(#:phases
19240 (modify-phases %standard-phases
19241 (add-after 'unpack 'patch-setup.py
19242 (lambda _
19243 (substitute* "setup.py"
19244 (("setup\\(")
19245 "setup(\n test_suite=\"test\",")))))))
19246 (propagated-inputs
19247 `(("python-beautifultable" ,python-beautifultable)
19248 ("python-dateutil" ,python-dateutil)
19249 ("python-gitpython" ,python-gitpython)
19250 ("python-globber" ,python-globber)
19251 ("python-matplotlib" ,python-matplotlib)
19252 ("python-sqlalchemy" ,python-sqlalchemy)
19253 ("python-sqlalchemy-utils"
19254 ,python-sqlalchemy-utils)))
19255 (home-page "https://github.com/asharov/git-hammer")
19256 (synopsis "Provide statistics for git repositories")
19257 (description
19258 "Git Hammer is a statistics tool for projects in git repositories.
19259 Its major feature is tracking the number of lines authored by each person for every
19260 commit, but it also includes some other useful statistics.")
19261 (license license:asl2.0)))
19262
19263 (define-public python-fusepy
19264 (package
19265 (name "python-fusepy")
19266 (version "2.0.4")
19267 (source
19268 (origin
19269 (method url-fetch)
19270 (uri (pypi-uri "fusepy" version))
19271 (sha256
19272 (base32
19273 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
19274 (build-system python-build-system)
19275 (arguments
19276 `(#:phases
19277 (modify-phases %standard-phases
19278 (add-before 'build 'set-library-file-name
19279 (lambda* (#:key inputs #:allow-other-keys)
19280 (let ((fuse (assoc-ref inputs "fuse")))
19281 (substitute* "fuse.py"
19282 (("find_library\\('fuse'\\)")
19283 (string-append "'" fuse "/lib/libfuse.so'")))
19284 #t))))))
19285 (propagated-inputs
19286 `(("fuse" ,fuse)))
19287 (home-page "https://github.com/fusepy/fusepy")
19288 (synopsis "Simple ctypes bindings for FUSE")
19289 (description "Python module that provides a simple interface to FUSE and
19290 MacFUSE. The binding is created using the standard @code{ctypes} library.")
19291 (license license:isc)))
19292
19293 (define-public python2-fusepy
19294 (package-with-python2 python-fusepy))
19295
19296 (define-public python-fusepyng
19297 (package
19298 (name "python-fusepyng")
19299 (version "1.0.7")
19300 (source
19301 (origin
19302 (method url-fetch)
19303 (uri (pypi-uri "fusepyng" version))
19304 (sha256
19305 (base32
19306 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
19307 (build-system python-build-system)
19308 (arguments
19309 '(#:phases
19310 (modify-phases %standard-phases
19311 (add-after 'unpack 'set-libfuse-path
19312 (lambda* (#:key inputs #:allow-other-keys)
19313 (let ((fuse (assoc-ref inputs "fuse")))
19314 (substitute* "fusepyng.py"
19315 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
19316 (string-append "\"" fuse "/lib/libfuse.so\""))))
19317 #t)))))
19318 (inputs
19319 `(("fuse" ,fuse)))
19320 (propagated-inputs
19321 `(("python-paramiko" ,python-paramiko)))
19322 (home-page "https://github.com/rianhunter/fusepyng")
19323 (synopsis "Simple ctypes bindings for FUSE")
19324 (description "@code{fusepyng} is a Python module that provides a simple
19325 interface to FUSE on various operating systems. It's just one file and is
19326 implemented using @code{ctypes}.")
19327 (license license:isc)))
19328
19329 (define-public python-userspacefs
19330 (package
19331 (name "python-userspacefs")
19332 (version "2.0.3")
19333 (source
19334 (origin
19335 (method url-fetch)
19336 (uri (pypi-uri "userspacefs" version))
19337 (sha256
19338 (base32
19339 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
19340 (build-system python-build-system)
19341 (propagated-inputs
19342 `(("python-fusepyng" ,python-fusepyng)))
19343 (home-page "https://github.com/rianhunter/userspacefs")
19344 (synopsis "User-space file systems for Python")
19345 (description
19346 "@code{userspacefs} is a library that allows you to easily write
19347 user-space file systems in Python.")
19348 (license license:gpl3+)))
19349
19350 (define-public python-stone
19351 (package
19352 (name "python-stone")
19353 (version "3.2.1")
19354 (source
19355 (origin
19356 (method url-fetch)
19357 (uri (pypi-uri "stone" version))
19358 (sha256
19359 (base32
19360 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
19361 (build-system python-build-system)
19362 (arguments
19363 `(#:phases
19364 (modify-phases %standard-phases
19365 (add-after 'unpack 'change-version-requirements
19366 (lambda _
19367 ;; Match the requirement in test/requirements.txt
19368 (substitute* "setup.py"
19369 (("pytest < 5") "pytest < 7"))
19370 ;; We don't care about a coverage report.
19371 (substitute* "test/requirements.txt"
19372 (("coverage.*") "coverage\n"))
19373 #t))
19374 (replace 'check
19375 (lambda* (#:key tests? #:allow-other-keys)
19376 (when tests?
19377 ;; These tests don't import currectly.
19378 (delete-file "test/test_js_client.py")
19379 (delete-file "test/test_tsd_types.py")
19380 (delete-file "test/test_python_gen.py")
19381 (setenv "PYTHONPATH"
19382 (string-append (getcwd) ":"
19383 (getenv "PYTHONPATH")))
19384 (invoke "pytest"))
19385 #t)))))
19386 (propagated-inputs
19387 `(("python-ply" ,python-ply)
19388 ("python-six" ,python-six)))
19389 (native-inputs
19390 `(("python-coverage" ,python-coverage)
19391 ("python-mock" ,python-mock)
19392 ("python-pytest" ,python-pytest)
19393 ("python-pytest-runner" ,python-pytest-runner)))
19394 (home-page "https://github.com/dropbox/stone")
19395 (synopsis "Official Api Spec Language for Dropbox")
19396 (description
19397 "Stone is an interface description language (IDL) for APIs.")
19398 (license license:expat)))
19399
19400 (define-public pybind11
19401 (package
19402 (name "pybind11")
19403 (version "2.6.1")
19404 (source (origin
19405 (method git-fetch)
19406 (uri (git-reference
19407 (url "https://github.com/pybind/pybind11")
19408 (commit (string-append "v" version))))
19409 (sha256
19410 (base32
19411 "1wh5b1xnywzxwxkyac2wvyqwzmy1qxs341jjk820r7b825wn6yad"))
19412 (file-name (git-file-name name version))))
19413 (build-system cmake-build-system)
19414 (native-inputs
19415 `(("python" ,python-wrapper)
19416
19417 ;; The following dependencies are used for tests.
19418 ("python-pytest" ,python-pytest)
19419 ("catch" ,catch-framework2-1)
19420 ("eigen" ,eigen)))
19421 (arguments
19422 `(#:configure-flags
19423 (list (string-append "-DCATCH_INCLUDE_DIR="
19424 (assoc-ref %build-inputs "catch")
19425 "/include/catch"))
19426
19427 #:phases (modify-phases %standard-phases
19428 (add-after 'install 'install-python
19429 (lambda* (#:key outputs #:allow-other-keys)
19430 (let ((out (assoc-ref outputs "out")))
19431 (with-directory-excursion "../source"
19432 (setenv "PYBIND11_USE_CMAKE" "yes")
19433 (invoke "python" "setup.py" "install"
19434 "--single-version-externally-managed"
19435 "--root=/"
19436 (string-append "--prefix=" out)))))))
19437
19438 #:test-target "check"))
19439 (home-page "https://github.com/pybind/pybind11/")
19440 (synopsis "Seamless operability between C++11 and Python")
19441 (description
19442 "@code{pybind11} is a lightweight header-only library that exposes C++
19443 types in Python and vice versa, mainly to create Python bindings of existing
19444 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
19445 library: to minimize boilerplate code in traditional extension modules by
19446 inferring type information using compile-time introspection.")
19447 (license license:bsd-3)))
19448
19449 (define-public python-pooch
19450 (package
19451 (name "python-pooch")
19452 (version "1.3.0")
19453 (source
19454 (origin
19455 (method url-fetch)
19456 (uri (pypi-uri "pooch" version))
19457 (sha256
19458 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
19459 (build-system python-build-system)
19460 (arguments
19461 `(#:tests? #f)) ;requires online data
19462 (propagated-inputs
19463 `(("python-appdirs" ,python-appdirs)
19464 ("python-packaging" ,python-packaging)
19465 ("python-requests" ,python-requests)))
19466 (home-page "https://github.com/fatiando/pooch")
19467 (synopsis "Manage your Python library's sample data files")
19468 (description
19469 "Pooch manages your Python library's sample data files: it automatically
19470 downloads and stores them in a local directory, with support for versioning
19471 and corruption checks.")
19472 (license license:bsd-3)))
19473
19474 (define-public python-fasteners
19475 (package
19476 (name "python-fasteners")
19477 (version "0.15")
19478 (source
19479 (origin
19480 (method url-fetch)
19481 (uri (pypi-uri "fasteners" version))
19482 (sha256
19483 (base32
19484 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
19485 (build-system python-build-system)
19486 (propagated-inputs
19487 `(("python-monotonic" ,python-monotonic)
19488 ("python-six" ,python-six)))
19489 (native-inputs
19490 `(("python-testtools" ,python-testtools)))
19491 (home-page "https://github.com/harlowja/fasteners")
19492 (synopsis "Python package that provides useful locks")
19493 (description
19494 "This package provides a Python program that provides following locks:
19495
19496 @itemize
19497 @item Locking decorator
19498 @item Reader-writer locks
19499 @item Inter-process locks
19500 @item Generic helpers
19501 @end itemize\n")
19502 (license license:asl2.0)))
19503
19504 (define-public python-requests-file
19505 (package
19506 (name "python-requests-file")
19507 (version "1.4.3")
19508 (source
19509 (origin
19510 (method url-fetch)
19511 (uri (pypi-uri "requests-file" version))
19512 (sha256
19513 (base32
19514 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
19515 (build-system python-build-system)
19516 (propagated-inputs
19517 `(("python-requests" ,python-requests)
19518 ("python-six" ,python-six)))
19519 (home-page
19520 "https://github.com/dashea/requests-file")
19521 (synopsis "File transport adapter for Requests")
19522 (description
19523 "Requests-File is a transport adapter for use with the Requests Python
19524 library to allow local file system access via @code{file://} URLs.")
19525 (license license:asl2.0)))
19526
19527 (define-public python2-requests-file
19528 (package-with-python2 python-requests-file))
19529
19530 (define-public python-identify
19531 (package
19532 (name "python-identify")
19533 (version "1.4.25")
19534 (source
19535 (origin
19536 ;; There are no tests in the PyPI tarball.
19537 (method git-fetch)
19538 (uri (git-reference
19539 (url "https://github.com/chriskuehl/identify")
19540 (commit (string-append "v" version))))
19541 (file-name (git-file-name name version))
19542 (sha256
19543 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
19544 (build-system python-build-system)
19545 (arguments
19546 `(#:phases
19547 (modify-phases %standard-phases
19548 (replace 'check
19549 (lambda _
19550 (invoke "pytest" "-vv"))))))
19551 (native-inputs
19552 `(("python-coverage" ,python-coverage)
19553 ("python-pytest" ,python-pytest)))
19554 (propagated-inputs
19555 `(("python-editdistance" ,python-editdistance)))
19556 (home-page "https://github.com/chriskuehl/identify")
19557 (synopsis "File identification library for Python")
19558 (description
19559 "@code{identify} is a file identification library for Python. Given
19560 a file (or some information about a file), return a set of standardized tags
19561 identifying what the file is.")
19562 (license license:expat)))
19563
19564 (define-public python-tldextract
19565 (package
19566 (name "python-tldextract")
19567 (version "2.2.0")
19568 (source
19569 (origin
19570 (method url-fetch)
19571 (uri (pypi-uri "tldextract" version))
19572 (sha256
19573 (base32
19574 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
19575 (build-system python-build-system)
19576 (native-inputs
19577 `(("python-pytest" ,python-pytest)
19578 ("python-responses" ,python-responses)))
19579 (propagated-inputs
19580 `(("python-idna" ,python-idna)
19581 ("python-requests" ,python-requests)
19582 ("python-requests-file" ,python-requests-file)))
19583 (home-page
19584 "https://github.com/john-kurkowski/tldextract")
19585 (synopsis
19586 "Separate the TLD from the registered domain and subdomains of a URL")
19587 (description
19588 "TLDExtract accurately separates the TLD from the registered domain and
19589 subdomains of a URL, using the Public Suffix List. By default, this includes
19590 the public ICANN TLDs and their exceptions. It can optionally support the
19591 Public Suffix List's private domains as well.")
19592 (license license:bsd-3)))
19593
19594 (define-public python2-tldextract
19595 (package-with-python2 python-tldextract))
19596
19597 (define-public python-nodeenv
19598 (package
19599 (name "python-nodeenv")
19600 (version "1.4.0")
19601 (source
19602 (origin
19603 ;; There's no tarball in PyPI.
19604 (method git-fetch)
19605 (uri (git-reference
19606 (url "https://github.com/ekalinin/nodeenv")
19607 (commit version)))
19608 (file-name (git-file-name name version))
19609 (sha256
19610 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
19611 (build-system python-build-system)
19612 (arguments
19613 `(#:phases
19614 (modify-phases %standard-phases
19615 (replace 'check
19616 (lambda _
19617 ;; This test fails. It tries to open a network socket.
19618 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
19619 (native-inputs
19620 `(("python-coverage" ,python-coverage)
19621 ("python-mock" ,python-mock)
19622 ("python-pytest" ,python-pytest)))
19623 (home-page "https://ekalinin.github.io/nodeenv/")
19624 (synopsis "Create isolated node.js environments")
19625 (description
19626 "Nodeenv (node.js virtual environment) is a tool to create isolated
19627 node.js environments. It creates an environment that has its own installation
19628 directories, that doesn't share libraries with other node.js virtual
19629 environments.")
19630 (license license:bsd-3)))
19631
19632 (define-public python-pynamecheap
19633 (package
19634 (name "python-pynamecheap")
19635 (version "0.0.3")
19636 (source
19637 (origin
19638 (method url-fetch)
19639 (uri (pypi-uri "PyNamecheap" version))
19640 (sha256
19641 (base32
19642 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
19643 (build-system python-build-system)
19644 (propagated-inputs
19645 `(("python-requests" ,python-requests)))
19646 (home-page
19647 "https://github.com/Bemmu/PyNamecheap")
19648 (synopsis
19649 "Namecheap API client in Python")
19650 (description
19651 "PyNamecheap is a Namecheap API client in Python.")
19652 (license license:expat)))
19653
19654 (define-public python2-pynamecheap
19655 (package-with-python2 python-pynamecheap))
19656
19657 (define-public python-dns-lexicon
19658 (package
19659 (name "python-dns-lexicon")
19660 (version "2.4.0")
19661 (source
19662 (origin
19663 (method url-fetch)
19664 (uri (pypi-uri "dns-lexicon" version))
19665 (sha256
19666 (base32
19667 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
19668 (build-system python-build-system)
19669 (arguments
19670 `(#:tests? #f)) ;requires internet access
19671 (propagated-inputs
19672 `(("python-future" ,python-future)
19673 ("python-pynamecheap" ,python-pynamecheap)
19674 ("python-requests" ,python-requests)
19675 ("python-tldextract" ,python-tldextract)
19676 ("python-urllib3" ,python-urllib3)))
19677 (home-page "https://github.com/AnalogJ/lexicon")
19678 (synopsis
19679 "Manipulate DNS records on various DNS providers")
19680 (description
19681 "Lexicon provides a way to manipulate DNS records on multiple DNS
19682 providers in a standardized way. It has a CLI but it can also be used as a
19683 Python library. It was designed to be used in automation, specifically with
19684 Let's Encrypt.")
19685 (license license:expat)))
19686
19687 (define-public python2-dns-lexicon
19688 (package-with-python2 python-dns-lexicon))
19689
19690 (define-public python-cfgv
19691 (package
19692 (name "python-cfgv")
19693 (version "3.1.0")
19694 (source
19695 (origin
19696 ;; There are no tests in the PyPI tarball.
19697 (method git-fetch)
19698 (uri (git-reference
19699 (url "https://github.com/asottile/cfgv")
19700 (commit (string-append "v" version))))
19701 (file-name (git-file-name name version))
19702 (sha256
19703 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19704 (build-system python-build-system)
19705 (arguments
19706 `(#:phases
19707 (modify-phases %standard-phases
19708 (replace 'check
19709 (lambda _
19710 (invoke "pytest" "-vv"))))))
19711 (native-inputs
19712 `(("python-covdefaults" ,python-covdefaults)
19713 ("python-coverage" ,python-coverage)
19714 ("python-pytest" ,python-pytest)))
19715 (home-page "https://github.com/asottile/cfgv")
19716 (synopsis "Configuration validation library")
19717 (description
19718 "This library helps to validate configuration files and produce human
19719 readable error messages.")
19720 (license license:expat)))
19721
19722 (define-public python-commandlines
19723 (package
19724 (name "python-commandlines")
19725 (version "0.4.1")
19726 (source
19727 (origin
19728 (method url-fetch)
19729 (uri (pypi-uri "commandlines" version))
19730 (sha256
19731 (base32
19732 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
19733 (build-system python-build-system)
19734 (home-page "https://github.com/chrissimpkins/commandlines")
19735 (synopsis "Command line argument to object parsing library")
19736 (description
19737 "@code{Commandlines} is a Python library for command line application
19738 development that supports command line argument parsing, command string
19739 validation testing and application logic.")
19740 (license license:expat)))
19741
19742 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19743 ;; python-numba. They have a very unflexible relationship.
19744 (define-public python-numba
19745 (package
19746 (name "python-numba")
19747 (version "0.51.2")
19748 (source
19749 (origin
19750 (method url-fetch)
19751 (uri (pypi-uri "numba" version))
19752 (sha256
19753 (base32
19754 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19755 (build-system python-build-system)
19756 (arguments
19757 `(#:phases
19758 (modify-phases %standard-phases
19759 (add-after 'unpack 'disable-proprietary-features
19760 (lambda _
19761 (setenv "NUMBA_DISABLE_HSA" "1")
19762 (setenv "NUMBA_DISABLE_CUDA" "1")
19763 #t))
19764 (replace 'check
19765 (lambda* (#:key inputs outputs #:allow-other-keys)
19766 (add-installed-pythonpath inputs outputs)
19767 ;; Something is wrong with the PYTHONPATH when running the
19768 ;; tests from the build directory, as it complains about not being
19769 ;; able to import certain modules.
19770 (with-directory-excursion "/tmp"
19771 (setenv "HOME" (getcwd))
19772 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19773 (propagated-inputs
19774 `(("python-llvmlite" ,python-llvmlite)
19775 ("python-numpy" ,python-numpy)
19776 ("python-singledispatch" ,python-singledispatch)))
19777 (native-inputs ;for tests
19778 `(("python-jinja2" ,python-jinja2)
19779 ("python-pygments" ,python-pygments)))
19780 (home-page "https://numba.pydata.org")
19781 (synopsis "Compile Python code using LLVM")
19782 (description "Numba gives you the power to speed up your applications with
19783 high performance functions written directly in Python. With a few
19784 annotations, array-oriented and math-heavy Python code can be just-in-time
19785 compiled to native machine instructions, similar in performance to C, C++ and
19786 Fortran, without having to switch languages or Python interpreters.
19787
19788 Numba works by generating optimized machine code using the LLVM compiler
19789 infrastructure at import time, runtime, or statically (using the included pycc
19790 tool).")
19791 (license license:bsd-3)))
19792
19793 (define-public python-numcodecs
19794 (package
19795 (name "python-numcodecs")
19796 (version "0.6.4")
19797 (source
19798 (origin
19799 (method url-fetch)
19800 (uri (pypi-uri "numcodecs" version))
19801 (sha256
19802 (base32
19803 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19804 (build-system python-build-system)
19805 (propagated-inputs
19806 `(("python-numpy" ,python-numpy)
19807 ("python-msgpack" ,python-msgpack)))
19808 (native-inputs
19809 `(("python-pytest" ,python-pytest)
19810 ("python-setuptools-scm" ,python-setuptools-scm)))
19811 (home-page "https://github.com/zarr-developers/numcodecs")
19812 (synopsis "Buffer compression and transformation codecs")
19813 (description
19814 "This Python package provides buffer compression and transformation
19815 codecs for use in data storage and communication applications.")
19816 (license license:expat)))
19817
19818 (define-public python-asciitree
19819 (package
19820 (name "python-asciitree")
19821 (version "0.3.3")
19822 (source
19823 (origin
19824 (method url-fetch)
19825 (uri (pypi-uri "asciitree" version))
19826 (sha256
19827 (base32
19828 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19829 (build-system python-build-system)
19830 (home-page "https://github.com/mbr/asciitree")
19831 (synopsis "Draws ASCII trees")
19832 (description "This package draws tree structures using characters.")
19833 (license license:expat)))
19834
19835 (define-public python-zarr
19836 (package
19837 (name "python-zarr")
19838 (version "2.4.0")
19839 (source
19840 (origin
19841 (method url-fetch)
19842 (uri (pypi-uri "zarr" version))
19843 (sha256
19844 (base32
19845 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19846 (build-system python-build-system)
19847 (arguments
19848 `(#:phases
19849 (modify-phases %standard-phases
19850 (add-after 'unpack 'disable-service-tests
19851 (lambda _
19852 (setenv "ZARR_TEST_ABS" "0")
19853 (setenv "ZARR_TEST_MONGO" "0")
19854 (setenv "ZARR_TEST_REDIS" "0")
19855 #t))
19856 (replace 'check
19857 (lambda _
19858 (invoke "pytest" "-vv" "-k" "not lmdb")
19859 #t)))))
19860 (propagated-inputs
19861 `(("python-asciitree" ,python-asciitree)
19862 ("python-fasteners" ,python-fasteners)
19863 ("python-numcodecs" ,python-numcodecs)
19864 ("python-numpy" ,python-numpy)))
19865 (native-inputs
19866 `(("python-pytest" ,python-pytest)
19867 ("python-setuptools-scm" ,python-setuptools-scm)))
19868 (home-page "https://github.com/zarr-developers/zarr-python")
19869 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19870 (description
19871 "This package provides an implementation of chunked, compressed,
19872 N-dimensional arrays for Python.")
19873 (license license:expat)))
19874
19875 (define-public python-anndata
19876 (package
19877 (name "python-anndata")
19878 (version "0.7.1")
19879 (source
19880 (origin
19881 (method url-fetch)
19882 (uri (pypi-uri "anndata" version))
19883 (sha256
19884 (base32
19885 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19886 (build-system python-build-system)
19887 (arguments
19888 `(#:phases
19889 (modify-phases %standard-phases
19890 (add-after 'unpack 'delete-inconvenient-tests
19891 (lambda _
19892 ;; This test depends on python-scikit-learn.
19893 (delete-file "anndata/tests/test_inplace_subset.py")
19894 #t))
19895 (delete 'check)
19896 (add-after 'install 'check
19897 (lambda* (#:key inputs outputs #:allow-other-keys)
19898 (add-installed-pythonpath inputs outputs)
19899 (invoke "pytest" "-vv"))))))
19900 (propagated-inputs
19901 `(("python-h5py" ,python-h5py)
19902 ("python-importlib-metadata" ,python-importlib-metadata)
19903 ("python-natsort" ,python-natsort)
19904 ("python-numcodecs" ,python-numcodecs)
19905 ("python-packaging" ,python-packaging)
19906 ("python-pandas" ,python-pandas)
19907 ("python-scipy" ,python-scipy)
19908 ("python-zarr" ,python-zarr)))
19909 (native-inputs
19910 `(("python-joblib" ,python-joblib)
19911 ("python-pytest" ,python-pytest)
19912 ("python-setuptools-scm" ,python-setuptools-scm)))
19913 (home-page "https://github.com/theislab/anndata")
19914 (synopsis "Annotated data for data analysis pipelines")
19915 (description "Anndata is a package for simple (functional) high-level APIs
19916 for data analysis pipelines. In this context, it provides an efficient,
19917 scalable way of keeping track of data together with learned annotations and
19918 reduces the code overhead typically encountered when using a mostly
19919 object-oriented library such as @code{scikit-learn}.")
19920 (license license:bsd-3)))
19921
19922 (define-public python-dill
19923 (package
19924 (name "python-dill")
19925 (version "0.3.1.1")
19926 (source
19927 (origin
19928 (method url-fetch)
19929 (uri (pypi-uri "dill" version))
19930 (sha256
19931 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
19932 (build-system python-build-system)
19933 (arguments
19934 `(#:phases
19935 (modify-phases %standard-phases
19936 (replace 'check
19937 (lambda _
19938 (with-directory-excursion "/tmp"
19939 (invoke "nosetests" "-v"))
19940 #t)))))
19941 (native-inputs
19942 `(("python-nose" ,python-nose)))
19943 (home-page "https://pypi.org/project/dill/")
19944 (synopsis "Serialize all of Python")
19945 (description "Dill extends Python's @code{pickle} module for serializing
19946 and de-serializing Python objects to the majority of the built-in Python
19947 types. Dill provides the user the same interface as the @code{pickle} module,
19948 and also includes some additional features. In addition to pickling Python
19949 objects, @code{dill} provides the ability to save the state of an interpreter
19950 session in a single command. Hence, it would be feasible to save a
19951 interpreter session, close the interpreter, ship the pickled file to another
19952 computer, open a new interpreter, unpickle the session and thus continue from
19953 the saved state of the original interpreter session.")
19954 (license license:bsd-3)))
19955
19956 (define-public python-multiprocess
19957 (package
19958 (name "python-multiprocess")
19959 (version "0.70.9")
19960 (source
19961 (origin
19962 (method url-fetch)
19963 (uri (pypi-uri "multiprocess" version))
19964 (sha256
19965 (base32
19966 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
19967 (build-system python-build-system)
19968 (arguments
19969 `(#:phases
19970 (modify-phases %standard-phases
19971 (add-after 'unpack 'disable-broken-tests
19972 (lambda _
19973 ;; This test is broken as there is no keyboard interrupt.
19974 (substitute* "py3.7/multiprocess/tests/__init__.py"
19975 (("^(.*)def test_wait_result"
19976 line indent)
19977 (string-append indent
19978 "@unittest.skip(\"Disabled by Guix\")\n"
19979 line)))
19980 #t))
19981 ;; Tests must be run after installation.
19982 (delete 'check)
19983 (add-after 'install 'check
19984 (lambda* (#:key inputs outputs #:allow-other-keys)
19985 (add-installed-pythonpath inputs outputs)
19986 (invoke "python" "-m" "multiprocess.tests")
19987 #t)))))
19988 (propagated-inputs
19989 `(("python-dill" ,python-dill)))
19990 (home-page "https://pypi.org/project/multiprocess/")
19991 (synopsis "Multiprocessing and multithreading in Python")
19992 (description
19993 "This package is a fork of the multiprocessing Python package, a package
19994 which supports the spawning of processes using the API of the standard
19995 library's @code{threading} module.")
19996 (license license:bsd-3)))
19997
19998 (define-public python-toolz
19999 (package
20000 (name "python-toolz")
20001 (version "0.9.0")
20002 (source
20003 (origin
20004 (method url-fetch)
20005 (uri (pypi-uri "toolz" version))
20006 (sha256
20007 (base32
20008 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
20009 (build-system python-build-system)
20010 ;; FIXME: tests cannot be computed: "Can't perform this operation for
20011 ;; unregistered loader type"
20012 (arguments '(#:tests? #f))
20013 (home-page "https://github.com/pytoolz/toolz/")
20014 (synopsis "List processing tools and functional utilities")
20015 (description
20016 "This package provides a set of utility functions for iterators,
20017 functions, and dictionaries.")
20018 (license license:bsd-3)))
20019
20020 (define-public python2-toolz
20021 (package-with-python2 python-toolz))
20022
20023 (define-public python-cytoolz
20024 (package
20025 (name "python-cytoolz")
20026 (version "0.9.0.1")
20027 (source
20028 (origin
20029 (method url-fetch)
20030 (uri (pypi-uri "cytoolz" version))
20031 (sha256
20032 (base32
20033 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
20034 (build-system python-build-system)
20035 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
20036 ;; 'exceptions'"
20037 (arguments '(#:tests? #f))
20038 (propagated-inputs
20039 `(("python-toolz" ,python-toolz)))
20040 (native-inputs
20041 `(("python-cython" ,python-cython)))
20042 (home-page "https://github.com/pytoolz/cytoolz")
20043 (synopsis "High performance functional utilities")
20044 (description
20045 "The cytoolz package implements the same API as provided by toolz. The
20046 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
20047 that is accessible to other projects developed in Cython.")
20048 (license license:bsd-3)))
20049
20050 (define-public python-sortedcollections
20051 (package
20052 (name "python-sortedcollections")
20053 (version "2.1.0")
20054 (source
20055 (origin
20056 (method url-fetch)
20057 (uri (pypi-uri "sortedcollections" version))
20058 (sha256
20059 (base32
20060 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
20061 (build-system python-build-system)
20062 (propagated-inputs
20063 `(("python-sortedcontainers" ,python-sortedcontainers)))
20064 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
20065 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
20066 (synopsis "Python Sorted Collections")
20067 (description "Sorted Collections is a Python sorted collections library.")
20068 (license license:asl2.0)))
20069
20070 (define-public python-sortedcontainers
20071 (package
20072 (name "python-sortedcontainers")
20073 (version "2.1.0")
20074 (source
20075 (origin
20076 (method url-fetch)
20077 (uri (pypi-uri "sortedcontainers" version))
20078 (sha256
20079 (base32
20080 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
20081 (build-system python-build-system)
20082 (arguments
20083 ;; FIXME: Tests require many extra dependencies, and would introduce
20084 ;; a circular dependency on hypothesis, which uses this package.
20085 '(#:tests? #f))
20086 (propagated-inputs
20087 `(("python-appdirs" ,python-appdirs)
20088 ("python-distlib" ,python-distlib)
20089 ("python-filelock" ,python-filelock)
20090 ("python-six" ,python-six-bootstrap)))
20091 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
20092 (synopsis "Sorted List, Sorted Dict, Sorted Set")
20093 (description
20094 "This package provides a sorted collections library, written in
20095 pure-Python.")
20096 (license license:asl2.0)))
20097
20098 (define-public python2-sortedcontainers
20099 (package-with-python2 python-sortedcontainers))
20100
20101 (define-public python-cloudpickle
20102 (package
20103 (name "python-cloudpickle")
20104 (version "1.3.0")
20105 (source
20106 (origin
20107 (method url-fetch)
20108 (uri (pypi-uri "cloudpickle" version))
20109 (sha256
20110 (base32
20111 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
20112 (build-system python-build-system)
20113 (arguments
20114 '(#:phases (modify-phases %standard-phases
20115 (add-before 'check 'do-not-override-PYTHONPATH
20116 (lambda _
20117 ;; Append to PYTHONPATH instead of overriding it so
20118 ;; that dependencies from Guix can be found.
20119 (substitute* "tests/testutils.py"
20120 (("env\\['PYTHONPATH'\\] = pythonpath")
20121 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
20122 #t))
20123 (replace 'check
20124 (lambda* (#:key tests? #:allow-other-keys)
20125 (if tests?
20126 (invoke "pytest" "-s" "-vv")
20127 (format #t "test suite not run~%"))
20128 #t)))))
20129 (native-inputs
20130 `(;; For tests.
20131 ("python-psutil" ,python-psutil)
20132 ("python-pytest" ,python-pytest)
20133 ("python-tornado" ,python-tornado)))
20134 (home-page "https://github.com/cloudpipe/cloudpickle")
20135 (synopsis "Extended pickling support for Python objects")
20136 (description
20137 "Cloudpickle makes it possible to serialize Python constructs not
20138 supported by the default pickle module from the Python standard library. It
20139 is especially useful for cluster computing where Python expressions are
20140 shipped over the network to execute on remote hosts, possibly close to the
20141 data.")
20142 (properties `((python2-variant . ,(delay python2-cloudpickle))))
20143 (license license:bsd-3)))
20144
20145 (define-public python2-cloudpickle
20146 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
20147 (package/inherit base
20148 (native-inputs
20149 `(("python-mock" ,python2-mock)
20150 ,@(package-native-inputs base)))
20151 (propagated-inputs
20152 `(("python-futures" ,python2-futures)
20153 ,@(package-propagated-inputs base))))))
20154
20155 (define-public python-locket
20156 (package
20157 (name "python-locket")
20158 (version "0.2.0")
20159 (source
20160 (origin
20161 (method url-fetch)
20162 (uri (pypi-uri "locket" version))
20163 (sha256
20164 (base32
20165 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
20166 (build-system python-build-system)
20167 (home-page "https://github.com/mwilliamson/locket.py")
20168 (synopsis "File-based locks for Python")
20169 (description
20170 "Locket implements a lock that can be used by multiple processes provided
20171 they use the same path.")
20172 (license license:bsd-2)))
20173
20174 (define-public python2-locket
20175 (package-with-python2 python-locket))
20176
20177 (define-public python-blosc
20178 (package
20179 (name "python-blosc")
20180 (version "1.5.1")
20181 (source
20182 (origin
20183 (method url-fetch)
20184 (uri (pypi-uri "blosc" version))
20185 (sha256
20186 (base32
20187 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
20188 (build-system python-build-system)
20189 ;; FIXME: all tests pass, but then this error is printed:
20190 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
20191 (arguments '(#:tests? #f))
20192 (propagated-inputs
20193 `(("python-numpy" ,python-numpy)))
20194 (home-page "https://github.com/blosc/python-blosc")
20195 (synopsis "Python wrapper for the Blosc data compressor library")
20196 (description "Blosc is a high performance compressor optimized for binary
20197 data. It has been designed to transmit data to the processor cache faster
20198 than the traditional, non-compressed, direct memory fetch approach via a
20199 @code{memcpy()} system call.
20200
20201 Blosc works well for compressing numerical arrays that contains data with
20202 relatively low entropy, like sparse data, time series, grids with
20203 regular-spaced values, etc.
20204
20205 This Python package wraps the Blosc library.")
20206 (license license:bsd-3)))
20207
20208 (define-public python2-blosc
20209 (package-with-python2 python-blosc))
20210
20211 (define-public python-partd
20212 (package
20213 (name "python-partd")
20214 (version "0.3.9")
20215 (source
20216 (origin
20217 (method url-fetch)
20218 (uri (pypi-uri "partd" version))
20219 (sha256
20220 (base32
20221 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
20222 (build-system python-build-system)
20223 (propagated-inputs
20224 `(("python-blosc" ,python-blosc)
20225 ("python-locket" ,python-locket)
20226 ("python-numpy" ,python-numpy)
20227 ("python-pandas" ,python-pandas)
20228 ("python-pyzmq" ,python-pyzmq)
20229 ("python-toolz" ,python-toolz)))
20230 (home-page "https://github.com/dask/partd/")
20231 (synopsis "Appendable key-value storage")
20232 (description "Partd stores key-value pairs. Values are raw bytes. We
20233 append on old values. Partd excels at shuffling operations.")
20234 (license license:bsd-3)))
20235
20236 (define-public python2-partd
20237 (package-with-python2 python-partd))
20238
20239 (define-public python-fsspec
20240 (package
20241 (name "python-fsspec")
20242 (version "0.6.1")
20243 (source
20244 (origin
20245 (method url-fetch)
20246 (uri (pypi-uri "fsspec" version))
20247 (sha256
20248 (base32
20249 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
20250 (build-system python-build-system)
20251 (arguments '(#:tests? #f)) ; there are none
20252 (home-page "https://github.com/intake/filesystem_spec")
20253 (synopsis "File-system specification")
20254 (description "The purpose of this package is to produce a template or
20255 specification for a file-system interface, that specific implementations
20256 should follow, so that applications making use of them can rely on a common
20257 behavior and not have to worry about the specific internal implementation
20258 decisions with any given backend.")
20259 (license license:bsd-3)))
20260
20261 (define-public python-dask
20262 (package
20263 (name "python-dask")
20264 (version "2.14.0")
20265 (source
20266 (origin
20267 (method url-fetch)
20268 (uri (pypi-uri "dask" version))
20269 (sha256
20270 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
20271 (build-system python-build-system)
20272 (arguments
20273 `(#:phases
20274 (modify-phases %standard-phases
20275 (add-after 'unpack 'disable-broken-tests
20276 (lambda _
20277 ;; This test is marked as xfail when pytest-xdist is used.
20278 (substitute* "dask/tests/test_threaded.py"
20279 (("def test_interrupt\\(\\)" m)
20280 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20281 m)))
20282 ;; This one fails with a type error:
20283 ;; TypeError: Already tz-aware, use tz_convert to convert.
20284 (substitute* "dask/dataframe/tests/test_shuffle.py"
20285 (("def test_set_index_timestamp\\(\\)" m)
20286 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20287 m)))
20288 #t))
20289 (replace 'check
20290 (lambda _ (invoke "pytest" "-vv"))))))
20291 (propagated-inputs
20292 `(("python-cloudpickle" ,python-cloudpickle)
20293 ("python-fsspec" ,python-fsspec)
20294 ("python-numpy" ,python-numpy)
20295 ("python-packaging" ,python-packaging)
20296 ("python-pandas" ,python-pandas)
20297 ("python-partd" ,python-partd)
20298 ("python-toolz" ,python-toolz)
20299 ("python-pyyaml" ,python-pyyaml)))
20300 (native-inputs
20301 `(("python-pytest" ,python-pytest)
20302 ("python-pytest-runner" ,python-pytest-runner)))
20303 (home-page "https://github.com/dask/dask/")
20304 (synopsis "Parallel computing with task scheduling")
20305 (description
20306 "Dask is a flexible parallel computing library for analytics. It
20307 consists of two components: dynamic task scheduling optimized for computation,
20308 and large data collections like parallel arrays, dataframes, and lists that
20309 extend common interfaces like NumPy, Pandas, or Python iterators to
20310 larger-than-memory or distributed environments. These parallel collections
20311 run on top of the dynamic task schedulers. ")
20312 (license license:bsd-3)))
20313
20314 (define-public python-ilinkedlist
20315 (package
20316 (name "python-ilinkedlist")
20317 (version "0.4.0")
20318 (source
20319 (origin
20320 (method url-fetch)
20321 (uri (pypi-uri "ilinkedlist" version))
20322 (sha256
20323 (base32
20324 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
20325 (build-system python-build-system)
20326 (native-inputs `(("python-pytest" ,python-pytest)))
20327 (inputs `(("python" ,python)))
20328 (home-page "https://github.com/luther9/ilinkedlist-py")
20329 (synopsis "Immutable linked list library")
20330 (description
20331 "This is a implementation of immutable linked lists for Python. It
20332 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
20333 Since a linked list is treated as immutable, it is hashable, and its length
20334 can be retrieved in constant time. Some of the terminology is inspired by
20335 LISP. It is possible to create an improper list by creating a @code{Pair}
20336 with a non-list @code{cdr}.")
20337 (license license:gpl3+)))
20338
20339 (define-public python-readlike
20340 (package
20341 (name "python-readlike")
20342 (version "0.1.3")
20343 (source
20344 (origin
20345 (method url-fetch)
20346 (uri (pypi-uri "readlike" version))
20347 (sha256
20348 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
20349 (build-system python-build-system)
20350 (home-page "https://github.com/jangler/readlike")
20351 (synopsis "GNU Readline-like line editing module")
20352 (description
20353 "This Python module provides line editing functions similar to the default
20354 Emacs-style ones of GNU Readline. Unlike the Python standard library's
20355 @code{readline} package, this one allows access to those capabilities in settings
20356 outside of a standard command-line interface. It is especially well-suited to
20357 interfacing with Urwid, due to a shared syntax for describing key inputs.
20358
20359 Currently, all stateless Readline commands are implemented. Yanking and history
20360 are not supported.")
20361 (license license:expat)))
20362
20363 (define-public python2-readlike
20364 (package-with-python2 python-readlike))
20365
20366 (define-public python-reparser
20367 (package
20368 (name "python-reparser")
20369 (version "1.4.3")
20370 (source
20371 (origin
20372 (method url-fetch)
20373 (uri (pypi-uri "ReParser" version))
20374 (sha256
20375 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
20376 (build-system python-build-system)
20377 (home-page "https://github.com/xmikos/reparser")
20378 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
20379 (description
20380 "This Python library provides a simple lexer/parser for inline markup based
20381 on regular expressions.")
20382 (license license:expat)))
20383
20384 (define-public python2-reparser
20385 (let ((reparser (package-with-python2
20386 (strip-python2-variant python-reparser))))
20387 (package/inherit reparser
20388 (propagated-inputs
20389 `(("python2-enum34" ,python2-enum34)
20390 ,@(package-propagated-inputs reparser))))))
20391
20392 (define-public python-retrying
20393 (package
20394 (name "python-retrying")
20395 (version "1.3.3")
20396 (source
20397 (origin
20398 (method git-fetch)
20399 (uri (git-reference
20400 (url "https://github.com/rholder/retrying")
20401 (commit (string-append "v" version))))
20402 (file-name (git-file-name name version))
20403 (sha256
20404 (base32
20405 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
20406 (build-system python-build-system)
20407 (propagated-inputs
20408 `(("python-six" ,python-six)))
20409 (home-page "https://github.com/rholder/retrying")
20410 (synopsis "Library for adding retry behavior")
20411 (description "Retrying is a general-purpose retrying library to simplify
20412 the task of adding retry behavior to just about anything.
20413
20414 Features:
20415
20416 @itemize
20417 @item Generic Decorator API.
20418 @item Specify stop condition (i.e. limit by number of attempts).
20419 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
20420 @item Customize retrying on Exceptions.
20421 @item Customize retrying on expected returned result.
20422 @end itemize")
20423 (license license:asl2.0)))
20424
20425 (define-public python-pre-commit
20426 (package
20427 (name "python-pre-commit")
20428 (version "2.10.0")
20429 (source
20430 (origin
20431 (method url-fetch)
20432 (uri (pypi-uri "pre_commit" version))
20433 (sha256
20434 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
20435 (build-system python-build-system)
20436 (arguments
20437 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
20438 ;; attribute 'empty_template_setup'".
20439 `(#:tests? #false))
20440 (propagated-inputs
20441 `(("python-cfgv" ,python-cfgv)
20442 ("python-identify" ,python-identify)
20443 ("python-importlib-metadata" ,python-importlib-metadata)
20444 ("python-importlib-resources" ,python-importlib-resources)
20445 ("python-nodeenv" ,python-nodeenv)
20446 ("python-pyyaml" ,python-pyyaml)
20447 ("python-toml" ,python-toml)
20448 ("python-virtualenv" ,python-virtualenv)))
20449 (home-page "https://github.com/pre-commit/pre-commit")
20450 (synopsis "Framework for managing multi-language pre-commit hooks")
20451 (description
20452 "This package provides a framework for managing and maintaining
20453 multi-language pre-commit hooks.")
20454 (license license:expat)))
20455
20456 (define-public python-precis-i18n
20457 (package
20458 (name "python-precis-i18n")
20459 (version "1.0.0")
20460 (source
20461 (origin
20462 (method url-fetch)
20463 (uri (pypi-uri "precis_i18n" version))
20464 (sha256
20465 (base32
20466 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
20467 (build-system python-build-system)
20468 (home-page "https://github.com/byllyfish/precis_i18n")
20469 (synopsis "Implementation of the PRECIS framework")
20470 (description
20471 "This module implements the PRECIS Framework as described in RFC 8264,
20472 RFC 8265 and RFC 8266.")
20473 (license license:expat)))
20474
20475 (define-public python-absl-py
20476 (package
20477 (name "python-absl-py")
20478 (version "0.6.1")
20479 (source
20480 (origin
20481 (method url-fetch)
20482 (uri (pypi-uri "absl-py" version))
20483 (sha256
20484 (base32
20485 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
20486 (build-system python-build-system)
20487 (propagated-inputs
20488 `(("python-six" ,python-six)))
20489 (home-page "https://github.com/abseil/abseil-py")
20490 (synopsis "Abseil Python common libraries")
20491 (description
20492 "This package provides the Abseil Python Common Libraries, a collection
20493 of Python libraries for building Python applications.")
20494 (license license:asl2.0)))
20495
20496 (define-public python-astor
20497 (package
20498 (name "python-astor")
20499 (version "0.7.1")
20500 (source
20501 (origin
20502 (method url-fetch)
20503 (uri (pypi-uri "astor" version))
20504 (sha256
20505 (base32
20506 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
20507 (build-system python-build-system)
20508 ;; FIXME: There are two errors and two test failures.
20509 (arguments `(#:tests? #f))
20510 (home-page "https://github.com/berkerpeksag/astor")
20511 (synopsis "Read and write Python ASTs")
20512 (description "Astor is designed to allow easy manipulation of Python
20513 source via the Abstract Syntax Tree.")
20514 (license license:bsd-3)))
20515
20516 (define-public python2-astor
20517 (package-with-python2 python-astor))
20518
20519 (define-public python-astunparse
20520 (package
20521 (name "python-astunparse")
20522 (version "1.6.2")
20523 (source
20524 (origin
20525 (method url-fetch)
20526 (uri (pypi-uri "astunparse" version))
20527 (sha256
20528 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
20529 (build-system python-build-system)
20530 (arguments '(#:tests? #f)) ; there are none
20531 (propagated-inputs
20532 `(("python-six" ,python-six)
20533 ("python-wheel" ,python-wheel)))
20534 (home-page "https://github.com/simonpercivall/astunparse")
20535 (synopsis "AST unparser for Python")
20536 (description "This package provides an AST unparser for Python. It is a
20537 factored out version of @code{unparse} found in the Python source
20538 distribution.")
20539 (license license:bsd-3)))
20540
20541 (define-public python-gast
20542 (package
20543 (name "python-gast")
20544 (version "0.3.3")
20545 (source
20546 (origin
20547 (method url-fetch)
20548 (uri (pypi-uri "gast" version))
20549 (sha256
20550 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
20551 (build-system python-build-system)
20552 (propagated-inputs
20553 `(("python-astunparse" ,python-astunparse)))
20554 (home-page "https://pypi.org/project/gast/")
20555 (synopsis "Generic Python AST that abstracts the underlying Python version")
20556 (description
20557 "GAST provides a compatibility layer between the AST of various Python
20558 versions, as produced by @code{ast.parse} from the standard @code{ast}
20559 module.")
20560 (license license:bsd-3)))
20561
20562 (define-public python-wikidata
20563 (package
20564 (name "python-wikidata")
20565 (version "0.6.1")
20566 (source
20567 (origin
20568 (method url-fetch)
20569 (uri (pypi-uri "Wikidata" version))
20570 (sha256
20571 (base32
20572 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
20573 (build-system python-build-system)
20574 (propagated-inputs
20575 `(("python-babel" ,python-babel)))
20576 (home-page "https://github.com/dahlia/wikidata")
20577 (synopsis "Wikidata client library")
20578 (description
20579 "This package provides a Python interface to
20580 @url{https://www.wikidata.org/, Wikidata}.")
20581 (properties '((upstream-name . "Wikidata")))
20582 (license license:gpl3+)))
20583
20584 (define-public python-doctest-ignore-unicode
20585 (package
20586 (name "python-doctest-ignore-unicode")
20587 (version "0.1.2")
20588 (source
20589 (origin
20590 (method url-fetch)
20591 (uri (pypi-uri "doctest-ignore-unicode" version))
20592 (sha256
20593 (base32
20594 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
20595 (build-system python-build-system)
20596 (native-inputs
20597 `(("python-nose" ,python-nose)))
20598 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
20599 (synopsis "Ignore Unicode literal prefixes in doctests")
20600 (description
20601 "This package adds support for a flag to ignore Unicode literal prefixes
20602 in doctests.")
20603 (license license:asl2.0)))
20604
20605 (define-public python-attr
20606 (package
20607 (name "python-attr")
20608 (version "0.3.1")
20609 (source
20610 (origin
20611 (method url-fetch)
20612 (uri (pypi-uri "attr" version))
20613 (sha256
20614 (base32
20615 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
20616 (build-system python-build-system)
20617 (home-page "https://github.com/denis-ryzhkov/attr")
20618 (synopsis "Decorator for attributes of target function or class")
20619 (description "Simple decorator to set attributes of target function or
20620 class in a @acronym{DRY, Don't Repeat Yourself} way.")
20621 (license license:expat)))
20622
20623 (define-public python-construct
20624 (package
20625 (name "python-construct")
20626 (version "2.10.56")
20627 (source
20628 (origin
20629 (method url-fetch)
20630 (uri (pypi-uri "construct" version))
20631 (sha256
20632 (base32
20633 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
20634 (build-system python-build-system)
20635 (arguments
20636 `(#:tests? #f)) ; No tests exist.
20637 (propagated-inputs
20638 `(("python-extras" ,python-extras)
20639 ("python-arrow" ,python-arrow)
20640 ("python-numpy" ,python-numpy)
20641 ("python-ruamel.yaml" ,python-ruamel.yaml)))
20642 (home-page "https://construct.readthedocs.io")
20643 (synopsis "Declarative and symmetrical parser and builder for binary data")
20644 (description
20645 "This package provides both simple, atomic constructs (such as
20646 integers of various sizes), as well as composite ones which allow you
20647 form hierarchical and sequential structures of increasing complexity.
20648 It features bit and byte granularity, easy debugging and testing, an
20649 easy-to-extend subclass system, and lots of primitive constructs to
20650 make your work easier.")
20651 (license license:expat)))
20652
20653 (define-public python-outcome
20654 (package
20655 (name "python-outcome")
20656 (version "1.0.1")
20657 (source
20658 (origin
20659 (method url-fetch)
20660 (uri (pypi-uri "outcome" version))
20661 (sha256
20662 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
20663 (build-system python-build-system)
20664 (arguments
20665 `(#:phases
20666 (modify-phases %standard-phases
20667 (replace 'check
20668 (lambda* (#:key inputs outputs #:allow-other-keys)
20669 (add-installed-pythonpath inputs outputs)
20670 (invoke "pytest" "-vv"))))))
20671 (native-inputs
20672 `(("python-pytest" ,python-pytest)
20673 ("python-pytest-cov" ,python-pytest-cov)
20674 ("python-pytest-asyncio" ,python-pytest-asyncio)))
20675 (propagated-inputs
20676 `(("python-async-generator" ,python-async-generator)
20677 ("python-attrs" ,python-attrs)))
20678 (home-page "https://github.com/python-trio/outcome")
20679 (synopsis "Capture the outcome of Python function calls")
20680 (description
20681 "Capture the outcome of Python function calls. Extracted from the Trio
20682 project.")
20683 ;; Either license applies.
20684 (license (list license:expat license:asl2.0))))
20685
20686 (define-public python-trio
20687 (package
20688 (name "python-trio")
20689 (version "0.17.0")
20690 (source
20691 (origin
20692 (method url-fetch)
20693 (uri (pypi-uri "trio" version))
20694 (sha256
20695 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
20696 (build-system python-build-system)
20697 (arguments
20698 `(#:phases
20699 (modify-phases %standard-phases
20700 (add-before 'check 'change-home
20701 (lambda _
20702 ;; Tests require a writable home.
20703 (setenv "HOME" "/tmp")
20704 #t))
20705 (replace 'check
20706 (lambda _
20707 (invoke "pytest" "-vv" "-k"
20708 (string-append
20709 ;; This test times out.
20710 "not test_ki_protection_works"
20711 ;; Assertion errors.
20712 " and not test_guest_mode_ki"
20713 " and not test_run_in_trio_thread_ki"
20714 ;; These try to raise KeyboardInterrupt which does not work
20715 ;; in the build environment.
20716 " and not test_ki_self"
20717 " and not test_ki_wakes_us_up"
20718 ;; Failure in name resolution.
20719 " and not test_getnameinfo"
20720 " and not test_SocketType_resolve"
20721 ;; OSError: protocol not found.
20722 " and not test_getprotobyname")))))))
20723 (native-inputs
20724 `(("python-astor" ,python-astor)
20725 ("python-ipython" ,python-ipython)
20726 ("python-jedi" ,python-jedi)
20727 ("python-pylint" ,python-pylint)
20728 ("python-pyopenssl" ,python-pyopenssl)
20729 ("python-pytest" ,python-pytest)
20730 ("python-pytest-cov" ,python-pytest-cov)
20731 ("python-trustme" ,python-trustme)))
20732 (propagated-inputs
20733 `(("python-attrs" ,python-attrs)
20734 ("python-idna" ,python-idna)
20735 ("python-outcome" ,python-outcome)
20736 ("python-sniffio" ,python-sniffio)
20737 ("python-sortedcontainers"
20738 ,python-sortedcontainers)))
20739 (home-page "https://github.com/python-trio/trio")
20740 (synopsis "Friendly Python library for async concurrency and I/O")
20741 (description
20742 "Trio strives to be a production-quality, async/await-native I/O library
20743 for Python. Like all async libraries, its main purpose is to help you write
20744 programs that do multiple things at the same time with parallelized I/O.")
20745 ;; Either license applies.
20746 (license (list license:expat license:asl2.0))))
20747
20748 (define-public python-trio-typing
20749 (package
20750 (name "python-trio-typing")
20751 (version "0.5.0")
20752 (source
20753 (origin
20754 (method url-fetch)
20755 (uri (pypi-uri "trio-typing" version))
20756 (sha256
20757 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
20758 (build-system python-build-system)
20759 (arguments
20760 `(#:phases
20761 (modify-phases %standard-phases
20762 (replace 'check
20763 (lambda _
20764 (invoke "pytest" "-vv"))))))
20765 (native-inputs
20766 `(("python-attrs" ,python-attrs)
20767 ("python-pytest" ,python-pytest)))
20768 (propagated-inputs
20769 `(("python-mypy" ,python-mypy)
20770 ("python-mypy-extensions"
20771 ,python-mypy-extensions)
20772 ("python-trio" ,python-trio)
20773 ("python-typing-extensions"
20774 ,python-typing-extensions)))
20775 (home-page "https://github.com/python-trio/trio-typing")
20776 (synopsis "Static type checking support for Trio and related projects")
20777 (description
20778 "This package provides:
20779
20780 @itemize
20781 @item PEP 561 typing stubs packages for the Trio project packages:
20782
20783 @itemize
20784 @item trio (@code{trio-stubs})
20785 @item outcome (@code{outcome-stubs})
20786 @item async_generator (@code{async_generator-stubs})
20787 @end itemize
20788
20789 @item A package @code{trio_typing} containing types that Trio programs often
20790 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20791 a mypy plugin that smooths over some limitations in the basic type hints.
20792 @end itemize")
20793 ;; Either license applies.
20794 (license (list license:expat license:asl2.0))))
20795
20796 (define-public python-humanize
20797 (package
20798 (name "python-humanize")
20799 (version "0.5.1")
20800 (source
20801 (origin
20802 (method url-fetch)
20803 (uri (pypi-uri "humanize" version))
20804 (sha256
20805 (base32
20806 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20807 (arguments
20808 '(#:tests? #f)) ; tests not in pypi archive
20809 (build-system python-build-system)
20810 (home-page "https://github.com/jmoiron/humanize")
20811 (synopsis "Print numerical information in a human-readable form")
20812 (description "This package provides a Python module that displays numbers
20813 and dates in \"human readable\" forms. For example, it would display
20814 \"12345591313\" as \"12.3 billion\".")
20815 (license license:expat)))
20816
20817 (define-public python-txaio
20818 (package
20819 (name "python-txaio")
20820 (version "18.8.1")
20821 (source
20822 (origin
20823 (method url-fetch)
20824 (uri (pypi-uri "txaio" version))
20825 (sha256
20826 (base32
20827 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20828 (build-system python-build-system)
20829 (propagated-inputs
20830 `(("python-twisted" ,python-twisted)
20831 ("python-six" ,python-six)))
20832 (home-page "https://github.com/crossbario/txaio")
20833 (synopsis "Compatibility layer between Python asyncio and Twisted")
20834 (description "Txaio provides a compatibility layer between the Python
20835 @code{asyncio} module and @code{Twisted}.")
20836 (license license:expat)))
20837
20838 (define-public python-toolshed
20839 (package
20840 (name "python-toolshed")
20841 (version "0.4.6")
20842 (source
20843 (origin
20844 (method url-fetch)
20845 (uri (pypi-uri "toolshed" version))
20846 (sha256
20847 (base32
20848 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20849 (build-system python-build-system)
20850 (native-inputs
20851 `(("python-nose" ,python-nose)))
20852 (home-page "https://github.com/brentp/toolshed/")
20853 (synopsis "Collection of modules and functions for working with data")
20854 (description "This is a collection of well-tested, simple modules and
20855 functions that aim to reduce boilerplate when working with data.")
20856 (license license:bsd-2)))
20857
20858 (define-public python-annoy
20859 (package
20860 (name "python-annoy")
20861 (version "1.15.1")
20862 (source
20863 (origin
20864 (method url-fetch)
20865 (uri (pypi-uri "annoy" version))
20866 (sha256
20867 (base32
20868 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20869 (build-system python-build-system)
20870 (native-inputs
20871 `(("python-nose" ,python-nose)))
20872 (home-page "https://github.com/spotify/annoy/")
20873 (synopsis "Approximate nearest neighbors library")
20874 (description
20875 "Annoy is a C++ library with Python bindings to search for points in
20876 space that are close to a given query point. It also creates large read-only
20877 file-based data structures that are @code{mmap}ped into memory so that many
20878 processes may share the same data.")
20879 (license license:asl2.0)))
20880
20881 (define-public python-croniter
20882 (package
20883 (name "python-croniter")
20884 (version "0.3.34")
20885 (source (origin
20886 (method url-fetch)
20887 (uri (pypi-uri "croniter" version))
20888 (sha256
20889 (base32
20890 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20891 (build-system python-build-system)
20892 (propagated-inputs
20893 `(("python-dateutil" ,python-dateutil)
20894 ("python-natsort" ,python-natsort)))
20895 (home-page "https://github.com/kiorky/croniter")
20896 (synopsis "Iterate datetime objects with cron-like syntax")
20897 (description
20898 "@code{croniter} provides iteration for datetime object with cron-like
20899 format.")
20900 (license license:expat)))
20901
20902 (define-public python-pylzma
20903 (package
20904 (name "python-pylzma")
20905 (version "0.5.0")
20906 (source
20907 (origin
20908 (method url-fetch)
20909 (uri (pypi-uri "pylzma" version))
20910 (sha256
20911 (base32
20912 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
20913 (build-system python-build-system)
20914 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
20915 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
20916 (description "This package provides Python bindings for the LZMA library
20917 by Igor Pavlov.")
20918 (license license:lgpl2.1+)))
20919
20920 (define-public python2-pylzma
20921 (package-with-python2 python-pylzma))
20922
20923 (define-public python2-zeroconf
20924 (package
20925 (name "python2-zeroconf")
20926
20927 ;; This is the last version that supports Python 2.x.
20928 (version "0.19.1")
20929 (source
20930 (origin
20931 (method url-fetch)
20932 (uri (pypi-uri "zeroconf" version))
20933 (sha256
20934 (base32
20935 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
20936 (build-system python-build-system)
20937 (arguments
20938 `(#:python ,python-2
20939 #:phases
20940 (modify-phases %standard-phases
20941 (add-after 'unpack 'patch-requires
20942 (lambda* (#:key inputs #:allow-other-keys)
20943 (substitute* "setup.py"
20944 (("enum-compat")
20945 "enum34"))
20946 #t)))))
20947 (native-inputs
20948 `(("python2-six" ,python2-six)
20949 ("python2-enum32" ,python2-enum34)
20950 ("python2-netifaces" ,python2-netifaces)
20951 ("python2-typing" ,python2-typing)))
20952 (home-page "https://github.com/jstasiak/python-zeroconf")
20953 (synopsis "Pure Python mDNS service discovery")
20954 (description
20955 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
20956 compatible).")
20957 (license license:lgpl2.1+)))
20958
20959 (define-public python-bsddb3
20960 (package
20961 (name "python-bsddb3")
20962 (version "6.2.6")
20963 (source
20964 (origin
20965 (method url-fetch)
20966 (uri (pypi-uri "bsddb3" version))
20967 (sha256
20968 (base32
20969 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
20970 (build-system python-build-system)
20971 (inputs
20972 `(("bdb" ,bdb)))
20973 (arguments
20974 '(#:phases
20975 (modify-phases %standard-phases
20976 (add-after 'unpack 'configure-locations
20977 (lambda* (#:key inputs #:allow-other-keys)
20978 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
20979 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
20980 #t))
20981 (replace 'check
20982 (lambda _
20983 (invoke "python3" "test3.py" "-v"))))))
20984 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
20985 (synopsis "Python bindings for Oracle Berkeley DB")
20986 (description
20987 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
20988 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
20989 Transaction objects, and each of these is exposed as a Python type in the
20990 bsddb3.db module. The database objects can use various access methods: btree,
20991 hash, recno, and queue. Complete support of Berkeley DB distributed
20992 transactions. Complete support for Berkeley DB Replication Manager.
20993 Complete support for Berkeley DB Base Replication. Support for RPC.")
20994 (license license:bsd-3)))
20995
20996 (define-public python-dbfread
20997 (package
20998 (name "python-dbfread")
20999 (version "2.0.7")
21000 (source (origin
21001 (method url-fetch)
21002 (uri (pypi-uri "dbfread" version))
21003 (sha256
21004 (base32
21005 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
21006 (build-system python-build-system)
21007 (native-inputs
21008 `(("python-pytest" ,python-pytest)))
21009 (home-page "https://dbfread.readthedocs.io")
21010 (synopsis "Read DBF Files with Python")
21011 (description
21012 "This library reads DBF files and returns the data as native Python data
21013 types for further processing. It is primarily intended for batch jobs and
21014 one-off scripts.")
21015 (license license:expat)))
21016
21017 (define-public python-cached-property
21018 (package
21019 (name "python-cached-property")
21020 (version "1.5.1")
21021 (source
21022 (origin
21023 (method url-fetch)
21024 (uri (pypi-uri "cached-property" version))
21025 (sha256
21026 (base32
21027 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
21028 (build-system python-build-system)
21029 (arguments
21030 `(#:phases
21031 (modify-phases %standard-phases
21032 ;; https://github.com/pydanny/cached-property/issues/131
21033 ;; recent versions of freezegun break one test
21034 (add-after 'unpack 'disable-broken-test
21035 (lambda _
21036 (substitute* "tests/test_cached_property.py"
21037 (("def test_threads_ttl_expiry\\(self\\)" m)
21038 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
21039 " " m)))
21040 #t)))))
21041 (native-inputs
21042 `(("python-freezegun" ,python-freezegun)))
21043 (home-page
21044 "https://github.com/pydanny/cached-property")
21045 (synopsis
21046 "Decorator for caching properties in classes")
21047 (description
21048 "This package provides a decorator which makes caching
21049 time-or-computationally-expensive properties quick and easy and works in Python
21050 2 or 3.")
21051 (license license:bsd-3)))
21052
21053 (define-public python-folium
21054 (package
21055 (name "python-folium")
21056 (version "0.12.1")
21057 (source
21058 (origin
21059 ;; PyPI has a ".whl" file but not a proper source release.
21060 ;; Thus, fetch code from Git.
21061 (method git-fetch)
21062 (uri (git-reference
21063 (url "https://github.com/python-visualization/folium")
21064 (commit (string-append "v" version))))
21065 (file-name (git-file-name name version))
21066 (sha256
21067 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
21068 (build-system python-build-system)
21069 (propagated-inputs
21070 `(("python-branca" ,python-branca)
21071 ("python-jinja2" ,python-jinja2)
21072 ("python-numpy" ,python-numpy)
21073 ("python-requests" ,python-requests)))
21074 (native-inputs
21075 `(("python-pytest" ,python-pytest)))
21076 (home-page "https://github.com/python-visualization/folium")
21077 (synopsis "Make beautiful maps with Leaflet.js & Python")
21078 (description "@code{folium} makes it easy to visualize data that’s been
21079 manipulated in Python on an interactive leaflet map. It enables both the
21080 binding of data to a map for @code{choropleth} visualizations as well as
21081 passing rich vector/raster/HTML visualizations as markers on the map.
21082
21083 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
21084 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
21085 supports Image, Video, GeoJSON and TopoJSON overlays.")
21086 (license license:expat)))
21087
21088 (define-public jube
21089 (package
21090 ;; This is a command-line tool, so no "python-" prefix.
21091 (name "jube")
21092 (version "2.2.2")
21093 (source (origin
21094 (method url-fetch)
21095 (uri (string-append
21096 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
21097 version))
21098 (sha256
21099 (base32
21100 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
21101 (file-name (string-append "jube-" version ".tar.gz"))))
21102 (build-system python-build-system)
21103 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
21104 (synopsis "Benchmarking environment")
21105 (description
21106 "JUBE helps perform and analyze benchmarks in a systematic way. For each
21107 benchmarked application, benchmark data is stored in a format that allows JUBE
21108 to deduct the desired information. This data can be parsed by automatic pre-
21109 and post-processing scripts that draw information and store it more densely
21110 for manual interpretation.")
21111 (license license:gpl3+)))
21112
21113 (define-public python-pyroutelib3
21114 (package
21115 (name "python-pyroutelib3")
21116 (version "1.3.post1")
21117 (source
21118 (origin
21119 (method url-fetch)
21120 (uri (pypi-uri "pyroutelib3" version))
21121 (sha256
21122 (base32
21123 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
21124 (build-system python-build-system)
21125 (propagated-inputs
21126 `(("python-dateutil" ,python-dateutil)))
21127 (home-page "https://github.com/MKuranowski/pyroutelib3")
21128 (synopsis "Library for simple routing on OSM data")
21129 (description "Library for simple routing on OSM data")
21130 (license license:gpl3+)))
21131
21132 (define-public python-bibtexparser
21133 (package
21134 (name "python-bibtexparser")
21135 (version "1.1.0")
21136 (source
21137 (origin
21138 (method url-fetch)
21139 (uri (pypi-uri "bibtexparser" version))
21140 (sha256
21141 (base32
21142 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
21143 (build-system python-build-system)
21144 (propagated-inputs
21145 `(("python-pyparsing" ,python-pyparsing)))
21146 (native-inputs
21147 `(("python-future" ,python-future)))
21148 (home-page "https://github.com/sciunto-org/python-bibtexparser")
21149 (synopsis "Python library to parse BibTeX files")
21150 (description "BibtexParser is a Python library to parse BibTeX files.")
21151 (license (list license:bsd-3 license:lgpl3))))
21152
21153 (define-public python-distro
21154 (package
21155 (name "python-distro")
21156 (version "1.4.0")
21157 (source
21158 (origin
21159 (method url-fetch)
21160 (uri (pypi-uri "distro" version))
21161 (sha256
21162 (base32
21163 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
21164 (build-system python-build-system)
21165 (native-inputs
21166 `(("python-pytest" ,python-pytest)))
21167 (home-page "https://github.com/nir0s/distro")
21168 (synopsis
21169 "OS platform information API")
21170 (description
21171 "@code{distro} provides information about the OS distribution it runs on,
21172 such as a reliable machine-readable ID, or version information.
21173
21174 It is the recommended replacement for Python's original
21175 `platform.linux_distribution` function (which will be removed in Python 3.8).
21176 @code{distro} also provides a command-line interface to output the platform
21177 information in various formats.")
21178 (license license:asl2.0)))
21179
21180 (define-public python-cairosvg
21181 (package
21182 (name "python-cairosvg")
21183 (version "2.5.0")
21184 (source
21185 (origin
21186 (method url-fetch)
21187 (uri (pypi-uri "CairoSVG" version))
21188 (sha256
21189 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
21190 (build-system python-build-system)
21191 (arguments
21192 `(#:phases
21193 (modify-phases %standard-phases
21194 (replace 'check
21195 (lambda _ (invoke "pytest"))))))
21196 (propagated-inputs
21197 `(("python-cairocffi" ,python-cairocffi)
21198 ("python-cssselect2" ,python-cssselect2)
21199 ("python-defusedxml" ,python-defusedxml)
21200 ("python-pillow" ,python-pillow)
21201 ("python-tinycss2" ,python-tinycss2)))
21202 (native-inputs
21203 `(("python-pytest-flake8" ,python-pytest-flake8)
21204 ("python-pytest-isort" ,python-pytest-isort)
21205 ("python-pytest-runner" ,python-pytest-runner)))
21206 (home-page "https://cairosvg.org/")
21207 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
21208 (description "CairoSVG is a SVG converter based on Cairo. It can export
21209 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
21210 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
21211 parsed, the result is drawn to a Cairo surface that can be exported to
21212 qvarious formats: PDF, PostScript, PNG and even SVG.")
21213 (license license:lgpl3+)))
21214
21215 (define-public python-pyphen
21216 (package
21217 (name "python-pyphen")
21218 (version "0.10.0")
21219 (source
21220 (origin
21221 (method url-fetch)
21222 (uri (pypi-uri "Pyphen" version))
21223 (sha256
21224 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
21225 (build-system python-build-system)
21226 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
21227 ;; embedded set provided by upstream - like Debian does.
21228 (home-page "https://github.com/Kozea/Pyphen")
21229 (synopsis "Pure Python module to hyphenate text")
21230 (description "Pyphen is a pure Python module to hyphenate text using
21231 existing Hunspell hyphenation dictionaries.")
21232 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
21233
21234 (define-public python-intelhex
21235 (package
21236 (name "python-intelhex")
21237 (version "2.2.1")
21238 (source
21239 (origin
21240 (method url-fetch)
21241 (uri (pypi-uri "intelhex" version))
21242 (sha256
21243 (base32
21244 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
21245 (build-system python-build-system)
21246 (arguments '(#:tests? #f)) ;issue with version
21247 (home-page "https://pypi.org/project/IntelHex/")
21248 (synopsis "Python library for Intel HEX files manipulations")
21249 (description "The Intel HEX file format is widely used in microprocessors
21250 and microcontrollers area (embedded systems etc.) as the de facto standard for
21251 representation of code to be programmed into microelectronic devices. This
21252 package provides an intelhex Python library to read, write, create from
21253 scratch and manipulate data from Intel HEX file format. It also includes
21254 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
21255 converters and more, those based on the library itself.")
21256 (license license:bsd-3)))
21257
21258 (define-public python-pykwalify
21259 (package
21260 (name "python-pykwalify")
21261 (version "1.7.0")
21262 (source
21263 (origin
21264 (method url-fetch)
21265 (uri (pypi-uri "pykwalify" version))
21266 (sha256
21267 (base32
21268 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
21269 (build-system python-build-system)
21270 (arguments '(#:tests? #f)) ;missing dependencies
21271 (propagated-inputs
21272 `(("python-dateutil" ,python-dateutil)
21273 ("python-docopt" ,python-docopt)
21274 ("python-pyyaml" ,python-pyyaml)))
21275 (home-page "https://github.com/grokzen/pykwalify")
21276 (synopsis
21277 "Python lib/cli for JSON/YAML schema validation")
21278 (description
21279 "This package provides a parser, schema validator, and data binding tool
21280 for YAML and JSON.")
21281 (license license:expat)))
21282
21283 (define-public python-dbusmock
21284 (package
21285 (name "python-dbusmock")
21286 (version "0.18.3")
21287 (source
21288 (origin
21289 (method url-fetch)
21290 (uri (pypi-uri "python-dbusmock" version))
21291 (sha256
21292 (base32
21293 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
21294 (build-system python-build-system)
21295 (arguments
21296 '(#:phases
21297 (modify-phases %standard-phases
21298 (add-after 'unpack 'patch-shell-path
21299 (lambda _
21300 (substitute* "tests/test_code.py"
21301 (("/bin/bash") (which "bash")))
21302 #t)))))
21303 (native-inputs
21304 `(;; For tests.
21305 ("dbus" ,dbus) ; for dbus-daemon
21306 ("python-nose" ,python-nose)
21307 ("which" ,which)))
21308 (propagated-inputs
21309 `(("python-dbus" ,python-dbus)
21310 ("python-pygobject" ,python-pygobject)))
21311 (home-page "https://github.com/martinpitt/python-dbusmock")
21312 (synopsis "Python library for mock D-Bus objects")
21313 (description "python-dbusmock allows for the easy creation of mock objects on
21314 D-Bus. This is useful for writing tests for software which talks to D-Bus
21315 services such as upower, systemd, logind, gnome-session or others, and it is
21316 hard (or impossible without root privileges) to set the state of the real
21317 services to what you expect in your tests.")
21318 (license license:lgpl3+)))
21319
21320 (define-public python-jsonplus
21321 (package
21322 (name "python-jsonplus")
21323 (version "0.8.0")
21324 (home-page "https://github.com/randomir/jsonplus")
21325 (source (origin
21326 (method url-fetch)
21327 (uri (pypi-uri "jsonplus" version))
21328 (sha256
21329 (base32
21330 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
21331 (build-system python-build-system)
21332 ;; XXX: No tests on PyPI, and the repository has no tags.
21333 (arguments '(#:tests? #f))
21334 (propagated-inputs
21335 `(("python-dateutil" ,python-dateutil)
21336 ("python-simplejson" ,python-simplejson)
21337 ("python-sortedcontainers" ,python-sortedcontainers)))
21338 (synopsis "Serialize Python types to/from JSON")
21339 (description
21340 "This package provides functionality to serialize arbitrary data types
21341 to and from JSON. Common data types are implemented and it is easy to
21342 register custom encoders and decoders.")
21343 (license license:expat)))
21344
21345 (define-public python-ujson
21346 (package
21347 (name "python-ujson")
21348 (version "4.0.2")
21349 (source
21350 (origin
21351 (method url-fetch)
21352 (uri (pypi-uri "ujson" version))
21353 (sha256
21354 (base32
21355 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
21356 (modules '((guix build utils)))
21357 (snippet
21358 '(begin (delete-file-recursively "deps") #t))))
21359 (build-system python-build-system)
21360 (arguments
21361 `(#:phases
21362 (modify-phases %standard-phases
21363 (add-after 'unpack 'link-to-system-double-conversion
21364 (lambda* (#:key inputs #:allow-other-keys)
21365 (let ((d-c (assoc-ref inputs "double-conversion")))
21366 (substitute* "setup.py"
21367 (("./deps/double-conversion/double-conversion\"")
21368 (string-append d-c "/include/double-conversion\""))
21369 (("-lstdc++" stdc)
21370 (string-append "-L" d-c "/lib\","
21371 " \"-ldouble-conversion\","
21372 " \"" stdc)))
21373 #t)))
21374 (replace 'check
21375 (lambda* (#:key inputs outputs #:allow-other-keys)
21376 (add-installed-pythonpath inputs outputs)
21377 (invoke "pytest"))))))
21378 (native-inputs
21379 `(("double-conversion" ,double-conversion)
21380 ("python-setuptools-scm" ,python-setuptools-scm)
21381 ("python-pytest" ,python-pytest)))
21382 (home-page "https://github.com/ultrajson/ultrajson")
21383 (synopsis "Ultra fast JSON encoder and decoder for Python")
21384 (description
21385 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
21386 bindings for Python 3.")
21387 (license license:bsd-3)))
21388
21389 (define-public python-iocapture
21390 ;; The latest release is more than a year older than this commit.
21391 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
21392 (revision "1"))
21393 (package
21394 (name "python-iocapture")
21395 (version "0.1.2")
21396 (source
21397 (origin
21398 (method git-fetch)
21399 (uri (git-reference
21400 (url "https://github.com/oinume/iocapture")
21401 (commit commit)))
21402 (file-name (git-file-name name version))
21403 (sha256
21404 (base32
21405 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
21406 (build-system python-build-system)
21407 (arguments
21408 `(#:phases
21409 (modify-phases %standard-phases
21410 (delete 'check)
21411 (add-after 'install 'check
21412 (lambda* (#:key inputs outputs #:allow-other-keys)
21413 (add-installed-pythonpath inputs outputs)
21414 (invoke "py.test" "-v" "tests")
21415 #t)))))
21416 (propagated-inputs
21417 `(("python-flexmock" ,python-flexmock)
21418 ("python-pytest" ,python-pytest)
21419 ("python-pytest-cov" ,python-pytest-cov)
21420 ("python-six" ,python-six)))
21421 (home-page "https://github.com/oinume/iocapture")
21422 (synopsis "Python capturing tool for stdout and stderr")
21423 (description
21424 "This package helps you to capture the standard out (stdout) and the
21425 standard error channel (stderr) in your program.")
21426 (license license:expat))))
21427
21428 (define-public python-argh
21429 ;; There are 21 commits since the latest release containing important
21430 ;; improvements.
21431 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
21432 (revision "1"))
21433 (package
21434 (name "python-argh")
21435 (version (git-version "0.26.2" revision commit))
21436 (source
21437 (origin
21438 (method git-fetch)
21439 (uri (git-reference
21440 (url "https://github.com/neithere/argh")
21441 (commit commit)))
21442 (file-name (git-file-name name version))
21443 (sha256
21444 (base32
21445 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
21446 (build-system python-build-system)
21447 (propagated-inputs
21448 `(("python-iocapture" ,python-iocapture)
21449 ("python-mock" ,python-mock)
21450 ("python-pytest" ,python-pytest)
21451 ("python-pytest-cov" ,python-pytest-cov)
21452 ("python-pytest-xdist" ,python-pytest-xdist)
21453 ("python-tox" ,python-tox)))
21454 (home-page "https://github.com/neithere/argh/")
21455 (synopsis "Argparse wrapper with natural syntax")
21456 (description
21457 "python-argh is a small library that provides several layers of
21458 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
21459 always possible to declare a command with the highest possible (and least
21460 flexible) layer and then tune the behaviour with any of the lower layers
21461 including the native API of @code{python-argparse}.")
21462 (license license:lgpl3+))))
21463
21464 (define-public python-ppft
21465 (package
21466 (name "python-ppft")
21467 (version "1.6.6.1")
21468 (source
21469 (origin
21470 (method url-fetch)
21471 (uri (pypi-uri "ppft" version))
21472 (sha256
21473 (base32
21474 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
21475 (build-system python-build-system)
21476 (arguments '(#:tests? #f)) ; there are none
21477 (propagated-inputs
21478 `(("python-six" ,python-six)))
21479 (home-page "https://pypi.org/project/ppft/")
21480 (synopsis "Fork of Parallel Python")
21481 (description
21482 "This package is a fork of Parallel Python. The Parallel Python
21483 module (@code{pp}) provides an easy and efficient way to create
21484 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
21485 computers and clusters. It features cross-platform portability and dynamic
21486 load balancing.")
21487 (license license:bsd-3)))
21488
21489 (define-public python-pox
21490 (package
21491 (name "python-pox")
21492 (version "0.2.7")
21493 (source
21494 (origin
21495 (method url-fetch)
21496 (uri (pypi-uri "pox" version))
21497 (sha256
21498 (base32
21499 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
21500 (build-system python-build-system)
21501 (arguments
21502 `(#:phases
21503 (modify-phases %standard-phases
21504 (replace 'check
21505 (lambda _
21506 (mkdir-p "/tmp/guix")
21507 (setenv "SHELL" "bash")
21508 (setenv "USERNAME" "guix")
21509 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
21510 (invoke "py.test" "-vv")
21511 #t)))))
21512 (native-inputs
21513 `(("python-pytest" ,python-pytest)
21514 ("which" ,which)))
21515 (home-page "https://pypi.org/project/pox/")
21516 (synopsis "Python utilities for file system exploration and automated builds")
21517 (description
21518 "Pox provides a collection of utilities for navigating and manipulating
21519 file systems. This module is designed to facilitate some of the low-level
21520 operating system interactions that are useful when exploring a file system on a
21521 remote host. Pox provides Python equivalents of several shell commands such
21522 as @command{which} and @command{find}. These commands allow automated
21523 discovery of what has been installed on an operating system, and where the
21524 essential tools are located.")
21525 (license license:bsd-3)))
21526
21527 (define-public python-pathos
21528 (package
21529 (name "python-pathos")
21530 (version "0.2.5")
21531 (source
21532 (origin
21533 (method url-fetch)
21534 (uri (pypi-uri "pathos" version))
21535 (sha256
21536 (base32
21537 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
21538 (build-system python-build-system)
21539 (arguments
21540 '(#:phases
21541 (modify-phases %standard-phases
21542 (replace 'check
21543 (lambda _
21544 (setenv "PYTHONPATH"
21545 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
21546 (invoke "python" "./tests/__main__.py"))))))
21547 (propagated-inputs
21548 `(("python-dill" ,python-dill)
21549 ("python-multiprocess" ,python-multiprocess)
21550 ("python-pox" ,python-pox)
21551 ("python-ppft" ,python-ppft)))
21552 (native-inputs
21553 `(("python-pytest" ,python-pytest)))
21554 (home-page "https://pypi.org/project/pathos/")
21555 (synopsis
21556 "Parallel graph management and execution in heterogeneous computing")
21557 (description
21558 "Python-pathos is a framework for heterogeneous computing. It provides a
21559 consistent high-level interface for configuring and launching parallel
21560 computations across heterogeneous resources. Python-pathos provides configurable
21561 launchers for parallel and distributed computing, where each launcher contains
21562 the syntactic logic to configure and launch jobs in an execution environment.")
21563 (license license:bsd-3)))
21564
21565 (define-public python-flit
21566 (package
21567 (name "python-flit")
21568 (version "3.0.0")
21569 (source
21570 (origin
21571 (method url-fetch)
21572 (uri (pypi-uri "flit" version))
21573 (sha256
21574 (base32
21575 "14q8qa48bli2mniznc8b54qkwvhbik4kw99y01fi5gzzl620zzml"))))
21576 (build-system python-build-system)
21577 (arguments
21578 `(#:tests? #f)) ; XXX: Check requires network access.
21579 (home-page "https://flit.readthedocs.io/")
21580 (synopsis
21581 "Simple packaging tool for simple packages")
21582 (description
21583 "Flit is a simple way to put Python packages and modules on PyPI. Flit
21584 packages a single importable module or package at a time, using the import
21585 name as the name on PyPI. All subpackages and data files within a package
21586 are included automatically.")
21587 (license license:bsd-3)))
21588
21589 (define-public python-pathtools
21590 (package
21591 (name "python-pathtools")
21592 (version "0.1.2")
21593 (source
21594 (origin
21595 (method url-fetch)
21596 (uri (pypi-uri "pathtools" version))
21597 (sha256
21598 (base32
21599 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
21600 (build-system python-build-system)
21601 (home-page
21602 "https://github.com/gorakhargosh/pathtools")
21603 (synopsis "Path utilities for Python")
21604 (description "Pattern matching and various utilities for file systems
21605 paths.")
21606 (license license:expat)))
21607
21608 (define-public python-fastentrypoints
21609 (package
21610 (name "python-fastentrypoints")
21611 (version "0.12")
21612 (source
21613 (origin
21614 (method url-fetch)
21615 (uri (pypi-uri "fastentrypoints" version))
21616 (sha256
21617 (base32
21618 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
21619 (build-system python-build-system)
21620 (home-page
21621 "https://github.com/ninjaaron/fast-entry_points")
21622 (synopsis
21623 "Makes entry_points specified in setup.py load more quickly")
21624 (description
21625 "Using entry_points in your setup.py makes scripts that start really
21626 slowly because it imports pkg_resources. This package allows such setup
21627 scripts to load entry points more quickly.")
21628 (license license:bsd-3)))
21629
21630 (define-public python-funcparserlib
21631 (package
21632 (name "python-funcparserlib")
21633 (version "0.3.6")
21634 (source
21635 (origin
21636 (method url-fetch)
21637 (uri (pypi-uri "funcparserlib" version))
21638 (sha256
21639 (base32
21640 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
21641 (native-inputs
21642 `(("python-tox" ,python-tox)))
21643 (arguments
21644 `(#:phases
21645 (modify-phases %standard-phases
21646 (replace 'check
21647 (lambda _
21648 (invoke "tox"))))))
21649 (build-system python-build-system)
21650 (home-page
21651 "https://github.com/vlasovskikh/funcparserlib")
21652 (synopsis
21653 "Recursive descent parsing library based on functional combinators")
21654 (description
21655 "This package is a recursive descent parsing library for Python based on
21656 functional combinators. Parser combinators are just higher-order functions
21657 that take parsers as their arguments and return them as result values.")
21658 (license license:expat)))
21659
21660 (define-public python-speg
21661 (package
21662 (name "python-speg")
21663 (version "0.3")
21664 (source
21665 (origin
21666 (method url-fetch)
21667 (uri (pypi-uri "speg" version ".zip"))
21668 (sha256
21669 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
21670 (arguments
21671 `(#:tests? #f)) ;FIXME: tests fail, not sure why
21672 (native-inputs
21673 `(("unzip" ,unzip)))
21674 (build-system python-build-system)
21675 (home-page "https://github.com/avakar/speg")
21676 (synopsis "PEG-based parser interpreter with memoization")
21677 (description "This package is a PEG-based parser and interpreter with
21678 memoization.")
21679 (license license:expat)))
21680
21681 (define-public python-cson
21682 (package
21683 (name "python-cson")
21684 (version "0.8")
21685 (source
21686 (origin
21687 (method url-fetch)
21688 (uri (pypi-uri "cson" version))
21689 (sha256
21690 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
21691 (build-system python-build-system)
21692 (propagated-inputs
21693 `(("python-speg" ,python-speg)))
21694 (home-page "https://github.com/avakar/pycson")
21695 (synopsis "Parser for Coffeescript Object Notation (CSON)")
21696 (description "This package is a parser for Coffeescript Object
21697 Notation (CSON).")
21698 (license license:expat)))
21699
21700 (define-public python-asynctest
21701 (package
21702 (name "python-asynctest")
21703 (version "0.13.0")
21704 (source
21705 (origin
21706 (method url-fetch)
21707 (uri (pypi-uri "asynctest" version))
21708 (sha256
21709 (base32
21710 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
21711 (build-system python-build-system)
21712 (arguments
21713 '(#:phases
21714 (modify-phases %standard-phases
21715 (replace 'check
21716 (lambda _
21717 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
21718 (add-after 'unpack 'disable-tests
21719 (lambda* _
21720 ;; XXX: 7 tests fail out of 220. Disable them for now.
21721 (substitute* (list "test/test_selector.py"
21722 "test/test_mock.py")
21723 (("def test_events_watched_outside_test_are_ignored")
21724 "@unittest.skip('disabled by guix')
21725 def test_events_watched_outside_test_are_ignored")
21726 (("def test_awaited_from_autospec_mock.*" line)
21727 (string-append line " return True\n"))
21728 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
21729 (string-append line " return True\n"))
21730 (("def test_patch_coroutine_with_multiple_scopes.*" line)
21731 (string-append line " return True\n"))
21732 (("def test_multiple_patches_on_coroutine.*" line)
21733 (string-append line " return True\n"))
21734 (("def test_patch_coroutine_only_when_running.*" line)
21735 (string-append line " return True\n")))
21736 #t)))))
21737 (home-page "https://github.com/Martiusweb/asynctest")
21738 (synopsis "Extension of unittest for testing asyncio libraries")
21739 (description
21740 "The package asynctest is built on top of the standard unittest module
21741 and cuts down boilerplate code when testing libraries for asyncio.")
21742 (license license:asl2.0)))
21743
21744 (define-public python-aionotify
21745 (package
21746 (name "python-aionotify")
21747 (version "0.2.0")
21748 (source
21749 (origin
21750 ;; Source tarball on PyPi lacks tests
21751 (method git-fetch)
21752 (uri (git-reference
21753 (url "https://github.com/rbarrois/aionotify")
21754 (commit (string-append "v" version))))
21755 (file-name (git-file-name name version))
21756 (sha256
21757 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
21758 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
21759 (build-system python-build-system)
21760 (home-page "https://github.com/rbarrois/aionotify")
21761 (synopsis "Asyncio-powered inotify library")
21762 (description
21763 "@code{aionotify} is a simple, asyncio-based inotify library.")
21764 (license license:bsd-3)))
21765
21766 (define-public python-forbiddenfruit
21767 (package
21768 (name "python-forbiddenfruit")
21769 (version "0.1.3")
21770 (source
21771 (origin
21772 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21773 (method git-fetch)
21774 (uri (git-reference
21775 (url "https://github.com/clarete/forbiddenfruit")
21776 (commit version)))
21777 (file-name (git-file-name name version))
21778 (sha256
21779 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21780 (build-system python-build-system)
21781 (arguments
21782 '(#:phases
21783 (modify-phases %standard-phases
21784 (replace 'check
21785 (lambda _
21786 (invoke "make" "SKIP_DEPS=1"))))))
21787 (native-inputs
21788 `(("python-nose" ,python-nose)
21789 ("python-coverage" ,python-coverage)))
21790 (home-page "https://github.com/clarete/forbiddenfruit")
21791 (synopsis "Patch python built-in objects")
21792 (description "This project allows Python code to extend built-in types.")
21793 (license (list license:gpl3+ license:expat))))
21794
21795 (define-public python-k5test
21796 (package
21797 (name "python-k5test")
21798 (version "0.9.2")
21799 (source
21800 (origin
21801 (method url-fetch)
21802 (uri (pypi-uri "k5test" version))
21803 (sha256
21804 (base32
21805 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21806 (build-system python-build-system)
21807 (propagated-inputs
21808 `(("python-six" ,python-six)
21809 ;; `which`, `kadmin.local` binaries called inside library
21810 ("which" ,which)
21811 ("mit-krb5" ,mit-krb5)))
21812 (native-inputs `(("mit-krb5" ,mit-krb5)))
21813 (arguments
21814 '(#:phases
21815 (modify-phases %standard-phases
21816 (add-after 'unpack 'patch-paths
21817 (lambda* _
21818 (substitute* "k5test/realm.py"
21819 (("'kadmin_local'") "'kadmin.local'")))))))
21820 (home-page "https://github.com/pythongssapi/k5test")
21821 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21822 (description
21823 "@code{k5test} is a library for setting up self-contained Kerberos 5
21824 environments, and running Python unit tests inside those environments. It is
21825 based on the file of the same name found alongside the MIT Kerberos 5 unit
21826 tests.")
21827 (license license:isc)))
21828
21829 (define-public python-gssapi
21830 (package
21831 (name "python-gssapi")
21832 (version "1.6.12")
21833 (source
21834 (origin
21835 (method url-fetch)
21836 (uri (pypi-uri "gssapi" version))
21837 (sha256
21838 (base32
21839 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
21840 (build-system python-build-system)
21841 (propagated-inputs
21842 `(("python-decorator" ,python-decorator)
21843 ("python-six" ,python-six)))
21844 (inputs
21845 `(("mit-krb5" ,mit-krb5)))
21846 ;; for tests
21847 (native-inputs
21848 `(("python-parameterized" ,python-parameterized)
21849 ("python-k5test" ,python-k5test)
21850 ("python-nose" ,python-nose)))
21851 (home-page "https://github.com/pythongssapi/python-gssapi")
21852 (synopsis "Python GSSAPI Wrapper")
21853 (description
21854 "Python-GSSAPI provides both low-level and high level wrappers around the
21855 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
21856 also be usable with other GSSAPI mechanisms.")
21857 (license license:isc)))
21858
21859 (define-public python-check-manifest
21860 (package
21861 (name "python-check-manifest")
21862 (version "0.37")
21863 (source
21864 (origin
21865 (method url-fetch)
21866 (uri (pypi-uri "check-manifest" version))
21867 (sha256
21868 (base32
21869 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
21870 (build-system python-build-system)
21871 (native-inputs
21872 `(("python-mock" ,python-mock)
21873 ("git" ,git)))
21874 (home-page "https://github.com/mgedmin/check-manifest")
21875 (synopsis "Check MANIFEST.in in a Python source package for completeness")
21876 (description "Python package can include a MANIFEST.in file to help with
21877 sending package files to the Python Package Index. This package checks that
21878 file to ensure it completely and accurately describes your project.")
21879 (license license:expat)))
21880
21881 (define-public python-android-stringslib
21882 (package
21883 (name "python-android-stringslib")
21884 (version "0.1.2")
21885 (source
21886 (origin
21887 (method git-fetch)
21888 (uri (git-reference
21889 (url "https://framagit.org/tyreunom/python-android-strings-lib")
21890 (commit (string-append "v" version))))
21891 (file-name (git-file-name name version))
21892 (sha256
21893 (base32
21894 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
21895 (build-system python-build-system)
21896 (arguments
21897 `(#:tests? #f))
21898 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
21899 (synopsis "Android strings.xml support")
21900 (description "Android Strings Lib provides support for android's strings.xml
21901 files. These files are used to translate strings in android apps.")
21902 (license license:expat)))
21903
21904 (define-public python-watchdog
21905 (package
21906 (name "python-watchdog")
21907 (version "0.9.0")
21908 (source
21909 (origin
21910 (method url-fetch)
21911 (uri (pypi-uri "watchdog" version))
21912 (sha256
21913 (base32
21914 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
21915 (build-system python-build-system)
21916 (arguments
21917 `(#:phases
21918 (modify-phases %standard-phases
21919 (add-before 'check 'remove-failing
21920 (lambda _
21921 (delete-file "tests/test_inotify_buffer.py")
21922 (delete-file "tests/test_snapshot_diff.py")
21923 #t)))))
21924 (propagated-inputs
21925 `(("python-argh" ,python-argh)
21926 ("python-pathtools" ,python-pathtools)
21927 ("python-pyyaml" ,python-pyyaml)))
21928 (native-inputs
21929 `(("python-pytest-cov" ,python-pytest-cov)
21930 ("python-pytest-timeout" ,python-pytest-timeout)))
21931 (home-page "https://github.com/gorakhargosh/watchdog")
21932 (synopsis "File system events monitoring")
21933 (description "This package provides a way to monitor file system events
21934 such as a file modification and trigger an action. This is similar to inotify,
21935 but portable.")
21936 (license license:asl2.0)))
21937
21938 (define-public python-watchgod
21939 (package
21940 (name "python-watchgod")
21941 (version "0.6")
21942 (source
21943 (origin
21944 ;; There are no tests in the PyPI tarball.
21945 (method git-fetch)
21946 (uri (git-reference
21947 (url "https://github.com/samuelcolvin/watchgod")
21948 (commit (string-append "v" version))))
21949 (file-name (git-file-name name version))
21950 (sha256
21951 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
21952 (build-system python-build-system)
21953 (arguments
21954 `(#:phases
21955 (modify-phases %standard-phases
21956 (replace 'check
21957 (lambda _
21958 (invoke "pytest" "-vv"))))))
21959 (native-inputs
21960 `(("python-coverage" ,python-coverage)
21961 ("python-docutils" ,python-docutils)
21962 ("python-flake8" ,python-flake8)
21963 ("python-isort" ,python-isort)
21964 ("python-pycodestyle" ,python-pycodestyle)
21965 ("python-pyflakes" ,python-pyflakes)
21966 ("python-pygments" ,python-pygments)
21967 ("python-pytest" ,python-pytest)
21968 ("python-pytest-cov" ,python-pytest-cov)
21969 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
21970 ("python-pytest-mock" ,python-pytest-mock)
21971 ("python-pytest-sugar" ,python-pytest-sugar)
21972 ("python-pytest-toolbox" ,python-pytest-toolbox)))
21973 (home-page "https://github.com/samuelcolvin/watchgod")
21974 (synopsis "Simple, modern file watching and code reload in Python")
21975 (description
21976 "Simple, modern file watching and code reload in Python inspired by
21977 @code{watchdog}. Among the differences are a unified approach for each
21978 operating systems and an elegant approach to concurrency using threading.")
21979 (license license:expat)))
21980
21981 (define-public python-wget
21982 (package
21983 (name "python-wget")
21984 (version "3.2")
21985 (source
21986 (origin
21987 (method url-fetch)
21988 (uri (pypi-uri "wget" version ".zip"))
21989 (sha256
21990 (base32
21991 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
21992 (build-system python-build-system)
21993 (native-inputs `(("unzip" ,unzip)))
21994 (home-page "https://bitbucket.org/techtonik/python-wget/")
21995 (synopsis "Pure Python download utility")
21996 (description "The python-wget library provides an API to download files
21997 with features similar to the @command{wget} utility.")
21998 (license license:unlicense)))
21999
22000 (define-public offlate
22001 (package
22002 (name "offlate")
22003 (version "0.5")
22004 (source
22005 (origin
22006 (method git-fetch)
22007 (uri (git-reference
22008 (url "https://framagit.org/tyreunom/offlate")
22009 (commit version)))
22010 (file-name (git-file-name name version))
22011 (sha256
22012 (base32
22013 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
22014 (build-system python-build-system)
22015 (arguments
22016 ;; No tests
22017 `(#:tests? #f))
22018 (propagated-inputs
22019 `(("python-android-stringslib" ,python-android-stringslib)
22020 ("python-dateutil" ,python-dateutil)
22021 ("python-gitlab" ,python-gitlab)
22022 ("python-lxml" ,python-lxml)
22023 ("python-polib" ,python-polib)
22024 ("python-pyenchant" ,python-pyenchant)
22025 ("python-pygit2" ,python-pygit2)
22026 ("python-pygithub" ,python-pygithub)
22027 ("python-pyqt" ,python-pyqt)
22028 ("python-requests" ,python-requests)
22029 ("python-ruamel.yaml" ,python-ruamel.yaml)
22030 ("python-translation-finder" ,python-translation-finder)
22031 ("python-watchdog" ,python-watchdog)))
22032 (native-inputs
22033 `(("qttools" ,qttools)))
22034 (home-page "https://framagit.org/tyreunom/offlate")
22035 (synopsis "Offline translation interface for online translation tools")
22036 (description "Offlate offers a unified interface for different translation
22037 file formats, as well as many different online translation platforms. You can
22038 use it to get work from online platforms, specialized such as the Translation
22039 Project, or not such a gitlab instance when your upstream doesn't use any
22040 dedicated platform. The tool proposes a unified interface for any format and
22041 an upload option to send your work back to the platform.")
22042 (license license:gpl3+)))
22043
22044 (define-public python-titlecase
22045 (package
22046 (name "python-titlecase")
22047 (version "0.12.0")
22048 (source
22049 (origin
22050 (method url-fetch)
22051 (uri (pypi-uri "titlecase" version))
22052 (sha256
22053 (base32
22054 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
22055 (build-system python-build-system)
22056 (native-inputs
22057 `(("python-nose" ,python-nose)))
22058 (home-page "https://github.com/ppannuto/python-titlecase")
22059 (synopsis "Capitalize strings similar to book titles")
22060 (description
22061 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
22062 It capitalizes (predominantly English) strings in a way that is similar to
22063 book titles, using the New York Times Manual of Style to leave certain words
22064 lowercase.")
22065 (license license:expat)))
22066
22067 (define-public python-pypng
22068 (package
22069 (name "python-pypng")
22070 (version "0.0.20")
22071 (source
22072 (origin
22073 (method url-fetch)
22074 (uri (pypi-uri "pypng" version))
22075 (sha256
22076 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
22077 (build-system python-build-system)
22078 (home-page "https://github.com/drj11/pypng")
22079 (synopsis "Pure Python PNG image encoder/decoder")
22080 (description
22081 "The PyPNG module implements support for PNG images. It reads and writes
22082 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
22083 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
22084 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
22085 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
22086 A number of optional chunks can be specified (when writing) and
22087 understood (when reading): tRNS, bKGD, gAMA.
22088
22089 PyPNG is not a high level toolkit for image processing (like PIL) and does not
22090 aim at being a replacement or competitor. Its strength lies in fine-grained
22091 extensive support of PNG features. It can also read and write Netpbm PAM
22092 files, with a focus on its use as an intermediate format for implementing
22093 custom PNG processing.")
22094 (license license:expat)))
22095
22096 (define-public python-fuzzywuzzy
22097 (package
22098 (name "python-fuzzywuzzy")
22099 (version "0.18.0")
22100 (source
22101 (origin
22102 (method url-fetch)
22103 (uri (pypi-uri "fuzzywuzzy" version))
22104 (sha256
22105 (base32
22106 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
22107 (build-system python-build-system)
22108 (native-inputs
22109 `(("python-hypothesis" ,python-hypothesis)
22110 ("python-pycodestyle" ,python-pycodestyle)
22111 ("python-pytest" ,python-pytest)))
22112 (propagated-inputs
22113 `(("python-levenshtein" ,python-levenshtein)))
22114 (home-page "https://github.com/seatgeek/fuzzywuzzy")
22115 (synopsis "Fuzzy string matching in Python")
22116 (description "Approximate string matching using
22117 @emph{Levenshtein Distance} to calculate the differences between
22118 sequences.")
22119 (license license:gpl2)))
22120
22121 (define-public python2-fuzzywuzzy
22122 (package-with-python2 python-fuzzywuzzy))
22123
22124 (define-public python-block-tracing
22125 (package
22126 (name "python-block-tracing")
22127 (version "1.0.1")
22128 (source
22129 (origin
22130 (method url-fetch)
22131 (uri (pypi-uri "block_tracing" version))
22132 (sha256
22133 (base32
22134 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
22135 (build-system python-build-system)
22136 (arguments '(#:tests? #f)) ; no tests
22137 (home-page "https://github.com/rianhunter/block_tracing")
22138 (synopsis "Protect process memory")
22139 (description
22140 "@code{block_tracing} is a tiny Python library that can be used to
22141 prevent debuggers and other applications from inspecting the memory within
22142 your process.")
22143 (license license:expat)))
22144
22145 (define-public python-gcovr
22146 (package
22147 (name "python-gcovr")
22148 (version "4.2")
22149 (source
22150 (origin
22151 (method url-fetch)
22152 (uri (pypi-uri "gcovr" version))
22153 (sha256
22154 (base32
22155 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
22156 (build-system python-build-system)
22157 (propagated-inputs
22158 `(("python-lxml" ,python-lxml)
22159 ("python-jinja2" ,python-jinja2)))
22160 (home-page "https://gcovr.com/")
22161 (synopsis "Utility for generating code coverage results")
22162 (description
22163 "Gcovr provides a utility for managing the use of the GNU gcov
22164 utility and generating summarized code coverage results. It is inspired
22165 by the Python coverage.py package, which provides a similar utility for
22166 Python.")
22167 (license license:bsd-3)))
22168
22169 (define-public python-owslib
22170 (package
22171 (name "python-owslib")
22172 (version "0.19.2")
22173 (source
22174 (origin
22175 (method url-fetch)
22176 (uri (pypi-uri "OWSLib" version))
22177 (sha256
22178 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
22179 (build-system python-build-system)
22180 (arguments
22181 '(#:tests? #f)) ; TODO: package dependencies required for tests.
22182 (synopsis "Interface for Open Geospatial Consortium web service")
22183 (description
22184 "OWSLib is a Python package for client programming with Open Geospatial
22185 Consortium (OGC) web service (hence OWS) interface standards, and their related
22186 content models.")
22187 (home-page "https://geopython.github.io/OWSLib/")
22188 (license license:bsd-3)))
22189
22190 (define-public python-docusign-esign
22191 (package
22192 (name "python-docusign-esign")
22193 (version "3.1.0")
22194 (source (origin
22195 (method url-fetch)
22196 (uri (pypi-uri "docusign_esign" version))
22197 (sha256
22198 (base32
22199 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
22200 (build-system python-build-system)
22201 ;; Testing requires undocumented setup changes, and so testing is disabled here.
22202 (arguments `(#:tests? #f))
22203 (propagated-inputs
22204 `(("python-certifi" ,python-certifi)
22205 ("python-six" ,python-six)
22206 ("python-dateutil" ,python-dateutil)
22207 ("python-urllib3" ,python-urllib3)
22208 ("python-pyjwt" ,python-pyjwt)
22209 ("python-cryptography" ,python-cryptography)
22210 ("python-nose" ,python-nose)))
22211 (synopsis "DocuSign Python Client")
22212 (description "The Official DocuSign Python Client Library used to interact
22213 with the eSign REST API. Send, sign, and approve documents using this client.")
22214 (home-page "https://www.docusign.com/devcenter")
22215 (license license:expat)))
22216
22217 (define-public python-xattr
22218 (package
22219 (name "python-xattr")
22220 (version "0.9.7")
22221 (source
22222 (origin
22223 (method url-fetch)
22224 (uri (pypi-uri "xattr" version))
22225 (sha256
22226 (base32
22227 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
22228 (build-system python-build-system)
22229 (propagated-inputs
22230 `(("python-cffi" ,python-cffi)))
22231 (home-page "https://github.com/xattr/xattr")
22232 (synopsis
22233 "Python wrapper for extended file system attributes")
22234 (description "This package provides a Python wrapper for using extended
22235 file system attributes. Extended attributes extend the basic attributes of files
22236 and directories in the file system. They are stored as name:data pairs
22237 associated with file system objects (files, directories, symlinks, etc).")
22238 (license license:expat)))
22239
22240 (define-public python-json-logger
22241 (package
22242 (name "python-json-logger")
22243 (version "0.1.11")
22244 (source
22245 (origin
22246 (method url-fetch)
22247 (uri (pypi-uri "python-json-logger" version))
22248 (sha256
22249 (base32
22250 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
22251 (build-system python-build-system)
22252 (home-page
22253 "https://github.com/madzak/python-json-logger")
22254 (synopsis "JSON log formatter in Python")
22255 (description "This library allows standard Python logging to output log data
22256 as JSON objects. With JSON we can make our logs more readable by machines and
22257 we can stop writing custom parsers for syslog-type records.")
22258 (license license:bsd-3)))
22259
22260 (define-public python-daiquiri
22261 (package
22262 (name "python-daiquiri")
22263 (version "2.1.1")
22264 (source
22265 (origin
22266 (method url-fetch)
22267 (uri (pypi-uri "daiquiri" version))
22268 (sha256
22269 (base32
22270 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
22271 (build-system python-build-system)
22272 (propagated-inputs
22273 `(("python-json-logger" ,python-json-logger)))
22274 (native-inputs
22275 `(("python-mock" ,python-mock)
22276 ("python-pytest" ,python-pytest)
22277 ("python-setuptools-scm" ,python-setuptools-scm)
22278 ("python-six" ,python-six)))
22279 (home-page "https://github.com/jd/daiquiri")
22280 (synopsis
22281 "Library to configure Python logging easily")
22282 (description "The daiquiri library provides an easy way to configure
22283 logging in Python. It also provides some custom formatters and handlers.")
22284 (license license:asl2.0)))
22285
22286 (define-public python-pifpaf
22287 (package
22288 (name "python-pifpaf")
22289 (version "2.5.0")
22290 (source
22291 (origin
22292 (method url-fetch)
22293 (uri (pypi-uri "pifpaf" version))
22294 (sha256
22295 (base32
22296 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
22297 (build-system python-build-system)
22298 (arguments
22299 '(#:phases
22300 (modify-phases %standard-phases
22301 (replace 'check
22302 (lambda _
22303 (invoke "python" "setup.py" "testr" "--slowest"
22304 "--testr-args=until-failure"))))))
22305 (propagated-inputs
22306 `(("python-click" ,python-click)
22307 ("python-daiquiri" ,python-daiquiri)
22308 ("python-fixtures" ,python-fixtures)
22309 ("python-jinja2" ,python-jinja2)
22310 ("python-pbr" ,python-pbr)
22311 ("python-psutil" ,python-psutil)
22312 ("python-six" ,python-six)
22313 ("python-xattr" ,python-xattr)))
22314 (native-inputs
22315 `(("python-mock" ,python-mock)
22316 ("python-os-testr" ,python-os-testr)
22317 ("python-requests" ,python-requests)
22318 ("python-testrepository" ,python-testrepository)
22319 ("python-testtools" ,python-testtools)))
22320 (home-page "https://github.com/jd/pifpaf")
22321 (synopsis "Tools and fixtures to manage daemons for testing in Python")
22322 (description "Pifpaf is a suite of fixtures and a command-line tool that
22323 starts and stops daemons for a quick throw-away usage. This is typically
22324 useful when needing these daemons to run integration testing. It originally
22325 evolved from its precursor @code{overtest}.")
22326 (license license:asl2.0)))
22327
22328 (define-public python-pytest-check-links
22329 (package
22330 (name "python-pytest-check-links")
22331 (version "0.3.0")
22332 (source
22333 (origin
22334 (method url-fetch)
22335 ;; URI uses underscores
22336 (uri (pypi-uri "pytest_check_links" version))
22337 (sha256
22338 (base32
22339 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
22340 (build-system python-build-system)
22341 (propagated-inputs
22342 `(("python-docutils" ,python-docutils)
22343 ("python-html5lib" ,python-html5lib)
22344 ("python-nbconvert" ,python-nbconvert)
22345 ("python-nbformat" ,python-nbformat)
22346 ("python-pytest" ,python-pytest)
22347 ("python-six" ,python-six)))
22348 (native-inputs
22349 `(("python-pbr-minimal" ,python-pbr-minimal)))
22350 (home-page "https://github.com/minrk/pytest-check-links")
22351 (synopsis "Check links in files")
22352 (description "This package provides a pytest plugin that checks URLs for
22353 HTML-containing files.")
22354 (license license:bsd-3)))
22355
22356 (define-public python-json5
22357 (package
22358 (name "python-json5")
22359 (version "0.8.5")
22360 (source
22361 (origin
22362 ;; sample.json5 is missing from PyPi source tarball
22363 (method git-fetch)
22364 (uri (git-reference
22365 (url "https://github.com/dpranke/pyjson5")
22366 (commit (string-append "v" version))))
22367 (file-name (git-file-name name version))
22368 (sha256
22369 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
22370 (build-system python-build-system)
22371 (home-page "https://github.com/dpranke/pyjson5")
22372 (synopsis
22373 "Python implementation of the JSON5 data format")
22374 (description
22375 "JSON5 extends the JSON data interchange format to make it slightly more
22376 usable as a configuration language. This Python package implements parsing and
22377 dumping of JSON5 data structures.")
22378 (license license:asl2.0)))
22379
22380 (define-public python-frozendict
22381 (package
22382 (name "python-frozendict")
22383 (version "1.2")
22384 (source
22385 (origin
22386 (method url-fetch)
22387 (uri (pypi-uri "frozendict" version))
22388 (sha256
22389 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
22390 (build-system python-build-system)
22391 (home-page "https://github.com/slezica/python-frozendict")
22392 (synopsis "Simple immutable mapping for Python")
22393 (description
22394 "@dfn{frozendict} is an immutable wrapper around dictionaries that
22395 implements the complete mapping interface. It can be used as a drop-in
22396 replacement for dictionaries where immutability is desired.")
22397 (license license:expat)))
22398
22399 (define-public python-unpaddedbase64
22400 (package
22401 (name "python-unpaddedbase64")
22402 (version "1.1.0")
22403 (source
22404 (origin
22405 (method git-fetch)
22406 (uri (git-reference
22407 (url "https://github.com/matrix-org/python-unpaddedbase64")
22408 (commit (string-append "v" version))))
22409 (file-name (git-file-name name version))
22410 (sha256
22411 (base32
22412 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
22413 (build-system python-build-system)
22414 (home-page "https://pypi.org/project/unpaddedbase64/")
22415 (synopsis "Encode and decode Base64 without “=” padding")
22416 (description
22417 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
22418 using “=” characters. However this conveys no benefit so many protocols
22419 choose to use Base64 without the “=” padding.")
22420 (license license:asl2.0)))
22421
22422 (define-public python-py-cpuinfo
22423 (package
22424 (name "python-py-cpuinfo")
22425 (version "5.0.0")
22426 (source
22427 (origin
22428 (method url-fetch)
22429 (uri (pypi-uri "py-cpuinfo" version))
22430 (sha256
22431 (base32
22432 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
22433 (build-system python-build-system)
22434 (home-page "https://github.com/workhorsy/py-cpuinfo")
22435 (synopsis "Get CPU info with Python")
22436 (description
22437 "This Python module returns the CPU info by using the best sources of
22438 information for your operating system.")
22439 (license license:expat)))
22440
22441 (define-public python-canonicaljson
22442 (package
22443 (name "python-canonicaljson")
22444 (version "1.4.0")
22445 (source
22446 (origin
22447 (method url-fetch)
22448 (uri (pypi-uri "canonicaljson" version))
22449 (sha256
22450 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
22451 (build-system python-build-system)
22452 (propagated-inputs
22453 `(("python-six" ,python-six)
22454 ("python-frozendict" ,python-frozendict)
22455 ("python-simplejson" ,python-simplejson)))
22456 (home-page "https://github.com/matrix-org/python-canonicaljson")
22457 (synopsis "Canonical JSON")
22458 (description
22459 "Deterministically encode JSON.
22460
22461 @itemize
22462 @item Encodes objects and arrays as RFC 7159 JSON.
22463 @item Sorts object keys so that you get the same result each time.
22464 @item Has no insignificant whitespace to make the output as small as possible.
22465 @item Escapes only the characters that must be escaped, U+0000 to
22466 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
22467 @item Uses the shortest escape sequence for each escaped character.
22468 @item Encodes the JSON as UTF-8.
22469 @item Can encode frozendict immutable dictionaries.
22470 @end itemize")
22471 (license license:asl2.0)))
22472
22473 (define-public python-signedjson
22474 (package
22475 (name "python-signedjson")
22476 (version "1.1.1")
22477 (source
22478 (origin
22479 (method url-fetch)
22480 (uri (pypi-uri "signedjson" version))
22481 (sha256
22482 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
22483 (build-system python-build-system)
22484 (propagated-inputs
22485 `(("python-canonicaljson" ,python-canonicaljson)
22486 ("python-importlib-metadata" ,python-importlib-metadata)
22487 ("python-pynacl" ,python-pynacl)
22488 ("python-typing-extensions" ,python-typing-extensions)
22489 ("python-unpaddedbase64" ,python-unpaddedbase64)))
22490 (native-inputs
22491 `(("python-setuptools-scm" ,python-setuptools-scm)))
22492 (home-page "https://github.com/matrix-org/python-signedjson")
22493 (synopsis "Sign JSON objects with ED25519 signatures")
22494 (description
22495 "Sign JSON objects with ED25519 signatures.
22496
22497 @itemize
22498 @item More than one entity can sign the same object.
22499 @item Each entity can sign the object with more than one key making it easier to
22500 rotate keys
22501 @item ED25519 can be replaced with a different algorithm.
22502 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
22503 key.
22504 @end itemize")
22505 (license license:asl2.0)))
22506
22507 (define-public python-daemonize
22508 (package
22509 (name "python-daemonize")
22510 (version "2.5.0")
22511 (source
22512 (origin
22513 (method url-fetch)
22514 (uri (pypi-uri "daemonize" version))
22515 (sha256
22516 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
22517 (build-system python-build-system)
22518 (home-page "https://github.com/thesharp/daemonize")
22519 (synopsis "Library for writing system daemons in Python")
22520 (description "Daemonize is a library for writing system daemons in Python.")
22521 (license license:expat)))
22522
22523 (define-public python-pymacaroons
22524 (package
22525 (name "python-pymacaroons")
22526 (version "0.13.0")
22527 (source
22528 (origin
22529 (method url-fetch)
22530 (uri (pypi-uri "pymacaroons" version))
22531 (sha256
22532 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
22533 (build-system python-build-system)
22534 (propagated-inputs
22535 `(("python-six" ,python-six)
22536 ("python-pynacl" ,python-pynacl)))
22537 (home-page "https://github.com/ecordell/pymacaroons")
22538 (synopsis "Python Macaroon Library")
22539 (description
22540 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
22541 tokens, macaroons embed caveats that define specific authorization
22542 requirements for the target service, the service that issued the root macaroon
22543 and which is capable of verifying the integrity of macaroons it receives.
22544
22545 Macaroons allow for delegation and attenuation of authorization. They are
22546 simple and fast to verify, and decouple authorization policy from the
22547 enforcement of that policy.")
22548 (license license:expat)))
22549
22550 (define-public python-ldap3
22551 (package
22552 (name "python-ldap3")
22553 (version "2.7")
22554 (home-page "https://github.com/cannatag/ldap3")
22555 (source
22556 (origin
22557 (method git-fetch)
22558 (uri (git-reference (url home-page)
22559 (commit (string-append "v" version))))
22560 (file-name (git-file-name name version))
22561 (sha256
22562 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
22563 (build-system python-build-system)
22564 (arguments
22565 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
22566 #:phases (modify-phases %standard-phases
22567 (replace 'check
22568 (lambda* (#:key tests? #:allow-other-keys)
22569 (when tests?
22570 (invoke "nosetests" "-s" "test"))
22571 #t)))))
22572 (native-inputs
22573 `(("python-nose" ,python-nose)))
22574 (propagated-inputs
22575 `(("python-gssapi" ,python-gssapi)
22576 ("python-pyasn1" ,python-pyasn1)))
22577 (synopsis "Python LDAP client")
22578 (description
22579 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
22580 library.")
22581 (license license:lgpl3+)))
22582
22583 (define-public python-boltons
22584 (package
22585 (name "python-boltons")
22586 (version "20.0.0")
22587 (source
22588 (origin
22589 (method url-fetch)
22590 (uri (pypi-uri "boltons" version))
22591 (sha256
22592 (base32
22593 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
22594 (build-system python-build-system)
22595 (home-page "https://github.com/mahmoud/boltons")
22596 (synopsis "Extensions to the Python standard library")
22597 (description
22598 "Boltons is a set of over 230 pure-Python utilities in the same spirit
22599 as — and yet conspicuously missing from — the standard library, including:
22600
22601 @itemize
22602 @item Atomic file saving, bolted on with fileutils
22603 @item A highly-optimized OrderedMultiDict, in dictutils
22604 @item Two types of PriorityQueue, in queueutils
22605 @item Chunked and windowed iteration, in iterutils
22606 @item Recursive data structure iteration and merging, with iterutils.remap
22607 @item Exponential backoff functionality, including jitter, through
22608 iterutils.backoff
22609 @item A full-featured TracebackInfo type, for representing stack traces, in
22610 tbutils
22611 @end itemize")
22612 (license license:bsd-3)))
22613
22614 (define-public python-eliot
22615 (package
22616 (name "python-eliot")
22617 (version "1.12.0")
22618 (source
22619 (origin
22620 (method url-fetch)
22621 (uri (pypi-uri "eliot" version))
22622 (sha256
22623 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
22624 (build-system python-build-system)
22625 (arguments
22626 `(#:phases
22627 (modify-phases %standard-phases
22628 (add-after 'unpack 'remove-journald-support
22629 (lambda _
22630 (for-each delete-file
22631 '("eliot/tests/test_journald.py"
22632 "eliot/journald.py"))
22633 #t))
22634 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
22635 ;; remove command-line tool's tests. TODO eliot-prettyprint should
22636 ;; be installed and these tests should pass.
22637 (lambda _
22638 (delete-file "eliot/tests/test_prettyprint.py")
22639 #t)))))
22640 (propagated-inputs
22641 `(("python-boltons" ,python-boltons)
22642 ("python-pyrsistent" ,python-pyrsistent)
22643 ("python-six" ,python-six)
22644 ("python-zope-interface" ,python-zope-interface)))
22645 (native-inputs
22646 `(("python-black" ,python-black)
22647 ("python-coverage" ,python-coverage)
22648 ("python-dask" ,python-dask)
22649 ("python-flake8" ,python-flake8)
22650 ("python-hypothesis" ,python-hypothesis)
22651 ("python-pytest" ,python-pytest)
22652 ("python-setuptools" ,python-setuptools)
22653 ("python-sphinx" ,python-sphinx)
22654 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22655 ("python-testtools" ,python-testtools)
22656 ("python-twine" ,python-twine)
22657 ("python-twisted" ,python-twisted)))
22658 (home-page "https://github.com/itamarst/eliot/")
22659 (synopsis "Eliot: the logging system that tells you why it happened")
22660 (description
22661 "@dfn{eliot} is a Python logging system that outputs causal chains of
22662 actions: actions can spawn other actions, and eventually they either succeed
22663 or fail. The resulting logs tell you the story of what your software did: what
22664 happened, and what caused it.")
22665 (license license:asl2.0)))
22666
22667 (define-public python-pem
22668 (package
22669 (name "python-pem")
22670 (version "20.1.0")
22671 (source
22672 (origin
22673 (method url-fetch)
22674 (uri (pypi-uri "pem" version))
22675 (sha256
22676 (base32
22677 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
22678 (build-system python-build-system)
22679 (native-inputs
22680 `(("python-certifi" ,python-certifi)
22681 ("python-coverage" ,python-coverage)
22682 ("python-pretend" ,python-pretend)
22683 ("python-pyopenssl" ,python-pyopenssl)
22684 ("python-pytest" ,python-pytest)
22685 ("python-sphinx" ,python-sphinx)
22686 ("python-twisted" ,python-twisted)))
22687 (home-page "https://pem.readthedocs.io/")
22688 (synopsis "Easy PEM file parsing in Python")
22689 (description
22690 "This package provides a Python module for parsing and splitting PEM files.")
22691 (license license:expat)))
22692
22693 (define-public python-txsni
22694 ;; We need a few commits on top of 0.1.9 for compatibility with newer
22695 ;; Python and OpenSSL.
22696 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
22697 (revision "0"))
22698 (package
22699 (name "python-txsni")
22700 (version (git-version "0.1.9" revision commit))
22701 (home-page "https://github.com/glyph/txsni")
22702 (source
22703 (origin
22704 (method git-fetch)
22705 (uri (git-reference (url home-page) (commit commit)))
22706 (file-name (git-file-name name version))
22707 (sha256
22708 (base32
22709 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
22710 (build-system python-build-system)
22711 (propagated-inputs
22712 `(("python-pyopenssl" ,python-pyopenssl)
22713 ("python-service-identity" ,python-service-identity)
22714 ("python-twisted" ,python-twisted)))
22715 (synopsis "Run TLS servers with Twisted")
22716 (description
22717 "This package provides an easy-to-use SNI endpoint for use
22718 with the Twisted web framework.")
22719 (license license:expat))))
22720
22721 (define-public python-txacme
22722 (package
22723 (name "python-txacme")
22724 (version "0.9.2")
22725 (source
22726 (origin
22727 (method url-fetch)
22728 (uri (pypi-uri "txacme" version))
22729 (sha256
22730 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22731 (build-system python-build-system)
22732 (propagated-inputs
22733 `(("python-acme" ,python-acme)
22734 ("python-attrs" ,python-attrs)
22735 ("python-eliot" ,python-eliot)
22736 ("python-josepy" ,python-josepy)
22737 ("python-pem" ,python-pem)
22738 ("python-treq" ,python-treq)
22739 ("python-twisted" ,python-twisted)
22740 ("python-txsni" ,python-txsni)))
22741 (native-inputs
22742 `(("python-fixtures" ,python-fixtures)
22743 ("python-hypothesis" ,python-hypothesis)
22744 ("python-mock" ,python-mock)
22745 ("python-service-identity"
22746 ,python-service-identity)
22747 ("python-testrepository" ,python-testrepository)
22748 ("python-testscenarios" ,python-testscenarios)
22749 ("python-testtools" ,python-testtools)))
22750 (home-page "https://github.com/twisted/txacme")
22751 (synopsis "Twisted implexmentation of the ACME protocol")
22752 (description
22753 "ACME is Automatic Certificate Management Environment, a protocol that
22754 allows clients and certificate authorities to automate verification and
22755 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22756 Certificate Authority.
22757
22758 txacme is an implementation of the protocol for Twisted, the event-driven
22759 networking engine for Python.")
22760 (license license:expat)))
22761
22762 (define-public python-pysaml2
22763 (package
22764 (name "python-pysaml2")
22765 (version "6.5.1")
22766 (source
22767 (origin
22768 (method url-fetch)
22769 (uri (pypi-uri "pysaml2" version))
22770 (sha256
22771 (base32
22772 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
22773 (build-system python-build-system)
22774 (propagated-inputs
22775 `(("python-cryptography" ,python-cryptography)
22776 ("python-dateutil" ,python-dateutil)
22777 ("python-defusedxml" ,python-defusedxml)
22778 ("python-importlib-resources"
22779 ,python-importlib-resources)
22780 ("python-pyopenssl" ,python-pyopenssl)
22781 ("python-pytz" ,python-pytz)
22782 ("python-requests" ,python-requests)
22783 ("python-six" ,python-six)
22784 ("python-xmlschema" ,python-xmlschema)))
22785 (home-page "https://idpy.org")
22786 (synopsis "Python implementation of SAML Version 2 Standard")
22787 (description
22788 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22789 It contains all necessary pieces for building a SAML2 service provider or
22790 an identity provider. The distribution contains examples of both.
22791
22792 This package was originally written to work in a WSGI environment, but
22793 there are extensions that allow you to use it with other frameworks.")
22794 (license license:asl2.0)))
22795
22796 (define-public python-click-plugins
22797 (package
22798 (name "python-click-plugins")
22799 (version "1.1.1")
22800 (source
22801 (origin
22802 (method url-fetch)
22803 (uri (pypi-uri "click-plugins" version))
22804 (sha256
22805 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22806 (build-system python-build-system)
22807 (native-inputs
22808 `(("python-pytest" ,python-pytest)))
22809 (propagated-inputs
22810 `(("python-click" ,python-click)))
22811 (synopsis "Extension for Click to register external CLI commands")
22812 (description "This package provides n extension module for Click to
22813 register external CLI commands via setuptools entry-points.")
22814 (home-page "https://github.com/click-contrib/click-plugins")
22815 (license license:bsd-3)))
22816
22817 (define-public python-diceware
22818 (package
22819 (name "python-diceware")
22820 (version "0.9.6")
22821 (source
22822 (origin
22823 (method url-fetch)
22824 (uri (pypi-uri "diceware" version))
22825 (sha256
22826 (base32
22827 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22828 (build-system python-build-system)
22829 (native-inputs
22830 `(("python-coverage" ,python-coverage)
22831 ("python-pytest" ,python-pytest)
22832 ("python-pytest-runner" ,python-pytest-runner)))
22833 (home-page "https://github.com/ulif/diceware/")
22834 (synopsis "Generates memorable passphrases")
22835 (description "This package generates passphrases by concatenating words
22836 randomly picked from wordlists. It supports several sources of
22837 randomness (including real life dice) and different wordlists (including
22838 cryptographically signed ones).")
22839 (license license:gpl3+)))
22840
22841 (define-public python-dictdiffer
22842 (package
22843 (name "python-dictdiffer")
22844 (version "0.8.1")
22845 (source (origin
22846 (method url-fetch)
22847 (uri (pypi-uri "dictdiffer" version))
22848 (sha256
22849 (base32
22850 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
22851 (build-system python-build-system)
22852 (native-inputs
22853 `(("python-check-manifest" ,python-check-manifest)
22854 ("python-coverage" ,python-coverage)
22855 ("python-isort" ,python-isort)
22856 ("python-mock" ,python-mock)
22857 ("python-pydoctstyle" ,python-pydocstyle)
22858 ("python-pytest-cache" ,python-pytest-cache)
22859 ("python-pytest-cov" ,python-pytest-cov)
22860 ("python-pytest-pep8" ,python-pytest-pep8)
22861 ("python-pytest-runner" ,python-pytest-runner)
22862 ("python-pytest" ,python-pytest)
22863 ("python-setuptools-scm" ,python-setuptools-scm)
22864 ("python-tox" ,python-tox)))
22865 (home-page "https://github.com/inveniosoftware/dictdiffer")
22866 (synopsis "Diff and patch Python dictionary objects")
22867 (description
22868 "Dictdiffer is a Python module that helps you to diff and patch
22869 dictionaries.")
22870 (license license:expat)))
22871
22872 (define-public pyzo
22873 (package
22874 (name "pyzo")
22875 (version "4.11.2")
22876 (source
22877 (origin
22878 (method url-fetch)
22879 (uri (pypi-uri "pyzo" version))
22880 (sha256
22881 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
22882 (build-system python-build-system)
22883 (arguments
22884 `(#:phases
22885 (modify-phases %standard-phases
22886 (add-before 'check 'fix-home-directory
22887 (lambda _
22888 ;; Tests fail with "Permission denied: '/homeless-shelter'".
22889 (setenv "HOME" "/tmp")
22890 #t)))
22891 ;; Tests fail with "Uncaught Python exception: python: undefined
22892 ;; symbol: objc_getClass".
22893 #:tests? #f))
22894 (propagated-inputs
22895 `(("python-pyqt" ,python-pyqt)))
22896 (home-page "https://pyzo.org")
22897 (synopsis
22898 "Python IDE for scientific computing")
22899 (description
22900 "Pyzo is a Python IDE focused on interactivity and introspection,
22901 which makes it very suitable for scientific computing. Its practical
22902 design is aimed at simplicity and efficiency.
22903
22904 It consists of two main components, the editor and the shell, and uses
22905 a set of pluggable tools to help the programmer in various ways. Some
22906 example tools are source structure, project manager, interactive help,
22907 workspace...")
22908 (license license:bsd-2)))
22909
22910 (define-public python-osc
22911 (package
22912 (name "python-osc")
22913 (version "1.7.4")
22914 (source
22915 (origin
22916 (method url-fetch)
22917 (uri (pypi-uri "python-osc" version))
22918 (sha256
22919 (base32
22920 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
22921 (build-system python-build-system)
22922 (home-page "https://github.com/attwad/python-osc")
22923 (synopsis "Open Sound Control server and client implementations")
22924 (description
22925 "@code{python-osc} is a pure Python library with no external
22926 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
22927 Open Sound Control 1.0} specification.")
22928 (license license:unlicense)))
22929
22930 (define-public python-voluptuous
22931 (package
22932 (name "python-voluptuous")
22933 (version "0.11.7")
22934 (source
22935 (origin
22936 (method url-fetch)
22937 (uri (pypi-uri "voluptuous" version))
22938 (sha256
22939 (base32
22940 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
22941 (build-system python-build-system)
22942 (native-inputs
22943 `(("python-nose" ,python-nose)))
22944 (home-page "https://github.com/alecthomas/voluptuous")
22945 (synopsis "Python data validation library")
22946 (description
22947 "Voluptuous is a Python data validation library. It is primarily
22948 intended for validating data coming into Python as JSON, YAML, etc.")
22949 (license license:bsd-3)))
22950
22951 (define-public python-cmd2
22952 (package
22953 (name "python-cmd2")
22954 (version "1.0.2")
22955 (source
22956 (origin
22957 (method url-fetch)
22958 (uri (pypi-uri "cmd2" version))
22959 (sha256
22960 (base32
22961 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
22962 (build-system python-build-system)
22963 (propagated-inputs
22964 `(("python-attrs" ,python-attrs)
22965 ("python-colorama" ,python-colorama)
22966 ("python-pyperclip" ,python-pyperclip)
22967 ("python-wcwidth" ,python-wcwidth)))
22968 (native-inputs
22969 `(("python-codecov" ,python-codecov)
22970 ("python-coverage" ,python-coverage)
22971 ("python-doc8" ,python-doc8)
22972 ("python-flake8" ,python-flake8)
22973 ("python-invoke" ,python-invoke)
22974 ("python-mock" ,python-mock)
22975 ("python-pytest" ,python-pytest)
22976 ("python-pytest-cov" ,python-pytest-cov)
22977 ("python-pytest-mock" ,python-pytest-mock)
22978 ("python-setuptools-scm" ,python-setuptools-scm)
22979 ("python-sphinx" ,python-sphinx)
22980 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
22981 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22982 ("python-tox" ,python-tox)
22983 ("python-twine" ,python-twine)
22984 ("which" ,which)))
22985 (home-page "https://github.com/python-cmd2/cmd2")
22986 (synopsis "Tool for building interactive command line applications")
22987 (description
22988 "Cmd2 is a tool for building interactive command line applications in
22989 Python. Its goal is to make it quick and easy for developers to build
22990 feature-rich and user-friendly interactive command line applications. It
22991 provides a simple API which is an extension of Python's built-in @code{cmd}
22992 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
22993 make your life easier and eliminates much of the boilerplate code which would
22994 be necessary when using @code{cmd}.")
22995 (license license:expat)))
22996
22997 (define-public python-pytidylib
22998 (package
22999 (name "python-pytidylib")
23000 (version "0.3.2")
23001 (source (origin
23002 (method url-fetch)
23003 (uri (pypi-uri "pytidylib" version))
23004 (sha256
23005 (base32
23006 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
23007 (build-system python-build-system)
23008 (arguments
23009 '(#:phases
23010 (modify-phases %standard-phases
23011 (add-before 'build 'qualify-libtidy
23012 (lambda* (#:key inputs #:allow-other-keys)
23013 (let ((libtidy (string-append (assoc-ref inputs "tidy")
23014 "/lib/libtidy.so")))
23015 (substitute* "tidylib/tidy.py"
23016 (("ctypes\\.util\\.find_library\\('tidy'\\)")
23017 (format #f "'~a'" libtidy)))
23018 #t))))))
23019 (inputs `(("tidy" ,tidy)))
23020 (home-page "https://github.com/countergram/pytidylib")
23021 (synopsis "Python wrapper for HTML Tidy library")
23022 (description
23023 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
23024 allows you, from Python code, to “fix” invalid (X)HTML markup.")
23025 (license license:expat)))
23026
23027 (define-public python2-pytidylib
23028 (package-with-python2 python-pytidylib))
23029
23030 (define-public python-mujson
23031 (package
23032 (name "python-mujson")
23033 (version "1.4")
23034 (source
23035 (origin
23036 (method url-fetch)
23037 (uri (pypi-uri "mujson" version))
23038 (sha256
23039 (base32
23040 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
23041 (build-system python-build-system)
23042 (home-page "https://github.com/mattgiles/mujson")
23043 (synopsis "Use the fastest JSON functions available at import time")
23044 (description "This package selects the fastest JSON functions available
23045 at import time.")
23046 (license license:expat)))
23047
23048 (define-public python-bashlex
23049 (package
23050 (name "python-bashlex")
23051 (version "0.14")
23052 (source
23053 (origin
23054 (method url-fetch)
23055 (uri (pypi-uri "bashlex" version))
23056 (sha256
23057 (base32
23058 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
23059 (build-system python-build-system)
23060 (arguments
23061 `(#:phases
23062 (modify-phases %standard-phases
23063 (add-before 'build 'pregenerate-yacc-tables
23064 (lambda _
23065 ;; parser.py caches tables, which attempts to write to site lib
23066 ;; see https://github.com/idank/bashlex/issues/51
23067 (invoke "python" "-c" "import bashlex"))))))
23068 (home-page
23069 "https://github.com/idank/bashlex")
23070 (synopsis "Python parser for bash")
23071 (description "@code{bashlex} is a Python port of the parser used
23072 internally by GNU bash.
23073
23074 For the most part it's transliterated from C, the major differences are:
23075
23076 @itemize
23077 @item it does not execute anything
23078 @item it is reentrant
23079 @item it generates a complete AST
23080 @end itemize
23081 ")
23082 (license license:gpl3+)))
23083
23084 (define-public python-jinxed
23085 (package
23086 (name "python-jinxed")
23087 (version "1.0.0")
23088 (source
23089 (origin
23090 (method url-fetch)
23091 (uri (pypi-uri "jinxed" version))
23092 (sha256
23093 (base32
23094 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
23095 (build-system python-build-system)
23096 (arguments
23097 '(#:phases
23098 (modify-phases %standard-phases
23099 (add-before 'check 'set-environment-variables
23100 (lambda* (#:key inputs #:allow-other-keys)
23101 (let ((ncurses (assoc-ref inputs "ncurses")))
23102 (setenv "TERM" "LINUX")
23103 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
23104 #t))))
23105 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
23106 (native-inputs
23107 `(("ncurses" ,ncurses)))
23108 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
23109 (synopsis "Jinxed Terminal Library")
23110 (description
23111 "Jinxed is an implementation of a subset of the Python curses library.")
23112 (license license:mpl2.0)))
23113
23114 (define-public python-blessed
23115 (package
23116 (name "python-blessed")
23117 (version "1.17.8")
23118 (source
23119 (origin
23120 (method url-fetch)
23121 (uri (pypi-uri "blessed" version))
23122 (sha256
23123 (base32
23124 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
23125 (modules '((guix build utils)))
23126 (snippet
23127 '(begin
23128 ;; Don't get hung up on Windows test failures.
23129 (delete-file "blessed/win_terminal.py") #t))))
23130 (build-system python-build-system)
23131 (propagated-inputs
23132 `(("python-jinxed" ,python-jinxed)
23133 ("python-six" ,python-six)
23134 ("python-wcwidth" ,python-wcwidth)))
23135 (native-inputs
23136 `(("python-mock" ,python-mock)
23137 ("python-pytest" ,python-pytest)))
23138 (home-page "https://github.com/jquast/blessed")
23139 (synopsis "Wrapper around terminal capabilities")
23140 (description
23141 "Blessed is a thin, practical wrapper around terminal styling, screen
23142 positioning, and keyboard input.")
23143 (license license:expat)))
23144
23145 (define-public python-readme-renderer
23146 (package
23147 (name "python-readme-renderer")
23148 (version "26.0")
23149 (source
23150 (origin
23151 (method url-fetch)
23152 (uri (pypi-uri "readme_renderer" version))
23153 (sha256
23154 (base32
23155 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
23156 (build-system python-build-system)
23157 (propagated-inputs
23158 `(("python-bleach" ,python-bleach)
23159 ("python-docutils" ,python-docutils)
23160 ("python-pygments" ,python-pygments)
23161 ("python-six" ,python-six)))
23162 (native-inputs
23163 `(("python-mock" ,python-mock)
23164 ("python-pytest" ,python-pytest)))
23165 (home-page "https://github.com/pypa/readme_renderer")
23166 (synopsis "Render README files in Warehouse")
23167 (description
23168 "Readme Renderer is a library that will safely render arbitrary README
23169 files into HTML. It is designed to be used in Warehouse to render the
23170 @code{long_description} for packages. It can handle Markdown, reStructuredText,
23171 and plain text.")
23172 (license license:asl2.0)))
23173
23174 (define-public python-lazr-delegates
23175 (package
23176 (name "python-lazr-delegates")
23177 (version "2.0.4")
23178 (source
23179 (origin
23180 (method url-fetch)
23181 (uri (pypi-uri "lazr.delegates" version))
23182 (sha256
23183 (base32
23184 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
23185 (build-system python-build-system)
23186 (arguments
23187 '(#:phases
23188 (modify-phases %standard-phases
23189 (replace 'check
23190 (lambda _
23191 (invoke "python" "setup.py" "nosetests"))))))
23192 (native-inputs
23193 `(("python-nose" ,python-nose)))
23194 (propagated-inputs
23195 `(("python-zope-interface" ,python-zope-interface)))
23196 (home-page "https://launchpad.net/lazr.delegates")
23197 (synopsis "Easily write objects that delegate behavior")
23198 (description
23199 "The @code{lazr.delegates} package makes it easy to write objects that
23200 delegate behavior to another object. The new object adds some property or
23201 behavior on to the other object, while still providing the underlying interface,
23202 and delegating behavior.")
23203 (license license:lgpl3)))
23204
23205 (define-public python-lazr-config
23206 (package
23207 (name "python-lazr-config")
23208 (version "2.2.2")
23209 (source
23210 (origin
23211 (method url-fetch)
23212 (uri (pypi-uri "lazr.config" version))
23213 (sha256
23214 (base32
23215 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
23216 (build-system python-build-system)
23217 (arguments
23218 '(#:phases
23219 (modify-phases %standard-phases
23220 (replace 'check
23221 (lambda _
23222 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
23223 (native-inputs
23224 `(("python-nose" ,python-nose)))
23225 (propagated-inputs
23226 `(("python-lazr-delegates" ,python-lazr-delegates)
23227 ("python-zope-interface" ,python-zope-interface)))
23228 (home-page "https://launchpad.net/lazr.config")
23229 (synopsis "Create configuration schemas and process and validate configurations")
23230 (description
23231 "The LAZR config system is typically used to manage process configuration.
23232 Process configuration is for saying how things change when we run systems on
23233 different machines, or under different circumstances. This system uses ini-like
23234 file format of section, keys, and values. The config file supports inheritance
23235 to minimize duplication of information across files. The format supports schema
23236 validation.")
23237 (license license:lgpl3)))
23238
23239 (define-public python-flufl-bounce
23240 (package
23241 (name "python-flufl-bounce")
23242 (version "3.0.1")
23243 (source
23244 (origin
23245 (method url-fetch)
23246 (uri (pypi-uri "flufl.bounce" version))
23247 (sha256
23248 (base32
23249 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
23250 (build-system python-build-system)
23251 (propagated-inputs
23252 `(("python-atpublic" ,python-atpublic)
23253 ("python-zope-interface" ,python-zope-interface)))
23254 (native-inputs
23255 `(("python-nose2" ,python-nose2)))
23256 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
23257 (synopsis "Email bounce detectors")
23258 (description "The @code{flufl.bounce} library provides a set of heuristics
23259 and an API for detecting the original bouncing email addresses from a bounce
23260 message. Many formats found in the wild are supported, as are VERP and
23261 RFC 3464.")
23262 (license (list license:asl2.0
23263 license:lgpl3)))) ; only for setup_headers.py
23264
23265 (define-public python-flufl-i18n
23266 (package
23267 (name "python-flufl-i18n")
23268 (version "3.0")
23269 (source
23270 (origin
23271 (method url-fetch)
23272 (uri (pypi-uri "flufl.i18n" version))
23273 (sha256
23274 (base32
23275 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
23276 (build-system python-build-system)
23277 (propagated-inputs
23278 `(("python-atpublic" ,python-atpublic)))
23279 (home-page "https://flufli18n.readthedocs.io")
23280 (synopsis "API for Python internationalization")
23281 (description
23282 "This package provides a high-level, convenient API for managing
23283 internationalization/translation contexts in Python applications. There is a
23284 simple API for single-context applications, such as command line scripts which
23285 only need to translate into one language during the entire course of their
23286 execution. There is a more flexible, but still convenient API for multi-context
23287 applications, such as servers, which may need to switch language contexts for
23288 different tasks.")
23289 (license license:asl2.0)))
23290
23291 (define-public python-flufl-lock
23292 (package
23293 (name "python-flufl-lock")
23294 (version "4.0")
23295 (source
23296 (origin
23297 (method url-fetch)
23298 (uri (pypi-uri "flufl.lock" version))
23299 (sha256
23300 (base32
23301 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
23302 (build-system python-build-system)
23303 (propagated-inputs
23304 `(("python-atpublic" ,python-atpublic)
23305 ("python-psutil" ,python-psutil)))
23306 (home-page "https://flufllock.readthedocs.io")
23307 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
23308 (description
23309 "The @dfn{flufl.lock} package provides NFS-safe file locking with
23310 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
23311 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
23312 and have a maximum lifetime built-in.")
23313 (license (list license:asl2.0
23314 license:lgpl3)))) ; only for setup_helpers.py
23315
23316 (define-public python-flufl-testing
23317 (package
23318 (name "python-flufl-testing")
23319 (version "0.8")
23320 (source
23321 (origin
23322 (method url-fetch)
23323 (uri (pypi-uri "flufl.testing" version))
23324 (sha256
23325 (base32
23326 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
23327 (build-system python-build-system)
23328 (native-inputs
23329 `(("python-nose2" ,python-nose2)))
23330 (home-page "https://gitlab.com/warsaw/flufl.testing")
23331 (synopsis "Collection of test tool plugins")
23332 (description
23333 "This package contains a small collection of test tool plugins for
23334 @code{nose2} and @code{flake8}.")
23335 (license license:asl2.0)))
23336
23337 (define-public python-devtools
23338 (package
23339 (name "python-devtools")
23340 (version "0.6")
23341 (source
23342 (origin
23343 (method git-fetch)
23344 (uri (git-reference
23345 (url "https://github.com/samuelcolvin/python-devtools")
23346 (commit (string-append "v" version))))
23347 (file-name (git-file-name name version))
23348 (sha256
23349 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
23350 (build-system python-build-system)
23351 (native-inputs
23352 `(("python-pytest" ,python-pytest)
23353 ("python-pytest-mock" ,python-pytest-mock)))
23354 (propagated-inputs
23355 `(("python-pygments" ,python-pygments)))
23356 (arguments
23357 `(#:phases (modify-phases %standard-phases
23358 (replace 'check
23359 (lambda _
23360 (invoke "pytest")
23361 #t)))))
23362 (home-page "https://github.com/samuelcolvin/python-devtools")
23363 (synopsis "Debug command and development tools")
23364 (description
23365 "This package provides a debug print command and other development tools.
23366 It adds a simple and readable way to print stuff during development.")
23367 (license license:expat)))
23368
23369 (define-public python-dateparser
23370 (package
23371 (name "python-dateparser")
23372 (version "0.7.6")
23373 (source
23374 (origin
23375 (method url-fetch)
23376 (uri (pypi-uri "dateparser" version))
23377 (sha256
23378 (base32
23379 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
23380 (build-system python-build-system)
23381 (propagated-inputs
23382 `(("python-dateutil" ,python-dateutil)
23383 ("python-pytz" ,python-pytz)
23384 ("python-regex" ,python-regex)
23385 ("python-ruamel.yaml" ,python-ruamel.yaml)
23386 ("python-tzlocal" ,python-tzlocal)))
23387 (native-inputs
23388 `(("python-mock" ,python-mock)
23389 ("python-parameterized" ,python-parameterized)
23390 ("tzdata" ,tzdata-for-tests)))
23391 (arguments
23392 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
23393 #:tests? #f
23394 #:phases
23395 (modify-phases %standard-phases
23396 (add-before 'check 'set-check-environment
23397 (lambda* (#:key inputs #:allow-other-keys)
23398 (setenv "TZ" "UTC")
23399 (setenv "TZDIR"
23400 (string-append (assoc-ref inputs "tzdata")
23401 "/share/zoneinfo"))
23402 #t)))))
23403 (home-page "https://github.com/scrapinghub/dateparser")
23404 (synopsis
23405 "Date parsing library designed to parse dates from HTML pages")
23406 (description
23407 "@code{python-dateparser} provides modules to easily parse localized
23408 dates in almost any string formats commonly found on web pages.")
23409 (license license:bsd-3)))
23410
23411 (define-public python-dparse
23412 (package
23413 (name "python-dparse")
23414 (version "0.5.1")
23415 (source
23416 (origin
23417 (method url-fetch)
23418 (uri (pypi-uri "dparse" version))
23419 (sha256
23420 (base32
23421 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
23422 (build-system python-build-system)
23423 (native-inputs
23424 `(("python-pytest" ,python-pytest)))
23425 (propagated-inputs
23426 `(("python-packaging" ,python-packaging)
23427 ("python-pyyaml" ,python-pyyaml)
23428 ("python-toml" ,python-toml)))
23429 (home-page "https://github.com/pyupio/dparse")
23430 (synopsis "Parser for Python dependency files")
23431 (description "This package provides a parser for Python dependency files.")
23432 (license license:expat)))
23433
23434 (define-public python-dpath
23435 (package
23436 (name "python-dpath")
23437 (version "2.0.1")
23438 (source
23439 (origin
23440 (method url-fetch)
23441 (uri (pypi-uri "dpath" version))
23442 (sha256
23443 (base32
23444 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
23445 (build-system python-build-system)
23446 (native-inputs
23447 `(("python-hypothesis" ,python-hypothesis)
23448 ("python-mock" ,python-mock)
23449 ("python-nose" ,python-nose)))
23450 (arguments
23451 '(#:phases
23452 (modify-phases %standard-phases
23453 (replace 'check
23454 (lambda* (#:key inputs outputs #:allow-other-keys)
23455 (add-installed-pythonpath inputs outputs)
23456 ;; This invokation is taken from tox.ini.
23457 (invoke "nosetests" "-d" "-v" "tests/"))))))
23458 (home-page "https://github.com/akesterson/dpath-python")
23459 (synopsis "Filesystem-like pathing and searching for dictionaries")
23460 (description
23461 "@code{python-dpath} is a library for accessing and searching
23462 dictionaries via /slashed/paths ala xpath.
23463
23464 Basically it lets you glob over a dictionary as if it were a filesystem. It
23465 allows you to specify globs (ala the bash eglob syntax, through some advanced
23466 fnmatch.fnmatch magic) to access dictionary elements, and provides some
23467 facility for filtering those results.")
23468 (license license:expat)))
23469
23470 (define-public python-safety
23471 (package
23472 (name "python-safety")
23473 (version "1.9.0")
23474 (source
23475 (origin
23476 (method url-fetch)
23477 (uri (pypi-uri "safety" version))
23478 (sha256
23479 (base32
23480 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
23481 (build-system python-build-system)
23482 (arguments
23483 `(#:phases
23484 (modify-phases %standard-phases
23485 (add-after 'unpack 'disable-tests
23486 (lambda _
23487 (substitute* "tests/test_safety.py"
23488 ;; requires network
23489 (("def test_check_live") "def _test_check_live"))
23490 #t)))))
23491 (propagated-inputs
23492 `(("python-click" ,python-click)
23493 ("python-dparse" ,python-dparse)
23494 ("python-packaging" ,python-packaging)
23495 ("python-requests" ,python-requests)))
23496 (home-page "https://github.com/pyupio/safety")
23497 (synopsis "Check installed dependencies for known vulnerabilities")
23498 (description "Safety checks installed dependencies for known vulnerabilities.
23499 By default it uses the open Python vulnerability database Safety DB.")
23500 (license license:expat)))
23501
23502 (define-public python-pypandoc
23503 (package
23504 (name "python-pypandoc")
23505 (version "1.5")
23506 (source
23507 (origin
23508 (method url-fetch)
23509 (uri (pypi-uri "pypandoc" version))
23510 (sha256
23511 (base32
23512 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
23513 (build-system python-build-system)
23514 (inputs
23515 `(("pandoc" ,pandoc)
23516 ("pandoc-citeproc" ,pandoc-citeproc)))
23517 (propagated-inputs
23518 `(("wheel" ,python-wheel)))
23519 (native-inputs
23520 `(("texlive" ,(texlive-union (list texlive-amsfonts
23521 texlive-fonts-ec
23522 texlive-latex-hyperref
23523 texlive-latex-oberdiek
23524 texlive-lm
23525 texlive-xcolor)))))
23526 (arguments
23527 `(#:phases
23528 (modify-phases %standard-phases
23529 (add-before 'check 'disable-tests
23530 (lambda _
23531 ;; Disable test requiring network access
23532 (substitute* "tests.py"
23533 (("test_basic_conversion_from_http_url")
23534 "skip_test_basic_conversion_from_http_url"))
23535 ;; Needed by texlive-union to generate fonts
23536 (setenv "HOME" "/tmp")
23537 #t)))))
23538 (home-page "https://github.com/bebraw/pypandoc")
23539 (synopsis "Python wrapper for pandoc")
23540 (description "pypandoc is a thin Python wrapper around pandoc
23541 and pandoc-citeproc.")
23542 (license license:expat)))
23543
23544 (define-public python-rnc2rng
23545 (package
23546 (name "python-rnc2rng")
23547 (version "2.6.4")
23548 (source
23549 (origin
23550 (method url-fetch)
23551 (uri (pypi-uri "rnc2rng" version))
23552 (sha256
23553 (base32
23554 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
23555 (build-system python-build-system)
23556 (propagated-inputs
23557 `(("python-rply" ,python-rply)))
23558 (arguments
23559 `(#:phases (modify-phases %standard-phases
23560 (replace 'check
23561 (lambda _
23562 (invoke "python" "test.py"))))))
23563 (home-page "https://github.com/djc/rnc2rng")
23564 (synopsis "Convert RELAX NG Compact to regular syntax")
23565 (description
23566 "This package provides the @command{rnc2rng} command-line tool as well as
23567 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
23568 equivalent schemata in the XML-based default RELAX NG syntax.")
23569 (license license:expat)))
23570
23571 (define-public python-telethon
23572 (package
23573 (name "python-telethon")
23574 (version "1.17.5")
23575 (source
23576 (origin
23577 (method git-fetch)
23578 (uri (git-reference
23579 (url "https://github.com/LonamiWebs/Telethon")
23580 (commit (string-append "v" version))))
23581 (file-name (git-file-name name version))
23582 (sha256
23583 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
23584 (build-system python-build-system)
23585 (arguments
23586 '(#:phases
23587 (modify-phases %standard-phases
23588 (replace 'check
23589 (lambda* (#:key tests? #:allow-other-keys)
23590 (when tests?
23591 (invoke "py.test" "-v"))
23592 #t)))))
23593 (propagated-inputs
23594 `(("python-rsa" ,python-rsa)
23595 ("python-pyaes" ,python-pyaes)))
23596 (native-inputs
23597 `(("python-pytest" ,python-pytest)
23598 ("python-pytest-asyncio" ,python-pytest-asyncio)
23599 ("python-pytest-trio" ,python-pytest-trio)))
23600 (home-page "https://docs.telethon.dev")
23601 (synopsis "Full-featured Telegram client library for Python 3")
23602 (description "This library is designed to make it easy to write Python
23603 programs that can interact with Telegram.")
23604 (license license:expat)))
23605
23606 (define-public python-citeproc-py
23607 (package
23608 (name "python-citeproc-py")
23609 (version "0.5.1")
23610 (source
23611 (origin
23612 (method url-fetch)
23613 (uri (pypi-uri "citeproc-py" version))
23614 (sha256
23615 (base32
23616 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
23617 (build-system python-build-system)
23618 (propagated-inputs
23619 `(("python-lxml" ,python-lxml)
23620 ("python-rnc2rng" ,python-rnc2rng)))
23621 (home-page
23622 "https://github.com/brechtm/citeproc-py")
23623 (synopsis "Citations and bibliography formatter")
23624 (description
23625 "Citeproc-py is a CSL processor for Python. It aims to implement the
23626 CSL 1.0.1 specification. citeproc-py can output styled citations and
23627 bibliographies in a number of different output formats. Currently supported
23628 are plain text, reStructuredText and HTML.")
23629 (license license:bsd-2)))
23630
23631 (define-public python-inform
23632 (package
23633 (name "python-inform")
23634 (version "1.23.0")
23635 (source
23636 (origin
23637 (method url-fetch)
23638 (uri (pypi-uri "inform" version))
23639 (sha256
23640 (base32
23641 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
23642 (build-system python-build-system)
23643 (arguments
23644 `(#:tests? #f)) ; PyPI tarball lacks tests
23645 (native-inputs
23646 `(("python-hypothesis" ,python-hypothesis)
23647 ("python-pytest-cov" ,python-pytest-cov)
23648 ("python-pytest-runner" ,python-pytest-runner)))
23649 (propagated-inputs
23650 `(("python-arrow" ,python-arrow)
23651 ("python-six" ,python-six)))
23652 (home-page "https://inform.readthedocs.io")
23653 (synopsis "Print & logging utilities for communicating with user")
23654 (description
23655 "Inform is designed to display messages from programs that are typically run from
23656 a console. It provides a collection of ‘print’ functions that allow you to simply and
23657 cleanly print different types of messages.")
23658 (license license:gpl3+)))
23659
23660 (define-public python-nestedtext
23661 (package
23662 (name "python-nestedtext")
23663 (version "1.0.0")
23664 (source
23665 (origin
23666 (method url-fetch)
23667 (uri (pypi-uri "nestedtext" version))
23668 (sha256
23669 (base32
23670 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
23671 (build-system python-build-system)
23672 (arguments
23673 `(#:tests? #f)) ; PyPI tarball lacks tests
23674 (propagated-inputs
23675 `(("python-inform" ,python-inform)))
23676 (home-page "https://nestedtext.org")
23677 (synopsis "Human readable and writable data interchange format")
23678 (description
23679 "NestedText is a file format for holding data that is to be entered, edited, or
23680 viewed by people. It allows data to be organized into a nested collection of
23681 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
23682 without the complexity and risk of YAML and without the syntatic clutter of JSON.
23683 NestedText is both simple and natural. Only a small number of concepts and rules must
23684 be kept in mind when creating it. It is easily created, modified, or viewed with
23685 a text editor and easily understood and used by both programmers and non-programmers.")
23686 (license license:expat))) ; MIT license
23687
23688 (define-public python-parallel
23689 (package
23690 (name "python-parallel")
23691 (version "1.6.4.4")
23692 (source
23693 (origin
23694 (method url-fetch)
23695 (uri (string-append
23696 "https://www.parallelpython.com/downloads/pp/pp-"
23697 version ".zip"))
23698 (sha256
23699 (base32
23700 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
23701 (native-inputs
23702 `(("unzip" ,unzip)))
23703 (build-system python-build-system)
23704 (arguments '(#:tests? #f)) ; No test suite.
23705 (home-page "https://www.parallelpython.com")
23706 (synopsis "Parallel and distributed programming for Python")
23707 (description "Parallel Python module (PP) provides an easy and efficient
23708 way to create parallel-enabled applications for SMP computers and clusters.
23709 PP module features cross-platform portability and dynamic load balancing.
23710 Thus applications written with PP will parallelize efficiently even on
23711 heterogeneous and multi-platform clusters (including clusters running other
23712 applications with variable CPU loads).")
23713 (license license:bsd-3)))
23714
23715 (define-public python2-parallel
23716 (package-with-python2 python-parallel))
23717
23718 (define-public python-djvulibre
23719 (package
23720 (name "python-djvulibre")
23721 (version "0.8.5")
23722 (source
23723 (origin
23724 (method url-fetch)
23725 (uri (pypi-uri "python-djvulibre" version))
23726 (sha256
23727 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
23728 (build-system python-build-system)
23729 (native-inputs
23730 `(("ghostscript" ,ghostscript)
23731 ("pkg-config" ,pkg-config)
23732 ("python-nose" ,python-nose)))
23733 (inputs
23734 `(("djvulibre" ,djvulibre)
23735 ("python-cython" ,python-cython)))
23736 (arguments
23737 `(#:phases
23738 (modify-phases %standard-phases
23739 (add-after 'unpack 'fix-tests
23740 (lambda _
23741 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23742 ;; doesn't make sense on GNU/Linux.
23743 (delete-file "djvu/dllpath.py")
23744 #t)))))
23745 (synopsis "Python bindings for DjVuLibre")
23746 (description "This is a set of Python bindings for the DjVuLibre library.")
23747 (home-page "https://jwilk.net/software/python-djvulibre")
23748 (license license:gpl2)))
23749
23750 (define-public python2-djvulibre
23751 (package-with-python2 python-djvulibre))
23752
23753 (define-public python-versioneer
23754 (package
23755 (name "python-versioneer")
23756 (version "0.19")
23757 (source
23758 (origin
23759 (method url-fetch)
23760 (uri (pypi-uri "versioneer" version))
23761 (sha256
23762 (base32
23763 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
23764 (build-system python-build-system)
23765 (home-page
23766 "https://github.com/python-versioneer/python-versioneer")
23767 (synopsis
23768 "Version-string management for VCS-controlled trees")
23769 (description
23770 "@code{versioneer} is a tool for managing a recorded version number in
23771 distutils-based python projects. The goal is to remove the tedious and
23772 error-prone \"update the embedded version string\" step from your release
23773 process.")
23774 (license license:public-domain)))
23775
23776 (define-public python2-gamera
23777 (package
23778 (name "python2-gamera")
23779 (version "3.4.4")
23780 (source
23781 (origin
23782 (method url-fetch)
23783 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
23784 "gamera-" version ".tar.gz"))
23785 (sha256
23786 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
23787 (modules '((guix build utils)))
23788 (snippet
23789 '(begin
23790 ;; Remove bundled libraries.
23791 (for-each delete-file-recursively
23792 '("src/libpng-1.2.5"
23793 "src/libtiff"
23794 "src/zlib-1.2.8"))))))
23795 (build-system python-build-system)
23796 (inputs
23797 `(("libpng" ,libpng)
23798 ("libtiff" ,libtiff)
23799 ("python2-wxpython" ,python2-wxpython)
23800 ("zlib" ,zlib)))
23801 (arguments
23802 `(#:python ,python-2))
23803 (synopsis "Framework for building document analysis applications")
23804 (description
23805 "Gamera is a toolkit for building document image recognition systems.")
23806 (home-page "https://gamera.informatik.hsnr.de/")
23807 (license license:gpl2+)))
23808
23809 (define-public python-contextvars
23810 (package
23811 (name "python-contextvars")
23812 (version "2.4")
23813 (source
23814 (origin
23815 (method url-fetch)
23816 (uri (pypi-uri "contextvars" version))
23817 (sha256
23818 (base32
23819 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
23820 (build-system python-build-system)
23821 (propagated-inputs
23822 `(("python-immutables" ,python-immutables)))
23823 (home-page
23824 "https://github.com/MagicStack/contextvars")
23825 (synopsis "PEP 567 Backport")
23826 (description "This package implements a backport of Python 3.7
23827 @code{contextvars} module (see PEP 567) for Python 3.6.")
23828 (license license:asl2.0)))
23829
23830 (define-public python-aiofiles
23831 (package
23832 (name "python-aiofiles")
23833 (version "0.6.0")
23834 (source
23835 (origin
23836 (method url-fetch)
23837 (uri (pypi-uri "aiofiles" version))
23838 (sha256
23839 (base32
23840 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
23841 (build-system python-build-system)
23842 (home-page "https://github.com/Tinche/aiofiles")
23843 (synopsis "File support for @code{asyncio}")
23844 (description "@code{python-aiofiles} is a library for handling local
23845 disk files in asyncio applications.")
23846 (license license:asl2.0)))
23847
23848 (define-public python-pyre-extensions
23849 (package
23850 (name "python-pyre-extensions")
23851 (version "0.0.18")
23852 (source
23853 (origin
23854 (method url-fetch)
23855 (uri (pypi-uri "pyre-extensions" version))
23856 (sha256
23857 (base32
23858 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
23859 (build-system python-build-system)
23860 (propagated-inputs
23861 `(("python-typing-extensions"
23862 ,python-typing-extensions)
23863 ("python-typing-inspect" ,python-typing-inspect)))
23864 (home-page "https://pyre-check.org")
23865 (synopsis
23866 "Type system extensions for use with @code{python-pyre}")
23867 (description
23868 "@code{python-pyre-extensions} defines extensions to the standard
23869 @code{typing} module that are supported by the Pyre typechecker.")
23870 (license license:expat)))
23871
23872 (define-public python-dataclasses
23873 (package
23874 (name "python-dataclasses")
23875 (version "0.7")
23876 (source
23877 (origin
23878 (method url-fetch)
23879 (uri (pypi-uri "dataclasses" version))
23880 (sha256
23881 (base32
23882 "1rh8111fbws2vxyf2qy2zw3x6p6cq1jfz8pf904gig5qwg56sjj9"))))
23883 (build-system python-build-system)
23884 (home-page
23885 "https://github.com/ericvsmith/dataclasses")
23886 (synopsis
23887 "Backport of the @code{dataclasses} module for Python 3.6")
23888 (description
23889 "This is an implementation of PEP 557, Data Classes. It is a
23890 backport of the @code{dataclasses} module for Python 3.6.")
23891 (license license:asl2.0)))
23892
23893 (define-public python-pywatchman
23894 (package
23895 (name "python-pywatchman")
23896 (version "1.4.1")
23897 (source
23898 (origin
23899 (method url-fetch)
23900 (uri (pypi-uri "pywatchman" version))
23901 (sha256
23902 (base32
23903 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
23904 (build-system python-build-system)
23905 (arguments
23906 `(#:tests? #f)) ;there are none
23907 (home-page
23908 "https://facebook.github.io/watchman/")
23909 (synopsis "Watchman client for python")
23910 (description "@code{python-pywatchman} is a library to connect and
23911 query Watchman to discover file changes.")
23912 (license license:bsd-3)))
23913
23914 (define-public python-helpdev
23915 (package
23916 (name "python-helpdev")
23917 (version "0.7.1")
23918 (source
23919 (origin
23920 (method url-fetch)
23921 (uri (pypi-uri "helpdev" version))
23922 (sha256
23923 (base32
23924 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
23925 (build-system python-build-system)
23926 (arguments
23927 `(#:phases
23928 (modify-phases %standard-phases
23929 (replace 'check
23930 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
23931 (when tests?
23932 (add-installed-pythonpath inputs outputs)
23933 (invoke "pytest" "tests"))
23934 #t)))))
23935 (propagated-inputs
23936 `(("python-importlib-metadata" ,python-importlib-metadata)))
23937 (native-inputs
23938 `(("python-pytest" ,python-pytest)))
23939 (home-page "https://gitlab.com/dpizetta/helpdev")
23940 (synopsis
23941 "Extract information about the Python environment easily")
23942 (description
23943 "Helpdev is a library to easily extract information about the Python
23944 environment.")
23945 (license license:expat)))
23946
23947 (define-public python-qdarkstyle
23948 (package
23949 (name "python-qdarkstyle")
23950 (version "2.8.1")
23951 (source
23952 (origin
23953 (method url-fetch)
23954 (uri (pypi-uri "QDarkStyle" version))
23955 (sha256
23956 (base32
23957 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
23958 (build-system python-build-system)
23959 (arguments
23960 `(;; Fails unable to detect valid Qt bindings even when
23961 ;; added as native-inputs.
23962 #:tests? #f))
23963 (propagated-inputs
23964 `(("python-helpdev" ,python-helpdev)
23965 ("python-qtpy" ,python-qtpy)))
23966 (home-page
23967 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
23968 (synopsis
23969 "Complete dark stylesheet for Python and Qt applications")
23970 (description "QDarkStyle is the most complete dark stylesheet for Python and
23971 Qt applications.")
23972 (license license:expat)))
23973
23974 (define-public python-bitstring
23975 (package
23976 (name "python-bitstring")
23977 (version "3.1.7")
23978 (source
23979 (origin
23980 (method url-fetch)
23981 (uri (pypi-uri "bitstring" version))
23982 (sha256
23983 (base32
23984 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
23985 (build-system python-build-system)
23986 (arguments
23987 `(#:phases
23988 (modify-phases %standard-phases
23989 (replace 'check
23990 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
23991 (when tests?
23992 (add-installed-pythonpath inputs outputs)
23993 (with-directory-excursion "test"
23994 (invoke "pytest")))
23995 #t)))))
23996 (native-inputs
23997 `(("python-pytest" ,python-pytest)))
23998 (home-page "https://github.com/scott-griffiths/bitstring")
23999 (synopsis
24000 "Simple construction, analysis and modification of binary data")
24001 (description
24002 "Bitstring is a library for simple construction, analysis and modification
24003 of binary data.")
24004 (license license:expat)))
24005
24006 (define-public python-confuse
24007 (package
24008 (name "python-confuse")
24009 (version "1.4.0")
24010 (source
24011 (origin
24012 (method url-fetch)
24013 (uri (pypi-uri "confuse" version))
24014 (sha256
24015 (base32
24016 "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j"))))
24017 (build-system python-build-system)
24018 (propagated-inputs
24019 `(("python-pathlib" ,python-pathlib)
24020 ("python-pyyaml" ,python-pyyaml)))
24021 (home-page "https://github.com/beetbox/confuse")
24022 (synopsis "Painless YAML configuration.")
24023 (description "Confuse is a configuration library for Python that uses
24024 YAML. It takes care of defaults, overrides, type checking, command-line
24025 integration, human-readable errors, and standard OS-specific locations.")
24026 (license license:expat)))
24027
24028 (define-public python-reflink
24029 (package
24030 (name "python-reflink")
24031 (version "0.2.1")
24032 (source
24033 (origin
24034 (method url-fetch)
24035 (uri (pypi-uri "reflink" version))
24036 (sha256
24037 (base32
24038 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
24039 (build-system python-build-system)
24040 (arguments
24041 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
24042 (propagated-inputs
24043 `(("python-cffi" ,python-cffi)))
24044 (native-inputs
24045 `(("python-pytest" ,python-pytest)
24046 ("python-pytest-runner" ,python-pytest-runner)))
24047 (home-page "https://gitlab.com/rubdos/pyreflink")
24048 (synopsis "Python wrapper around reflink system call")
24049 (description
24050 "Python reflink wraps around platform specific @code{reflink}
24051 implementations.")
24052 (license license:expat)))
24053
24054 (define-public python-pivy
24055 (package
24056 (name "python-pivy")
24057 (version "0.6.5")
24058 (source
24059 (origin
24060 (method git-fetch)
24061 (uri (git-reference
24062 (url "https://github.com/coin3d/pivy")
24063 (commit version)))
24064 (file-name (git-file-name name version))
24065 (sha256
24066 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
24067 (build-system python-build-system)
24068 (arguments
24069 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
24070 #:tests? #f
24071 #:phases
24072 (modify-phases %standard-phases
24073 (add-after 'unpack 'patch-cmake-include-dirs
24074 (lambda _
24075 ;; Patch buildsystem to respect Coin3D include directory
24076 (substitute* "CMakeLists.txt"
24077 (("\\$\\{SoQt_INCLUDE_DIRS}")
24078 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
24079 #t)))))
24080 (native-inputs
24081 `(("cmake" ,cmake)
24082 ("swig" ,swig)))
24083 (inputs
24084 `(("python-wrapper" ,python-wrapper)
24085 ("qtbase" ,qtbase)
24086 ("libxi" ,libxi)
24087 ("libice" ,libice)
24088 ("soqt" ,soqt)
24089 ("glew" ,glew)
24090 ("coin3D" ,coin3D-4)))
24091 (home-page "https://github.com/coin3d/pivy")
24092 (synopsis "Python bindings to Coin3D")
24093 (description
24094 "Pivy provides python bindings for Coin, a 3D graphics library with an
24095 Application Programming Interface based on the Open Inventor 2.1 API.")
24096 (license license:isc)))
24097
24098 (define-public python-crayons
24099 (package
24100 (name "python-crayons")
24101 (version "0.4.0")
24102 (source
24103 (origin
24104 (method url-fetch)
24105 (uri (pypi-uri "crayons" version))
24106 (sha256
24107 (base32
24108 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
24109 (build-system python-build-system)
24110 (propagated-inputs
24111 `(("python-colorama" ,python-colorama)))
24112 (home-page "https://github.com/MasterOdin/crayons")
24113 (synopsis "TextUI colors for Python")
24114 (description "This package gives you colored strings for the terminal.
24115 Crayons automatically wraps a given string in the foreground color and
24116 restores the original state after the string is printed.")
24117 (license license:expat)))
24118
24119 (define-public python-sane
24120 (package
24121 (name "python-sane")
24122 (version "2.9.1")
24123 (source
24124 (origin
24125 (method url-fetch)
24126 (uri (pypi-uri name version))
24127 (sha256
24128 (base32
24129 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
24130 (build-system python-build-system)
24131 (native-inputs
24132 `(("python-pytest" ,python-pytest)))
24133 (inputs
24134 `(("sane-backends" ,sane-backends)))
24135 (home-page "https://github.com/python-pillow/Sane")
24136 (synopsis "Python interface to the SANE scanner")
24137 (description "This package provides Python interface to the SANE scanner
24138 and frame grabber interface.")
24139 (license (license:non-copyleft
24140 ;; Yet another variant of the X/MIT license.
24141 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
24142
24143 (define-public python-screenkey
24144 (package
24145 (name "python-screenkey")
24146 (version "1.4")
24147 (source
24148 (origin
24149 (method git-fetch)
24150 (uri (git-reference
24151 (url "https://gitlab.com/screenkey/screenkey")
24152 (commit (string-append "v" version))))
24153 (file-name (git-file-name name version))
24154 (sha256
24155 (base32
24156 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
24157 (build-system python-build-system)
24158 (arguments
24159 `(#:phases
24160 (modify-phases %standard-phases
24161 (add-after 'unpack 'fix-dlopen-paths
24162 (lambda* (#:key inputs outputs #:allow-other-keys)
24163 (let* ((x11 (assoc-ref inputs "libx11"))
24164 (xtst (assoc-ref inputs "libxtst")))
24165 (substitute* "Screenkey/xlib.py"
24166 (("libX11.so.6")
24167 (string-append x11 "/lib/libX11.so.6")))
24168 (substitute* "Screenkey/xlib.py"
24169 (("libXtst.so.6")
24170 (string-append xtst "/lib/libXtst.so.6")))
24171 #t)))
24172 (add-after 'install 'wrap-screenkey
24173 (lambda* (#:key outputs #:allow-other-keys)
24174 (wrap-program
24175 (string-append (assoc-ref outputs "out") "/bin/screenkey")
24176 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
24177 `("GI_TYPELIB_PATH"
24178 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
24179 #t)))))
24180 (inputs
24181 `(("python-distutils-extra" ,python-distutils-extra)
24182 ("python-tokenize-rt" ,python-tokenize-rt)
24183 ("libx11" ,libx11)
24184 ("libxtst" ,libxtst)
24185 ("gtk+" ,gtk+)
24186 ("python-pygobject" ,python-pygobject)
24187 ("python-pycairo" ,python-pycairo)
24188 ("python-setuptools-git" ,python-setuptools-git)
24189 ("python-babel" ,python-babel)))
24190 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
24191 (synopsis
24192 "Screencast tool to display pressed keys")
24193 (description
24194 "A screencast tool to display your keys inspired by Screenflick.")
24195 (license license:gpl3+)))
24196
24197 (define-public python-jinja2-cli
24198 (package
24199 (name "python-jinja2-cli")
24200 (version "0.7.0")
24201 (source
24202 (origin
24203 (method url-fetch)
24204 (uri (pypi-uri "jinja2-cli" version))
24205 (sha256
24206 (base32
24207 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
24208 (build-system python-build-system)
24209 (propagated-inputs
24210 `(("python-jinja2" ,python-jinja2)))
24211 (native-inputs
24212 `(("python-flake8" ,python-flake8)
24213 ("python-jinja2" ,python-jinja2)
24214 ("python-pytest" ,python-pytest)))
24215 (home-page "https://github.com/mattrobenolt/jinja2-cli")
24216 (synopsis "Command-line interface to Jinja2")
24217 (description
24218 "This package provides a command-line interface (CLI) to the Jinja2
24219 template engine.")
24220 (license license:bsd-3)))
24221
24222 (define-public python-readability
24223 (package
24224 (name "python-readability")
24225 (version "0.3.1")
24226 (source
24227 (origin
24228 (method url-fetch)
24229 (uri (pypi-uri "readability" version))
24230 (sha256
24231 (base32
24232 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
24233 (build-system python-build-system)
24234 (home-page
24235 "https://github.com/andreasvc/readability/")
24236 (synopsis
24237 "Measure the readability of a given text using surface
24238 characteristics")
24239 (description
24240 "This package provides a Python library that is an implementation of
24241 traditional readability measures based on simple surface
24242 characteristics. These measures are basically linear regressions based on the
24243 number of words, syllables, and sentences.")
24244 (license license:asl2.0)))
24245
24246 (define-public python-listparser
24247 (package
24248 (name "python-listparser")
24249 (version "0.18")
24250 (source
24251 (origin
24252 (method url-fetch)
24253 (uri (pypi-uri "listparser" version))
24254 (sha256
24255 (base32
24256 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
24257 (build-system python-build-system)
24258 (home-page
24259 "https://github.com/kurtmckee/listparser")
24260 (synopsis
24261 "Parse subscription lists in Python")
24262 (description
24263 "This package provides a Python library that can parse OPML, FOAF, and
24264 iGoogle subscription lists.")
24265 (license license:expat)))