gnu: emacs-consult: Fix grammar.
[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, 2021 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, 2021 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, 2021 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 jupyter)
155 #:use-module (gnu packages kerberos)
156 #:use-module (gnu packages libevent)
157 #:use-module (gnu packages libffi)
158 #:use-module (gnu packages libidn)
159 #:use-module (gnu packages linux)
160 #:use-module (gnu packages llvm)
161 #:use-module (gnu packages man)
162 #:use-module (gnu packages markup)
163 #:use-module (gnu packages maths)
164 #:use-module (gnu packages monitoring)
165 #:use-module (gnu packages multiprecision)
166 #:use-module (gnu packages networking)
167 #:use-module (gnu packages ncurses)
168 #:use-module (gnu packages openstack)
169 #:use-module (gnu packages pcre)
170 #:use-module (gnu packages pdf)
171 #:use-module (gnu packages perl)
172 #:use-module (gnu packages photo)
173 #:use-module (gnu packages pkg-config)
174 #:use-module (gnu packages python)
175 #:use-module (gnu packages python-build)
176 #:use-module (gnu packages python-check)
177 #:use-module (gnu packages python-compression)
178 #:use-module (gnu packages python-crypto)
179 #:use-module (gnu packages python-science)
180 #:use-module (gnu packages python-web)
181 #:use-module (gnu packages qt)
182 #:use-module (gnu packages rdf)
183 #:use-module (gnu packages readline)
184 #:use-module (gnu packages sdl)
185 #:use-module (gnu packages search)
186 #:use-module (gnu packages scanner)
187 #:use-module (gnu packages shells)
188 #:use-module (gnu packages sphinx)
189 #:use-module (gnu packages ssh)
190 #:use-module (gnu packages swig)
191 #:use-module (gnu packages terminals)
192 #:use-module (gnu packages tex)
193 #:use-module (gnu packages texinfo)
194 #:use-module (gnu packages textutils)
195 #:use-module (gnu packages time)
196 #:use-module (gnu packages tls)
197 #:use-module (gnu packages version-control)
198 #:use-module (gnu packages video)
199 #:use-module (gnu packages web)
200 #:use-module (gnu packages wxwidgets)
201 #:use-module (gnu packages base)
202 #:use-module (gnu packages xml)
203 #:use-module (gnu packages xorg)
204 #:use-module (gnu packages xdisorg)
205 #:use-module (gnu packages tcl)
206 #:use-module (gnu packages bdw-gc)
207 #:use-module (gnu packages serialization)
208 #:use-module (guix packages)
209 #:use-module (guix download)
210 #:use-module (guix git-download)
211 #:use-module (guix hg-download)
212 #:use-module (guix utils)
213 #:use-module (guix build-system gnu)
214 #:use-module (guix build-system cmake)
215 #:use-module (guix build-system python)
216 #:use-module (guix build-system trivial)
217 #:use-module (srfi srfi-1)
218 #:use-module (srfi srfi-26))
219
220 (define-public python-slixmpp
221 (package
222 (name "python-slixmpp")
223 (version "1.5.2")
224 (source
225 (origin
226 (method git-fetch)
227 (uri
228 (git-reference
229 (url "https://lab.louiz.org/poezio/slixmpp.git")
230 (commit
231 (string-append "slix-" version))))
232 (file-name
233 (git-file-name name version))
234 (sha256
235 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
236 (build-system python-build-system)
237 (arguments
238 `(#:phases
239 (modify-phases %standard-phases
240 (add-after 'unpack 'patch
241 (lambda _
242 (substitute* "setup.py"
243 (("'CC', 'cc'")
244 "'CC', 'gcc'"))
245 #t)))))
246 (native-inputs
247 `(("cython" ,python-cython)
248 ("gnupg" ,gnupg)
249 ("pkg-config" ,pkg-config)))
250 (propagated-inputs
251 `(("python-aiodns" ,python-aiodns)
252 ("python-aiohttp" ,python-aiohttp)
253 ("python-pyasn1" ,python-pyasn1)
254 ("python-pyasn1-modules" ,python-pyasn1-modules)))
255 (inputs
256 `(("libidn" ,libidn)
257 ("python" ,python))) ; We are building a Python extension.
258 (synopsis "XMPP library without threads")
259 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
260 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
261 socket handling, the timers, the events dispatching) in order to remove all
262 threads.")
263 (home-page "https://lab.louiz.org/poezio/slixmpp")
264 (license license:expat)))
265
266 (define-public python-tenacity
267 (package
268 (name "python-tenacity")
269 (version "6.1.0")
270 (source (origin
271 (method url-fetch)
272 (uri (pypi-uri "tenacity" version))
273 (sha256
274 (base32
275 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
276 (build-system python-build-system)
277 (native-inputs
278 `(("python-setuptools-scm" ,python-setuptools-scm)
279 ("python-sphinx" ,python-sphinx)
280 ("python-tornado" ,python-tornado)
281 ("python-pytest" ,python-pytest)))
282 (propagated-inputs
283 `(("python-six" ,python-six)))
284 (arguments
285 `(#:phases (modify-phases %standard-phases
286 (replace 'check
287 (lambda _
288 (invoke "pytest")
289 #t)))))
290 (home-page "https://github.com/jd/tenacity")
291 (synopsis "Retrying library for python")
292 (description "Tenacity is a general-purpose python library to simplify the
293 task of adding retry behavior to just about anything.")
294 (license license:asl2.0)))
295
296 (define-public python-pytelegrambotapi
297 (package
298 (name "python-pytelegrambotapi")
299 (version "3.7.4")
300 (source
301 (origin
302 (method git-fetch)
303 (uri (git-reference
304 (url "https://github.com/eternnoir/pyTelegramBotAPI")
305 (commit version)))
306 (file-name (git-file-name name version))
307 (sha256
308 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
309 (build-system python-build-system)
310 (arguments
311 `(#:phases
312 (modify-phases %standard-phases
313 (replace 'check
314 (lambda* (#:key tests? #:allow-other-keys)
315 (when tests?
316 (with-directory-excursion "tests"
317 (invoke "py.test")))
318 #t)))))
319 (propagated-inputs
320 `(("python-requests" ,python-requests)))
321 (native-inputs
322 `(("python-pytest" ,python-pytest)))
323 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
324 (synopsis "Python Telegram bot api")
325 (description "This package provides a simple, but extensible Python
326 implementation for the Telegram Bot API.")
327 (license license:gpl2)))
328
329 (define-public python-colorlog
330 (package
331 (name "python-colorlog")
332 (version "4.1.0")
333 (source (origin
334 (method url-fetch)
335 (uri (pypi-uri "colorlog" version))
336 (sha256
337 (base32
338 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
339 (build-system python-build-system)
340 (native-inputs
341 `(("python-pytest" ,python-pytest)))
342 (arguments
343 `(#:phases (modify-phases %standard-phases
344 (replace 'check
345 (lambda _
346 ;; Extend PYTHONPATH so the built package will be found.
347 (setenv "PYTHONPATH"
348 (string-append (getcwd) "/build/lib:"
349 (getenv "PYTHONPATH")))
350 (invoke "pytest" "-p" "no:logging")
351 #t)))))
352 (home-page "https://github.com/borntyping/python-colorlog")
353 (synopsis "Log formatting with colors for python")
354 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
355 with Python's logging module that outputs records using terminal colors.")
356 (license license:expat)))
357
358 (define-public python-pyprind
359 (package
360 (name "python-pyprind")
361 (version "2.11.2")
362 (source (origin
363 (method url-fetch)
364 (uri (pypi-uri "PyPrind" version))
365 (sha256
366 (base32
367 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
368 (build-system python-build-system)
369 (propagated-inputs
370 `(("python-psutil" ,python-psutil)))
371 (home-page "https://github.com/rasbt/pyprind")
372 (synopsis "Python Progress Bar and Percent Indicator Utility")
373 (description "The PyPrind (Python Progress Indicator) module provides a
374 progress bar and a percentage indicator object that let you track the progress
375 of a loop structure or other iterative computation.")
376 (license license:bsd-3)))
377
378 (define-public python-gphoto2
379 (package
380 (name "python-gphoto2")
381 (version "2.2.1")
382 (source (origin
383 (method url-fetch)
384 (uri (pypi-uri "gphoto2" version))
385 (sha256
386 (base32
387 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
388 (build-system python-build-system)
389 (native-inputs
390 `(("pkg-config" ,pkg-config)))
391 (inputs
392 `(("libgphoto2" ,libgphoto2)))
393 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
394 (synopsis "Python interface to libgphoto2")
395 (description "@code{python-gphoto2} is a comprehensive Python interface
396 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
397 automatically generate the interface code.")
398 (license license:gpl3+)))
399
400 (define-public python-colour
401 (package
402 (name "python-colour")
403 (version "0.1.5")
404 (source (origin
405 (method url-fetch)
406 (uri (pypi-uri "colour" version))
407 (sha256
408 (base32
409 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
410 (build-system python-build-system)
411 (native-inputs
412 `(("python-d2to1" ,python-d2to1)))
413 (home-page "https://github.com/vaab/colour")
414 (synopsis "Convert and manipulate various color representations")
415 (description "Pythonic way to manipulate color representations (HSL, RVB,
416 web, X11, ...).")
417 (license license:expat)))
418
419 (define-public python-d2to1
420 (package
421 (name "python-d2to1")
422 (version "0.2.12.post1")
423 (source (origin
424 (method url-fetch)
425 (uri (pypi-uri "d2to1" version))
426 (sha256
427 (base32
428 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
429 (build-system python-build-system)
430 (native-inputs
431 `(("python-nose" ,python-nose)))
432 (home-page "https://github.com/embray/d2to1")
433 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
434 in python")
435 (description "The python package d2to1 (the d is for distutils) allows
436 using distutils2-like setup.cfg files for a package's metadata with a
437 distribute/setuptools setup.py script.")
438 (license license:bsd-2)))
439
440 (define-public python-rawkit
441 (package
442 (name "python-rawkit")
443 (version "0.6.0")
444 (source (origin
445 (method url-fetch)
446 (uri (pypi-uri "rawkit" version))
447 (sha256
448 (base32
449 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
450 (build-system python-build-system)
451 (native-inputs
452 `(("python-pytest" ,python-pytest)
453 ("python-mock" ,python-mock)))
454 (inputs
455 `(("libraw" ,libraw)))
456 (home-page "https://rawkit.readthedocs.io")
457 (synopsis "Ctypes-based LibRaw binding for Python")
458 (description "The rawkit package provides two modules: rawkit and libraw.
459 The rawkit module provides a high-level Pythonic interface for developing raw
460 photos, while the libraw module provides a CTypes based interface for
461 interacting with the low-level LibRaw C APIs.")
462 (license license:expat)))
463
464 (define-public python-easygui
465 (package
466 (name "python-easygui")
467 (version "0.98.1")
468 (source (origin
469 (method url-fetch)
470 (uri (pypi-uri "easygui" version))
471 (sha256
472 (base32
473 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
474 (build-system python-build-system)
475 (propagated-inputs
476 `(("python-tkinter" ,python "tk")))
477 (home-page "https://github.com/robertlugg/easygui")
478 (synopsis "GUI programming module for Python")
479 (description "EasyGUI is a module for very simple, very easy GUI
480 programming in Python. EasyGUI is different from other GUI generators in that
481 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
482 simple function calls.")
483 (license license:bsd-3)))
484
485 (define-public python-pymd4c
486 (package
487 (name "python-pymd4c")
488 (version "0.4.6.0b1")
489 (source
490 (origin
491 (method url-fetch)
492 (uri (pypi-uri "pymd4c" version))
493 (sha256
494 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
495 (build-system python-build-system)
496 (inputs
497 `(("md4c" ,md4c)))
498 (native-inputs
499 `(("python-flake8" ,python-flake8)
500 ("python-pkgconfig" ,python-pkgconfig)
501 ("pkg-config" ,pkg-config)))
502 (home-page "https://github.com/dominickpastore/pymd4c")
503 (synopsis "Python bindings for MD4C")
504 (description
505 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
506 to CommonMark.")
507 (license license:expat)))
508
509 (define-public python-pymediainfo
510 (package
511 (name "python-pymediainfo")
512 (version "4.1")
513 (source
514 (origin
515 (method url-fetch)
516 (uri (pypi-uri "pymediainfo" version))
517 (sha256
518 (base32
519 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
520 (build-system python-build-system)
521 (native-inputs
522 `(("python-setuptools-scm" ,python-setuptools-scm)
523 ("python-pytest" ,python-pytest)))
524 (inputs
525 `(("libmediainfo" ,libmediainfo)))
526 (arguments
527 `(#:phases
528 (modify-phases %standard-phases
529 (add-after 'unpack 'patch-libmediainfo
530 (lambda _
531 (substitute* "pymediainfo/__init__.py"
532 (("libmediainfo.so.0")
533 (string-append (assoc-ref %build-inputs "libmediainfo")
534 "/lib/libmediainfo.so.0")))
535 #t))
536 (replace 'check
537 (lambda _
538 ;; Extend PYTHONPATH so the built package will be found.
539 (setenv "PYTHONPATH"
540 (string-append (getcwd) "/build/lib:"
541 (getenv "PYTHONPATH")))
542 ;; Skip the only failing test "test_parse_url"
543 (invoke "pytest" "-vv" "-k" "not test_parse_url")
544 #t)))))
545 (home-page
546 "https://github.com/sbraz/pymediainfo")
547 (synopsis
548 "Python wrapper for the mediainfo library")
549 (description
550 "Python wrapper for the mediainfo library to access the technical and tag
551 data for video and audio files.")
552 (license license:expat)))
553
554 (define-public python-psutil
555 (package
556 (name "python-psutil")
557 (version "5.8.0")
558 (source
559 (origin
560 (method url-fetch)
561 (uri (pypi-uri "psutil" version))
562 (sha256
563 (base32 "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c"))))
564 (build-system python-build-system)
565 (arguments
566 ;; FIXME: some tests do not return and time out. Some tests fail because
567 ;; some processes survive kill().
568 '(#:tests? #f))
569 (home-page "https://github.com/giampaolo/psutil")
570 (synopsis "Library for retrieving information on running processes")
571 (description
572 "@code{psutil} (Python system and process utilities) is a library for
573 retrieving information on running processes and system utilization (CPU,
574 memory, disks, network) in Python. It is useful mainly for system monitoring,
575 profiling and limiting process resources and management of running processes.
576 It implements many functionalities offered by command line tools such as: ps,
577 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
578 iotop, uptime, pidof, tty, taskset, pmap.")
579 (properties `((python2-variant . ,(delay python2-psutil))))
580 (license license:bsd-3)))
581
582 (define-public python2-psutil
583 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
584 (package/inherit base
585 (propagated-inputs
586 `(("python2-enum34" ,python2-enum34) ;optional
587 ,@(package-propagated-inputs base))))))
588
589 (define-public python-shapely
590 (package
591 (name "python-shapely")
592 (version "1.7.1")
593 (source
594 (origin
595 (method url-fetch)
596 (uri (pypi-uri "Shapely" version))
597 (sha256
598 (base32
599 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
600 (modules '((guix build utils)))
601 (snippet
602 '(begin
603 (delete-file "shapely/speedups/_speedups.c")
604 (delete-file "shapely/vectorized/_vectorized.c")
605 #t))))
606 (build-system python-build-system)
607 (native-inputs
608 `(("python-cython" ,python-cython)
609 ("python-matplotlib" ,python-matplotlib)
610 ("python-pytest" ,python-pytest)
611 ("python-pytest-cov" ,python-pytest-cov)))
612 (inputs
613 `(("geos" ,geos)))
614 (propagated-inputs
615 `(("python-numpy" ,python-numpy)))
616 (arguments
617 `(#:phases
618 (modify-phases %standard-phases
619 (add-after 'unpack 'patch-geos-path
620 (lambda* (#:key inputs #:allow-other-keys)
621 (let ((geos (assoc-ref inputs "geos"))
622 (glibc (assoc-ref inputs ,(if (%current-target-system)
623 "cross-libc" "libc"))))
624 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
625 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
626 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
627 geos "/lib/libgeos_c.so'])"))
628 (("free = load_dll\\('c'\\)\\.free")
629 (string-append "free = load_dll('c', fallbacks=['"
630 glibc "/lib/libc.so.6']).free"))
631 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
632 (string-append "free = load_dll('c', fallbacks=['"
633 glibc "/lib/libc.so.6']).free"))))
634 #t)))))
635 (home-page "https://github.com/Toblerity/Shapely")
636 (synopsis "Library for the manipulation and analysis of geometric objects")
637 (description "Shapely is a Python package for manipulation and analysis of
638 planar geometric objects. It is based on the @code{GEOS} library.")
639 (license license:bsd-3)))
640
641 (define-public python-shortuuid
642 (package
643 (name "python-shortuuid")
644 (version "0.5.0")
645 (source
646 (origin
647 (method url-fetch)
648 (uri (pypi-uri "shortuuid" version))
649 (sha256
650 (base32
651 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
652 (build-system python-build-system)
653 (native-inputs
654 `(("python-pep8" ,python-pep8)))
655 (home-page "https://github.com/skorokithakis/shortuuid")
656 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
657 (description
658 "@code{shortuuid} is a Python library for generating concise, unambiguous
659 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
660 module and then similar looking characters are removed.")
661 (license license:bsd-3)))
662
663 (define-public python-logwrap
664 (package
665 (name "python-logwrap")
666 (version "8.2.0.post0")
667 (source
668 (origin
669 (method url-fetch)
670 (uri (pypi-uri "logwrap" version))
671 (sha256
672 (base32
673 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
674 (build-system python-build-system)
675 (arguments
676 `(#:tests? #f ; Tests not included in pypi release.
677 #:phases
678 (modify-phases %standard-phases
679 (replace 'check
680 (lambda* (#:key tests? #:allow-other-keys)
681 (when tests?
682 (invoke "pytest"))
683 #t)))))
684 (native-inputs
685 `(("python-cython" ,python-cython)
686 ("python-pytest" ,python-pytest)
687 ("python-setuptools-scm" ,python-setuptools-scm)
688 ("python-toml" ,python-toml)
689 ("python-wheel" ,python-wheel)))
690 (home-page "https://github.com/python-useful-helpers/logwrap")
691 (synopsis "Decorator for logging function arguments")
692 (description "This package provides a decorator to log function arguments
693 and function call return values in a human-readable way.")
694 (license license:asl2.0)))
695
696 (define-public python2-shapely
697 (package-with-python2 python-shapely))
698
699 (define-public python-clyent
700 (package
701 (name "python-clyent")
702 (version "1.2.1")
703 (source
704 (origin
705 (method url-fetch)
706 (uri (pypi-uri "clyent" version))
707 (sha256
708 (base32
709 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
710 (build-system python-build-system)
711 (native-inputs
712 `(("python-mock" ,python-mock)))
713 (home-page "https://github.com/Anaconda-Platform/clyent")
714 (synopsis "Command line client library")
715 (description "Clyent is a Python command line utility library. It is used
716 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
717 (license license:bsd-3)))
718
719 (define-public python2-clyent
720 (package-with-python2 python-clyent))
721
722 (define-public python-babel
723 (package
724 (name "python-babel")
725 (version "2.9.0")
726 (source
727 (origin
728 (method url-fetch)
729 (uri (pypi-uri "Babel" version))
730 (sha256
731 (base32
732 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
733 (build-system python-build-system)
734 (native-inputs
735 `(("python-freezegun" ,python-freezegun)
736 ("python-pytest" ,python-pytest)))
737 (propagated-inputs
738 `(("python-pytz" ,python-pytz)))
739 (arguments
740 `(#:phases (modify-phases %standard-phases
741 (replace 'check
742 (lambda _
743 (invoke "pytest" "-vv"))))))
744 (home-page "http://babel.pocoo.org/")
745 (synopsis
746 "Tools for internationalizing Python applications")
747 (description
748 "Babel is composed of two major parts:
749 - tools to build and work with gettext message catalogs
750 - a Python interface to the CLDR (Common Locale Data Repository), providing
751 access to various locale display names, localized number and date formatting,
752 etc. ")
753 (license license:bsd-3)))
754
755 (define-public python2-babel
756 (package-with-python2 python-babel))
757
758 (define-public python2-backport-ssl-match-hostname
759 (package
760 (name "python2-backport-ssl-match-hostname")
761 (version "3.5.0.1")
762 (source
763 (origin
764 (method url-fetch)
765 (uri (pypi-uri "backports.ssl_match_hostname" version))
766 (sha256
767 (base32
768 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
769 (build-system python-build-system)
770 (arguments
771 `(#:python ,python-2
772 #:tests? #f)) ; no test target
773 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
774 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
775 (description
776 "This backport brings the ssl.match_hostname() function to users of
777 earlier versions of Python. The function checks the hostname in the
778 certificate returned by the server to which a connection has been established,
779 and verifies that it matches the intended target hostname.")
780 (license license:psfl)))
781
782 (define-public python-bidict
783 (package
784 (name "python-bidict")
785 (version "0.21.2")
786 (source
787 (origin
788 (method url-fetch)
789 (uri (pypi-uri "bidict" version))
790 (sha256
791 (base32
792 "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
793 (build-system python-build-system)
794 (native-inputs
795 `(("python-coverage" ,python-coverage)
796 ("python-hypothesis" ,python-hypothesis-5.23) ; use_true_random=... from >=5.19.0
797 ("python-pre-commit" ,python-pre-commit)
798 ("python-py" ,python-py)
799 ("python-pytest" ,python-pytest)
800 ("python-pytest-benchmark" ,python-pytest-benchmark)
801 ("python-pytest-cov" ,python-pytest-cov)
802 ("python-setuptools-scm" ,python-setuptools-scm)
803 ("python-sortedcollections" ,python-sortedcollections)
804 ("python-sortedcontainers" ,python-sortedcontainers)
805 ("python-sphinx" ,python-sphinx)
806 ("python-sphinx-autodoc-typehints" ,python-sphinx-autodoc-typehints)
807 ("python-tox" ,python-tox)))
808 (arguments
809 `(#:phases (modify-phases %standard-phases
810 (add-after 'unpack 'relax-reqs
811 (lambda _
812 (substitute* "setup.py"
813 (("sortedcollections < 2") "sortedcollections"))
814 #t))
815 (replace 'check
816 (lambda _ (invoke "./run_tests.py"))))))
817 (home-page "https://bidict.readthedocs.io")
818 (synopsis "Bidirectional mapping library")
819 (description "The @code{bidict} library provides several data structures
820 for working with bidirectional mappings in Python.")
821 (license license:mpl2.0)))
822
823 (define-public python-bitarray
824 (package
825 (name "python-bitarray")
826 (version "1.4.0")
827 (source (origin
828 (method url-fetch)
829 (uri (pypi-uri "bitarray" version))
830 (sha256
831 (base32
832 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
833 (build-system python-build-system)
834 (home-page "https://github.com/ilanschnell/bitarray")
835 (synopsis "Efficient arrays of booleans")
836 (description "This package provides an object type which efficiently
837 represents an array of booleans. Bitarrays are sequence types and behave very
838 much like usual lists. Eight bits are represented by one byte in a contiguous
839 block of memory. The user can select between two representations:
840 little-endian and big-endian. All of the functionality is implemented in C.
841 Methods for accessing the machine representation are provided. This can be
842 useful when bit level access to binary files is required, such as portable
843 bitmap image files. Also, when dealing with compressed data which uses
844 variable bit length encoding, you may find this module useful.")
845 (license license:psfl)))
846
847 (define-public python-boolean.py
848 (package
849 (name "python-boolean.py")
850 (version "3.6")
851 (source
852 (origin
853 ;; There's no source tarball on PyPI.
854 (method git-fetch)
855 (uri (git-reference
856 (url "https://github.com/bastikr/boolean.py")
857 (commit (string-append "v" version))))
858 (file-name (git-file-name name version))
859 (sha256
860 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
861 (build-system python-build-system)
862 (home-page "https://github.com/bastikr/boolean.py")
863 (synopsis "Boolean algebra in one Python module")
864 (description
865 "This is a small Python library that implements boolean algebra.
866 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
867 @code{Symbol} class that can take on one of these two values. Calculations
868 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
869 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
870 Expressions are constructed from parsed strings or directly in Python.")
871 (license license:bsd-2)))
872
873 (define-public python-hdf4
874 (package
875 (name "python-hdf4")
876 (version "0.9")
877 (source
878 (origin
879 (method url-fetch)
880 (uri (pypi-uri name version))
881 (sha256
882 (base32
883 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
884 (build-system python-build-system)
885 (native-inputs `(("nose" ,python-nose)))
886 (propagated-inputs `(("numpy" ,python-numpy)))
887 (inputs
888 `(("hdf4" ,hdf4)
889 ("libjpeg" ,libjpeg-turbo)
890 ("zlib" ,zlib)))
891 (arguments
892 `(#:phases
893 (modify-phases %standard-phases
894 (replace 'check
895 (lambda _
896 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
897 ;; on to import numpy. Somehow this works on their CI system.
898 ;; Let's just manage PYTHONPATH here instead.
899 (substitute* "runexamples.sh"
900 (("export PYTHONPATH=.*") ""))
901 (setenv "PYTHONPATH"
902 (string-append (getcwd) ":"
903 (getenv "PYTHONPATH")))
904 (invoke "./runexamples.sh")
905 (invoke "nosetests" "-v"))))))
906 (home-page "https://github.com/fhs/python-hdf4")
907 (synopsis "Python interface to the NCSA HDF4 library")
908 (description
909 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
910 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
911 NetCDF files can also be read and modified. Python-HDF4 is a fork of
912 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
913 (license license:expat)))
914
915 (define-public python2-hdf4
916 (package-with-python2 python-hdf4))
917
918 (define-public python-h5py
919 (package
920 (name "python-h5py")
921 (version "2.10.0")
922 (source
923 (origin
924 (method url-fetch)
925 (uri (pypi-uri "h5py" version))
926 (sha256
927 (base32
928 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
929 (build-system python-build-system)
930 (arguments
931 `(#:tests? #f ; no test target
932 #:phases
933 (modify-phases %standard-phases
934 (add-after 'unpack 'fix-hdf5-paths
935 (lambda* (#:key inputs #:allow-other-keys)
936 (let ((prefix (assoc-ref inputs "hdf5")))
937 (substitute* "setup_build.py"
938 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
939 (string-append "['" prefix "/lib" "']"))
940 (("'/opt/local/include', '/usr/local/include'")
941 (string-append "'" prefix "/include" "'")))
942 (substitute* "setup_configure.py"
943 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
944 (string-append "['" prefix "/lib" "']")))
945 #t))))))
946 (propagated-inputs
947 `(("python-six" ,python-six)
948 ("python-numpy" ,python-numpy)))
949 (inputs
950 `(("hdf5" ,hdf5-1.10)))
951 (native-inputs
952 `(("python-cython" ,python-cython)
953 ("python-pkgconfig" ,python-pkgconfig)
954 ("pkg-config" ,pkg-config)))
955 (home-page "https://www.h5py.org/")
956 (synopsis "Read and write HDF5 files from Python")
957 (description
958 "The h5py package provides both a high- and low-level interface to the
959 HDF5 library from Python. The low-level interface is intended to be a
960 complete wrapping of the HDF5 API, while the high-level component supports
961 access to HDF5 files, datasets and groups using established Python and NumPy
962 concepts.")
963 (license license:bsd-3)))
964
965 (define-public python2-h5py
966 (package-with-python2 python-h5py))
967
968 (define-public python-sh
969 (package
970 (name "python-sh")
971 (version "1.12.14")
972 (source
973 (origin
974 (method url-fetch)
975 (uri (pypi-uri "sh" version))
976 (sha256
977 (base32
978 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
979 (build-system python-build-system)
980 (arguments
981 '(#:phases
982 (modify-phases %standard-phases
983 (replace 'check
984 (lambda _
985 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
986 (setenv "HOME" "/tmp")
987 (invoke "python" "sh.py" "test"))))))
988 (native-inputs
989 `(("python-coverage" ,python-coverage)))
990 (home-page "https://github.com/amoffat/sh")
991 (synopsis "Python subprocess replacement")
992 (description "This package provides a replacement for Python's
993 @code{subprocess} feature.")
994 (license license:expat)))
995
996 (define-public python-cftime
997 (package
998 (name "python-cftime")
999 (version "1.0.4.2")
1000 (source
1001 (origin
1002 (method url-fetch)
1003 (uri (pypi-uri "cftime" version))
1004 (sha256
1005 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
1006 (build-system python-build-system)
1007 (propagated-inputs
1008 `(("python-numpy" ,python-numpy)))
1009 (native-inputs
1010 `(("python-coveralls" ,python-coveralls)
1011 ("python-cython" ,python-cython)
1012 ("python-pytest-cov" ,python-pytest-cov)))
1013 (home-page "https://github.com/Unidata/cftime")
1014 (synopsis "Library for time handling")
1015 (description
1016 "This package provides time-handling functionality that used to be part
1017 of the netcdf4 package before.")
1018 ;; This package claims to include code under the GPLv3 but is released
1019 ;; under ISC.
1020 (license (list license:isc license:gpl3+))))
1021
1022 (define-public python-netcdf4
1023 (package
1024 (name "python-netcdf4")
1025 (version "1.5.3")
1026 (source
1027 (origin
1028 (method url-fetch)
1029 (uri (pypi-uri "netCDF4" version))
1030 (sha256
1031 (base32
1032 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1033 (build-system python-build-system)
1034 (arguments
1035 '(#:phases
1036 (modify-phases %standard-phases
1037 (add-after 'unpack 'configure-locations
1038 (lambda* (#:key inputs #:allow-other-keys)
1039 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1040 #t)))))
1041 (native-inputs
1042 `(("python-cython" ,python-cython)))
1043 (propagated-inputs
1044 `(("python-numpy" ,python-numpy)
1045 ("python-cftime" ,python-cftime)))
1046 (inputs
1047 `(("netcdf" ,netcdf)
1048 ("hdf4" ,hdf4)
1049 ("hdf5" ,hdf5)))
1050 (home-page "https://github.com/Unidata/netcdf4-python")
1051 (synopsis "Python/numpy interface to the netCDF library")
1052 (description "Netcdf4-python is a Python interface to the netCDF C
1053 library. netCDF version 4 has many features not found in earlier
1054 versions of the library and is implemented on top of HDF5. This module
1055 can read and write files in both the new netCDF 4 and the old netCDF 3
1056 format, and can create files that are readable by HDF5 clients. The
1057 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1058 to users of that module.")
1059 ;; The software is mainly ISC, but includes some files covered
1060 ;; by the Expat license.
1061 (license (list license:isc license:expat))))
1062
1063 (define-public python-license-expression
1064 (package
1065 (name "python-license-expression")
1066 (version "1.2")
1067 (source
1068 (origin
1069 (method url-fetch)
1070 (uri (pypi-uri "license-expression" version))
1071 (sha256
1072 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1073 (build-system python-build-system)
1074 (propagated-inputs
1075 `(("python-boolean.py" ,python-boolean.py)))
1076 (home-page "https://github.com/nexB/license-expression")
1077 (synopsis "Apply boolean logic to license expressions")
1078 (description
1079 "This Python module defines a tiny language to evaluate and compare
1080 license expressions using boolean logic. Logical combinations of licenses can
1081 be tested for equality, containment, and equivalence. They can be normalised
1082 and simplified. It supports SPDX license expressions as well as other naming
1083 conventions and aliases in the same expression.")
1084 (license license:gpl2+)))
1085
1086 (define-public python-lockfile
1087 (package
1088 (name "python-lockfile")
1089 (version "0.12.2")
1090 (source
1091 (origin
1092 (method url-fetch)
1093 (uri (pypi-uri "lockfile" version))
1094 (sha256
1095 (base32
1096 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1097 (build-system python-build-system)
1098 (arguments '(#:test-target "check"))
1099 (native-inputs
1100 `(("python-pbr" ,python-pbr)))
1101 (home-page "https://launchpad.net/pylockfile")
1102 (synopsis "Platform-independent file locking module")
1103 (description
1104 "The lockfile package exports a LockFile class which provides a simple
1105 API for locking files.")
1106 (license license:expat)))
1107
1108 (define-public python-filelock
1109 (package
1110 (name "python-filelock")
1111 (version "3.0.12")
1112 (source
1113 (origin
1114 (method url-fetch)
1115 (uri (pypi-uri "filelock" version))
1116 (sha256
1117 (base32
1118 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1119 (build-system python-build-system)
1120 (home-page
1121 "https://github.com/benediktschmitt/py-filelock")
1122 (synopsis "Platform independent file lock")
1123 (description "@code{filelock} contains a single module implementing
1124 a platform independent file lock in Python, which provides a simple way of
1125 inter-process communication.")
1126 (license license:unlicense)))
1127
1128 (define-public python-semantic-version
1129 (package
1130 (name "python-semantic-version")
1131 (version "2.8.5")
1132 (source
1133 (origin
1134 (method url-fetch)
1135 (uri (pypi-uri "semantic_version" version))
1136 (sha256
1137 (base32
1138 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1139 (build-system python-build-system)
1140 (home-page "https://github.com/rbarrois/python-semanticversion")
1141 (synopsis "Semantic versioning module for Python")
1142 (description
1143 "The @code{semantic_version} class is a small library for handling
1144 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1145
1146 It can compare versions, generate a new version that represents a bump in one of
1147 the version levels, and check whether any given string is a proper semantic
1148 version identifier.")
1149 (license license:bsd-3)))
1150
1151 (define-public python2-semantic-version
1152 (package-with-python2 python-semantic-version))
1153
1154 (define-public python-serpent
1155 (package
1156 (name "python-serpent")
1157 (version "1.28")
1158 (source
1159 (origin
1160 (method url-fetch)
1161 (uri (pypi-uri "serpent" version))
1162 (sha256
1163 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1164 (build-system python-build-system)
1165 (native-inputs
1166 `(("python-attrs" ,python-attrs)
1167 ("python-pytz" ,python-pytz)))
1168 (home-page "https://github.com/irmen/Serpent")
1169 (synopsis "Serializer for literal Python expressions")
1170 (description
1171 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1172 serialization. It serializes an object tree into bytes (an utf-8 encoded
1173 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1174 to rebuild the original object tree.
1175
1176 Because only safe literals are encoded, it is safe to send serpent data to
1177 other machines, such as over the network.")
1178 (properties `((python2-variant . ,(delay python2-serpent))))
1179 (license license:expat)))
1180
1181 (define-public python2-serpent
1182 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1183 (package/inherit base
1184 (propagated-inputs
1185 `(("python-enum34" ,python2-enum34)
1186 ,@(package-propagated-inputs base))))))
1187
1188 (define-public python-setuptools
1189 (package
1190 (name "python-setuptools")
1191 (version "52.0.0")
1192 (source
1193 (origin
1194 (method url-fetch)
1195 (uri (pypi-uri "setuptools" version))
1196 (sha256
1197 (base32
1198 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1199 (modules '((guix build utils)))
1200 (snippet
1201 '(begin
1202 ;; Remove included binaries which are used to build self-extracting
1203 ;; installers for Windows.
1204 ;; TODO: Find some way to build them ourself so we can include them.
1205 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1206 #t))))
1207 (build-system python-build-system)
1208 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1209 ;; One could bootstrap with an internal untested setuptools.
1210 (arguments
1211 `(#:tests? #f))
1212 (home-page "https://pypi.org/project/setuptools/")
1213 (synopsis
1214 "Library designed to facilitate packaging Python projects")
1215 (description
1216 "Setuptools is a fully-featured, stable library designed to facilitate
1217 packaging Python projects, where packaging includes:
1218 Python package and module definitions,
1219 distribution package metadata,
1220 test hooks,
1221 project installation,
1222 platform-specific details,
1223 Python 3 support.")
1224 ;; TODO: setuptools now bundles the following libraries:
1225 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1226 (license (list license:psfl ; setuptools itself
1227 license:expat ; six, appdirs, pyparsing
1228 license:asl2.0 ; packaging is dual ASL2/BSD-2
1229 license:bsd-2))
1230 (properties `((python2-variant . ,(delay python2-setuptools))))))
1231
1232 ;; Newer versions of setuptools no longer support Python 2.
1233 (define-public python2-setuptools
1234 (package
1235 (name "python2-setuptools")
1236 (version "41.0.1")
1237 (source
1238 (origin
1239 (method url-fetch)
1240 (uri (pypi-uri "setuptools" version ".zip"))
1241 (sha256
1242 (base32
1243 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1244 (modules '((guix build utils)))
1245 (snippet
1246 '(begin
1247 ;; Remove included binaries which are used to build self-extracting
1248 ;; installers for Windows.
1249 ;; TODO: Find some way to build them ourself so we can include them.
1250 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1251 #t))))
1252 (build-system python-build-system)
1253 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1254 ;; One could bootstrap with an internal untested setuptools.
1255 (arguments
1256 `(#:tests? #f))
1257 (native-inputs
1258 `(("unzip" ,unzip)))
1259 (home-page "https://pypi.org/project/setuptools/")
1260 (synopsis
1261 "Library designed to facilitate packaging Python projects")
1262 (description
1263 "Setuptools is a fully-featured, stable library designed to facilitate
1264 packaging Python projects, where packaging includes:
1265 Python package and module definitions,
1266 distribution package metadata,
1267 test hooks,
1268 project installation,
1269 platform-specific details,
1270 Python 3 support.")
1271 ;; TODO: setuptools now bundles the following libraries:
1272 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1273 (license (list license:psfl ; setuptools itself
1274 license:expat ; six, appdirs, pyparsing
1275 license:asl2.0 ; packaging is dual ASL2/BSD-2
1276 license:bsd-2))))
1277
1278 (define-public python-setuptools-declarative-requirements
1279 (package
1280 (name "python-setuptools-declarative-requirements")
1281 (version "1.2.0")
1282 (source
1283 (origin
1284 (method url-fetch)
1285 (uri (pypi-uri
1286 "setuptools-declarative-requirements"
1287 version))
1288 (sha256
1289 (base32
1290 "1l8zmcnp9h8sp8hsw7b81djaa1a9yig0y7i4phh5pihqz1gdn7yi"))))
1291 (build-system python-build-system)
1292 (native-inputs
1293 `(("python-pytest" ,python-pytest)
1294 ("python-setuptools-scm" ,python-setuptools-scm)))
1295 (propagated-inputs
1296 `(("python-toml" ,python-toml)
1297 ("python-wheel" ,python-wheel)))
1298 (home-page
1299 "https://github.com/s0undt3ch/setuptools-declarative-requirements")
1300 (synopsis "File support for setuptools declarative setup.cfg")
1301 (description
1302 "This package provides file support for setuptools declarative
1303 @code{setup.cfg}.")
1304 (license license:asl2.0)))
1305
1306 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1307 (define-public python-setuptools-for-tensorflow
1308 (hidden-package
1309 (package
1310 (inherit python-setuptools)
1311 (version "39.1.0")
1312 (source (origin
1313 (inherit (package-source python-setuptools))
1314 (uri (pypi-uri "setuptools" version ".zip"))
1315 (sha256
1316 (base32
1317 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1318
1319 (define-public python-uniseg
1320 (package
1321 (name "python-uniseg")
1322 (version "0.7.1")
1323 (source
1324 (origin
1325 (method url-fetch)
1326 (uri (pypi-uri "uniseg" version ".zip"))
1327 (sha256
1328 (base32
1329 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1330 (build-system python-build-system)
1331 (arguments
1332 '(#:tests? #f)) ; The test suite requires network access.
1333 (native-inputs
1334 `(("unzip" ,unzip)))
1335 (home-page
1336 "https://bitbucket.org/emptypage/uniseg-python")
1337 (synopsis
1338 "Python library to determine Unicode text segmentations")
1339 (description
1340 "Uniseg is a Python package used to determine Unicode text segmentations.
1341 Supported segmentations include:
1342 @enumerate
1343 @item @dfn{Code point} (any value in the Unicode codespace)
1344 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1345 multiple Unicode code points, e.g. \"G\" + acute-accent)
1346 @item Word break
1347 @item Sentence break
1348 @item Line break
1349 @end enumerate")
1350 (license license:expat)))
1351
1352 (define-public python2-uniseg
1353 (package-with-python2 python-uniseg))
1354
1355 (define-public python-humanfriendly
1356 (package
1357 (name "python-humanfriendly")
1358 (version "8.2")
1359 (source
1360 (origin
1361 (method url-fetch)
1362 (uri (pypi-uri "humanfriendly" version))
1363 (sha256
1364 (base32
1365 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1366 (build-system python-build-system)
1367 (arguments
1368 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1369 #:tests? #f))
1370 (home-page "https://humanfriendly.readthedocs.io")
1371 (synopsis "Human-friendly input and output in Python")
1372 (description
1373 "The functions and classes in @code{humanfriendly} can be used to make
1374 text interfaces more user-friendly. It includes tools to parse and format
1375 numbers, file sizes, and timespans, timers for long-running operations, menus
1376 to allow the user to choose from a list of options, and terminal interaction
1377 helpers.")
1378 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1379 (license license:expat)))
1380
1381 (define-public python2-humanfriendly
1382 (let ((base (package-with-python2
1383 (strip-python2-variant python-humanfriendly))))
1384 (package/inherit base
1385 (propagated-inputs
1386 `(("python2-monotonic" ,python2-monotonic)
1387 ,@(package-propagated-inputs base))))))
1388
1389 (define-public python-textparser
1390 (package
1391 (name "python-textparser")
1392 (version "0.23.0")
1393 (source
1394 (origin
1395 (method url-fetch)
1396 (uri (pypi-uri "textparser" version))
1397 (sha256
1398 (base32
1399 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1400 (build-system python-build-system)
1401 (home-page "https://github.com/eerimoq/textparser")
1402 (synopsis "Fast text parser for Python")
1403 (description "This library provides a text parser written in the Python
1404 language. It aims to be fast.")
1405 (license license:expat)))
1406
1407 (define-public python-aenum
1408 (package
1409 (name "python-aenum")
1410 (version "2.2.4")
1411 (source
1412 (origin
1413 (method url-fetch)
1414 (uri (pypi-uri "aenum" version))
1415 (sha256
1416 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1417 (build-system python-build-system)
1418 (arguments
1419 `(#:phases (modify-phases %standard-phases
1420 (replace 'check
1421 (lambda _
1422 (format #t "current working dir ~s~%" (getcwd))
1423 (setenv "PYTHONPATH"
1424 (string-append ".:" (getenv "PYTHONPATH")))
1425 ;; We must run the test suite module directly, as it
1426 ;; fails to define the 'tempdir' variable in scope for
1427 ;; the tests otherwise
1428 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1429 ;; issues/32/running-tests-with-python-setuppy-test).
1430 (invoke "python3" "aenum/test.py")
1431 ;; This one fails with "NameError: name
1432 ;; 'test_pickle_dump_load' is not defined" (see:
1433 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1434 ;; /error-running-the-test_v3py-test-suite).
1435 ;; (invoke "python3" "aenum/test_v3.py")
1436 #t)))))
1437 (home-page "https://bitbucket.org/stoneleaf/aenum")
1438 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1439 (description "The aenum library includes an @code{Enum} base class, a
1440 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1441 class.")
1442 (license license:bsd-3)))
1443
1444 (define-public python-can
1445 (package
1446 (name "python-can")
1447 (version "3.3.3")
1448 (source
1449 (origin
1450 (method url-fetch)
1451 (uri (pypi-uri "python-can" version))
1452 (sha256
1453 (base32
1454 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1455 (build-system python-build-system)
1456 (arguments
1457 `(#:phases (modify-phases %standard-phases
1458 (add-after 'unpack 'relax-version-requirements
1459 (lambda _
1460 (substitute* "setup.py"
1461 (("mock~=2\\.0") "mock")
1462 (("coverage<5") "coverage")
1463 (("pytest~=4\\.3") "pytest")
1464 (("hypothesis~=4\\.56") "hypothesis"))
1465 #t))
1466 (add-after 'unpack 'fix-broken-tests
1467 ;; The tests try to run two scripts it expects should be
1468 ;; in PATH, but they aren't at this time (see:
1469 ;; https://github.com/hardbyte/python-can/issues/805).
1470 (lambda _
1471 (substitute* "test/test_scripts.py"
1472 (("\"can_logger\\.py --help\"") "")
1473 (("\"can_player\\.py --help\"") ""))
1474 #t)))))
1475 (propagated-inputs
1476 `(("python-aenum" ,python-aenum)
1477 ("python-wrapt" ,python-wrapt)))
1478 (native-inputs
1479 `(("python-codecov" ,python-codecov)
1480 ("python-coverage" ,python-coverage)
1481 ("python-future" ,python-future)
1482 ("python-hypothesis" ,python-hypothesis)
1483 ("python-mock" ,python-mock)
1484 ("python-pyserial" ,python-pyserial)
1485 ("python-pytest" ,python-pytest)
1486 ("python-pytest-cov" ,python-pytest-cov)
1487 ("python-pytest-runner" ,python-pytest-runner)
1488 ("python-pytest-timeout" ,python-pytest-timeout)))
1489 (home-page "https://github.com/hardbyte/python-can")
1490 (synopsis "Controller Area Network (CAN) interface module for Python")
1491 (description "This package defines the @code{can} module, which provides
1492 controller area network (CAN) support for Python developers; providing common
1493 abstractions to different hardware devices, and a suite of utilities for
1494 sending and receiving messages on a CAN bus.")
1495 (license license:lgpl3+)))
1496
1497 (define-public python-caniusepython3
1498 (package
1499 (name "python-caniusepython3")
1500 (version "7.2.0")
1501 (source
1502 (origin
1503 (method url-fetch)
1504 (uri (pypi-uri "caniusepython3" version))
1505 (sha256
1506 (base32
1507 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1508 (build-system python-build-system)
1509 (arguments
1510 `(#:phases (modify-phases %standard-phases
1511 (add-after 'unpack 'relax-requirements
1512 (lambda _
1513 (substitute* "setup.py"
1514 ;; These are for compatibility with Python 2.
1515 ((".*'argparse', 'backports.functools_lru_cache',.*")
1516 ""))
1517 (substitute* "dev_requirements.txt"
1518 ((".*pylint.*") "")) ;not actually required
1519 #t))
1520 (replace 'check
1521 (lambda _
1522 (invoke "py.test" "-k" "not NetworkTests"))))))
1523 (propagated-inputs
1524 `(("python-distlib" ,python-distlib)
1525 ("python-packaging" ,python-packaging)
1526 ("python-requests" ,python-requests)))
1527 (native-inputs
1528 `(("python-mock" ,python-mock)
1529 ("python-pytest" ,python-pytest)))
1530 (home-page "https://github.com/brettcannon/caniusepython3")
1531 (synopsis "Check for Python 3-incompatible Python libraries")
1532 (description "The @command{caniusepython3} command scans your project and
1533 reports the Python 3-incompatible libraries it found. It can also be used as
1534 a library.")
1535 (license license:asl2.0)))
1536
1537 (define-public python-diskcache
1538 (package
1539 (name "python-diskcache")
1540 (version "4.1.0")
1541 (source
1542 (origin
1543 (method url-fetch)
1544 (uri (pypi-uri "diskcache" version))
1545 (sha256
1546 (base32
1547 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1548 (build-system python-build-system)
1549 (arguments
1550 `(#:tests? #f)) ;test suite not included in the release
1551 (home-page "http://www.grantjenks.com/docs/diskcache/")
1552 (synopsis "Disk and file backed cache library")
1553 (description "DiskCache is a disk and file backed persistent cache.")
1554 (license license:asl2.0)))
1555
1556 (define-public python-bitstruct
1557 (package
1558 (name "python-bitstruct")
1559 (version "8.9.0")
1560 (source
1561 (origin
1562 (method url-fetch)
1563 (uri (pypi-uri "bitstruct" version))
1564 (sha256
1565 (base32
1566 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1567 (build-system python-build-system)
1568 (home-page "https://github.com/eerimoq/bitstruct")
1569 (synopsis "Python values to and C bit field structs converter")
1570 (description "This module performs conversions between Python values and C
1571 bit field structs represented as Python byte strings. It is intended to have
1572 a similar interface as the @code{struct} module from Python, but working on
1573 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1574 (license license:expat)))
1575
1576 (define-public python-cantools
1577 (package
1578 (name "python-cantools")
1579 (version "33.1.1")
1580 (source
1581 (origin
1582 ;; We take the sources from the Git repository as the documentation is
1583 ;; not included with the PyPI archive.
1584 (method git-fetch)
1585 (uri (git-reference
1586 (url "https://github.com/eerimoq/cantools")
1587 (commit version)))
1588 (file-name (git-file-name name version))
1589 (sha256
1590 (base32
1591 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1592 (build-system python-build-system)
1593 (arguments
1594 `(#:phases
1595 (modify-phases %standard-phases
1596 (add-after 'build 'build-doc
1597 (lambda _
1598 ;; See: https://github.com/eerimoq/cantools/issues/190.
1599 (substitute* "README.rst"
1600 (("https://github.com/eerimoq/cantools/raw/master\
1601 /docs/monitor.png")
1602 "monitor.png"))
1603 (with-directory-excursion "docs"
1604 (invoke "make" "man" "info"))))
1605 (add-after 'install 'install-doc
1606 (lambda* (#:key outputs #:allow-other-keys)
1607 (let* ((out (assoc-ref outputs "out"))
1608 (info (string-append out "/share/info"))
1609 (man1 (string-append out "/share/man/man1")))
1610 (format #t "CWD: ~s~%" (getcwd))
1611 (install-file "docs/_build/texinfo/cantools.info" info)
1612 (install-file "docs/_build/man/cantools.1" man1)
1613 #t))))))
1614 (native-inputs
1615 `(("sphinx" ,python-sphinx)
1616 ("texinfo" ,texinfo)))
1617 (propagated-inputs
1618 `(("python-bitstruct" ,python-bitstruct)
1619 ("python-can" ,python-can)
1620 ("python-diskcache" ,python-diskcache)
1621 ("python-textparser" ,python-textparser)))
1622 (home-page "https://github.com/eerimoq/cantools")
1623 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1624 (description "This package includes Controller Area Network (CAN) related
1625 tools that can be used to:
1626 @itemize
1627 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1628 @item encode and decode CAN messages
1629 @item multiplex simple and extended signals
1630 @item diagnose DID encoding and decoding
1631 @item dump the CAN decoder output
1632 @item test CAN nodes
1633 @item generate C source code
1634 @item monitor the CAN bus
1635 @end itemize")
1636 (license license:expat)))
1637
1638 (define-public python-capturer
1639 (package
1640 (name "python-capturer")
1641 (version "2.4")
1642 (source
1643 (origin
1644 (method url-fetch)
1645 (uri (pypi-uri "capturer" version))
1646 (sha256
1647 (base32
1648 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1649 (build-system python-build-system)
1650 (arguments
1651 `(#:tests? #f))
1652 (propagated-inputs
1653 `(("python-humanfriendly" ,python-humanfriendly)))
1654 (home-page "https://capturer.readthedocs.io")
1655 (synopsis "Capture stdout and stderr streams of the current process")
1656 (description
1657 "The capturer package makes it easy to capture the stdout and stderr
1658 streams of the current process and subprocesses. Output can be relayed
1659 to the terminal in real time but is also available to the Python program
1660 for additional processing.")
1661 (license license:expat)))
1662
1663 (define-public python2-capturer
1664 (package-with-python2 python-capturer))
1665
1666 (define-public python-case
1667 (package
1668 (name "python-case")
1669 (version "1.5.3")
1670 (source
1671 (origin
1672 (method url-fetch)
1673 (uri (pypi-uri "case" version))
1674 (sha256
1675 (base32
1676 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1677 (build-system python-build-system)
1678 (propagated-inputs
1679 `(("python-mock" ,python-mock)
1680 ("python-nose" ,python-nose)
1681 ("python-six" ,python-six)
1682 ("python-unittest2" ,python-unittest2)))
1683 (native-inputs
1684 `(("python-coverage" ,python-coverage)))
1685 (home-page "https://github.com/celery/case")
1686 (synopsis "Unittest utilities and convenience methods")
1687 (description
1688 "The @code{case} package provides utilities on top of unittest, including
1689 some helpful Python 2 compatibility convenience methods.")
1690 (license license:bsd-3)))
1691
1692 (define-public python-verboselogs
1693 (package
1694 (name "python-verboselogs")
1695 (version "1.7")
1696 (source
1697 (origin
1698 (method url-fetch)
1699 (uri (pypi-uri "verboselogs" version))
1700 (sha256
1701 (base32
1702 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1703 (build-system python-build-system)
1704 (arguments
1705 `(#:phases
1706 (modify-phases %standard-phases
1707 (replace 'check
1708 (lambda _
1709 ;; Do not run pylint plugin test, as astroid is an old
1710 ;; unsupported version.
1711 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1712 "verboselogs/tests.py"))))))
1713 (native-inputs
1714 `(("python-mock" ,python-mock)
1715 ("python-pytest" ,python-pytest)))
1716 (home-page "https://verboselogs.readthedocs.io")
1717 (synopsis "Verbose logging level for Python's logging module")
1718 (description
1719 "The @code{verboselogs} package extends Python's @code{logging} module to
1720 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1721 (license license:expat)))
1722
1723 (define-public python2-verboselogs
1724 (package-with-python2 python-verboselogs))
1725
1726 (define-public python-coloredlogs
1727 (package
1728 (name "python-coloredlogs")
1729 (version "10.0")
1730 (source
1731 (origin
1732 (method url-fetch)
1733 (uri (pypi-uri "coloredlogs" version))
1734 (sha256
1735 (base32
1736 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1737 (build-system python-build-system)
1738 (arguments
1739 `(;Tests require some updated modules
1740 #:tests? #f))
1741 (propagated-inputs
1742 `(("python-capturer" ,python-capturer)))
1743 (home-page "https://coloredlogs.readthedocs.io")
1744 (synopsis "Colored stream handler for Python's logging module")
1745 (description
1746 "The @code{coloredlogs} package enables colored terminal output for
1747 Python's logging module. The @code{ColoredFormatter} class inherits from
1748 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1749 messages in color.")
1750 (license license:expat)))
1751
1752 (define-public python2-coloredlogs
1753 (package-with-python2 python-coloredlogs))
1754
1755 (define-public python-editorconfig
1756 (package
1757 (name "python-editorconfig")
1758 (version "0.12.2")
1759 (source
1760 (origin
1761 (method url-fetch)
1762 (uri (pypi-uri "EditorConfig" version))
1763 (sha256
1764 (base32
1765 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1766 (build-system python-build-system)
1767 (home-page "https://editorconfig.org/")
1768 (synopsis "EditorConfig bindings for python")
1769 (description "The EditorConfig project consists of a file format for
1770 defining coding styles and a collection of text editor plugins that enable
1771 editors to read the file format and adhere to defined styles. EditorConfig
1772 files are easily readable and they work nicely with version control systems.")
1773 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1774 (license (list license:bsd-2 license:psfl))))
1775
1776 (define-public dosage
1777 (package
1778 (name "dosage")
1779 (version "2.17")
1780 (source
1781 (origin
1782 (method url-fetch)
1783 (uri (pypi-uri "dosage" version))
1784 (sha256
1785 (base32
1786 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1787 (build-system python-build-system)
1788 (propagated-inputs
1789 `(("python2-backports-functools-lru-cache"
1790 ,python2-backports-functools-lru-cache)
1791 ("python2-backports-shutil-get-terminal-size"
1792 ,python2-backports-shutil-get-terminal-size)
1793 ("python-cached-property" ,python-cached-property)
1794 ("python-colorama" ,python-colorama)
1795 ("python-imagesize" ,python-imagesize)
1796 ("python-importlib-metadata" ,python-importlib-metadata)
1797 ("python-lxml" ,python-lxml)
1798 ("python-requests" ,python-requests)
1799 ("python-six" ,python-six)))
1800 (native-inputs
1801 `(("python-pytest-cov" ,python-pytest-cov)
1802 ("python-pytest-xdist" ,python-pytest-xdist)
1803 ("python-responses" ,python-responses)
1804 ("python-setuptools-scm" ,python-setuptools-scm)))
1805 (home-page "https://github.com/webcomics/dosage")
1806 (synopsis "Comic strip downloader and archiver")
1807 (description "Dosage is designed to keep a local copy of specific webcomics and other
1808 picture-based content such as Picture of the Day sites. With the @command{dosage}
1809 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1810 downloaded, or download a strip for a particular date or index, if possible.")
1811 (license license:expat)))
1812
1813 (define-public python-et-xmlfile
1814 (package
1815 (name "python-et-xmlfile")
1816 (version "1.0.1")
1817 (source
1818 (origin
1819 (method url-fetch)
1820 (uri (pypi-uri "et_xmlfile" version))
1821 (sha256
1822 (base32
1823 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1824 (build-system python-build-system)
1825 (arguments
1826 `(#:phases (modify-phases %standard-phases
1827 (replace 'check
1828 (lambda _
1829 (invoke "pytest"))))))
1830 (native-inputs
1831 `(("python-pytest" ,python-pytest)
1832 ("python-lxml" ,python-lxml))) ;used for the tests
1833 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1834 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1835 (description "This Python library is based upon the @code{xmlfile} module
1836 from @code{lxml}. It aims to provide a low memory, compatible implementation
1837 of @code{xmlfile}.")
1838 (license license:expat)))
1839
1840 (define-public python2-et-xmlfile
1841 (package-with-python2 python-et-xmlfile))
1842
1843 (define-public python-openpyxl
1844 (package
1845 (name "python-openpyxl")
1846 (version "3.0.5")
1847 (source
1848 (origin
1849 ;; We use the upstream repository, as the tests are not included in the
1850 ;; PyPI releases.
1851 (method hg-fetch)
1852 (uri (hg-reference
1853 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1854 (changeset version)))
1855 (file-name (string-append name "-" version "-checkout"))
1856 (sha256
1857 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1858 (build-system python-build-system)
1859 (arguments
1860 `(#:phases (modify-phases %standard-phases
1861 (replace 'check
1862 (lambda _
1863 (invoke "pytest"))))))
1864 (native-inputs
1865 ;; For the test suite.
1866 `(("python-lxml" ,python-lxml)
1867 ("python-pillow" ,python-pillow)
1868 ("python-pytest" ,python-pytest)))
1869 (propagated-inputs
1870 `(("python-et-xmlfile" ,python-et-xmlfile)
1871 ("python-jdcal" ,python-jdcal)))
1872 (home-page "https://openpyxl.readthedocs.io")
1873 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1874 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1875 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1876 standard.")
1877 (properties `((python2-variant . ,(delay python2-openpyxl))))
1878 (license license:expat)))
1879
1880 (define-public python2-openpyxl
1881 (let ((base (package-with-python2
1882 (strip-python2-variant python-openpyxl))))
1883 (package
1884 (inherit base)
1885 ;; This is the latest version that has python2 support
1886 (version "2.6.4")
1887 (source
1888 (origin
1889 (method url-fetch)
1890 (uri (pypi-uri "openpyxl" version))
1891 (sha256
1892 (base32
1893 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1894 (arguments '(#:tests? #f))))) ; No test suite.
1895
1896 (define-public python-eventlet
1897 (package
1898 (name "python-eventlet")
1899 (version "0.25.1")
1900 (source
1901 (origin
1902 (method url-fetch)
1903 (uri (pypi-uri "eventlet" version))
1904 (sha256
1905 (base32
1906 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1907 (build-system python-build-system)
1908 (propagated-inputs
1909 `(("python-dnspython" ,python-dnspython)
1910 ("python-greenlet" ,python-greenlet)
1911 ("python-monotonic" ,python-monotonic)))
1912 (arguments
1913 ;; TODO: Requires unpackaged 'enum-compat'.
1914 '(#:tests? #f))
1915 (home-page "https://eventlet.net")
1916 (synopsis "Concurrent networking library for Python")
1917 (description
1918 "Eventlet is a concurrent networking library for Python that
1919 allows you to change how you run your code, not how you write it.
1920 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1921 Coroutines ensure that the developer uses a blocking style of programming
1922 that is similar to threading, but provide the benefits of non-blocking I/O.
1923 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1924 from the Python interpreter, or as a small part of a larger application.")
1925 (license license:expat)))
1926
1927 (define-public python-six
1928 (package
1929 (name "python-six")
1930 (version "1.14.0")
1931 (source
1932 (origin
1933 (method url-fetch)
1934 (uri (pypi-uri "six" version))
1935 (sha256
1936 (base32
1937 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1938 (build-system python-build-system)
1939 (arguments
1940 `(#:phases
1941 (modify-phases %standard-phases
1942 (replace 'check
1943 (lambda _
1944 (invoke "py.test" "-v"))))))
1945 (native-inputs
1946 `(("python-pytest" ,python-pytest-bootstrap)))
1947 (home-page "https://pypi.org/project/six/")
1948 (synopsis "Python 2 and 3 compatibility utilities")
1949 (description
1950 "Six is a Python 2 and 3 compatibility library. It provides utility
1951 functions for smoothing over the differences between the Python versions with
1952 the goal of writing Python code that is compatible on both Python versions.
1953 Six supports every Python version since 2.5. It is contained in only one
1954 Python file, so it can be easily copied into your project.")
1955 (license license:x11)))
1956
1957 (define-public python2-six
1958 (package-with-python2 python-six))
1959
1960 (define-public python-six-bootstrap
1961 (package
1962 (inherit python-six)
1963 (name "python-six-bootstrap")
1964 (native-inputs `())
1965 (arguments `(#:tests? #f))))
1966
1967 (define-public python2-six-bootstrap
1968 (package-with-python2 python-six-bootstrap))
1969
1970 (define-public python-schedule
1971 (package
1972 (name "python-schedule")
1973 (version "0.4.3")
1974 (source
1975 (origin
1976 (method url-fetch)
1977 (uri (pypi-uri "schedule" version))
1978 (sha256
1979 (base32
1980 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1981 (build-system python-build-system)
1982 (native-inputs
1983 `(("python-pytest" ,python-pytest)
1984 ("python-mock" ,python-mock)))
1985 (home-page "https://github.com/dbader/schedule")
1986 (synopsis "Schedule periodic function calls in Python")
1987 (description
1988 "Schedule is an in-process scheduler for periodic jobs that uses the
1989 builder pattern for configuration. Schedule lets you run Python functions (or
1990 any other callable) periodically at pre-determined intervals using a simple,
1991 human-friendly syntax.")
1992 (license license:expat)))
1993
1994 (define-public python2-schedule
1995 (package-with-python2 python-schedule))
1996
1997 (define-public python-scour
1998 (package
1999 (name "python-scour")
2000 (version "038.1")
2001 (source
2002 (origin
2003 (method git-fetch)
2004 (uri
2005 (git-reference
2006 (url "https://github.com/scour-project/scour")
2007 (commit
2008 (string-append "v" version))))
2009 (file-name (git-file-name name version))
2010 (sha256
2011 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
2012 (propagated-inputs
2013 `(("python-six" ,python-six)))
2014 (build-system python-build-system)
2015 (home-page "https://github.com/scour-project/scour")
2016 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
2017 (description "The goal of Scour is to output a file that renders
2018 identically at a fraction of the size by removing a lot of redundant
2019 information created by most SVG editors. Optimization options are typically
2020 lossless but can be tweaked for more aggressive cleaning.")
2021 (license license:asl2.0)))
2022
2023 (define-public python-mappy
2024 (package
2025 (name "python-mappy")
2026 (version "2.18")
2027 (source (origin
2028 (method url-fetch)
2029 (uri (pypi-uri "mappy" version))
2030 (sha256
2031 (base32
2032 "1a05p7rkmxa6qhm108na8flzj2v45jab06drk59kzk1ip2sgvzqq"))))
2033 (build-system python-build-system)
2034 (native-inputs
2035 `(("python-cython" ,python-cython)))
2036 (inputs
2037 `(("zlib" ,zlib)))
2038 (home-page "https://github.com/lh3/minimap2")
2039 (synopsis "Python binding for minimap2")
2040 (description "This package provides a convenient interface to minimap2,
2041 a fast and accurate C program to align genomic and transcribe nucleotide
2042 sequences.")
2043 (license license:expat)))
2044
2045 (define-public python-mechanize
2046 (package
2047 (name "python-mechanize")
2048 (version "0.4.5")
2049 (source
2050 (origin
2051 (method url-fetch)
2052 (uri (pypi-uri "mechanize" version))
2053 (sha256
2054 (base32
2055 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2056 (build-system python-build-system)
2057 (propagated-inputs
2058 `(("python-html5lib" ,python-html5lib)))
2059 (home-page "https://github.com/python-mechanize/mechanize")
2060 (synopsis
2061 "Stateful programmatic web browsing in Python")
2062 (description
2063 "Mechanize implements stateful programmatic web browsing in Python,
2064 after Andy Lester’s Perl module WWW::Mechanize.")
2065 (license license:bsd-3)))
2066
2067 (define-public python2-mechanize
2068 (package-with-python2 python-mechanize))
2069
2070 (define-public python-simpleaudio
2071 (package
2072 (name "python-simpleaudio")
2073 (version "1.0.4")
2074 (source
2075 (origin
2076 (method url-fetch)
2077 (uri (pypi-uri "simpleaudio" version))
2078 (sha256
2079 (base32
2080 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2081 (build-system python-build-system)
2082 (arguments
2083 `(#:tests? #f))
2084 (inputs
2085 `(("alsa-lib" ,alsa-lib)))
2086 (home-page
2087 "https://github.com/hamiltron/py-simple-audio")
2088 (synopsis "Simple, asynchronous audio playback for Python 3")
2089 (description
2090 "The @code{simplaudio} package provides cross-platform, dependency-free
2091 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2092 (license license:expat))) ; MIT license
2093
2094 (define-public python-simplejson
2095 (package
2096 (name "python-simplejson")
2097 (version "3.17.0")
2098 (source
2099 (origin
2100 (method url-fetch)
2101 (uri (pypi-uri "simplejson" version))
2102 (sha256
2103 (base32
2104 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
2105 (build-system python-build-system)
2106 (home-page "http://simplejson.readthedocs.org/en/latest/")
2107 (synopsis
2108 "Json library for Python")
2109 (description
2110 "JSON (JavaScript Object Notation) is a subset of JavaScript
2111 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2112 format.
2113
2114 Simplejson exposes an API familiar to users of the standard library marshal
2115 and pickle modules. It is the externally maintained version of the json
2116 library contained in Python 2.6, but maintains compatibility with Python 2.5
2117 and (currently) has significant performance advantages, even without using
2118 the optional C extension for speedups. Simplejson is also supported on
2119 Python 3.3+.")
2120 (license license:x11)))
2121
2122 (define-public python2-simplejson
2123 (package-with-python2 python-simplejson))
2124
2125
2126 (define-public python-pyicu
2127 (package
2128 (name "python-pyicu")
2129 (version "2.4.3")
2130 (source
2131 (origin
2132 (method url-fetch)
2133 (uri (pypi-uri "PyICU" version))
2134 (sha256
2135 (base32
2136 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
2137 (build-system python-build-system)
2138 (inputs
2139 `(("icu4c" ,icu4c)))
2140 (native-inputs
2141 `(("python-pytest" ,python-pytest)
2142 ("python-six" ,python-six)))
2143 (home-page "https://github.com/ovalhub/pyicu")
2144 (synopsis "Python extension wrapping the ICU C++ API")
2145 (description
2146 "PyICU is a python extension wrapping the ICU C++ API.")
2147 (license license:x11)))
2148
2149 (define-public python2-pyicu
2150 (package-with-python2 python-pyicu))
2151
2152 (define-public python-dogtail
2153 (package
2154 (name "python-dogtail")
2155 (version "0.9.11")
2156 (source (origin
2157 (method url-fetch)
2158 (uri
2159 (string-append
2160 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2161 "dogtail-" version ".tar.gz"))
2162 (sha256
2163 (base32
2164 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2165 (build-system python-build-system)
2166 (arguments
2167 `(#:tests? #f ; TODO Launching dbus for the tests
2168 ; fails
2169 #:phases
2170 (modify-phases %standard-phases
2171 (replace 'check
2172 (lambda* (#:key tests? #:allow-other-keys)
2173 (when tests?
2174 (system "Xvfb :1 &")
2175 (setenv "DISPLAY" ":1")
2176 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2177 #t)))))
2178 (propagated-inputs
2179 `(("python-pygobject" ,python-pygobject)
2180 ("python-pycairo" ,python-pycairo)
2181 ("python-pyatspi" ,python-pyatspi)))
2182 (native-inputs
2183 `(("python-nose" ,python-nose)
2184 ("gtk+" ,gtk+)
2185 ("xvfb" ,xorg-server)
2186 ("dbus" ,dbus)
2187 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2188 ("gobject-introspection" ,gobject-introspection)))
2189 (home-page "https://gitlab.com/dogtail/dogtail/")
2190 (synopsis "GUI test tool and automation framework written in Python")
2191 (description
2192 "Dogtail is a GUI test tool and automation framework written in Python.
2193 It uses Accessibility (a11y) technologies to communicate with desktop
2194 applications. dogtail scripts are written in Python and executed like any
2195 other Python program.")
2196 (license license:gpl2+)))
2197
2198 (define-public python2-dogtail
2199 (package-with-python2 python-dogtail))
2200
2201 (define-public python-empy
2202 (package
2203 (name "python-empy")
2204 (version "3.3.3")
2205 (source (origin
2206 (method url-fetch)
2207 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2208 version ".tar.gz"))
2209 (sha256
2210 (base32
2211 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2212 (build-system python-build-system)
2213 (arguments
2214 `(#:tests? #f)) ; python2 only
2215 (home-page "http://www.alcyone.com/software/empy/")
2216 (synopsis "Templating system for Python")
2217 (description
2218 "EmPy is a system for embedding Python expressions and statements in
2219 template text; it takes an EmPy source file, processes it, and produces
2220 output. This is accomplished via expansions, which are special signals to the
2221 EmPy system and are set off by a special prefix (by default the at sign, @@).
2222 EmPy can expand arbitrary Python expressions and statements in this way, as
2223 well as a variety of special forms. Textual data not explicitly delimited in
2224 this way is sent unaffected to the output, allowing Python to be used in
2225 effect as a markup language. Also supported are callbacks via hooks,
2226 recording and playback via diversions, and dynamic, chainable filters. The
2227 system is highly configurable via command line options and embedded
2228 commands.")
2229 (license license:lgpl2.1+)))
2230
2231 (define-public python2-empy
2232 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2233 (package/inherit base
2234 (arguments `(,@(package-arguments base)
2235 #:tests? #t)))))
2236
2237 (define-public python2-element-tree
2238 (package
2239 (name "python2-element-tree")
2240 (version "1.2.6")
2241 (source (origin
2242 (method url-fetch)
2243 (uri (string-append
2244 "http://effbot.org/media/downloads/elementtree-"
2245 version "-20050316.tar.gz"))
2246 (sha256
2247 (base32
2248 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2249 (build-system python-build-system)
2250 (arguments
2251 `(#:python ,python-2 ; seems to be part of Python 3
2252 #:tests? #f)) ; no 'test' sub-command
2253 (synopsis "Toolkit for XML processing in Python")
2254 (description
2255 "ElementTree is a Python library supporting lightweight XML processing.")
2256 (home-page "https://effbot.org/zone/element-index.htm")
2257 (license (license:x11-style
2258 "http://docs.python.org/2/license.html"
2259 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2260
2261 (define-public python2-pybugz
2262 (package
2263 (name "python2-pybugz")
2264 (version "0.6.11")
2265 (source (origin
2266 (method url-fetch)
2267 (uri (string-append
2268 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2269 version ".tar.gz"))
2270 (sha256
2271 (base32
2272 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2273 (patches (search-patches "pybugz-stty.patch"
2274 "pybugz-encode-error.patch"))))
2275 (build-system python-build-system)
2276 (arguments
2277 `(#:python ,python-2 ; SyntaxError with Python 3
2278 #:tests? #f)) ; no 'test' sub-command
2279 (propagated-inputs
2280 `(("element-tree" ,python2-element-tree)))
2281 (synopsis "Python and command-line interface to Bugzilla")
2282 (description
2283 "PyBugz is a Python library and command-line tool to query the Bugzilla
2284 bug tracking system. It is meant as an aid to speed up interaction with the
2285 bug tracker.")
2286 (home-page "http://www.liquidx.net/pybugz/")
2287 (license license:gpl2)))
2288
2289 (define-public python2-enum
2290 (package
2291 (name "python2-enum")
2292 (version "0.4.6")
2293 (source (origin
2294 (method url-fetch)
2295 (uri (pypi-uri "enum" version))
2296 (sha256
2297 (base32
2298 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2299 (build-system python-build-system)
2300 (arguments
2301 `(#:python ,python-2))
2302 (home-page "https://pypi.org/project/enum/")
2303 (synopsis "Robust enumerated type support in Python")
2304 (description
2305 "This provides a module for robust enumerations in Python. It has
2306 been superseded by the Python standard library and is provided only for
2307 compatibility.")
2308 ;; Choice of either license.
2309 (license (list license:gpl3+ license:psfl))))
2310
2311 (define-public python-enum34
2312 (package
2313 (name "python-enum34")
2314 (version "1.1.6")
2315 (source
2316 (origin
2317 (method url-fetch)
2318 (uri (pypi-uri "enum34" version))
2319 (sha256
2320 (base32
2321 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2322 (build-system python-build-system)
2323 (home-page "https://pypi.org/project/enum34/")
2324 (synopsis "Backported Python 3.4 Enum")
2325 (description
2326 "Enum34 is the new Python stdlib enum module available in Python 3.4
2327 backported for previous versions of Python from 2.4 to 3.3.")
2328 (license license:bsd-3)))
2329
2330 (define-public python2-enum34
2331 (package-with-python2 python-enum34))
2332
2333 (define-public python-parse-type
2334 (package
2335 (name "python-parse-type")
2336 (version "0.4.2")
2337 (source
2338 (origin
2339 (method url-fetch)
2340 (uri (pypi-uri "parse_type" version))
2341 (sha256
2342 (base32
2343 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2344 (build-system python-build-system)
2345 (propagated-inputs
2346 `(("python-six" ,python-six)
2347 ("python-parse" ,python-parse)))
2348 (native-inputs
2349 `(("python-pytest" ,python-pytest)
2350 ("python-pytest-runner" ,python-pytest-runner)))
2351 (home-page "https://github.com/jenisys/parse_type")
2352 (synopsis "Extended parse module")
2353 (description
2354 "Parse_type extends the python parse module.")
2355 (properties
2356 `((python2-variant . ,(delay python2-parse-type))))
2357 (license license:bsd-3)))
2358
2359 (define-public python2-parse-type
2360 (let ((base (package-with-python2
2361 (strip-python2-variant python-parse-type))))
2362 (package/inherit base
2363 (propagated-inputs
2364 `(("python2-enum34" ,python2-enum34)
2365 ,@(package-propagated-inputs base))))))
2366
2367 (define-public python-parse
2368 (package
2369 (name "python-parse")
2370 (version "1.18.0")
2371 (source
2372 (origin
2373 (method url-fetch)
2374 (uri (pypi-uri "parse" version))
2375 (sha256
2376 (base32
2377 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2378 (build-system python-build-system)
2379 (arguments
2380 `(#:phases
2381 (modify-phases %standard-phases
2382 (replace 'check
2383 (lambda _ (invoke "python" "test_parse.py"))))))
2384 (home-page "https://github.com/r1chardj0n3s/parse")
2385 (synopsis "Parse strings")
2386 (description
2387 "Parse strings using a specification based on the Python @code{format()}
2388 syntax.")
2389 (license license:x11)))
2390
2391 (define-public python-polib
2392 (package
2393 (name "python-polib")
2394 (version "1.1.0")
2395 (source (origin
2396 (method url-fetch)
2397 (uri (pypi-uri "polib" version))
2398 (sha256
2399 (base32
2400 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2401 (build-system python-build-system)
2402 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2403 (synopsis "Manipulate, create and modify gettext files")
2404 (description "Polib can manipulate any gettext format (po, pot and mo)
2405 files. It can be used to create po files from scratch or to modify
2406 existing ones.")
2407 (license license:expat)))
2408
2409 (define-public python2-polib
2410 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2411 (package/inherit base
2412 (arguments `(,@(package-arguments base)
2413 ;; Tests don't work with python2.
2414 #:tests? #f)))))
2415
2416 (define-public python-poyo
2417 (package
2418 (name "python-poyo")
2419 (version "0.5.0")
2420 (source
2421 (origin
2422 (method url-fetch)
2423 (uri (pypi-uri "poyo" version))
2424 (sha256
2425 (base32
2426 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2427 (build-system python-build-system)
2428 (home-page "https://github.com/hackebrot/poyo")
2429 (synopsis "Lightweight YAML Parser for Python")
2430 (description
2431 "This package provides a lightweight YAML Parser for Python. It supports
2432 only a chosen subset of the YAML format that is required to parse cookiecutter
2433 user configuration files. It does not have support for serializing into YAML
2434 and is not compatible with JSON.")
2435 (license license:expat)))
2436
2437 (define-public scons
2438 (package
2439 (name "scons")
2440 (version "3.0.4")
2441 (source (origin
2442 (method git-fetch)
2443 (uri (git-reference
2444 (url "https://github.com/SCons/scons")
2445 (commit version)))
2446 (file-name (git-file-name name version))
2447 (sha256
2448 (base32
2449 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2450 (build-system python-build-system)
2451 (arguments
2452 `(#:use-setuptools? #f ; still relies on distutils
2453 #:tests? #f ; no 'python setup.py test' command
2454 #:phases
2455 (modify-phases %standard-phases
2456 (add-before 'build 'bootstrap
2457 (lambda _
2458 (substitute* "src/engine/SCons/compat/__init__.py"
2459 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2460 "sys.modules[new] = __import__(old)"))
2461 (substitute* "src/engine/SCons/Platform/__init__.py"
2462 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2463 "mod = __import__(full_name)"))
2464 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2465 (chdir "build/scons")
2466 #t)))))
2467 (home-page "https://scons.org/")
2468 (synopsis "Software construction tool written in Python")
2469 (description
2470 "SCons is a software construction tool. Think of SCons as an improved,
2471 cross-platform substitute for the classic Make utility with integrated
2472 functionality similar to autoconf/automake and compiler caches such as ccache.
2473 In short, SCons is an easier, more reliable and faster way to build
2474 software.")
2475 (license license:x11)))
2476
2477 (define-public scons-python2
2478 (package
2479 (inherit (package-with-python2 scons))
2480 (name "scons-python2")))
2481
2482 (define-public python-extension-helpers
2483 (package
2484 (name "python-extension-helpers")
2485 (version "0.1")
2486 (source
2487 (origin
2488 (method url-fetch)
2489 (uri (pypi-uri "extension-helpers" version))
2490 (sha256
2491 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2492 (build-system python-build-system)
2493 (native-inputs
2494 `(("coverage" ,python-coverage)
2495 ("pytest" ,python-pytest-astropy)
2496 ("pytest-cov" ,python-pytest-cov)
2497 ("setuptools-scm" ,python-setuptools-scm)))
2498 (home-page "https://github.com/astropy/astropy-helpers")
2499 (synopsis
2500 "Utilities for building and installing packages in the Astropy ecosystem")
2501 (description
2502 "The extension-helpers package includes many build, installation, and
2503 documentation-related tools used by the Astropy project.")
2504 (license license:bsd-3)))
2505
2506 (define-public python-extras
2507 (package
2508 (name "python-extras")
2509 (version "1.0.0")
2510 (source
2511 (origin
2512 (method url-fetch)
2513 (uri (pypi-uri "extras" version))
2514 (sha256
2515 (base32
2516 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2517 (build-system python-build-system)
2518 (arguments
2519 ;; FIXME: Circular dependency on testtools.
2520 '(#:tests? #f))
2521 (home-page "https://github.com/testing-cabal/extras")
2522 (synopsis "Useful extensions to the Python standard library")
2523 (description
2524 "Extras is a set of extensions to the Python standard library.")
2525 (license license:expat)))
2526
2527 (define-public python2-extras
2528 (package-with-python2 python-extras))
2529
2530 (define-public python-mimeparse
2531 (package
2532 (name "python-mimeparse")
2533 (version "1.6.0")
2534 (source
2535 (origin
2536 (method url-fetch)
2537 (uri (pypi-uri "python-mimeparse" version))
2538 (sha256
2539 (base32
2540 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2541 (build-system python-build-system)
2542 (arguments
2543 '(#:phases
2544 (modify-phases %standard-phases
2545 (replace 'check
2546 (lambda _
2547 (invoke "./mimeparse_test.py"))))))
2548 (home-page
2549 "https://github.com/dbtsai/python-mimeparse")
2550 (synopsis "Python library for parsing MIME types")
2551 (description
2552 "Mimeparse provides basic functions for parsing MIME type names and
2553 matching them against a list of media-ranges.")
2554 (license license:expat)))
2555
2556 (define-public python2-mimeparse
2557 (package-with-python2 python-mimeparse))
2558
2559 (define-public python-miniboa
2560 (package
2561 (name "python-miniboa")
2562 (version "1.0.7")
2563 (source
2564 (origin
2565 (method url-fetch)
2566 (uri (pypi-uri "miniboa" version))
2567 (sha256
2568 (base32
2569 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2570 (build-system python-build-system)
2571 (home-page "https://github.com/shmup/miniboa")
2572 (synopsis "Simple, single-threaded Telnet server")
2573 (description
2574 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2575 server.")
2576 (license license:asl2.0)))
2577
2578 (define-public python2-miniboa
2579 (package-with-python2 python-miniboa))
2580
2581 (define-public python-pafy
2582 (package
2583 (name "python-pafy")
2584 (version "0.5.3.1")
2585 (source
2586 (origin
2587 (method url-fetch)
2588 (uri (pypi-uri "pafy" version))
2589 (sha256
2590 (base32
2591 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2592 (build-system python-build-system)
2593 (arguments
2594 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2595 (propagated-inputs
2596 ;; Youtube-dl is a python package which is imported in the file
2597 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2598 `(("youtube-dl" ,youtube-dl)))
2599 (home-page "https://np1.github.io/pafy/")
2600 (synopsis "Retrieve YouTube content and metadata")
2601 (description
2602 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2603 (license license:lgpl3+)))
2604
2605 (define-public python2-funcsigs
2606 (package
2607 (name "python2-funcsigs")
2608 (version "1.0.2")
2609 (source (origin
2610 (method url-fetch)
2611 (uri (pypi-uri "funcsigs" version))
2612 (sha256
2613 (base32
2614 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2615 (build-system python-build-system)
2616 (arguments
2617 `(#:python ,python-2))
2618 (native-inputs
2619 `(("python2-unittest2" ,python2-unittest2)))
2620 (home-page "http://funcsigs.readthedocs.org")
2621 (synopsis "Python function signatures from PEP362")
2622 (description
2623 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2624 (license license:asl2.0)))
2625
2626 (define-public python2-funcsigs-bootstrap
2627 (package
2628 (inherit python2-funcsigs)
2629 (name "python2-funcsigs-bootstrap")
2630 (native-inputs `())
2631 (arguments
2632 `(#:tests? #f
2633 ,@(package-arguments python2-funcsigs)))))
2634
2635 (define-public python-py
2636 (package
2637 (name "python-py")
2638 (version "1.8.1")
2639 (source
2640 (origin
2641 (method url-fetch)
2642 (uri (pypi-uri "py" version))
2643 (sha256
2644 (base32
2645 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2646 (build-system python-build-system)
2647 (arguments
2648 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2649 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2650 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2651 ;; Is this module globally installed?"
2652 '(#:tests? #f))
2653 (native-inputs
2654 `(("python-setuptools-scm" ,python-setuptools-scm)))
2655 (home-page "https://github.com/pytest-dev/py")
2656 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2657 (description
2658 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2659 code introspection, and logging.")
2660 (license license:expat)))
2661
2662 (define-public python-py-next
2663 (package
2664 (inherit python-py)
2665 (version "1.9.0")
2666 (source
2667 (origin
2668 (method url-fetch)
2669 (uri (pypi-uri "py" version))
2670 (sha256
2671 (base32
2672 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
2673
2674 (define-public python2-py
2675 (package-with-python2 python-py))
2676
2677 ;; Recent versions of python-fixtures and python-testrepository need
2678 ;; python-pbr for packaging, which itself needs these two packages for
2679 ;; testing.
2680 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2681 ;; same source, just without any test dependencies and with tests disabled.
2682 ;; python-pbr-minmal is then used to package python-fixtures and
2683 ;; python-testrepository.
2684 ;; Strictly speaking we currently could remove the test-requirements from the
2685 ;; normal python-pbr package (and save this package) since test are disabled
2686 ;; there anyway. But this may change in future.
2687 (define-public python-pbr-minimal
2688 (package
2689 (name "python-pbr-minimal")
2690 (version "3.0.1")
2691 (source
2692 (origin
2693 (method url-fetch)
2694 (uri (pypi-uri "pbr" version))
2695 (sha256
2696 (base32
2697 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2698 (build-system python-build-system)
2699 (arguments
2700 `(#:tests? #f))
2701 (home-page "https://docs.openstack.org/pbr/latest/")
2702 (synopsis "Minimal build of python-pbr used for bootstrapping")
2703 (description
2704 "Used only for bootstrapping python2-pbr, you should not need this.")
2705 (license license:asl2.0)))
2706
2707 (define-public python-pbr
2708 (package
2709 (inherit python-pbr-minimal)
2710 (name "python-pbr")
2711 (arguments
2712 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2713 (propagated-inputs
2714 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2715 (native-inputs
2716 `(("python-fixtures" ,python-fixtures-bootstrap)
2717 ;; discover, coverage, hacking, subunit
2718 ("python-mock" ,python-mock)
2719 ("python-six" ,python-six)
2720 ("python-sphinx" ,python-sphinx)
2721 ("python-testrepository" ,python-testrepository-bootstrap)
2722 ("python-testresources" ,python-testresources-bootstrap)
2723 ("python-testscenarios" ,python-testscenarios-bootstrap)
2724 ("python-testtools" ,python-testtools-bootstrap)
2725 ("python-virtualenv" ,python-virtualenv)))
2726 (synopsis "Enhance the default behavior of Python’s setuptools")
2727 (description
2728 "Python Build Reasonableness (PBR) is a library that injects some useful
2729 and sensible default behaviors into your setuptools run. It will set
2730 versions, process requirements files and generate AUTHORS and ChangeLog file
2731 from git information.
2732 ")))
2733
2734 (define-public python-pyrsistent
2735 (package
2736 (name "python-pyrsistent")
2737 (version "0.16.0")
2738 (home-page "https://github.com/tobgu/pyrsistent")
2739 (source (origin
2740 (method url-fetch)
2741 (uri (pypi-uri "pyrsistent" version))
2742 (sha256
2743 (base32
2744 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2745 (build-system python-build-system)
2746 (arguments
2747 '(#:phases (modify-phases %standard-phases
2748 ;; The package works fine with newer Pytest and Hypothesis, but
2749 ;; has pinned older versions to stay compatible with Python 2.
2750 (add-before 'check 'loosen-pytest-requirement
2751 (lambda _
2752 (substitute* "setup.py"
2753 (("pytest<5") "pytest")
2754 (("hypothesis<5") "hypothesis"))
2755 #t)))))
2756 (native-inputs
2757 `(("python-hypothesis" ,python-hypothesis)
2758 ("python-pytest" ,python-pytest)
2759 ("python-pytest-runner" ,python-pytest-runner)))
2760 (propagated-inputs
2761 `(("python-six" ,python-six)))
2762 (synopsis "Persistent data structures for Python")
2763 (description
2764 "Pyrsistent is a number of persistent collections (by some referred to as
2765 functional data structures). Persistent in the sense that they are immutable.
2766
2767 All methods on a data structure that would normally mutate it instead return a
2768 new copy of the structure containing the requested updates. The original
2769 structure is left untouched.")
2770 (license license:expat)))
2771
2772 (define-public python2-pyrsistent
2773 (package-with-python2 python-pyrsistent))
2774
2775 (define-public python-exif-read
2776 (package
2777 (name "python-exif-read")
2778 (version "2.1.2")
2779 (source (origin
2780 (method url-fetch)
2781 (uri (pypi-uri "ExifRead" version))
2782 (sha256
2783 (base32
2784 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2785 (build-system python-build-system)
2786 (arguments `(#:tests? #f)) ; no tests
2787 (home-page "https://github.com/ianare/exif-py")
2788 (synopsis "Python library to extract EXIF data from image files")
2789 (description
2790 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2791 files.")
2792 (license license:bsd-3)))
2793
2794 (define-public python2-exif-read
2795 (package-with-python2 python-exif-read))
2796
2797 (define-public python-pyld
2798 (package
2799 (name "python-pyld")
2800 (version "1.0.5")
2801 (source (origin
2802 (method url-fetch)
2803 (uri (pypi-uri "PyLD" version))
2804 (sha256
2805 (base32
2806 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2807 (build-system python-build-system)
2808 (home-page "https://github.com/digitalbazaar/pyld")
2809 (synopsis "Python implementation of the JSON-LD specification")
2810 (description
2811 "PyLD is an implementation of the JSON-LD specification.")
2812 (license license:bsd-3)))
2813
2814 (define-public python2-pyld
2815 (package-with-python2 python-pyld))
2816
2817 (define-public python-cli-helpers
2818 (package
2819 (name "python-cli-helpers")
2820 (version "2.0.1")
2821 (source
2822 (origin
2823 ;; There's no source tarball on PyPI.
2824 (method git-fetch)
2825 (uri (git-reference
2826 (url "https://github.com/dbcli/cli_helpers")
2827 (commit (string-append "v" version))))
2828 (file-name (git-file-name name version))
2829 (sha256
2830 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2831 (build-system python-build-system)
2832 (native-inputs
2833 `(("python-pytest" ,python-pytest)))
2834 (propagated-inputs
2835 `(("python-wcwidth" ,python-wcwidth)
2836 ("python-configobj" ,python-configobj)
2837 ("python-tabulate" ,python-tabulate)
2838 ("python-terminaltables" ,python-terminaltables)))
2839 (home-page "https://github.com/dbcli/cli_helpers")
2840 (synopsis "Helpers for building command-line apps")
2841 (description
2842 "CLI Helpers is a Python package that makes it easy to perform common
2843 tasks when building command-line apps. It's a helper library for command-line
2844 interfaces.")
2845 (license license:bsd-3)))
2846
2847 (define-public python-click
2848 (package
2849 (name "python-click")
2850 (version "7.1.2")
2851 (source
2852 (origin
2853 (method url-fetch)
2854 (uri (pypi-uri "click" version))
2855 (sha256
2856 (base32
2857 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2858 (build-system python-build-system)
2859 (arguments
2860 `(#:phases
2861 (modify-phases %standard-phases
2862 (add-after 'unpack 'fix-paths
2863 (lambda* (#:key inputs #:allow-other-keys)
2864 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2865 "cross-libc" "libc"))))
2866 (substitute* "src/click/_unicodefun.py"
2867 (("'locale'")
2868 (string-append "'" glibc "/bin/locale'"))))
2869 #t))
2870 (replace 'check
2871 (lambda _
2872 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2873 (invoke "python" "-m" "pytest"))))))
2874 (native-inputs
2875 `(("python-pytest" ,python-pytest)))
2876 (home-page "https://palletsprojects.com/p/click/")
2877 (synopsis "Command line library for Python")
2878 (description
2879 "Click is a Python package for creating command line interfaces in a
2880 composable way with as little code as necessary. Its name stands for
2881 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2882 with sensible defaults out of the box.")
2883 (license license:bsd-3)))
2884
2885 (define-public python2-click
2886 (package-with-python2 python-click))
2887
2888 (define-public python-click-5
2889 (package (inherit python-click)
2890 (name "python-click")
2891 (version "5.1")
2892 (source
2893 (origin
2894 (method url-fetch)
2895 (uri (pypi-uri "click" version))
2896 (sha256
2897 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2898 (arguments `())))
2899
2900 (define-public python-vcversioner
2901 (package
2902 (name "python-vcversioner")
2903 (version "2.16.0.0")
2904 (source
2905 (origin
2906 (method url-fetch)
2907 (uri (pypi-uri "vcversioner" version))
2908 (sha256
2909 (base32
2910 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2911 (build-system python-build-system)
2912 (synopsis "Python library for version number discovery")
2913 (description "Vcversioner is a Python library that inspects tagging
2914 information in a variety of version control systems in order to discover
2915 version numbers.")
2916 (home-page "https://github.com/habnabit/vcversioner")
2917 (license license:isc)))
2918
2919 (define-public python2-vcversioner
2920 (package-with-python2 python-vcversioner))
2921
2922 (define-public python-jdcal
2923 (package
2924 (name "python-jdcal")
2925 (version "1.4")
2926 (source
2927 (origin
2928 (method url-fetch)
2929 (uri (pypi-uri "jdcal" version))
2930 (sha256
2931 (base32
2932 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2933 (build-system python-build-system)
2934 (arguments
2935 `(#:phases (modify-phases %standard-phases
2936 (replace 'check
2937 (lambda _
2938 (invoke "pytest"))))))
2939 (native-inputs
2940 `(("python-pytest" ,python-pytest)))
2941 (home-page "https://github.com/phn/jdcal")
2942 (synopsis "Functions to convert between Julian dates Gregorian dates")
2943 (description "This Python library provides functions for converting
2944 between Julian dates and Gregorian dates.")
2945 (license license:bsd-2)))
2946
2947 (define-public python2-jdcal
2948 (package-with-python2 python-jdcal))
2949
2950 (define-public python-jsondiff
2951 (package
2952 (name "python-jsondiff")
2953 (version "1.2.0")
2954 (source
2955 (origin
2956 (method url-fetch)
2957 (uri (pypi-uri "jsondiff" version))
2958 (sha256
2959 (base32
2960 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2961 (build-system python-build-system)
2962 (native-inputs
2963 `(("python-nose" ,python-nose)
2964 ("python-nose-random" ,python-nose-random)))
2965 (home-page
2966 "https://github.com/fzumstein/jsondiff")
2967 (synopsis "Compare JSON and JSON-like structures in Python")
2968 (description "@code{jsondiff} is a Python library which lets you
2969 compare, diff, and patch JSON and JSON-like structures in Python.")
2970 (license license:expat)))
2971
2972 (define-public python-jsonschema
2973 (package
2974 (name "python-jsonschema")
2975 (version "3.2.0")
2976 (source (origin
2977 (method url-fetch)
2978 (uri (pypi-uri "jsonschema" version))
2979 (sha256
2980 (base32
2981 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2982 (build-system python-build-system)
2983 (arguments
2984 '(#:phases
2985 (modify-phases %standard-phases
2986 (replace 'check
2987 (lambda* (#:key inputs outputs #:allow-other-keys)
2988 (add-installed-pythonpath inputs outputs)
2989 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2990 (invoke "trial" "jsonschema"))))))
2991 (native-inputs
2992 `(("python-setuptools_scm" ,python-setuptools-scm)
2993 ("python-twisted" ,python-twisted)))
2994 (propagated-inputs
2995 `(("python-attrs" ,python-attrs)
2996 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2997 ("python-pyrsistent" ,python-pyrsistent)
2998 ("python-six" ,python-six)))
2999 (home-page "https://github.com/Julian/jsonschema")
3000 (synopsis "Implementation of JSON Schema for Python")
3001 (description
3002 "Jsonschema is an implementation of JSON Schema for Python.")
3003 (license license:expat)
3004 (properties `((python2-variant . ,(delay python2-jsonschema))))))
3005
3006 (define-public python2-jsonschema
3007 (let ((jsonschema (package-with-python2
3008 (strip-python2-variant python-jsonschema))))
3009 (package/inherit jsonschema
3010 (propagated-inputs
3011 `(("python2-functools32" ,python2-functools32)
3012 ,@(package-propagated-inputs jsonschema))))))
3013
3014 (define-public python-schema
3015 (package
3016 (name "python-schema")
3017 (version "0.6.6")
3018 (source
3019 (origin
3020 (method url-fetch)
3021 (uri (pypi-uri "schema" version))
3022 (sha256
3023 (base32
3024 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
3025 (build-system python-build-system)
3026 (native-inputs
3027 `(("python-pytest" ,python-pytest)))
3028 (home-page "https://github.com/keleshev/schema")
3029 (synopsis "Simple data validation library")
3030 (description
3031 "@code{python-schema} is a library for validating Python data
3032 structures, such as those obtained from config-files, forms, external
3033 services or command-line parsing, converted from JSON/YAML (or
3034 something else) to Python data-types.")
3035 (license license:psfl)))
3036
3037 (define-public python2-schema
3038 (package-with-python2 python-schema))
3039
3040 (define-public python-schema-0.5
3041 (package (inherit python-schema)
3042 (version "0.5.0")
3043 (source
3044 (origin
3045 (method url-fetch)
3046 (uri (pypi-uri "schema" version))
3047 (sha256
3048 (base32
3049 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
3050
3051 (define-public python2-schema-0.5
3052 (package-with-python2 python-schema-0.5))
3053
3054 (define-public python-kitchen
3055 (package
3056 (name "python-kitchen")
3057 (version "1.2.5")
3058 (source
3059 (origin
3060 (method url-fetch)
3061 (uri (pypi-uri "kitchen" version))
3062 (sha256
3063 (base32
3064 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3065 (build-system python-build-system)
3066 (propagated-inputs
3067 `(("python-chardet" ,python-chardet)))
3068 (home-page "https://github.com/fedora-infra/kitchen")
3069 (synopsis "Python API for snippets")
3070 (description "@code{kitchen} module provides a python API for all sorts of
3071 little useful snippets of code that everybody ends up writing for their projects
3072 but never seem big enough to build an independent release. Use kitchen and stop
3073 cutting and pasting that code over and over.")
3074 (license (list license:lgpl2.1+
3075 ;; subprocess.py, test_subprocess.py,
3076 ;; kitchen/pycompat25/defaultdict.py:
3077 license:psfl))))
3078
3079 (define-public python2-kitchen
3080 (package-with-python2 python-kitchen))
3081
3082 (define-public python-roman
3083 (package
3084 (name "python-roman")
3085 (version "3.3")
3086 (source
3087 (origin
3088 (method url-fetch)
3089 (uri (pypi-uri "roman" version))
3090 (sha256
3091 (base32
3092 "0gyp2bmw47jgpm8j64gydzqq838bgxz5gh6cm57lxlr7p26sqiic"))))
3093 (build-system python-build-system)
3094 (home-page "https://github.com/zopefoundation/roman")
3095 (synopsis "Integer to Roman numerals converter")
3096 (description
3097 "This package provides a small helper library to convert Arabic Numbers
3098 to Roman Numerals.")
3099 (license license:psfl)))
3100
3101 (define-public python-unidecode
3102 (package
3103 (name "python-unidecode")
3104 (version "1.1.1")
3105 (source (origin
3106 (method url-fetch)
3107 (uri (pypi-uri "Unidecode" version))
3108 (sha256
3109 (base32
3110 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3111 (build-system python-build-system)
3112 (home-page "https://pypi.org/project/Unidecode/")
3113 (synopsis "ASCII transliterations of Unicode text")
3114 (description
3115 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3116 useful when integrating with legacy code that doesn't support Unicode, or for
3117 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3118 machine identifiers from human-readable Unicode strings that should still be
3119 somewhat intelligible.")
3120 (license license:gpl2+)))
3121
3122 (define-public python2-unidecode
3123 (package-with-python2 python-unidecode))
3124
3125 (define-public python-text-unidecode
3126 (package
3127 (name "python-text-unidecode")
3128 (version "1.3")
3129 (source (origin
3130 (method url-fetch)
3131 (uri (pypi-uri "text-unidecode" version))
3132 (sha256
3133 (base32
3134 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3135 (build-system python-build-system)
3136 (arguments
3137 '(#:phases (modify-phases %standard-phases
3138 (replace 'check
3139 (lambda _
3140 (setenv "PYTHONPATH"
3141 (string-append "./build/lib:"
3142 (getenv "PYTHONPATH")))
3143 (invoke "pytest" "-vv"))))))
3144 (native-inputs
3145 `(("python-pytest" ,python-pytest)))
3146 (home-page "https://github.com/kmike/text-unidecode/")
3147 (synopsis "Decode Unicode data")
3148 (description
3149 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3150 Perl library. It can create ASCII representations of Unicode data. In general
3151 users should prefer the @code{python-unidecode} package which offers better
3152 memory usage and transliteration quality.")
3153 ;; The user can choose either license.
3154 (license (list license:clarified-artistic license:gpl2+))))
3155
3156 (define-public python2-text-unidecode
3157 (package-with-python2 python-text-unidecode))
3158
3159 (define-public python-pyjwt
3160 (package
3161 (name "python-pyjwt")
3162 (version "1.7.1")
3163 (source
3164 (origin
3165 (method url-fetch)
3166 (uri (pypi-uri "PyJWT" version))
3167 (sha256
3168 (base32
3169 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3170 (modules '((guix build utils)))
3171 (snippet
3172 '(begin
3173 (for-each delete-file-recursively
3174 (find-files "." "\\.pyc$"))
3175 #t))))
3176 (build-system python-build-system)
3177 (arguments
3178 '(#:phases (modify-phases %standard-phases
3179 (replace 'check
3180 (lambda _
3181 ;; Mimic upstream commit 3a20892442b34c7 to get
3182 ;; rid of dependency on pytest-runner < 5.0.
3183 ;; Remove substitution for PyJWT > 1.7.1.
3184 (substitute* "setup.py"
3185 ((".*pytest-runner.*")
3186 ""))
3187 (invoke "pytest" "-vv"))))))
3188 (native-inputs
3189 `(("python-pytest" ,python-pytest)
3190 ("python-pytest-cov" ,python-pytest-cov)))
3191 (home-page "https://github.com/progrium/pyjwt")
3192 (synopsis "JSON Web Token implementation in Python")
3193 (description
3194 "PyJWT is a JSON Web Token implementation written in Python.")
3195 (license license:expat)))
3196
3197 (define-public python2-pyjwt
3198 (package-with-python2 python-pyjwt))
3199
3200 (define-public python-pykka
3201 (package
3202 (name "python-pykka")
3203 (version "1.2.1")
3204 (source
3205 (origin
3206 (method url-fetch)
3207 (uri (pypi-uri "Pykka" version))
3208 (sha256
3209 (base32
3210 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
3211 (build-system python-build-system)
3212 (native-inputs
3213 `(("python-mock" ,python-mock)
3214 ("python-nose" ,python-nose)
3215 ("python-gevent" ,python-gevent)
3216 ("python-eventlet" ,python-eventlet)))
3217 (home-page "https://www.pykka.org/")
3218 (synopsis "Pykka is a Python implementation of the actor model")
3219 (description
3220 "Pykka is a Python implementation of the actor model.
3221 The actor model introduces some simple rules to control the sharing
3222 of state and cooperation between execution units, which makes it
3223 easier to build concurrent applications.")
3224 (license license:asl2.0)))
3225
3226 (define-public python-pymsgbox
3227 (package
3228 (name "python-pymsgbox")
3229 (version "1.0.6")
3230 (source
3231 (origin
3232 (method git-fetch)
3233 (uri (git-reference
3234 ;; LICENSE.txt is not present on pypi
3235 (url "https://github.com/asweigart/PyMsgBox")
3236 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3237 (file-name (git-file-name name version))
3238 (sha256
3239 (base32
3240 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3241 (arguments
3242 ;; Circular dependency to run tests:
3243 ;; Tests need pyautogui, which depends on pymsgbox.
3244 '(#:tests? #f))
3245 (build-system python-build-system)
3246 (home-page "https://github.com/asweigart/PyMsgBox")
3247 (synopsis "Python module for JavaScript-like message boxes")
3248 (description
3249 "PyMsgBox is a simple, cross-platform, pure Python module for
3250 JavaScript-like message boxes. Types of dialog boxes include:
3251 @enumerate
3252 @item alert
3253 @item confirm
3254 @item prompt
3255 @item password
3256 @end enumerate
3257 ")
3258 (license license:bsd-3)))
3259
3260 (define-public python-pympler
3261 (package
3262 (name "python-pympler")
3263 (home-page "https://pythonhosted.org/Pympler/")
3264 (version "0.8")
3265 (source (origin
3266 (method url-fetch)
3267 (uri (pypi-uri "Pympler" version))
3268 (sha256
3269 (base32
3270 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3271 (build-system python-build-system)
3272 (arguments
3273 `(#:phases (modify-phases %standard-phases
3274 (delete 'check)
3275 (add-after 'install 'check
3276 (lambda* (#:key inputs outputs #:allow-other-keys)
3277 (add-installed-pythonpath inputs outputs)
3278 (invoke "python" "setup.py" "test"))))))
3279 (synopsis "Measure, monitor and analyze memory behavior")
3280 (description
3281 "Pympler is a development tool to measure, monitor and analyze
3282 the memory behavior of Python objects in a running Python application.
3283
3284 By pympling a Python application, detailed insight in the size and the
3285 lifetime of Python objects can be obtained. Undesirable or unexpected
3286 runtime behavior like memory bloat and other @samp{pymples} can easily
3287 be identified.
3288
3289 A web profiling frontend exposes process statistics, garbage
3290 visualisation and class tracker statistics.")
3291 (license license:asl2.0)))
3292
3293 (define-public python2-pympler
3294 (package-with-python2 python-pympler))
3295
3296 (define-public python-itsdangerous
3297 (package
3298 (name "python-itsdangerous")
3299 (version "1.1.0")
3300 (source
3301 (origin
3302 (method url-fetch)
3303 (uri (pypi-uri "itsdangerous" version))
3304 (sha256
3305 (base32
3306 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3307 (build-system python-build-system)
3308 (home-page "https://palletsprojects.com/p/itsdangerous/")
3309 (synopsis "Python library for passing data to/from untrusted environments")
3310 (description
3311 "Itsdangerous provides various helpers to pass trusted data to untrusted
3312 environments and back.")
3313 (license license:bsd-3)))
3314
3315 (define-public python2-itsdangerous
3316 (package-with-python2 python-itsdangerous))
3317
3318 (define-public python-pyyaml
3319 (package
3320 (name "python-pyyaml")
3321 (version "5.3.1")
3322 (source
3323 (origin
3324 (method url-fetch)
3325 (uri (pypi-uri "PyYAML" version))
3326 (sha256
3327 (base32
3328 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3329 (build-system python-build-system)
3330 (inputs
3331 `(("libyaml" ,libyaml)))
3332 (home-page "https://pyyaml.org")
3333 (synopsis "YAML parser and emitter for Python")
3334 (description
3335 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3336 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3337 API, and sensible error messages. PyYAML supports standard YAML tags and
3338 provides Python-specific tags that represent an arbitrary Python object.")
3339 (license license:expat)))
3340
3341 (define-public python2-pyyaml
3342 (package-with-python2 python-pyyaml))
3343
3344 (define-public python-vine
3345 (package
3346 (name "python-vine")
3347 (version "1.1.4")
3348 (source
3349 (origin
3350 (method url-fetch)
3351 (uri (pypi-uri "vine" version))
3352 (sha256
3353 (base32
3354 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3355 (build-system python-build-system)
3356 (native-inputs
3357 `(("python-pytest" ,python-pytest)
3358 ("python-case" ,python-case)))
3359 (home-page "https://github.com/celery/vine")
3360 (synopsis "Promises for Python")
3361 (description
3362 "@code{vine} provides a special implementation of promises in that it can
3363 be used both for \"promise of a value\" and lazy evaluation. The biggest
3364 upside for this is that everything in a promise can also be a promise,
3365 e.g. filters, callbacks and errbacks can all be promises.")
3366 (license license:bsd-3)))
3367
3368 (define-public python-virtualenv
3369 (package
3370 (name "python-virtualenv")
3371 (version "20.2.1")
3372 (source
3373 (origin
3374 (method url-fetch)
3375 (uri (pypi-uri "virtualenv" version))
3376 (sha256
3377 (base32
3378 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3379 (build-system python-build-system)
3380 (native-inputs
3381 `(("python-mock" ,python-mock)
3382 ("python-pytest" ,python-pytest)
3383 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3384 ;; be an input at all". However, removing the input makes the build error:
3385 ;; File "setup.py", line 4, in <module>
3386 ;; raise RuntimeError("setuptools >= 41 required to build")
3387 ("python-setuptools" ,python-setuptools)
3388 ("python-setuptools-scm" ,python-setuptools-scm)))
3389 (propagated-inputs
3390 `(("python-appdirs" ,python-appdirs)
3391 ("python-distlib" ,python-distlib/next)
3392 ("python-filelock" ,python-filelock)
3393 ("python-six" ,python-six)
3394 ("python-importlib-metadata" ,python-importlib-metadata)))
3395 (home-page "https://virtualenv.pypa.io/")
3396 (synopsis "Virtual Python environment builder")
3397 (description
3398 "Virtualenv is a tool to create isolated Python environments.")
3399 (license license:expat)))
3400
3401 (define-public python-markupsafe
3402 (package
3403 (name "python-markupsafe")
3404 (version "1.1.1")
3405 (source
3406 (origin
3407 (method url-fetch)
3408 (uri (pypi-uri "MarkupSafe" version))
3409 (sha256
3410 (base32
3411 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3412 (build-system python-build-system)
3413 (arguments
3414 `(#:modules ((ice-9 ftw)
3415 (srfi srfi-1)
3416 (srfi srfi-26)
3417 (guix build utils)
3418 (guix build python-build-system))
3419 #:phases (modify-phases %standard-phases
3420 (replace 'check
3421 (lambda _
3422 (let ((cwd (getcwd))
3423 (libdir (find (cut string-prefix? "lib." <>)
3424 (scandir "build"))))
3425 (setenv "PYTHONPATH"
3426 (string-append cwd "/build/" libdir ":"
3427 (getenv "PYTHONPATH")))
3428 (invoke "pytest" "-vv")))))))
3429 (native-inputs
3430 `(("python-pytest" ,python-pytest)))
3431 (home-page "https://github.com/mitsuhiko/markupsafe")
3432 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3433 (description
3434 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3435 for Python.")
3436 (license license:bsd-3)))
3437
3438 (define-public python2-markupsafe
3439 (package-with-python2 python-markupsafe))
3440
3441 (define-public python-jinja2
3442 (package
3443 (name "python-jinja2")
3444 (version "2.11.2")
3445 (source
3446 (origin
3447 (method url-fetch)
3448 (uri (pypi-uri "Jinja2" version))
3449 (sha256
3450 (base32
3451 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3452 (build-system python-build-system)
3453 (arguments
3454 '(#:phases (modify-phases %standard-phases
3455 (replace 'check
3456 (lambda* (#:key tests? #:allow-other-keys)
3457 (if tests?
3458 (begin
3459 (setenv "PYTHONPATH"
3460 (string-append "./build/lib:"
3461 (getenv "PYTHONPATH")))
3462 (invoke "pytest" "-vv"))
3463 (format #t "test suite not run~%"))
3464 #t)))))
3465 (native-inputs
3466 `(("python-pytest" ,python-pytest)))
3467 (propagated-inputs
3468 `(("python-markupsafe" ,python-markupsafe)))
3469 (home-page "http://jinja.pocoo.org/")
3470 (synopsis "Python template engine")
3471 (description
3472 "Jinja2 is a small but fast and easy to use stand-alone template engine
3473 written in pure Python.")
3474 (license license:bsd-3)))
3475
3476 (define-public python2-jinja2
3477 (package-with-python2 python-jinja2))
3478
3479 (define-public python-jinja2-time
3480 (package
3481 (name "python-jinja2-time")
3482 (version "0.2.0")
3483 (source
3484 (origin
3485 (method url-fetch)
3486 (uri (pypi-uri "jinja2-time" version))
3487 (sha256
3488 (base32
3489 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3490 (build-system python-build-system)
3491 (propagated-inputs
3492 `(("python-arrow" ,python-arrow)
3493 ("python-jinja2" ,python-jinja2)))
3494 (home-page
3495 "https://github.com/hackebrot/jinja2-time")
3496 (synopsis "Jinja2 Extension for Dates and Times")
3497 (description
3498 "This package provides an extension for the template engine Jinja2. It
3499 adds a 'now' tag providing a convenient access to the arrow.now() API from
3500 templates. A format string can be provided to control the output.")
3501 (license license:expat)))
3502
3503 (define-public python-pystache
3504 (package
3505 (name "python-pystache")
3506 (version "0.5.4")
3507 (source (origin
3508 (method url-fetch)
3509 (uri (pypi-uri "pystache" version))
3510 (sha256
3511 (base32
3512 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3513 (build-system python-build-system)
3514 (arguments
3515 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3516 (home-page "http://defunkt.io/pystache/")
3517 (synopsis "Python logic-less template engine")
3518 (description
3519 "Pystache is a Python implementation of the framework agnostic,
3520 logic-free templating system Mustache.")
3521 (license license:expat)
3522 (properties `((python2-variant . ,(delay python2-pystache))))))
3523
3524 (define-public python2-pystache
3525 (let ((base (package-with-python2
3526 (strip-python2-variant python-pystache))))
3527 (package/inherit base
3528 (arguments
3529 `(#:python ,python-2
3530 #:phases
3531 (modify-phases %standard-phases
3532 (replace 'check
3533 (lambda _
3534 (invoke "python" "test_pystache.py")))))))))
3535
3536 (define-public python-joblib
3537 (package
3538 (name "python-joblib")
3539 (version "0.14.1")
3540 (source (origin
3541 (method url-fetch)
3542 (uri (pypi-uri "joblib" version))
3543 (sha256
3544 (base32
3545 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3546 (build-system python-build-system)
3547 (arguments
3548 `(#:phases
3549 (modify-phases %standard-phases
3550 (replace 'check
3551 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3552 (native-inputs
3553 `(("python-pytest" ,python-pytest)))
3554 (home-page "https://joblib.readthedocs.io/")
3555 (synopsis "Using Python functions as pipeline jobs")
3556 (description
3557 "Joblib is a set of tools to provide lightweight pipelining in Python.
3558 In particular, joblib offers: transparent disk-caching of the output values
3559 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3560 logging and tracing of the execution.")
3561 (license license:bsd-3)))
3562
3563 (define-public python2-joblib
3564 (package-with-python2 python-joblib))
3565
3566 (define-public python-daemon
3567 (package
3568 (name "python-daemon")
3569 (version "2.2.3")
3570 (source
3571 (origin
3572 (method url-fetch)
3573 (uri (pypi-uri "python-daemon" version))
3574 (sha256
3575 (base32
3576 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3577 (build-system python-build-system)
3578 (arguments
3579 `(#:phases
3580 (modify-phases %standard-phases
3581 (add-before 'check 'disable-tests
3582 (lambda _
3583 ;; FIXME: Determine why test fails
3584 (substitute* "test/test_daemon.py"
3585 (("test_detaches_process_context")
3586 "skip_test_detaches_process_context"))
3587 #t)))))
3588 (propagated-inputs
3589 `(("python-lockfile" ,python-lockfile)))
3590 (native-inputs
3591 `(("python-unittest2" ,python-unittest2)
3592 ("python-testtools" ,python-testtools)
3593 ("python-testscenarios" ,python-testscenarios)
3594 ("python-mock" ,python-mock)
3595 ("python-docutils" ,python-docutils)))
3596 (home-page "https://pagure.io/python-daemon/")
3597 (synopsis "Python library for making a Unix daemon process")
3598 (description "Python-daemon is a library that assists a Python program to
3599 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3600
3601 This library provides a @code{DaemonContext} class that manages the following
3602 important tasks for becoming a daemon process:
3603 @enumerate
3604 @item Detach the process into its own process group.
3605 @item Set process environment appropriate for running inside a chroot.
3606 @item Renounce suid and sgid privileges.
3607 @item Close all open file descriptors.
3608 @item Change the working directory, uid, gid, and umask.
3609 @item Set appropriate signal handlers.
3610 @item Open new file descriptors for stdin, stdout, and stderr.
3611 @item Manage a specified PID lock file.
3612 @item Register cleanup functions for at-exit processing.
3613 @end enumerate")
3614 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3615 (license (list license:asl2.0 license:gpl3+))))
3616
3617 (define-public python-anytree
3618 (package
3619 (name "python-anytree")
3620 (version "2.8.0")
3621 (source (origin
3622 (method url-fetch)
3623 (uri (pypi-uri "anytree" version))
3624 (sha256
3625 (base32
3626 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3627 (build-system python-build-system)
3628 (propagated-inputs
3629 `(("python-six" ,python-six)))
3630 (native-inputs
3631 `(;; For tests.
3632 ("graphviz" ,graphviz) ;for 'dot'
3633 ("python-nose" ,python-nose)))
3634 (home-page "https://github.com/c0fec0de/anytree")
3635 (synopsis "Lightweight tree data library")
3636 (description
3637 "@code{anytree} is a simple, lightweight, and extensible tree data
3638 structure for Python.")
3639 (license license:asl2.0)))
3640
3641 (define-public python-docutils
3642 (package
3643 (name "python-docutils")
3644 (version "0.16")
3645 (source
3646 (origin
3647 (method url-fetch)
3648 (uri (pypi-uri "docutils" version))
3649 (sha256
3650 (base32
3651 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3652 (build-system python-build-system)
3653 (arguments
3654 '(#:phases (modify-phases %standard-phases
3655 (replace 'check
3656 (lambda* (#:key tests? #:allow-other-keys)
3657 (if tests?
3658 (invoke "python" "test/alltests.py")
3659 (format #t "test suite not run~%"))
3660 #t)))))
3661 (home-page "http://docutils.sourceforge.net/")
3662 (synopsis "Python Documentation Utilities")
3663 (description
3664 "Docutils is a modular system for processing documentation into useful
3665 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3666 easy to use markup language, for input.
3667
3668 This package provides tools for converting @file{.rst} files to other formats
3669 via commands such as @command{rst2man}, as well as supporting Python code.")
3670 ;; Most of the source code is public domain, but some source files are
3671 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3672 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3673
3674 (define-public python2-docutils
3675 (package-with-python2 python-docutils))
3676
3677 ;; python2-sphinx fails its test suite with newer versions.
3678 (define-public python2-docutils-0.14
3679 (package
3680 (inherit python2-docutils)
3681 (version "0.14")
3682 (source (origin
3683 (method url-fetch)
3684 (uri (pypi-uri "docutils" version))
3685 (sha256
3686 (base32
3687 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3688
3689 (define-public python-restructuredtext-lint
3690 (package
3691 (name "python-restructuredtext-lint")
3692 (version "1.3.0")
3693 (source
3694 (origin
3695 (method url-fetch)
3696 (uri (pypi-uri "restructuredtext-lint" version))
3697 (sha256
3698 (base32
3699 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3700 (build-system python-build-system)
3701 (arguments
3702 `(#:phases
3703 (modify-phases %standard-phases
3704 (delete 'check)
3705 (add-after 'install 'check
3706 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3707 (when tests?
3708 (add-installed-pythonpath inputs outputs)
3709 (invoke "nosetests" "-v"))
3710 #t)))))
3711 (propagated-inputs
3712 `(("python-docutils" ,python-docutils)))
3713 (native-inputs
3714 `(("python-nose" ,python-nose)))
3715 (home-page "https://github.com/twolfson/restructuredtext-lint")
3716 (synopsis "reStructuredText linter")
3717 (description "This package provides a linter for the reStructuredText
3718 format.")
3719 (license license:unlicense)))
3720
3721 (define-public python-doc8
3722 (package
3723 (name "python-doc8")
3724 (version "0.8.0")
3725 (source
3726 (origin
3727 (method url-fetch)
3728 (uri (pypi-uri "doc8" version))
3729 (sha256
3730 (base32
3731 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3732 (build-system python-build-system)
3733 (arguments
3734 `(#:phases
3735 (modify-phases %standard-phases
3736 (delete 'check)
3737 (add-after 'install 'check
3738 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3739 (when tests?
3740 (add-installed-pythonpath inputs outputs)
3741 (invoke "pytest" "-v"))
3742 #t)))))
3743 (propagated-inputs
3744 `(("python-chardet" ,python-chardet)
3745 ("python-docutils" ,python-docutils)
3746 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3747 ("python-six" ,python-six)
3748 ("python-stevedore" ,python-stevedore)))
3749 (native-inputs
3750 `(("python-testtools" ,python-testtools)
3751 ("python-pytest" ,python-pytest)))
3752 (home-page "https://launchpad.net/doc8")
3753 (synopsis
3754 "Style checker for Sphinx (or other) RST documentation")
3755 (description
3756 "Doc8 is an opinionated style checker for reStructured Text and plain
3757 text styles of documentation.")
3758 (license license:asl2.0)))
3759
3760 (define-public python-pygments
3761 (package
3762 (name "python-pygments")
3763 (version "2.7.3")
3764 (source
3765 (origin
3766 (method url-fetch)
3767 (uri (pypi-uri "Pygments" version))
3768 (sha256
3769 (base32
3770 "05mps9r966r3dpqw6zrs1nlwjdf5y4960hl9m7abwb3qyfnarwyc"))))
3771 (replacement python-pygments/fixed)
3772 (build-system python-build-system)
3773 (arguments
3774 ;; FIXME: Tests require sphinx, which depends on this.
3775 '(#:tests? #f))
3776 (home-page "https://pygments.org/")
3777 (synopsis "Syntax highlighting")
3778 (description
3779 "Pygments is a syntax highlighting package written in Python.")
3780 (license license:bsd-2)
3781 (properties `((python2-variant . ,(delay python2-pygments))))))
3782
3783 (define python-pygments/fixed
3784 (package/inherit python-pygments
3785 (version "2.7.4")
3786 (source
3787 (origin
3788 (method url-fetch)
3789 (uri (pypi-uri "Pygments" version))
3790 (sha256
3791 (base32
3792 "0dy35ry5qa8dpklk4fkj9kfpw2qb4mh5ha9866kw30wf96dx0jfz"))))))
3793
3794 ;; Pygments 2.6 and later does not support Python 2.
3795 (define-public python2-pygments
3796 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3797 (package
3798 (inherit base)
3799 (version "2.5.2")
3800 (source (origin
3801 (method url-fetch)
3802 (uri (pypi-uri "Pygments" version))
3803 (sha256
3804 (base32
3805 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3806
3807 (define-public python-pygments-github-lexers
3808 (package
3809 (name "python-pygments-github-lexers")
3810 (version "0.0.5")
3811 (source
3812 (origin
3813 (method url-fetch)
3814 (uri (pypi-uri "pygments-github-lexers" version))
3815 (sha256
3816 (base32
3817 "0cz14clcc9z4pn79ll8hp3xzgsrfjscak5zfsvlgrz6ngkkmgjma"))))
3818 (build-system python-build-system)
3819 (propagated-inputs
3820 `(("python-pygments" ,python-pygments)))
3821 (home-page "https://github.com/liluo/pygments-github-lexers")
3822 (synopsis "Pygments Github custom lexers")
3823 (description "This package installs Github custom lexers to Pygments.")
3824 (license license:bsd-3)))
3825
3826 (define-public python-bump2version
3827 (package
3828 (name "python-bump2version")
3829 (version "1.0.1")
3830 (source
3831 (origin
3832 (method url-fetch)
3833 (uri (pypi-uri "bump2version" version))
3834 (sha256
3835 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
3836 (build-system python-build-system)
3837 (arguments
3838 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
3839 ;; required: --new-version".
3840 `(#:tests? #false))
3841 (home-page "https://github.com/c4urself/bump2version")
3842 (synopsis "Version-bump your software with a single command!")
3843 (description
3844 "This package provides a small command line tool to simplify releasing
3845 software by updating all version strings in your source code by the correct
3846 increment. It also creates commits and tags.")
3847 (license license:expat)))
3848
3849 (define-public python-bumpversion
3850 (package
3851 (name "python-bumpversion")
3852 (version "0.5.3")
3853 (source
3854 (origin
3855 (method url-fetch)
3856 (uri (pypi-uri "bumpversion" version))
3857 (sha256
3858 (base32
3859 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3860 (build-system python-build-system)
3861 (home-page "https://github.com/peritus/bumpversion")
3862 (synopsis "Tool to bump software version")
3863 (description "This tool provides a command-line interface (CLI) to bump a
3864 software version simply.")
3865 (license license:expat)))
3866
3867 (define-public python-deprecated
3868 (package
3869 (name "python-deprecated")
3870 (version "1.2.5")
3871 (source
3872 (origin
3873 (method git-fetch)
3874 (uri (git-reference
3875 (url "https://github.com/tantale/deprecated")
3876 (commit (string-append "v" version))))
3877 (file-name (git-file-name name version))
3878 (sha256
3879 (base32
3880 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3881 (build-system python-build-system)
3882 (arguments
3883 `(#:phases (modify-phases %standard-phases
3884 (replace 'check
3885 (lambda _
3886 (invoke "pytest"))))))
3887 (propagated-inputs
3888 `(("python-wrapt" ,python-wrapt)))
3889 (native-inputs
3890 `(("python-bumpversion" ,python-bumpversion)
3891 ("python-pytest" ,python-pytest)
3892 ("python-pytest-cov" ,python-pytest-cov)
3893 ("python-sphinx" ,python-sphinx)
3894 ("python-tox" ,python-tox)))
3895 (home-page "https://github.com/tantale/deprecated")
3896 (synopsis "Python decorator to deprecate classes, functions or methods")
3897 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3898 to deprecate classes, functions or methods.")
3899 (license license:expat)))
3900
3901 (define-public python-pygithub
3902 (package
3903 (name "python-pygithub")
3904 (version "1.54.1")
3905 (source
3906 ;; We fetch from the Git repo because there are no tests in the PyPI
3907 ;; archive.
3908 (origin
3909 (method git-fetch)
3910 (uri (git-reference
3911 (url "https://github.com/PyGithub/PyGithub")
3912 (commit (string-append "v" version))))
3913 (file-name (git-file-name name version))
3914 (sha256
3915 (base32 "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"))))
3916 (build-system python-build-system)
3917 (arguments
3918 `(#:phases
3919 (modify-phases %standard-phases
3920 (replace 'check
3921 (lambda* (#:key tests? #:allow-other-keys)
3922 (when tests?
3923 (invoke "pytest"))
3924 #t)))))
3925 (propagated-inputs
3926 `(("python-cryptography" ,python-cryptography)
3927 ("python-deprecated" ,python-deprecated)
3928 ("python-pyjwt" ,python-pyjwt)
3929 ("python-requests" ,python-requests)))
3930 (native-inputs
3931 `(("python-httpretty" ,python-httpretty)
3932 ("python-pytest" ,python-pytest)))
3933 (home-page "https://pygithub.readthedocs.io/en/latest/")
3934 (synopsis "Python library for the GitHub API")
3935 (description "This library allows managing GitHub resources such as
3936 repositories, user profiles, and organizations in your Python applications,
3937 using version 3 of the GitHub application programming interface (API).")
3938 (license license:lgpl3+)))
3939
3940 (define-public python-rellu
3941 (package
3942 (name "python-rellu")
3943 (version "0.7")
3944 (source
3945 (origin
3946 (method url-fetch)
3947 (uri (pypi-uri "rellu" version))
3948 (sha256
3949 (base32
3950 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3951 (build-system python-build-system)
3952 (propagated-inputs
3953 `(("python-invoke" ,python-invoke)
3954 ("python-pygithub" ,python-pygithub)))
3955 (home-page "https://github.com/robotframework/rellu")
3956 (synopsis "Utilities to create PyPI releases")
3957 (description "This collection of utilities contains tooling and templates
3958 to assist in creating releases on GitHub and publishing them on PyPI. It is
3959 designed to be used by Robot Framework and tools and libraries in its
3960 ecosystem, but can naturally be used also by other projects.")
3961 (license license:asl2.0)))
3962
3963 (define-public python-robotframework
3964 (package
3965 (name "python-robotframework")
3966 (version "3.2.2")
3967 ;; There are no tests in the PyPI archive.
3968 (source
3969 (origin
3970 (method git-fetch)
3971 (uri (git-reference
3972 (url "https://github.com/robotframework/robotframework")
3973 (commit (string-append "v" version))))
3974 (file-name (git-file-name name version))
3975 (sha256
3976 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3977 (patches (search-patches
3978 "python-robotframework-source-date-epoch.patch"))))
3979 (build-system python-build-system)
3980 (arguments
3981 `(#:phases (modify-phases %standard-phases
3982 (add-before 'build 'build-and-install-doc
3983 (lambda* (#:key outputs #:allow-other-keys)
3984 (let* ((doc-output (assoc-ref outputs "doc"))
3985 (doc (string-append doc-output "/share/"
3986 ,name "-" ,version "/")))
3987 (invoke "invoke" "library-docs" "all")
3988 (mkdir-p doc)
3989 (copy-recursively "doc/libraries"
3990 (string-append doc "/libraries"))
3991 #t)))
3992 (replace 'check
3993 (lambda* (#:key inputs #:allow-other-keys)
3994 ;; Some tests require timezone data. Otherwise, they
3995 ;; look up /etc/localtime, which doesn't exist, and fail
3996 ;; with:
3997 ;;
3998 ;; OverflowError: mktime argument out of range
3999 (setenv "TZDIR"
4000 (string-append (assoc-ref inputs "tzdata")
4001 "/share/zoneinfo"))
4002 (setenv "TZ" "Europe/Paris")
4003
4004 (invoke "python" "utest/run.py"))))))
4005 (native-inputs
4006 `(("python-invoke" ,python-invoke)
4007 ("python-rellu" ,python-rellu)
4008 ("python:tk" ,python "tk") ;used when building the HTML doc
4009 ("tzdata" ,tzdata-for-tests)))
4010 (outputs '("out" "doc"))
4011 (home-page "https://robotframework.org")
4012 (synopsis "Generic automation framework")
4013 (description "Robot Framework is a generic automation framework for
4014 acceptance testing, acceptance test driven development (ATDD), and robotic
4015 process automation (RPA).")
4016 (license license:asl2.0)))
4017
4018 (define-public python-robotframework-lint
4019 ;; There is no properly tagged release; the commit below seems to correspond
4020 ;; to the 0.9 stable release available from PyPI. The tests are not
4021 ;; included in the PyPI archive, so we fetch the sources from the upstream
4022 ;; Git repo.
4023 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
4024 (revision "0"))
4025 (package
4026 (name "python-robotframework-lint")
4027 (version (git-version "1.1" ;version taken from 'rflint/version.py'
4028 revision commit))
4029 (source
4030 (origin
4031 (method git-fetch)
4032 (uri (git-reference
4033 (url "https://github.com/boakley/robotframework-lint")
4034 (commit commit)))
4035 (file-name (git-file-name name version))
4036 (sha256
4037 (base32
4038 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
4039 (build-system python-build-system)
4040 (arguments
4041 `(#:phases
4042 (modify-phases %standard-phases
4043 (replace 'check
4044 (lambda _
4045 (invoke "python" "-m" "robot" "-A"
4046 "tests/conf/default.args" "tests"))))))
4047 (propagated-inputs
4048 `(("python-robotframework" ,python-robotframework)))
4049 (home-page "https://github.com/boakley/robotframework-lint/")
4050 (synopsis "Static analysis tool (linter) for Robot Framework")
4051 (description "This package provides the @code{rflint} command-line
4052 utility, a static analysis tool (linter) for Robot Framework source files.")
4053 (license license:asl2.0))))
4054
4055 (define-public python-robotframework-sshlibrary
4056 (package
4057 (name "python-robotframework-sshlibrary")
4058 (version "3.3.0")
4059 ;; There are no tests in the PyPI archive.
4060 (source
4061 (origin
4062 (method git-fetch)
4063 (uri (git-reference
4064 (url "https://github.com/robotframework/SSHLibrary")
4065 (commit (string-append "v" version))))
4066 (file-name (git-file-name name version))
4067 (sha256
4068 (base32
4069 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
4070 (build-system python-build-system)
4071 (arguments
4072 `(#:phases
4073 (modify-phases %standard-phases
4074 (add-before 'build 'build-and-install-doc
4075 (lambda* (#:key outputs #:allow-other-keys)
4076 (let* ((doc-output (assoc-ref outputs "doc"))
4077 (doc (string-append doc-output "/share/"
4078 ,name "-" ,version "/")))
4079 (invoke "chmod" "-R" "+w" "docs")
4080 (invoke "invoke" "kw-docs" "project-docs")
4081 (mkdir-p doc)
4082 (for-each delete-file (find-files "docs" "\\.rst"))
4083 (copy-recursively "docs" doc)
4084 #t)))
4085 (replace 'check
4086 (lambda _
4087 ;; Some tests require an SSH server; we remove them.
4088 (delete-file "utest/test_client_api.py")
4089 (delete-file "utest/test_scp.py")
4090 (invoke "python" "utest/run.py"))))))
4091 (propagated-inputs
4092 `(("python-robotframework" ,python-robotframework)
4093 ("python-paramiko" ,python-paramiko)
4094 ("python-scp" ,python-scp)))
4095 (native-inputs
4096 `(("openssh" ,openssh)
4097 ("which" ,which)
4098 ;; To generate the documentation
4099 ("python-docutils" ,python-docutils)
4100 ("python-invoke" ,python-invoke)
4101 ("python-pygments" ,python-pygments)
4102 ("python-rellu" ,python-rellu)))
4103 (outputs '("out" "doc"))
4104 (home-page "https://github.com/robotframework/SSHLibrary")
4105 (synopsis "Robot Framework library for SSH and SFTP")
4106 (description "SSHLibrary is a Robot Framework library providing support
4107 for SSH and SFTP. It has the following main usages:
4108 @itemize @bullet
4109 @item Executing commands on the remote machine, either blocking or non-blocking.
4110 @item Writing and reading in an interactive shell.
4111 @item Transferring files and directories over SFTP.
4112 @item Ensuring that files and directories exist on the remote machine.
4113 @end itemize")
4114 (license license:asl2.0)))
4115
4116 (define-public python-rstr
4117 (package
4118 (name "python-rstr")
4119 (version "2.2.6")
4120 (source
4121 (origin
4122 (method url-fetch)
4123 (uri (pypi-uri "rstr" version))
4124 (sha256
4125 (base32
4126 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
4127 (build-system python-build-system)
4128 (home-page "https://github.com/leapfrogonline/rstr")
4129 (synopsis "Generate random strings in Python")
4130 (description "This package provides a python module for generating
4131 random strings of various types. It could be useful for fuzz testing,
4132 generating dummy data, or other applications. It has no dependencies
4133 outside the standard library.")
4134 (license license:bsd-3)))
4135
4136 (define-public python-scp
4137 (package
4138 (name "python-scp")
4139 (version "0.13.3")
4140 (source
4141 (origin
4142 (method url-fetch)
4143 (uri (pypi-uri "scp" version))
4144 (sha256
4145 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4146 (build-system python-build-system)
4147 (arguments
4148 '(#:tests? #f)) ;tests require an SSH server
4149 (propagated-inputs
4150 `(("python-paramiko" ,python-paramiko)))
4151 (home-page "https://github.com/jbardin/scp.py")
4152 (synopsis "SCP protocol module for Python and Paramiko")
4153 (description "The scp module extends the Paramiko library to send and
4154 receive files via the SCP1 protocol, as implemented by the OpenSSH
4155 @command{scp} program.")
4156 (license license:gpl2+)))
4157
4158 (define-public python-rst.linker
4159 (package
4160 (name "python-rst.linker")
4161 (version "1.11")
4162 (source
4163 (origin
4164 (method url-fetch)
4165 (uri (pypi-uri "rst.linker" version))
4166 (sha256
4167 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4168 (build-system python-build-system)
4169 (propagated-inputs
4170 `(("python-dateutil" ,python-dateutil)
4171 ("python-six" ,python-six)))
4172 (native-inputs
4173 `(("python-setuptools-scm" ,python-setuptools-scm)))
4174 ;; Test would require path.py, which would introduce a cyclic dependence.
4175 (arguments `(#:tests? #f))
4176 ;; Note: As of version 1.7 the documentation is not worth building.
4177 (home-page "https://github.com/jaraco/rst.linker")
4178 (synopsis "Sphinx plugin to add links and timestamps")
4179 (description "rst.linker automatically replaces text by a
4180 reStructuredText external reference or timestamps. It's primary purpose is to
4181 augment the changelog, but it can be used for other documents, too.")
4182 (license license:expat)))
4183
4184 (define-public python2-rst.linker
4185 (package-with-python2 python-rst.linker))
4186
4187 (define-public python-sshpubkeys
4188 (package
4189 (name "python-sshpubkeys")
4190 (version "3.1.0")
4191 (home-page "https://github.com/ojarva/python-sshpubkeys")
4192 (source (origin
4193 (method git-fetch)
4194 (uri (git-reference
4195 (url home-page)
4196 (commit (string-append "v" version))))
4197 (file-name (git-file-name name version))
4198 (sha256
4199 (base32
4200 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4201 (build-system python-build-system)
4202 (propagated-inputs
4203 `(("python-cryptography" ,python-cryptography)
4204 ("python-ecdsa" ,python-ecdsa)))
4205 (synopsis "OpenSSH public key parser")
4206 (description
4207 "This package provides a library for parsing and validating OpenSSH
4208 public key files.")
4209 (license license:bsd-3)))
4210
4211 (define-public python-feedgenerator
4212 (package
4213 (name "python-feedgenerator")
4214 (version "1.9")
4215 (source
4216 (origin
4217 (method url-fetch)
4218 (uri (pypi-uri "feedgenerator" version))
4219 (sha256
4220 (base32
4221 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4222 (modules '((guix build utils)))
4223 (snippet
4224 '(begin
4225 ;; Remove pre-compiled .pyc files from source.
4226 (for-each delete-file-recursively
4227 (find-files "." "__pycache__" #:directories? #t))
4228 (for-each delete-file (find-files "." "\\.pyc$"))
4229 #t))))
4230 (build-system python-build-system)
4231 (propagated-inputs
4232 `(("python-pytz" ,python-pytz)
4233 ("python-six" ,python-six)))
4234 (home-page "https://github.com/getpelican/feedgenerator")
4235 (synopsis
4236 "Standalone version of Django's Atom/RSS feed generator")
4237 (description
4238 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4239 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4240 (license license:bsd-3)))
4241
4242 (define-public python2-feedgenerator
4243 (package-with-python2 python-feedgenerator))
4244
4245 (define-public python-jsonrpc-server
4246 (package
4247 (name "python-jsonrpc-server")
4248 (version "0.4.0")
4249 (source
4250 (origin
4251 (method url-fetch)
4252 (uri (pypi-uri "python-jsonrpc-server" version))
4253 (sha256
4254 (base32
4255 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4256 (build-system python-build-system)
4257 (propagated-inputs
4258 `(("python-mock" ,python-mock)
4259 ("python-pytest" ,python-pytest)
4260 ("python-ujson" ,python-ujson)))
4261 (home-page
4262 "https://github.com/palantir/python-jsonrpc-server")
4263 (synopsis "JSON RPC 2.0 server library")
4264 (description
4265 "This package provides a JSON RPC 2.0 server library for Python.")
4266 (license license:expat)))
4267
4268 (define-public python-pydantic
4269 (package
4270 (name "python-pydantic")
4271 (version "1.6.1")
4272 (source
4273 (origin
4274 (method git-fetch)
4275 (uri (git-reference
4276 (url "https://github.com/samuelcolvin/pydantic")
4277 (commit (string-append "v" version))))
4278 (file-name (git-file-name name version))
4279 (sha256
4280 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4281 (build-system python-build-system)
4282 (arguments
4283 '(#:phases
4284 (modify-phases %standard-phases
4285 ;; Reported upstream:
4286 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4287 ;; Disable the faulty test as the fix is unclear.
4288 (add-before 'check 'disable-test
4289 (lambda _
4290 (substitute* "tests/test_validators.py"
4291 (("test_assert_raises_validation_error")
4292 "_test_assert_raises_validation_error"))
4293 #t))
4294 (replace 'check
4295 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4296 (native-inputs
4297 `(("python-pytest" ,python-pytest)))
4298 (home-page "https://github.com/samuelcolvin/pydantic")
4299 (synopsis "Python data validation and settings management")
4300 (description
4301 "Pydantic enforces type hints at runtime, and provides user friendly
4302 errors when data is invalid.")
4303 (license license:expat)))
4304
4305 (define-public python-pydocstyle
4306 (package
4307 (name "python-pydocstyle")
4308 (version "3.0.0")
4309 (source
4310 (origin
4311 (method url-fetch)
4312 (uri (pypi-uri "pydocstyle" version))
4313 (sha256
4314 (base32
4315 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4316 (build-system python-build-system)
4317 (propagated-inputs
4318 `(("python-six" ,python-six)
4319 ("python-snowballstemmer" ,python-snowballstemmer)))
4320 (home-page
4321 "https://github.com/PyCQA/pydocstyle/")
4322 (synopsis "Python docstring style checker")
4323 (description
4324 "This package provides a style checker for the Python Language
4325 Server (PLS).")
4326 (license license:expat)))
4327
4328 (define-public python-language-server
4329 (package
4330 (name "python-language-server")
4331 (version "0.36.2")
4332 (source
4333 (origin
4334 (method url-fetch)
4335 (uri (pypi-uri "python-language-server" version))
4336 (sha256
4337 (base32
4338 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4339 (build-system python-build-system)
4340 (propagated-inputs
4341 `(("python-autopep8" ,python-autopep8)
4342 ("python-configparser" ,python-configparser)
4343 ("python-pydocstyle" ,python-pydocstyle)
4344 ("python-future" ,python-future)
4345 ("python-jedi" ,python-jedi)
4346 ("python-jsonrpc-server" ,python-jsonrpc-server)
4347 ("python-pluggy" ,python-pluggy)
4348 ("python-pycodestyle" ,python-pycodestyle)
4349 ("python-pyflakes" ,python-pyflakes)
4350 ("python-rope" ,python-rope)
4351 ("python-ujson" ,python-ujson)
4352 ("python-yapf" ,python-yapf)))
4353 (native-inputs
4354 `(("python-coverage" ,python-coverage)
4355 ("python-flaky" ,python-flaky)
4356 ("python-matplotlib" ,python-matplotlib)
4357 ("python-mock" ,python-mock)
4358 ("python-numpy" ,python-numpy)
4359 ("python-pandas" ,python-pandas)
4360 ("python-pylint" ,python-pylint)
4361 ("python-pytest" ,python-pytest)
4362 ("python-pytest-cov" ,python-pytest-cov)
4363 ("python-versioneer" ,python-versioneer)))
4364 (home-page "https://github.com/palantir/python-language-server")
4365 (synopsis "Python implementation of the Language Server Protocol")
4366 (description
4367 "The Python Language Server (pyls) is an implementation of the Python 3
4368 language specification for the Language Server Protocol (LSP). This tool is
4369 used in text editing environments to provide a complete and integrated
4370 feature-set for programming Python effectively.")
4371 (license license:expat)))
4372
4373 (define-public python-pathspec
4374 (package
4375 (name "python-pathspec")
4376 (version "0.7.0")
4377 (source
4378 (origin
4379 (method url-fetch)
4380 (uri (pypi-uri "pathspec" version))
4381 (sha256
4382 (base32
4383 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4384 (build-system python-build-system)
4385 (home-page "https://github.com/cpburnz/python-path-specification")
4386 (synopsis "Utility library for gitignore style pattern matching of file paths")
4387 (description
4388 "This package provides a utility library for gitignore style pattern
4389 matching of file paths.")
4390 (license license:mpl2.0)))
4391
4392 (define-public python-black
4393 (package
4394 (name "python-black")
4395 (version "20.8b1")
4396 (source
4397 (origin
4398 (method url-fetch)
4399 (uri (pypi-uri "black" version))
4400 (sha256
4401 (base32
4402 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4403 (build-system python-build-system)
4404 (arguments
4405 `(#:phases
4406 (modify-phases %standard-phases
4407 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4408 (lambda _
4409 (let ((python3 (which "python3")))
4410 (substitute* '("tests/data/fmtonoff.py"
4411 "tests/data/string_prefixes.py"
4412 "tests/data/function.py"
4413 "tests/data/python37.py")
4414 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4415 (string-append "#!" python3 (if (string? minor-version)
4416 minor-version
4417 "")))))
4418 #t))
4419 (add-after 'unpack 'disable-broken-tests
4420 (lambda* (#:key outputs inputs #:allow-other-keys)
4421 ;; Make installed package available for running the tests
4422 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4423 ":" (getenv "PATH")))
4424
4425 ;; These tests are supposed to be skipped when the blackd
4426 ;; dependencies are missing, but this doesn't quite work.
4427 (substitute* "tests/test_black.py"
4428 (("( *)class BlackDTestCase.*" match indent)
4429 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4430 indent "class BlackDTestCase(unittest.TestCase):\n"))
4431 (("web.Application") "False")
4432 (("@unittest_run_loop") ""))
4433
4434 ;; Patching the above file breaks the self test
4435 (substitute* "tests/test_black.py"
4436 (("( *)def test_self" match indent)
4437 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4438
4439 (substitute* "tests/test_black.py"
4440 (("( *)def test_python38" match indent)
4441 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4442 #t)))))
4443 (propagated-inputs
4444 `(("python-click" ,python-click)
4445 ("python-attrs" ,python-attrs)
4446 ("python-appdirs" ,python-appdirs)
4447 ("python-pathspec" ,python-pathspec)
4448 ("python-mypy-extensions" ,python-mypy-extensions)
4449 ("python-regex" ,python-regex)
4450 ("python-toml" ,python-toml)
4451 ("python-typed-ast" ,python-typed-ast)
4452 ("python-typing-extensions" ,python-typing-extensions)))
4453 (native-inputs
4454 `(("python-setuptools-scm" ,python-setuptools-scm)))
4455 (home-page "https://github.com/ambv/black")
4456 (synopsis "The uncompromising code formatter")
4457 (description "Black is the uncompromising Python code formatter.")
4458 (license license:expat)))
4459
4460 (define-public python-black-macchiato
4461 (package
4462 (name "python-black-macchiato")
4463 (version "1.3.0")
4464 (source
4465 (origin
4466 (method url-fetch)
4467 (uri (pypi-uri "black-macchiato" version))
4468 (sha256
4469 (base32
4470 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4471 (build-system python-build-system)
4472 (propagated-inputs
4473 `(("python-black" ,python-black)))
4474 (home-page "https://github.com/wbolster/black-macchiato")
4475 (synopsis "Partial @code{python-black} formatting")
4476 (description
4477 "This package is built on top the @{python-black} code formatter to
4478 enable formatting of partial files.")
4479 (license license:bsd-3)))
4480
4481 (define-public python-blinker
4482 (package
4483 (name "python-blinker")
4484 (version "1.4")
4485 (source
4486 (origin
4487 (method url-fetch)
4488 (uri (pypi-uri "blinker" version))
4489 (sha256
4490 (base32
4491 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4492 (build-system python-build-system)
4493 (home-page "https://pythonhosted.org/blinker/")
4494 (synopsis "Fast, simple object-to-object and broadcast signaling")
4495 (description
4496 "Blinker provides a fast dispatching system that allows any number of
4497 interested parties to subscribe to events, or \"signals\".")
4498 (license license:expat)))
4499
4500 (define-public python2-blinker
4501 (package-with-python2 python-blinker))
4502
4503 (define-public pelican
4504 (package
4505 (name "pelican")
4506 (version "4.2.0")
4507 (source
4508 (origin
4509 (method url-fetch)
4510 (uri (pypi-uri "pelican" version))
4511 (sha256
4512 (base32
4513 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4514 (build-system python-build-system)
4515 (propagated-inputs
4516 `(("python-blinker" ,python-blinker)
4517 ("python-dateutil" ,python-dateutil)
4518 ("python-docutils" ,python-docutils)
4519 ("python-feedgenerator" ,python-feedgenerator)
4520 ("python-jinja2" ,python-jinja2)
4521 ("python-markdown" ,python-markdown)
4522 ("python-pygments" ,python-pygments)
4523 ("python-pytz" ,python-pytz)
4524 ("python-six" ,python-six)
4525 ("python-unidecode" ,python-unidecode)))
4526 (home-page "https://getpelican.com/")
4527 (arguments
4528 `(;; XXX Requires a lot more packages to do unit tests :P
4529 #:tests? #f))
4530 (synopsis "Python-based static site publishing system")
4531 (description
4532 "Pelican is a tool to generate a static blog from reStructuredText,
4533 Markdown input files, and more. Pelican uses Jinja2 for templating
4534 and is very extensible.")
4535 (license license:agpl3+)))
4536
4537 (define-public mallard-ducktype
4538 (package
4539 (name "mallard-ducktype")
4540 (version "1.0.2")
4541 (source
4542 (origin
4543 (method git-fetch)
4544 ;; git-reference because tests are not included in pypi source tarball
4545 ;; https://issues.guix.gnu.org/issue/36755#2
4546 (uri (git-reference
4547 (url "https://github.com/projectmallard/mallard-ducktype")
4548 (commit version)))
4549 (file-name (git-file-name name version))
4550 (sha256
4551 (base32
4552 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4553 (build-system python-build-system)
4554 (arguments
4555 '(#:phases
4556 (modify-phases %standard-phases
4557 (replace 'check
4558 (lambda _
4559 (with-directory-excursion "tests"
4560 (invoke "sh" "runtests")))))))
4561 (home-page "http://projectmallard.org")
4562 (synopsis "Convert Ducktype to Mallard documentation markup")
4563 (description
4564 "Ducktype is a lightweight syntax that can represent all the semantics
4565 of the Mallard XML documentation system. Ducktype files can be converted to
4566 Mallard using the @command{ducktype} tool. The yelp-tools package
4567 provides additional functionality on the produced Mallard documents.")
4568 (license license:expat)))
4569
4570 (define-public python-cython
4571 (package
4572 (name "python-cython")
4573 (version "0.29.22")
4574 (source
4575 (origin
4576 (method url-fetch)
4577 (uri (pypi-uri "Cython" version))
4578 (sha256
4579 (base32 "01jl3544qwsi8lp6anbl55566xqkjd53x452i7m6gnfilv3q6syz"))))
4580 (build-system python-build-system)
4581 ;; we need the full python package and not just the python-wrapper
4582 ;; because we need libpython3.3m.so
4583 (inputs
4584 `(("python" ,python)))
4585 (arguments
4586 `(#:phases
4587 (modify-phases %standard-phases
4588 (add-before 'check 'set-HOME
4589 ;; some tests require access to "$HOME/.cython"
4590 (lambda _ (setenv "HOME" "/tmp") #t))
4591 (replace 'check
4592 (lambda _
4593 ;; Disable compiler optimizations to greatly reduce the running
4594 ;; time of the test suite.
4595 (setenv "CFLAGS" "-O0")
4596
4597 (invoke "python" "runtests.py" "-vv"
4598 "-j" (number->string (parallel-job-count))
4599 ;; XXX: On 32-bit architectures, running the parallel tests
4600 ;; fails on many-core systems, see
4601 ;; <https://github.com/cython/cython/issues/2807>.
4602 ,@(if (not (target-64bit?))
4603 '("-x" "run.parallel")
4604 '())))))))
4605 (home-page "https://cython.org/")
4606 (synopsis "C extensions for Python")
4607 (description "Cython is an optimising static compiler for both the Python
4608 programming language and the extended Cython programming language. It makes
4609 writing C extensions for Python as easy as Python itself.")
4610 (license license:asl2.0)
4611 (properties `((python2-variant . ,(delay python2-cython))))))
4612
4613 (define-public python2-cython
4614 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4615 (package/inherit base
4616 (name "python2-cython")
4617 (inputs
4618 `(("python-2" ,python-2))) ;this is not automatically changed
4619 (arguments
4620 (substitute-keyword-arguments (package-arguments base)
4621 ((#:phases phases)
4622 `(modify-phases ,phases
4623 (add-before 'check 'adjust-test_embed
4624 (lambda _
4625 (substitute* "runtests.py"
4626 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4627 ;; so it can give the right -L flag to GCC when embedding static
4628 ;; builds of Python. It is unaware that the Python "config"
4629 ;; directory (where the static library lives) was renamed in
4630 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4631 ;; which works fine, because that is where the shared library is.
4632 ;;
4633 ;; It also appears to be unaware that the Makefile in Demos/embed
4634 ;; already unconditionally pass the static library location to GCC,
4635 ;; after checking sysconfig.get_config_var('LIBPL).
4636 ;;
4637 ;; The effect is that the linker is unable to resolve libexpat
4638 ;; symbols when building for Python 2, because neither the Python 2
4639 ;; shared library nor Expat is available. To fix it, we can either
4640 ;; add Expat as an input and make it visible to the linker, or just
4641 ;; prevent it from overriding the Python shared library location.
4642 ;; The end result is identical, so we take the easy route.
4643 ((" or libname not in os\\.listdir\\(libdir\\)")
4644 ""))
4645 #t)))))))))
4646
4647 ;; The RPython toolchain currently does not support Python 3.
4648 (define-public python2-rpython
4649 (package
4650 (name "python2-rpython")
4651 (version "0.2.1")
4652 (source
4653 (origin
4654 (method url-fetch)
4655 (uri (pypi-uri "rpython" version))
4656 (sha256
4657 (base32
4658 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4659 (build-system python-build-system)
4660 (arguments `(#:python ,python-2))
4661 (native-inputs
4662 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4663 (home-page "https://rpython.readthedocs.org")
4664 (synopsis "Framework for implementing interpreters and virtual machines")
4665 (description "RPython is a translation and support framework for
4666 producing implementations of dynamic languages, emphasizing a clean separation
4667 between language specification and implementation aspects.")
4668 (license license:expat)))
4669
4670 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4671 ;; python-scipy still build, as these three packages are often used together.
4672 (define-public python-numpy
4673 (package
4674 (name "python-numpy")
4675 (version "1.17.3")
4676 (source
4677 (origin
4678 (method url-fetch)
4679 (uri (string-append
4680 "https://github.com/numpy/numpy/releases/download/v"
4681 version "/numpy-" version ".tar.gz"))
4682 (sha256
4683 (base32
4684 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4685 (build-system python-build-system)
4686 (inputs
4687 `(("openblas" ,openblas)
4688 ("lapack" ,lapack)))
4689 (native-inputs
4690 `(("python-cython" ,python-cython)
4691 ("python-pytest" ,python-pytest)
4692 ("gfortran" ,gfortran)))
4693 (arguments
4694 `(#:phases
4695 (modify-phases %standard-phases
4696 (add-before 'build 'configure-blas-lapack
4697 (lambda* (#:key inputs #:allow-other-keys)
4698 (call-with-output-file "site.cfg"
4699 (lambda (port)
4700 (format port
4701 "[openblas]
4702 libraries = openblas
4703 library_dirs = ~a/lib
4704 include_dirs = ~a/include
4705
4706 # backslash-n to make emacs happy
4707 \n[lapack]
4708 lapack_libs = lapack
4709 library_dirs = ~a/lib
4710 include_dirs = ~a/include
4711 "
4712 (assoc-ref inputs "openblas")
4713 (assoc-ref inputs "openblas")
4714 (assoc-ref inputs "lapack")
4715 (assoc-ref inputs "lapack"))))
4716 #t))
4717 (add-before 'build 'fix-executable-paths
4718 (lambda* (#:key inputs #:allow-other-keys)
4719 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4720 ;; instead of /bin/sh.
4721 (substitute* "numpy/distutils/exec_command.py"
4722 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4723 (string-append match-start (assoc-ref inputs "bash") match-end)))
4724 ;; Use "gcc" executable, not "cc".
4725 (substitute* "numpy/distutils/system_info.py"
4726 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4727 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4728 #t))
4729 ;; Tests can only be run after the library has been installed and not
4730 ;; within the source directory.
4731 (delete 'check)
4732 (add-after 'install 'check
4733 (lambda* (#:key outputs inputs #:allow-other-keys)
4734 ;; Make installed package available for running the tests
4735 (add-installed-pythonpath inputs outputs)
4736 ;; Make sure "f2py" etc is found.
4737 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4738 ":" (getenv "PATH")))
4739 (with-directory-excursion "/tmp"
4740 (invoke "python" "-c"
4741 "import numpy; numpy.test(verbose=2)")))))))
4742 (home-page "https://numpy.org")
4743 (synopsis "Fundamental package for scientific computing with Python")
4744 (description "NumPy is the fundamental package for scientific computing
4745 with Python. It contains among other things: a powerful N-dimensional array
4746 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4747 and Fortran code, useful linear algebra, Fourier transform, and random number
4748 capabilities.")
4749 (properties `((python2-variant . ,(delay python2-numpy))))
4750 (license license:bsd-3)))
4751
4752 ;; Numpy 1.16.x are the last versions that support Python 2.
4753 (define-public python2-numpy
4754 (let ((numpy (package-with-python2
4755 (strip-python2-variant python-numpy))))
4756 (package/inherit
4757 numpy
4758 (version "1.16.5")
4759 (source (origin
4760 (method url-fetch)
4761 (uri (string-append
4762 "https://github.com/numpy/numpy/releases/download/v"
4763 version "/numpy-" version ".tar.gz"))
4764 (sha256
4765 (base32
4766 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4767
4768 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4769 ;; interest only for legacy code going back to NumPy's predecessor
4770 ;; Numeric.
4771 (define-public python2-numpy-1.8
4772 (package (inherit python2-numpy)
4773 (version "1.8.2")
4774 (source
4775 (origin
4776 (method git-fetch)
4777 (uri (git-reference
4778 (url "https://github.com/numpy/numpy")
4779 (commit (string-append "v" version))))
4780 (file-name (git-file-name "numpy" version))
4781 (sha256
4782 (base32
4783 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4784 (arguments
4785 (substitute-keyword-arguments (package-arguments python2-numpy)
4786 ((#:phases phases)
4787 `(modify-phases ,phases
4788 (replace 'configure-blas-lapack
4789 (lambda* (#:key inputs #:allow-other-keys)
4790 (call-with-output-file "site.cfg"
4791 (lambda (port)
4792 (format port
4793 "[openblas]
4794 libraries = openblas,lapack
4795 library_dirs = ~a/lib:~a/lib
4796 include_dirs = ~a/include:~a/include
4797 "
4798 (assoc-ref inputs "openblas")
4799 (assoc-ref inputs "lapack")
4800 (assoc-ref inputs "openblas")
4801 (assoc-ref inputs "lapack"))))
4802 #t))))))
4803 (native-inputs
4804 `(("python2-nose" ,python2-nose)))
4805 (description "NumPy is the fundamental package for scientific computing
4806 with Python. It contains among other things: a powerful N-dimensional array
4807 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4808 and Fortran code, useful linear algebra, Fourier transform, and random number
4809 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4810 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4811 Numeric.")
4812 (license license:bsd-3)))
4813
4814 (define-public python-munch
4815 (package
4816 (name "python-munch")
4817 (version "2.0.4")
4818 (source
4819 (origin
4820 (method url-fetch)
4821 (uri (pypi-uri "munch" version))
4822 (sha256
4823 (base32
4824 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4825 (build-system python-build-system)
4826 (home-page "https://github.com/Infinidat/munch")
4827 (synopsis "Dot-accessible dictionary")
4828 (description "Munch is a dot-accessible dictionary similar to JavaScript
4829 objects.")
4830 (license license:expat)))
4831
4832 (define-public python2-munch
4833 (package-with-python2 python-munch))
4834
4835 (define-public python-colormath
4836 (package
4837 (name "python-colormath")
4838 (version "3.0.0")
4839 (source
4840 (origin
4841 (method url-fetch)
4842 (uri (pypi-uri "colormath" version))
4843 (sha256
4844 (base32
4845 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4846 (build-system python-build-system)
4847 (propagated-inputs
4848 `(("python-networkx" ,python-networkx)
4849 ("python-numpy" ,python-numpy)))
4850 (home-page "https://github.com/gtaylor/python-colormath")
4851 (synopsis "Color math and conversion library")
4852 (description
4853 "This is a Python library for color math and conversions.")
4854 (license license:bsd-3)))
4855
4856 (define-public python2-colormath
4857 (package-with-python2 python-colormath))
4858
4859 (define-public python-spectra
4860 (package
4861 (name "python-spectra")
4862 (version "0.0.11")
4863 (source
4864 (origin
4865 (method url-fetch)
4866 (uri (pypi-uri "spectra" version))
4867 (sha256
4868 (base32
4869 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4870 (build-system python-build-system)
4871 (arguments
4872 `(#:phases
4873 (modify-phases %standard-phases
4874 (replace 'check
4875 (lambda _ (invoke "nosetests" "-v"))))))
4876 (propagated-inputs
4877 `(("python-colormath" ,python-colormath)))
4878 (native-inputs
4879 `(("python-nose" ,python-nose)))
4880 (home-page "https://github.com/jsvine/spectra")
4881 (synopsis "Color scales and color conversion")
4882 (description
4883 "This package provides a Python library intended to make color math,
4884 color scales, and color space conversion easy. It has support for:
4885
4886 @enumerate
4887 @item Color scales
4888 @item Color ranges
4889 @item Color blending
4890 @item Brightening/darkening colors
4891 @item Saturating/desaturating colors
4892 @item Conversion to/from multiple color spaces.
4893 @end enumerate\n")
4894 (license license:expat)))
4895
4896 (define-public python2-spectra
4897 (package-with-python2 python-spectra))
4898
4899 (define-public python-numpy-documentation
4900 (package
4901 (name "python-numpy-documentation")
4902 (version (package-version python-numpy))
4903 (source (package-source python-numpy))
4904 (build-system python-build-system)
4905 (native-inputs
4906 `(("python-matplotlib" ,python-matplotlib)
4907 ("python-numpy" ,python-numpy)
4908 ("pkg-config" ,pkg-config)
4909 ("python-sphinx" ,python-sphinx)
4910 ("python-numpydoc" ,python-numpydoc)
4911 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4912 texlive-fonts-ec
4913 texlive-generic-ifxetex
4914 texlive-generic-pdftex
4915 texlive-amsfonts
4916 texlive-latex-capt-of
4917 texlive-latex-cmap
4918 texlive-latex-environ
4919 texlive-latex-eqparbox
4920 texlive-latex-etoolbox
4921 texlive-latex-expdlist
4922 texlive-latex-fancyhdr
4923 texlive-latex-fancyvrb
4924 texlive-latex-fncychap
4925 texlive-latex-float
4926 texlive-latex-framed
4927 texlive-latex-geometry
4928 texlive-latex-graphics
4929 texlive-latex-hyperref
4930 texlive-latex-mdwtools
4931 texlive-latex-multirow
4932 texlive-latex-needspace
4933 texlive-latex-oberdiek
4934 texlive-latex-parskip
4935 texlive-latex-preview
4936 texlive-latex-tabulary
4937 texlive-latex-threeparttable
4938 texlive-latex-titlesec
4939 texlive-latex-trimspaces
4940 texlive-latex-ucs
4941 texlive-latex-upquote
4942 texlive-latex-url
4943 texlive-latex-varwidth
4944 texlive-latex-wrapfig)))
4945 ("texinfo" ,texinfo)
4946 ("perl" ,perl)
4947 ("scipy-sphinx-theme"
4948 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
4949 (origin ;the build script expects scipy-sphinx-theme as a git submodule
4950 (method git-fetch)
4951 (uri (git-reference
4952 (url "https://github.com/scipy/scipy-sphinx-theme")
4953 (commit commit)))
4954 (file-name (git-file-name "python-scipy-sphinx-theme"
4955 (string-take commit 7)))
4956 (sha256
4957 (base32
4958 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
4959 ,@(package-native-inputs python-numpy)))
4960 (arguments
4961 `(#:tests? #f ; we're only generating the documentation
4962 #:phases
4963 (modify-phases %standard-phases
4964 (delete 'build)
4965 (replace 'install
4966 (lambda* (#:key inputs outputs #:allow-other-keys)
4967 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4968 (doc (string-append
4969 data "/doc/" ,name "-"
4970 ,(package-version python-numpy)))
4971 (info-reader (string-append data "/info"))
4972 (html (string-append doc "/html"))
4973 (scipy-sphinx-theme "scipy-sphinx-theme")
4974 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4975 (pyver ,(string-append "PYVER=")))
4976
4977 ;; FIXME: this is needed to for texlive-union to generate
4978 ;; fonts, which are not found.
4979 (setenv "HOME" "/tmp")
4980
4981 (with-directory-excursion "doc"
4982 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4983 (mkdir-p html)
4984 (invoke "make" "html" pyver)
4985 (invoke "make" "latex" "PAPER=a4" pyver)
4986 (invoke "make" "-C" "build/latex"
4987 "all-pdf" "PAPER=a4" pyver)
4988 ;; FIXME: Generation of the info file fails.
4989 ;; (invoke "make" "info" pyver)
4990 ;; (mkdir-p info)
4991 ;; (copy-file "build/texinfo/numpy.info"
4992 ;; (string-append info "/numpy.info"))
4993 (for-each (lambda (file)
4994 (copy-file (string-append "build/latex" file)
4995 (string-append doc file)))
4996 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4997 (with-directory-excursion "build/html"
4998 (for-each (lambda (file)
4999 (let* ((dir (dirname file))
5000 (tgt-dir (string-append html "/" dir)))
5001 (unless (equal? "." dir)
5002 (mkdir-p tgt-dir))
5003 (install-file file html)))
5004 (find-files "." ".*")))))
5005 #t)))))
5006 (home-page (package-home-page python-numpy))
5007 (synopsis "Documentation for the python-numpy package")
5008 (description (package-description python-numpy))
5009 (license (package-license python-numpy))))
5010
5011 (define-public python2-numpy-documentation
5012 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
5013 (package
5014 (inherit numpy-documentation)
5015 (native-inputs `(("python2-functools32" ,python2-functools32)
5016 ,@(package-native-inputs numpy-documentation))))))
5017
5018 (define-public python-pygit2
5019 (package
5020 (name "python-pygit2")
5021 (version "1.4.0")
5022 (source
5023 (origin
5024 (method url-fetch)
5025 (uri (pypi-uri "pygit2" version))
5026 (sha256
5027 (base32 "1j71iskvirkm8jzfmwdm79v69878m9iix8a8cn4xidgr3nmkisyb"))))
5028 (build-system python-build-system)
5029 (arguments
5030 '(#:tests? #f)) ; tests don't run correctly in our environment
5031 (propagated-inputs
5032 `(("python-cached-property" ,python-cached-property)
5033 ("python-cffi" ,python-cffi)
5034 ("libgit2" ,libgit2)))
5035 (native-inputs
5036 `(("python-pytest" ,python-pytest)))
5037 (home-page "https://github.com/libgit2/pygit2")
5038 (synopsis "Python bindings for libgit2")
5039 (description "Pygit2 is a set of Python bindings to the libgit2 shared
5040 library, libgit2 implements Git plumbing.")
5041 ;; GPL2.0 only, with linking exception.
5042 (license license:gpl2)))
5043
5044 (define-public python-patiencediff
5045 (package
5046 (name "python-patiencediff")
5047 (version "0.2.0")
5048 (source
5049 (origin
5050 (method url-fetch)
5051 (uri (pypi-uri "patiencediff" version))
5052 (sha256
5053 (base32
5054 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
5055 (build-system python-build-system)
5056 (home-page "https://www.breezy-vcs.org/")
5057 (synopsis "Python implementation of the patiencediff algorithm")
5058 (description
5059 "This package contains a Python implementation of the @code{patiencediff}
5060 algorithm. Patiencediff provides a good balance of performance, nice output for
5061 humans, and implementation simplicity.")
5062 (license license:gpl2)))
5063
5064 (define-public python-pdftotext
5065 (package
5066 (name "python-pdftotext")
5067 (version "2.1.5")
5068 (source
5069 (origin
5070 (method url-fetch)
5071 (uri (pypi-uri "pdftotext" version))
5072 (sha256
5073 (base32
5074 "19la1cw1hmkcr8big04gm2dd5fw0y0z97g930aiy29s1gaqbiblq"))))
5075 (build-system python-build-system)
5076 (inputs
5077 `(("poppler" ,poppler)))
5078 (home-page "https://github.com/jalan/pdftotext")
5079 (synopsis "Simple PDF text extraction")
5080 (description "Pdftotext is a Python library of PDF text extraction.")
5081 (license license:expat)))
5082
5083 (define-public python-pyparsing
5084 (package
5085 (name "python-pyparsing")
5086 (version "2.4.6")
5087 (source
5088 (origin
5089 (method url-fetch)
5090 (uri (pypi-uri "pyparsing" version))
5091 (sha256
5092 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
5093 (build-system python-build-system)
5094 (outputs '("out" "doc"))
5095 (arguments
5096 `(#:tests? #f ; no test target
5097 #:phases
5098 (modify-phases %standard-phases
5099 (add-after 'install 'install-doc
5100 (lambda* (#:key outputs #:allow-other-keys)
5101 (let* ((doc (string-append (assoc-ref outputs "doc")
5102 "/share/doc/" ,name "-" ,version))
5103 (html-doc (string-append doc "/html"))
5104 (examples (string-append doc "/examples")))
5105 (mkdir-p html-doc)
5106 (mkdir-p examples)
5107 (for-each
5108 (lambda (dir tgt)
5109 (map (lambda (file)
5110 (install-file file tgt))
5111 (find-files dir ".*")))
5112 (list "docs" "htmldoc" "examples")
5113 (list doc html-doc examples))
5114 #t))))))
5115 (home-page "https://github.com/pyparsing/pyparsing")
5116 (synopsis "Python parsing class library")
5117 (description
5118 "The pyparsing module is an alternative approach to creating and
5119 executing simple grammars, vs. the traditional lex/yacc approach, or the use
5120 of regular expressions. The pyparsing module provides a library of classes
5121 that client code uses to construct the grammar directly in Python code.")
5122 (license license:expat)))
5123
5124 (define-public python2-pyparsing
5125 (package-with-python2 python-pyparsing))
5126
5127 (define-public python-pyparsing-2.4.7
5128 (package
5129 (inherit python-pyparsing)
5130 (version "2.4.7")
5131 (source
5132 (origin
5133 (method url-fetch)
5134 (uri (pypi-uri "pyparsing" version))
5135 (sha256
5136 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5137
5138 (define-public python-numpydoc
5139 (package
5140 (name "python-numpydoc")
5141 (version "0.8.0")
5142 (source
5143 (origin
5144 (method url-fetch)
5145 (uri (pypi-uri "numpydoc" version))
5146 (sha256
5147 (base32
5148 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5149 (build-system python-build-system)
5150 (propagated-inputs
5151 `(("python-sphinx" ,python-sphinx)))
5152 (native-inputs
5153 `(("python-nose" ,python-nose)))
5154 (home-page "https://pypi.org/project/numpydoc/")
5155 (synopsis
5156 "Numpy's Sphinx extensions")
5157 (description
5158 "Sphinx extension to support docstrings in Numpy format.")
5159 (license license:bsd-2)
5160 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5161
5162 (define-public python2-numpydoc
5163 (let ((base (package-with-python2
5164 (strip-python2-variant python-numpydoc))))
5165 (package/inherit base
5166 (propagated-inputs
5167 `(("python2-jinja2" ,python2-jinja2)
5168 ,@(package-propagated-inputs base))))))
5169
5170 (define-public python-numexpr
5171 (package
5172 (name "python-numexpr")
5173 (version "2.6.5")
5174 (source
5175 (origin
5176 (method url-fetch)
5177 (uri (pypi-uri "numexpr" version))
5178 (sha256
5179 (base32
5180 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
5181 (build-system python-build-system)
5182 (arguments `(#:tests? #f)) ; no tests included
5183 (propagated-inputs
5184 `(("python-numpy" ,python-numpy)))
5185 (home-page "https://github.com/pydata/numexpr")
5186 (synopsis "Fast numerical expression evaluator for NumPy")
5187 (description
5188 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5189 expressions that operate on arrays are accelerated and use less memory than
5190 doing the same calculation in Python. In addition, its multi-threaded
5191 capabilities can make use of all your cores, which may accelerate
5192 computations, most specially if they are not memory-bounded (e.g. those using
5193 transcendental functions).")
5194 (license license:expat)))
5195
5196 (define-public python2-numexpr
5197 (package-with-python2 python-numexpr))
5198
5199 (define-public python-cycler
5200 (package
5201 (name "python-cycler")
5202 (version "0.10.0")
5203 (source (origin
5204 (method url-fetch)
5205 (uri (pypi-uri "cycler" version))
5206 (sha256
5207 (base32
5208 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5209 (build-system python-build-system)
5210 (arguments
5211 ;; XXX: The current version requires 'coveralls' which we don't have.
5212 ;; Enable this for the next release which uses 'python-pytest'.
5213 '(#:tests? #f))
5214 (propagated-inputs
5215 `(("python-six" ,python-six)))
5216 (home-page "https://matplotlib.org/cycler/")
5217 (synopsis "Composable keyword argument iterator")
5218 (description
5219 "When using @code{matplotlib} and plotting more than one line, it is
5220 common to want to be able to want to be able to cycle over one or more artist
5221 styles; but the plotting logic can quickly become involved.
5222 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5223 @code{Cycler} class was developed.")
5224 (license license:bsd-3)))
5225
5226 (define-public python2-cycler
5227 (package-with-python2 python-cycler))
5228
5229 (define-public python-colorspacious
5230 (package
5231 (name "python-colorspacious")
5232 (version "1.1.2")
5233 (source
5234 (origin
5235 (method git-fetch)
5236 (uri (git-reference
5237 (url "https://github.com/njsmith/colorspacious")
5238 (commit (string-append "v" version))))
5239 (file-name (git-file-name name version))
5240 (sha256
5241 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5242 (build-system python-build-system)
5243 (propagated-inputs
5244 `(("python-numpy" ,python-numpy)))
5245 (native-inputs
5246 `(("python-nose" ,python-nose)))
5247 (arguments
5248 `(#:phases
5249 (modify-phases %standard-phases
5250 (replace 'check
5251 (lambda _
5252 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5253 (home-page "https://github.com/njsmith/colorspacious")
5254 (synopsis "Python library for colorspace conversions")
5255 (description "@code{colorspacious} is a Python library that lets you
5256 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5257 (license license:expat)))
5258
5259 (define-public python2-colorspacious
5260 (package-with-python2 python-colorspacious))
5261
5262 (define-public python-matplotlib
5263 (package
5264 (name "python-matplotlib")
5265 (version "3.1.2")
5266 (source
5267 (origin
5268 (method url-fetch)
5269 (uri (pypi-uri "matplotlib" version))
5270 (sha256
5271 (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
5272 (patches
5273 (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
5274 (build-system python-build-system)
5275 (propagated-inputs ; the following packages are all needed at run time
5276 `(("python-cycler" ,python-cycler)
5277 ("python-kiwisolver" ,python-kiwisolver)
5278 ("python-pyparsing" ,python-pyparsing)
5279 ("python-pygobject" ,python-pygobject)
5280 ("gobject-introspection" ,gobject-introspection)
5281 ("python-tkinter" ,python "tk")
5282 ("python-dateutil" ,python-dateutil)
5283 ("python-numpy" ,python-numpy)
5284 ("python-pillow" ,python-pillow)
5285 ("python-pytz" ,python-pytz)
5286 ("python-six" ,python-six)
5287 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5288 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5289 ;; object. For this reason we need to import both libraries.
5290 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5291 ("python-pycairo" ,python-pycairo)
5292 ("python-cairocffi" ,python-cairocffi)))
5293 (inputs
5294 `(("libpng" ,libpng)
5295 ("freetype" ,freetype)
5296 ("cairo" ,cairo)
5297 ("glib" ,glib)
5298 ;; FIXME: Add backends when available.
5299 ;("python-wxpython" ,python-wxpython)
5300 ("tcl" ,tcl)
5301 ("tk" ,tk)))
5302 (native-inputs
5303 `(("pkg-config" ,pkg-config)
5304 ("python-pytest" ,python-pytest)
5305 ("python-mock" ,python-mock)
5306 ("unzip" ,unzip)
5307 ("jquery-ui"
5308 ,(origin
5309 (method url-fetch)
5310 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5311 (sha256
5312 (base32
5313 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5314 (arguments
5315 `(#:phases
5316 (modify-phases %standard-phases
5317 ;; XXX We disable all image comparison tests because we're using a
5318 ;; newer version of FreeType than matplotlib expects. This leads to
5319 ;; minor differences throughout the tests.
5320 (add-after 'unpack 'fix-and-disable-failing-tests
5321 (lambda _
5322 (substitute* (append (find-files "lib/matplotlib/tests/"
5323 "test_.*\\.py$")
5324 (find-files "lib/mpl_toolkits/tests"
5325 "test_.*\\.py$"))
5326 (("^from matplotlib" match)
5327 (string-append "import pytest\n" match))
5328 (("( *)@image_comparison" match indent)
5329 (string-append indent
5330 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5331 match)))
5332 (substitute* "lib/matplotlib/tests/test_animation.py"
5333 (("/bin/sh") (which "sh")))
5334 (for-each delete-file
5335 ;; test_normal_axes, test_get_tightbbox_polar
5336 '("lib/matplotlib/tests/test_axes.py"
5337 ;; We don't use the webagg backend and this test forces it.
5338 "lib/matplotlib/tests/test_backend_webagg.py"
5339 ;; test_outward_ticks
5340 "lib/matplotlib/tests/test_tightlayout.py"
5341 ;; test_hidden_axes fails with minor extent
5342 ;; differences, possibly due to the use of a
5343 ;; different version of FreeType.
5344 "lib/matplotlib/tests/test_constrainedlayout.py"
5345 ;; Fontconfig returns no fonts.
5346 "lib/matplotlib/tests/test_font_manager.py"))
5347 #t))
5348 (add-before 'install 'install-jquery-ui
5349 (lambda* (#:key outputs inputs #:allow-other-keys)
5350 (let ((dir (string-append (assoc-ref outputs "out")
5351 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5352 (mkdir-p dir)
5353 (invoke "unzip"
5354 (assoc-ref inputs "jquery-ui")
5355 "-d" dir))
5356 #t))
5357 (replace 'check
5358 (lambda* (#:key outputs inputs #:allow-other-keys)
5359 (add-installed-pythonpath inputs outputs)
5360 (invoke "python" "tests.py" "-v"
5361 "-m" "not network and not webagg")))
5362 (add-before 'build 'configure-environment
5363 (lambda* (#:key outputs inputs #:allow-other-keys)
5364 (let ((cairo (assoc-ref inputs "cairo")))
5365 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5366 ;; has not effect.
5367 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5368 (setenv "HOME" (getcwd))
5369 ;; Fix rounding errors when using the x87 FPU.
5370 (when (string-prefix? "i686" ,(%current-system))
5371 (setenv "CFLAGS" "-ffloat-store"))
5372 (call-with-output-file "setup.cfg"
5373 (lambda (port)
5374 (format port "[directories]~%
5375 basedirlist = ~a,~a~%
5376 [packages]~%
5377 tests = True~%"
5378 (assoc-ref inputs "tcl")
5379 (assoc-ref inputs "tk")))))
5380 #t)))))
5381 (home-page "https://matplotlib.org/")
5382 (synopsis "2D plotting library for Python")
5383 (description
5384 "Matplotlib is a Python 2D plotting library which produces publication
5385 quality figures in a variety of hardcopy formats and interactive environments
5386 across platforms. Matplotlib can be used in Python scripts, the python and
5387 ipython shell, web application servers, and six graphical user interface
5388 toolkits.")
5389 (license license:psfl)
5390 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5391
5392 (define-public python2-matplotlib
5393 (let ((matplotlib (package-with-python2
5394 (strip-python2-variant python-matplotlib))))
5395 (package (inherit matplotlib)
5396 (version "2.2.4")
5397 (source
5398 (origin
5399 (method url-fetch)
5400 (uri (pypi-uri "matplotlib" version))
5401 (sha256
5402 (base32
5403 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5404 (arguments
5405 (substitute-keyword-arguments (package-arguments matplotlib)
5406 ((#:phases phases)
5407 `(modify-phases ,phases
5408 (replace 'install-jquery-ui
5409 (lambda* (#:key outputs inputs #:allow-other-keys)
5410 (let ((dir (string-append (assoc-ref outputs "out")
5411 "/lib/python2.7/site-packages/"
5412 "matplotlib/backends/web_backend/")))
5413 (mkdir-p dir)
5414 (invoke "unzip"
5415 (assoc-ref inputs "jquery-ui")
5416 "-d" dir))
5417 #t))
5418 (delete 'fix-and-disable-failing-tests)
5419 (delete 'check))))) ; These tests weren't run the the past.
5420 ;; Make sure to use special packages for Python 2 instead
5421 ;; of those automatically rewritten by package-with-python2.
5422 (propagated-inputs
5423 `(("python2-pycairo" ,python2-pycairo)
5424 ("python2-backports-functools-lru-cache"
5425 ,python2-backports-functools-lru-cache)
5426 ("python2-functools32" ,python2-functools32)
5427 ("python2-pygobject-2" ,python2-pygobject-2)
5428 ("python2-subprocess32" ,python2-subprocess32)
5429 ("python2-tkinter" ,python-2 "tk")
5430 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5431 '("python-cairocffi"
5432 "python-pycairo"
5433 "python-pygobject"
5434 "python-tkinter")))))))
5435
5436 (define-public python-matplotlib-documentation
5437 (package
5438 (name "python-matplotlib-documentation")
5439 (version (package-version python-matplotlib))
5440 (source (package-source python-matplotlib))
5441 (build-system python-build-system)
5442 (native-inputs
5443 `(("python-matplotlib" ,python-matplotlib)
5444 ("python-colorspacious" ,python-colorspacious)
5445 ("python-sphinx" ,python-sphinx)
5446 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5447 ("python-sphinx-gallery" ,python-sphinx-gallery)
5448 ("python-numpydoc" ,python-numpydoc)
5449 ("python-ipython" ,python-ipython)
5450 ("python-ipykernel" ,python-ipykernel)
5451 ("python-mock" ,python-mock)
5452 ("graphviz" ,graphviz)
5453 ("texlive" ,(texlive-union (list texlive-amsfonts
5454 texlive-latex-amsmath
5455 texlive-latex-enumitem
5456 texlive-latex-expdlist
5457 texlive-latex-geometry
5458 texlive-latex-preview
5459 texlive-latex-type1cm
5460 texlive-latex-ucs
5461
5462 texlive-generic-pdftex
5463
5464 texlive-fonts-ec
5465 texlive-fonts-adobe-times
5466 texlive-fonts-txfonts)))
5467 ("texinfo" ,texinfo)
5468 ,@(package-native-inputs python-matplotlib)))
5469 (arguments
5470 `(#:tests? #f ; we're only generating documentation
5471 #:phases
5472 (modify-phases %standard-phases
5473 ;; The tests in python-matplotlib are run after the install phase, so
5474 ;; we need to delete the extra phase here.
5475 (delete 'check)
5476 (replace 'build
5477 (lambda _
5478 (chdir "doc")
5479 (setenv "PYTHONPATH"
5480 (string-append (getenv "PYTHONPATH")
5481 ":" (getcwd) "/../examples/units"))
5482 (substitute* "conf.py"
5483 ;; Don't use git.
5484 (("^SHA = check_output.*")
5485 (string-append "SHA = \"" ,version "\"\n"))
5486 ;; Don't fetch intersphinx files from the Internet
5487 (("^explicit_order_folders" m)
5488 (string-append "intersphinx_mapping = {}\n" m))
5489 (("'sphinx.ext.intersphinx',") "")
5490 ;; Disable URL embedding which requires internet access.
5491 (("'https://docs.scipy.org/doc/numpy'") "None")
5492 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5493 (invoke "make"
5494 "SPHINXBUILD=sphinx-build"
5495 "SPHINXOPTS=" ; don't abort on warnings
5496 "html" "texinfo")))
5497 (replace 'install
5498 (lambda* (#:key inputs outputs #:allow-other-keys)
5499 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5500 (doc (string-append data "/doc/python-matplotlib-" ,version))
5501 (info (string-append data "/info"))
5502 (html (string-append doc "/html")))
5503 (mkdir-p html)
5504 (mkdir-p info)
5505 (copy-recursively "build/html" html)
5506 (symlink (string-append html "/_images")
5507 (string-append info "/matplotlib-figures"))
5508 (with-directory-excursion "build/texinfo"
5509 (substitute* "matplotlib.texi"
5510 (("@image\\{([^,]*)" all file)
5511 (string-append "@image{matplotlib-figures/" file)))
5512 (symlink (string-append html "/_images")
5513 "./matplotlib-figures")
5514 (invoke "makeinfo" "--no-split"
5515 "-o" "matplotlib.info" "matplotlib.texi"))
5516 (install-file "build/texinfo/matplotlib.info" info))
5517 #t)))))
5518 (home-page (package-home-page python-matplotlib))
5519 (synopsis "Documentation for the python-matplotlib package")
5520 (description (package-description python-matplotlib))
5521 (license (package-license python-matplotlib))))
5522
5523 (define-public python-matplotlib-venn
5524 (package
5525 (name "python-matplotlib-venn")
5526 (version "0.11.5")
5527 (source
5528 (origin
5529 (method url-fetch)
5530 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5531 (sha256
5532 (base32
5533 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5534 (build-system python-build-system)
5535 (arguments '(#:tests? #f)) ; tests are not included
5536 (propagated-inputs
5537 `(("python-matplotlib" ,python-matplotlib)
5538 ("python-numpy" ,python-numpy)
5539 ("python-scipy" ,python-scipy)))
5540 (native-inputs
5541 `(("unzip" ,unzip)))
5542 (home-page "https://github.com/konstantint/matplotlib-venn")
5543 (synopsis "Plot area-proportional Venn diagrams")
5544 (description
5545 "This package provides tools for plotting area-proportional two- and
5546 three-way Venn diagrams in @code{matplotlib}.")
5547 (license license:expat)))
5548
5549 (define-public python-pysnptools
5550 (package
5551 (name "python-pysnptools")
5552 (version "0.4.11")
5553 (source
5554 (origin
5555 (method url-fetch)
5556 (uri (pypi-uri "pysnptools" version))
5557 (sha256
5558 (base32
5559 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5560 (build-system python-build-system)
5561 (arguments
5562 `(#:tests? #f ; no test data are included
5563 #:phases
5564 (modify-phases %standard-phases
5565 (replace 'check
5566 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5567 (if tests?
5568 (begin
5569 (add-installed-pythonpath inputs outputs)
5570 (invoke "python3" "pysnptools/test.py"))
5571 #t))))))
5572 (propagated-inputs
5573 `(("python-dill" ,python-dill)
5574 ("python-h5py" ,python-h5py)
5575 ("python-numpy" ,python-numpy)
5576 ("python-pandas" ,python-pandas)
5577 ("python-psutil" ,python-psutil)
5578 ("python-scipy" ,python-scipy)))
5579 (native-inputs
5580 `(("python-cython" ,python-cython)))
5581 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5582 (synopsis "Library for reading and manipulating genetic data")
5583 (description
5584 "PySnpTools is a library for reading and manipulating genetic data. It
5585 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5586 those files. It can also efficiently manipulate ranges of integers using set
5587 operators such as union, intersection, and difference.")
5588 (license license:asl2.0)))
5589
5590 (define-public python2-pysnptools
5591 (package-with-python2 python-pysnptools))
5592
5593 (define-public python-wurlitzer
5594 (package
5595 (name "python-wurlitzer")
5596 (version "2.0.1")
5597 (source
5598 (origin
5599 (method url-fetch)
5600 (uri (pypi-uri "wurlitzer" version))
5601 (sha256
5602 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5603 (build-system python-build-system)
5604 (arguments
5605 '(#:phases
5606 (modify-phases %standard-phases
5607 (replace 'check
5608 (lambda _
5609 (invoke "pytest" "-vv" "test.py"))))))
5610 (native-inputs
5611 `(("python-mock" ,python-mock)
5612 ("python-pytest" ,python-pytest)))
5613 (home-page "https://github.com/minrk/wurlitzer")
5614 (synopsis "Capture C-level output in context managers")
5615 (description
5616 "This library helps to redirect @code{sys.stdout} to a stream or a file
5617 while executing some piece of code, including C code running within a Python
5618 process.")
5619 (license license:expat)))
5620
5621 (define-public python-socksipy-branch
5622 (package
5623 (name "python-socksipy-branch")
5624 (version "1.01")
5625 (source
5626 (origin
5627 (method url-fetch)
5628 (uri (pypi-uri "SocksiPy-branch" version))
5629 (sha256
5630 (base32
5631 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5632 (build-system python-build-system)
5633 (arguments
5634 `(#:tests? #f)) ; There are no tests
5635 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5636 (synopsis "Python SOCKS module")
5637 (description
5638 "SocksiPy - A Python SOCKS client module. It provides a
5639 socket-like interface that supports connections to any TCP
5640 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5641 The original version was developed by Dan Haim, this is a
5642 branch created by Mario Vilas to address some open issues,
5643 as the original project seems to have been abandoned circa 2007.")
5644 (license license:bsd-3)))
5645
5646 (define-public python2-socksipy-branch
5647 (package-with-python2 python-socksipy-branch))
5648
5649 (define-public python-socksipychain
5650 (package
5651 (name "python-socksipychain")
5652 (version "2.1.2")
5653 (source
5654 (origin
5655 (method git-fetch)
5656 (uri (git-reference
5657 (url "https://github.com/pagekite/PySocksipyChain")
5658 (commit (string-append "v" version))))
5659 (file-name (git-file-name name version))
5660 (sha256
5661 (base32
5662 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5663 (build-system python-build-system)
5664 (arguments
5665 `(#:tests? #f)) ; Tests try to access the network.
5666 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5667 (synopsis "Python SOCKS module with chained proxies support")
5668 (description
5669 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5670 adds support for arbitrary chaining of proxy servers and various modes of
5671 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5672 a simple netcat replacement with chaining support.")
5673 (license license:bsd-3)))
5674
5675 (define-public python-pycodestyle
5676 (package
5677 (name "python-pycodestyle")
5678 (version "2.7.0")
5679 (source
5680 (origin
5681 (method url-fetch)
5682 (uri (pypi-uri "pycodestyle" version))
5683 (sha256
5684 (base32
5685 "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
5686 (build-system python-build-system)
5687 (arguments
5688 `(#:phases
5689 (modify-phases %standard-phases
5690 (replace 'check
5691 (lambda _
5692 (invoke "pytest" "-vv"))))))
5693 (native-inputs
5694 `(("python-pytest" ,python-pytest)))
5695 (home-page "https://pycodestyle.readthedocs.io/")
5696 (synopsis "Python style guide checker")
5697 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5698 Python code against some of the style conventions in
5699 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5700 (license license:expat)))
5701
5702 (define-public python2-pycodestyle
5703 (package-with-python2 python-pycodestyle))
5704
5705 (define-public python-multidict
5706 (package
5707 (name "python-multidict")
5708 (version "4.7.5")
5709 (source
5710 (origin
5711 (method url-fetch)
5712 (uri (pypi-uri "multidict" version))
5713 (sha256
5714 (base32
5715 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5716 (build-system python-build-system)
5717 (arguments
5718 '(#:modules ((ice-9 ftw)
5719 (srfi srfi-1)
5720 (srfi srfi-26)
5721 (guix build utils)
5722 (guix build python-build-system))
5723 #:phases (modify-phases %standard-phases
5724 (replace 'check
5725 (lambda* (#:key tests? #:allow-other-keys)
5726 (if tests?
5727 (begin
5728 (let ((libdir (find (cut string-prefix? "lib." <>)
5729 (scandir "build"))))
5730 (setenv "PYTHONPATH"
5731 (string-append "./build/" libdir ":"
5732 (getenv "PYTHONPATH")))
5733 (invoke "pytest" "-vv")))
5734 (format #t "test suite not run~%"))
5735 #t)))))
5736 (native-inputs
5737 `(("python-pytest" ,python-pytest)
5738 ("python-pytest-cov" ,python-pytest-cov)))
5739 (home-page "https://github.com/aio-libs/multidict/")
5740 (synopsis "Multidict implementation")
5741 (description "Multidict is dict-like collection of key-value pairs
5742 where key might be occurred more than once in the container.")
5743 (license license:asl2.0)))
5744
5745 (define-public python-orderedmultidict
5746 (package
5747 (name "python-orderedmultidict")
5748 (version "1.0")
5749 (source
5750 (origin
5751 (method url-fetch)
5752 (uri (pypi-uri "orderedmultidict" version))
5753 (sha256
5754 (base32
5755 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5756 (build-system python-build-system)
5757 (arguments
5758 `(#:phases
5759 (modify-phases %standard-phases
5760 (add-after 'unpack 'fix-tests
5761 (lambda _
5762 ;; The package uses nosetest for running the tests.
5763 ;; Adding this initfile allows to run the test suite
5764 ;; without requiring nosetest.
5765 (with-output-to-file "tests/__init__.py" newline)
5766 #t)))))
5767 (propagated-inputs
5768 `(("python-six" ,python-six)))
5769 (native-inputs
5770 `(("python-pycodestyle" ,python-pycodestyle)))
5771 (home-page "https://github.com/gruns/orderedmultidict")
5772 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5773 (description "This package contains a library for ordered multivalue
5774 dictionaries. A multivalue dictionary is a dictionary that can store
5775 multiple values for the same key. An ordered multivalue dictionary is a
5776 multivalue dictionary that retains the order of insertions and deletions.")
5777 (license license:unlicense)))
5778
5779 (define-public python2-orderedmultidict
5780 (package-with-python2 python-orderedmultidict))
5781
5782 (define-public python-autopep8
5783 (package
5784 (name "python-autopep8")
5785 (version "1.5.3")
5786 (source
5787 (origin
5788 (method url-fetch)
5789 (uri (pypi-uri "autopep8" version))
5790 (sha256
5791 (base32
5792 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5793 (build-system python-build-system)
5794 (propagated-inputs
5795 `(("python-pycodestyle" ,python-pycodestyle)
5796 ("python-toml" ,python-toml)))
5797 (home-page "https://github.com/hhatto/autopep8")
5798 (synopsis "Format Python code according to the PEP 8 style guide")
5799 (description
5800 "@code{autopep8} automatically formats Python code to conform to
5801 the PEP 8 style guide. It uses the pycodestyle utility to determine
5802 what parts of the code needs to be formatted. @code{autopep8} is
5803 capable of fixing most of the formatting issues that can be reported
5804 by pycodestyle.")
5805 (license (license:non-copyleft
5806 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5807
5808 (define-public python2-autopep8
5809 (package-with-python2 python-autopep8))
5810
5811 (define-public python-distlib
5812 (package
5813 (name "python-distlib")
5814 (version "0.3.0")
5815 (source
5816 (origin
5817 (method url-fetch)
5818 (uri (pypi-uri "distlib" version ".zip"))
5819 (sha256
5820 (base32
5821 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5822 (build-system python-build-system)
5823 (arguments
5824 `(#:phases
5825 (modify-phases %standard-phases
5826 (add-before 'build 'no-/bin/sh
5827 (lambda _
5828 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5829 (("/bin/sh") (which "sh")))
5830 #t))
5831 (add-before 'check 'prepare-test-env
5832 (lambda _
5833 (setenv "HOME" "/tmp")
5834 ;; NOTE: Any value works, the variable just has to be present.
5835 (setenv "SKIP_ONLINE" "1")
5836 #t)))))
5837 (native-inputs `(("unzip" ,unzip)))
5838 (home-page "https://bitbucket.org/pypa/distlib")
5839 (synopsis "Distribution utilities")
5840 (description "Distlib is a library which implements low-level functions that
5841 relate to packaging and distribution of Python software. It is intended to be
5842 used as the basis for third-party packaging tools.")
5843 (license license:psfl)))
5844
5845 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
5846 (define-public python-distlib/next
5847 (package
5848 (inherit python-distlib)
5849 (version "0.3.1")
5850 (source
5851 (origin
5852 (method url-fetch)
5853 (uri (pypi-uri "distlib" version ".zip"))
5854 (sha256
5855 (base32
5856 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
5857
5858 (define-public python-distutils-extra
5859 (package
5860 (name "python-distutils-extra")
5861 (version "2.38")
5862 (source
5863 (origin
5864 (method url-fetch)
5865 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5866 version "/+download/python-distutils-extra-"
5867 version ".tar.gz"))
5868 (sha256
5869 (base32
5870 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5871 (build-system python-build-system)
5872 (home-page "https://launchpad.net/python-distutils-extra/")
5873 (synopsis "Enhancements to Python's distutils")
5874 (description
5875 "The python-distutils-extra module enables you to easily integrate
5876 gettext support, themed icons, and scrollkeeper-based documentation into
5877 Python's distutils.")
5878 (license license:gpl2)))
5879
5880 (define-public python2-distutils-extra
5881 (package-with-python2 python-distutils-extra))
5882
5883 (define-public python2-elib.intl
5884 (package
5885 (name "python2-elib.intl")
5886 (version "0.0.3")
5887 (source
5888 (origin
5889 ;; This project doesn't tag releases or publish tarballs, so we take
5890 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5891 (method git-fetch)
5892 (uri (git-reference
5893 (url "https://github.com/dieterv/elib.intl")
5894 (commit "d09997cfef")))
5895 (file-name (string-append name "-" version "-checkout"))
5896 (sha256
5897 (base32
5898 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5899 (build-system python-build-system)
5900 (arguments
5901 ;; incompatible with Python 3 (exception syntax)
5902 `(#:python ,python-2
5903 #:tests? #f))
5904 (home-page "https://github.com/dieterv/elib.intl")
5905 (synopsis "Enhanced internationalization for Python")
5906 (description
5907 "The elib.intl module provides enhanced internationalization (I18N)
5908 services for your Python modules and applications.")
5909 (license license:lgpl3+)))
5910
5911 (define-public python-olefile
5912 (package
5913 (name "python-olefile")
5914 (version "0.46")
5915 (source
5916 (origin
5917 (method url-fetch)
5918 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5919 "download/v" version "/olefile-" version ".tar.gz"))
5920 (file-name (string-append name "-" version ".tar.gz"))
5921 (sha256
5922 (base32
5923 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5924 (build-system python-build-system)
5925 (home-page "https://www.decalage.info/python/olefileio")
5926 (synopsis "Read and write Microsoft OLE2 files.")
5927 (description
5928 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5929 Storage or Compound Document, Microsoft Office). It is an improved version of
5930 the OleFileIO module from PIL, the Python Image Library.")
5931 (license license:bsd-3)))
5932
5933 (define-public python2-olefile
5934 (package-with-python2 python-olefile))
5935
5936 (define-public python-pikepdf
5937 (package
5938 (name "python-pikepdf")
5939 (version "2.10.0")
5940 (source
5941 (origin
5942 (method url-fetch)
5943 (uri (pypi-uri "pikepdf" version))
5944 (sha256
5945 (base32 "09wfj1hjvj3r9gv7ywrqd7h3d0bz64bvils8sm3ghj90jhalb03s"))))
5946 (build-system python-build-system)
5947 (arguments
5948 `(#:tests? #false)) ;require python-xmp-toolkit
5949 (native-inputs
5950 `(("pybind11" ,pybind11)
5951 ("python-setuptools" ,python-setuptools)
5952 ("python-setuptools-scm" ,python-setuptools-scm/next)
5953 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
5954 ("python-toml" ,python-toml)
5955 ("python-wheel" ,python-wheel)))
5956 (inputs
5957 `(("qpdf" ,qpdf)))
5958 (propagated-inputs
5959 `(("python-lxml" ,python-lxml)
5960 ("python-pillow" ,python-pillow)))
5961 (home-page "https://github.com/pikepdf/pikepdf")
5962 (synopsis "Read and write PDFs with Python")
5963 (description
5964 "pikepdf is a Python library for reading and writing PDF files.")
5965 (license license:mpl2.0)))
5966
5967 (define-public python-pillow
5968 (package
5969 (name "python-pillow")
5970 (version "8.1.1")
5971 (source
5972 (origin
5973 (method url-fetch)
5974 (uri (pypi-uri "Pillow" version))
5975 (sha256
5976 (base32
5977 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
5978 (build-system python-build-system)
5979 (native-inputs
5980 `(("python-pytest" ,python-pytest)))
5981 (inputs
5982 `(("freetype" ,freetype)
5983 ("lcms" ,lcms)
5984 ("libjpeg" ,libjpeg-turbo)
5985 ("libtiff" ,libtiff)
5986 ("libwebp" ,libwebp)
5987 ("openjpeg" ,openjpeg)
5988 ("zlib" ,zlib)))
5989 (propagated-inputs
5990 `(("python-olefile" ,python-olefile)))
5991 (arguments
5992 `(#:phases
5993 (modify-phases %standard-phases
5994 (add-after 'unpack 'patch-ldconfig
5995 (lambda _
5996 (substitute* "setup.py"
5997 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5998 (replace 'check
5999 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6000 (if tests?
6001 (begin
6002 (setenv "HOME" (getcwd))
6003 ;; Make installed package available for running the tests.
6004 (add-installed-pythonpath inputs outputs)
6005 (invoke "python" "selftest.py" "--installed")
6006 (invoke "python" "-m" "pytest" "-vv"))
6007 #t))))))
6008 (home-page "https://python-pillow.org")
6009 (synopsis "Fork of the Python Imaging Library")
6010 (description
6011 "The Python Imaging Library adds image processing capabilities to your
6012 Python interpreter. This library provides extensive file format support, an
6013 efficient internal representation, and fairly powerful image processing
6014 capabilities. The core image library is designed for fast access to data
6015 stored in a few basic pixel formats. It should provide a solid foundation for
6016 a general image processing tool.")
6017 (properties `((python2-variant . ,(delay python2-pillow))))
6018 (license (license:x11-style
6019 "http://www.pythonware.com/products/pil/license.htm"
6020 "The PIL Software License"))))
6021
6022 (define-public python2-pillow
6023 (package-with-python2
6024 (package
6025 (inherit (strip-python2-variant python-pillow))
6026 ;; Version 6 is the last series with Python 2 support.
6027 (version "6.2.2")
6028 (source
6029 (origin
6030 (method url-fetch)
6031 (uri (pypi-uri "Pillow" version))
6032 (sha256
6033 (base32
6034 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
6035
6036 (define-public python-pillow-2.9
6037 (package
6038 (inherit python-pillow)
6039 (version "2.9.0")
6040 (source
6041 (origin
6042 (method url-fetch)
6043 (uri (pypi-uri "Pillow" version))
6044 (sha256
6045 (base32
6046 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
6047 (arguments
6048 (substitute-keyword-arguments (package-arguments python-pillow)
6049 ((#:tests? _ #f) #f)))
6050 (properties '((hidden? #t)))))
6051
6052 (define-public python-pillow-simd
6053 (package
6054 (inherit python-pillow)
6055 (name "python-pillow-simd")
6056 (version "7.1.2")
6057 ;; The PyPI tarball does not include test files.
6058 (source
6059 (origin
6060 (method git-fetch)
6061 (uri (git-reference
6062 (url "https://github.com/uploadcare/pillow-simd")
6063 (commit version)))
6064 (file-name (git-file-name name version))
6065 (sha256
6066 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
6067 (arguments
6068 (substitute-keyword-arguments
6069 (package-arguments python-pillow)
6070 ((#:phases phases)
6071 `(modify-phases ,phases
6072 (add-after 'unpack 'make-tests-writable
6073 (lambda _
6074 (for-each make-file-writable (find-files "Tests"))
6075 #t))))))
6076 (inputs
6077 `(("libraqm" ,libraqm)
6078 ("libimagequant" ,libimagequant)
6079 ,@(package-inputs python-pillow)))
6080 (home-page "https://github.com/uploadcare/pillow-simd")
6081 (synopsis "Fork of the Python Imaging Library (Pillow)")
6082 (description "This package is a fork of Pillow which adds support for SIMD
6083 parallelism.")))
6084
6085 (define-public python-imagecodecs
6086 (package
6087 (name "python-imagecodecs")
6088 (version "2021.3.31")
6089 (source
6090 (origin
6091 (method url-fetch)
6092 (uri (pypi-uri "imagecodecs" version))
6093 (sha256
6094 (base32
6095 "0q7pslb6wd56vbcq2mdxwsiha32mxjr7mgqqfbq5w42q601p9pi0"))
6096 (modules '((guix build utils)))
6097 (snippet
6098 '(begin
6099 ;; Unbundle 3rd party modules.
6100 (delete-file-recursively "3rdparty")
6101 ;; Delete pre-generated Cython files.
6102 (for-each delete-file (find-files "imagecodecs" "_.*\\.c$"))
6103 #t))))
6104 (build-system python-build-system)
6105 (arguments
6106 `(#:tests? #f ; Tests are disabled, because dependencies are missing.
6107 #:phases
6108 (modify-phases %standard-phases
6109 (add-after 'unpack 'create-configuration
6110 (lambda* (#:key inputs #:allow-other-keys)
6111 ;; By default everything is enabled. We can selectively disable
6112 ;; extensions (and thus dependencies) by deleting them from the
6113 ;; EXTENSIONS dictionary. This is upstream’s preferred way.
6114 (call-with-output-file "imagecodecs_distributor_setup.py"
6115 (lambda (port)
6116 (format port "\
6117 def customize_build(EXTENSIONS, OPTIONS):
6118 del EXTENSIONS['aec']
6119 del EXTENSIONS['avif']
6120 del EXTENSIONS['bitshuffle']
6121 del EXTENSIONS['deflate']
6122 del EXTENSIONS['jpeg2k']
6123 del EXTENSIONS['jpeg12']
6124 del EXTENSIONS['jpegls']
6125 del EXTENSIONS['jpegxl']
6126 del EXTENSIONS['jpegxr']
6127 del EXTENSIONS['lerc']
6128 del EXTENSIONS['ljpeg']
6129 del EXTENSIONS['lzf']
6130 del EXTENSIONS['zfp']
6131 del EXTENSIONS['zopfli']
6132 OPTIONS['cythonize']
6133 ")))
6134 #t)))))
6135 (inputs
6136 `(("c-blosc" ,c-blosc)
6137 ("giflib" ,giflib)
6138 ("google-brotli" ,google-brotli)
6139 ("libjpeg-turbo" ,libjpeg-turbo)
6140 ("libpng" ,libpng)
6141 ("libtiff" ,libtiff)
6142 ("libwebp" ,libwebp)
6143 ("lz4" ,lz4)
6144 ("snappy" ,snappy)
6145 ("xz" ,xz)
6146 ("zlib" ,zlib)
6147 ("zstd" ,zstd "lib")))
6148 (propagated-inputs
6149 `(("python-numpy" ,python-numpy)))
6150 (native-inputs
6151 ;; For building.
6152 `(("python-cython" ,python-cython)
6153 ;; For testing. Incomplete.
6154 ;("python-numcodecs" ,python-numcodecs)
6155 ;("python-zarr" ,python-zarr)
6156 ;("python-pytest" ,python-pytest)
6157 ))
6158 (home-page "https://www.lfd.uci.edu/~gohlke/")
6159 (synopsis
6160 "Image transformation, compression, and decompression codecs")
6161 (description
6162 "Imagecodecs is a Python library that provides block-oriented, in-memory
6163 buffer transformation, compression, and decompression functions for use in the
6164 tifffile, czifile, and other scientific image input/output modules.")
6165 (license license:bsd-3)))
6166
6167 (define-public python-roifile
6168 (package
6169 (name "python-roifile")
6170 (version "2020.11.28")
6171 (source
6172 (origin
6173 (method url-fetch)
6174 (uri (pypi-uri "roifile" version))
6175 (sha256
6176 (base32
6177 "04argnc7qccybkrj9ww18bf81ghsghhh93hnqy3p111rcdlyn66p"))))
6178 (build-system python-build-system)
6179 (arguments `(#:tests? #f)) ; there are none
6180 (propagated-inputs
6181 `(("python-numpy" ,python-numpy)))
6182 (home-page "https://www.lfd.uci.edu/~gohlke/")
6183 (synopsis "Read and write ImageJ ROI format")
6184 (description "Roifile is a Python library to read, write, create, and plot
6185 ImageJ ROIs, an undocumented and ImageJ application specific format to store
6186 regions of interest, geometric shapes, paths, text, etc for image overlays.")
6187 (license license:bsd-3)))
6188
6189 (define-public python-tifffile
6190 (package
6191 (name "python-tifffile")
6192 (version "2021.4.8")
6193 (source
6194 (origin
6195 (method url-fetch)
6196 (uri (pypi-uri "tifffile" version))
6197 (sha256
6198 (base32
6199 "16r0hw7shka1bqf28bv198lj2jhf2r9gy3s5zv4nf5cfsfm8pajm"))))
6200 (build-system python-build-system)
6201 ;; Tests require lfdfiles, which depends on tifffile
6202 (arguments `(#:tests? #f))
6203 (propagated-inputs
6204 `(("python-numpy" ,python-numpy)
6205 ("python-imagecodecs" ,python-imagecodecs)))
6206 (home-page "https://www.lfd.uci.edu/~gohlke/")
6207 (synopsis "Read and write TIFF(r) files")
6208 (description "This package lets you read image and metadata from many
6209 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6210 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6211 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6212 (license license:bsd-3)))
6213
6214 (define-public python-lfdfiles
6215 (package
6216 (name "python-lfdfiles")
6217 (version "2021.2.22")
6218 (source
6219 (origin
6220 (method url-fetch)
6221 (uri (pypi-uri "lfdfiles" version))
6222 (sha256
6223 (base32
6224 "12fxm4v805dgjrih7x6jnl1wd7y7jw1rkhjs3d4am8s6qk1cbar2"))
6225 (modules '((guix build utils)))
6226 (snippet
6227 '(begin
6228 ;; Delete pre-generated Cython files.
6229 (for-each delete-file (find-files "lfdfiles" "_.*\\.c$"))
6230 #t))))
6231 (build-system python-build-system)
6232 (arguments
6233 `(#:tests? #f)) ; No tests exist, despite a test dependency on pytest.
6234 (propagated-inputs
6235 `(("python-click" ,python-click)
6236 ("python-numpy" ,python-numpy)
6237 ("python-tifffile" ,python-tifffile)))
6238 (native-inputs `(("python-cython" ,python-cython)))
6239 (home-page "https://www.lfd.uci.edu/~gohlke/")
6240 (synopsis "Work with LFD data files")
6241 (description
6242 "Lfdfiles is a Python library and console script for reading, writing,
6243 converting, and viewing many of the proprietary file formats used to store
6244 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6245 (license license:bsd-3)))
6246
6247 (define-public python-imageio
6248 (package
6249 (name "python-imageio")
6250 (version "2.8.0")
6251 (source
6252 (origin
6253 (method url-fetch)
6254 (uri (pypi-uri "imageio" version))
6255 (sha256
6256 (base32
6257 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6258 (build-system python-build-system)
6259 (arguments
6260 `(#:tests? #f ; many tests require online data
6261 #:phases
6262 (modify-phases %standard-phases
6263 (replace 'check
6264 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6265 (if tests?
6266 (begin
6267 ;; Make installed package available for running the tests.
6268 (add-installed-pythonpath inputs outputs)
6269 (invoke "pytest" "-vv"))
6270 #t))))))
6271 (propagated-inputs
6272 `(("python-numpy" ,python-numpy)
6273 ("python-pillow" ,python-pillow)
6274 ("python-psutil" ,python-psutil)))
6275 (native-inputs
6276 `(("python-pytest" ,python-pytest)))
6277 (home-page "https://imageio.github.io/")
6278 (synopsis "Library for reading and writing a wide range of image data")
6279 (description
6280 "Imageio is a Python library that provides an easy interface to read and
6281 write a wide range of image data, including animated images, video, volumetric
6282 data, and scientific formats.")
6283 (license license:bsd-2)))
6284
6285 (define-public python-pycparser
6286 (package
6287 (name "python-pycparser")
6288 (version "2.20")
6289 (source
6290 (origin
6291 (method url-fetch)
6292 (uri (pypi-uri "pycparser" version))
6293 (sha256
6294 (base32
6295 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6296 (outputs '("out" "doc"))
6297 (build-system python-build-system)
6298 (native-inputs
6299 `(("pkg-config" ,pkg-config)))
6300 (arguments
6301 `(#:phases
6302 (modify-phases %standard-phases
6303 (replace 'check
6304 (lambda _
6305 (with-directory-excursion "tests"
6306 (invoke "python" "all_tests.py"))
6307 #t))
6308 (add-after 'install 'install-doc
6309 (lambda* (#:key outputs #:allow-other-keys)
6310 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6311 (doc (string-append data "/doc/" ,name "-" ,version))
6312 (examples (string-append doc "/examples")))
6313 (mkdir-p examples)
6314 (for-each (lambda (file)
6315 (copy-file (string-append "." file)
6316 (string-append doc file)))
6317 '("/README.rst" "/CHANGES" "/LICENSE"))
6318 (copy-recursively "examples" examples)
6319 #t))))))
6320 (home-page "https://github.com/eliben/pycparser")
6321 (synopsis "C parser in Python")
6322 (description
6323 "Pycparser is a complete parser of the C language, written in pure Python
6324 using the PLY parsing library. It parses C code into an AST and can serve as
6325 a front-end for C compilers or analysis tools.")
6326 (license license:bsd-3)))
6327
6328 (define-public python2-pycparser
6329 (package-with-python2 python-pycparser))
6330
6331 (define-public python-xlsxwriter
6332 (package
6333 (name "python-xlsxwriter")
6334 (version "1.3.9")
6335 (source
6336 (origin
6337 ;; There are no tests in the PyPI tarball.
6338 (method git-fetch)
6339 (uri (git-reference
6340 (url "https://github.com/jmcnamara/XlsxWriter")
6341 (commit (string-append "RELEASE_" version))))
6342 (file-name (git-file-name name version))
6343 (sha256
6344 (base32 "04idf331rp0iyhlnh7268jmim8ydw4jjb81hr5rh548sqnq4bhpl"))))
6345 (build-system python-build-system)
6346 (home-page "https://github.com/jmcnamara/XlsxWriter")
6347 (synopsis "Python module for creating Excel XLSX files")
6348 (description
6349 "XlsxWriter is a Python module that can be used to write text, numbers,
6350 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
6351 (license license:bsd-2)))
6352
6353 (define-public python-pywavelets
6354 (package
6355 (name "python-pywavelets")
6356 (version "1.1.1")
6357 (home-page "https://github.com/PyWavelets/pywt")
6358 (source (origin
6359 (method url-fetch)
6360 (uri (pypi-uri "PyWavelets" version))
6361 (sha256
6362 (base32
6363 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6364 (build-system python-build-system)
6365 (arguments
6366 '(#:modules ((ice-9 ftw)
6367 (srfi srfi-1)
6368 (srfi srfi-26)
6369 (guix build utils)
6370 (guix build python-build-system))
6371 #:phases
6372 (modify-phases %standard-phases
6373 (replace 'check
6374 (lambda _
6375 (let ((cwd (getcwd))
6376 (libdir (find (cut string-prefix? "lib." <>)
6377 (scandir "build"))))
6378 (with-directory-excursion (string-append cwd "/build/" libdir)
6379 (invoke "pytest" "-vv"))))))))
6380 (native-inputs
6381 `(("python-matplotlib" ,python-matplotlib) ;for tests
6382 ("python-pytest" ,python-pytest)))
6383 (propagated-inputs
6384 `(("python-numpy" ,python-numpy)))
6385 (synopsis "Wavelet transforms in Python")
6386 (description
6387 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6388 mathematical basis functions that are localized in both time and frequency.
6389 Wavelet transforms are time-frequency transforms employing wavelets. They are
6390 similar to Fourier transforms, the difference being that Fourier transforms are
6391 localized only in frequency instead of in time and frequency.")
6392 (license license:expat)))
6393
6394 (define-public python-pywal
6395 (package
6396 (name "python-pywal")
6397 (version "3.3.0")
6398 (source
6399 (origin
6400 (method git-fetch)
6401 (uri (git-reference
6402 (url "https://github.com/dylanaraps/pywal")
6403 (commit version)))
6404 (file-name (git-file-name name version))
6405 (sha256
6406 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
6407 (build-system python-build-system)
6408 (arguments
6409 `(#:phases
6410 (modify-phases %standard-phases
6411 (add-before 'check 'fix-home-directory
6412 (lambda _
6413 ;; Tests fail with "Permission denied: '/homeless-shelter'".
6414 (setenv "HOME" "/tmp")
6415 #t)))))
6416 (inputs
6417 `(("imagemagick" ,imagemagick)))
6418 (home-page "https://github.com/dylanaraps/pywal")
6419 (synopsis "Color palette generator and applicator")
6420 (description
6421 "Pywal is a tool that generates a color palette from the dominant colors
6422 in an image. It then applies the colors system-wide and on-the-fly in all of
6423 your favourite programs.")
6424 (license license:expat)))
6425
6426 (define-public python-pywinrm
6427 (package
6428 (name "python-pywinrm")
6429 (version "0.4.1")
6430 (source
6431 (origin
6432 (method url-fetch)
6433 (uri (pypi-uri "pywinrm" version))
6434 (sha256
6435 (base32
6436 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6437 (build-system python-build-system)
6438 (propagated-inputs
6439 `(("python-six" ,python-six)
6440 ("python-requests_ntlm" ,python-requests_ntlm)
6441 ("python-xmltodict" ,python-xmltodict)
6442 ("python-kerberos" ,python-kerberos)))
6443 (native-inputs
6444 `(("python-mock" ,python-mock)
6445 ("python-pytest" ,python-pytest)))
6446 (home-page "https://github.com/diyan/pywinrm/")
6447 (synopsis
6448 "Python library for Windows Remote Management (WinRM)")
6449 (description
6450 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6451 service. It allows you to invoke commands on target Windows machines from
6452 any machine that can run Python.")
6453 (license license:expat)))
6454
6455 (define-public python-xcffib
6456 (package
6457 (name "python-xcffib")
6458 (version "0.6.0")
6459 (source
6460 (origin
6461 (method url-fetch)
6462 (uri (pypi-uri "xcffib" version))
6463 (sha256
6464 (base32
6465 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6466 (build-system python-build-system)
6467 (inputs
6468 `(("libxcb" ,libxcb)))
6469 (propagated-inputs
6470 `(("python-cffi" ,python-cffi) ; used at run time
6471 ("python-six" ,python-six)))
6472 (arguments
6473 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6474 #:tests? #f
6475 #:phases
6476 (modify-phases %standard-phases
6477 (add-after 'unpack 'fix-libxcb-path
6478 (lambda* (#:key inputs #:allow-other-keys)
6479 (let ((libxcb (assoc-ref inputs "libxcb")))
6480 (substitute* '("xcffib/__init__.py")
6481 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6482 #t)))
6483 (add-after 'install 'install-doc
6484 (lambda* (#:key outputs #:allow-other-keys)
6485 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6486 "/doc/" ,name "-" ,version)))
6487 (mkdir-p doc)
6488 (copy-file "README.md"
6489 (string-append doc "/README.md"))
6490 #t))))))
6491 (home-page "https://github.com/tych0/xcffib")
6492 (synopsis "XCB Python bindings")
6493 (description
6494 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6495 support for Python 3 and PyPy. It is based on cffi.")
6496 (license license:expat)))
6497
6498 (define-public python2-xcffib
6499 (package-with-python2 python-xcffib))
6500
6501 (define-public python-cairocffi
6502 (package
6503 (name "python-cairocffi")
6504 (version "1.2.0")
6505 (source
6506 (origin
6507 ;; The PyPI archive does not include the documentation, so use Git.
6508 (method git-fetch)
6509 (uri (git-reference
6510 (url "https://github.com/Kozea/cairocffi")
6511 (commit (string-append "v" version))))
6512 (file-name (git-file-name name version))
6513 (sha256
6514 (base32
6515 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6516 (build-system python-build-system)
6517 (outputs '("out" "doc"))
6518 (inputs
6519 `(("glib" ,glib)
6520 ("gtk+" ,gtk+)
6521 ("gdk-pixbuf" ,gdk-pixbuf)
6522 ("cairo" ,cairo)))
6523 (native-inputs
6524 `(("python-numpy" ,python-numpy)
6525 ("python-pytest" ,python-pytest)
6526 ("python-pytest-cov" ,python-pytest-cov)
6527 ("python-pytest-runner" ,python-pytest-runner)
6528 ("python-sphinx" ,python-sphinx)
6529 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6530 (propagated-inputs
6531 `(("python-xcffib" ,python-xcffib))) ; used at run time
6532 (arguments
6533 `(#:phases
6534 (modify-phases %standard-phases
6535 (add-after 'unpack 'patch-paths
6536 (lambda* (#:key inputs #:allow-other-keys)
6537 (substitute* "cairocffi/__init__.py"
6538 ;; Hack the dynamic library loading mechanism.
6539 (("find_library\\(library_name\\)")
6540 "\"found\"")
6541 (("filenames = \\(library_filename,\\) \\+ filenames")
6542 "pass")
6543 (("libcairo.so.2")
6544 (string-append (assoc-ref inputs "cairo")
6545 "/lib/libcairo.so.2")))
6546 (substitute* "cairocffi/pixbuf.py"
6547 (("libgdk_pixbuf-2.0.so.0")
6548 (string-append (assoc-ref inputs "gdk-pixbuf")
6549 "/lib/libgdk_pixbuf-2.0.so.0"))
6550 (("libgobject-2.0.so.0")
6551 (string-append (assoc-ref inputs "glib")
6552 "/lib/libgobject-2.0.so.0"))
6553 (("libglib-2.0.so.0")
6554 (string-append (assoc-ref inputs "glib")
6555 "/lib/libglib-2.0.so.0"))
6556 (("libgdk-3.so.0")
6557 (string-append (assoc-ref inputs "gtk+")
6558 "/lib/libgdk-3.so.0")))
6559 #t))
6560 (add-after 'unpack 'disable-linters
6561 ;; Their check fails; none of our business.
6562 (lambda _
6563 (substitute* "setup.cfg"
6564 ((".*pytest-flake8.*") "")
6565 ((".*pytest-isort.*") "")
6566 (("--flake8") "")
6567 (("--isort") ""))
6568 #t))
6569 (add-after 'install 'install-doc
6570 (lambda* (#:key inputs outputs #:allow-other-keys)
6571 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6572 (doc (string-append data "/doc/" ,name "-" ,version))
6573 (html (string-append doc "/html")))
6574 (setenv "LD_LIBRARY_PATH"
6575 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6576 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6577 (setenv "LANG" "en_US.UTF-8")
6578 (mkdir-p html)
6579 (for-each (lambda (file)
6580 (copy-file (string-append "." file)
6581 (string-append doc file)))
6582 '("/README.rst" "/NEWS.rst"))
6583 (system* "python" "setup.py" "build_sphinx")
6584 (copy-recursively "docs/_build/html" html)
6585 #t))))))
6586 (home-page "https://github.com/Kozea/cairocffi")
6587 (synopsis "Python bindings and object-oriented API for Cairo")
6588 (description
6589 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6590 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6591 graphics library with support for multiple backends including image buffers,
6592 PNG, PostScript, PDF, and SVG file output.")
6593 (license license:bsd-3)))
6594
6595 (define-public python-decorator
6596 (package
6597 (name "python-decorator")
6598 (version "4.3.0")
6599 (source
6600 (origin
6601 (method url-fetch)
6602 (uri (pypi-uri "decorator" version))
6603 (sha256
6604 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6605 (build-system python-build-system)
6606 (home-page "https://pypi.org/project/decorator/")
6607 (synopsis "Python module to simplify usage of decorators")
6608 (description
6609 "The aim of the decorator module is to simplify the usage of decorators
6610 for the average programmer, and to popularize decorators usage giving examples
6611 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6612 etc. The core of this module is a decorator factory.")
6613 (license license:expat)))
6614
6615 (define-public python2-decorator
6616 (package-with-python2 python-decorator))
6617
6618 (define-public python-drmaa
6619 (package
6620 (name "python-drmaa")
6621 (version "0.7.7")
6622 (source
6623 (origin
6624 (method url-fetch)
6625 (uri (pypi-uri "drmaa" version))
6626 (sha256
6627 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6628 (build-system python-build-system)
6629 ;; The test suite requires libdrmaa which is provided by the cluster
6630 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6631 ;; should be set to the path of the libdrmaa library.
6632 (arguments '(#:tests? #f))
6633 (native-inputs
6634 `(("python-nose" ,python-nose)))
6635 (home-page "https://pypi.org/project/drmaa/")
6636 (synopsis "Python bindings for the DRMAA library")
6637 (description
6638 "A Python package for Distributed Resource Management (DRM) job
6639 submission and control. This package is an implementation of the DRMAA 1.0
6640 Python language binding specification.")
6641 (license license:bsd-3)))
6642
6643 (define-public python2-drmaa
6644 (package-with-python2 python-drmaa))
6645
6646 (define-public python-grako
6647 (package
6648 (name "python-grako")
6649 (version "3.99.9")
6650 (source
6651 (origin
6652 (method url-fetch)
6653 (uri
6654 (pypi-uri "grako" version ".zip"))
6655 (sha256
6656 (base32
6657 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6658 (build-system python-build-system)
6659 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6660 (native-inputs
6661 `(("unzip" ,unzip)
6662 ("python-pytest" ,python-pytest)
6663 ("python-pytest-runner" ,python-pytest-runner)))
6664 (home-page "https://bitbucket.org/neogeny/grako")
6665 (synopsis "EBNF parser generator")
6666 (description
6667 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6668 memoizing PEG/Packrat parser in Python.")
6669 (license license:bsd-3)))
6670
6671 (define-public python2-grako
6672 (package-with-python2 python-grako))
6673
6674 (define-public python-grandalf
6675 (package
6676 (name "python-grandalf")
6677 (version "0.7")
6678 (source
6679 (origin
6680 ;; There's no source tarball on PyPI.
6681 (method git-fetch)
6682 (uri (git-reference
6683 (url "https://github.com/bdcht/grandalf")
6684 (commit (string-append "v" version))))
6685 (file-name (git-file-name name version))
6686 (sha256
6687 (base32
6688 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6689 (build-system python-build-system)
6690 (arguments
6691 '(#:phases
6692 (modify-phases %standard-phases
6693 (replace 'check
6694 (lambda _
6695 (invoke "python" "setup.py" "pytest"))))))
6696 (native-inputs
6697 `(("python-pytest" ,python-pytest)
6698 ("python-pytest-runner" ,python-pytest-runner)))
6699 (propagated-inputs
6700 `(("python-numpy" ,python-numpy)
6701 ("python-ply" ,python-ply)))
6702 (home-page "https://github.com/bdcht/grandalf")
6703 (synopsis "Graph and drawing algorithms framework")
6704 (description
6705 "Grandalf is a Python package made for experimentations with graphs
6706 drawing algorithms. It is written in pure Python, and currently implements
6707 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6708 minimization approach. While not as fast or featured as graphviz or other
6709 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6710 than thousands of nodes, while keeping the source code simple enough to tweak
6711 and hack any part of it for experimental purpose. With a total of about 1500
6712 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6713 in less than 600 lines. The energy minimization approach is comprised of only
6714 250 lines!
6715
6716 Grandalf does only 2 not-so-simple things:
6717 @itemize
6718 @item computing the nodes (x,y) coordinates (based on provided nodes
6719 dimensions, and a chosen layout)
6720 @item routing the edges with lines or nurbs
6721 @end itemize
6722
6723 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6724 will help you find where to draw things like nodes and edges, but it’s up to
6725 you to actually draw things with your favorite toolkit.")
6726 ;; The user can choose either license.
6727 (license (list license:gpl2 license:epl1.0))))
6728
6729 (define-public python-gridmap
6730 (package
6731 (name "python-gridmap")
6732 (version "0.14.0")
6733 (source
6734 (origin
6735 (method git-fetch)
6736 (uri (git-reference
6737 (url "https://github.com/pygridtools/gridmap")
6738 (commit (string-append "v" version))))
6739 (file-name (git-file-name name version))
6740 (sha256
6741 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6742 (build-system python-build-system)
6743 (arguments
6744 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6745 (propagated-inputs
6746 `(("python-psutil" ,python-psutil)
6747 ("python-drmaa" ,python-drmaa)
6748 ("python-pyzmq" ,python-pyzmq)))
6749 (home-page "https://github.com/pygridtools/gridmap")
6750 (synopsis "Create jobs on a cluster directly from Python")
6751 (description
6752 "Gridmap is a Python package to allow you to easily create jobs on the
6753 cluster directly from Python. You can directly map Python functions onto the
6754 cluster without needing to write any wrapper code yourself.")
6755 (license license:gpl3+)))
6756
6757 (define-public python2-gridmap
6758 (package-with-python2 python-gridmap))
6759
6760 (define-public python-honcho
6761 (package
6762 (name "python-honcho")
6763 (version "1.0.1")
6764 (source
6765 (origin
6766 (method git-fetch)
6767 (uri (git-reference
6768 (url "https://github.com/nickstenning/honcho")
6769 (commit (string-append "v" version))))
6770 (file-name (git-file-name name version))
6771 (sha256
6772 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6773 (build-system python-build-system)
6774 (native-inputs
6775 `(("python-pytest" ,python-pytest)
6776 ("python-mock" ,python-mock)
6777 ("python-tox" ,python-tox)
6778 ("which" ,which))) ;for tests
6779 (propagated-inputs
6780 `(("python-jinja2" ,python-jinja2)))
6781 (arguments
6782 `(#:phases
6783 (modify-phases %standard-phases
6784 (delete 'check)
6785 (add-after 'install 'check
6786 (lambda* (#:key outputs inputs #:allow-other-keys)
6787 ;; fix honcho path in testsuite
6788 (substitute* "tests/conftest.py"
6789 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6790 "/bin/honcho" "'")))
6791 ;; It's easier to run tests after install.
6792 ;; Make installed package available for running the tests
6793 (add-installed-pythonpath inputs outputs)
6794 (invoke "py.test" "-v"))))))
6795 (home-page "https://github.com/nickstenning/honcho")
6796 (synopsis "Manage Procfile-based applications")
6797 (description
6798 "A Procfile is a file which describes how to run an application
6799 consisting of several processes. honcho starts all listed processes.
6800 The output of all running processes is collected by honcho and
6801 displayed.")
6802 (license license:expat)))
6803
6804 (define-public python-pexpect
6805 (package
6806 (name "python-pexpect")
6807 (version "4.8.0")
6808 (source
6809 (origin
6810 (method url-fetch)
6811 (uri (pypi-uri "pexpect" version))
6812 (sha256
6813 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6814 (build-system python-build-system)
6815 (arguments
6816 `(#:phases
6817 (modify-phases %standard-phases
6818 (add-before 'check 'prepare-tests
6819 (lambda _
6820 (substitute* (find-files "tests")
6821 (("/bin/ls") (which "ls"))
6822 (("/bin/echo") (which "echo"))
6823 (("/bin/which") (which "which"))
6824 ;; Many tests try to use the /bin directory which
6825 ;; is not present in the build environment.
6826 ;; Use one that's non-empty and unlikely to change.
6827 (("/bin'") "/dev'")
6828 ;; Disable failing test. See upstream bug report
6829 ;; https://github.com/pexpect/pexpect/issues/568
6830 (("def test_bash") "def _test_bash"))
6831 ;; XXX: Socket connection test gets "Connection reset by peer".
6832 ;; Why does it not work? Delete for now.
6833 (delete-file "tests/test_socket.py")
6834 #t))
6835 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6836 (native-inputs
6837 `(("python-nose" ,python-nose)
6838 ("python-pytest" ,python-pytest)
6839 ("man-db" ,man-db)
6840 ("which" ,which)
6841 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6842 (propagated-inputs
6843 `(("python-ptyprocess" ,python-ptyprocess)))
6844 (home-page "http://pexpect.readthedocs.org/")
6845 (synopsis "Controlling interactive console applications")
6846 (description
6847 "Pexpect is a pure Python module for spawning child applications;
6848 controlling them; and responding to expected patterns in their output.
6849 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6850 child application and control it as if a human were typing commands.")
6851 (license license:isc)))
6852
6853 (define-public python2-pexpect
6854 (package-with-python2 python-pexpect))
6855
6856 (define-public python-setuptools-scm
6857 (package
6858 (name "python-setuptools-scm")
6859 (version "3.4.3")
6860 (source (origin
6861 (method url-fetch)
6862 (uri (pypi-uri "setuptools_scm" version))
6863 (sha256
6864 (base32
6865 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6866 (build-system python-build-system)
6867 (home-page "https://github.com/pypa/setuptools_scm/")
6868 (synopsis "Manage Python package versions in SCM metadata")
6869 (description
6870 "Setuptools_scm handles managing your Python package versions in
6871 @dfn{software configuration management} (SCM) metadata instead of declaring
6872 them as the version argument or in a SCM managed file.")
6873 (license license:expat)))
6874
6875 ;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
6876 (define-public python-setuptools-scm/next
6877 (package
6878 (inherit python-setuptools-scm)
6879 (version "5.0.1")
6880 (source
6881 (origin
6882 (method url-fetch)
6883 (uri (pypi-uri "setuptools_scm" version))
6884 (sha256
6885 (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
6886
6887 (define-public python2-setuptools-scm
6888 (package-with-python2 python-setuptools-scm))
6889
6890 (define-public python-sexpdata
6891 (package
6892 (name "python-sexpdata")
6893 (version "0.0.3")
6894 (source
6895 (origin
6896 (method url-fetch)
6897 (uri (pypi-uri "sexpdata" version))
6898 (sha256
6899 (base32
6900 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6901 (build-system python-build-system)
6902 (home-page "https://github.com/jd-boyd/sexpdata")
6903 (synopsis "S-expression parser for Python")
6904 (description
6905 "Sexpdata is an S-expression parser/serializer. It has load and dump
6906 functions like pickle, json or PyYAML module.")
6907 (license license:bsd-3)))
6908
6909 (define-public python-pathlib2
6910 (package
6911 (name "python-pathlib2")
6912 (version "2.3.3")
6913 (source
6914 (origin
6915 (method url-fetch)
6916 (uri (pypi-uri "pathlib2" version))
6917 (sha256
6918 (base32
6919 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6920 (build-system python-build-system)
6921 (propagated-inputs
6922 `(("python-scandir" ,python-scandir)
6923 ("python-six" ,python-six)))
6924 (home-page "https://pypi.org/project/pathlib2/")
6925 (synopsis "Object-oriented file system paths")
6926 (description "The goal of pathlib2 is to provide a backport of the
6927 standard @code{pathlib} module which tracks the standard library module, so
6928 all the newest features of the standard @code{pathlib} can be used also on
6929 older Python versions.")
6930 (license license:expat)))
6931
6932 (define-public python-importlib-resources
6933 (package
6934 (name "python-importlib-resources")
6935 (version "3.0.0")
6936 (source
6937 (origin
6938 (method url-fetch)
6939 (uri (pypi-uri "importlib_resources" version))
6940 (sha256
6941 (base32
6942 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6943 (build-system python-build-system)
6944 (native-inputs
6945 `(("python-setuptools-scm" ,python-setuptools-scm)
6946 ("python-toml" ,python-toml)))
6947 (home-page "http://importlib-resources.readthedocs.io/")
6948 (synopsis "Read resources from Python packages")
6949 (description
6950 "@code{importlib_resources} is a backport of Python 3's standard library
6951 @code{importlib.resources} module for Python 2.7, and Python 3.")
6952 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6953 (license license:asl2.0)))
6954
6955 (define-public python2-importlib-resources
6956 (package
6957 (name "python2-importlib-resources")
6958 (version "1.0.2")
6959 (source (origin
6960 (method url-fetch)
6961 (uri (pypi-uri "importlib_resources" version))
6962 (sha256
6963 (base32
6964 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6965 (build-system python-build-system)
6966 (arguments
6967 `(#:python ,python-2
6968 #:phases (modify-phases %standard-phases
6969 ;; The build system tests for python-wheel, but it is
6970 ;; not required for Guix nor the test suite. Just drop
6971 ;; it to make bootstrapping pytest easier.
6972 (add-after 'unpack 'drop-wheel-dependency
6973 (lambda _
6974 (substitute* "setup.cfg"
6975 (("^[[:blank:]]+wheel")
6976 ""))
6977 #t)))))
6978 (propagated-inputs
6979 `(("python-pathlib2" ,python2-pathlib2)
6980 ("python-typing" ,python2-typing)))
6981 (home-page "https://gitlab.com/python-devs/importlib_resources")
6982 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6983 (description
6984 "This package provides an implementation of @code{importlib.resources}
6985 for older versions of Python.")
6986 (license license:asl2.0)))
6987
6988 ;; For importlib-metadata-bootstrap below.
6989 (define-public python2-importlib-resources-bootstrap
6990 (hidden-package
6991 (package/inherit
6992 python2-importlib-resources
6993 (name "python2-importlib-resources-bootstrap")
6994 (propagated-inputs
6995 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6996 ("python-typing" ,python2-typing))))))
6997
6998 (define-public python-importlib-metadata
6999 (package
7000 (name "python-importlib-metadata")
7001 (version "1.5.0")
7002 (source
7003 (origin
7004 (method url-fetch)
7005 (uri (pypi-uri "importlib_metadata" version))
7006 (sha256
7007 (base32
7008 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
7009 (build-system python-build-system)
7010 (propagated-inputs
7011 `(("python-zipp" ,python-zipp)))
7012 (native-inputs
7013 `(("python-setuptools-scm" ,python-setuptools-scm)
7014 ("python-pyfakefs" ,python-pyfakefs)
7015 ("python-packaging" ,python-packaging)))
7016 (home-page "https://importlib-metadata.readthedocs.io/")
7017 (synopsis "Read metadata from Python packages")
7018 (description
7019 "@code{importlib_metadata} is a library which provides an API for
7020 accessing an installed Python package's metadata, such as its entry points or
7021 its top-level name. This functionality intends to replace most uses of
7022 @code{pkg_resources} entry point API and metadata API. Along with
7023 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
7024 need to use the older and less efficient @code{pkg_resources} package.")
7025 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
7026 (license license:asl2.0)))
7027
7028 (define-public python2-importlib-metadata
7029 (let ((base (package-with-python2 (strip-python2-variant
7030 python-importlib-metadata))))
7031 (package/inherit
7032 base
7033 (name "python2-importlib-metadata")
7034 (native-inputs
7035 `(("python-setuptools-scm" ,python2-setuptools-scm)
7036 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
7037 ("python-packaging" ,python2-packaging-bootstrap)))
7038 (propagated-inputs
7039 `(("python-configparser" ,python2-configparser)
7040 ("python-contextlib2" ,python2-contextlib2)
7041 ("python-importlib-resources" ,python2-importlib-resources)
7042 ("python-pathlib2" ,python2-pathlib2)
7043 ,@(package-propagated-inputs base))))))
7044
7045 ;; This package is used by python2-pytest, and thus must not depend on it.
7046 (define-public python2-importlib-metadata-bootstrap
7047 (hidden-package
7048 (package/inherit
7049 python2-importlib-metadata
7050 (name "python2-importlib-metadata-bootstrap")
7051 (arguments
7052 `(#:tests? #f
7053 ,@(package-arguments python2-importlib-metadata)))
7054 (propagated-inputs
7055 `(("python-zipp" ,python2-zipp-bootstrap)
7056 ("python-pathlib2" ,python2-pathlib2-bootstrap)
7057 ("python-configparser" ,python2-configparser)
7058 ("python-contextlib2" ,python2-contextlib2-bootstrap)
7059 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
7060
7061 (define-public python-importmagic
7062 (package
7063 (name "python-importmagic")
7064 (version "0.1.7")
7065 (source
7066 (origin
7067 (method url-fetch)
7068 (uri (pypi-uri "importmagic" version))
7069 (sha256
7070 (base32
7071 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
7072 (build-system python-build-system)
7073 (home-page "https://github.com/alecthomas/importmagic")
7074 (synopsis "Library for adding, removing and managing Python imports")
7075 (description
7076 "Importmagic is a Python library for automatically managing imports by
7077 finding unresolved symbols in Python code and their corresponding imports.")
7078 (license license:bsd-3)))
7079
7080 (define-public python-inotify-simple
7081 (package
7082 (name "python-inotify-simple")
7083 (version "1.3.5")
7084 (source
7085 (origin
7086 (method git-fetch)
7087 (uri (git-reference
7088 (url "https://github.com/chrisjbillington/inotify_simple")
7089 (commit version)))
7090 (file-name (git-file-name name version))
7091 (sha256
7092 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
7093 (build-system python-build-system)
7094 (home-page
7095 "https://github.com/chrisjbillington/inotify_simple")
7096 (synopsis "Simple wrapper around inotify library")
7097 (description
7098 "@code{inotify-simple} is a simple wrapper around inotify library.")
7099 (license license:bsd-3)))
7100
7101 (define-public python-jaraco-packaging
7102 (package
7103 (name "python-jaraco-packaging")
7104 (version "6.1")
7105 (source
7106 (origin
7107 (method url-fetch)
7108 (uri (pypi-uri "jaraco.packaging" version))
7109 (sha256
7110 (base32
7111 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
7112 (build-system python-build-system)
7113 (propagated-inputs
7114 `(("python-pytest" ,python-pytest)
7115 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
7116 ("python-pytest-flake8" ,python-pytest-flake8)
7117 ("python-rst.linker" ,python-rst.linker)
7118 ("python-setuptools" ,python-setuptools)
7119 ("python-setuptools-scm" ,python-setuptools-scm)
7120 ("python-six" ,python-six)
7121 ("python-sphinx" ,python-sphinx)))
7122 (home-page "https://github.com/jaraco/jaraco.packaging")
7123 (synopsis "Tools to supplement packaging Python releases")
7124 (description
7125 "This package provides various tools to supplement packaging Python
7126 releases.")
7127 (license license:expat)))
7128
7129 (define-public python-pathpy
7130 (package
7131 (name "python-pathpy")
7132 (version "11.5.1")
7133 (source
7134 (origin
7135 (method url-fetch)
7136 (uri (pypi-uri "path.py" version))
7137 (sha256
7138 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
7139 (outputs '("out" "doc"))
7140 (build-system python-build-system)
7141 (propagated-inputs
7142 `(("python-appdirs" ,python-appdirs)
7143 ("python-importlib-metadata" ,python-importlib-metadata)))
7144 (native-inputs
7145 `(("python-setuptools-scm" ,python-setuptools-scm)
7146 ("python-sphinx" ,python-sphinx)
7147 ("python-rst.linker" ,python-rst.linker)
7148 ("python-pytest" ,python-pytest)
7149 ("python-pytest-runner" ,python-pytest-runner)
7150 ("python-jaraco-packaging" ,python-jaraco-packaging)))
7151 (arguments
7152 `(#:phases
7153 (modify-phases %standard-phases
7154 (add-after 'build 'build-doc
7155 (lambda _
7156 (setenv "LANG" "en_US.UTF-8")
7157 (invoke "python" "setup.py" "build_sphinx")))
7158 (add-after 'install 'install-doc
7159 (lambda* (#:key outputs #:allow-other-keys)
7160 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7161 (doc (string-append data "/doc/" ,name "-" ,version))
7162 (html (string-append doc "/html")))
7163 (mkdir-p html)
7164 (for-each (lambda (file)
7165 (copy-file file (string-append doc "/" file)))
7166 '("README.rst" "CHANGES.rst"))
7167 (copy-recursively "build/sphinx/html" html)
7168 #t)))
7169 (replace 'check
7170 (lambda _
7171 ;; The import time test aborts if an import takes longer than
7172 ;; 100ms. It may very well take a little longer than that.
7173 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
7174 (home-page "https://github.com/jaraco/path.py")
7175 (synopsis "Python module wrapper for built-in os.path")
7176 (description
7177 "@code{path.py} implements path objects as first-class entities, allowing
7178 common operations on files to be invoked on those path objects directly.")
7179 (license license:expat)))
7180
7181 (define-public python-simplegeneric
7182 (package
7183 (name "python-simplegeneric")
7184 (version "0.8.1")
7185 (source
7186 (origin
7187 (method url-fetch)
7188 (uri (pypi-uri "simplegeneric" version ".zip"))
7189 (sha256
7190 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
7191 (build-system python-build-system)
7192 (native-inputs
7193 `(("unzip" ,unzip)))
7194 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
7195 (synopsis "Python module for simple generic functions")
7196 (description
7197 "The simplegeneric module lets you define simple single-dispatch generic
7198 functions, akin to Python’s built-in generic functions like @code{len()},
7199 @code{iter()} and so on. However, instead of using specially-named methods,
7200 these generic functions use simple lookup tables, akin to those used by
7201 e.g. @code{pickle.dump()} and other generic functions found in the Python
7202 standard library.")
7203 (license license:zpl2.1)))
7204
7205 (define-public python2-simplegeneric
7206 (package-with-python2 python-simplegeneric))
7207
7208 (define-public python-ipython-genutils
7209 ;; TODO: This package is retired, check if can be removed, see description.
7210 (package
7211 (name "python-ipython-genutils")
7212 (version "0.1.0")
7213 (source
7214 (origin
7215 (method url-fetch)
7216 (uri (pypi-uri "ipython_genutils" version))
7217 (sha256
7218 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7219 (build-system python-build-system)
7220 (arguments `(#:tests? #f)) ; no tests
7221 (home-page "https://ipython.org")
7222 (synopsis "Vestigial utilities from IPython")
7223 (description
7224 "This package provides retired utilities from IPython. No packages
7225 outside IPython/Jupyter should depend on it.
7226
7227 This package shouldn't exist. It contains some common utilities shared by
7228 Jupyter and IPython projects during The Big Split. As soon as possible, those
7229 packages will remove their dependency on this, and this package will go
7230 away.")
7231 (license license:bsd-3)))
7232
7233 (define-public python2-ipython-genutils
7234 (package-with-python2 python-ipython-genutils))
7235
7236 (define-public python-ipyparallel
7237 (package
7238 (name "python-ipyparallel")
7239 (version "6.2.4")
7240 (source
7241 (origin
7242 (method url-fetch)
7243 (uri (pypi-uri "ipyparallel" version))
7244 (sha256
7245 (base32
7246 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7247 (build-system python-build-system)
7248 (arguments
7249 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7250 #:phases
7251 (modify-phases %standard-phases
7252 (add-before 'check 'prepare-for-tests
7253 (lambda _
7254 (setenv "HOME" (getcwd))
7255 #t)))))
7256 (propagated-inputs
7257 `(("python-dateutil" ,python-dateutil)
7258 ("python-decorator" ,python-decorator)
7259 ("python-ipykernel" ,python-ipykernel)
7260 ("python-ipython" ,python-ipython)
7261 ("python-ipython-genutils" ,python-ipython-genutils)
7262 ("python-jupyter-client" ,python-jupyter-client)
7263 ("python-pyzmq" ,python-pyzmq)
7264 ("python-tornado" ,python-tornado)
7265 ("python-traitlets" ,python-traitlets)))
7266 (native-inputs
7267 `(("python-ipython" ,python-ipython)
7268 ("python-mock" ,python-mock)
7269 ("python-nose" ,python-nose)
7270 ("python-pytest" ,python-pytest)
7271 ("python-pytest-cov" ,python-pytest-cov)
7272 ("python-testpath" ,python-testpath)))
7273 (home-page "https://ipython.org/")
7274 (synopsis "Interactive Parallel Computing with IPython")
7275 (description
7276 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7277 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7278 CLI scripts:
7279 @enumerate
7280 @item ipcluster - start/stop a cluster
7281 @item ipcontroller - start a scheduler
7282 @item ipengine - start an engine
7283 @end enumerate")
7284 (license license:bsd-3)))
7285
7286 (define-public python-ipython-cluster-helper
7287 (package
7288 (name "python-ipython-cluster-helper")
7289 (version "0.6.4")
7290 (source
7291 (origin
7292 (method url-fetch)
7293 (uri (pypi-uri "ipython-cluster-helper" version))
7294 (sha256
7295 (base32
7296 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
7297 (modules '((guix build utils)))
7298 (snippet
7299 '(begin (substitute* "requirements.txt"
7300 (("ipython.*") "ipython\n"))
7301 #t))))
7302 (build-system python-build-system)
7303 (arguments
7304 `(#:tests? #f ; Test suite can't find IPython.
7305 #:phases
7306 (modify-phases %standard-phases
7307 (replace 'check
7308 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7309 (if tests?
7310 (begin
7311 (setenv "HOME" (getcwd))
7312 (add-installed-pythonpath inputs outputs)
7313 (invoke "python" "example/example.py" "--local"))
7314 #t))))))
7315 (propagated-inputs
7316 `(("python-ipyparallel" ,python-ipyparallel)
7317 ("python-ipython" ,python-ipython)
7318 ("python-netifaces" ,python-netifaces)
7319 ("python-pyzmq" ,python-pyzmq)
7320 ("python-setuptools" ,python-setuptools)
7321 ("python-six" ,python-six)))
7322 (home-page "https://github.com/roryk/ipython-cluster-helper")
7323 (synopsis
7324 "Simplify IPython cluster start up and use for multiple schedulers")
7325 (description
7326 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
7327 profile, launches a cluster and returns a view. On program exit it shuts the
7328 cluster down and deletes the throwaway profile.")
7329 (license license:expat)))
7330
7331 (define-public python2-ipython-cluster-helper
7332 (package-with-python2 python-ipython-cluster-helper))
7333
7334 (define-public python-traitlets
7335 (package
7336 (name "python-traitlets")
7337 (version "4.3.3")
7338 (source
7339 (origin
7340 (method url-fetch)
7341 (uri (pypi-uri "traitlets" version))
7342 (sha256
7343 (base32
7344 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
7345 (build-system python-build-system)
7346 (arguments
7347 `(#:phases
7348 (modify-phases %standard-phases
7349 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
7350 (propagated-inputs
7351 `(("python-ipython-genutils" ,python-ipython-genutils)
7352 ("python-decorator" ,python-decorator)))
7353 (native-inputs
7354 `(("python-pytest" ,python-pytest)))
7355 (properties `((python2-variant . ,(delay python2-traitlets))))
7356 (home-page "https://ipython.org")
7357 (synopsis "Configuration system for Python applications")
7358 (description
7359 "Traitlets is a framework that lets Python classes have attributes with
7360 type checking, dynamically calculated default values, and ‘on change’
7361 callbacks. The package also includes a mechanism to use traitlets for
7362 configuration, loading values from files or from command line arguments. This
7363 is a distinct layer on top of traitlets, so you can use traitlets in your code
7364 without using the configuration machinery.")
7365 (license license:bsd-3)))
7366
7367 (define-public python2-traitlets
7368 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
7369 (package/inherit traitlets
7370 (propagated-inputs
7371 `(("python2-enum34" ,python2-enum34)
7372 ,@(package-propagated-inputs traitlets))))))
7373
7374 (define-public python-jupyter-core
7375 (package
7376 (name "python-jupyter-core")
7377 (version "4.7.1")
7378 (source
7379 (origin
7380 (method url-fetch)
7381 (uri (string-append (pypi-uri "jupyter_core" version)))
7382 (sha256
7383 (base32
7384 "1d12j5hkff0xiax87pnhmzbsph3jqqzhz16h8xld7z2y4armq0kr"))))
7385 (build-system python-build-system)
7386 ;; FIXME: not sure how to run the tests
7387 (arguments `(#:tests? #f))
7388 (propagated-inputs
7389 `(("python-traitlets" ,python-traitlets)))
7390 (home-page "https://jupyter.org/")
7391 (synopsis "Jupyter base package")
7392 (description
7393 "Jupyter core is the base package on which Jupyter projects rely.")
7394 (license license:bsd-3)))
7395
7396 (define-public python-jupyter-client
7397 (package
7398 (name "python-jupyter-client")
7399 (version "6.1.12")
7400 (source
7401 (origin
7402 (method url-fetch)
7403 (uri (pypi-uri "jupyter_client" version))
7404 (sha256
7405 (base32
7406 "10p7fcgvv9hvz9zical9wk68ks5ssak2ykbzx65wm1k1hk8a3g64"))))
7407 (build-system python-build-system)
7408 ;; Tests fail because of missing native python kernel which I assume is
7409 ;; provided by the ipython package, which we cannot use because it would
7410 ;; cause a dependency cycle.
7411 (arguments
7412 `(#:tests? #f
7413 #:phases (modify-phases %standard-phases
7414 (add-after 'unpack 'set-tool-file-names
7415 (lambda* (#:key inputs #:allow-other-keys)
7416 (let ((iproute (assoc-ref inputs "iproute")))
7417 (substitute* "jupyter_client/localinterfaces.py"
7418 (("'ip'")
7419 (string-append "'" iproute "/sbin/ip'")))
7420 #t))))))
7421 (inputs
7422 `(("iproute" ,iproute)))
7423 (propagated-inputs
7424 `(("python-dateutil" ,python-dateutil)
7425 ("python-jupyter-core" ,python-jupyter-core)
7426 ("python-pyzmq" ,python-pyzmq)
7427 ("python-tornado" ,python-tornado-6)
7428 ("python-traitlets" ,python-traitlets)))
7429 (native-inputs
7430 `(("python-pytest" ,python-pytest)))
7431 (home-page "https://jupyter.org/")
7432 (synopsis "Jupyter protocol implementation and client libraries")
7433 (description
7434 "The @code{jupyter_client} package contains the reference implementation
7435 of the Jupyter protocol. It also provides client and kernel management APIs
7436 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7437 installing @code{kernelspec}s for use with Jupyter frontends.")
7438 (license license:bsd-3)))
7439
7440 (define-public python2-jupyter-client
7441 (package-with-python2 python-jupyter-client))
7442
7443 (define-public python-ipykernel
7444 (package
7445 (name "python-ipykernel")
7446 (version "5.5.3")
7447 (source
7448 (origin
7449 (method url-fetch)
7450 (uri (pypi-uri "ipykernel" version))
7451 (sha256
7452 (base32 "02f55cjkp5q64x7ikjxznbxwjpkdmfy237b9kg7dk1pxmzvy90m6"))))
7453 (build-system python-build-system)
7454 (arguments
7455 `(#:phases
7456 (modify-phases %standard-phases
7457 (replace 'check
7458 (lambda _
7459 (setenv "HOME" "/tmp")
7460 (invoke "pytest" "-v")
7461 #t))
7462 (add-after 'install 'set-python-file-name
7463 (lambda* (#:key outputs #:allow-other-keys)
7464 ;; Record the absolute file name of the 'python' executable in
7465 ;; 'kernel.json'.
7466 (let ((out (assoc-ref outputs "out")))
7467 (substitute* (string-append out "/share/jupyter"
7468 "/kernels/python3/kernel.json")
7469 (("\"python\"")
7470 (string-append "\"" (which "python") "\"")))
7471 #t))))))
7472 (propagated-inputs
7473 `(("python-ipython" ,python-ipython)
7474 ;; imported at runtime during connect
7475 ("python-jupyter-client" ,python-jupyter-client)))
7476 (native-inputs
7477 `(("python-flaky" ,python-flaky)
7478 ("python-nose" ,python-nose)
7479 ("python-pytest" ,python-pytest)))
7480 (home-page "https://ipython.org")
7481 (synopsis "IPython Kernel for Jupyter")
7482 (description
7483 "This package provides the IPython kernel for Jupyter.")
7484 (license license:bsd-3)))
7485
7486 (define-public python-pari-jupyter
7487 (package
7488 (name "python-pari-jupyter")
7489 (version "1.3.2")
7490 (source
7491 (origin
7492 (method url-fetch)
7493 (uri (pypi-uri "pari_jupyter" version))
7494 (sha256
7495 (base32
7496 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7497 (build-system python-build-system)
7498 (propagated-inputs
7499 `(("python-ipykernel" ,python-ipykernel)))
7500 (inputs
7501 `(("pari-gp" ,pari-gp)
7502 ("readline" ,readline)))
7503 (arguments
7504 `(#:tests? #f)) ; no test suite
7505 (home-page
7506 "https://github.com/jdemeyer/pari_jupyter")
7507 (synopsis "A Jupyter kernel for PARI/GP")
7508 (description "The package provides a PARI/GP kernel for Jupyter.")
7509 (license license:gpl3+)))
7510
7511 (define-public python-backcall
7512 (package
7513 (name "python-backcall")
7514 (version "0.2.0")
7515 (source
7516 (origin
7517 (method url-fetch)
7518 (uri (pypi-uri "backcall" version))
7519 (sha256
7520 (base32
7521 "07jy4562lvnhkk6kfr3cphmizy88anlhmbwb8kdzlz2ypqkvzgaw"))))
7522 (build-system python-build-system)
7523 (home-page "https://github.com/takluyver/backcall/")
7524 (synopsis "Specifications for callback functions passed in to an API")
7525 (description
7526 "If your code lets other people supply callback functions, it's important
7527 to specify the function signature you expect, and check that functions support
7528 that. Adding extra parameters later would break other peoples code unless
7529 you're careful. The @code{backcall} package provides a way of specifying the
7530 callback signature using a prototype function.")
7531 (license license:bsd-3)))
7532
7533 (define-public python-ipython
7534 (package
7535 (name "python-ipython")
7536 (version "7.9.0")
7537 (source
7538 (origin
7539 (method url-fetch)
7540 (uri (pypi-uri "ipython" version ".tar.gz"))
7541 (sha256
7542 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7543 (build-system python-build-system)
7544 (propagated-inputs
7545 `(("python-backcall" ,python-backcall)
7546 ("python-pyzmq" ,python-pyzmq)
7547 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7548 ("python-terminado" ,python-terminado)
7549 ("python-matplotlib" ,python-matplotlib)
7550 ("python-numpy" ,python-numpy)
7551 ("python-numpydoc" ,python-numpydoc)
7552 ("python-jedi" ,python-jedi)
7553 ("python-jinja2" ,python-jinja2)
7554 ("python-mistune" ,python-mistune)
7555 ("python-pexpect" ,python-pexpect)
7556 ("python-pickleshare" ,python-pickleshare)
7557 ("python-simplegeneric" ,python-simplegeneric)
7558 ("python-jsonschema" ,python-jsonschema)
7559 ("python-traitlets" ,python-traitlets)
7560 ("python-nbformat" ,python-nbformat)
7561 ("python-pygments" ,python-pygments)))
7562 (inputs
7563 `(("readline" ,readline)
7564 ("which" ,which)))
7565 (native-inputs
7566 `(("graphviz" ,graphviz)
7567 ("pkg-config" ,pkg-config)
7568 ("python-requests" ,python-requests) ;; for tests
7569 ("python-testpath" ,python-testpath)
7570 ("python-nose" ,python-nose)))
7571 (arguments
7572 `(#:phases
7573 (modify-phases %standard-phases
7574 (add-after 'unpack 'make-docs-reproducible
7575 (lambda _
7576 (substitute* "IPython/sphinxext/ipython_directive.py"
7577 ((".*import datetime") "")
7578 ((".*datetime.datetime.now\\(\\)") "")
7579 (("%timeit") "# %timeit"))
7580 #t))
7581 ;; Tests can only be run after the library has been installed and not
7582 ;; within the source directory.
7583 (delete 'check)
7584 (add-after 'install 'check
7585 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7586 (if tests?
7587 (begin
7588 ;; Make installed package available for running the tests
7589 (add-installed-pythonpath inputs outputs)
7590 (setenv "HOME" "/tmp/") ;; required by a test
7591 ;; We only test the core because one of the other tests
7592 ;; tries to import ipykernel.
7593 (invoke "python" "IPython/testing/iptest.py"
7594 "-v" "IPython/core/tests"))
7595 #t)))
7596 (add-before 'check 'fix-tests
7597 (lambda* (#:key inputs #:allow-other-keys)
7598 (substitute* "./IPython/utils/_process_posix.py"
7599 (("/usr/bin/env', 'which") (which "which")))
7600 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7601 (("#!/usr/bin/env python")
7602 (string-append "#!" (which "python"))))
7603 ;; This test introduces a circular dependency on ipykernel
7604 ;; (which depends on ipython).
7605 (delete-file "IPython/core/tests/test_display.py")
7606 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7607 (delete-file "IPython/core/tests/test_interactiveshell.py")
7608 #t)))))
7609 (home-page "https://ipython.org")
7610 (synopsis "IPython is a tool for interactive computing in Python")
7611 (description
7612 "IPython provides a rich architecture for interactive computing with:
7613 Powerful interactive shells, a browser-based notebook, support for interactive
7614 data visualization, embeddable interpreters and tools for parallel
7615 computing.")
7616 (properties `((python2-variant . ,(delay python2-ipython))))
7617 (license license:bsd-3)))
7618
7619 ;; This is the latest release of the LTS version of ipython with support for
7620 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7621 ;; dropped support for Python 2.7.
7622 (define-public python2-ipython
7623 (package
7624 (name "python2-ipython")
7625 (version "5.8.0")
7626 (source
7627 (origin
7628 (method url-fetch)
7629 (uri (pypi-uri "ipython" version ".tar.gz"))
7630 (sha256
7631 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7632 (build-system python-build-system)
7633 (propagated-inputs
7634 `(("python2-backports-shutil-get-terminal-size"
7635 ,python2-backports-shutil-get-terminal-size)
7636 ("python2-pathlib2" ,python2-pathlib2)
7637 ("python2-pyzmq" ,python2-pyzmq)
7638 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7639 ("python2-terminado" ,python2-terminado)
7640 ("python2-matplotlib" ,python2-matplotlib)
7641 ("python2-numpy" ,python2-numpy)
7642 ("python2-numpydoc" ,python2-numpydoc)
7643 ("python2-jinja2" ,python2-jinja2)
7644 ("python2-mistune" ,python2-mistune)
7645 ("python2-pexpect" ,python2-pexpect)
7646 ("python2-pickleshare" ,python2-pickleshare)
7647 ("python2-simplegeneric" ,python2-simplegeneric)
7648 ("python2-jsonschema" ,python2-jsonschema)
7649 ("python2-traitlets" ,python2-traitlets)
7650 ("python2-nbformat" ,python2-nbformat)
7651 ("python2-pygments" ,python2-pygments)))
7652 (inputs
7653 `(("readline" ,readline)
7654 ("which" ,which)))
7655 (native-inputs
7656 `(("graphviz" ,graphviz)
7657 ("pkg-config" ,pkg-config)
7658 ("python2-requests" ,python2-requests) ;; for tests
7659 ("python2-testpath" ,python2-testpath)
7660 ("python2-mock" ,python2-mock)
7661 ("python2-nose" ,python2-nose)))
7662 (arguments
7663 `(#:python ,python-2
7664 #:phases
7665 (modify-phases %standard-phases
7666 (add-before 'check 'delete-broken-tests
7667 (lambda* (#:key inputs #:allow-other-keys)
7668 ;; These tests throw errors for unknown reasons.
7669 (delete-file "IPython/core/tests/test_displayhook.py")
7670 (delete-file "IPython/core/tests/test_magic_terminal.py")
7671 (delete-file "IPython/core/tests/test_profile.py")
7672 #t)))))
7673 (home-page "https://ipython.org")
7674 (synopsis "IPython is a tool for interactive computing in Python")
7675 (description
7676 "IPython provides a rich architecture for interactive computing with:
7677 Powerful interactive shells, a browser-based notebook, support for interactive
7678 data visualization, embeddable interpreters and tools for parallel
7679 computing.")
7680 (license license:bsd-3)))
7681
7682 (define-public python-ipython-documentation
7683 (package
7684 (inherit python-ipython)
7685 (name "python-ipython-documentation")
7686 (version (package-version python-ipython))
7687 (arguments
7688 `(#:phases
7689 (modify-phases %standard-phases
7690 (delete 'build)
7691 (delete 'check)
7692 (replace 'install
7693 (lambda* (#:key outputs #:allow-other-keys)
7694 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7695 (doc (string-append data "/doc/" ,name "-" ,version))
7696 (html (string-append doc "/html"))
7697 (man1 (string-append data "/man/man1"))
7698 (info (string-append data "/info"))
7699 (examples (string-append doc "/examples"))
7700 (python-arg (string-append "PYTHON=" (which "python"))))
7701 (setenv "LANG" "en_US.utf8")
7702 (with-directory-excursion "docs"
7703 ;; FIXME: pdf fails to build
7704 ;;(system* "make" "pdf" "PAPER=a4")
7705 (system* "make" python-arg "html")
7706 ;; FIXME: the generated texi file contains ^@^@, which trips
7707 ;; up the parser.
7708 ;; (system* "make" python-arg "info")
7709 )
7710 (copy-recursively "docs/man" man1)
7711 (copy-recursively "examples" examples)
7712 (copy-recursively "docs/build/html" html)
7713 ;; (copy-file "docs/build/latex/ipython.pdf"
7714 ;; (string-append doc "/ipython.pdf"))
7715 (mkdir-p info)
7716 ;; (copy-file "docs/build/texinfo/ipython.info"
7717 ;; (string-append info "/ipython.info"))
7718 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7719 #t)))))
7720 (inputs
7721 `(("python-ipython" ,python-ipython)
7722 ("python-ipykernel" ,python-ipykernel)))
7723 (native-inputs
7724 `(("python-sphinx" ,python-sphinx)
7725 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7726 ;; FIXME: It's possible that a smaller union would work just as well.
7727 ("texlive" ,(texlive-union (list texlive-amsfonts
7728 texlive-fonts-ec
7729 texlive-generic-ifxetex
7730 texlive-generic-pdftex
7731 texlive-latex-capt-of
7732 texlive-latex-cmap
7733 texlive-latex-environ
7734 texlive-latex-eqparbox
7735 texlive-latex-etoolbox
7736 texlive-latex-expdlist
7737 texlive-latex-fancyhdr
7738 texlive-latex-fancyvrb
7739 texlive-latex-fncychap
7740 texlive-latex-float
7741 texlive-latex-framed
7742 texlive-latex-geometry
7743 texlive-latex-graphics
7744 texlive-latex-hyperref
7745 texlive-latex-mdwtools
7746 texlive-latex-multirow
7747 texlive-latex-needspace
7748 texlive-latex-oberdiek
7749 texlive-latex-parskip
7750 texlive-latex-preview
7751 texlive-latex-tabulary
7752 texlive-latex-threeparttable
7753 texlive-latex-titlesec
7754 texlive-latex-trimspaces
7755 texlive-latex-ucs
7756 texlive-latex-upquote
7757 texlive-latex-url
7758 texlive-latex-varwidth
7759 texlive-latex-wrapfig)))
7760 ("texinfo" ,texinfo)))))
7761
7762 (define-public python-urwid
7763 (package
7764 (name "python-urwid")
7765 (version "2.1.2")
7766 (source
7767 (origin
7768 (method url-fetch)
7769 (uri (pypi-uri "urwid" version))
7770 (sha256
7771 (base32
7772 "1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq"))))
7773 (build-system python-build-system)
7774 (home-page "http://urwid.org")
7775 (synopsis "Console user interface library for Python")
7776 (description
7777 "Urwid is a curses-based UI/widget library for Python. It includes many
7778 features useful for text console applications.")
7779 (properties `((python2-variant . ,(delay python2-urwid))))
7780 (license license:lgpl2.1+)))
7781
7782 (define-public python2-urwid
7783 (let ((base (package-with-python2
7784 (strip-python2-variant python-urwid))))
7785 (package/inherit base
7786 (version "2.1.0")
7787 (source
7788 (origin
7789 (method url-fetch)
7790 (uri (pypi-uri "urwid" version))
7791 (sha256
7792 (base32
7793 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8")))))))
7794
7795 (define-public python-urwid-readline
7796 (package
7797 (name "python-urwid-readline")
7798 (version "0.12")
7799 (source
7800 (origin
7801 (method git-fetch)
7802 (uri (git-reference
7803 (url "https://github.com/rr-/urwid_readline")
7804 (commit version)))
7805 (file-name (git-file-name name version))
7806 (sha256
7807 (base32
7808 "0sq5qgxj7gcfww3ww7idr87isnmp0hi36n241b3q395x1zafdv22"))))
7809 (build-system python-build-system)
7810 (arguments
7811 `(#:phases
7812 (modify-phases %standard-phases
7813 (replace 'check
7814 (lambda* (#:key tests? #:allow-other-keys)
7815 (when tests?
7816 (invoke "python" "-m" "pytest"))
7817 #t)))))
7818 (propagated-inputs
7819 `(("python-urwid" ,python-urwid)))
7820 (native-inputs
7821 `(("python-pytest" ,python-pytest)))
7822 (home-page "https://github.com/rr-/urwid_readline")
7823 (synopsis "Text input widget for urwid that supports readline shortcuts")
7824 (description
7825 "This package provides a textbox edit widget for @code{python-urwid} that
7826 supports @code{readline} shortcuts.")
7827 (license license:expat)))
7828
7829 (define-public python-urwidtrees
7830 (package
7831 (name "python-urwidtrees")
7832 (version "1.0.2")
7833 (source
7834 (origin
7835 (method git-fetch)
7836 ;; package author intends on distributing via github rather than pypi:
7837 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7838 (uri (git-reference
7839 (url "https://github.com/pazz/urwidtrees")
7840 (commit version)))
7841 (file-name (git-file-name name version))
7842 (sha256
7843 (base32
7844 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7845 (build-system python-build-system)
7846 (arguments
7847 '(#:use-setuptools? #f
7848 #:tests? #f)) ; no tests
7849 (propagated-inputs `(("python-urwid" ,python-urwid)))
7850 (home-page "https://github.com/pazz/urwidtrees")
7851 (synopsis "Tree widgets for urwid")
7852 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7853 toolkit. Use it to build trees of widgets.")
7854 (license license:gpl3+)))
7855
7856 (define-public python2-urwidtrees
7857 (package-with-python2 python-urwidtrees))
7858
7859 (define-public python-ua-parser
7860 (package
7861 (name "python-ua-parser")
7862 (version "0.8.0")
7863 (source
7864 (origin
7865 (method url-fetch)
7866 (uri (pypi-uri "ua-parser" version))
7867 (sha256
7868 (base32
7869 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7870 (build-system python-build-system)
7871 (arguments
7872 `(#:tests? #f)) ;no test suite in release
7873 (native-inputs
7874 `(("python-pyyaml" ,python-pyyaml)))
7875 (home-page "https://github.com/ua-parser/uap-python")
7876 (synopsis "User agent parser")
7877 (description
7878 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7879 (license license:asl2.0)))
7880
7881 (define-public python2-ua-parser
7882 (package-with-python2 python-ua-parser))
7883
7884 (define-public python-user-agents
7885 (package
7886 (name "python-user-agents")
7887 (version "1.1.0")
7888 (source
7889 (origin
7890 (method url-fetch)
7891 (uri (pypi-uri "user-agents" version))
7892 (sha256
7893 (base32
7894 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7895 (build-system python-build-system)
7896 (arguments
7897 `(#:tests? #f)) ;missing devices.json test file in release
7898 (propagated-inputs
7899 `(("python-ua-parser" ,python-ua-parser)))
7900 (home-page "https://github.com/selwin/python-user-agents")
7901 (synopsis "User Agent strings parsing library")
7902 (description
7903 "A library to identify devices (phones, tablets) and their capabilities by
7904 parsing (browser/HTTP) user agent strings.")
7905 (license license:expat)))
7906
7907 (define-public python2-user-agents
7908 (package-with-python2 python-user-agents))
7909
7910 (define-public python-dbus
7911 (package
7912 (name "python-dbus")
7913 (version "1.2.16")
7914 (source
7915 (origin
7916 (method url-fetch)
7917 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7918 "dbus-python-" version ".tar.gz"))
7919 (sha256
7920 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7921 (build-system gnu-build-system)
7922 (native-inputs
7923 `(("pkg-config" ,pkg-config)))
7924 (inputs
7925 `(("python" ,python-wrapper)
7926 ("dbus-glib" ,dbus-glib)))
7927 (synopsis "Python bindings for D-bus")
7928 (description "python-dbus provides bindings for libdbus, the reference
7929 implementation of D-Bus.")
7930 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7931 (license license:expat)))
7932
7933 (define-public python2-dbus
7934 (package/inherit python-dbus
7935 (name "python2-dbus")
7936 (inputs `(("python" ,python-2)
7937 ,@(alist-delete "python"
7938 (package-inputs python-dbus)
7939 equal?)))))
7940
7941 (define-public python-notify2
7942 (package
7943 (name "python-notify2")
7944 (version "0.3.1")
7945 (source
7946 (origin
7947 (method url-fetch)
7948 (uri (pypi-uri "notify2" version))
7949 (sha256
7950 (base32
7951 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7952 (build-system python-build-system)
7953 (arguments `(#:tests? #f)) ; tests depend on system state
7954 (native-inputs
7955 `(("python-dbus" ,python-dbus)))
7956 (home-page "https://bitbucket.org/takluyver/pynotify2")
7957 (synopsis "Python interface to D-Bus notifications")
7958 (description
7959 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7960 It is a reimplementation of pynotify in pure Python, and an alternative to
7961 the GObject Introspection bindings to libnotify for non-GTK applications.")
7962 (license (list license:bsd-2
7963 license:lgpl2.1+))))
7964
7965 (define-public python2-notify2
7966 (package-with-python2 python-notify2))
7967
7968 ;; beautifulsoup4 has a totally different namespace than 3.x,
7969 ;; and pypi seems to put it under its own name, so I guess we should too
7970 (define-public python-beautifulsoup4
7971 (package
7972 (name "python-beautifulsoup4")
7973 (version "4.9.3")
7974 (source
7975 (origin
7976 (method url-fetch)
7977 (uri (pypi-uri "beautifulsoup4" version))
7978 (sha256
7979 (base32
7980 "09gbd49mwz86k572r1231x2rdp82p42zlnw0bz9b9mfi58r9wwl4"))))
7981 (build-system python-build-system)
7982 (arguments
7983 `(#:phases
7984 (modify-phases %standard-phases
7985 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7986 ;; must use this conversion script when building with Python 3. The
7987 ;; conversion script also runs the tests.
7988 ;; For more information, see the file 'convert-py3k' in the source
7989 ;; distribution.
7990 (replace 'check
7991 (lambda _ (invoke "./convert-py3k"))))))
7992 (propagated-inputs
7993 `(("python-soupsieve" ,python-soupsieve)))
7994 (home-page
7995 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7996 (synopsis
7997 "Python screen-scraping library")
7998 (description
7999 "Beautiful Soup is a Python library designed for rapidly setting up
8000 screen-scraping projects. It offers Pythonic idioms for navigating,
8001 searching, and modifying a parse tree, providing a toolkit for
8002 dissecting a document and extracting what you need. It automatically
8003 converts incoming documents to Unicode and outgoing documents to UTF-8.")
8004 (license license:expat)
8005 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
8006
8007 (define-public python2-beautifulsoup4
8008 (let ((base (package-with-python2
8009 (strip-python2-variant python-beautifulsoup4))))
8010 (package/inherit base
8011 (arguments `(#:python ,python-2)))))
8012
8013 (define-public python-soupsieve
8014 (package
8015 (name "python-soupsieve")
8016 (version "2.2.1")
8017 (source
8018 (origin
8019 (method url-fetch)
8020 (uri (pypi-uri "soupsieve" version))
8021 (sha256
8022 (base32
8023 "1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
8024 (build-system python-build-system)
8025 (arguments `(#:tests? #f))
8026 ;;XXX: 2 tests fail currently despite claming they were to be
8027 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
8028 ;;don't want to create a circular dependency.
8029 (home-page "https://github.com/facelessuser/soupsieve")
8030 (synopsis "CSS selector library")
8031 (description
8032 "Soup Sieve is a CSS selector library designed to be used with Beautiful
8033 Soup 4. It aims to provide selecting, matching, and filtering using modern
8034 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
8035 specifications up through the latest CSS level 4 drafts and beyond (though
8036 some are not yet implemented).")
8037 (properties `((python2-variant . ,(delay python2-soupsieve))))
8038 (license license:expat)))
8039
8040 ;; This is the last version that supports python-2
8041 (define-public python2-soupsieve
8042 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
8043 (package
8044 (inherit base)
8045 (version "1.9.6")
8046 (source
8047 (origin
8048 (method url-fetch)
8049 (uri (pypi-uri "soupsieve" version))
8050 (sha256
8051 (base32
8052 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
8053 (propagated-inputs
8054 `(("python2-backports-functools-lru-cache"
8055 ,python2-backports-functools-lru-cache)
8056 ,@(package-propagated-inputs base))))))
8057
8058 (define-public python-netifaces
8059 (package
8060 (name "python-netifaces")
8061 (version "0.10.9")
8062 (source
8063 (origin
8064 (method url-fetch)
8065 (uri (pypi-uri "netifaces" version))
8066 (sha256
8067 (base32
8068 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
8069 (build-system python-build-system)
8070 (home-page "https://github.com/al45tair/netifaces")
8071 (synopsis
8072 "Python module for portable network interface information")
8073 (description
8074 "Netifaces is a Python module providing information on network
8075 interfaces in an easy and portable manner.")
8076 (license license:expat)))
8077
8078 (define-public python2-netifaces
8079 (package-with-python2 python-netifaces))
8080
8081 (define-public python-networkx
8082 (package
8083 (name "python-networkx")
8084 (version "2.5")
8085 (source
8086 (origin
8087 (method url-fetch)
8088 (uri (pypi-uri "networkx" version))
8089 (sha256
8090 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
8091 (build-system python-build-system)
8092 (arguments
8093 '(#:phases (modify-phases %standard-phases
8094 (replace 'check
8095 (lambda* (#:key tests? #:allow-other-keys)
8096 (if tests?
8097 (invoke "pytest" "-vv" "--pyargs" "networkx")
8098 (format #t "test suite not run~%"))
8099 #t)))))
8100 ;; python-decorator is needed at runtime.
8101 (propagated-inputs
8102 `(("python-decorator" ,python-decorator)))
8103 (native-inputs
8104 `(("python-pytest" ,python-pytest)))
8105 (home-page "https://networkx.github.io/")
8106 (synopsis "Python module for creating and manipulating graphs and networks")
8107 (description
8108 "NetworkX is a Python package for the creation, manipulation, and study
8109 of the structure, dynamics, and functions of complex networks.")
8110 (properties `((python2-variant . ,(delay python2-networkx))))
8111 (license license:bsd-3)))
8112
8113 ;; NetworkX 2.2 is the last version with support for Python 2.
8114 (define-public python2-networkx
8115 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
8116 (package
8117 (inherit base)
8118 (version "2.2")
8119 (source (origin
8120 (method url-fetch)
8121 (uri (pypi-uri "networkx" version ".zip"))
8122 (sha256
8123 (base32
8124 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
8125 (arguments
8126 `(#:python ,python-2))
8127 (native-inputs
8128 `(("python-nose" ,python2-nose)
8129 ("unzip" ,unzip))))))
8130
8131 (define-public python-datrie
8132 (package
8133 (name "python-datrie")
8134 (version "0.8.2")
8135 (source
8136 (origin
8137 (method url-fetch)
8138 (uri (pypi-uri "datrie" version))
8139 (sha256
8140 (base32
8141 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
8142 (build-system python-build-system)
8143 (native-inputs
8144 `(("python-cython" ,python-cython)
8145 ("python-hypothesis" ,python-hypothesis)
8146 ("python-pytest" ,python-pytest)
8147 ("python-pytest-runner" ,python-pytest-runner)))
8148 (home-page "https://github.com/kmike/datrie")
8149 (synopsis "Fast, efficiently stored trie for Python")
8150 (description
8151 "This package provides a fast, efficiently stored trie implementation for
8152 Python.")
8153 (license license:lgpl2.1+)))
8154
8155 (define-public python-amply
8156 (package
8157 (name "python-amply")
8158 (version "0.1.4")
8159 (source
8160 (origin
8161 (method url-fetch)
8162 (uri (pypi-uri "amply" version))
8163 (sha256
8164 (base32
8165 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
8166 (build-system python-build-system)
8167 (propagated-inputs
8168 `(("python-docutils" ,python-docutils)
8169 ("python-pyparsing" ,python-pyparsing)))
8170 (native-inputs
8171 `(("python-setuptools-scm" ,python-setuptools-scm)))
8172 (home-page "https://github.com/willu47/amply")
8173 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
8174 (description
8175 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
8176 structures.")
8177 (license license:epl1.0)))
8178
8179 (define-public python-pulp
8180 (package
8181 (name "python-pulp")
8182 (version "2.4")
8183 (source
8184 (origin
8185 (method url-fetch)
8186 (uri (pypi-uri "PuLP" version))
8187 (sha256
8188 (base32
8189 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
8190 (build-system python-build-system)
8191 (propagated-inputs
8192 `(("python-amply" ,python-amply)))
8193 (home-page "https://github.com/coin-or/pulp")
8194 (synopsis "Linear Programming modeler")
8195 (description
8196 "PuLP is a Linear Programming modeler written in Python. PuLP can
8197 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
8198 solve linear problems.")
8199 (license license:expat)))
8200
8201 (define-public python-toposort
8202 (package
8203 (name "python-toposort")
8204 (version "1.6")
8205 (source
8206 (origin
8207 (method url-fetch)
8208 (uri (pypi-uri "toposort" version))
8209 (sha256
8210 (base32
8211 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
8212 (build-system python-build-system)
8213 (home-page "https://gitlab.com/ericvsmith/toposort")
8214 (synopsis "Topological sort algorithm")
8215 (description
8216 "This package provides an implementation of a topological sort
8217 algorithm.")
8218 (license license:asl2.0)))
8219
8220 (define-public snakemake
8221 (package
8222 (name "snakemake")
8223 (version "5.32.2")
8224 (source
8225 (origin
8226 (method url-fetch)
8227 (uri (pypi-uri "snakemake" version))
8228 (sha256
8229 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
8230 (build-system python-build-system)
8231 (arguments
8232 ;; TODO: Package missing test dependencies.
8233 '(#:tests? #f
8234 #:phases
8235 (modify-phases %standard-phases
8236 ;; For cluster execution Snakemake will call Python. Since there is
8237 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
8238 ;; this by calling the snakemake wrapper instead.
8239 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
8240 (lambda* (#:key outputs #:allow-other-keys)
8241 (substitute* "snakemake/executors/__init__.py"
8242 (("\\{sys.executable\\} -m snakemake")
8243 (string-append (assoc-ref outputs "out")
8244 "/bin/snakemake")))
8245 #t)))))
8246 (propagated-inputs
8247 `(("python-appdirs" ,python-appdirs)
8248 ("python-configargparse" ,python-configargparse)
8249 ("python-datrie" ,python-datrie)
8250 ("python-docutils" ,python-docutils)
8251 ("python-gitpython" ,python-gitpython)
8252 ("python-jinja2" ,python-jinja2)
8253 ("python-jsonschema" ,python-jsonschema)
8254 ("python-nbformat" ,python-nbformat)
8255 ("python-networkx" ,python-networkx)
8256 ("python-psutil" ,python-psutil)
8257 ("python-pulp" ,python-pulp)
8258 ("python-pyyaml" ,python-pyyaml)
8259 ("python-ratelimiter" ,python-ratelimiter)
8260 ("python-requests" ,python-requests)
8261 ("python-toposort" ,python-toposort)
8262 ("python-wrapt" ,python-wrapt)))
8263 (home-page "https://snakemake.readthedocs.io")
8264 (synopsis "Python-based execution environment for make-like workflows")
8265 (description
8266 "Snakemake aims to reduce the complexity of creating workflows by
8267 providing a clean and modern domain specific specification language (DSL) in
8268 Python style, together with a fast and comfortable execution environment.")
8269 (license license:expat)))
8270
8271 (define-public python-pyqrcode
8272 (package
8273 (name "python-pyqrcode")
8274 (version "1.2.1")
8275 (source
8276 (origin
8277 (method url-fetch)
8278 (uri (pypi-uri "PyQRCode" version))
8279 (sha256
8280 (base32
8281 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8282 (build-system python-build-system)
8283 (home-page
8284 "https://github.com/mnooner256/pyqrcode")
8285 (synopsis "QR code generator")
8286 (description
8287 "Pyqrcode is a QR code generator written purely in Python with
8288 SVG, EPS, PNG and terminal output.")
8289 (license license:bsd-3)))
8290
8291 (define-public python-seaborn
8292 (package
8293 (name "python-seaborn")
8294 (version "0.10.0")
8295 (source
8296 (origin
8297 (method url-fetch)
8298 (uri (pypi-uri "seaborn" version))
8299 (sha256
8300 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
8301 (build-system python-build-system)
8302 (arguments
8303 `(#:phases
8304 (modify-phases %standard-phases
8305 (add-before 'check 'start-xserver
8306 (lambda* (#:key inputs #:allow-other-keys)
8307 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8308 ;; There must be a running X server and make check doesn't
8309 ;; start one. Therefore we must do it.
8310 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8311 (setenv "DISPLAY" ":1")
8312 #t)))
8313 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
8314 (propagated-inputs
8315 `(("python-pandas" ,python-pandas)
8316 ("python-matplotlib" ,python-matplotlib)
8317 ("python-numpy" ,python-numpy)
8318 ("python-scipy" ,python-scipy)))
8319 (native-inputs
8320 `(("python-pytest" ,python-pytest)
8321 ("xorg-server" ,xorg-server-for-tests)))
8322 (home-page "https://seaborn.pydata.org/")
8323 (synopsis "Statistical data visualization")
8324 (description
8325 "Seaborn is a library for making attractive and informative statistical
8326 graphics in Python. It is built on top of matplotlib and tightly integrated
8327 with the PyData stack, including support for numpy and pandas data structures
8328 and statistical routines from scipy and statsmodels.")
8329 (properties `((python2-variant . ,(delay python2-seaborn))))
8330 (license license:bsd-3)))
8331
8332 ;; 0.9.1 is the last release with support for Python 2.
8333 (define-public python2-seaborn
8334 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8335 (package
8336 (inherit base)
8337 (version "0.9.1")
8338 (source (origin
8339 (method url-fetch)
8340 (uri (pypi-uri "seaborn" version))
8341 (sha256
8342 (base32
8343 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8344
8345 (define-public python-mpmath
8346 (package
8347 (name "python-mpmath")
8348 (version "1.1.0")
8349 (source (origin
8350 (method url-fetch)
8351 (uri (pypi-uri "mpmath" version))
8352 (file-name (git-file-name name version))
8353 (sha256
8354 (base32
8355 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8356 (build-system python-build-system)
8357 (native-inputs
8358 `(("python-pytest" ,python-pytest)))
8359 (arguments
8360 '(#:phases
8361 (modify-phases %standard-phases
8362 (replace 'check
8363 (lambda _
8364 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8365 (home-page "https://mpmath.org")
8366 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8367 (description
8368 "@code{mpmath} can be used as an arbitrary-precision substitute for
8369 Python's float/complex types and math/cmath modules, but also does much
8370 more advanced mathematics.")
8371 (license license:bsd-3)))
8372
8373 (define-public python2-mpmath
8374 (package-with-python2 python-mpmath))
8375
8376 (define-public python-bigfloat
8377 (package
8378 (name "python-bigfloat")
8379 (version "0.3.0")
8380 (source
8381 (origin
8382 (method url-fetch)
8383 (uri (pypi-uri "bigfloat" version))
8384 (sha256
8385 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8386 (build-system python-build-system)
8387 (inputs
8388 `(("mpfr" ,mpfr)))
8389 (home-page "https://github.com/mdickinson/bigfloat")
8390 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8391 (description
8392 "This package provides a Python interface to the MPFR library for
8393 multiprecision arithmetic.")
8394 (license license:lgpl3+)))
8395
8396 (define-public python2-bigfloat
8397 (package-with-python2 python-bigfloat))
8398
8399 (define-public python-sympy
8400 (package
8401 (name "python-sympy")
8402 (version "1.7.1")
8403 (source
8404 (origin
8405 (method url-fetch)
8406 (uri (pypi-uri "sympy" version))
8407 (sha256
8408 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8409 (build-system python-build-system)
8410 (arguments
8411 `(#:phases
8412 (modify-phases %standard-phases
8413 (replace 'check
8414 (lambda* (#:key outputs #:allow-other-keys)
8415 (invoke
8416 (or (which "python3") (which "python"))
8417 "-c" "import sympy; sympy.test(\"/core\")"))))))
8418 (propagated-inputs
8419 `(("python-mpmath" ,python-mpmath)))
8420 (home-page "https://www.sympy.org/")
8421 (synopsis "Python library for symbolic mathematics")
8422 (description
8423 "SymPy is a Python library for symbolic mathematics. It aims to become a
8424 full-featured computer algebra system (CAS) while keeping the code as simple
8425 as possible in order to be comprehensible and easily extensible.")
8426 (license license:bsd-3)))
8427
8428 (define-public python2-sympy
8429 (package
8430 (inherit (package-with-python2 python-sympy))
8431 (version "1.5.1") ; last release for python2
8432 (source
8433 (origin
8434 (method url-fetch)
8435 (uri (pypi-uri "sympy" version))
8436 (sha256
8437 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8438
8439 (define-public python-q
8440 (package
8441 (name "python-q")
8442 (version "2.6")
8443 (source
8444 (origin
8445 (method url-fetch)
8446 (uri (pypi-uri "q" version))
8447 (sha256
8448 (base32
8449 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
8450 (build-system python-build-system)
8451 (home-page "https://github.com/zestyping/q")
8452 (synopsis "Quick-and-dirty debugging output for tired programmers")
8453 (description
8454 "q is a Python module for \"print\" style of debugging Python code. It
8455 provides convenient short API for print out of values, tracebacks, and
8456 falling into the Python interpreter.")
8457 (license license:asl2.0)))
8458
8459 (define-public python2-q
8460 (package-with-python2 python-q))
8461
8462 (define-public python-xlib
8463 (package
8464 (name "python-xlib")
8465 (version "0.29")
8466 (source
8467 (origin
8468 (method git-fetch)
8469 (uri (git-reference
8470 (url "https://github.com/python-xlib/python-xlib")
8471 (commit version)))
8472 (file-name (git-file-name name version))
8473 (sha256
8474 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
8475 (build-system python-build-system)
8476 (arguments
8477 `(#:phases
8478 (modify-phases %standard-phases
8479 (add-before 'check 'start-xserver
8480 (lambda* (#:key inputs #:allow-other-keys)
8481 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8482 ;; There must be a running X server and make check doesn't
8483 ;; start one. Therefore we must do it.
8484 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8485 (setenv "DISPLAY" ":1")
8486 #t))))))
8487 (native-inputs
8488 `(("python-mock" ,python-mock)
8489 ("python-setuptools-scm" ,python-setuptools-scm)
8490 ("xorg-server" ,xorg-server)))
8491 (propagated-inputs
8492 `(("python-six" ,python-six)))
8493 (home-page "https://github.com/python-xlib/python-xlib")
8494 (synopsis "Python X11 client library")
8495 (description
8496 "The Python X Library is intended to be a fully functional
8497 X client library for Python programs. It is useful to implement
8498 low-level X clients. It is written entirely in Python.")
8499 (license license:gpl2+)))
8500
8501 (define-public python2-xlib
8502 (package-with-python2 python-xlib))
8503
8504 (define-public python-singledispatch
8505 (package
8506 (name "python-singledispatch")
8507 (version "3.4.0.3")
8508 (source
8509 (origin
8510 (method url-fetch)
8511 (uri (pypi-uri "singledispatch" version))
8512 (sha256
8513 (base32
8514 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8515 (build-system python-build-system)
8516 (native-inputs
8517 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8518 (home-page
8519 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8520 (synopsis "Backport of singledispatch feature from Python 3.4")
8521 (description
8522 "This library brings functools.singledispatch from Python 3.4 to Python
8523 2.6-3.3.")
8524 (license license:expat)))
8525
8526 (define-public python2-singledispatch
8527 (package-with-python2 python-singledispatch))
8528
8529 ;; the python- version can be removed with python-3.5
8530 (define-public python-backports-abc
8531 (package
8532 (name "python-backports-abc")
8533 (version "0.5")
8534 (source
8535 (origin
8536 (method url-fetch)
8537 (uri (pypi-uri "backports_abc" version))
8538 (sha256
8539 (base32
8540 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
8541 (build-system python-build-system)
8542 (home-page "https://github.com/cython/backports_abc")
8543 (synopsis "Backport of additions to the 'collections.abc' module")
8544 (description
8545 "Python-backports-abc provides a backport of additions to the
8546 @code{collections.abc} module in Python-3.5.")
8547 (license license:psfl)))
8548
8549 (define-public python2-backports-abc
8550 (package-with-python2 python-backports-abc))
8551
8552 (define-public python-backports-csv
8553 (package
8554 (name "python-backports-csv")
8555 (version "1.0.7")
8556 (source
8557 (origin
8558 (method url-fetch)
8559 (uri (pypi-uri "backports.csv" version))
8560 (sha256
8561 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8562 (build-system python-build-system)
8563 (home-page "https://github.com/ryanhiebert/backports.csv")
8564 (synopsis "Backport of Python 3's csv module for Python 2")
8565 (description
8566 "Provides a backport of Python 3's @code{csv} module for parsing
8567 comma separated values. The API of the @code{csv} module in Python 2
8568 is drastically different from the @code{csv} module in Python 3.
8569 This is due, for the most part, to the difference between str in
8570 Python 2 and Python 3.")
8571 (license license:psfl)))
8572
8573 (define-public python2-backports-csv
8574 (package-with-python2 python-backports-csv))
8575
8576 (define-public python2-backports-shutil-get-terminal-size
8577 (package
8578 (name "python2-backports-shutil-get-terminal-size")
8579 (version "1.0.0")
8580 (source
8581 (origin
8582 (method url-fetch)
8583 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8584 (sha256
8585 (base32
8586 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8587 (build-system python-build-system)
8588 (arguments
8589 `(#:python ,python-2
8590 #:phases
8591 (modify-phases %standard-phases
8592 (replace 'check
8593 (lambda _
8594 (setenv "PYTHONPATH" (string-append "./build/lib:"
8595 (getenv "PYTHONPATH")))
8596 (invoke "py.test" "-v"))))))
8597 (native-inputs
8598 `(("python2-pytest" ,python2-pytest)))
8599 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8600 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8601 (description
8602 "This package provides a backport of the @code{get_terminal_size
8603 function} from Python 3.3's @code{shutil}.
8604 Unlike the original version it is written in pure Python rather than C,
8605 so it might be a tiny bit slower.")
8606 (license license:expat)))
8607
8608 (define-public python-waf
8609 (package
8610 (name "python-waf")
8611 (version "2.0.19")
8612 (source (origin
8613 (method url-fetch)
8614 (uri (string-append "https://waf.io/"
8615 "waf-" version ".tar.bz2"))
8616 (sha256
8617 (base32
8618 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8619 (build-system python-build-system)
8620 (arguments
8621 '(#:phases
8622 (modify-phases %standard-phases
8623 (replace 'build
8624 (lambda _
8625 ;; XXX: Find a way to add all extra tools.
8626 (let ((tools '("gccdeps"
8627 "clang_compilation_database")))
8628 (invoke "python" "waf-light" "configure" "build"
8629 (string-append "--tools="
8630 (string-join tools ","))))))
8631 (replace 'check
8632 (lambda _
8633 (invoke "python" "waf" "--version")))
8634 (replace 'install
8635 (lambda* (#:key outputs #:allow-other-keys)
8636 (let ((out (assoc-ref outputs "out")))
8637 (install-file "waf" (string-append out "/bin")))
8638 #t))
8639 ;; waf breaks when it is wrapped.
8640 (delete 'wrap))))
8641 (home-page "https://waf.io/")
8642 (synopsis "Python-based build system")
8643 (description
8644 "Waf is a Python-based framework for configuring, compiling and installing
8645 applications.")
8646 (license license:bsd-3)))
8647
8648 (define-public python2-waf
8649 (package-with-python2 python-waf))
8650
8651 (define-public python-pyzmq
8652 (package
8653 (name "python-pyzmq")
8654 (version "22.0.3")
8655 (source
8656 (origin
8657 (method url-fetch)
8658 (uri (pypi-uri "pyzmq" version))
8659 (sha256
8660 (base32 "0bgrn65cxfz1c1sjrgyq5dy1mkhppxxbizd5wvrl03cq4zhkrxpp"))))
8661 (build-system python-build-system)
8662 (arguments
8663 `(#:configure-flags
8664 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8665 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8666 ;; --inplace' for 'python setup.py test' to work.
8667 #:tests? #f))
8668 (inputs
8669 `(("zeromq" ,zeromq)))
8670 (native-inputs
8671 `(("pkg-config" ,pkg-config)
8672 ("python-nose" ,python-nose)))
8673 (home-page "https://github.com/zeromq/pyzmq")
8674 (synopsis "Python bindings for 0MQ")
8675 (description
8676 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8677 (license license:bsd-4)))
8678
8679 (define-public python2-pyzmq
8680 (package-with-python2 python-pyzmq))
8681
8682 (define-public python-pep8
8683 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8684 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8685 ;; some dependents' test suites, and nothing more.
8686 (package
8687 (name "python-pep8")
8688 (version "1.7.0")
8689 (source
8690 (origin
8691 (method url-fetch)
8692 (uri (pypi-uri "pep8" version))
8693 (sha256
8694 (base32
8695 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8696 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8697 (build-system python-build-system)
8698 (home-page "https://pep8.readthedocs.org/")
8699 (synopsis "Python style guide checker")
8700 (description
8701 "This tools checks Python code against some of the style conventions in
8702 PEP 8.")
8703 (license license:expat)))
8704
8705 (define-public python2-pep8
8706 (package-with-python2 python-pep8))
8707
8708 (define-public python-pep517
8709 (package
8710 (inherit python-pep517-bootstrap)
8711 (name "python-pep517")
8712 (arguments
8713 '(#:phases
8714 (modify-phases %standard-phases
8715 (replace 'check
8716 (lambda* (#:key tests? #:allow-other-keys)
8717 (delete-file "pytest.ini")
8718 ;; This test tries to connect to the internet
8719 (delete-file "tests/test_meta.py")
8720 (if tests?
8721 (invoke "pytest")
8722 #t))))))
8723 (native-inputs
8724 `(("python-mock" ,python-mock)
8725 ("python-pytest" ,python-pytest)
8726 ("python-testpath" ,python-testpath)))
8727 (properties `((python2-variant . ,(delay python2-pep517))))))
8728
8729 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8730 (define-public python2-pep517
8731 (let ((base (package-with-python2
8732 (strip-python2-variant python-pep517))))
8733 (package/inherit base
8734 (name "python2-pep517")
8735 (arguments
8736 `(#:tests? #f
8737 ,@(package-arguments base)))
8738 (native-inputs `()))))
8739
8740 (define-public python-pyflakes
8741 (package
8742 (name "python-pyflakes")
8743 (version "2.3.1")
8744 (source
8745 (origin
8746 (method url-fetch)
8747 (uri (pypi-uri "pyflakes" version))
8748 (sha256
8749 (base32
8750 "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
8751 (build-system python-build-system)
8752 (home-page
8753 "https://github.com/pyflakes/pyflakes")
8754 (synopsis "Passive checker of Python programs")
8755 (description
8756 "Pyflakes statically checks Python source code for common errors.")
8757 (license license:expat)))
8758
8759 (define-public python2-pyflakes
8760 (package-with-python2 python-pyflakes))
8761
8762 (define-public python-mccabe
8763 (package
8764 (name "python-mccabe")
8765 (version "0.6.1")
8766 (source
8767 (origin
8768 (method url-fetch)
8769 (uri (pypi-uri "mccabe" version))
8770 (sha256
8771 (base32
8772 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8773 (build-system python-build-system)
8774 (native-inputs
8775 `(("python-pytest" ,python-pytest-bootstrap)
8776 ("python-pytest-runner" ,python-pytest-runner)))
8777 (home-page "https://github.com/flintwork/mccabe")
8778 (synopsis "McCabe checker, plugin for flake8")
8779 (description
8780 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8781 complexity of Python source code.")
8782 (license license:expat)))
8783
8784 (define-public python2-mccabe
8785 (package-with-python2 python-mccabe))
8786
8787 (define-public python-flake8
8788 (package
8789 (name "python-flake8")
8790 (version "3.9.0")
8791 (source (origin
8792 (method url-fetch)
8793 (uri (pypi-uri "flake8" version))
8794 (sha256
8795 (base32
8796 "1w65iyjnrwipv4dbcqxh725ri7mdx01d6pjyggd97c0j5cvkx1vq"))))
8797 (build-system python-build-system)
8798 (arguments
8799 `(#:phases
8800 (modify-phases %standard-phases
8801 (delete 'check)
8802 (add-after 'install 'check
8803 (lambda* (#:key inputs outputs #:allow-other-keys)
8804 (add-installed-pythonpath inputs outputs)
8805 (invoke "pytest" "-v")
8806 #t)))))
8807 (propagated-inputs
8808 `(("python-pycodestyle" ,python-pycodestyle)
8809 ("python-entrypoints" ,python-entrypoints)
8810 ("python-pyflakes" ,python-pyflakes)
8811 ("python-mccabe" ,python-mccabe)))
8812 (native-inputs
8813 `(("python-mock" ,python-mock)
8814 ("python-pytest" ,python-pytest-bootstrap)))
8815 (home-page "https://gitlab.com/pycqa/flake8")
8816 (synopsis
8817 "The modular source code checker: pep8, pyflakes and co")
8818 (description
8819 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8820 (properties `((python2-variant . ,(delay python2-flake8))))
8821 (license license:expat)))
8822
8823 (define-public python2-flake8
8824 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8825 (package/inherit base
8826 (propagated-inputs
8827 `(("python2-configparser" ,python2-configparser)
8828 ("python2-enum34" ,python2-enum34)
8829 ("python2-functools32" ,python2-functools32)
8830 ("python2-typing" ,python2-typing)
8831 ,@(package-propagated-inputs base))))))
8832
8833 (define-public python-flake8-bugbear
8834 (package
8835 (name "python-flake8-bugbear")
8836 (version "20.1.4")
8837 (source
8838 (origin
8839 (method url-fetch)
8840 (uri (pypi-uri "flake8-bugbear" version))
8841 (sha256
8842 (base32
8843 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8844 (build-system python-build-system)
8845 (arguments
8846 '(#:phases
8847 (modify-phases %standard-phases
8848 (add-before 'check 'disable-test
8849 (lambda _
8850 ;; This test fails on slow computers.
8851 (substitute* "tests/test_bugbear.py"
8852 (("def test_does_not_crash_on_any_valid_code")
8853 "def _test_does_not_crash_on_any_valid_code")))))))
8854 (native-inputs
8855 `(("python-hypothesis" ,python-hypothesis)
8856 ("python-hypothesmith" ,python-hypothesmith)))
8857 (propagated-inputs
8858 `(("python-attrs" ,python-attrs)
8859 ("python-flake8" ,python-flake8)))
8860 (home-page "https://github.com/PyCQA/flake8-bugbear")
8861 (synopsis
8862 "Flake8 plugin for finding likely bugs and design problems in your program")
8863 (description
8864 "This package contains a plugin for Flake8 finding likely bugs and
8865 design problems in your program. It contains warnings that don't belong
8866 in pyflakes and pycodestyle.")
8867 (license license:expat)))
8868
8869 (define-public python-flake8-continuation
8870 (package
8871 (name "python-flake8-continuation")
8872 (version "1.0.5")
8873 (source
8874 (origin
8875 (method url-fetch)
8876 (uri (pypi-uri "flake8-continuation" version))
8877 (sha256
8878 (base32
8879 "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y"))))
8880 (build-system python-build-system)
8881 (propagated-inputs
8882 `(("python-flake8" ,python-flake8)
8883 ("python-pycodestyle" ,python-pycodestyle)
8884 ("python-six" ,python-six)))
8885 (home-page "https://github.com/planetlabs/flake8-continuation")
8886 (synopsis "Flake8 Line Continuation Plugin")
8887 (description "A Flake8 plugin that checks for the line continuation
8888 style to be in the preferred method according to PEP-8, specifically:
8889 @quotation
8890 The preferred way of wrapping long lines is by using Python's implied
8891 line continuation inside parentheses, brackets and braces. Long lines
8892 can be broken over multiple lines by wrapping expressions in parentheses.
8893 These should be used in preference to using a backslash for line continuation.
8894 @end quotation")
8895 (license license:asl2.0)))
8896
8897 (define-public python-flake8-implicit-str-concat
8898 (package
8899 (name "python-flake8-implicit-str-concat")
8900 (version "0.2.0")
8901 (source
8902 (origin
8903 (method url-fetch)
8904 (uri (pypi-uri "flake8_implicit_str_concat" version))
8905 (sha256
8906 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
8907 (build-system python-build-system)
8908 (propagated-inputs
8909 `(("python-attrs" ,python-attrs)
8910 ("python-more-itertools" ,python-more-itertools)))
8911 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
8912 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
8913 (description
8914 "This is a plugin for the Python code checking tool Flake8 to encourage
8915 correct string literal concatenation.
8916
8917 It looks for style problems like implicitly concatenated string literals on
8918 the same line (which can be introduced by the code formatting tool Black), or
8919 unnecessary plus operators for explicit string literal concatenation.")
8920 (license license:expat)))
8921
8922 (define-public python-flake8-polyfill
8923 (package
8924 (name "python-flake8-polyfill")
8925 (version "1.0.2")
8926 (source
8927 (origin
8928 (method url-fetch)
8929 (uri (pypi-uri "flake8-polyfill" version))
8930 (sha256
8931 (base32
8932 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8933 (build-system python-build-system)
8934 (arguments
8935 '(#:phases
8936 (modify-phases %standard-phases
8937 (replace 'check
8938 (lambda _
8939 ;; Be compatible with Pytest 4:
8940 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8941 (substitute* "setup.cfg"
8942 (("\\[pytest\\]")
8943 "[tool:pytest]"))
8944
8945 (setenv "PYTHONPATH"
8946 (string-append (getcwd) "/build/lib:"
8947 (getenv "PYTHONPATH")))
8948 (invoke "py.test" "-v"))))))
8949 (native-inputs
8950 `(("python-flake8" ,python-flake8)
8951 ("python-mock" ,python-mock)
8952 ("python-pep8" ,python-pep8)
8953 ("python-pycodestyle" ,python-pycodestyle)
8954 ("python-pytest" ,python-pytest)))
8955 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8956 (synopsis "Polyfill package for Flake8 plugins")
8957 (description
8958 "This package that provides some compatibility helpers for Flake8
8959 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8960 (license license:expat)))
8961
8962 (define-public python2-flake8-polyfill
8963 (package-with-python2 python-flake8-polyfill))
8964
8965 (define-public python-flake8-print
8966 (package
8967 (name "python-flake8-print")
8968 (version "4.0.0")
8969 (source
8970 (origin
8971 (method url-fetch)
8972 (uri (pypi-uri "flake8-print" version))
8973 (sha256
8974 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
8975 (build-system python-build-system)
8976 (propagated-inputs
8977 `(("python-flake8" ,python-flake8)
8978 ("python-pycodestyle" ,python-pycodestyle)
8979 ("python-six" ,python-six)))
8980 (home-page "https://github.com/jbkahn/flake8-print")
8981 (synopsis "Print statement checker plugin for Flake8")
8982 (description
8983 "This plugin for Flake8 checks for @code{print} statements in Python
8984 files.")
8985 (license license:expat)))
8986
8987 (define-public python-flake8-pyi
8988 (package
8989 (name "python-flake8-pyi")
8990 (version "20.5.0")
8991 (source
8992 (origin
8993 (method url-fetch)
8994 (uri (pypi-uri "flake8-pyi" version))
8995 (sha256
8996 (base32
8997 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8998 (build-system python-build-system)
8999 (propagated-inputs
9000 `(("python-attrs" ,python-attrs)
9001 ("python-flake8" ,python-flake8)
9002 ("python-pyflakes" ,python-pyflakes)))
9003 (home-page "https://github.com/ambv/flake8-pyi")
9004 (synopsis
9005 "Flake8 plugin that provides specializations for type hinting stub files")
9006 (description
9007 "This package contains a plugin that provides specializations for
9008 type hinting stub files, especially interesting for linting typeshed. It
9009 adds the @file{.pyi} extension to the default value of the @code{--filename}
9010 command-line argument to Flake8. This means stubs are linted by default with
9011 this plugin enabled, without needing to explicitly list every file. It
9012 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
9013 expressions after the entire file has been read. This enables support for
9014 first-class forward references that stub files use.")
9015 (license license:expat)))
9016
9017 (define-public python-flake8-pie
9018 (package
9019 (name "python-flake8-pie")
9020 (version "0.5.0")
9021 (source
9022 (origin
9023 (method url-fetch)
9024 (uri (pypi-uri "flake8-pie" version))
9025 (sha256
9026 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
9027 (build-system python-build-system)
9028 (home-page "https://github.com/sbdchd/flake8-pie")
9029 (synopsis "Flake8 extension that implements lints")
9030 (description
9031 "This package provides a flake8 extension that implements miscellaneous
9032 lints.")
9033 (license license:bsd-2)))
9034
9035 (define-public python-flake8-quotes
9036 (package
9037 (name "python-flake8-quotes")
9038 (version "3.2.0")
9039 (source
9040 (origin
9041 (method url-fetch)
9042 (uri (pypi-uri "flake8-quotes" version))
9043 (sha256
9044 (base32
9045 "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z"))))
9046 (build-system python-build-system)
9047 (propagated-inputs
9048 `(("python-flake8" ,python-flake8)))
9049 (home-page "https://github.com/zheller/flake8-quotes/")
9050 (synopsis "Flake8 lint for quotes")
9051 (description "This package provides a Flake8 lint for quotes.")
9052 (license license:expat)))
9053
9054 (define-public python-autoflake
9055 (package
9056 (name "python-autoflake")
9057 (version "1.3.1")
9058 (source
9059 (origin
9060 (method url-fetch)
9061 (uri (pypi-uri "autoflake" version))
9062 (sha256
9063 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
9064 (build-system python-build-system)
9065 (propagated-inputs
9066 `(("python-pyflakes" ,python-pyflakes)))
9067 (home-page "https://github.com/myint/autoflake")
9068 (synopsis "Removes unused imports and unused variables")
9069 (description
9070 "@code{autoflake} removes unused imports and unused variables from Python
9071 code as reported by @code{pyflakes}.
9072
9073 By default, it only removes unused imports for modules that are part of the
9074 standard library. Removal of unused variables is also disabled by default.
9075 It also removes useless @code{pass} statements.")
9076 (license license:expat)))
9077
9078 (define-public python-mistune
9079 (package
9080 (name "python-mistune")
9081 (version "0.8.4")
9082 (source
9083 (origin
9084 (method url-fetch)
9085 (uri (pypi-uri "mistune" version))
9086 (sha256
9087 (base32
9088 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
9089 (build-system python-build-system)
9090 (native-inputs
9091 `(("python-nose" ,python-nose)
9092 ("python-cython" ,python-cython)))
9093 (home-page "https://github.com/lepture/mistune")
9094 (synopsis "Markdown parser in pure Python")
9095 (description "This package provides a fast markdown parser in pure
9096 Python.")
9097 (license license:bsd-3)))
9098
9099 (define-public python2-mistune
9100 (package-with-python2 python-mistune))
9101
9102 (define-public python-markdown
9103 (package
9104 (name "python-markdown")
9105 (version "3.3.4")
9106 (source
9107 (origin
9108 (method url-fetch)
9109 (uri (pypi-uri "Markdown" version))
9110 (sha256
9111 (base32
9112 "0jbs73nincha8fkfxx267sfxac6pl0ckszjbqbb8gk4dhs8v9d9i"))))
9113 (build-system python-build-system)
9114 (native-inputs
9115 `(("python-nose" ,python-nose)
9116 ("python-pyyaml" ,python-pyyaml)))
9117 (home-page "https://python-markdown.github.io/")
9118 (synopsis "Python implementation of Markdown")
9119 (description
9120 "This package provides a Python implementation of John Gruber's
9121 Markdown. The library features international input, various Markdown
9122 extensions, and several HTML output formats. A command line wrapper
9123 markdown_py is also provided to convert Markdown files to HTML.")
9124 (properties `((python2-variant . ,(delay python2-markdown))))
9125 (license license:bsd-3)))
9126
9127 ;; Markdown 3.2 dropped support for Python 2.
9128 (define-public python2-markdown
9129 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
9130 (package/inherit
9131 base
9132 (version "3.1.1")
9133 (source (origin
9134 (method url-fetch)
9135 (uri (pypi-uri "Markdown" version))
9136 (sha256
9137 (base32
9138 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
9139
9140 (define-public python-ptyprocess
9141 (package
9142 (name "python-ptyprocess")
9143 (version "0.5.2")
9144 (source
9145 (origin
9146 (method url-fetch)
9147 (uri (pypi-uri "ptyprocess" version))
9148 (sha256
9149 (base32
9150 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
9151 (build-system python-build-system)
9152 (native-inputs
9153 `(("python-nose" ,python-nose)))
9154 (arguments
9155 `(#:phases
9156 (modify-phases %standard-phases
9157 (replace 'check
9158 (lambda _ (invoke "nosetests"))))))
9159 (home-page "https://github.com/pexpect/ptyprocess")
9160 (synopsis "Run a subprocess in a pseudo terminal")
9161 (description
9162 "This package provides a Python library used to launch a subprocess in a
9163 pseudo terminal (pty), and interact with both the process and its pty.")
9164 (license license:isc)))
9165
9166 (define-public python2-ptyprocess
9167 (package-with-python2 python-ptyprocess))
9168
9169 (define-public python-cram
9170 (package
9171 (name "python-cram")
9172 (version "0.7")
9173 (home-page "https://bitheap.org/cram/")
9174 (source (origin
9175 (method url-fetch)
9176 (uri (list (string-append home-page "cram-"
9177 version ".tar.gz")
9178 (pypi-uri "cram" version)))
9179 (sha256
9180 (base32
9181 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
9182 (arguments
9183 '(#:phases
9184 (modify-phases %standard-phases
9185 (add-after 'unpack 'patch-source
9186 (lambda _
9187 (substitute* (find-files "cram" ".*\\.py$")
9188 ;; Replace default shell path.
9189 (("/bin/sh") (which "sh")))
9190 (substitute* (find-files "tests" ".*\\.t$")
9191 (("md5") "md5sum")
9192 (("/bin/bash") (which "bash"))
9193 (("/bin/sh") (which "sh")))
9194 (substitute* "cram/_test.py"
9195 ;; This hack works around a bug triggered by substituting
9196 ;; the /bin/sh paths. "tests/usage.t" compares the output of
9197 ;; "cram -h", which breaks the output at 80 characters. This
9198 ;; causes the line showing the default shell to break into two
9199 ;; lines, but the test expects a single line...
9200 (("env\\['COLUMNS'\\] = '80'")
9201 "env['COLUMNS'] = '160'"))
9202
9203 (substitute* "Makefile"
9204 ;; Recent versions of python-coverage have caused the test
9205 ;; coverage to decrease (as of version 0.7). Allow that.
9206 (("--fail-under=100")
9207 "--fail-under=90"))
9208
9209 #t))
9210 (replace 'check
9211 ;; The test phase uses the built library and executable.
9212 (lambda* (#:key inputs outputs #:allow-other-keys)
9213 (add-installed-pythonpath inputs outputs)
9214 (setenv "PATH" (string-append (getenv "PATH") ":"
9215 (assoc-ref outputs "out") "/bin"))
9216 (invoke "make" "test"))))))
9217 (build-system python-build-system)
9218 (native-inputs
9219 `(("python-coverage" ,python-coverage)
9220 ("which" ,which)))
9221 (synopsis "Simple testing framework for command line applications")
9222 (description
9223 "Cram is a functional testing framework for command line applications.
9224 Cram tests look like snippets of interactive shell sessions. Cram runs each
9225 command and compares the command output in the test with the command’s actual
9226 output.")
9227 (license license:gpl2+)))
9228
9229 (define-public python2-cram
9230 (package-with-python2 python-cram))
9231
9232 (define-public python-crashtest
9233 (package
9234 (name "python-crashtest")
9235 (version "0.3.1")
9236 (source
9237 (origin
9238 (method url-fetch)
9239 (uri (pypi-uri "crashtest" version))
9240 (sha256
9241 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
9242 (build-system python-build-system)
9243 (home-page "https://github.com/sdispater/crashtest")
9244 (synopsis "Manage Python errors with ease")
9245 (description
9246 "Python library that makes exceptions handling and inspection easier.")
9247 (license license:expat)))
9248
9249 (define-public python-straight-plugin
9250 (package
9251 (name "python-straight-plugin")
9252 (version "1.4.1")
9253 (source
9254 (origin
9255 (method url-fetch)
9256 (uri (pypi-uri "straight.plugin" version))
9257 (sha256
9258 (base32
9259 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
9260 (build-system python-build-system)
9261 (home-page "https://github.com/ironfroggy/straight.plugin")
9262 (synopsis "Simple namespaced plugin facility")
9263 (description "Straight Plugin provides a type of plugin you can create from
9264 almost any existing Python modules, and an easy way for outside developers to
9265 add functionality and customization to your projects with their own plugins.")
9266 (license license:expat)))
9267
9268 (define-public python2-straight-plugin
9269 (package-with-python2 python-straight-plugin))
9270
9271 (define-public python-fonttools
9272 (package
9273 (name "python-fonttools")
9274 (version "4.6.0")
9275 (source (origin
9276 (method url-fetch)
9277 (uri (pypi-uri "fonttools" version ".zip"))
9278 (sha256
9279 (base32
9280 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
9281 (build-system python-build-system)
9282 (native-inputs
9283 `(("unzip" ,unzip)
9284 ("python-pytest" ,python-pytest)
9285 ("python-pytest-runner" ,python-pytest-runner)))
9286 (home-page "https://github.com/fonttools/fonttools")
9287 (synopsis "Tools to manipulate font files")
9288 (description
9289 "FontTools/TTX is a library to manipulate font files from Python. It
9290 supports reading and writing of TrueType/OpenType fonts, reading and writing
9291 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
9292 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
9293 from an XML-based format.")
9294 (license license:expat)))
9295
9296 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
9297 (define-public python2-fonttools
9298 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
9299 (package/inherit
9300 base
9301 (version "3.44.0")
9302 (source (origin
9303 (method url-fetch)
9304 (uri (pypi-uri "fonttools" version ".zip"))
9305 (sha256
9306 (base32
9307 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
9308
9309 (define-public python-ly
9310 (package
9311 (name "python-ly")
9312 (version "0.9.5")
9313 (source
9314 (origin
9315 (method url-fetch)
9316 (uri (pypi-uri name version))
9317 (sha256
9318 (base32
9319 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
9320 (build-system python-build-system)
9321 (arguments
9322 ;; FIXME: Some tests need network access.
9323 '(#:tests? #f))
9324 (synopsis "Tool and library for manipulating LilyPond files")
9325 (description "This package provides a Python library to parse, manipulate
9326 or create documents in LilyPond format. A command line program ly is also
9327 provided that can be used to do various manipulations with LilyPond files.")
9328 (home-page "https://pypi.org/project/python-ly/")
9329 (license license:gpl2+)))
9330
9331 (define-public python-appdirs
9332 (package
9333 (name "python-appdirs")
9334 (version "1.4.3")
9335 (source
9336 (origin
9337 (method url-fetch)
9338 (uri (pypi-uri "appdirs" version))
9339 (sha256
9340 (base32
9341 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9342 (build-system python-build-system)
9343 (home-page "https://github.com/ActiveState/appdirs")
9344 (synopsis
9345 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9346 (description
9347 "This module provides a portable way of finding out where user data
9348 should be stored on various operating systems.")
9349 (license license:expat)))
9350
9351 (define-public python2-appdirs
9352 (package-with-python2 python-appdirs))
9353
9354 (define-public python-gorilla
9355 (package
9356 (name "python-gorilla")
9357 (version "0.3.0")
9358 (source (origin
9359 (method url-fetch)
9360 (uri (pypi-uri "gorilla" version))
9361 (sha256
9362 (base32
9363 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9364 (build-system python-build-system)
9365 (home-page "https://github.com/christophercrouzet/gorilla")
9366 (synopsis "Convenient monkey patching with Python")
9367 (description
9368 "Gorilla is a Python library that provides a convenient approach to
9369 monkey patching. Monkey patching is the process of modifying module and
9370 class attributes at runtime with the purpose of replacing or extending
9371 third-party code.")
9372 (license license:expat)))
9373
9374 (define-public python-llfuse
9375 (package
9376 (name "python-llfuse")
9377 (version "1.3.8")
9378 (source (origin
9379 (method url-fetch)
9380 (uri (pypi-uri "llfuse" version))
9381 (sha256
9382 (base32
9383 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9384 (build-system python-build-system)
9385 (inputs
9386 `(("fuse" ,fuse)
9387 ("attr" ,attr)))
9388 (native-inputs
9389 `(("pkg-config" ,pkg-config)))
9390 (synopsis "Python bindings for FUSE")
9391 (description
9392 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9393 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9394 (license license:lgpl2.0+)
9395 (properties `((python2-variant . ,(delay python2-llfuse))))))
9396
9397 (define-public python2-llfuse
9398 (let ((base (package-with-python2
9399 (strip-python2-variant python-llfuse))))
9400 (package/inherit base
9401 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
9402
9403 (define-public python-msgpack
9404 (package
9405 (name "python-msgpack")
9406 (version "1.0.0")
9407 (source (origin
9408 (method url-fetch)
9409 (uri (pypi-uri "msgpack" version))
9410 (sha256
9411 (base32
9412 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
9413 (build-system python-build-system)
9414 (arguments
9415 `(#:modules ((guix build utils)
9416 (guix build python-build-system)
9417 (ice-9 ftw)
9418 (srfi srfi-1)
9419 (srfi srfi-26))
9420 #:phases
9421 (modify-phases %standard-phases
9422 (replace 'check
9423 (lambda _
9424 (let ((cwd (getcwd)))
9425 (setenv "PYTHONPATH"
9426 (string-append cwd "/build/"
9427 (find (cut string-prefix? "lib" <>)
9428 (scandir (string-append cwd "/build")))
9429 ":"
9430 (getenv "PYTHONPATH")))
9431 (invoke "pytest" "-v" "test")))))))
9432 (native-inputs
9433 `(("python-pytest" ,python-pytest)))
9434 (synopsis "MessagePack (de)serializer")
9435 (description "MessagePack is a fast, compact binary serialization format,
9436 suitable for similar data to JSON. This package provides CPython bindings for
9437 reading and writing MessagePack data.")
9438 (home-page "https://pypi.org/project/msgpack/")
9439 (license license:asl2.0)))
9440
9441 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
9442 ;; release 0.5. Some packages like borg still call it by the old name for now.
9443 ;; <https://bugs.gnu.org/30662>
9444 (define-public python-msgpack-transitional
9445 (package
9446 (inherit python-msgpack)
9447 (name "python-msgpack-transitional")
9448 (version "0.5.6")
9449 (source (origin
9450 (method url-fetch)
9451 (uri (pypi-uri "msgpack" version))
9452 (sha256
9453 (base32
9454 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
9455 (arguments
9456 (substitute-keyword-arguments (package-arguments python-msgpack)
9457 ((#:phases phases)
9458 `(modify-phases ,phases
9459 (add-after 'unpack 'configure-transitional
9460 (lambda _
9461 ;; Keep using the old name.
9462 (substitute* "setup.py"
9463 (("TRANSITIONAL = False")
9464 "TRANSITIONAL = 1"))
9465 #t))))))))
9466
9467 (define-public python2-msgpack
9468 (package-with-python2 python-msgpack))
9469
9470 (define-public python-netaddr
9471 (package
9472 (name "python-netaddr")
9473 (version "0.7.19")
9474 (source
9475 (origin
9476 (method url-fetch)
9477 (uri (pypi-uri "netaddr" version))
9478 (sha256
9479 (base32
9480 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
9481 (build-system python-build-system)
9482 (arguments `(#:tests? #f)) ;; No tests.
9483 (home-page "https://github.com/drkjam/netaddr/")
9484 (synopsis "Pythonic manipulation of network addresses")
9485 (description
9486 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
9487 and MAC network addresses.")
9488 (license license:bsd-3)))
9489
9490 (define-public python2-netaddr
9491 (package-with-python2 python-netaddr))
9492
9493 (define-public python2-pyroute2
9494 (package
9495 (name "python2-pyroute2")
9496 (version "0.5.6")
9497 (source
9498 (origin
9499 (method url-fetch)
9500 (uri (pypi-uri "pyroute2" version))
9501 (sha256
9502 (base32
9503 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
9504 (build-system python-build-system)
9505 (arguments
9506 `(#:python ,python-2)) ;Python 3.x is not supported
9507 (home-page "https://github.com/svinota/pyroute2")
9508 (synopsis "Python netlink library")
9509 (description
9510 "Pyroute2 is a pure Python netlink library with minimal dependencies.
9511 Supported netlink families and protocols include:
9512 @itemize
9513 @item rtnl, network settings - addresses, routes, traffic controls
9514 @item nfnetlink - netfilter API: ipset, nftables, ...
9515 @item ipq - simplest userspace packet filtering, iptables QUEUE target
9516 @item devlink - manage and monitor devlink-enabled hardware
9517 @item generic - generic netlink families
9518 @itemize
9519 @item nl80211 - wireless functions API (basic support)
9520 @item taskstats - extended process statistics
9521 @item acpi_events - ACPI events monitoring
9522 @item thermal_events - thermal events monitoring
9523 @item VFS_DQUOT - disk quota events monitoring
9524 @end itemize
9525 @end itemize")
9526 (license license:gpl2+)))
9527
9528 (define-public python-wrapt
9529 (package
9530 (name "python-wrapt")
9531 (version "1.11.2")
9532 (source
9533 (origin
9534 (method url-fetch)
9535 (uri (pypi-uri "wrapt" version))
9536 (sha256
9537 (base32
9538 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
9539 (build-system python-build-system)
9540 (arguments
9541 ;; Tests are not included in the tarball, they are only available in the
9542 ;; git repository.
9543 `(#:tests? #f))
9544 (home-page "https://github.com/GrahamDumpleton/wrapt")
9545 (synopsis "Module for decorators, wrappers and monkey patching")
9546 (description
9547 "The aim of the wrapt module is to provide a transparent object proxy for
9548 Python, which can be used as the basis for the construction of function
9549 wrappers and decorator functions.")
9550 (license license:bsd-2)))
9551
9552 (define-public python2-wrapt
9553 (package-with-python2 python-wrapt))
9554
9555 (define-public python-commonmark
9556 (package
9557 (name "python-commonmark")
9558 (version "0.9.1")
9559 (source
9560 (origin
9561 (method url-fetch)
9562 (uri (pypi-uri "commonmark" version))
9563 (sha256
9564 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
9565 (build-system python-build-system)
9566 (arguments
9567 `(#:phases
9568 (modify-phases %standard-phases
9569 (replace 'check
9570 (lambda* (#:key inputs outputs #:allow-other-keys)
9571 (add-installed-pythonpath inputs outputs)
9572 (invoke "python" "setup.py" "test"))))))
9573 (home-page "https://github.com/readthedocs/commonmark.py")
9574 (synopsis "Python parser for the CommonMark Markdown spec")
9575 (description
9576 "This module is a pure Python port of jgm's @code{commonmark.js}, a
9577 Markdown parser and renderer for the CommonMark specification, using only
9578 native modules.")
9579 (license license:bsd-3)))
9580
9581 (define-public python-xlrd
9582 (package
9583 (name "python-xlrd")
9584 (version "1.2.0")
9585 (source (origin
9586 (method url-fetch)
9587 (uri (pypi-uri "xlrd" version))
9588 (sha256
9589 (base32
9590 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
9591 (build-system python-build-system)
9592 (arguments
9593 `(#:phases
9594 (modify-phases %standard-phases
9595 ;; Some tests depend on writing a temporary file to the user's home
9596 ;; directory.
9597 (add-after 'unpack 'fix-tests
9598 (lambda _
9599 (delete-file "tests/test_open_workbook.py")
9600 #t)))))
9601 (home-page "http://www.python-excel.org/")
9602 (synopsis "Library for extracting data from Excel files")
9603 (description "This package provides a library to extract data from
9604 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
9605 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
9606 Unicode-aware. It is not intended as an end-user tool.")
9607 (license license:bsd-3)))
9608
9609 (define-public python2-xlrd
9610 (package-with-python2 python-xlrd))
9611
9612 (define-public python-immutables
9613 (package
9614 (name "python-immutables")
9615 (version "0.14")
9616 (source
9617 (origin
9618 (method url-fetch)
9619 (uri (pypi-uri "immutables" version))
9620 (sha256
9621 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9622 (build-system python-build-system)
9623 (home-page "https://github.com/MagicStack/immutables")
9624 (synopsis "High-performance immutable mapping type for Python")
9625 (description
9626 "An immutable mapping type for Python. The underlying datastructure is a
9627 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9628 functional languages.")
9629 (license license:asl2.0)))
9630
9631 (define-public python-prettytable
9632 (package
9633 (name "python-prettytable")
9634 (version "0.7.2")
9635 (source
9636 (origin
9637 (method url-fetch)
9638 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9639 (sha256
9640 (base32
9641 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9642 (build-system python-build-system)
9643 (home-page "https://code.google.com/archive/p/prettytable/")
9644 (synopsis "Display tabular data in an ASCII table format")
9645 (description
9646 "A library designed to represent tabular data in visually appealing ASCII
9647 tables. PrettyTable allows for selection of which columns are to be printed,
9648 independent alignment of columns (left or right justified or centred) and
9649 printing of sub-tables by specifying a row range.")
9650 (license license:bsd-3)))
9651
9652 (define-public python2-prettytable
9653 (package-with-python2 python-prettytable))
9654
9655 (define-public python-curio
9656 (package
9657 (name "python-curio")
9658 (version "1.2")
9659 (source
9660 (origin
9661 (method url-fetch)
9662 (uri (pypi-uri "curio" version))
9663 (sha256
9664 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9665 (build-system python-build-system)
9666 (arguments
9667 `(#:phases
9668 (modify-phases %standard-phases
9669 (replace 'check
9670 (lambda* (#:key inputs outputs #:allow-other-keys)
9671 (add-installed-pythonpath inputs outputs)
9672 (invoke "pytest" "-vv" "-k"
9673 ;; Tries to open an outgoing connection.
9674 "not test_ssl_outgoing"))))))
9675 (native-inputs
9676 `(("python-pytest" ,python-pytest)))
9677 (home-page "https://github.com/dabeaz/curio")
9678 (synopsis "Coroutine-based library for concurrent Python")
9679 (description
9680 "Curio is a coroutine-based library for concurrent Python systems
9681 programming. It provides standard programming abstractions such as as
9682 tasks, sockets, files, locks, and queues.")
9683 (license license:bsd-3)))
9684
9685 (define-public python-tables
9686 (package
9687 (name "python-tables")
9688 (version "3.6.1")
9689 (source
9690 (origin
9691 (method url-fetch)
9692 (uri (pypi-uri "tables" version))
9693 (sha256
9694 (base32
9695 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9696 (modules '((guix build utils)))
9697 (snippet
9698 '(begin
9699 ;; Remove pre-compiled .pyc files from source.
9700 (for-each delete-file-recursively
9701 (find-files "." "__pycache__" #:directories? #t))
9702 (for-each delete-file (find-files "." "\\.pyc$"))
9703 #t))))
9704 (build-system python-build-system)
9705 (arguments
9706 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9707 ;; or "check", so we must override the build and check phases.
9708 #:phases
9709 (modify-phases %standard-phases
9710 (add-after 'unpack 'use-gcc
9711 (lambda _
9712 (substitute* "setup.py"
9713 (("^( +)compiler = new_compiler\\(\\)" line indent)
9714 (string-append line
9715 "\n"
9716 indent
9717 "compiler.set_executables(compiler='gcc',"
9718 "compiler_so='gcc',"
9719 "linker_exe='gcc',"
9720 "linker_so='gcc -shared')")))
9721 #t))
9722 (add-after 'unpack 'disable-tuning
9723 (lambda _
9724 (substitute* "setup.py"
9725 (("cpu_flags = .*")
9726 "cpu_flags = ['sse2']\n"))
9727 #t))
9728 (replace 'build
9729 (lambda* (#:key inputs #:allow-other-keys)
9730 (invoke "python" "setup.py" "build"
9731 (string-append "--hdf5="
9732 (assoc-ref inputs "hdf5")))))
9733 (replace 'check
9734 (lambda* (#:key inputs #:allow-other-keys)
9735 (invoke "python" "setup.py" "check"
9736 (string-append "--hdf5="
9737 (assoc-ref inputs "hdf5"))))))))
9738 (propagated-inputs
9739 `(("python-numexpr" ,python-numexpr)
9740 ("python-numpy" ,python-numpy)))
9741 (native-inputs
9742 `(("python-cython" ,python-cython)
9743 ("pkg-config" ,pkg-config)))
9744 (inputs
9745 `(("hdf5" ,hdf5-1.10)
9746 ("bzip2" ,bzip2)
9747 ("zlib" ,zlib)))
9748 (home-page "https://www.pytables.org/")
9749 (synopsis "Hierarchical datasets for Python")
9750 (description "PyTables is a package for managing hierarchical datasets and
9751 designed to efficiently cope with extremely large amounts of data.")
9752 (license license:bsd-3)))
9753
9754 (define-public python-sniffio
9755 (package
9756 (name "python-sniffio")
9757 (version "1.1.0")
9758 (source
9759 (origin
9760 (method url-fetch)
9761 (uri (pypi-uri "sniffio" version))
9762 (sha256
9763 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9764 (build-system python-build-system)
9765 (arguments
9766 `(#:phases
9767 (modify-phases %standard-phases
9768 (replace 'check
9769 (lambda _
9770 (invoke "pytest" "-vv"))))))
9771 (native-inputs
9772 `(("python-curio" ,python-curio)
9773 ("python-pytest" ,python-pytest)
9774 ("python-pytest-cov" ,python-pytest-cov)))
9775 (home-page "https://github.com/python-trio/sniffio")
9776 (synopsis "Detect which async library a program is running under")
9777 (description "This package detects which async library a program is
9778 running under. It supports multiple async I/O packages, like Trio, and
9779 asyncio.")
9780 ;; Either license applies.
9781 (license (list license:expat license:asl2.0))))
9782
9783 (define-public python-pytest-black
9784 (package
9785 (name "python-pytest-black")
9786 (version "0.3.8")
9787 (source
9788 (origin
9789 (method url-fetch)
9790 (uri (pypi-uri "pytest-black" version))
9791 (sha256
9792 (base32
9793 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9794 (build-system python-build-system)
9795 (propagated-inputs
9796 `(("python-pytest" ,python-pytest)
9797 ("python-black" ,python-black)
9798 ("python-toml" ,python-toml)))
9799 (native-inputs
9800 `(("python-setuptools-scm" ,python-setuptools-scm)))
9801 (home-page "https://github.com/shopkeep/pytest-black")
9802 (synopsis "Pytest plugin to enable format checking with black")
9803 (description
9804 "This package provides a pytest plugin to enable format checking with the
9805 Python code formatter \"black\".")
9806 (license license:expat)))
9807
9808 (define-public python-get-version
9809 (package
9810 (name "python-get-version")
9811 (version "2.1")
9812 (source
9813 (origin
9814 (method url-fetch)
9815 (uri (pypi-uri "get_version" version))
9816 (sha256
9817 (base32
9818 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9819 (build-system python-build-system)
9820 (propagated-inputs
9821 `(("python-pygments" ,python-pygments)
9822 ("python-pytest" ,python-pytest)
9823 ("python-pytest-black" ,python-pytest-black)
9824 ("python-pytest-cov" ,python-pytest-cov)
9825 ("python-setuptools" ,python-setuptools)
9826 ("python-testpath" ,python-testpath)))
9827 (home-page "https://github.com/flying-sheep/get_version")
9828 (synopsis "Version helper in the spirit of versioneer")
9829 (description
9830 "This package provides a version helper that lets you automatically use
9831 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9832 also supports getting the version from Python source distributions or, once
9833 your package is installed, via @code{pkg_resources} (part of
9834 @code{setuptools}).")
9835 (license license:gpl3+)))
9836
9837 (define-public python-legacy-api-wrap
9838 (package
9839 (name "python-legacy-api-wrap")
9840 (version "1.2")
9841 (source
9842 (origin
9843 (method url-fetch)
9844 (uri (pypi-uri "legacy-api-wrap" version))
9845 (sha256
9846 (base32
9847 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9848 (build-system python-build-system)
9849 (propagated-inputs
9850 `(("python-get-version" ,python-get-version)
9851 ("python-pytest" ,python-pytest)
9852 ("python-pytest-black" ,python-pytest-black)
9853 ("python-pytest-cov" ,python-pytest-cov)
9854 ("python-setuptools" ,python-setuptools)))
9855 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9856 (synopsis "Legacy API wrapper")
9857 (description "This module defines a decorator to wrap legacy APIs. The
9858 primary use case is APIs defined before keyword-only parameters existed.")
9859 (license license:gpl3+)))
9860
9861 (define-public python-pyasn1
9862 (package
9863 (name "python-pyasn1")
9864 (version "0.4.8")
9865 (source
9866 (origin
9867 (method url-fetch)
9868 (uri (pypi-uri "pyasn1" version))
9869 (sha256
9870 (base32
9871 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9872 (build-system python-build-system)
9873 (home-page "http://pyasn1.sourceforge.net/")
9874 (synopsis "ASN.1 types and codecs")
9875 (description
9876 "This is an implementation of ASN.1 types and codecs in Python. It is
9877 suitable for a wide range of protocols based on the ASN.1 specification.")
9878 (license license:bsd-2)))
9879
9880 (define-public python2-pyasn1
9881 (package-with-python2 python-pyasn1))
9882
9883 (define-public python-pyasn1-modules
9884 (package
9885 (name "python-pyasn1-modules")
9886 (version "0.2.2")
9887 (source
9888 (origin
9889 (method url-fetch)
9890 (uri (pypi-uri "pyasn1-modules" version))
9891 (sha256
9892 (base32
9893 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9894 (build-system python-build-system)
9895 (propagated-inputs
9896 `(("python-pyasn1" ,python-pyasn1)))
9897 (home-page "https://sourceforge.net/projects/pyasn1/")
9898 (synopsis "ASN.1 codec implementations")
9899 (description
9900 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9901 implementations of ASN.1-based codecs and protocols.")
9902 (license license:bsd-3)))
9903
9904 (define-public python2-pyasn1-modules
9905 (package-with-python2 python-pyasn1-modules))
9906
9907 (define-public python-ipaddress
9908 (package
9909 (name "python-ipaddress")
9910 (version "1.0.23")
9911 (source (origin
9912 (method url-fetch)
9913 (uri (pypi-uri "ipaddress" version))
9914 (sha256
9915 (base32
9916 "1qp743h30s04m3cg3yk3fycad930jv17q7dsslj4mfw0jlvf1y5p"))))
9917 (build-system python-build-system)
9918 (home-page "https://github.com/phihag/ipaddress")
9919 (synopsis "IP address manipulation library")
9920 (description
9921 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9922 in Python. This library is used to create, poke at, and manipulate IPv4 and
9923 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9924 module to older versions of Python.")
9925 (license license:psfl)))
9926
9927 (define-public python2-ipaddress
9928 (package-with-python2 python-ipaddress))
9929
9930 (define-public python2-ipaddr
9931 (package
9932 (name "python2-ipaddr")
9933 (version "2.1.11")
9934 (source
9935 (origin
9936 (method url-fetch)
9937 (uri (pypi-uri "ipaddr" version))
9938 (sha256
9939 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9940 (build-system python-build-system)
9941 (arguments
9942 `(#:python ,python-2 ;version 2 only
9943 #:phases
9944 (modify-phases %standard-phases
9945 (replace 'check
9946 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9947 (home-page "https://github.com/google/ipaddr-py")
9948 (synopsis "IP address manipulation library")
9949 (description
9950 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9951 IPv6 addresses and networks.
9952
9953 For new implementations you may prefer to use the standard module
9954 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9955 versions of Python.")
9956 (license license:asl2.0)))
9957
9958 (define-public python-idna
9959 (package
9960 (name "python-idna")
9961 (version "2.10")
9962 (source
9963 (origin
9964 (method url-fetch)
9965 (uri (pypi-uri "idna" version))
9966 (sha256
9967 (base32
9968 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9969 (build-system python-build-system)
9970 (home-page "https://github.com/kjd/idna")
9971 (synopsis "Internationalized domain names in applications")
9972 (description
9973 "This is a library to support the Internationalised Domain Names in
9974 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9975 protocol is often referred to as “IDNA2008” and can produce different results
9976 from the earlier standard from 2003. The library is also intended to act as a
9977 suitable drop-in replacement for the “encodings.idna” module that comes with
9978 the Python standard library but currently only supports the older 2003
9979 specification.")
9980 (license license:bsd-4)))
9981
9982 (define-public python-idna-2.7
9983 (package (inherit python-idna)
9984 (version "2.7")
9985 (source (origin
9986 (method url-fetch)
9987 (uri (pypi-uri "idna" version))
9988 (sha256
9989 (base32
9990 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9991
9992
9993 (define-public python2-idna
9994 (package-with-python2 python-idna))
9995
9996 (define-public python-libsass
9997 (package
9998 (name "python-libsass")
9999 (version "0.20.1")
10000 (source
10001 (origin
10002 ;; PyPI tarball is missing some test files.
10003 (method git-fetch)
10004 (uri (git-reference
10005 (url "https://github.com/sass/libsass-python")
10006 (commit version)))
10007 (file-name (git-file-name name version))
10008 (sha256
10009 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
10010 (build-system python-build-system)
10011 (arguments
10012 `(#:phases
10013 (modify-phases %standard-phases
10014 ;; Use Guix package of libsass instead of compiling from a checkout.
10015 (add-before 'build 'set-libsass
10016 (lambda _
10017 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
10018 #t))
10019 (replace 'check
10020 (lambda* (#:key inputs outputs #:allow-other-keys)
10021 (add-installed-pythonpath inputs outputs)
10022 (invoke "pytest" "sasstests.py"))))))
10023 (native-inputs
10024 `(("python-pytest" ,python-pytest)
10025 ("python-werkzeug" ,python-werkzeug)))
10026 (inputs
10027 `(("libsass" ,libsass)))
10028 (propagated-inputs
10029 `(("python-six" ,python-six)))
10030 (home-page "https://sass.github.io/libsass-python/")
10031 (synopsis "Straightforward binding of libsass for Python")
10032 (description
10033 "This package provides a simple Python extension module @code{sass} which
10034 is binding LibSass.")
10035 (license license:expat)))
10036
10037 (define-public python-idna-ssl
10038 (package
10039 (name "python-idna-ssl")
10040 (version "1.0.1")
10041 (source
10042 (origin
10043 (method url-fetch)
10044 (uri (pypi-uri "idna-ssl" version))
10045 (sha256
10046 (base32
10047 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
10048 (build-system python-build-system)
10049 (arguments
10050 `(#:tests? #f)) ;circular dependency with python-aiohttp
10051 (home-page "https://github.com/aio-libs/idna-ssl")
10052 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
10053 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
10054 domains support.")
10055 (license license:expat)))
10056
10057 (define-public python-pretend
10058 (package
10059 (name "python-pretend")
10060 (version "1.0.9")
10061 (source
10062 (origin
10063 (method url-fetch)
10064 (uri (pypi-uri "pretend" version))
10065 (sha256
10066 (base32
10067 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
10068 (build-system python-build-system)
10069 (home-page "https://github.com/alex/pretend")
10070 (synopsis "Library for stubbing in Python")
10071 (description
10072 "Pretend is a library to make stubbing with Python easier. Stubbing is a
10073 technique for writing tests. You may hear the term mixed up with mocks,
10074 fakes, or doubles. Basically, a stub is an object that returns pre-canned
10075 responses, rather than doing any computation.")
10076 (license license:bsd-3)))
10077
10078 (define-public python2-pretend
10079 (package-with-python2 python-pretend))
10080
10081 (define-public python-pip
10082 (package
10083 (name "python-pip")
10084 (version "20.2.4")
10085 (source
10086 (origin
10087 (method url-fetch)
10088 (uri (pypi-uri "pip" version))
10089 (sha256
10090 (base32
10091 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
10092 (build-system python-build-system)
10093 (arguments
10094 '(#:tests? #f)) ; there are no tests in the pypi archive.
10095 (home-page "https://pip.pypa.io/")
10096 (synopsis "Package manager for Python software")
10097 (description
10098 "Pip is a package manager for Python software, that finds packages on the
10099 Python Package Index (PyPI).")
10100 (license license:expat)))
10101
10102 (define-public python2-pip
10103 (package-with-python2 python-pip))
10104
10105 (define-public python-tlsh
10106 (package
10107 (name "python-tlsh")
10108 (version "3.4.5")
10109 (home-page "https://github.com/trendmicro/tlsh")
10110 (source
10111 (origin
10112 (method git-fetch)
10113 (uri (git-reference
10114 (url "https://github.com/trendmicro/tlsh")
10115 (commit (string-append "v" version))))
10116 (file-name (git-file-name name version))
10117 (sha256
10118 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
10119 (build-system cmake-build-system)
10120 (arguments
10121 '(#:out-of-source? #f
10122 #:phases (modify-phases %standard-phases
10123 (replace
10124 'install
10125 (lambda* (#:key outputs #:allow-other-keys)
10126 ;; Build and install the Python bindings. The underlying
10127 ;; C++ library is apparently not meant to be installed.
10128 (let ((out (assoc-ref outputs "out")))
10129 (with-directory-excursion "py_ext"
10130 (and (system* "python" "setup.py" "build")
10131 (system* "python" "setup.py" "install"
10132 (string-append "--prefix=" out))))))))))
10133 (inputs `(("python" ,python-wrapper))) ;for the bindings
10134 (synopsis "Fuzzy matching library for Python")
10135 (description
10136 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
10137 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
10138 value which can be used for similarity comparisons. Similar objects have
10139 similar hash values, which allows for the detection of similar objects by
10140 comparing their hash values. The byte stream should have a sufficient amount
10141 of complexity; for example, a byte stream of identical bytes will not generate
10142 a hash value.")
10143 (license license:asl2.0)))
10144
10145 (define-public python2-tlsh
10146 (package/inherit python-tlsh
10147 (name "python2-tlsh")
10148 (inputs `(("python" ,python-2)))))
10149
10150 (define-public python-termcolor
10151 (package
10152 (name "python-termcolor")
10153 (version "1.1.0")
10154 (source
10155 (origin
10156 (method url-fetch)
10157 (uri (pypi-uri "termcolor" version))
10158 (sha256
10159 (base32
10160 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
10161 (build-system python-build-system)
10162 (arguments
10163 ;; There are no tests.
10164 `(#:tests? #f))
10165 (home-page "https://pypi.org/project/termcolor/")
10166 (synopsis "ANSII Color formatting for terminal output")
10167 (description
10168 "This package provides ANSII Color formatting for output in terminals.")
10169 (license license:expat)))
10170
10171 (define-public python2-termcolor
10172 (package-with-python2 python-termcolor))
10173
10174 (define-public python-terminaltables
10175 (package
10176 (name "python-terminaltables")
10177 (version "3.1.0")
10178 (source
10179 (origin
10180 (method url-fetch)
10181 (uri (pypi-uri "terminaltables" version))
10182 (sha256
10183 (base32
10184 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
10185 (build-system python-build-system)
10186 (home-page "https://github.com/Robpol86/terminaltables")
10187 (synopsis
10188 "Generate simple tables in terminals from a nested list of strings")
10189 (description
10190 "This package makes it easy to draw tables in terminal/console
10191 applications from a list of lists of strings. It supports multi-line rows.")
10192 (license license:expat)))
10193
10194 (define-public python-libarchive-c
10195 (package
10196 (name "python-libarchive-c")
10197 (version "2.9")
10198 (source (origin
10199 (method url-fetch)
10200 (uri (pypi-uri "libarchive-c" version))
10201 (sha256
10202 (base32
10203 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
10204 (build-system python-build-system)
10205 (arguments
10206 '(#:phases (modify-phases %standard-phases
10207 (add-before
10208 'build 'reference-libarchive
10209 (lambda* (#:key inputs #:allow-other-keys)
10210 ;; Retain the absolute file name of libarchive.so.
10211 (let ((libarchive (assoc-ref inputs "libarchive")))
10212 (substitute* "libarchive/ffi.py"
10213 (("find_library\\('archive'\\)")
10214 (string-append "'" libarchive
10215 "/lib/libarchive.so'"))))))
10216 (replace 'check
10217 (lambda _ (invoke "pytest" "-vv"))))))
10218 (native-inputs
10219 `(("python-mock" ,python-mock)
10220 ("python-pytest" ,python-pytest)))
10221 (inputs
10222 `(("libarchive" ,libarchive)))
10223 (home-page "https://github.com/Changaco/python-libarchive-c")
10224 (synopsis "Python interface to libarchive")
10225 (description
10226 "This package provides Python bindings to libarchive, a C library to
10227 access possibly compressed archives in many different formats. It uses
10228 Python's @code{ctypes} foreign function interface (FFI).")
10229 (license license:lgpl2.0+)))
10230
10231 (define-public python2-libarchive-c
10232 (package-with-python2 python-libarchive-c))
10233
10234 (define-public python-file
10235 (package/inherit file
10236 (name "python-file")
10237 (build-system python-build-system)
10238 (arguments
10239 '(#:tests? #f ;no tests
10240 #:configure-flags '("--single-version-externally-managed" "--root=/")
10241 #:phases (modify-phases %standard-phases
10242 (add-before 'build 'change-directory
10243 (lambda _
10244 (chdir "python")
10245 #t))
10246 (add-before 'build 'set-library-file-name
10247 (lambda* (#:key inputs #:allow-other-keys)
10248 (let ((file (assoc-ref inputs "file")))
10249 (substitute* "magic.py"
10250 (("find_library\\('magic'\\)")
10251 (string-append "'" file "/lib/libmagic.so'")))
10252 #t))))))
10253 (inputs `(("file" ,file)))
10254 (native-inputs (if (%current-target-system)
10255 `(("self" ,this-package))
10256 '()))
10257 (synopsis "Python bindings to the libmagic file type guesser")
10258 (description "This package provides Python bindings to the libmagic file
10259 type guesser.
10260
10261 Note that this module and the @code{python-magic} module both provide a
10262 @file{magic.py} file; these two modules, which are different and were
10263 developed separately, both serve the same purpose: provide Python bindings for
10264 libmagic.")))
10265
10266 (define-public python2-file
10267 (package-with-python2 python-file))
10268
10269 (define-public python-debian
10270 (package
10271 (name "python-debian")
10272 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
10273 (version "0.1.36")
10274 (source
10275 (origin
10276 ;; Use git-fetch, as pypi doesn't include test suite.
10277 (method git-fetch)
10278 (uri (git-reference
10279 (url home-page)
10280 (commit version)))
10281 (file-name (git-file-name name version))
10282 (sha256
10283 (base32
10284 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
10285 (build-system python-build-system)
10286 (arguments
10287 `(#:phases (modify-phases %standard-phases
10288 (add-after 'unpack 'remove-debian-specific-tests
10289 ;; python-apt, apt and dpkg are not yet available in guix,
10290 ;; and these tests heavily depend on them.
10291 (lambda _
10292 (delete-file "lib/debian/tests/test_deb822.py")
10293 (delete-file "lib/debian/tests/test_debfile.py")
10294 #t)))))
10295 (propagated-inputs
10296 `(("python-six" ,python-six)
10297 ("python-chardet" ,python-chardet)))
10298 (synopsis "Debian package related modules")
10299 (description
10300 ;; XXX: Use @enumerate instead of @itemize to work around
10301 ;; <http://bugs.gnu.org/21772>.
10302 "This package provides Python modules that abstract many formats of
10303 Debian-related files, such as:
10304
10305 @enumerate
10306 @item Debtags information;
10307 @item @file{debian/changelog} files;
10308 @item packages files, pdiffs;
10309 @item control files of single or multiple RFC822-style paragraphs---e.g.
10310 @file{debian/control}, @file{.changes}, @file{.dsc};
10311 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
10312 contained files and meta-information.
10313 @end enumerate\n")
10314
10315 ;; Modules are either GPLv2+ or GPLv3+.
10316 (license license:gpl3+)))
10317
10318 (define-public python-nbformat
10319 (package
10320 (name "python-nbformat")
10321 (version "5.1.3")
10322 (source
10323 (origin
10324 (method url-fetch)
10325 (uri (pypi-uri "nbformat" version))
10326 (sha256
10327 (base32
10328 "1j6idwsw59cslsssvlkg2bkfpvd6ri7kghbp14jwcw87sy57h5mm"))))
10329 (build-system python-build-system)
10330 (propagated-inputs
10331 `(("python-ipython-genutils" ,python-ipython-genutils)
10332 ("python-jsonschema" ,python-jsonschema)
10333 ("python-jupyter-core" ,python-jupyter-core)
10334 ("python-traitlets" ,python-traitlets)))
10335 (native-inputs
10336 `(("python-pytest" ,python-pytest)))
10337 (home-page "https://jupyter.org")
10338 (synopsis "Jupyter Notebook format")
10339 (description "This package provides the reference implementation of the
10340 Jupyter Notebook format and Python APIs for working with notebooks.")
10341 (properties `((python2-variant . ,(delay python2-nbformat))))
10342 (license license:bsd-3)))
10343
10344 (define-public python2-nbformat
10345 (let ((parent (package-with-python2
10346 (strip-python2-variant python-nbformat))))
10347 (package
10348 (inherit parent)
10349 (version "4.4.0")
10350 (source
10351 (origin
10352 (method url-fetch)
10353 (uri (pypi-uri "nbformat" version))
10354 (sha256
10355 (base32
10356 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp")))))))
10357
10358 (define-public python-bleach
10359 (package
10360 (name "python-bleach")
10361 (version "3.1.5")
10362 (source
10363 (origin
10364 (method url-fetch)
10365 (uri (pypi-uri "bleach" version))
10366 (sha256
10367 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
10368 (build-system python-build-system)
10369 (propagated-inputs
10370 `(("python-webencodings" ,python-webencodings)
10371 ("python-six" ,python-six)))
10372 (native-inputs
10373 `(("python-datrie" ,python-datrie)
10374 ("python-genshi" ,python-genshi)
10375 ("python-lxml" ,python-lxml)
10376 ("python-pytest" ,python-pytest)))
10377 (home-page "https://github.com/mozilla/bleach")
10378 (synopsis "Whitelist-based HTML-sanitizing tool")
10379 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
10380 (license license:asl2.0)))
10381
10382 (define-public python2-bleach
10383 (package-with-python2 python-bleach))
10384
10385 (define-public python-entrypoints
10386 (package
10387 (name "python-entrypoints")
10388 (version "0.3")
10389 (source
10390 (origin
10391 (method url-fetch)
10392 (uri (pypi-uri "entrypoints" version))
10393 (sha256
10394 (base32
10395 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
10396 (build-system python-build-system)
10397 ;; The package does not come with a setup.py file, so we have to generate
10398 ;; one ourselves.
10399 (arguments
10400 `(#:tests? #f
10401 #:phases
10402 (modify-phases %standard-phases
10403 (add-after 'unpack 'create-setup.py
10404 (lambda _
10405 (call-with-output-file "setup.py"
10406 (lambda (port)
10407 (format port "\
10408 from setuptools import setup
10409 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
10410 " ,version))))))))
10411 (home-page "https://github.com/takluyver/entrypoints")
10412 (synopsis "Discover and load entry points from installed Python packages")
10413 (description "Entry points are a way for Python packages to advertise
10414 objects with some common interface. The most common examples are
10415 @code{console_scripts} entry points, which define shell commands by
10416 identifying a Python function to run. The @code{entrypoints} module contains
10417 functions to find and load entry points.")
10418 (license license:expat)))
10419
10420 (define-public python2-entrypoints
10421 (package-with-python2 python-entrypoints))
10422
10423 (define-public python-epc
10424 (package
10425 (name "python-epc")
10426 (version "0.0.5")
10427 (source
10428 (origin
10429 (method url-fetch)
10430 (uri (pypi-uri "epc" version))
10431 (sha256
10432 (base32
10433 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
10434 (build-system python-build-system)
10435 (propagated-inputs
10436 `(("python-sexpdata" ,python-sexpdata)))
10437 (native-inputs
10438 `(("python-nose" ,python-nose)))
10439 (home-page "https://github.com/tkf/python-epc")
10440 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
10441 (description
10442 "Python-EPC can call elisp functions from Python and Python functions
10443 from elisp.")
10444 (license license:gpl3)))
10445
10446 (define-public python-forex-python
10447 (package
10448 (name "python-forex-python")
10449 (version "1.5")
10450 (source
10451 (origin
10452 (method url-fetch)
10453 (uri (pypi-uri "forex-python" version))
10454 (sha256
10455 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
10456 (build-system python-build-system)
10457 (arguments
10458 ;; Tests are not included in the PyPI tarball. Also, the tests in the
10459 ;; repository require online data.
10460 `(#:tests? #f))
10461 (propagated-inputs
10462 `(("python-requests" ,python-requests)
10463 ("python-simplejson" ,python-simplejson)))
10464 (home-page "https://github.com/MicroPyramid/forex-python")
10465 (synopsis "Foreign exchange rates and currency conversion")
10466 (description
10467 "@code{python-forex-python} can be used to manipulate foreign
10468 exchange rates and to operate currency conversions.
10469
10470 Features:
10471 @itemize
10472 @item List all currency rates.
10473 @item BitCoin price for all currencies.
10474 @item Converting amount to BitCoins.
10475 @item Get historical rates for any day since 1999.
10476 @item Conversion rate for one currency(ex; USD to INR).
10477 @item Convert amount from one currency to other.('USD 10$' to INR).
10478 @item Currency symbols.
10479 @item Currency names.
10480 @end itemize")
10481 (license license:expat)))
10482
10483 (define-public python-simpleeval
10484 (package
10485 (name "python-simpleeval")
10486 (version "0.9.10")
10487 (source
10488 (origin
10489 (method url-fetch)
10490 (uri (pypi-uri "simpleeval" version))
10491 (sha256
10492 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
10493 (build-system python-build-system)
10494 (home-page "https://github.com/danthedeckie/simpleeval")
10495 (synopsis "Simple, safe single expression evaluator library")
10496 (description
10497 "This package provides a quick single file library for easily adding
10498 evaluatable expressions into python projects. Say you want to allow a user
10499 to set an alarm volume, which could depend on the time of day, alarm level,
10500 how many previous alarms had gone off, and if there is music playing at the
10501 time.")
10502 (license license:expat)))
10503
10504 (define-public python-nbconvert
10505 (package
10506 (name "python-nbconvert")
10507 (version "6.0.7")
10508 (source
10509 (origin
10510 (method url-fetch)
10511 (uri (pypi-uri "nbconvert" version))
10512 (sha256
10513 (base32
10514 "00lhqaxn481qvk2w5568asqlsnvrw2fm61p1vssx3m7vdnl17g6b"))))
10515 (build-system python-build-system)
10516 (arguments
10517 `(#:phases
10518 (modify-phases %standard-phases
10519 (replace 'check
10520 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10521 (when tests?
10522 (add-installed-pythonpath inputs outputs)
10523
10524 ;; This seems to require Chromium.
10525 (delete-file "nbconvert/exporters/tests/test_webpdf.py")
10526
10527 ;; This depends on the python3 kernel, which is provided by a
10528 ;; package that depends on nbconvert.
10529 (delete-file "nbconvert/preprocessors/tests/test_execute.py")
10530
10531 ;; Most of these tests fail because nbconvert fails to execute
10532 ;; itself.
10533 (delete-file "nbconvert/tests/test_nbconvertapp.py")
10534
10535 ;; One test here fails with an unclear error. It looks like
10536 ;; "%%pylabprint" is supposed to be expanded to some other
10537 ;; code, but isn't.
10538 (delete-file "nbconvert/filters/tests/test_strings.py")
10539
10540 ;; Some tests need HOME
10541 (setenv "HOME" "/tmp")
10542 (invoke "pytest")))))))
10543 (native-inputs
10544 `(("python-pytest" ,python-pytest)))
10545 (propagated-inputs
10546 `(("python-bleach" ,python-bleach)
10547 ("python-defusedxml" ,python-defusedxml)
10548 ("python-entrypoints" ,python-entrypoints)
10549 ("python-jinja2" ,python-jinja2)
10550 ("python-jupyter-core" ,python-jupyter-core)
10551 ("python-mistune" ,python-mistune)
10552 ("python-nbclient" ,python-nbclient)
10553 ("python-nbformat" ,python-nbformat)
10554 ("python-pandocfilters" ,python-pandocfilters)
10555 ("python-pygments" ,python-pygments)
10556 ("python-jupyterlab-pygments" ,python-jupyterlab-pygments)
10557 ("python-testpath" ,python-testpath)
10558 ("python-traitlets" ,python-traitlets)))
10559 (home-page "https://jupyter.org")
10560 (synopsis "Converting Jupyter Notebooks")
10561 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
10562 notebooks to various other formats via Jinja templates. It allows you to
10563 convert an @code{.ipynb} notebook file into various static formats including:
10564
10565 @enumerate
10566 @item HTML
10567 @item LaTeX
10568 @item PDF
10569 @item Reveal JS
10570 @item Markdown (md)
10571 @item ReStructured Text (rst)
10572 @item executable script
10573 @end enumerate\n")
10574 (license license:bsd-3)
10575 (properties `((python2-variant . ,(delay python2-nbconvert))))))
10576
10577 (define-public python2-nbconvert
10578 (let ((parent
10579 (package-with-python2
10580 (strip-python2-variant python-nbconvert))))
10581 (package
10582 (inherit parent)
10583 (version "5.0.0b1")
10584 (source
10585 (origin
10586 (method url-fetch)
10587 (uri (pypi-uri "nbconvert" version))
10588 (sha256
10589 (base32
10590 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
10591 (arguments
10592 `(;; The "bdist_egg" target is disabled by default, causing the installation
10593 ;; to fail.
10594 #:configure-flags (list "bdist_egg")
10595 ;; FIXME: 5 failures, 40 errors.
10596 #:tests? #f))
10597 (propagated-inputs
10598 `(("python-bleach" ,python-bleach)
10599 ("python-entrypoints" ,python-entrypoints)
10600 ("python-jinja2" ,python-jinja2)
10601 ("python-jupyter-core" ,python-jupyter-core)
10602 ("python-mistune" ,python-mistune)
10603 ("python-nbformat" ,python-nbformat)
10604 ("python-pygments" ,python-pygments)
10605 ("python-traitlets" ,python-traitlets))))))
10606
10607 (define-public python-notebook
10608 (package
10609 (name "python-notebook")
10610 (version "6.3.0")
10611 (source (origin
10612 (method url-fetch)
10613 (uri (pypi-uri "notebook" version))
10614 (sha256
10615 (base32
10616 "0zfwr87ndjzmdp9adpc9lby1hdqdkjp2q7c9vff3wiw1dj6kkjfb"))))
10617 (build-system python-build-system)
10618 (arguments
10619 `(#:phases
10620 (modify-phases %standard-phases
10621 (replace 'check
10622 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10623 ;; These tests require a browser
10624 (delete-file-recursively "notebook/tests/selenium")
10625 (when tests?
10626 (add-installed-pythonpath inputs outputs)
10627 ;; Some tests need HOME
10628 (setenv "HOME" "/tmp")
10629 (with-directory-excursion "/tmp"
10630 (invoke "pytest" "-vv"
10631 ;; TODO: This tests fails because nbconvert does not
10632 ;; list "python" as a format.
10633 "-k" "not test_list_formats"))))))))
10634 (propagated-inputs
10635 `(("python-argon2-cffi" ,python-argon2-cffi)
10636 ("python-ipykernel" ,python-ipykernel)
10637 ("python-ipython-genutils" ,python-ipython-genutils)
10638 ("python-jinja2" ,python-jinja2)
10639 ("python-jupyter-client" ,python-jupyter-client)
10640 ("python-jupyter-core" ,python-jupyter-core)
10641 ("python-nbconvert" ,python-nbconvert)
10642 ("python-nbformat" ,python-nbformat)
10643 ("python-prometheus-client" ,python-prometheus-client)
10644 ("python-pyzmq" ,python-pyzmq)
10645 ("python-send2trash" ,python-send2trash)
10646 ("python-terminado" ,python-terminado)
10647 ("python-tornado" ,python-tornado-6)
10648 ("python-traitlets" ,python-traitlets)))
10649 (native-inputs
10650 `(("python-coverage" ,python-coverage)
10651 ("python-nbval" ,python-nbval)
10652 ("python-pytest" ,python-pytest)
10653 ("python-pytest-cov" ,python-pytest-cov)
10654 ("python-requests" ,python-requests)
10655 ("python-requests-unixsocket" ,python-requests-unixsocket)))
10656 (home-page "https://jupyter.org/")
10657 (synopsis "Web-based notebook environment for interactive computing")
10658 (description
10659 "The Jupyter HTML notebook is a web-based notebook environment for
10660 interactive computing.")
10661 (properties `((python2-variant . ,(delay python2-notebook))))
10662 (license license:bsd-3)))
10663
10664 (define-public python2-notebook
10665 (let ((base (package-with-python2
10666 (strip-python2-variant python-notebook))))
10667 (package/inherit base
10668 (native-inputs
10669 `(("python2-mock" ,python2-mock)
10670 ,@(package-native-inputs base)))
10671 (arguments
10672 (substitute-keyword-arguments (package-arguments base)
10673 ((#:phases phases)
10674 `(modify-phases ,phases
10675 (add-before 'check 'disable-test-case
10676 ;; The test requires network access to localhost. Curiously it
10677 ;; fails with Python 2 only. Simply make the test-case return
10678 ;; immediately.
10679 (lambda _
10680 (substitute*
10681 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
10682 (("formats = self.nbconvert_api") "return #")))))))))))
10683
10684 (define-public python-widgetsnbextension
10685 (package
10686 (name "python-widgetsnbextension")
10687 (version "3.5.1")
10688 (source
10689 (origin
10690 (method url-fetch)
10691 (uri (pypi-uri "widgetsnbextension" version))
10692 (sha256
10693 (base32
10694 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10695 (build-system python-build-system)
10696 (propagated-inputs
10697 `(("python-notebook" ,python-notebook)))
10698 (home-page "https://ipython.org")
10699 (synopsis "IPython HTML widgets for Jupyter")
10700 (description "This package provides interactive HTML widgets for Jupyter
10701 notebooks.")
10702 (license license:bsd-3)))
10703
10704 (define-public python-ipywidgets
10705 (package
10706 (name "python-ipywidgets")
10707 (version "7.6.3")
10708 (source
10709 (origin
10710 (method url-fetch)
10711 (uri (pypi-uri "ipywidgets" version))
10712 (sha256
10713 (base32
10714 "1w217j8i53x14l7b05fk300k222zs9vkcjaa1rbrw3sk43k466lz"))))
10715 (build-system python-build-system)
10716 (propagated-inputs
10717 `(("python-ipykernel" ,python-ipykernel)
10718 ("python-ipython" ,python-ipython)
10719 ("python-jupyterlab-widgets" ,python-jupyterlab-widgets)
10720 ("python-nbformat" ,python-nbformat)
10721 ("python-traitlets" ,python-traitlets)
10722 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10723 (native-inputs
10724 `(("python-mock" ,python-mock)
10725 ("python-pytest" ,python-pytest)
10726 ("python-pytest-cov" ,python-pytest-cov)))
10727 (home-page "https://ipython.org")
10728 (synopsis "IPython HTML widgets for Jupyter")
10729 (description "Ipywidgets are interactive HTML widgets for Jupyter
10730 notebooks and the IPython kernel. Notebooks come alive when interactive
10731 widgets are used. Users gain control of their data and can visualize changes
10732 in the data.")
10733 (license license:bsd-3)))
10734
10735 (define-public python-jupyter-console
10736 (package
10737 (name "python-jupyter-console")
10738 (version "6.1.0")
10739 (source
10740 (origin
10741 (method url-fetch)
10742 (uri (pypi-uri "jupyter_console" version))
10743 (sha256
10744 (base32
10745 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10746 (build-system python-build-system)
10747 (propagated-inputs
10748 `(("python-ipykernel" ,python-ipykernel)
10749 ("python-jupyter-client" ,python-jupyter-client)
10750 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10751 ("python-pygments" ,python-pygments)))
10752 (native-inputs
10753 `(("python-nose" ,python-nose)))
10754 (home-page "https://jupyter.org")
10755 (synopsis "Jupyter terminal console")
10756 (description "This package provides a terminal-based console frontend for
10757 Jupyter kernels. It also allows for console-based interaction with non-Python
10758 Jupyter kernels such as IJulia and IRKernel.")
10759 (license license:bsd-3)))
10760
10761 ;; The python-ipython and python-jupyter-console require each other. To get
10762 ;; the functionality in both packages working, strip down the
10763 ;; python-jupyter-console package when using it as an input to python-ipython.
10764 (define python-jupyter-console-minimal
10765 (package/inherit python-jupyter-console
10766 (name "python-jupyter-console-minimal")
10767 (arguments
10768 (substitute-keyword-arguments
10769 (package-arguments python-jupyter-console)
10770 ((#:phases phases)
10771 `(modify-phases ,phases
10772 (add-after 'install 'delete-bin
10773 (lambda* (#:key outputs #:allow-other-keys)
10774 ;; Delete the bin files, to avoid conflicts in profiles
10775 ;; where python-ipython and python-jupyter-console are
10776 ;; both present.
10777 (delete-file-recursively
10778 (string-append
10779 (assoc-ref outputs "out") "/bin"))))))))
10780 ;; Remove the python-ipython propagated input, to avoid the cycle
10781 (propagated-inputs
10782 (alist-delete
10783 "python-ipython"
10784 (package-propagated-inputs python-jupyter-console)))))
10785
10786 (define-public python-qtconsole
10787 (package
10788 (name "python-qtconsole")
10789 (version "4.4.3")
10790 (source
10791 (origin
10792 (method url-fetch)
10793 (uri (pypi-uri "qtconsole" version))
10794 (sha256
10795 (base32
10796 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10797 (build-system python-build-system)
10798 (arguments
10799 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10800 ;; but we only have the LTS version 5.x. This means that there might be
10801 ;; runtime errors, but since this is a dependency of the Jupyter package,
10802 ;; and Jupyter can be used without the qtconsole we can overlook this for
10803 ;; now.
10804 `(#:tests? #f
10805 #:phases
10806 (modify-phases %standard-phases
10807 (add-before 'check 'pre-check
10808 (lambda _
10809 (setenv "QT_QPA_PLATFORM" "offscreen")
10810 #t)))))
10811 (propagated-inputs
10812 `(("python-ipykernel" ,python-ipykernel)
10813 ("python-ipython" ,python-ipython)))
10814 (native-inputs
10815 `(("python-pytest" ,python-pytest)))
10816 (home-page "https://jupyter.org")
10817 (synopsis "Jupyter Qt console")
10818 (description "This package provides a Qt-based console for Jupyter with
10819 support for rich media output.")
10820 (license license:bsd-3)))
10821
10822 (define-public python-jsbeautifier
10823 (package
10824 (name "python-jsbeautifier")
10825 (version "1.10.2")
10826 (home-page "https://github.com/beautify-web/js-beautify")
10827 (source (origin
10828 (method git-fetch)
10829 (uri (git-reference
10830 (url home-page)
10831 (commit (string-append "v" version))))
10832 (file-name (git-file-name name version))
10833 (sha256
10834 (base32
10835 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10836 (build-system python-build-system)
10837 (arguments
10838 `(#:phases (modify-phases %standard-phases
10839 (add-after 'unpack 'chdir
10840 (lambda _
10841 ;; The upstream Git repository contains all the code,
10842 ;; but this package only builds the python code.
10843 (chdir "python")
10844 #t))
10845 (add-after 'unpack 'patch-python-six-requirements
10846 (lambda _
10847 (substitute* "python/setup.py"
10848 (("six>=1.12.0")
10849 "six>=1.11.0"))
10850 #t)))))
10851 (propagated-inputs
10852 `(("python-editorconfig" ,python-editorconfig)
10853 ("python-six" ,python-six)))
10854 (native-inputs
10855 `(("python-pytest" ,python-pytest)))
10856 (synopsis "JavaScript unobfuscator and beautifier")
10857 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10858 popular online obfuscators.")
10859 (license license:expat)))
10860
10861 (define-public jupyter
10862 (package
10863 (name "jupyter")
10864 (version "1.0.0")
10865 (source
10866 (origin
10867 (method url-fetch)
10868 (uri (pypi-uri "jupyter" version))
10869 (sha256
10870 (base32
10871 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10872 (build-system python-build-system)
10873 (arguments '(#:tests? #f)) ; there are none.
10874 (propagated-inputs
10875 `(("python-ipykernel" ,python-ipykernel)
10876 ("python-ipywidgets" ,python-ipywidgets)
10877 ("python-jupyter-console" ,python-jupyter-console)
10878 ("python-nbconvert" ,python-nbconvert)
10879 ("python-notebook" ,python-notebook)
10880 ("python-qtconsole" ,python-qtconsole)))
10881 (native-search-paths
10882 (list (search-path-specification
10883 (variable "JUPYTER_PATH")
10884 (files '("share/jupyter")))))
10885 (home-page "https://jupyter.org")
10886 (synopsis "Web application for interactive documents")
10887 (description
10888 "The Jupyter Notebook is a web application that allows you to create and
10889 share documents that contain live code, equations, visualizations and
10890 explanatory text. Uses include: data cleaning and transformation, numerical
10891 simulation, statistical modeling, machine learning and much more.")
10892 (license license:bsd-3)))
10893
10894 (define-public python-chardet
10895 (package
10896 (name "python-chardet")
10897 (version "3.0.4")
10898 (source
10899 (origin
10900 (method url-fetch)
10901 (uri (pypi-uri "chardet" version))
10902 (sha256
10903 (base32
10904 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10905 (native-inputs
10906 `(("python-hypothesis" ,python-hypothesis)
10907 ("python-pytest" ,python-pytest)
10908 ("python-pytest-runner" ,python-pytest-runner)))
10909 (build-system python-build-system)
10910 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10911 (arguments `(#:tests? #f))
10912 (home-page "https://github.com/chardet/chardet")
10913 (synopsis "Universal encoding detector for Python 2 and 3")
10914 (description
10915 "This package provides @code{chardet}, a Python module that can
10916 automatically detect a wide range of file encodings.")
10917 (license license:lgpl2.1+)))
10918
10919 (define-public python2-chardet
10920 (package-with-python2 python-chardet))
10921
10922 (define-public python-docopt
10923 (package
10924 (name "python-docopt")
10925 (version "0.6.2")
10926 (source
10927 (origin
10928 (method git-fetch)
10929 ;; The release on PyPI does not include tests.
10930 (uri (git-reference
10931 (url "https://github.com/docopt/docopt")
10932 (commit version)))
10933 (file-name (git-file-name name version))
10934 (sha256
10935 (base32
10936 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10937 (build-system python-build-system)
10938 (native-inputs
10939 `(("python-pytest" ,python-pytest)))
10940 (arguments
10941 `(#:phases
10942 (modify-phases %standard-phases
10943 (replace 'check
10944 (lambda _ (invoke "py.test"))))))
10945 (home-page "http://docopt.org")
10946 (synopsis "Command-line interface description language for Python")
10947 (description "This library allows the user to define a command-line
10948 interface from a program's help message rather than specifying it
10949 programmatically with command-line parsers like @code{getopt} and
10950 @code{argparse}.")
10951 (license license:expat)))
10952
10953 (define-public python2-docopt
10954 (package-with-python2 python-docopt))
10955
10956 (define-public python-pythondialog
10957 (package
10958 (name "python-pythondialog")
10959 (version "3.4.0")
10960 (source
10961 (origin
10962 (method url-fetch)
10963 (uri (pypi-uri "pythondialog" version))
10964 (sha256
10965 (base32
10966 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10967 (build-system python-build-system)
10968 (arguments
10969 `(#:phases
10970 (modify-phases %standard-phases
10971 (add-after 'unpack 'patch-path
10972 (lambda* (#:key inputs #:allow-other-keys)
10973 (let* ((dialog (assoc-ref inputs "dialog")))
10974 ;; Since this library really wants to grovel the search path, we
10975 ;; must hardcode dialog's store path into it.
10976 (substitute* "dialog.py"
10977 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10978 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10979 #t))))
10980 #:tests? #f)) ; no test suite
10981 (propagated-inputs
10982 `(("dialog" ,dialog)))
10983 (home-page "http://pythondialog.sourceforge.net/")
10984 (synopsis "Python interface to the UNIX dialog utility")
10985 (description "A Python wrapper for the dialog utility. Its purpose is to
10986 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10987 This allows one to make simple text-mode user interfaces on Unix-like systems")
10988 (license license:lgpl2.1)
10989 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10990
10991 (define-public python2-pythondialog
10992 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10993 (package
10994 (inherit base)
10995 (version (package-version python-pythondialog))
10996 (source (origin
10997 (method url-fetch)
10998 (uri (pypi-uri "python2-pythondialog" version))
10999 (sha256
11000 (base32
11001 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
11002
11003 (define-public python-configobj
11004 (package
11005 (name "python-configobj")
11006 (version "5.0.6")
11007 (source (origin
11008 (method url-fetch)
11009 (uri (pypi-uri "configobj" version))
11010 (sha256
11011 (base32
11012 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
11013 ;; Patch setup.py so it looks for python-setuptools, which is
11014 ;; required to parse the keyword 'install_requires' in setup.py.
11015 (patches (search-patches "python-configobj-setuptools.patch"))))
11016 (build-system python-build-system)
11017 (propagated-inputs
11018 `(("python-six" ,python-six)))
11019 (synopsis "Config file reading, writing and validation")
11020 (description "ConfigObj is a simple but powerful config file reader and
11021 writer: an ini file round tripper. Its main feature is that it is very easy to
11022 use, with a straightforward programmer’s interface and a simple syntax for
11023 config files.")
11024 (home-page "https://github.com/DiffSK/configobj")
11025 (license license:bsd-3)))
11026
11027 (define-public python2-configobj
11028 (package-with-python2 python-configobj))
11029
11030 (define-public python-configargparse
11031 (package
11032 (name "python-configargparse")
11033 (version "1.2.3")
11034 (source (origin
11035 (method url-fetch)
11036 (uri (pypi-uri "ConfigArgParse" version))
11037 (sha256
11038 (base32
11039 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
11040 (build-system python-build-system)
11041 (native-inputs
11042 `(("python-pyyaml" ,python-pyyaml)))
11043 (arguments
11044 `(#:phases
11045 (modify-phases %standard-phases
11046 (replace 'check
11047 (lambda _
11048 ;; Bypass setuptools-shim because one test relies on "setup.py"
11049 ;; being the first argument passed to the python call.
11050 ;;
11051 ;; NOTE: Many tests do not run because they rely on Python's
11052 ;; built-in test.test_argparse, but we remove the unit tests from
11053 ;; our Python installation.
11054 (invoke "python" "setup.py" "test"))))))
11055 (synopsis "Replacement for argparse")
11056 (description "A drop-in replacement for argparse that allows options to also
11057 be set via config files and/or environment variables.")
11058 (home-page "https://github.com/bw2/ConfigArgParse")
11059 (license license:expat)))
11060
11061 (define-public python-argparse-manpage
11062 (package
11063 (name "python-argparse-manpage")
11064 (version "1.1")
11065 (source
11066 (origin
11067 (method url-fetch)
11068 (uri (pypi-uri "argparse-manpage" version))
11069 (sha256
11070 (base32
11071 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
11072 (build-system python-build-system)
11073 (home-page "https://github.com/praiskup/argparse-manpage")
11074 (synopsis "Build manual page from Python's ArgumentParser object")
11075 (description
11076 "This package provides tools to build manual pages from Python's
11077 @code{ArgumentParser} object.")
11078 (license license:asl2.0)))
11079
11080 (define-public python-contextlib2
11081 (package
11082 (name "python-contextlib2")
11083 (version "0.6.0.post1")
11084 (source
11085 (origin
11086 (method url-fetch)
11087 (uri (pypi-uri "contextlib2" version))
11088 (sha256
11089 (base32
11090 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
11091 (build-system python-build-system)
11092 (home-page "https://contextlib2.readthedocs.org/")
11093 (synopsis "Tools for decorators and context managers")
11094 (description "This module is primarily a backport of the Python
11095 3.2 contextlib to earlier Python versions. Like contextlib, it
11096 provides utilities for common tasks involving decorators and context
11097 managers. It also contains additional features that are not part of
11098 the standard library.")
11099 (properties `((python2-variant . ,(delay python2-contextlib2))))
11100 (license license:psfl)))
11101
11102 (define-public python2-contextlib2
11103 (let ((base (package-with-python2
11104 (strip-python2-variant python-contextlib2))))
11105 (package/inherit base
11106 (arguments
11107 (substitute-keyword-arguments (package-arguments base)
11108 ((#:phases phases)
11109 `(modify-phases ,phases
11110 (replace 'check
11111 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
11112 (native-inputs
11113 `(("python2-unittest2" ,python2-unittest2))))))
11114
11115 ;; This package is used by python2-pytest via python2-importlib-metadata,
11116 ;; and thus can not depend on python-unittest2 (which depends on pytest).
11117 (define-public python2-contextlib2-bootstrap
11118 (hidden-package
11119 (package/inherit
11120 python2-contextlib2
11121 (name "python2-contextlib2-bootstrap")
11122 (arguments
11123 `(#:tests? #f
11124 ,@(package-arguments python2-contextlib2)))
11125 (native-inputs '()))))
11126
11127 (define-public python-texttable
11128 (package
11129 (name "python-texttable")
11130 (version "1.6.2")
11131 (source
11132 (origin
11133 (method url-fetch)
11134 (uri (pypi-uri "texttable" version))
11135 (sha256
11136 (base32
11137 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
11138 (build-system python-build-system)
11139 (arguments
11140 `(#:phases
11141 (modify-phases %standard-phases
11142 (replace 'check
11143 (lambda _ (invoke "pytest" "tests.py"))))))
11144 (native-inputs
11145 `(("python-pytest" ,python-pytest)))
11146 (home-page "https://github.com/foutaise/texttable/")
11147 (synopsis "Python module for creating simple ASCII tables")
11148 (description "Texttable is a Python module for creating simple ASCII
11149 tables.")
11150 (license license:expat)))
11151
11152 (define-public python2-texttable
11153 (package-with-python2 python-texttable))
11154
11155 (define-public python-atomicwrites
11156 (package
11157 (name "python-atomicwrites")
11158 (version "1.3.0")
11159 (source (origin
11160 (method url-fetch)
11161 (uri (pypi-uri "atomicwrites" version))
11162 (sha256
11163 (base32
11164 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
11165 (build-system python-build-system)
11166 (synopsis "Atomic file writes in Python")
11167 (description "Library for atomic file writes using platform dependent tools
11168 for atomic file system operations.")
11169 (home-page "https://github.com/untitaker/python-atomicwrites")
11170 (license license:expat)))
11171
11172 (define-public python2-atomicwrites
11173 (package-with-python2 python-atomicwrites))
11174
11175 (define-public python-click-threading
11176 (package
11177 (name "python-click-threading")
11178 (version "0.4.4")
11179 (source (origin
11180 (method url-fetch)
11181 (uri (pypi-uri "click-threading" version))
11182 (sha256
11183 (base32
11184 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
11185 (build-system python-build-system)
11186 (propagated-inputs
11187 `(("python-click" ,python-click)))
11188 (synopsis "Utilities for multithreading in Click")
11189 (description "This package provides utilities for multithreading in Click
11190 applications.")
11191 (home-page "https://github.com/click-contrib/click-threading")
11192 (license license:expat)))
11193
11194 (define-public python-click-log
11195 (package
11196 (name "python-click-log")
11197 (version "0.3.2")
11198 (source (origin
11199 (method url-fetch)
11200 (uri (pypi-uri "click-log" version))
11201 (sha256
11202 (base32
11203 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
11204 (build-system python-build-system)
11205 (propagated-inputs
11206 `(("python-click" ,python-click)))
11207 (synopsis "Logging for click applications")
11208 (description "This package provides a Python library for logging Click
11209 applications.")
11210 (home-page "https://github.com/click-contrib/click-log")
11211 (license license:expat)))
11212
11213 (define-public python-click-default-group
11214 (package
11215 (name "python-click-default-group")
11216 (version "1.2.2")
11217 (source (origin
11218 (method url-fetch)
11219 (uri (pypi-uri "click-default-group" version))
11220 (sha256
11221 (base32
11222 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
11223 (build-system python-build-system)
11224 (arguments
11225 `(#:tests? #f)) ; no target
11226 (propagated-inputs
11227 `(("python-click" ,python-click)))
11228 (synopsis "Extends click.Group")
11229 (description "This package extends click.Group to invoke a command without
11230 explicit subcommand name.")
11231 (home-page "https://github.com/click-contrib/click-default-group")
11232 (license license:bsd-3)))
11233
11234 (define-public python-structlog
11235 (package
11236 (name "python-structlog")
11237 (version "20.2.0")
11238 (source
11239 (origin
11240 (method url-fetch)
11241 (uri (pypi-uri "structlog" version))
11242 (sha256
11243 (base32
11244 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
11245 (build-system python-build-system)
11246 (arguments
11247 `(#:phases
11248 (modify-phases %standard-phases
11249 (replace 'check
11250 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11251 (when tests?
11252 (add-installed-pythonpath inputs outputs)
11253 (invoke "pytest"))
11254 #t)))))
11255 (native-inputs
11256 `(("python-coverage" ,python-coverage)
11257 ("python-freezegun" ,python-freezegun)
11258 ("python-pretend" ,python-pretend)
11259 ("python-pytest" ,python-pytest)
11260 ("python-pytest-asyncio" ,python-pytest-asyncio)
11261 ("python-simplejson" ,python-simplejson)
11262 ("python-twisted" ,python-twisted)))
11263 (home-page "https://www.structlog.org/")
11264 (synopsis "Structured Logging for Python")
11265 (description "@code{structlog} changes logging in Python by adding structure
11266 to your log entries.")
11267 (license (list license:asl2.0 license:expat))))
11268
11269 (define-public python-apipkg
11270 (package
11271 (name "python-apipkg")
11272 (version "1.5")
11273 (source (origin
11274 (method url-fetch)
11275 (uri (pypi-uri "apipkg" version))
11276 (sha256
11277 (base32
11278 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
11279 (build-system python-build-system)
11280 (native-inputs
11281 `(("python-pytest" ,python-pytest)
11282 ("python-setuptools-scm" ,python-setuptools-scm)))
11283 (synopsis "Namespace control and lazy-import mechanism")
11284 (description "With apipkg you can control the exported namespace of a Python
11285 package and greatly reduce the number of imports for your users. It is a small
11286 pure Python module that works on virtually all Python versions.")
11287 (home-page "https://github.com/pytest-dev/apipkg")
11288 (license license:expat)))
11289
11290 (define-public python-execnet
11291 (package
11292 (name "python-execnet")
11293 (version "1.4.1")
11294 (source (origin
11295 (method url-fetch)
11296 (uri (pypi-uri "execnet" version))
11297 (sha256
11298 (base32
11299 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
11300 (build-system python-build-system)
11301 (arguments
11302 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
11303 ;; The two test failures are caused by the lack of an `ssh` executable.
11304 ;; The test suite can be run with pytest after the 'install' phase.
11305 #:tests? #f))
11306 (native-inputs
11307 `(("python-pytest" ,python-pytest)
11308 ("python-setuptools-scm" ,python-setuptools-scm)))
11309 (propagated-inputs
11310 `(("python-apipkg" ,python-apipkg)))
11311 (synopsis "Rapid multi-Python deployment")
11312 (description "Execnet provides a share-nothing model with
11313 channel-send/receive communication for distributing execution across many
11314 Python interpreters across version, platform and network barriers. It has a
11315 minimal and fast API targeting the following uses:
11316 @enumerate
11317 @item distribute tasks to (many) local or remote CPUs
11318 @item write and deploy hybrid multi-process applications
11319 @item write scripts to administer multiple environments
11320 @end enumerate")
11321 (home-page "https://codespeak.net/execnet/")
11322 (license license:expat)))
11323
11324 (define-public python2-execnet
11325 (package-with-python2 python-execnet))
11326
11327 (define-public python-icalendar
11328 (package
11329 (name "python-icalendar")
11330 (version "4.0.7")
11331 (source (origin
11332 (method url-fetch)
11333 (uri (pypi-uri "icalendar" version))
11334 (sha256
11335 (base32
11336 "19574j3jwssm2dkqykih4568xqfgjsa3hcd79yl5s2vfys3qvh8g"))))
11337 (build-system python-build-system)
11338 (propagated-inputs
11339 `(("python-dateutil" ,python-dateutil)
11340 ("python-pytz" ,python-pytz)))
11341 (synopsis "Python library for parsing iCalendar files")
11342 (description "The icalendar package is a parser/generator of iCalendar
11343 files for use with Python.")
11344 (home-page "https://github.com/collective/icalendar")
11345 (license license:bsd-2)))
11346
11347 (define-public python-args
11348 (package
11349 (name "python-args")
11350 (version "0.1.0")
11351 (source (origin
11352 (method url-fetch)
11353 (uri (pypi-uri "args" version))
11354 (sha256
11355 (base32
11356 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
11357 (build-system python-build-system)
11358 (home-page "https://github.com/kennethreitz/args")
11359 (synopsis "Command-line argument parser")
11360 (description
11361 "This library provides a Python module to parse command-line arguments.")
11362 (license license:bsd-3)))
11363
11364 (define-public python2-args
11365 (package-with-python2 python-args))
11366
11367 (define-public python-clint
11368 (package
11369 (name "python-clint")
11370 (version "0.5.1")
11371 (source (origin
11372 (method url-fetch)
11373 (uri (pypi-uri "clint" version))
11374 (sha256
11375 (base32
11376 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
11377 (build-system python-build-system)
11378 (arguments
11379 '(#:phases
11380 (modify-phases %standard-phases
11381 (replace 'check
11382 (lambda _ (invoke "py.test" "-v"))))))
11383 (native-inputs
11384 `(("python-pytest" ,python-pytest)))
11385 (propagated-inputs
11386 `(("python-args" ,python-args)))
11387 (home-page "https://github.com/kennethreitz/clint")
11388 (synopsis "Command-line interface tools")
11389 (description
11390 "Clint is a Python module filled with a set of tools for developing
11391 command-line applications, including tools for colored and indented
11392 output, progress bar display, and pipes.")
11393 (license license:isc)))
11394
11395 (define-public python2-clint
11396 (package-with-python2 python-clint))
11397
11398 (define-public python-rply
11399 (package
11400 (name "python-rply")
11401 (version "0.7.5")
11402 (source (origin
11403 (method url-fetch)
11404 (uri (pypi-uri "rply" version))
11405 (sha256
11406 (base32
11407 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
11408 (build-system python-build-system)
11409 (propagated-inputs
11410 `(("python-appdirs" ,python-appdirs)))
11411 (home-page "https://github.com/alex/rply")
11412 (synopsis "Parser generator for Python")
11413 (description
11414 "This package provides a pure Python based parser generator, that also
11415 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
11416 with a new public API, and RPython support.")
11417 (license license:bsd-3)))
11418
11419 (define-public python2-rply
11420 (package-with-python2 python-rply))
11421
11422 (define-public python-hy
11423 (package
11424 (name "python-hy")
11425 (version "0.18.0")
11426 (source (origin
11427 (method url-fetch)
11428 (uri (pypi-uri "hy" version))
11429 (sha256
11430 (base32
11431 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
11432 (build-system python-build-system)
11433 (arguments
11434 '(#:phases
11435 (modify-phases %standard-phases
11436 (add-before 'install 'set-HOME
11437 (lambda _
11438 (setenv "HOME" "/tmp") #t))
11439 (replace 'check
11440 (lambda _
11441 ;; Tests require write access to HOME.
11442 (setenv "HOME" "/tmp")
11443 (invoke "nosetests"))))))
11444 (native-inputs
11445 `(("python-coverage" ,python-coverage)
11446 ("python-nose" ,python-nose)))
11447 (propagated-inputs
11448 `(("python-astor" ,python-astor)
11449 ("python-colorama" ,python-colorama)
11450 ("python-rply" ,python-rply)
11451 ("python-funcparserlib"
11452 ,python-funcparserlib)))
11453 (home-page "http://hylang.org/")
11454 (synopsis "Lisp frontend to Python")
11455 (description
11456 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
11457 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
11458 Python at your fingertips, in Lisp form.")
11459 (license license:expat)))
11460
11461 (define-public python2-functools32
11462 (package
11463 (name "python2-functools32")
11464 (version "3.2.3-2")
11465 (source
11466 (origin
11467 (method url-fetch)
11468 (uri (pypi-uri "functools32" version))
11469 (sha256
11470 (base32
11471 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
11472 (build-system python-build-system)
11473 (arguments
11474 `(#:python ,python-2
11475 #:tests? #f)) ; no test target
11476 (home-page "https://github.com/MiCHiLU/python-functools32")
11477 (synopsis
11478 "Backport of the functools module from Python 3.2.3")
11479 (description
11480 "This package is a backport of the @code{functools} module from Python
11481 3.2.3 for use with older versions of Python and PyPy.")
11482 (license license:expat)))
11483
11484 (define-public python2-subprocess32
11485 (package
11486 (name "python2-subprocess32")
11487 (version "3.2.7")
11488 (source (origin
11489 (method url-fetch)
11490 (uri (pypi-uri "subprocess32" version))
11491 (sha256
11492 (base32
11493 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
11494 (patches
11495 (search-patches "python2-subprocess32-disable-input-test.patch"))))
11496 (build-system python-build-system)
11497 (arguments
11498 `(#:python ,python-2
11499 ;; The test suite fails with Python > 2.7.13:
11500 ;; import test.support
11501 ;; ImportError: No module named support
11502 #:tests? #f
11503 #:phases
11504 (modify-phases %standard-phases
11505 (add-after 'unpack 'patch-/bin/sh
11506 (lambda _
11507 (substitute* '("subprocess32.py"
11508 "test_subprocess32.py")
11509 (("/bin/sh") (which "sh")))
11510 #t)))))
11511 (home-page "https://github.com/google/python-subprocess32")
11512 (synopsis "Backport of the subprocess module from Python 3.2")
11513 (description
11514 "This is a backport of the @code{subprocess} standard library module
11515 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
11516 new features. On POSIX systems it is guaranteed to be reliable when used
11517 in threaded applications. It includes timeout support from Python 3.3 but
11518 otherwise matches 3.2’s API.")
11519 (license license:psfl)))
11520
11521 (define-public python2-futures
11522 (package
11523 (name "python2-futures")
11524 (version "3.2.0")
11525 (source
11526 (origin
11527 (method url-fetch)
11528 (uri (pypi-uri "futures" version))
11529 (sha256
11530 (base32
11531 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
11532 (build-system python-build-system)
11533 (arguments
11534 `(#:python ,python-2
11535 #:phases
11536 (modify-phases %standard-phases
11537 (replace 'check
11538 (lambda _
11539 (invoke "python" "test_futures.py")
11540 #t)))))
11541 (home-page "https://github.com/agronholm/pythonfutures")
11542 (synopsis
11543 "Backport of the concurrent.futures package from Python 3.2")
11544 (description
11545 "The concurrent.futures module provides a high-level interface for
11546 asynchronously executing callables. This package backports the
11547 concurrent.futures package from Python 3.2")
11548 (license license:bsd-3)))
11549
11550 (define-public python-promise
11551 (package
11552 (name "python-promise")
11553 (version "0.4.2")
11554 (source
11555 (origin
11556 (method url-fetch)
11557 (uri (pypi-uri "promise" version))
11558 (sha256
11559 (base32
11560 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
11561 (build-system python-build-system)
11562 ;; Tests wants python-futures, which is a python2 only program, and
11563 ;; can't be found by python-promise at test time.
11564 (arguments `(#:tests? #f))
11565 (home-page "https://github.com/syrusakbary/promise")
11566 (synopsis "Promises/A+ implementation for Python")
11567 (description
11568 "Promises/A+ implementation for Python")
11569 (properties `((python2-variant . ,(delay python2-promise))))
11570 (license license:expat)))
11571
11572 (define-public python2-promise
11573 (let ((promise (package-with-python2
11574 (strip-python2-variant python-promise))))
11575 (package/inherit promise
11576 (arguments (substitute-keyword-arguments (package-arguments promise)
11577 ((#:tests? _) #t)))
11578 (native-inputs
11579 `(("python2-futures" ,python2-futures)
11580 ("python2-pytest" ,python2-pytest)
11581 ,@(package-native-inputs promise))))))
11582
11583 (define-public python-progressbar2
11584 (package
11585 (name "python-progressbar2")
11586 (version "3.51.3")
11587 (source
11588 (origin
11589 (method url-fetch)
11590 (uri (pypi-uri "progressbar2" version))
11591 (sha256
11592 (base32
11593 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
11594 (build-system python-build-system)
11595 (propagated-inputs
11596 `(("python-six" ,python-six)
11597 ("python-utils" ,python-utils)))
11598 (native-inputs
11599 `(("python-flake8" ,python-flake8)
11600 ("python-freezegun" ,python-freezegun)
11601 ("python-pycodestyle" ,python-pycodestyle)
11602 ("python-pytest" ,python-pytest)
11603 ("python-pytest-cache" ,python-pytest-cache)
11604 ("python-pytest-cov" ,python-pytest-cov)
11605 ("python-pytest-flakes" ,python-pytest-flakes)
11606 ("python-pytest-pep8" ,python-pytest-pep8)
11607 ("python-sphinx" ,python-sphinx)))
11608 (home-page "https://github.com/WoLpH/python-progressbar")
11609 (synopsis "Text progress bar library for Python")
11610 (description
11611 "This package provides a Python progressbar library to provide
11612 visual (yet text based) progress to long running operations.")
11613 (license license:bsd-3)))
11614
11615 (define-public python-progressbar33
11616 (package
11617 (name "python-progressbar33")
11618 (version "2.4")
11619 (source
11620 (origin
11621 (method url-fetch)
11622 (uri (pypi-uri "progressbar33" version))
11623 (sha256
11624 (base32
11625 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
11626 (build-system python-build-system)
11627 (home-page "https://github.com/germangh/python-progressbar")
11628 (synopsis "Text progress bar library for Python")
11629 (description
11630 "This package provides a text progress bar library for Python. This
11631 version only differs from the original @code{progressbar} package in that it
11632 uses relative package imports instead of absolute imports, which is necessary
11633 for the module to work under Python 3.3.")
11634 ;; Either or both of these licenses may be selected.
11635 (license (list license:lgpl2.1+ license:bsd-3))))
11636
11637 (define-public python-colorama
11638 (package
11639 (name "python-colorama")
11640 (version "0.4.4")
11641 (source
11642 (origin
11643 (method url-fetch)
11644 (uri (pypi-uri "colorama" version))
11645 (sha256
11646 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
11647 (build-system python-build-system)
11648 (synopsis "Colored terminal text rendering for Python")
11649 (description "Colorama is a Python library for rendering colored terminal
11650 text.")
11651 (home-page "https://pypi.org/project/colorama/")
11652 (license license:bsd-3)))
11653
11654 (define-public python2-colorama
11655 (package-with-python2 python-colorama))
11656
11657 (define-public python-moto
11658 (package
11659 (name "python-moto")
11660 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
11661 (version "1.3.16.dev134")
11662 (source (origin
11663 (method url-fetch)
11664 (uri (pypi-uri "moto" version))
11665 (sha256
11666 (base32
11667 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
11668 (build-system python-build-system)
11669 (arguments
11670 `(#:phases (modify-phases %standard-phases
11671 (add-after 'unpack 'patch-hardcoded-executable-names
11672 (lambda _
11673 (substitute* "moto/batch/models.py"
11674 (("/bin/sh")
11675 (which "sh")))
11676 (substitute* (find-files "tests" "\\.py$")
11677 (("#!/bin/bash")
11678 (string-append "#!" (which "bash"))))
11679 #t))
11680 (replace 'check
11681 (lambda _
11682 (setenv "PYTHONPATH" (string-append "./build/lib:"
11683 (getenv "PYTHONPATH")))
11684 (invoke "pytest" "-vv" "-m" "not network"
11685 ;; These tests require Docker.
11686 "-k" "not test_terminate_job \
11687 and not test_invoke_function_from_sqs_exception"))))))
11688 (native-inputs
11689 `(("python-flask" ,python-flask)
11690 ("python-flask-cors" ,python-flask-cors)
11691 ("python-freezegun" ,python-freezegun)
11692 ("python-parameterized" ,python-parameterized)
11693 ("python-pytest" ,python-pytest)
11694 ("python-sure" ,python-sure)))
11695 (propagated-inputs
11696 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
11697 ("python-boto" ,python-boto)
11698 ("python-boto3" ,python-boto3)
11699 ("python-botocore" ,python-botocore)
11700 ("python-cfn-lint" ,python-cfn-lint)
11701 ("python-cryptography" ,python-cryptography)
11702 ("python-dateutil" ,python-dateutil)
11703 ("python-docker" ,python-docker)
11704 ("python-idna" ,python-idna)
11705 ("python-jinja2" ,python-jinja2)
11706 ("python-jose" ,python-jose)
11707 ("python-jsondiff" ,python-jsondiff)
11708 ("python-mock" ,python-mock)
11709 ("python-pytz" ,python-pytz)
11710 ("python-pyyaml" ,python-pyyaml)
11711 ("python-requests" ,python-requests)
11712 ("python-responses" ,python-responses)
11713 ("python-six" ,python-six)
11714 ("python-sshpubkeys" ,python-sshpubkeys)
11715 ("python-werkzeug" ,python-werkzeug)
11716 ("python-xmltodict" ,python-xmltodict)))
11717 (home-page "https://github.com/spulec/moto")
11718 (synopsis "Mock out the boto library")
11719 (description
11720 "@code{moto} is a library designed to easily mock out the
11721 @code{boto} library.")
11722 (license license:asl2.0)))
11723
11724 (define-public python-rsa
11725 (package
11726 (name "python-rsa")
11727 (version "3.4.2")
11728 (source
11729 (origin
11730 (method url-fetch)
11731 (uri (pypi-uri "rsa" version))
11732 (sha256
11733 (base32
11734 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11735 (build-system python-build-system)
11736 (propagated-inputs
11737 `(("python-pyasn1" ,python-pyasn1)))
11738 (synopsis "Pure-Python RSA implementation")
11739 (description "Python-RSA is a pure-Python RSA implementation. It supports
11740 encryption and decryption, signing and verifying signatures, and key
11741 generation according to PKCS#1 version 1.5. It can be used as a Python
11742 library as well as on the command line.")
11743 (home-page "https://stuvel.eu/rsa")
11744 (license license:asl2.0)))
11745
11746 (define-public python2-rsa
11747 (package-with-python2 python-rsa))
11748
11749 (define-public python-pluggy
11750 (package
11751 (name "python-pluggy")
11752 (version "0.13.1")
11753 (source
11754 (origin
11755 (method url-fetch)
11756 (uri (pypi-uri "pluggy" version))
11757 (sha256
11758 (base32
11759 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11760 (build-system python-build-system)
11761 (native-inputs
11762 `(("python-setuptools-scm" ,python-setuptools-scm)))
11763 (synopsis "Plugin and hook calling mechanism for Python")
11764 (description "Pluggy is an extraction of the plugin manager as used by
11765 Pytest but stripped of Pytest specific details.")
11766 (home-page "https://pypi.org/project/pluggy/")
11767 (properties `((python2-variant . ,(delay python2-pluggy))))
11768 (license license:expat)))
11769
11770 (define-public python2-pluggy
11771 (let ((base (package-with-python2 (strip-python2-variant
11772 python-pluggy))))
11773 (package/inherit
11774 base
11775 (propagated-inputs
11776 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11777
11778 ;; This package requires python2-importlib-metadata, but that package
11779 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11780 ;; variant to solve the circular dependency.
11781 (define-public python2-pluggy-bootstrap
11782 (hidden-package
11783 (package/inherit
11784 python2-pluggy
11785 (name "python2-pluggy-bootstrap")
11786 (arguments
11787 `(#:tests? #f
11788 ,@(package-arguments python2-pluggy)))
11789 (propagated-inputs
11790 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11791
11792 (define-public python-plumbum
11793 (package
11794 (name "python-plumbum")
11795 (version "1.7.0")
11796 (source
11797 (origin
11798 (method url-fetch)
11799 (uri (pypi-uri "plumbum" version))
11800 (sha256
11801 (base32 "1kidj821k79dw064rlxh84xamb9h79ychg3pgj81jlvm5hs48xri"))))
11802 (build-system python-build-system)
11803 (arguments
11804 `(#:tests? #f)) ;no tests
11805 (native-inputs
11806 ;; XXX: Not actually used since there are no tests but required for
11807 ;; build.
11808 `(("python-pytest" ,python-pytest)))
11809 (home-page "https://plumbum.readthedocs.io")
11810 (synopsis "Python shell combinators library")
11811 (description
11812 "Plumbum is a library of tools for replacing shell scripts with Python
11813 code.")
11814 (license license:expat)))
11815
11816 (define-public python-deprecation
11817 (package
11818 (name "python-deprecation")
11819 (version "2.1.0")
11820 (source
11821 (origin
11822 (method url-fetch)
11823 (uri (pypi-uri "deprecation" version))
11824 (sha256
11825 (base32
11826 "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj"))))
11827 (build-system python-build-system)
11828 (propagated-inputs
11829 `(("python-packaging" ,python-packaging)))
11830 (native-inputs
11831 `(("python-unittest2" ,python-unittest2)))
11832 (home-page "https://deprecation.readthedocs.io/")
11833 (synopsis "Python library to handle automated deprecations")
11834 (description
11835 "This is a library that enables automated deprecations. It offers the
11836 @code{deprecated()} decorator to wrap functions, providing proper warnings
11837 both in documentation and via Python’s warnings system, as well as the
11838 @code{deprecation.fail_if_not_removed()} decorator for test methods to ensure
11839 that deprecated code is eventually removed.")
11840 (license license:asl2.0)))
11841
11842 (define-public python-tox
11843 (package
11844 (name "python-tox")
11845 (version "3.20.0")
11846 (source
11847 (origin
11848 (method url-fetch)
11849 (uri (pypi-uri "tox" version))
11850 (sha256
11851 (base32
11852 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11853 (build-system python-build-system)
11854 (arguments
11855 ;; FIXME: Tests require pytest-timeout, which itself requires
11856 ;; pytest>=2.8.0 for installation.
11857 '(#:tests? #f))
11858 (propagated-inputs
11859 `(("python-filelock" ,python-filelock)
11860 ("python-packaging" ,python-packaging)
11861 ("python-pluggy" ,python-pluggy)
11862 ("python-py" ,python-py)
11863 ("python-six" ,python-six)
11864 ("python-toml" ,python-toml)
11865 ("python-virtualenv" ,python-virtualenv)))
11866 (native-inputs
11867 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11868 ("python-pytest" ,python-pytest) ; >= 2.3.5
11869 ("python-setuptools-scm" ,python-setuptools-scm)))
11870 (home-page "https://tox.readthedocs.io")
11871 (synopsis "Virtualenv-based automation of test activities")
11872 (description "Tox is a generic virtualenv management and test command line
11873 tool. It can be used to check that a package installs correctly with
11874 different Python versions and interpreters, or run tests in each type of
11875 supported environment, or act as a frontend to continuous integration
11876 servers.")
11877 (license license:expat)))
11878
11879 (define-public python-jmespath
11880 (package
11881 (name "python-jmespath")
11882 (version "0.9.4")
11883 (source
11884 (origin
11885 (method url-fetch)
11886 (uri (pypi-uri "jmespath" version))
11887 (sha256
11888 (base32
11889 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11890 (build-system python-build-system)
11891 (native-inputs
11892 `(("python-nose" ,python-nose)))
11893 (synopsis "JSON Matching Expressions")
11894 (description "JMESPath (pronounced “james path”) is a Python library that
11895 allows one to declaratively specify how to extract elements from a JSON
11896 document.")
11897 (home-page "https://github.com/jmespath/jmespath.py")
11898 (license license:expat)))
11899
11900 (define-public python2-jmespath
11901 (package-with-python2 python-jmespath))
11902
11903 (define-public python-symengine
11904 (package
11905 (name "python-symengine")
11906 (version "0.6.1")
11907 (source
11908 (origin
11909 (method url-fetch)
11910 (uri (pypi-uri "symengine" version))
11911 (sha256
11912 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11913 (build-system python-build-system)
11914 (native-inputs
11915 `(("cmake" ,cmake)
11916 ("python-cython" ,python-cython)))
11917 (inputs
11918 `(("symengine" ,symengine)))
11919 (home-page "https://github.com/symengine/symengine.py")
11920 (synopsis "Python library providing wrappers to SymEngine")
11921 (description
11922 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11923 manipulation library.")
11924 (license license:expat)))
11925
11926 (define-public python-uncertainties
11927 (package
11928 (name "python-uncertainties")
11929 (version "3.1.5")
11930 (source
11931 (origin
11932 (method url-fetch)
11933 (uri (pypi-uri "uncertainties" version))
11934 (sha256
11935 (base32
11936 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
11937 (build-system python-build-system)
11938 ;; While there are test files, there is no "tests" directory, so the tests
11939 ;; fail.
11940 (arguments '(#:tests? #false))
11941 (propagated-inputs
11942 `(("python-future" ,python-future)))
11943 (native-inputs
11944 `(("python-nose" ,python-nose)
11945 ("python-numpy" ,python-numpy)))
11946 (home-page "https://uncertainties-python-package.readthedocs.io/")
11947 (synopsis "Calculations with uncertainties")
11948 (description
11949 "The uncertainties package transparently handles calculations with
11950 numbers with uncertainties. It can also yield the derivatives of any
11951 expression.")
11952 (license license:bsd-3)))
11953
11954 (define-public python-asteval
11955 (package
11956 (name "python-asteval")
11957 (version "0.9.23")
11958 (source
11959 (origin
11960 (method url-fetch)
11961 (uri (pypi-uri "asteval" version))
11962 (sha256
11963 (base32
11964 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
11965 (build-system python-build-system)
11966 (native-inputs
11967 `(("python-pytest" ,python-pytest)))
11968 (home-page "https://github.com/newville/asteval")
11969 (synopsis "Minimalistic evaluator of Python expressions")
11970 (description
11971 "This package provides a minimalistic evaluator of Python expression
11972 using the @code{ast} module")
11973 (license license:expat)))
11974
11975 (define-public python-lmfit
11976 (package
11977 (name "python-lmfit")
11978 (version "1.0.2")
11979 (source
11980 (origin
11981 (method url-fetch)
11982 (uri (pypi-uri "lmfit" version))
11983 (sha256
11984 (base32
11985 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
11986 (build-system python-build-system)
11987 (propagated-inputs
11988 `(("python-asteval" ,python-asteval)
11989 ("python-numpy" ,python-numpy)
11990 ("python-scipy" ,python-scipy)
11991 ("python-uncertainties" ,python-uncertainties)))
11992 (native-inputs
11993 `(("python-pytest" ,python-pytest)))
11994 (home-page "https://lmfit.github.io/lmfit-py/")
11995 (synopsis "Least-Squares minimization with bounds and constraints")
11996 (description
11997 "Lmfit provides a high-level interface to non-linear optimization and
11998 curve fitting problems for Python. It builds on and extends many of the
11999 optimization methods of @code{scipy.optimize}. Initially inspired by (and
12000 named for) extending the Levenberg-Marquardt method from
12001 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
12002 enhancements to optimization and data fitting problems.")
12003 (license license:bsd-3)))
12004
12005 (define-public python-boto
12006 (package
12007 (name "python-boto")
12008 (version "2.49.0")
12009 (source (origin
12010 (method url-fetch)
12011 (uri (pypi-uri "boto" version))
12012 (sha256
12013 (base32
12014 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
12015 (build-system python-build-system)
12016 (arguments
12017 ;; XXX: This package is unmaintained and has problems with newer versions
12018 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
12019 ;; subset of this library, so keep it around for now, but disable tests.
12020 '(#:tests? #f))
12021 (propagated-inputs
12022 `(("python-paramiko" ,python-paramiko)
12023 ("python-requests" ,python-requests)))
12024 (home-page "https://github.com/boto/boto")
12025 (synopsis "Python interfaces for Amazon Web Services")
12026 (description
12027 "This package provides various facilities for interacting with Amazon
12028 Web Services through Python.
12029
12030 This software is unmaintained, and new projects should use @code{boto3} instead.")
12031 (license license:expat)))
12032
12033 (define-public python-botocore
12034 ;; Note: When updating botocore, also make sure that boto3 and awscli
12035 ;; are compatible.
12036 (package
12037 (name "python-botocore")
12038 (version "1.19.22")
12039 (source
12040 (origin
12041 (method url-fetch)
12042 (uri (pypi-uri "botocore" version))
12043 (sha256
12044 (base32
12045 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
12046 (build-system python-build-system)
12047 (arguments
12048 ;; FIXME: Many tests are failing.
12049 '(#:tests? #f))
12050 (propagated-inputs
12051 `(("python-dateutil" ,python-dateutil)
12052 ("python-jmespath" ,python-jmespath)
12053 ("python-urllib3" ,python-urllib3)))
12054 (home-page "https://github.com/boto/botocore")
12055 (synopsis "Low-level interface to AWS")
12056 (description "Botocore is a Python library that provides a low-level
12057 interface to the Amazon Web Services (AWS) API.")
12058 (license license:asl2.0)))
12059
12060 (define-public python2-botocore
12061 (package-with-python2 python-botocore))
12062
12063 (define-public python-boto3
12064 (package
12065 (name "python-boto3")
12066 (version "1.16.22")
12067 (home-page "https://github.com/boto/boto3")
12068 (source (origin
12069 (method git-fetch)
12070 (uri (git-reference (url home-page) (commit version)))
12071 (file-name (git-file-name name version))
12072 (sha256
12073 (base32
12074 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
12075 (arguments
12076 `(#:phases
12077 (modify-phases %standard-phases
12078 (add-after 'unpack 'delete-network-tests
12079 ;; Deleting integration tests because they are trying to connect to AWS.
12080 (lambda _
12081 (delete-file-recursively "tests/integration")
12082 #t)))))
12083 (build-system python-build-system)
12084 (native-inputs
12085 `(("python-nose" ,python-nose)
12086 ("python-mock" ,python-mock)))
12087 (propagated-inputs
12088 `(("python-botocore" ,python-botocore)
12089 ("python-jmespath" ,python-jmespath)
12090 ("python-s3transfer" ,python-s3transfer)))
12091 (synopsis "AWS SDK for Python")
12092 (description
12093 "Boto3 is a Python library for writing programs that interact with
12094 @acronym{AWS,Amazon Web Services}.")
12095 (license license:asl2.0)))
12096
12097 (define-public python-pyfiglet
12098 (package
12099 (name "python-pyfiglet")
12100 (version "0.8.post1")
12101 (source
12102 (origin
12103 (method url-fetch)
12104 (uri (pypi-uri "pyfiglet" version))
12105 (sha256
12106 (base32
12107 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
12108 (build-system python-build-system)
12109 (home-page "https://github.com/pwaller/pyfiglet")
12110 (synopsis "Draw ASCII art big letters in Python")
12111 (description "This module lets you draw large letter from ordinary characters
12112 in pure Python.")
12113 (license license:expat)))
12114
12115 (define-public python-xdo
12116 (package
12117 (name "python-xdo")
12118 (version "0.3")
12119 (source (origin
12120 (method url-fetch)
12121 (uri (string-append
12122 "http://http.debian.net/debian/pool/main/p/python-xdo/"
12123 "python-xdo_" version ".orig.tar.gz"))
12124 (sha256
12125 (base32
12126 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
12127 (build-system python-build-system)
12128 (arguments
12129 '(#:phases
12130 (modify-phases %standard-phases
12131 (add-before 'install 'patch-libxdo-path
12132 ;; Hardcode the path of dynamically loaded libxdo library.
12133 (lambda* (#:key inputs #:allow-other-keys)
12134 (let ((libxdo (string-append
12135 (assoc-ref inputs "xdotool")
12136 "/lib/libxdo.so")))
12137 (substitute* "xdo/_xdo.py"
12138 (("find_library\\(\"xdo\"\\)")
12139 (simple-format #f "\"~a\"" libxdo)))
12140 #t))))
12141 #:tests? #f)) ; no tests provided
12142 (propagated-inputs
12143 `(("python-six" ,python-six)))
12144 (inputs
12145 `(("xdotool" ,xdotool)
12146 ("libX11" ,libx11)))
12147 (home-page "https://tracker.debian.org/pkg/python-xdo")
12148 (synopsis "Python library for simulating X11 keyboard/mouse input")
12149 (description "Provides bindings to libxdo for manipulating X11 via simulated
12150 input. (Note that this is mostly a legacy library; you may wish to look at
12151 python-xdo for newer bindings.)")
12152 (license license:bsd-3)))
12153
12154 (define-public python2-xdo
12155 (package-with-python2 python-xdo))
12156
12157 (define-public python-mako
12158 (package
12159 (name "python-mako")
12160 (version "1.1.3")
12161 (source
12162 (origin
12163 (method url-fetch)
12164 (uri (pypi-uri "Mako" version))
12165 (sha256
12166 (base32
12167 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
12168 (build-system python-build-system)
12169 (arguments
12170 `(#:phases (modify-phases %standard-phases
12171 (replace 'check
12172 (lambda* (#:key tests? #:allow-other-keys)
12173 (if tests?
12174 (invoke "nosetests" "-v")
12175 (format #t "test suite not run~%"))
12176 #t)))))
12177 (propagated-inputs
12178 `(("python-markupsafe" ,python-markupsafe)))
12179 (native-inputs
12180 `(("python-mock" ,python-mock)
12181 ("python-nose" ,python-nose)))
12182 (home-page "https://www.makotemplates.org/")
12183 (synopsis "Templating language for Python")
12184 (description "Mako is a templating language for Python that compiles
12185 templates into Python modules.")
12186 (license license:expat)))
12187
12188 (define-public python2-mako
12189 (package-with-python2 python-mako))
12190
12191 (define-public python-waitress
12192 (package
12193 (name "python-waitress")
12194 (version "1.1.0")
12195 (source
12196 (origin
12197 (method url-fetch)
12198 (uri (pypi-uri "waitress" version))
12199 (patches (search-patches "python-waitress-fix-tests.patch"))
12200 (sha256
12201 (base32
12202 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
12203 (build-system python-build-system)
12204 (home-page "https://github.com/Pylons/waitress")
12205 (synopsis "Waitress WSGI server")
12206 (description "Waitress is meant to be a production-quality pure-Python WSGI
12207 server with very acceptable performance.")
12208 (license license:zpl2.1)))
12209
12210 (define-public python2-waitress
12211 (package-with-python2 python-waitress))
12212
12213 (define-public python-whichcraft
12214 (package
12215 (name "python-whichcraft")
12216 (version "0.6.1")
12217 (source
12218 (origin
12219 (method url-fetch)
12220 (uri (pypi-uri "whichcraft" version))
12221 (sha256
12222 (base32
12223 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
12224 (build-system python-build-system)
12225 (native-inputs
12226 `(("python-pytest" ,python-pytest)))
12227 (home-page "https://github.com/pydanny/whichcraft")
12228 (synopsis "Cross-platform cross-python shutil.which functionality")
12229 (description
12230 "This package provides a shim of the shutil.which function that's
12231 designed to work across multiple versions of Python.")
12232 (license license:bsd-3)))
12233
12234 (define-public python-cookiecutter
12235 (package
12236 (name "python-cookiecutter")
12237 (version "1.7.2")
12238 (source
12239 (origin
12240 (method url-fetch)
12241 (uri (pypi-uri "cookiecutter" version))
12242 (sha256
12243 (base32
12244 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
12245 (build-system python-build-system)
12246 (native-inputs
12247 `(("python-freezegun" ,python-freezegun)
12248 ("python-pytest" ,python-pytest)
12249 ("python-pytest-catchlog" ,python-pytest-catchlog)
12250 ("python-pytest-cov" ,python-pytest-cov)
12251 ("python-pytest-mock" ,python-pytest-mock)))
12252 (propagated-inputs
12253 `(("python-binaryornot" ,python-binaryornot)
12254 ("python-click" ,python-click)
12255 ("python-future" ,python-future)
12256 ("python-jinja2" ,python-jinja2)
12257 ("python-jinja2-time" ,python-jinja2-time)
12258 ("python-poyo" ,python-poyo)
12259 ("python-requests" ,python-requests)
12260 ("python-slugify" ,python-slugify)
12261 ("python-text-unidecode" ,python-text-unidecode)
12262 ("python-whichcraft" ,python-whichcraft)))
12263 (home-page "https://github.com/cookiecutter/cookiecutter")
12264 (synopsis
12265 "Command-line utility that creates projects from project templates")
12266 (description
12267 "This package provides a command-line utility that creates projects from
12268 project templates, e.g. creating a Python package project from a Python package
12269 project template.")
12270 (license license:bsd-3)))
12271
12272 (define-public python-pyquery
12273 (package
12274 (name "python-pyquery")
12275 (version "1.2.17")
12276 (source
12277 (origin
12278 (method url-fetch)
12279 (uri (pypi-uri "pyquery" version))
12280 (sha256
12281 (base32
12282 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
12283 (build-system python-build-system)
12284 (native-inputs
12285 `(("python-webob" ,python-webob)
12286 ("python-webtest" ,python-webtest)))
12287 (propagated-inputs
12288 `(("python-lxml" ,python-lxml)
12289 ("python-cssselect" ,python-cssselect)))
12290 (home-page "https://github.com/gawel/pyquery")
12291 (synopsis "Make jQuery-like queries on xml documents")
12292 (description "pyquery allows you to make jQuery queries on xml documents.
12293 The API is as much as possible the similar to jQuery. pyquery uses lxml for
12294 fast xml and html manipulation.")
12295 (license license:bsd-3)))
12296
12297 (define-public python-anyjson
12298 (package
12299 (name "python-anyjson")
12300 (version "0.3.3")
12301 (source
12302 (origin
12303 (method url-fetch)
12304 (uri (pypi-uri "anyjson" version))
12305 (sha256
12306 (base32
12307 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
12308 (build-system python-build-system)
12309 (arguments
12310 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
12311 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
12312 ;; whatever) so this transformation needs to be done before the tests
12313 ;; can be run. Maybe we could add a build step to transform beforehand
12314 ;; but it could be annoying/difficult.
12315 ;; We can enable tests for the Python 2 version, though, and do below.
12316 #:tests? #f))
12317 (home-page "https://bitbucket.org/runeh/anyjson/")
12318 (synopsis
12319 "Wraps best available JSON implementation in a common interface")
12320 (description
12321 "Anyjson loads whichever is the fastest JSON module installed
12322 and provides a uniform API regardless of which JSON implementation is used.")
12323 (license license:bsd-3)
12324 (properties `((python2-variant . ,(delay python2-anyjson))))))
12325
12326 (define-public python2-anyjson
12327 (let ((anyjson (package-with-python2
12328 (strip-python2-variant python-anyjson))))
12329 (package/inherit anyjson
12330 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
12331 #:tests? #t
12332 ,@(package-arguments anyjson)))
12333 (native-inputs `(("python2-nose" ,python2-nose))))))
12334
12335 (define-public python-amqp
12336 (package
12337 (name "python-amqp")
12338 (version "2.3.2")
12339 (source
12340 (origin
12341 (method url-fetch)
12342 (uri (pypi-uri "amqp" version))
12343 (sha256
12344 (base32
12345 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
12346 (build-system python-build-system)
12347 (native-inputs
12348 `(("python-case" ,python-case)
12349 ("python-pytest-sugar" ,python-pytest-sugar)
12350 ("python-mock" ,python-mock)))
12351 (propagated-inputs
12352 `(("python-vine" ,python-vine)))
12353 (home-page "https://github.com/celery/py-amqp")
12354 (synopsis
12355 "Low-level AMQP client for Python (fork of amqplib)")
12356 (description
12357 "This is a fork of amqplib which was originally written by Barry Pederson.
12358 It is maintained by the Celery project, and used by kombu as a pure python
12359 alternative when librabbitmq is not available.")
12360 (license license:lgpl2.1+)
12361 (properties `((python2-variant . ,(delay python2-amqp))))))
12362
12363 (define-public python2-amqp
12364 (let ((amqp (package-with-python2
12365 (strip-python2-variant python-amqp))))
12366 (package/inherit amqp
12367 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
12368 ;; unmaintained. Weirdly, does not do this on the python 3
12369 ;; version?
12370 #:tests? #f
12371 ,@(package-arguments amqp))))))
12372
12373 (define-public python-txamqp
12374 (package
12375 (name "python-txamqp")
12376 (version "0.8.2")
12377 (source
12378 (origin
12379 (method url-fetch)
12380 (uri (pypi-uri "txAMQP" version))
12381 (sha256
12382 (base32
12383 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
12384 (build-system python-build-system)
12385 (propagated-inputs
12386 `(("python-six" ,python-six)
12387 ("python-twisted" ,python-twisted)))
12388 (home-page "https://github.com/txamqp/txamqp")
12389 (synopsis "Communicate with AMQP peers and brokers using Twisted")
12390 (description
12391 "This package provides a Python library for communicating with AMQP peers
12392 and brokers using the asynchronous networking framework Twisted. It contains
12393 all the necessary code to connect, send and receive messages to/from an
12394 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
12395 also includes support for using Thrift RPC over AMQP in Twisted
12396 applications.")
12397 (license license:asl2.0)))
12398
12399 (define-public python2-txamqp
12400 (package-with-python2 python-txamqp))
12401
12402 (define-public python-kombu
12403 (package
12404 (name "python-kombu")
12405 (version "4.2.2")
12406 (source
12407 (origin
12408 (method url-fetch)
12409 (uri (pypi-uri "kombu" version))
12410 (sha256
12411 (base32
12412 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
12413 (build-system python-build-system)
12414 (native-inputs
12415 `(("python-mock" ,python-mock)
12416 ("python-case" ,python-case)
12417 ("python-pyro4" ,python-pyro4)
12418 ("python-pytest-sugar" ,python-pytest-sugar)
12419 ("python-pytz" ,python-pytz)))
12420 (propagated-inputs
12421 `(("python-anyjson" ,python-anyjson)
12422 ("python-amqp" ,python-amqp)
12423 ("python-redis" ,python-redis)))
12424 (home-page "https://kombu.readthedocs.io")
12425 (synopsis "Message passing library for Python")
12426 (description "The aim of Kombu is to make messaging in Python as easy as
12427 possible by providing an idiomatic high-level interface for the AMQ protocol,
12428 and also provide proven and tested solutions to common messaging problems.
12429 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
12430 message orientation, queuing, routing, reliability and security, for which the
12431 RabbitMQ messaging server is the most popular implementation.")
12432 (license license:bsd-3)
12433 (properties `((python2-variant . ,(delay python2-kombu))))))
12434
12435 (define-public python2-kombu
12436 (let ((kombu (package-with-python2
12437 (strip-python2-variant python-kombu))))
12438 (package/inherit kombu
12439 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
12440 ;; It works fine on the python3 variant.
12441 #:tests? #f
12442 ,@(package-arguments kombu)))
12443 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12444 ,@(package-native-inputs kombu))))))
12445
12446 (define-public python-billiard
12447 (package
12448 (name "python-billiard")
12449 (version "3.5.0.5")
12450 (source
12451 (origin
12452 (method url-fetch)
12453 (uri (pypi-uri "billiard" version))
12454 (sha256
12455 (base32
12456 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
12457 (build-system python-build-system)
12458 (native-inputs
12459 `(("python-case" ,python-case)
12460 ("python-pytest" ,python-pytest)))
12461 (home-page "https://github.com/celery/billiard")
12462 (synopsis
12463 "Python multiprocessing fork with improvements and bugfixes")
12464 (description
12465 "Billiard is a fork of the Python 2.7 multiprocessing package. The
12466 multiprocessing package itself is a renamed and updated version of R Oudkerk's
12467 pyprocessing package. This standalone variant is intended to be compatible with
12468 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
12469 (license license:bsd-3)
12470 (properties `((python2-variant . ,(delay python2-billiard))))))
12471
12472 (define-public python2-billiard
12473 (let ((billiard (package-with-python2
12474 (strip-python2-variant python-billiard))))
12475 (package/inherit billiard
12476 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12477 ("python2-mock" ,python2-mock)
12478 ,@(package-native-inputs billiard))))))
12479
12480 (define-public python-celery
12481 (package
12482 (name "python-celery")
12483 (version "4.2.1")
12484 (source
12485 (origin
12486 (method url-fetch)
12487 (uri (pypi-uri "celery" version))
12488 (sha256
12489 (base32
12490 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
12491 (build-system python-build-system)
12492 (arguments
12493 '(;; TODO The tests fail with Python 3.7
12494 ;; https://github.com/celery/celery/issues/4849
12495 #:tests? #f
12496 #:phases
12497 (modify-phases %standard-phases
12498 (add-after 'unpack 'patch-requirements
12499 (lambda _
12500 (substitute* "requirements/test.txt"
12501 (("pytest>=3\\.0,<3\\.3")
12502 "pytest>=3.0"))
12503 #t)))))
12504 (native-inputs
12505 `(("python-case" ,python-case)
12506 ("python-pytest" ,python-pytest)))
12507 (propagated-inputs
12508 `(("python-pytz" ,python-pytz)
12509 ("python-billiard" ,python-billiard)
12510 ("python-kombu" ,python-kombu)))
12511 (home-page "https://celeryproject.org")
12512 (synopsis "Distributed Task Queue")
12513 (description "Celery is an asynchronous task queue/job queue based on
12514 distributed message passing. It is focused on real-time operation, but
12515 supports scheduling as well. The execution units, called tasks, are executed
12516 concurrently on a single or more worker servers using multiprocessing,
12517 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
12518 synchronously (wait until ready).")
12519 (license license:bsd-3)
12520 (properties `((python2-variant . ,(delay python2-celery))))))
12521
12522 (define-public python2-celery
12523 (let ((celery (package-with-python2
12524 (strip-python2-variant python-celery))))
12525 (package/inherit celery
12526 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12527 ("python2-mock" ,python2-mock)
12528 ,@(package-native-inputs celery))))))
12529
12530 (define-public python-translitcodec
12531 (package
12532 (name "python-translitcodec")
12533 (version "0.4.0")
12534 (source
12535 (origin
12536 (method url-fetch)
12537 (uri (pypi-uri "translitcodec" version))
12538 (sha256
12539 (base32
12540 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
12541 (build-system python-build-system)
12542 (arguments
12543 `(#:tests? #f)) ; no tests provided
12544 (home-page
12545 "https://github.com/claudep/translitcodec")
12546 (synopsis
12547 "Unicode to 8-bit charset transliteration codec")
12548 (description
12549 "This package contains codecs for transliterating ISO 10646 texts into
12550 best-effort representations using smaller coded character sets (ASCII,
12551 ISO 8859, etc.).")
12552 (license license:expat)))
12553
12554 (define-public python2-translitcodec
12555 (package-with-python2 python-translitcodec))
12556
12557 (define-public python-editor
12558 (package
12559 (name "python-editor")
12560 (version "1.0.4")
12561 (source
12562 (origin
12563 (method url-fetch)
12564 (uri (pypi-uri "python-editor" version))
12565 (sha256
12566 (base32
12567 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
12568 (build-system python-build-system)
12569 (arguments
12570 '(#:tests? #f)) ;XXX: needs a TTY and an editor
12571 (home-page "https://github.com/fmoo/python-editor")
12572 (synopsis "Programmatically open an editor, capture the result")
12573 (description
12574 "python-editor is a library that provides the editor module for
12575 programmatically interfacing with your system's $EDITOR.")
12576 (license license:asl2.0)))
12577
12578 (define-public python2-editor
12579 (package-with-python2 python-editor))
12580
12581 (define-public python-multiprocessing-logging
12582 (package
12583 (name "python-multiprocessing-logging")
12584 (version "0.3.1")
12585 (home-page "https://github.com/jruere/multiprocessing-logging")
12586 (source (origin
12587 (method git-fetch)
12588 (uri (git-reference
12589 (url home-page)
12590 (commit (string-append "v" version))))
12591 (file-name (git-file-name name version))
12592 (sha256
12593 (base32
12594 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
12595 (build-system python-build-system)
12596 (synopsis "Manage logs from multiple processes")
12597 (description
12598 "This Python module implements a multiprocessing-aware @code{Handler}
12599 that, when set on the root @code{Logger}, will tunnel log records to the
12600 main process so that they are handled correctly.")
12601 (license license:lgpl3+)))
12602
12603 (define-public python-vobject
12604 (package
12605 (name "python-vobject")
12606 (version "0.9.6.1")
12607 (source (origin
12608 (method url-fetch)
12609 (uri (pypi-uri "vobject" version))
12610 (sha256
12611 (base32
12612 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
12613 (build-system python-build-system)
12614 (arguments
12615 '(;; The test suite relies on some non-portable Windows interfaces.
12616 #:tests? #f))
12617 (propagated-inputs
12618 `(("python-dateutil" ,python-dateutil)
12619 ("python-pyicu" ,python-pyicu)))
12620 (synopsis "Parse and generate vCard and vCalendar files")
12621 (description "Vobject is intended to be a full featured Python package for
12622 parsing and generating vCard and vCalendar files. Currently, iCalendar files
12623 are supported and well tested. vCard 3.0 files are supported, and all data
12624 should be imported, but only a few components are understood in a sophisticated
12625 way.")
12626 (home-page "https://eventable.github.io/vobject/")
12627 (license license:asl2.0)))
12628
12629 (define-public python2-vobject
12630 (package-with-python2 python-vobject))
12631
12632 (define-public python-munkres
12633 (package
12634 (name "python-munkres")
12635 (version "1.0.8")
12636 (source (origin
12637 (method url-fetch)
12638 (uri (pypi-uri "munkres" version))
12639 (sha256
12640 (base32
12641 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
12642 (build-system python-build-system)
12643 (arguments
12644 '(#:tests? #f)) ; no test suite
12645 (home-page "https://software.clapper.org/munkres/")
12646 (synopsis "Implementation of the Munkres algorithm")
12647 (description "The Munkres module provides an implementation of the Munkres
12648 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
12649 useful for solving the Assignment Problem.")
12650 (license license:bsd-3)))
12651
12652 (define-public python2-munkres
12653 (package-with-python2 python-munkres))
12654
12655 (define-public python-whoosh
12656 (package
12657 (name "python-whoosh")
12658 (version "2.7.4")
12659 (source
12660 (origin
12661 (method url-fetch)
12662 (uri (pypi-uri "Whoosh" version))
12663 (sha256
12664 (base32
12665 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
12666 (build-system python-build-system)
12667 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
12668 (native-inputs
12669 `(("python-pytest" ,python-pytest)))
12670 (home-page "https://bitbucket.org/mchaput/whoosh")
12671 (synopsis "Full text indexing, search, and spell checking library")
12672 (description
12673 "Whoosh is a fast, pure-Python full text indexing, search, and spell
12674 checking library.")
12675 (license license:bsd-2)))
12676
12677 (define-public python2-whoosh
12678 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
12679 (package/inherit whoosh
12680 (propagated-inputs
12681 `(("python2-backport-ssl-match-hostname"
12682 ,python2-backport-ssl-match-hostname)
12683 ,@(package-propagated-inputs whoosh))))))
12684
12685 (define-public python-pathlib
12686 (package
12687 (name "python-pathlib")
12688 (version "1.0.1")
12689 (source (origin
12690 (method url-fetch)
12691 (uri (pypi-uri "pathlib" version))
12692 (sha256
12693 (base32
12694 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
12695 (build-system python-build-system)
12696 ;; The tests depend on the internal "test" module, which does not provide
12697 ;; a stable interface.
12698 (arguments `(#:tests? #f))
12699 (home-page "https://pathlib.readthedocs.org/")
12700 (synopsis "Object-oriented file system paths")
12701 (description "Pathlib offers a set of classes to handle file system paths.
12702 It offers the following advantages over using string objects:
12703
12704 @enumerate
12705 @item No more cumbersome use of os and os.path functions. Everything can
12706 be done easily through operators, attribute accesses, and method calls.
12707 @item Embodies the semantics of different path types. For example,
12708 comparing Windows paths ignores casing.
12709 @item Well-defined semantics, eliminating any inconsistencies or
12710 ambiguities (forward vs. backward slashes, etc.).
12711 @end enumerate
12712
12713 Note: In Python 3.4, pathlib is now part of the standard library. For other
12714 Python versions please consider python-pathlib2 instead, which tracks the
12715 standard library module. This module (python-pathlib) isn't maintained
12716 anymore.")
12717 (license license:expat)))
12718
12719 (define-public python2-pathlib
12720 (package-with-python2 python-pathlib))
12721
12722 (define-public python2-pathlib2
12723 (package
12724 (name "python2-pathlib2")
12725 (version "2.3.5")
12726 (source (origin
12727 (method url-fetch)
12728 (uri (pypi-uri "pathlib2" version))
12729 (sha256
12730 (base32
12731 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
12732 (build-system python-build-system)
12733 ;; We only need the the Python 2 variant, since for Python 3 our minimum
12734 ;; version is 3.4 which already includes this package as part of the
12735 ;; standard library.
12736 (arguments
12737 `(#:python ,python-2))
12738 (propagated-inputs
12739 `(("python2-scandir" ,python2-scandir)
12740 ("python2-six" ,python2-six)))
12741 (home-page "https://pypi.org/project/pathlib2/")
12742 (synopsis "Object-oriented file system paths - backport of standard
12743 pathlib module")
12744 (description "The goal of pathlib2 is to provide a backport of standard
12745 pathlib module which tracks the standard library module, so all the newest
12746 features of the standard pathlib can be used also on older Python versions.
12747
12748 Pathlib offers a set of classes to handle file system paths. It offers the
12749 following advantages over using string objects:
12750
12751 @enumerate
12752 @item No more cumbersome use of os and os.path functions. Everything can
12753 be done easily through operators, attribute accesses, and method calls.
12754 @item Embodies the semantics of different path types. For example,
12755 comparing Windows paths ignores casing.
12756 @item Well-defined semantics, eliminating any inconsistencies or
12757 ambiguities (forward vs. backward slashes, etc.).
12758 @end enumerate")
12759 (license license:expat)))
12760
12761 (define-public python2-pathlib2-bootstrap
12762 (hidden-package
12763 (package
12764 (inherit python2-pathlib2)
12765 (name "python2-pathlib2-bootstrap")
12766 (propagated-inputs
12767 `(("python2-scandir" ,python2-scandir)
12768 ("python2-six" ,python2-six-bootstrap))))))
12769
12770 (define-public python-jellyfish
12771 (package
12772 (name "python-jellyfish")
12773 (version "0.5.6")
12774 (source (origin
12775 (method url-fetch)
12776 (uri (pypi-uri "jellyfish" version))
12777 (sha256
12778 (base32
12779 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
12780 (build-system python-build-system)
12781 (native-inputs
12782 `(("python-pytest" ,python-pytest)))
12783 (home-page "https://github.com/jamesturk/jellyfish")
12784 (synopsis "Approximate and phonetic matching of strings")
12785 (description "Jellyfish uses a variety of string comparison and phonetic
12786 encoding algorithms to do fuzzy string matching.")
12787 (license license:bsd-2)
12788 (properties `((python2-variant . ,(delay python2-jellyfish))))))
12789
12790 (define-public python2-jellyfish
12791 (let ((jellyfish (package-with-python2
12792 (strip-python2-variant python-jellyfish))))
12793 (package/inherit jellyfish
12794 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
12795 ,@(package-native-inputs jellyfish))))))
12796
12797 (define-public python2-unicodecsv
12798 (package
12799 (name "python2-unicodecsv")
12800 (version "0.14.1")
12801 (source (origin
12802 (method git-fetch)
12803 ;; The test suite is not included in the PyPi release.
12804 ;; https://github.com/jdunck/python-unicodecsv/issues/19
12805 (uri (git-reference
12806 (url "https://github.com/jdunck/python-unicodecsv")
12807 (commit version)))
12808 (file-name (git-file-name name version))
12809 (sha256
12810 (base32
12811 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
12812 (build-system python-build-system)
12813 (arguments
12814 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
12815 #:python ,python-2))
12816 (native-inputs
12817 `(("python2-unittest2" ,python2-unittest2)))
12818 (home-page "https://github.com/jdunck/python-unicodecsv")
12819 (synopsis "Unicode CSV module for Python 2")
12820 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
12821 module, adding support for Unicode strings.")
12822 (license license:bsd-2)))
12823
12824 (define-public python-pdfminer-six
12825 (package
12826 (name "python-pdfminer-six")
12827 (version "20201018")
12828 ;; There are no tests in the PyPI tarball.
12829 (source
12830 (origin
12831 (method git-fetch)
12832 (uri (git-reference
12833 (url "https://github.com/pdfminer/pdfminer.six")
12834 (commit version)))
12835 (file-name (git-file-name name version))
12836 (sha256
12837 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
12838 (build-system python-build-system)
12839 (arguments
12840 `(#:phases
12841 (modify-phases %standard-phases
12842 ;; Tests write to the source tree.
12843 (add-after 'unpack 'make-git-checkout-writable
12844 (lambda _
12845 (for-each make-file-writable (find-files "."))
12846 #t))
12847 (replace 'check
12848 (lambda _
12849 (invoke "make" "test")))
12850 (add-before 'reset-gzip-timestamps 'make-files-writable
12851 (lambda* (#:key outputs #:allow-other-keys)
12852 (let ((out (assoc-ref outputs "out")))
12853 (for-each make-file-writable
12854 (find-files out "\\.gz$"))
12855 #t))))))
12856 (propagated-inputs
12857 `(("python-chardet" ,python-chardet)
12858 ("python-cryptography" ,python-cryptography)
12859 ("python-sortedcontainers" ,python-sortedcontainers)))
12860 (native-inputs
12861 `(("python-nose" ,python-nose)
12862 ("python-tox" ,python-tox)))
12863 (home-page "https://github.com/pdfminer/pdfminer.six")
12864 (synopsis "PDF parser and analyzer")
12865 (description "@code{pdfminer.six} is a community maintained fork of
12866 the original PDFMiner. It is a tool for extracting information from PDF
12867 documents. It focuses on getting and analyzing text data. Pdfminer.six
12868 extracts the text from a page directly from the sourcecode of the PDF. It
12869 can also be used to get the exact location, font or color of the text.")
12870 (license license:expat)))
12871
12872 (define-public python-rarfile
12873 (package
12874 (name "python-rarfile")
12875 (version "2.8")
12876 (source (origin
12877 (method url-fetch)
12878 (uri (pypi-uri "rarfile" version))
12879 (sha256
12880 (base32
12881 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
12882 (build-system python-build-system)
12883 (arguments
12884 '(#:phases
12885 (modify-phases %standard-phases
12886 (replace 'check
12887 ;; Many tests fail, but the installation proceeds.
12888 (lambda _ (invoke "make" "-C" "test" "test"))))))
12889 (native-inputs
12890 `(("which" ,which))) ; required for tests
12891 (propagated-inputs
12892 `(("libarchive" ,libarchive)))
12893 (home-page "https://github.com/markokr/rarfile")
12894 (synopsis "RAR archive reader for Python")
12895 (description "This is Python module for RAR archive reading. The interface
12896 is made as zipfile like as possible.")
12897 (license license:isc)))
12898
12899 (define-public python2-rarfile
12900 (package-with-python2 python-rarfile))
12901
12902 (define-public python-magic
12903 (package
12904 (name "python-magic")
12905 (version "0.4.15")
12906 (source
12907 (origin
12908 (method url-fetch)
12909 (uri (pypi-uri "python-magic" version))
12910 (sha256
12911 (base32
12912 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
12913 (file-name (string-append name "-" version "-checkout"))))
12914 (build-system python-build-system)
12915 (arguments
12916 ;; The tests are unreliable, so don't run them. The tests fail
12917 ;; under Python3 because they were written for Python2 and
12918 ;; contain import statements that do not work in Python3. One of
12919 ;; the tests fails under Python2 because its assertions are
12920 ;; overly stringent; it relies on comparing output strings which
12921 ;; are brittle and can change depending on the version of
12922 ;; libmagic being used and the system on which the test is
12923 ;; running. In my case, under GuixSD 0.10.0, only one test
12924 ;; failed, and it seems to have failed only because the version
12925 ;; of libmagic that is packaged in Guix outputs a slightly
12926 ;; different (but not wrong) string than the one that the test
12927 ;; expected.
12928 '(#:tests? #f
12929 #:phases (modify-phases %standard-phases
12930 ;; Replace a specific method call with a hard-coded
12931 ;; path to the necessary libmagic.so file in the
12932 ;; store. If we don't do this, then the method call
12933 ;; will fail to find the libmagic.so file, which in
12934 ;; turn will cause any application using
12935 ;; python-magic to fail.
12936 (add-before 'build 'hard-code-path-to-libmagic
12937 (lambda* (#:key inputs #:allow-other-keys)
12938 (let ((file (assoc-ref inputs "file")))
12939 (substitute* "magic.py"
12940 (("ctypes.util.find_library\\('magic'\\)")
12941 (string-append "'" file "/lib/libmagic.so'")))
12942 #t)))
12943 (add-before 'install 'disable-egg-compression
12944 (lambda _
12945 (let ((port (open-file "setup.cfg" "a")))
12946 (display "\n[easy_install]\nzip_ok = 0\n"
12947 port)
12948 (close-port port)
12949 #t))))))
12950 (inputs
12951 ;; python-magic needs to be able to find libmagic.so.
12952 `(("file" ,file)))
12953 (home-page
12954 "https://github.com/ahupp/python-magic")
12955 (synopsis
12956 "File type identification using libmagic")
12957 (description
12958 "This module uses ctypes to access the libmagic file type
12959 identification library. It makes use of the local magic database and
12960 supports both textual and MIME-type output. Note that this module and
12961 the python-file module both provide a \"magic.py\" file; these two
12962 modules, which are different and were developed separately, both serve
12963 the same purpose: to provide Python bindings for libmagic.")
12964 (license license:expat)))
12965
12966 (define-public python2-magic
12967 (package-with-python2 python-magic))
12968
12969 (define-public python2-s3cmd
12970 (package
12971 (name "python2-s3cmd")
12972 (version "1.6.1")
12973 (source
12974 (origin
12975 (method url-fetch)
12976 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12977 "s3cmd-" version ".tar.gz"))
12978 (sha256
12979 (base32
12980 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12981 (build-system python-build-system)
12982 (arguments
12983 ;; s3cmd is written for python2 only and contains no tests.
12984 `(#:python ,python-2
12985 #:tests? #f))
12986 (propagated-inputs
12987 `(("python2-dateutil" ,python2-dateutil)
12988 ;; The python-file package also provides a magic.py module.
12989 ;; This is an unfortunate state of affairs; however, s3cmd
12990 ;; fails to install if it cannot find specifically the
12991 ;; python-magic package. Thus we include it, instead of using
12992 ;; python-file. Ironically, s3cmd sometimes works better
12993 ;; without libmagic bindings at all:
12994 ;; https://github.com/s3tools/s3cmd/issues/198
12995 ("python2-magic" ,python2-magic)))
12996 (home-page "https://s3tools.org/s3cmd")
12997 (synopsis "Command line tool for S3-compatible storage services")
12998 (description
12999 "S3cmd is a command line tool for uploading, retrieving and managing data
13000 in storage services that are compatible with the Amazon Simple Storage
13001 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
13002 GnuPG encryption, and more. It also supports management of Amazon's
13003 CloudFront content delivery network.")
13004 (license license:gpl2+)))
13005
13006 (define-public python-pkgconfig
13007 (package
13008 (name "python-pkgconfig")
13009 (version "1.3.1")
13010 (source
13011 (origin
13012 (method url-fetch)
13013 (uri (pypi-uri "pkgconfig" version))
13014 (sha256
13015 (base32
13016 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
13017 (build-system python-build-system)
13018 (native-inputs
13019 `(("python-nose" ,python-nose)))
13020 (inputs
13021 `(("pkg-config" ,pkg-config)))
13022 (arguments
13023 `(#:phases
13024 (modify-phases %standard-phases
13025 (add-before 'build 'patch
13026 ;; Hard-code the path to pkg-config.
13027 (lambda _
13028 (substitute* "pkgconfig/pkgconfig.py"
13029 (("cmd = 'pkg-config")
13030 (string-append "cmd = '" (which "pkg-config"))))
13031 #t))
13032 (replace 'check
13033 (lambda _
13034 (invoke "nosetests" "test.py"))))))
13035 (home-page "https://github.com/matze/pkgconfig")
13036 (synopsis "Python interface for pkg-config")
13037 (description "This module provides a Python interface to pkg-config. It
13038 can be used to find all pkg-config packages, check if a package exists,
13039 check if a package meets certain version requirements, query CFLAGS and
13040 LDFLAGS and parse the output to build extensions with setup.py.")
13041 (license license:expat)))
13042
13043 (define-public python2-pkgconfig
13044 (package-with-python2 python-pkgconfig))
13045
13046 (define-public python-bz2file
13047 (package
13048 (name "python-bz2file")
13049 (version "0.98")
13050 (source
13051 (origin
13052 (method url-fetch)
13053 (uri (pypi-uri "bz2file" version))
13054 (sha256
13055 (base32
13056 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
13057 (build-system python-build-system)
13058 (arguments
13059 `(#:tests? #f)) ; Tests use deprecated python modules.
13060 (home-page "https://github.com/nvawda/bz2file")
13061 (synopsis "Read and write bzip2-compressed files")
13062 (description
13063 "Bz2file is a Python library for reading and writing bzip2-compressed
13064 files. It contains a drop-in replacement for the I/O interface in the
13065 standard library's @code{bz2} module, including features from the latest
13066 development version of CPython that are not available in older releases.")
13067 (license license:asl2.0)))
13068
13069 (define-public python2-bz2file
13070 (package-with-python2 python-bz2file))
13071
13072 (define-public python-future
13073 (package
13074 (name "python-future")
13075 (version "0.17.1")
13076 (source
13077 (origin
13078 (method url-fetch)
13079 (uri (pypi-uri "future" version))
13080 (sha256
13081 (base32
13082 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
13083 (build-system python-build-system)
13084 ;; Many tests connect to the network or are otherwise flawed.
13085 ;; https://github.com/PythonCharmers/python-future/issues/210
13086 (arguments
13087 `(#:tests? #f))
13088 (home-page "https://python-future.org")
13089 (synopsis "Single-source support for Python 3 and 2")
13090 (description
13091 "@code{python-future} is the missing compatibility layer between Python 2 and
13092 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
13093 to support both Python 2 and Python 3 with minimal overhead.")
13094 (license license:expat)))
13095
13096 (define-public python2-future
13097 (package-with-python2 python-future))
13098
13099 (define-public python-cysignals
13100 (package
13101 (name "python-cysignals")
13102 (version "1.9.0")
13103 (source
13104 (origin
13105 (method url-fetch)
13106 (uri (pypi-uri "cysignals" version))
13107 (sha256
13108 (base32
13109 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
13110 (build-system python-build-system)
13111 (native-inputs
13112 `(("python-cython" ,python-cython)
13113 ("python-sphinx" ,python-sphinx)))
13114 (inputs
13115 `(("pari-gp" ,pari-gp)))
13116 (arguments
13117 `(#:modules ((guix build python-build-system)
13118 ((guix build gnu-build-system) #:prefix gnu:)
13119 (guix build utils))
13120 ;; FIXME: Tests are executed after installation and currently fail
13121 ;; when not installing into standard locations; the author is working
13122 ;; on a fix.
13123 #:tests? #f
13124 #:phases
13125 (modify-phases %standard-phases
13126 (add-before
13127 'build 'configure
13128 (assoc-ref gnu:%standard-phases 'configure)))))
13129 (home-page
13130 "https://github.com/sagemath/cysignals")
13131 (synopsis
13132 "Handling of interrupts and signals for Cython")
13133 (description
13134 "The cysignals package provides mechanisms to handle interrupts (and
13135 other signals and errors) in Cython code, using two related approaches,
13136 for mixed Cython/Python code or external C libraries and pure Cython code,
13137 respectively.")
13138 (license license:lgpl3+)))
13139
13140 (define-public python2-cysignals
13141 (package-with-python2 python-cysignals))
13142
13143 (define-public python2-shedskin
13144 (package
13145 (name "python2-shedskin")
13146 (version "0.9.4")
13147 (source
13148 (origin
13149 (method url-fetch)
13150 (uri (string-append "https://github.com/shedskin/shedskin/"
13151 "releases/download/v" version
13152 "/shedskin-" version ".tgz"))
13153 (sha256
13154 (base32
13155 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
13156 (build-system python-build-system)
13157 (arguments
13158 `(#:python ,python-2
13159 #:phases (modify-phases %standard-phases
13160 (add-after 'unpack 'fix-resulting-include-libs
13161 (lambda* (#:key inputs #:allow-other-keys)
13162 (let ((libgc (assoc-ref inputs "libgc"))
13163 (pcre (assoc-ref inputs "pcre")))
13164 (substitute* "shedskin/makefile.py"
13165 (("variable == 'CCFLAGS':[ ]*")
13166 (string-append "variable == 'CCFLAGS':\n"
13167 " line += ' -I " pcre "/include"
13168 " -I " libgc "/include'"))
13169 (("variable == 'LFLAGS':[ ]*")
13170 (string-append "variable == 'LFLAGS':\n"
13171 " line += ' -L" pcre "/lib"
13172 " -L " libgc "/lib'")))
13173 #t))))))
13174 (inputs `(("pcre" ,pcre)
13175 ("libgc" ,libgc)))
13176 (home-page "https://shedskin.github.io/")
13177 (synopsis "Experimental Python-2 to C++ Compiler")
13178 (description (string-append "This is an experimental compiler for a subset of
13179 Python. It generates C++ code and a Makefile."))
13180 (license (list license:gpl3 license:bsd-3 license:expat))))
13181
13182 (define-public python2-rope
13183 (package
13184 (name "python2-rope")
13185 (version "0.11.0")
13186 (source
13187 (origin
13188 (method url-fetch)
13189 (uri (pypi-uri "rope" version))
13190 (sha256
13191 (base32
13192 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
13193 (arguments
13194 ;; Rope has only partial python3 support, see `python-rope'
13195 `(#:python ,python-2))
13196 (build-system python-build-system)
13197 (native-inputs
13198 `(("python2-unittest2" ,python2-unittest2)))
13199 (home-page "https://github.com/python-rope/rope")
13200 (synopsis "Refactoring library for Python")
13201 (description "Rope is a refactoring library for Python. It facilitates
13202 the renaming, moving and extracting of attributes, functions, modules, fields
13203 and parameters in Python 2 source code. These refactorings can also be applied
13204 to occurrences in strings and comments.")
13205 (license license:gpl2)))
13206
13207 (define-public python-rope
13208 (package/inherit python2-rope
13209 (name "python-rope")
13210 (arguments `(#:python ,python-wrapper
13211 ;; XXX: Only partial python3 support, results in some failing
13212 ;; tests: <https://github.com/python-rope/rope/issues/247>.
13213 #:tests? #f))
13214 (properties `((python2-variant . ,(delay python2-rope))))))
13215
13216 (define-public python-py3status
13217 (package
13218 (name "python-py3status")
13219 (version "3.21")
13220 (source
13221 (origin
13222 (method url-fetch)
13223 (uri (pypi-uri "py3status" version))
13224 (sha256
13225 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
13226 (build-system python-build-system)
13227 (inputs
13228 `(("file" ,file)))
13229 (arguments
13230 '(#:phases
13231 (modify-phases %standard-phases
13232 ;; 'file' is used for detection of configuration file encoding
13233 ;; let's make link the dependency to particular input
13234 (add-before 'build 'patch-file-path
13235 (lambda* (#:key inputs #:allow-other-keys)
13236 (let ((file-path (assoc-ref inputs "file")))
13237 (substitute* "py3status/parse_config.py"
13238 (("\\[\"file\", \"-b\"")
13239 (string-append "['" file-path "/bin/file', '-b'")))
13240 #t))))
13241 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
13242 (home-page "https://github.com/ultrabug/py3status")
13243 (synopsis "Extensible i3status wrapper written in Python")
13244 (description "py3status is an i3status wrapper which extends i3status
13245 functionality in a modular way, allowing you to extend your panel with your
13246 own code, responding to click events and updating clock every second.")
13247 (license license:bsd-3)))
13248
13249 (define-public python2-selectors2
13250 (package
13251 (name "python2-selectors2")
13252 (version "2.0.1")
13253 (source (origin
13254 (method url-fetch)
13255 (uri (pypi-uri "selectors2" version))
13256 (sha256
13257 (base32
13258 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
13259 (build-system python-build-system)
13260 (arguments
13261 `(#:python ,python-2))
13262 (native-inputs
13263 `(("python2-mock" ,python2-mock)
13264 ("python2-psutil" ,python2-psutil)))
13265 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
13266 (synopsis "Backport of the selectors module from Python 3.5+")
13267 (description
13268 "This package provides a drop-in replacement for the @code{selectors}
13269 module in Python 3.5 and later.")
13270 (license license:expat)))
13271
13272 (define-public python-tblib
13273 (package
13274 (name "python-tblib")
13275 (version "1.6.0")
13276 (source (origin
13277 (method url-fetch)
13278 (uri (pypi-uri "tblib" version))
13279 (sha256
13280 (base32
13281 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
13282 (build-system python-build-system)
13283 (arguments
13284 `(#:phases
13285 (modify-phases %standard-phases
13286 (replace 'check
13287 (lambda _
13288 ;; Upstream runs tests after installation and the package itself
13289 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
13290 ;; found.
13291 (setenv "PYTHONPATH"
13292 (string-append (getcwd) "/build/lib:"
13293 (getenv "PYTHONPATH")))
13294 (invoke "py.test" "-vv" "tests" "README.rst"))))))
13295 (native-inputs
13296 `(("python-pytest" ,python-pytest)
13297 ("python-six" ,python-six)))
13298 (home-page "https://github.com/ionelmc/python-tblib")
13299 (synopsis "Traceback serialization library")
13300 (description
13301 "Traceback serialization allows you to:
13302
13303 @enumerate
13304 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
13305 different processes. This allows better error handling when running code over
13306 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
13307
13308 @item Parse traceback strings and raise with the parsed tracebacks.
13309 @end enumerate\n")
13310 (license license:bsd-3)))
13311
13312 (define-public python2-tblib
13313 (package-with-python2 python-tblib))
13314
13315 (define-public python-greenlet
13316 (package
13317 (name "python-greenlet")
13318 (version "1.0.0")
13319 (source (origin
13320 (method url-fetch)
13321 (uri (pypi-uri "greenlet" version))
13322 (sha256
13323 (base32
13324 "1y6wbg9yhm9dw6m768n4yslp56h85pnxkk3drz6icn15g6f1d7ki"))))
13325 (build-system python-build-system)
13326 (home-page "https://greenlet.readthedocs.io/")
13327 (synopsis "Lightweight in-process concurrent programming")
13328 (description
13329 "Greenlet package is a spin-off of Stackless, a version of CPython
13330 that supports micro-threads called \"tasklets\". Tasklets run
13331 pseudo-concurrently (typically in a single or a few OS-level threads) and
13332 are synchronized with data exchanges on \"channels\".")
13333 (license (list license:psfl license:expat))))
13334
13335 (define-public python-objgraph
13336 (package
13337 (name "python-objgraph")
13338 (version "3.4.1")
13339 (source
13340 (origin
13341 (method url-fetch)
13342 (uri (pypi-uri "objgraph" version))
13343 (sha256
13344 (base32
13345 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
13346 (build-system python-build-system)
13347 (propagated-inputs
13348 `(("python-graphviz" ,python-graphviz)))
13349 (native-inputs
13350 `(("python-mock" ,python-mock)
13351 ("graphviz" ,graphviz)))
13352 (home-page "https://mg.pov.lt/objgraph/")
13353 (synopsis "Draw Python object reference graphs with graphviz")
13354 (description
13355 "This package provides tools to draw Python object reference graphs with
13356 graphviz.")
13357 (license license:expat)))
13358
13359 (define-public python2-objgraph
13360 (package-with-python2 python-objgraph))
13361
13362 (define-public python-gevent
13363 (package
13364 (name "python-gevent")
13365 (version "21.1.2")
13366 (source (origin
13367 (method url-fetch)
13368 (uri (pypi-uri "gevent" version))
13369 (sha256
13370 (base32
13371 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
13372 (modules '((guix build utils)))
13373 (snippet
13374 '(begin
13375 ;; unbunding libev and c-ares
13376 (delete-file-recursively "deps")))))
13377 (build-system python-build-system)
13378 (arguments
13379 `(#:modules ((ice-9 ftw)
13380 (ice-9 match)
13381 (srfi srfi-26)
13382 (guix build utils)
13383 (guix build python-build-system))
13384 #:phases (modify-phases %standard-phases
13385 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
13386 (lambda _
13387 (substitute* "src/gevent/subprocess.py"
13388 (("/bin/sh") (which "sh")))
13389 (for-each (lambda (file)
13390 (substitute* file
13391 (("/bin/sh") (which "sh"))
13392 (("/bin/true") (which "true"))))
13393 (find-files "src/greentest" "\\.py$"))))
13394 (add-before 'build 'do-not-use-bundled-sources
13395 (lambda _
13396 (setenv "GEVENTSETUP_EMBED" "0")
13397
13398 ;; Prevent building bundled libev.
13399 (substitute* "setup.py"
13400 (("run_make=_BUILDING")
13401 "run_make=False"))))
13402 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
13403 (lambda* (#:key inputs #:allow-other-keys)
13404 (let ((greenlet (string-append
13405 (assoc-ref inputs "python-greenlet")
13406 "/include")))
13407 (match (scandir greenlet
13408 (lambda (item)
13409 (string-prefix? "python" item)))
13410 ((python)
13411 (setenv "C_INCLUDE_PATH"
13412 (string-append greenlet "/" python ":"
13413 (or (getenv "C_INCLUDE_PATH")
13414 ""))))))))
13415 (add-before 'check 'pretend-to-be-CI
13416 (lambda _
13417 ;; A few tests are skipped due to network constraints or
13418 ;; get longer timeouts when running in a CI environment.
13419 ;; Piggy-back on that, as we need the same adjustments.
13420 (setenv "TRAVIS" "1")
13421 (setenv "APPVEYOR" "1")))
13422 (add-before 'check 'adjust-tests
13423 (lambda _
13424 (let ((disabled-tests
13425 '(;; These tests relies on networking which is
13426 ;; not available in the build container.
13427 "test__getaddrinfo_import.py"
13428 "test__server_pywsgi.py"
13429 ;; XXX: These tests borrow functionality from the
13430 ;; Python builtin 'test' module, but it is not
13431 ;; installed with the Guix Python distribution.
13432 "test_smtpd.py"
13433 "test_wsgiref.py"
13434 "test_urllib2.py"
13435 "test_thread.py"
13436 "test_threading.py"
13437 "test__threading_2.py"
13438 ;; These tests rely on KeyboardInterrupts which do not
13439 ;; work inside the build container for some reason
13440 ;; (lack of controlling terminal?).
13441 "test_subprocess.py"
13442 "test__issues461_471.py"
13443 ;; TODO: Patch out the tests that use getprotobyname, etc
13444 ;; instead of disabling all the tests from these files.
13445 "test__resolver_dnspython.py"
13446 "test__doctests.py"
13447 "test__all__.py"
13448 "test___config.py"
13449 "test__execmodules.py")))
13450 (call-with-output-file "skipped_tests.txt"
13451 (lambda (port)
13452 (format port "~a~%"
13453 (string-join disabled-tests "\n")))))))
13454 (replace 'check
13455 (lambda _
13456 ;; Make sure the build directory is on PYTHONPATH.
13457 (setenv "PYTHONPATH"
13458 (string-append
13459 (getenv "PYTHONPATH") ":"
13460 (getcwd) "/build/"
13461 (car (scandir "build" (cut string-prefix? "lib." <>)))))
13462
13463 ;; Use the build daemons configured number of workers.
13464 (setenv "NWORKERS" (number->string (parallel-job-count)))
13465
13466 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
13467 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
13468 (propagated-inputs
13469 `(("python-greenlet" ,python-greenlet)
13470 ("python-objgraph" ,python-objgraph)
13471 ("python-zope.event" ,python-zope-event)
13472 ("python-zope.interface" ,python-zope-interface)))
13473 (native-inputs
13474 `(("python-six" ,python-six)
13475
13476 ;; For tests.
13477 ("python-dnspython" ,python-dnspython)
13478 ("python-psutil" ,python-psutil)))
13479 (inputs
13480 `(("c-ares" ,c-ares)
13481 ("libev" ,libev)))
13482 (home-page "https://www.gevent.org/")
13483 (synopsis "Coroutine-based network library")
13484 (description
13485 "@code{gevent} is a coroutine-based Python networking library that uses
13486 @code{greenlet} to provide a high-level synchronous API on top of the
13487 @code{libev} event loop.")
13488 (license license:expat)))
13489
13490 (define-public python-fastimport
13491 (package
13492 (name "python-fastimport")
13493 (version "0.9.9")
13494 (source
13495 (origin
13496 (method url-fetch)
13497 (uri (pypi-uri "fastimport" version))
13498 (sha256
13499 (base32 "06gk14qgm9dxx3pzjn0ckdbywc8ial2bjfzddqwlr4bn1nnqkbll"))))
13500 (build-system python-build-system)
13501 (home-page "https://github.com/jelmer/python-fastimport")
13502 (synopsis "VCS fastimport parser and generator in Python")
13503 (description "This package provides a parser for and generator of the Git
13504 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
13505 format.")
13506 (license license:gpl2+)))
13507
13508 (define-public python2-fastimport
13509 (package-with-python2 python-fastimport))
13510
13511 (define-public python-twisted
13512 (package
13513 (name "python-twisted")
13514 (version "19.7.0")
13515 (source (origin
13516 (method url-fetch)
13517 (uri (pypi-uri "Twisted" version ".tar.bz2"))
13518 (sha256
13519 (base32
13520 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
13521 (build-system python-build-system)
13522 (arguments
13523 '(#:tests? #f)) ; FIXME: some tests fail
13524 (propagated-inputs
13525 `(("python-zope-interface" ,python-zope-interface)
13526 ("python-pyhamcrest" ,python-pyhamcrest)
13527 ("python-incremental" ,python-incremental)
13528 ("python-hyperlink" ,python-hyperlink)
13529 ("python-constantly" ,python-constantly)
13530 ("python-automat" ,python-automat)))
13531 (home-page "https://twistedmatrix.com/")
13532 (synopsis "Asynchronous networking framework written in Python")
13533 (description
13534 "Twisted is an extensible framework for Python programming, with special
13535 focus on event-based network programming and multiprotocol integration.")
13536 (license license:expat)))
13537
13538 (define-public python2-twisted
13539 (package-with-python2 python-twisted))
13540
13541 (define-public python-pika
13542 (package
13543 (name "python-pika")
13544 (version "0.12.0")
13545 (source
13546 (origin
13547 (method url-fetch)
13548 (uri (pypi-uri "pika" version))
13549 (sha256
13550 (base32
13551 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
13552 (build-system python-build-system)
13553 (native-inputs
13554 `(("python-pyev" ,python-pyev)
13555 ("python-tornado" ,python-tornado)
13556 ("python-twisted" ,python-twisted)))
13557 (home-page "https://pika.readthedocs.org")
13558 (synopsis "Pure Python AMQP Client Library")
13559 (description
13560 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
13561 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
13562 network support library.")
13563 (license license:bsd-3)))
13564
13565 (define-public python2-pika
13566 (package-with-python2 python-pika))
13567
13568 (define-public python-ply
13569 (package
13570 (name "python-ply")
13571 (version "3.11")
13572 (source
13573 (origin
13574 (method url-fetch)
13575 (uri (pypi-uri "ply" version))
13576 (sha256
13577 (base32
13578 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
13579 (build-system python-build-system)
13580 (home-page "http://www.dabeaz.com/ply/")
13581 (synopsis "Python Lex & Yacc")
13582 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
13583 It uses LR parsing and does extensive error checking.")
13584 (license license:bsd-3)))
13585
13586 (define-public python-tabulate
13587 (package
13588 (name "python-tabulate")
13589 (version "0.8.9")
13590 (source (origin
13591 (method url-fetch)
13592 (uri (pypi-uri "tabulate" version))
13593 (sha256
13594 (base32
13595 "19qkdz8xwk5jxa5xn53mnk76qnh4ysm81vzj664jw1b0azr167gb"))))
13596 (build-system python-build-system)
13597 (arguments
13598 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
13599 ;; and the latest release is not tagged in the upstream repository.
13600 '(#:tests? #f))
13601 (home-page "https://bitbucket.org/astanin/python-tabulate")
13602 (synopsis "Pretty-print tabular data")
13603 (description
13604 "Tabulate is a library and command-line utility to pretty-print tabular
13605 data in Python.")
13606 (license license:expat)))
13607
13608 (define-public python2-tabulate
13609 (package-with-python2 python-tabulate))
13610
13611 (define-public python-kazoo
13612 (package
13613 (name "python-kazoo")
13614 (version "2.4.0")
13615 (source
13616 (origin
13617 (method url-fetch)
13618 (uri (pypi-uri "kazoo" version))
13619 (sha256
13620 (base32
13621 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
13622 (build-system python-build-system)
13623 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
13624 (propagated-inputs
13625 `(("python-six" ,python-six)))
13626 (home-page "https://kazoo.readthedocs.org")
13627 (synopsis "High-level Zookeeper client library")
13628 (description
13629 "Kazoo is a Python client library for the Apache Zookeeper distributed
13630 application service. It is designed to be easy to use and to avoid common
13631 programming errors.")
13632 (license license:asl2.0)))
13633
13634 (define-public python2-kazoo
13635 (package-with-python2 python-kazoo))
13636
13637 (define-public python-pykafka
13638 (package
13639 (name "python-pykafka")
13640 (version "2.4.0")
13641 (source (origin
13642 (method url-fetch)
13643 (uri (pypi-uri "pykafka" version))
13644 (sha256
13645 (base32
13646 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
13647 (build-system python-build-system)
13648 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
13649 (propagated-inputs
13650 `(("python-gevent" ,python-gevent)
13651 ("python-kazoo" ,python-kazoo)
13652 ("python-tabulate" ,python-tabulate)))
13653 (inputs
13654 `(("librdkafka" ,librdkafka)))
13655 (home-page "https://pykafka.readthedocs.io/")
13656 (synopsis "Apache Kafka client for Python")
13657 (description
13658 "PyKafka is a client for the Apache Kafka distributed messaging system.
13659 It includes Python implementations of Kafka producers and consumers, which
13660 are optionally backed by a C extension built on librdkafka.")
13661 (license license:asl2.0)))
13662
13663 (define-public python-wcwidth
13664 (package
13665 (name "python-wcwidth")
13666 (version "0.1.8")
13667 (source (origin
13668 (method url-fetch)
13669 (uri (pypi-uri "wcwidth" version))
13670 (sha256
13671 (base32
13672 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
13673 (build-system python-build-system)
13674 (home-page "https://github.com/jquast/wcwidth")
13675 (synopsis "Measure number of terminal column cells of wide-character codes")
13676 (description "Wcwidth measures the number of terminal column cells of
13677 wide-character codes. It is useful for those implementing a terminal emulator,
13678 or programs that carefully produce output to be interpreted by one. It is a
13679 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
13680 specified in POSIX.1-2001 and POSIX.1-2008.")
13681 (license license:expat)))
13682
13683 (define-public python2-wcwidth
13684 (package-with-python2 python-wcwidth))
13685
13686 (define-public python2-jsonrpclib
13687 (package
13688 (name "python2-jsonrpclib")
13689 (version "0.1.7")
13690 (source (origin
13691 (method url-fetch)
13692 (uri (pypi-uri "jsonrpclib" version))
13693 (sha256
13694 (base32
13695 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
13696 (build-system python-build-system)
13697 (arguments
13698 `(#:tests? #f
13699 #:python ,python-2))
13700 (home-page "https://github.com/joshmarshall/jsonrpclib/")
13701 (synopsis "Implementation of JSON-RPC specification for Python")
13702 (description
13703 "This library is an implementation of the JSON-RPC specification.
13704 It supports both the original 1.0 specification, as well as the
13705 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
13706 etc.")
13707 (license license:asl2.0)))
13708
13709 (define-public python-chai
13710 (package
13711 (name "python-chai")
13712 (version "1.1.2")
13713 (source (origin
13714 (method url-fetch)
13715 (uri (pypi-uri "chai" version))
13716 (sha256
13717 (base32
13718 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
13719 (build-system python-build-system)
13720 (home-page "https://github.com/agoragames/chai")
13721 (synopsis "Mocking framework for Python")
13722 (description
13723 "Chai provides an api for mocking, stubbing and spying your python
13724 objects, patterned after the Mocha library for Ruby.")
13725 (license license:bsd-3)))
13726
13727 (define-public python2-chai
13728 (package-with-python2 python-chai))
13729
13730 (define-public python-inflection
13731 (package
13732 (name "python-inflection")
13733 (version "0.3.1")
13734 (source
13735 (origin (method url-fetch)
13736 (uri (pypi-uri "inflection" version))
13737 (sha256
13738 (base32
13739 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
13740 (build-system python-build-system)
13741 (native-inputs
13742 `(("python-pytest" ,python-pytest)))
13743 (home-page "https://github.com/jpvanhal/inflection")
13744 (synopsis "Python string transformation library")
13745 (description
13746 "Inflection is a string transformation library. It singularizes
13747 and pluralizes English words, and transforms strings from CamelCase to
13748 underscored string.")
13749 (license license:expat)))
13750
13751 (define-public python2-inflection
13752 (package-with-python2 python-inflection))
13753
13754 (define-public python-pylev
13755 (package
13756 (name "python-pylev")
13757 (version "1.3.0")
13758 (source (origin
13759 (method url-fetch)
13760 (uri (pypi-uri "pylev" version))
13761 (sha256
13762 (base32
13763 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
13764 (build-system python-build-system)
13765 (home-page "https://github.com/toastdriven/pylev")
13766 (synopsis "Levenshtein distance implementation in Python")
13767 (description "Pure Python Levenshtein implementation, based off the
13768 Wikipedia code samples at
13769 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
13770 (license license:bsd-3)))
13771
13772 (define-public python2-pylev
13773 (package-with-python2 python-pylev))
13774
13775 (define-public python-cleo
13776 (package
13777 (name "python-cleo")
13778 (version "0.8.1")
13779 (source (origin
13780 (method url-fetch)
13781 (uri (pypi-uri "cleo" version))
13782 (sha256
13783 (base32
13784 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
13785 (build-system python-build-system)
13786 (native-inputs
13787 `( ;; For testing
13788 ("python-mock" ,python-mock)
13789 ("python-pytest-mock" ,python-pytest-mock)
13790 ("python-pytest" ,python-pytest)))
13791 (propagated-inputs
13792 `(("python-backpack" ,python-backpack)
13793 ("python-clikit" ,python-clikit)
13794 ("python-pastel" ,python-pastel)
13795 ("python-pylev" ,python-pylev)))
13796 (home-page "https://github.com/sdispater/cleo")
13797 (synopsis "Command-line arguments library for Python")
13798 (description
13799 "Cleo allows you to create command-line commands with signature in
13800 docstring and colored output.")
13801 (license license:expat)))
13802
13803 (define-public python2-cleo
13804 (package-with-python2 python-cleo))
13805
13806 (define-public python-tomlkit
13807 (package
13808 (name "python-tomlkit")
13809 (version "0.7.0")
13810 (source
13811 (origin
13812 (method url-fetch)
13813 (uri (pypi-uri "tomlkit" version))
13814 (sha256
13815 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
13816 (build-system python-build-system)
13817 (native-inputs
13818 `(("python-pytest" ,python-pytest)
13819 ("python-pyyaml" ,python-pyyaml)))
13820 (home-page "https://github.com/sdispater/tomlkit")
13821 (synopsis "Style-preserving TOML library")
13822 (description
13823 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
13824 preserves all comments, indentations, whitespace and internal element ordering,
13825 and makes them accessible and editable via an intuitive API. It can also
13826 create new TOML documents from scratch using the provided helpers. Part of the
13827 implementation has been adapted, improved, and fixed from Molten.")
13828 (license license:expat)))
13829
13830 (define-public python-shellingham
13831 (package
13832 (name "python-shellingham")
13833 (version "1.3.2")
13834 (source
13835 (origin
13836 (method url-fetch)
13837 (uri (pypi-uri "shellingham" version))
13838 (sha256
13839 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
13840 (build-system python-build-system)
13841 (arguments
13842 `(#:phases
13843 (modify-phases %standard-phases
13844 (add-after 'unpack 'restore-setup.py
13845 ;; setup.py will return in the next release.
13846 ;; <https://github.com/sarugaku/shellingham/issues/33>
13847 (lambda _
13848 (with-output-to-file "setup.py"
13849 (lambda _
13850 (display "from setuptools import setup\nsetup()\n")))
13851 #t)))))
13852 (home-page "https://github.com/sarugaku/shellingham")
13853 (synopsis "Tool to detect surrounding shell")
13854 (description
13855 "Shellingham detects what shell the current Python executable is
13856 running in.")
13857 (license license:isc)))
13858
13859 (define-public python-memcached
13860 (package
13861 (name "python-memcached")
13862 (version "1.59")
13863 (source
13864 (origin
13865 (method url-fetch)
13866 (uri (pypi-uri "python-memcached" version))
13867 (sha256
13868 (base32
13869 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13870 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13871 (build-system python-build-system)
13872 (propagated-inputs `(("python-six" ,python-six)))
13873 (home-page
13874 "https://github.com/linsomniac/python-memcached")
13875 (synopsis "Pure python memcached client")
13876 (description
13877 "This software is a pure Python interface to the memcached memory cache
13878 daemon. It is the client side software which allows storing values in one or
13879 more, possibly remote, memcached servers.")
13880 (license license:psfl)))
13881
13882 (define-public python-clikit
13883 (package
13884 (name "python-clikit")
13885 (version "0.6.2")
13886 (source
13887 (origin
13888 (method url-fetch)
13889 (uri (pypi-uri "clikit" version))
13890 (sha256
13891 (base32
13892 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13893 (build-system python-build-system)
13894 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13895 (propagated-inputs
13896 `(("python-crashtest" ,python-crashtest)
13897 ("python-pastel" ,python-pastel)
13898 ("python-pylev" ,python-pylev)))
13899 (home-page "https://github.com/sdispater/clikit")
13900 (synopsis "Group of utilities to build command line interfaces")
13901 (description
13902 "CliKit is a group of utilities to build testable command line
13903 interfaces.")
13904 (properties `((python2-variant . ,(delay python2-clikit))))
13905 (license license:expat)))
13906
13907 (define-public python2-clikit
13908 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13909 (package/inherit
13910 base
13911 (propagated-inputs
13912 `(("python-enum34" ,python2-enum34)
13913 ("python-typing" ,python2-typing)
13914 ,@(package-propagated-inputs base))))))
13915
13916 (define-public python-msgpack-python
13917 (package
13918 (name "python-msgpack-python")
13919 (version "0.5.6")
13920 (source
13921 (origin
13922 (method url-fetch)
13923 (uri (pypi-uri "msgpack-python" version))
13924 (sha256
13925 (base32
13926 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13927 (build-system python-build-system)
13928 (home-page "https://msgpack.org/")
13929 (synopsis "Package to deserialize messages in MessagePack binary format")
13930 (description
13931 "MessagePack is an efficient binary serialization format. It lets you
13932 exchange data among multiple languages like JSON. But it's faster and
13933 smaller. Small integers are encoded into a single byte, and typical short
13934 strings require only one extra byte in addition to the strings themselves.")
13935 (license license:asl2.0)))
13936
13937 (define-public python-cachy
13938 (package
13939 (name "python-cachy")
13940 (version "0.3.0")
13941 (source
13942 (origin
13943 (method url-fetch)
13944 (uri (pypi-uri "cachy" version))
13945 (sha256
13946 (base32
13947 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13948 (build-system python-build-system)
13949 (arguments
13950 '(#:phases
13951 (modify-phases %standard-phases
13952 (replace 'check
13953 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13954 "pytest"))))))
13955 (native-inputs
13956 `(("memcached" ,memcached)
13957 ("python-fakeredis" ,python-fakeredis)
13958 ("python-flexmock" ,python-flexmock)
13959 ("python-pifpaf" ,python-pifpaf)
13960 ("python-pytest" ,python-pytest)))
13961 (propagated-inputs
13962 `(("python-memcached" ,python-memcached)
13963 ("python-msgpack-python" ,python-msgpack-python)
13964 ("python-redis" ,python-redis)))
13965 (home-page "https://github.com/sdispater/cachy")
13966 (synopsis "Simple yet effective caching library")
13967 (description
13968 "Cachy provides a simple yet effective caching library. A simple but
13969 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13970 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13971 (license license:expat)))
13972
13973 (define-public poetry
13974 (package
13975 (name "poetry")
13976 (version "1.1.5")
13977 ;; Poetry can only be built from source with Poetry.
13978 (source
13979 (origin
13980 (method url-fetch)
13981 (uri (pypi-uri "poetry" version))
13982 (sha256
13983 (base32
13984 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
13985 (build-system python-build-system)
13986 (arguments
13987 `(#:tests? #f ;; Pypi does not have tests.
13988 #:phases
13989 (modify-phases %standard-phases
13990 (add-before 'build 'patch-setup-py
13991 (lambda _
13992 (substitute* "setup.py"
13993 ;; Allow newer versions of python-keyring.
13994 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
13995 ;; TODO: remove after the next release cycle,
13996 ;; when packaging has been updated.
13997 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
13998 #t)))))
13999 (propagated-inputs
14000 `(("python-cachecontrol" ,python-cachecontrol)
14001 ("python-cachy" ,python-cachy)
14002 ("python-cleo" ,python-cleo)
14003 ("python-clikit" ,python-clikit)
14004 ("python-html5lib" ,python-html5lib)
14005 ("python-keyring" ,python-keyring)
14006 ("python-msgpack-transitional" ,python-msgpack-transitional)
14007 ("python-packaging" ,python-packaging)
14008 ("python-pexpect" ,python-pexpect)
14009 ("python-pip" ,python-pip)
14010 ("python-pkginfo" ,python-pkginfo)
14011 ("python-poetry-core" ,python-poetry-core)
14012 ("python-requests" ,python-requests)
14013 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
14014 ("python-shellingham" ,python-shellingham)
14015 ("python-tomlkit" ,python-tomlkit)
14016 ("python-virtualenv" ,python-virtualenv)))
14017 (home-page "https://python-poetry.org")
14018 (synopsis "Python dependency management and packaging made easy")
14019 (description "Poetry is a tool for dependency management and packaging
14020 in Python. It allows you to declare the libraries your project depends on and
14021 it will manage (install/update) them for you.")
14022 (license license:expat)))
14023
14024 (define-public python-lark-parser
14025 (package
14026 (name "python-lark-parser")
14027 (version "0.9.0")
14028 (source (origin
14029 (method url-fetch)
14030 (uri (pypi-uri "lark-parser" version))
14031 (sha256
14032 (base32
14033 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
14034 (build-system python-build-system)
14035 (home-page "https://github.com/lark-parser/lark")
14036 (synopsis "Multi-language parser for Python")
14037 (description
14038 "Lark is a parser built with a focus on ergonomics, performance and
14039 resilience. Lark can parse all context-free languages. That means it is
14040 capable of parsing almost any programming language out there, and to
14041 some degree most natural languages too.")
14042 (license license:expat)))
14043
14044 (define-public python-libcst
14045 (package
14046 (name "python-libcst")
14047 (version "0.3.8")
14048 (source (origin
14049 (method url-fetch)
14050 (uri (pypi-uri "libcst" version))
14051 (sha256
14052 (base32
14053 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
14054 (build-system python-build-system)
14055 (arguments
14056 `(#:phases
14057 (modify-phases %standard-phases
14058 (add-after 'unpack 'remove-failing-tests
14059 (lambda _
14060 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
14061 (delete-file "libcst/tests/test_fuzz.py")
14062 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
14063 (delete-file "libcst/tests/test_pyre_integration.py")
14064 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
14065 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
14066 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
14067 #t))
14068 (add-before 'check 'generate-test-data
14069 (lambda _
14070 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14071 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
14072 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
14073 (replace 'check
14074 (lambda _
14075 (invoke "python" "-m" "unittest")
14076 #t)))))
14077 (native-inputs
14078 `(("python-black" ,python-black)
14079 ("python-isort" ,python-isort)))
14080 (propagated-inputs
14081 `(("python-typing-extensions" ,python-typing-extensions)
14082 ("python-typing-inspect" ,python-typing-inspect)
14083 ("python-pyyaml" ,python-pyyaml)))
14084 (home-page "https://github.com/Instagram/LibCST")
14085 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
14086 (description
14087 "LibCST parses Python source code as a CST tree that keeps all
14088 formatting details (comments, whitespaces, parentheses, etc). It's useful
14089 for building automated refactoring (codemod) applications and linters.
14090 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
14091 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
14092 naming node types and fields, LibCST creates a lossless CST that looks and
14093 feels like an AST.")
14094 (license (list license:expat
14095 ;; Some files unde libcst/_parser/ are under Python Software
14096 ;; Foundation license (see LICENSE file for details)
14097 license:psfl
14098 ;; libcst/_add_slots.py
14099 license:asl2.0))))
14100
14101 (define-public python-typing-inspect
14102 (package
14103 (name "python-typing-inspect")
14104 (version "0.6.0")
14105 (source (origin
14106 (method url-fetch)
14107 (uri (pypi-uri "typing_inspect" version))
14108 (sha256
14109 (base32
14110 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
14111 (build-system python-build-system)
14112 (propagated-inputs
14113 `(("python-mypy-extensions" ,python-mypy-extensions)
14114 ("python-typing-extensions" ,python-typing-extensions)))
14115 (home-page "https://github.com/ilevkivskyi/typing_inspect")
14116 (synopsis "API for inspection of types in the Python @code{typing} module")
14117 (description
14118 "The @code{typing_inspect} module defines experimental API for runtime
14119 inspection of types defined in the Python standard typing module.")
14120 (license license:expat)))
14121
14122 (define-public python-lazy-object-proxy
14123 (package
14124 (name "python-lazy-object-proxy")
14125 (version "1.5.1")
14126 (source (origin
14127 (method url-fetch)
14128 (uri (pypi-uri "lazy-object-proxy" version))
14129 (sha256
14130 (base32
14131 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
14132 (native-inputs
14133 `(("python-setuptools-scm" ,python-setuptools-scm)))
14134 (build-system python-build-system)
14135 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
14136 (synopsis "Lazy object proxy for python")
14137 (description
14138 "Lazy object proxy is an object that wraps a callable but defers the call
14139 until the object is actually required, and caches the result of said call.")
14140 (license license:bsd-2)))
14141
14142 (define-public python2-lazy-object-proxy
14143 (package-with-python2 python-lazy-object-proxy))
14144
14145 (define-public python-dnspython
14146 (package
14147 (name "python-dnspython")
14148 (version "2.0.0")
14149 (source (origin
14150 (method url-fetch)
14151 (uri (pypi-uri "dnspython" version ".zip"))
14152 (sha256
14153 (base32
14154 "1dyip5ygqqhrgcaiy7qzjpndl9xciip186paxqwkm726fj9z0jh4"))))
14155 (build-system python-build-system)
14156 (native-inputs `(("unzip" ,unzip)))
14157 (arguments '(#:tests? #f)) ; XXX: requires internet access
14158 (home-page "https://www.dnspython.org")
14159 (synopsis "DNS toolkit for Python")
14160 (description
14161 "dnspython is a DNS toolkit for Python. It supports almost all record
14162 types. It can be used for queries, zone transfers, and dynamic updates.
14163 It supports TSIG authenticated messages and EDNS0.")
14164 (license license:expat)))
14165
14166 (define-public python-dnspython-1.16
14167 (package
14168 (inherit python-dnspython)
14169 (version "1.16.0")
14170 (source (origin
14171 (method url-fetch)
14172 (uri (string-append "http://www.dnspython.org/kits/"
14173 version "/dnspython-" version ".tar.gz"))
14174 (sha256
14175 (base32
14176 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
14177 (native-inputs '())))
14178
14179 (define-public python2-dnspython-1.16
14180 (package-with-python2 python-dnspython-1.16))
14181
14182 (define-public python-py3dns
14183 (package
14184 (name "python-py3dns")
14185 (version "3.2.1")
14186 (source
14187 (origin
14188 (method url-fetch)
14189 (uri (pypi-uri "py3dns" version))
14190 (sha256
14191 (base32
14192 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
14193 (build-system python-build-system)
14194 ;; This package wants to read /etc/resolv.conf. We can't patch it without
14195 ;; removing functionality so we copy from Nix and "just don't build it".
14196 (arguments
14197 `(#:phases
14198 (modify-phases %standard-phases
14199 (add-after 'unpack 'patch-source
14200 (lambda _
14201 (substitute* "setup.py"
14202 (("import DNS") "")
14203 (("DNS.__version__") (string-append "\"" ,version "\"")))
14204 #t)))
14205 #:tests? #f)) ; Also skip the tests.
14206 (home-page "https://launchpad.net/py3dns")
14207 (synopsis "Python 3 DNS library")
14208 (description "This Python 3 module provides a DNS API for looking up DNS
14209 entries from within Python 3 modules and applications. This module is a
14210 simple, lightweight implementation.")
14211 (license license:psfl)))
14212
14213 (define-public python-email-validator
14214 (package
14215 (name "python-email-validator")
14216 (version "1.0.2")
14217 (source
14218 (origin (method url-fetch)
14219 (uri (pypi-uri "email_validator" version))
14220 (sha256
14221 (base32
14222 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
14223 (build-system python-build-system)
14224 (arguments
14225 '(#:phases
14226 (modify-phases %standard-phases
14227 (add-before 'build 'use-dnspython
14228 (lambda _
14229 (substitute* "setup.py"
14230 (("dnspython3") "dnspython"))
14231 #t)))))
14232 (propagated-inputs
14233 `(("python-dnspython" ,python-dnspython)
14234 ("python-idna" ,python-idna)))
14235 (home-page "https://github.com/JoshData/python-email-validator")
14236 (synopsis "Email address validation library for Python")
14237 (description
14238 "This library validates email address syntax and deliverability.")
14239 (license license:cc0)))
14240
14241 (define-public python2-email-validator
14242 (package-with-python2 python-email-validator))
14243
14244 (define-public python-ukpostcodeparser
14245 (package
14246 (name "python-ukpostcodeparser")
14247 (version "1.0.3")
14248 (source (origin
14249 (method url-fetch)
14250 (uri (pypi-uri "UkPostcodeParser" version))
14251 (sha256
14252 (base32
14253 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
14254 (build-system python-build-system)
14255 (home-page "https://github.com/hamstah/ukpostcodeparser")
14256 (synopsis "UK Postcode parser for Python")
14257 (description
14258 "This library provides the @code{parse_uk_postcode} function for
14259 parsing UK postcodes.")
14260 (license license:expat)))
14261
14262 (define-public python2-ukpostcodeparser
14263 (package-with-python2 python-ukpostcodeparser))
14264
14265 (define-public python-faker
14266 (package
14267 (name "python-faker")
14268 (version "4.0.2")
14269 (source (origin
14270 (method url-fetch)
14271 (uri (pypi-uri "Faker" version))
14272 (sha256
14273 (base32
14274 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
14275 (build-system python-build-system)
14276 (arguments
14277 '(#:phases
14278 (modify-phases %standard-phases
14279 (replace 'check
14280 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
14281 (native-inputs
14282 `(;; For testing
14283 ("python-freezegun" ,python-freezegun)
14284 ("python-pytest" ,python-pytest)
14285 ("python-random2" ,python-random2)
14286 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
14287 ("python-validators" ,python-validators)))
14288 (propagated-inputs
14289 `(("python-dateutil" ,python-dateutil)
14290 ("python-text-unidecode" ,python-text-unidecode)))
14291 (home-page "https://github.com/joke2k/faker")
14292 (synopsis "Python package that generates fake data")
14293 (description
14294 "Faker is a Python package that generates fake data such as names,
14295 addresses, and phone numbers.")
14296 (license license:expat)
14297 (properties `((python2-variant . ,(delay python2-faker))))))
14298
14299 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
14300 (define-public python2-faker
14301 (let ((base (package-with-python2 (strip-python2-variant
14302 python-faker))))
14303 (package
14304 (inherit base)
14305 (version "3.0.1")
14306 (source (origin
14307 (method url-fetch)
14308 (uri (pypi-uri "Faker" version))
14309 (sha256
14310 (base32
14311 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
14312 (native-inputs
14313 `(("python-mock" ,python2-mock)
14314 ,@(package-native-inputs base)))
14315 (propagated-inputs
14316 `(("python2-ipaddress" ,python2-ipaddress)
14317 ("python2-six" ,python2-six)
14318 ,@(package-propagated-inputs base))))))
14319
14320 (define-public python-pyaml
14321 (package
14322 (name "python-pyaml")
14323 (version "18.11.0")
14324 (source (origin
14325 (method url-fetch)
14326 (uri (pypi-uri "pyaml" version))
14327 (sha256
14328 (base32
14329 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
14330 (build-system python-build-system)
14331 (native-inputs
14332 `(("python-unidecode" ,python-unidecode)))
14333 (propagated-inputs
14334 `(("python-pyyaml" ,python-pyyaml)))
14335 (home-page "https://github.com/mk-fg/pretty-yaml")
14336 (synopsis "YAML pretty-print library for Python")
14337 (description
14338 "pyaml is a PyYAML based python module to produce pretty and readable
14339 YAML-serialized data.")
14340 (license license:wtfpl2)))
14341
14342 (define-public python2-pyaml
14343 (package-with-python2 python-pyaml))
14344
14345 (define-public python-backpack
14346 (package
14347 (name "python-backpack")
14348 (version "0.1")
14349 (source
14350 (origin
14351 (method url-fetch)
14352 (uri (pypi-uri "backpack" version))
14353 (sha256
14354 (base32
14355 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
14356 (build-system python-build-system)
14357 (native-inputs
14358 `(("python-pytest" ,python-pytest)
14359 ("python-nose" ,python-nose)))
14360 (propagated-inputs
14361 `(("python-simplejson" ,python-simplejson)))
14362 (home-page "https://github.com/sdispater/backpack")
14363 (synopsis "Utilities for working with Python collections")
14364 (description "Backpack provides some useful utilities for working with
14365 collections of data.")
14366 (license license:expat)))
14367
14368 (define-public python2-backpack
14369 (package-with-python2 python-backpack))
14370
14371 (define-public python-prompt-toolkit
14372 (package
14373 (name "python-prompt-toolkit")
14374 (version "3.0.9")
14375 (source
14376 (origin
14377 (method url-fetch)
14378 (uri (pypi-uri "prompt_toolkit" version))
14379 (sha256
14380 (base32 "0bvjp62cs6aj9lrh7njzxdjgg8pjfw3qgmr551243d9ivmcapvn5"))))
14381 (build-system python-build-system)
14382 (arguments
14383 `(#:phases
14384 (modify-phases %standard-phases
14385 (delete 'check)
14386 (add-after 'install 'post-install-check
14387 (lambda* (#:key inputs outputs #:allow-other-keys)
14388 ;; HOME is needed for the test
14389 ;; "test_pathcompleter_can_expanduser".
14390 (setenv "HOME" "/tmp")
14391 (add-installed-pythonpath inputs outputs)
14392 (invoke "py.test"))))))
14393 (propagated-inputs
14394 `(("python-wcwidth" ,python-wcwidth)))
14395 (native-inputs
14396 `(("python-pytest" ,python-pytest)))
14397 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
14398 (synopsis "Library for building command line interfaces in Python")
14399 (description
14400 "Prompt-Toolkit is a library for building interactive command line
14401 interfaces in Python. It's like GNU Readline but it also features syntax
14402 highlighting while typing, out-of-the-box multi-line input editing, advanced
14403 code completion, incremental search, support for Chinese double-width
14404 characters, mouse support, and auto suggestions.")
14405 (license license:bsd-3)
14406 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
14407
14408 (define-public python-prompt-toolkit-2
14409 (package (inherit python-prompt-toolkit)
14410 (name "python-prompt-toolkit")
14411 (version "2.0.7")
14412 (source
14413 (origin
14414 (method url-fetch)
14415 (uri (pypi-uri "prompt_toolkit" version))
14416 (sha256
14417 (base32
14418 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
14419 (propagated-inputs
14420 `(("python-wcwidth" ,python-wcwidth)
14421 ("python-six" ,python-six)
14422 ("python-pygments" ,python-pygments)))
14423 (properties '())))
14424
14425 (define-public python2-prompt-toolkit
14426 (package-with-python2 python-prompt-toolkit-2))
14427
14428 (define-public python-prompt-toolkit-1
14429 (package (inherit python-prompt-toolkit-2)
14430 (version "1.0.15")
14431 (source
14432 (origin
14433 (method url-fetch)
14434 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
14435 (sha256
14436 (base32
14437 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
14438
14439 (define-public python2-prompt-toolkit-1
14440 (package-with-python2 python-prompt-toolkit-1))
14441
14442 (define-public python-jedi
14443 (package
14444 (name "python-jedi")
14445 (version "0.17.2")
14446 (source
14447 (origin
14448 (method url-fetch)
14449 (uri (pypi-uri "jedi" version))
14450 (sha256
14451 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
14452 (build-system python-build-system)
14453 (arguments
14454 `(#:phases
14455 (modify-phases %standard-phases
14456 (replace 'check
14457 (lambda* (#:key tests? #:allow-other-keys)
14458 (when tests?
14459 (setenv "HOME" "/tmp")
14460 (invoke "python" "-m" "pytest" "-vv"))
14461 #t)))))
14462 (native-inputs
14463 `(("python-pytest" ,python-pytest)
14464 ("python-docopt" ,python-docopt)))
14465 (propagated-inputs
14466 `(("python-parso" ,python-parso)))
14467 (home-page "https://github.com/davidhalter/jedi")
14468 (synopsis "Autocompletion and static analysis library for Python")
14469 (description
14470 "Jedi is a static analysis tool for Python that can be used in Integrated
14471 Development Environments (@dfn{IDE}s) and text editors. It understands Python
14472 on a deeper level than many other static analysis frameworks for Python.
14473
14474 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
14475 well.")
14476 (license license:expat)))
14477
14478 (define-public python2-jedi
14479 (package-with-python2 python-jedi))
14480
14481 (define-public ptpython
14482 (package
14483 (name "ptpython")
14484 (version "3.0.5")
14485 (source (origin
14486 (method url-fetch)
14487 (uri (pypi-uri "ptpython" version))
14488 (sha256
14489 (base32
14490 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
14491 (build-system python-build-system)
14492 (arguments
14493 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
14494 (propagated-inputs
14495 `(("python-appdirs" ,python-appdirs)
14496 ("python-jedi" ,python-jedi)
14497 ("python-prompt-toolkit" ,python-prompt-toolkit)
14498 ("python-pygments" ,python-pygments)))
14499 (home-page "https://github.com/jonathanslenders/ptpython")
14500 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
14501 (description
14502 "ptpython is a Python read-eval-print loop with IDE-like features.
14503 It supports syntax highlighting, multiline editing, autocompletion, mouse,
14504 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
14505 etc.")
14506 (license license:bsd-3)
14507 (properties `((python2-variant . ,(delay ptpython-2))))))
14508
14509 (define-public ptpython-2
14510 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
14511 (package/inherit base
14512 (name "ptpython2"))))
14513
14514 (define-public python-stem
14515 (package
14516 (name "python-stem")
14517 (version "1.8.0")
14518 (source
14519 (origin
14520 (method url-fetch)
14521 (uri (pypi-uri "stem" version))
14522 (sha256
14523 (base32
14524 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
14525 (build-system python-build-system)
14526 (arguments
14527 `(#:phases
14528 (modify-phases %standard-phases
14529 (replace 'check
14530 (lambda _
14531 (invoke "./run_tests.py" "--unit")
14532 #t)))))
14533 (native-inputs
14534 `(("python-mock" ,python-mock)
14535 ("python-pycodestyle" ,python-pycodestyle)
14536 ("python-pyflakes" ,python-pyflakes)))
14537 (home-page "https://stem.torproject.org/")
14538 (synopsis
14539 "Python controller library that allows applications to interact with Tor")
14540 (description
14541 "Stem is a Python controller library for Tor. With it you can use Tor's
14542 control protocol to script against the Tor process and read descriptor data
14543 relays publish about themselves.")
14544 (license license:lgpl3)))
14545
14546 (define-public python-pyserial
14547 (package
14548 (name "python-pyserial")
14549 (version "3.5")
14550 (source
14551 (origin
14552 (method url-fetch)
14553 (uri (pypi-uri "pyserial" version))
14554 (sha256
14555 (base32
14556 "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw"))))
14557 (build-system python-build-system)
14558 (arguments
14559 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
14560 ;; #:phases
14561 ;; (modify-phases %standard-phases
14562 ;; (replace 'check
14563 ;; (lambda _
14564 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
14565 (home-page
14566 "https://github.com/pyserial/pyserial")
14567 (synopsis "Python Serial Port Bindings")
14568 (description "@code{pyserial} provide serial port bindings for Python. It
14569 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
14570 and/or Xon/Xoff. The port is accessed in RAW mode.")
14571 (license license:bsd-3)))
14572
14573 (define-public python2-pyserial
14574 (package-with-python2 python-pyserial))
14575
14576 (define-public python-kivy
14577 (package
14578 (name "python-kivy")
14579 (version "1.10.1")
14580 (source
14581 (origin
14582 (method url-fetch)
14583 (uri (pypi-uri "Kivy" version))
14584 (file-name (string-append name "-" version ".tar.gz"))
14585 (sha256
14586 (base32
14587 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
14588 (build-system python-build-system)
14589 (arguments
14590 `(#:tests? #f ; Tests require many optional packages
14591 #:phases
14592 (modify-phases %standard-phases
14593 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
14594 (lambda* (#:key inputs #:allow-other-keys)
14595 (setenv "KIVY_SDL2_PATH"
14596 (string-append (assoc-ref inputs "sdl-union")
14597 "/include/SDL2"))
14598 #t)))))
14599 (native-inputs
14600 `(("pkg-config" ,pkg-config)
14601 ("python-cython" ,python-cython)))
14602 (inputs
14603 `(("gstreamer" ,gstreamer)
14604 ("mesa" ,mesa)
14605 ("sdl-union"
14606 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
14607 (home-page "https://kivy.org")
14608 (synopsis
14609 "Multitouch application framework")
14610 (description
14611 "A software library for rapid development of
14612 hardware-accelerated multitouch applications.")
14613 (license license:expat)))
14614
14615 (define-public python2-kivy
14616 (package-with-python2 python-kivy))
14617
14618 (define-public python-binaryornot
14619 (package
14620 (name "python-binaryornot")
14621 (version "0.4.4")
14622 (source (origin
14623 (method url-fetch)
14624 (uri (pypi-uri "binaryornot" version))
14625 (sha256
14626 (base32
14627 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
14628 (build-system python-build-system)
14629 (arguments
14630 `(#:phases
14631 (modify-phases %standard-phases
14632 (add-after 'unpack 'patch-tests
14633 (lambda _
14634 ;; TypeError: binary() got an unexpected keyword argument
14635 ;; 'average_size'.
14636 (substitute* "tests/test_check.py"
14637 (("average_size=512") ""))
14638 #t)))))
14639 (propagated-inputs
14640 `(("python-chardet" ,python-chardet)
14641 ("python-hypothesis" ,python-hypothesis)))
14642 (home-page "https://github.com/audreyr/binaryornot")
14643 (synopsis "Package to check if a file is binary or text")
14644 (description "Ultra-lightweight pure Python package to check if a file is
14645 binary or text.")
14646 (license license:bsd-3)
14647 (properties `((python2-variant . ,(delay python2-binaryornot))))))
14648
14649 (define-public python2-binaryornot
14650 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
14651 (package/inherit base
14652 (propagated-inputs
14653 `(("python2-enum34" ,python2-enum34)
14654 ,@(package-propagated-inputs base))))))
14655
14656 (define-public python-binwalk
14657 (package
14658 (name "python-binwalk")
14659 (version "2.2.0")
14660 (source
14661 (origin
14662 (method git-fetch)
14663 (uri (git-reference
14664 (url "https://github.com/ReFirmLabs/binwalk")
14665 (commit (string-append "v" version))))
14666 (file-name (git-file-name name version))
14667 (sha256
14668 (base32
14669 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
14670 (build-system python-build-system)
14671 (arguments
14672 `(#:phases
14673 (modify-phases %standard-phases
14674 (add-before 'check 'set-pythonpath
14675 (lambda _
14676 (setenv "PYTHONPATH"
14677 (string-append
14678 (getcwd) "/src/"
14679 ":" (getenv "PYTHONPATH")))
14680 (setenv "HOME" "")
14681 #t)))))
14682 (native-inputs
14683 `(("python-coverage" ,python-coverage)
14684 ("python-nose" ,python-nose)))
14685 (home-page "https://github.com/ReFirmLabs/binwalk")
14686 (synopsis "Firmware analysis tool")
14687 (description "Binwalk is a tool for analyzing, reverse engineering, and
14688 extracting firmware images")
14689 (license license:expat)))
14690
14691 (define-public python-nltk
14692 (package
14693 (name "python-nltk")
14694 (version "3.2.1")
14695 (source (origin
14696 (method url-fetch)
14697 (uri (pypi-uri "nltk" version))
14698 (sha256
14699 (base32
14700 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
14701 (build-system python-build-system)
14702 (arguments
14703 '(;; The tests require some extra resources to be downloaded.
14704 ;; TODO Try packaging these resources.
14705 #:tests? #f))
14706 (home-page "http://nltk.org/")
14707 (synopsis "Natural Language Toolkit")
14708 (description "It provides interfaces to over 50 corpora and lexical
14709 resources such as WordNet, along with a suite of text processing libraries
14710 for classification, tokenization, stemming, tagging, parsing, and semantic
14711 reasoning, wrappers for natural language processing libraries.")
14712 (license license:asl2.0)))
14713
14714 (define-public python2-nltk
14715 (package-with-python2 python-nltk))
14716
14717 (define-public python-pymongo
14718 (package
14719 (name "python-pymongo")
14720 (version "3.7.2")
14721 (source (origin
14722 (method url-fetch)
14723 (uri (pypi-uri "pymongo" version))
14724 (sha256
14725 (base32
14726 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
14727 (build-system python-build-system)
14728 (propagated-inputs
14729 `(("python-certifi" ,python-certifi)))
14730 (home-page "https://github.com/mongodb/mongo-python-driver")
14731 (synopsis "Python driver for MongoDB")
14732 (description "Python driver for MongoDB.")
14733 (license license:asl2.0)))
14734
14735 (define-public python2-pymongo
14736 (package-with-python2 python-pymongo))
14737
14738 (define-public python-consul
14739 (package
14740 (name "python-consul")
14741 (version "0.6.1")
14742 (source
14743 (origin
14744 (method url-fetch)
14745 (uri (pypi-uri "python-consul" version))
14746 (sha256
14747 (base32
14748 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
14749 (build-system python-build-system)
14750 (arguments
14751 '(#:tests? #f)) ; The tests are not distributed
14752 (propagated-inputs
14753 `(("python-requests" ,python-requests)
14754 ("python-six" ,python-six)))
14755 (home-page "https://github.com/cablehead/python-consul")
14756 (synopsis "Python client for Consul")
14757 (description
14758 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
14759 discovery, monitoring and configuration.")
14760 (license license:expat)))
14761
14762 (define-public python2-consul
14763 (package-with-python2 python-consul))
14764
14765 (define-public python-schematics
14766 (package
14767 (name "python-schematics")
14768 (version "1.1.1")
14769 (source
14770 (origin
14771 (method git-fetch)
14772 (uri (git-reference
14773 (url "https://github.com/schematics/schematics")
14774 (commit (string-append "v" version))))
14775 (file-name (git-file-name name version))
14776 (sha256
14777 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
14778 (build-system python-build-system)
14779 (propagated-inputs
14780 `(("python-six" ,python-six)))
14781 (arguments
14782 ;; The tests require a bunch of not very nice packages with fixed
14783 ;; version requirements (e.g. python-coveralls).
14784 `(#:tests? #f))
14785 (home-page "https://github.com/schematics/schematics")
14786 (synopsis "Python Data Structures for Humans")
14787 (description "Python Data Structures for Humans.")
14788 (license license:bsd-3)))
14789
14790 (define-public python2-schematics
14791 (package-with-python2 python-schematics))
14792
14793 (define-public python-odfpy
14794 (package
14795 (name "python-odfpy")
14796 (version "1.4.1")
14797 (source (origin
14798 (method url-fetch)
14799 (uri (pypi-uri "odfpy" version))
14800 (sha256
14801 (base32
14802 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
14803 (arguments
14804 `(#:phases
14805 (modify-phases %standard-phases
14806 (replace 'check
14807 (lambda _
14808 (setenv "PYTHONPATH" (string-append "./build/lib:"
14809 (getenv "PYTHONPATH")))
14810 (invoke "pytest" "-vv"))))))
14811 (build-system python-build-system)
14812 (native-inputs
14813 `(("python-pytest" ,python-pytest)))
14814 (propagated-inputs
14815 `(("python-defusedxml" ,python-defusedxml)))
14816 (home-page "https://github.com/eea/odfpy")
14817 (synopsis "Python API and tools to manipulate OpenDocument files")
14818 (description "Collection of libraries and utility programs written in
14819 Python to manipulate OpenDocument 1.2 files.")
14820 (license
14821 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
14822 ;; number of files with other licenses.
14823 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
14824
14825 (define-public python2-odfpy
14826 (package-with-python2 python-odfpy))
14827
14828 (define-public python-natsort
14829 (package
14830 (name "python-natsort")
14831 (version "7.0.1")
14832 (source (origin
14833 (method url-fetch)
14834 (uri (pypi-uri "natsort" version))
14835 (sha256
14836 (base32
14837 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14838 (build-system python-build-system)
14839 (arguments
14840 `(#:modules ((guix build utils)
14841 (guix build python-build-system)
14842 (srfi srfi-1)
14843 (srfi srfi-26)
14844 (ice-9 ftw))
14845 #:phases
14846 (modify-phases %standard-phases
14847 (add-before 'check 'set-cachedir
14848 ;; Tests require write access to $HOME by default
14849 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14850 (replace 'check
14851 (lambda _
14852 (let ((cwd (getcwd)))
14853 (setenv "PYTHONPATH"
14854 (string-append
14855 cwd "/build/"
14856 (find (cut string-prefix? "lib" <>)
14857 (scandir (string-append cwd "/build")))
14858 ":"
14859 (getenv "PYTHONPATH")))
14860 (invoke "pytest" "-v")))))))
14861 (native-inputs
14862 `(("python-hypothesis" ,python-hypothesis)
14863 ("python-pytest-cov" ,python-pytest-cov)
14864 ("python-pytest-mock" ,python-pytest-mock)
14865 ("python-pytest" ,python-pytest)))
14866 (propagated-inputs ; TODO: Add python-fastnumbers.
14867 `(("python-pyicu" ,python-pyicu)))
14868 (home-page "https://github.com/SethMMorton/natsort")
14869 (synopsis "Natural sorting for python and shell")
14870 (description
14871 "Natsort lets you apply natural sorting on lists instead of
14872 lexicographical. If you use the built-in @code{sorted} method in python
14873 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14874 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14875 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14876 identifies numbers and sorts them separately from strings. It can also sort
14877 version numbers, real numbers, mixed types and more, and comes with a shell
14878 command @command{natsort} that exposes this functionality in the command line.")
14879 (license license:expat)
14880 (properties `((python2-variant . ,(delay python2-natsort))))))
14881
14882 ;; Natsort 6.x are the last versions with support for Python 2.
14883 (define-public python2-natsort
14884 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14885 (package (inherit base)
14886 (version "6.2.1")
14887 (source (origin
14888 (method url-fetch)
14889 (uri (pypi-uri "natsort" version))
14890 (sha256
14891 (base32
14892 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14893 (native-inputs
14894 `(("python2-pathlib" ,python2-pathlib)
14895 ,@(package-native-inputs base))))))
14896
14897 (define-public glances
14898 (package
14899 (name "glances")
14900 (version "3.1.6")
14901 (source
14902 (origin
14903 (method url-fetch)
14904 (uri (pypi-uri "Glances" version))
14905 (sha256
14906 (base32 "11xbm8jgcxha191ly7q76nab1ilabiz14mqf6i3y6aw5xvgg017c"))
14907 (modules '((guix build utils)))
14908 (snippet
14909 '(begin
14910 ;; Glances phones PyPI for weekly update checks by default.
14911 ;; Disable these. The user can re-enable them if desired.
14912 (substitute* "glances/outdated.py"
14913 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14914 (string-append indentation
14915 "self.args.disable_check_update = True\n"
14916 line)))
14917 #t))))
14918 (build-system python-build-system)
14919 (propagated-inputs
14920 `(("python-future" ,python-future)
14921 ("python-psutil" ,python-psutil)))
14922 (home-page "https://github.com/nicolargo/glances")
14923 (synopsis "Cross-platform curses-based monitoring tool")
14924 (description
14925 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14926 Glances uses the PsUtil library to get information from your system. It
14927 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14928 (license license:lgpl3+)))
14929
14930 (define-public python-glances
14931 (deprecated-package "python-glances" glances))
14932
14933 (define-public python-graphql-core
14934 (package
14935 (name "python-graphql-core")
14936 (version "3.1.2")
14937 (source
14938 (origin
14939 (method url-fetch)
14940 (uri (pypi-uri "graphql-core" version))
14941 (sha256
14942 (base32
14943 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
14944 (build-system python-build-system)
14945 (arguments
14946 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14947 #:phases
14948 (modify-phases %standard-phases
14949 (add-after 'unpack 'patch-hardcoded-version
14950 (lambda _ (substitute*
14951 "setup.py"
14952 (("'gevent==1.1rc1'") "'gevent'"))
14953 #t)))))
14954 (native-inputs
14955 `(("python-gevent" ,python-gevent)
14956 ("python-mock" ,python-mock)
14957 ("python-pytest-mock" ,python-pytest-mock)))
14958 (propagated-inputs
14959 `(("python-promise" ,python-promise)
14960 ("python-six" ,python-six)))
14961 (home-page "https://github.com/graphql-python/graphql-core")
14962 (synopsis "GraphQL implementation for Python")
14963 (description
14964 "GraphQL implementation for Python. GraphQL is a data query language and
14965 runtime designed and used to request and deliver data to mobile and web apps.
14966 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14967 to Python.")
14968 (license license:expat)))
14969
14970 (define-public python-graphql-relay
14971 (package
14972 (name "python-graphql-relay")
14973 (version "0.4.5")
14974 (source
14975 (origin
14976 (method url-fetch)
14977 (uri (pypi-uri "graphql-relay" version))
14978 (sha256
14979 (base32
14980 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14981 (build-system python-build-system)
14982 (arguments
14983 '(#:tests? #f)) ; The tests are not distributed
14984 (propagated-inputs
14985 `(("python-graphql-core" ,python-graphql-core)
14986 ("python-promise" ,python-promise)
14987 ("python-six" ,python-six)))
14988 (home-page "https://github.com/graphql-python/graphql-relay-py")
14989 (synopsis "Relay implementation for Python")
14990 (description
14991 "This is a library to allow the easy creation of Relay-compliant servers
14992 using the GraphQL Python reference implementation of a GraphQL server. It
14993 should be noted that the code is a exact port of the original
14994 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14995 from Facebook.")
14996 (license license:expat)))
14997
14998 (define-public python-graphene
14999 (package
15000 (name "python-graphene")
15001 (version "0.10.2")
15002 (source
15003 (origin
15004 (method url-fetch)
15005 (uri (pypi-uri "graphene" version))
15006 (sha256
15007 (base32
15008 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
15009 (build-system python-build-system)
15010 (propagated-inputs
15011 `(("python-graphql-core" ,python-graphql-core)
15012 ("python-graphql-relay" ,python-graphql-relay)
15013 ("python-iso8601" ,python-iso8601)
15014 ("python-promise" ,python-promise)
15015 ("python-six" ,python-six)))
15016 (arguments
15017 `(#:tests? #f)) ; no tests/ in the PyPI tarball
15018 (home-page "https://graphene-python.org/")
15019 (synopsis "GraphQL Framework for Python")
15020 (description
15021 "Graphene is a Python library for building GraphQL schemas/types.
15022 A GraphQL schema describes your data model, and provides a GraphQL server
15023 with an associated set of resolve methods that know how to fetch data.")
15024 (license license:expat)))
15025
15026 (define-public python-nautilus
15027 (package
15028 (name "python-nautilus")
15029 (version "0.4.9")
15030 (source
15031 (origin
15032 (method url-fetch)
15033 (uri (pypi-uri "nautilus" version))
15034 (sha256
15035 (base32
15036 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
15037 (build-system python-build-system)
15038 (arguments `(#:tests? #f)) ; fails to import test modules
15039 (propagated-inputs
15040 `(("python-bcrypt" ,python-bcrypt)
15041 ("python-click" ,python-click)
15042 ("python-consul" ,python-consul)
15043 ("python-graphene" ,python-graphene)
15044 ("python-jinja2" ,python-jinja2)
15045 ("python-peewee" ,python-peewee)
15046 ("python-pika" ,python-pika)
15047 ("python-tornado" ,python-tornado)
15048 ("python-wtforms" ,python-wtforms)))
15049 (native-inputs
15050 `(("python-nose2" ,python-nose2)))
15051 (home-page "https://github.com/AlecAivazis/nautilus")
15052 (synopsis "Library for creating microservice applications")
15053 (description
15054 "Nautilus is a framework for flux based microservices that looks to
15055 provide extendible implementations of common aspects of a cloud so that you can
15056 focus on building massively scalable web applications.")
15057 (license license:expat)))
15058
15059 (define-public python-random2
15060 (package
15061 (name "python-random2")
15062 (version "1.0.1")
15063 (source (origin
15064 (method url-fetch)
15065 (uri (pypi-uri "random2" version ".zip"))
15066 (sha256
15067 (base32
15068 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
15069 (build-system python-build-system)
15070 (native-inputs `(("unzip" ,unzip)))
15071 (home-page "http://pypi.python.org/pypi/random2")
15072 (synopsis "Python 3 version of the Python 2 @code{random} module")
15073 (description
15074 "This package provides a Python 3 ported version of Python 2.7’s
15075 @code{random} module. It has also been back-ported to work in Python 2.6.
15076
15077 In Python 3, the implementation of @code{randrange()} was changed, so that
15078 even with the same seed you get different sequences in Python 2 and 3.
15079
15080 This package closes that gap, allowing stable random number generation
15081 between the different Python versions.")
15082 (license license:psfl)))
15083
15084 (define-public python2-random2
15085 (package-with-python2 python-random2))
15086
15087 (define-public python-snowballstemmer
15088 (package
15089 (name "python-snowballstemmer")
15090 (version "2.0.0")
15091 (source (origin
15092 (method url-fetch)
15093 (uri (pypi-uri "snowballstemmer" version))
15094 (sha256
15095 (base32
15096 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
15097 (build-system python-build-system)
15098 (arguments
15099 `(;; No tests exist
15100 #:tests? #f))
15101 (home-page "https://github.com/shibukawa/snowball_py")
15102 (synopsis "Snowball stemming library collection for Python")
15103 (description "This package provides 16 word stemmer algorithms generated
15104 from Snowball algorithms. It includes the 15 original ones plus the Poerter
15105 English stemmer.")
15106 (license license:bsd-3)))
15107
15108 (define-public python2-snowballstemmer
15109 (package-with-python2 python-snowballstemmer))
15110
15111 (define-public python-setproctitle
15112 (package
15113 (name "python-setproctitle")
15114 (version "1.1.10")
15115 (source
15116 (origin
15117 (method url-fetch)
15118 (uri (pypi-uri "setproctitle" version))
15119 (sha256
15120 (base32
15121 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
15122 (build-system python-build-system)
15123 (arguments
15124 '(#:phases
15125 (modify-phases %standard-phases
15126 (add-before 'check 'patch-Makefile
15127 ;; Stricly this is only required for the python2 variant.
15128 ;; But adding a phase in an inherited package seems to be
15129 ;; cumbersum. So we patch even for python3.
15130 (lambda _
15131 (let ((nose (assoc-ref %build-inputs "python2-nose")))
15132 (when nose
15133 (substitute* "Makefile"
15134 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
15135 (string-append nose "/bin/nosetests "))))
15136 #t)))
15137 (replace 'check
15138 (lambda _
15139 (setenv "PYTHON" (or (which "python3") (which "python")))
15140 (setenv "PYCONFIG" (if (which "python3-config")
15141 "python3-config --embed"
15142 "python-config"))
15143 (setenv "CC" "gcc")
15144 ;; No need to extend PYTHONPATH to find the built package, since
15145 ;; the Makefile will build anyway
15146 (invoke "make" "check"))))))
15147 (native-inputs
15148 `(("procps" ,procps))) ; required for tests
15149 (home-page "https://github.com/dvarrazzo/py-setproctitle")
15150 (synopsis
15151 "Setproctitle implementation for Python to customize the process title")
15152 (description "The library allows a process to change its title (as displayed
15153 by system tools such as ps and top).
15154
15155 Changing the title is mostly useful in multi-process systems, for
15156 example when a master process is forked: changing the children's title
15157 allows identifying the task each process is busy with. The technique
15158 is used by PostgreSQL and the OpenSSH Server for example.")
15159 (license license:bsd-3)
15160 (properties `((python2-variant . ,(delay python2-setproctitle))))))
15161
15162 (define-public python2-setproctitle
15163 (let ((base (package-with-python2
15164 (strip-python2-variant python-setproctitle))))
15165 (package/inherit base
15166 (native-inputs `(("python2-nose" ,python2-nose)
15167 ,@(package-native-inputs base))))))
15168
15169 (define-public python-validictory
15170 (package
15171 (name "python-validictory")
15172 (version "1.0.1")
15173 (source
15174 (origin
15175 (method url-fetch)
15176 (uri (pypi-uri "validictory" version))
15177 (sha256
15178 (base32
15179 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
15180 (build-system python-build-system)
15181 (arguments
15182 '(#:phases
15183 (modify-phases %standard-phases
15184 (add-after 'unpack 'bootstrap
15185 ;; Move the tests out of the package directory to avoid
15186 ;; packaging them.
15187 (lambda* _
15188 (rename-file "validictory/tests" "tests")
15189 (delete-file "tests/__init__.py")))
15190 (replace 'check
15191 (lambda _
15192 ;; Extend PYTHONPATH so the built package will be found.
15193 (setenv "PYTHONPATH"
15194 (string-append (getcwd) "/build/lib:"
15195 (getenv "PYTHONPATH")))
15196 (invoke "py.test" "-vv" ))))))
15197 (native-inputs
15198 `(("python-pytest" ,python-pytest)))
15199 (home-page
15200 "https://github.com/jamesturk/validictory")
15201 (synopsis "General purpose Python data validator")
15202 (description "It allows validation of arbitrary Python data structures.
15203
15204 The schema format is based on the JSON Schema
15205 proposal (http://json-schema.org), so combined with json the library is also
15206 useful as a validator for JSON data.")
15207 (license license:expat)))
15208
15209 (define-public python2-validictory
15210 (package-with-python2 python-validictory))
15211
15212 (define-public python-pyelftools
15213 (package
15214 (name "python-pyelftools")
15215 (version "0.25")
15216 (source
15217 (origin
15218 (method url-fetch)
15219 (uri (pypi-uri "pyelftools" version))
15220 (sha256
15221 (base32
15222 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
15223 (build-system python-build-system)
15224 (arguments
15225 `(#:phases
15226 (modify-phases %standard-phases
15227 (add-before 'check 'set-pythonpath
15228 (lambda _
15229 (setenv "PYTHONPATH"
15230 (string-append
15231 (getcwd) "/test/"
15232 ":" (getenv "PYTHONPATH")))
15233 #t)))))
15234 (home-page
15235 "https://github.com/eliben/pyelftools")
15236 (synopsis
15237 "Analyze binary and library file information")
15238 (description "This Python library provides interfaces for parsing and
15239 analyzing two binary and library file formats; the Executable and Linking
15240 Format (ELF), and debugging information in the Debugging With Attributed
15241 Record Format (DWARF).")
15242 (license license:public-domain)))
15243
15244 (define-public python-pyev
15245 (package
15246 (name "python-pyev")
15247 (version "0.9.0")
15248 (source
15249 (origin
15250 (method url-fetch)
15251 (uri (pypi-uri "pyev" version))
15252 (sha256
15253 (base32
15254 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
15255 (build-system python-build-system)
15256 (arguments
15257 `(#:tests? #f ; no test suite
15258 #:phases
15259 (modify-phases %standard-phases
15260 (add-after 'unpack 'patch
15261 (lambda* (#:key inputs #:allow-other-keys)
15262 (let ((libev (string-append (assoc-ref inputs "libev")
15263 "/lib/libev.so.4")))
15264 (substitute* "setup.py"
15265 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
15266 (string-append "libev_dll_name = \"" libev "\"")))))))))
15267 (inputs
15268 `(("libev" ,libev)))
15269 (home-page "https://github.com/gabrielfalcao/pyev")
15270 (synopsis "Python libev interface")
15271 (description "Pyev provides a Python interface to libev.")
15272 (license license:gpl3)))
15273
15274 (define-public python2-pyev
15275 (package-with-python2 python-pyev))
15276
15277 (define-public python-imagesize
15278 (package
15279 (name "python-imagesize")
15280 (version "1.2.0")
15281 (source
15282 (origin
15283 (method url-fetch)
15284 (uri (pypi-uri "imagesize" version))
15285 (sha256
15286 (base32
15287 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
15288 (build-system python-build-system)
15289 (home-page "https://github.com/shibukawa/imagesize_py")
15290 (synopsis "Gets image size of files in various formats in Python")
15291 (description
15292 "This package allows determination of image size from
15293 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
15294 (license license:expat)))
15295
15296 (define-public python2-imagesize
15297 (package-with-python2 python-imagesize))
15298
15299 (define-public python-termstyle
15300 (package
15301 (name "python-termstyle")
15302 (version "0.1.11")
15303 (source
15304 (origin
15305 (method url-fetch)
15306 (uri (pypi-uri "termstyle" version))
15307 (sha256
15308 (base32
15309 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
15310 (build-system python-build-system)
15311 (arguments
15312 '(#:phases
15313 (modify-phases %standard-phases
15314 (replace 'check
15315 (lambda _
15316 (invoke "python" "test3.py"))))))
15317 (home-page "https://github.com/gfxmonk/termstyle")
15318 (synopsis "Console text coloring for Python")
15319 (description "This package provides console text coloring for Python.")
15320 (license license:bsd-3)))
15321
15322 (define-public python-argcomplete
15323 (package
15324 (name "python-argcomplete")
15325 (version "1.11.1")
15326 (source
15327 (origin
15328 (method url-fetch)
15329 (uri (pypi-uri "argcomplete" version))
15330 (sha256
15331 (base32
15332 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
15333 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
15334 (build-system python-build-system)
15335 (native-inputs
15336 `(("python-coverage" ,python-coverage)
15337 ("python-flake8" ,python-flake8)
15338 ("python-pexpect" ,python-pexpect)
15339 ("python-wheel" ,python-wheel)
15340 ("tcsh" ,tcsh)
15341 ("fish" ,fish)
15342 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
15343 (home-page "https://github.com/kislyuk/argcomplete")
15344 (synopsis "Shell tab completion for Python argparse")
15345 (description "argcomplete provides extensible command line tab completion
15346 of arguments and options for Python scripts using @code{argparse}. It's
15347 particularly useful for programs with many options or sub-parsers that can
15348 dynamically suggest completions; for example, when browsing resources over the
15349 network.")
15350 (license license:asl2.0)
15351 (properties `((python2-variant . ,(delay python2-argcomplete))))))
15352
15353 (define-public python2-argcomplete
15354 (let ((variant (package-with-python2
15355 (strip-python2-variant python-argcomplete))))
15356 (package/inherit variant
15357 (arguments
15358 (substitute-keyword-arguments (package-arguments variant)
15359 ((#:phases phases '%standard-phases)
15360 `(modify-phases ,phases
15361 (add-after 'unpack 'set-my-HOME
15362 (lambda _ (setenv "HOME" "/tmp")))))))
15363 (native-inputs
15364 `(("python2-importlib-metadata" ,python2-importlib-metadata)
15365 ,@(package-native-inputs variant))))))
15366
15367 (define-public python-csscompressor
15368 (package
15369 (name "python-csscompressor")
15370 (version "0.9.5")
15371 (source
15372 (origin
15373 (method url-fetch)
15374 (uri (pypi-uri "csscompressor" version))
15375 (sha256
15376 (base32
15377 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
15378 (build-system python-build-system)
15379 (arguments
15380 '(#:phases
15381 (modify-phases %standard-phases
15382 (replace 'check
15383 (lambda _
15384 (invoke "py.test"))))))
15385 (native-inputs
15386 `(("python-pytest" ,python-pytest)))
15387 (home-page "https://github.com/sprymix/csscompressor")
15388 (synopsis "Python port of YUI CSS Compressor")
15389 (description
15390 "This package provides a python port of YUI CSS Compressor.")
15391 (license license:bsd-3)))
15392
15393 (define-public python-rcssmin
15394 (package
15395 (name "python-rcssmin")
15396 (version "1.0.6")
15397 (source
15398 (origin
15399 (method url-fetch)
15400 (uri (pypi-uri "rcssmin" version))
15401 (sha256
15402 (base32
15403 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
15404 (build-system python-build-system)
15405 (arguments
15406 '(#:phases
15407 (modify-phases %standard-phases
15408 (replace 'check
15409 (lambda _
15410 (invoke "python" "run_tests.py" "tests"))))))
15411 (home-page "http://opensource.perlig.de/rcssmin/")
15412 (synopsis "CSS Minifier")
15413 (description "The minifier is based on the semantics of the YUI compressor,
15414 which itself is based on the rule list by Isaac Schlueter.")
15415 (license license:asl2.0)))
15416
15417 (define-public python-rjsmin
15418 (package
15419 (name "python-rjsmin")
15420 (version "1.1.0")
15421 (source
15422 (origin
15423 (method url-fetch)
15424 (uri (pypi-uri "rjsmin" version))
15425 (sha256
15426 (base32
15427 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
15428 (modules '((guix build utils)))
15429 (snippet
15430 '(begin
15431 (for-each delete-file (find-files "bench" "\\.js$"))
15432 #t))))
15433 (build-system python-build-system)
15434 (arguments
15435 '(#:tests? #f ; Not all test files included.
15436 #:phases
15437 (modify-phases %standard-phases
15438 (replace 'check
15439 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
15440 (add-installed-pythonpath inputs outputs)
15441 (if tests?
15442 (invoke "py.test" "-vv" "tests")
15443 #t))))))
15444 (native-inputs
15445 `(("python-pytest" ,python-pytest)))
15446 (home-page "http://opensource.perlig.de/rjsmin/")
15447 (synopsis "Javascript Minifier")
15448 (description "@code{rJSmin} is a javascript minifier written in Python. The
15449 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
15450 is a re-implementation aiming for speed, so it can be used at runtime (rather
15451 than during a preprocessing step).")
15452 (license license:asl2.0)))
15453
15454 (define-public python-xopen
15455 (package
15456 (name "python-xopen")
15457 (version "0.5.0")
15458 (source
15459 (origin
15460 (method url-fetch)
15461 (uri (pypi-uri "xopen" version))
15462 (sha256
15463 (base32
15464 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
15465 (build-system python-build-system)
15466 (propagated-inputs
15467 `(("python-setuptools-scm" ,python-setuptools-scm)))
15468 (home-page "https://github.com/marcelm/xopen/")
15469 (synopsis "Open compressed files transparently")
15470 (description "This module provides an @code{xopen} function that works like
15471 Python's built-in @code{open} function, but can also deal with compressed files.
15472 Supported compression formats are gzip, bzip2 and, xz, and are automatically
15473 recognized by their file extensions. The focus is on being as efficient as
15474 possible on all supported Python versions.")
15475 (license license:expat)))
15476
15477 (define-public python2-xopen
15478 (let ((base (package-with-python2
15479 (strip-python2-variant python-xopen))))
15480 (package/inherit base
15481 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
15482 ,@(package-propagated-inputs base))))))
15483
15484 (define-public python-cheetah
15485 (package
15486 (name "python-cheetah")
15487 (version "3.2.4")
15488 (source
15489 (origin
15490 (method url-fetch)
15491 (uri (pypi-uri "Cheetah3" version))
15492 (sha256
15493 (base32
15494 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
15495 (build-system python-build-system)
15496 (arguments
15497 `(#:modules ((guix build utils)
15498 (guix build python-build-system)
15499 (ice-9 ftw)
15500 (srfi srfi-1)
15501 (srfi srfi-26))
15502 #:phases (modify-phases %standard-phases
15503 (add-after 'unpack 'use-absolute-python
15504 (lambda _
15505 (substitute* "Cheetah/CheetahWrapper.py"
15506 (("#!/usr/bin/env python")
15507 (string-append "#!" (which "python"))))
15508 #t))
15509 (add-after 'unpack 'fix-tests
15510 (lambda _
15511 (substitute* "Cheetah/Tests/ImportHooks.py"
15512 (("os.path.dirname\\(__file__\\)")
15513 (string-append "'" (getcwd) "/Cheetah/Tests'")))
15514 #t))
15515 (replace 'check
15516 (lambda _
15517 (let ((cwd (getcwd)))
15518 (setenv "PYTHONPATH"
15519 (string-append
15520 cwd "/build/"
15521 (find (cut string-prefix? "lib" <>)
15522 (scandir (string-append cwd "/build")))
15523 ":" (getenv "PYTHONPATH")))
15524 (setenv "PATH"
15525 (string-append (getenv "PATH")
15526 ":" cwd "/bin"))
15527 (setenv "TMPDIR" "/tmp")
15528
15529 (substitute* "Cheetah/Tests/Test.py"
15530 (("unittest.TextTestRunner\\(\\)")
15531 "unittest.TextTestRunner(verbosity=2)"))
15532
15533 (invoke "python" "Cheetah/Tests/Test.py")))))))
15534 (propagated-inputs
15535 `(("python-markdown" ,python-markdown))) ;optional
15536 (home-page "https://cheetahtemplate.org/")
15537 (synopsis "Template engine")
15538 (description "Cheetah is a text-based template engine and Python code
15539 generator.
15540
15541 Cheetah can be used as a standalone templating utility or referenced as
15542 a library from other Python applications. It has many potential uses,
15543 but web developers looking for a viable alternative to ASP, JSP, PHP and
15544 PSP are expected to be its principle user group.
15545
15546 Features:
15547 @enumerate
15548 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
15549 text-based format.
15550 @item Cleanly separates content, graphic design, and program code.
15551 @item Blends the power and flexibility of Python with a simple template language
15552 that non-programmers can understand.
15553 @item Gives template writers full access to any Python data structure, module,
15554 function, object, or method in their templates.
15555 @item Makes code reuse easy by providing an object-orientated interface to
15556 templates that is accessible from Python code or other Cheetah templates.
15557 One template can subclass another and selectively reimplement sections of it.
15558 @item Provides a simple, yet powerful, caching mechanism that can dramatically
15559 improve the performance of a dynamic website.
15560 @item Compiles templates into optimized, yet readable, Python code.
15561 @end enumerate")
15562 (license (license:x11-style "file://LICENSE"))))
15563
15564 (define-public python2-cheetah
15565 (package-with-python2 python-cheetah))
15566
15567 (define-public python-dulwich
15568 (package
15569 (name "python-dulwich")
15570 (version "0.19.16")
15571 (source
15572 (origin
15573 (method url-fetch)
15574 (uri (list (string-append "https://www.dulwich.io/releases/"
15575 "dulwich-" version ".tar.gz")
15576 (pypi-uri "dulwich" version)))
15577 (sha256
15578 (base32
15579 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
15580 (build-system python-build-system)
15581 (arguments
15582 `(#:phases
15583 (modify-phases %standard-phases
15584 (add-before 'check 'fix-tests
15585 (lambda* (#:key inputs #:allow-other-keys)
15586 ;; The tests use Popen with a custom environment which doesn't
15587 ;; include PATH.
15588 (substitute* "dulwich/tests/compat/utils.py"
15589 (("'git'") (string-append "'"
15590 (which "git")
15591 "'")))
15592 (substitute* '("dulwich/tests/test_repository.py"
15593 "dulwich/tests/test_hooks.py")
15594 (("#!/bin/sh") (string-append "#!" (which "sh"))))
15595 (setenv "TEST_RUNNER" "unittest")
15596 (setenv "PYTHONHASHSEED" "random")
15597 #t)))))
15598 (propagated-inputs
15599 `(("python-fastimport" ,python-fastimport)
15600 ("python-urllib3" ,python-urllib3)))
15601 (native-inputs
15602 `(("python-mock" ,python-mock)
15603 ("python-geventhttpclient" ,python-geventhttpclient)
15604 ("git" ,git)))
15605 (home-page "https://www.dulwich.io/")
15606 (synopsis "Git implementation in Python")
15607 (description "Dulwich is an implementation of the Git file formats and
15608 protocols written in pure Python.")
15609 ;; Can be used with either license.
15610 (license (list license:asl2.0 license:gpl2+))))
15611
15612 (define-public python-pbkdf2
15613 (package
15614 (name "python-pbkdf2")
15615 (version "1.3")
15616 (source
15617 (origin
15618 (method url-fetch)
15619 (uri (pypi-uri "pbkdf2" version))
15620 (sha256
15621 (base32
15622 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
15623 (build-system python-build-system)
15624 (arguments
15625 '(#:phases
15626 (modify-phases %standard-phases
15627 (replace 'check
15628 (lambda _
15629 (setenv "PYTHONPATH"
15630 (string-append (getcwd) "/build/lib:"
15631 (getenv "PYTHONPATH")))
15632 (invoke "python" "test/test_pbkdf2.py"))))))
15633 (propagated-inputs
15634 `(("python-pycrypto" ,python-pycrypto))) ; optional
15635 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
15636 (synopsis "Password-based key derivation")
15637 (description "This module implements the password-based key derivation
15638 function, PBKDF2, specified in RSA PKCS#5 v2.0.
15639
15640 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
15641 is part of the RSA Public Key Cryptography Standards series. The provided
15642 implementation takes a password or a passphrase and a salt value (and
15643 optionally a iteration count, a digest module, and a MAC module) and provides
15644 a file-like object from which an arbitrarily-sized key can be read.")
15645 (license license:expat)))
15646
15647 (define-public python2-pbkdf2
15648 (package-with-python2 python-pbkdf2))
15649
15650 (define-public python-qrcode
15651 (package
15652 (name "python-qrcode")
15653 (version "6.1")
15654 (source
15655 (origin
15656 (method url-fetch)
15657 (uri (pypi-uri "qrcode" version))
15658 (sha256
15659 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
15660 (build-system python-build-system)
15661 (arguments
15662 ;; FIXME: Tests require packaging 'pymaging'.
15663 '(#:tests? #f))
15664 (propagated-inputs
15665 `(("python-lxml" ,python-lxml) ; for SVG output
15666 ("python-pillow" ,python-pillow) ; for PNG output
15667 ("python-six" ,python-six)))
15668 (home-page "https://github.com/lincolnloop/python-qrcode")
15669 (synopsis "QR Code image generator")
15670 (description "This package provides a pure Python QR Code generator
15671 module. It uses the Python Imaging Library (PIL) to allow for the generation
15672 of QR Codes.
15673
15674 In addition this package provides a command line tool to generate QR codes and
15675 either write these QR codes to a file or do the output as ascii art at the
15676 console.")
15677 (license license:bsd-3)))
15678
15679 (define-public python2-qrcode
15680 (package-with-python2 python-qrcode))
15681
15682 (define-public python-rst2ansi
15683 (package
15684 (name "python-rst2ansi")
15685 (version "0.1.5")
15686 (source
15687 (origin
15688 (method url-fetch)
15689 (uri (pypi-uri "rst2ansi" version))
15690 (sha256
15691 (base32
15692 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
15693 (build-system python-build-system)
15694 (propagated-inputs
15695 `(("python-docutils" ,python-docutils)))
15696 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
15697 (synopsis "Convert RST to ANSI-decorated console output")
15698 (description
15699 "Python module dedicated to rendering RST (reStructuredText) documents
15700 to ansi-escaped strings suitable for display in a terminal.")
15701 (license license:expat)))
15702
15703 (define-public python-ansi2html
15704 (package
15705 (name "python-ansi2html")
15706 (version "1.2.0")
15707 (source
15708 (origin
15709 (method url-fetch)
15710 (uri (pypi-uri "ansi2html" version))
15711 (sha256
15712 (base32
15713 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
15714 (build-system python-build-system)
15715 (native-inputs
15716 `(("python-mock" ,python-mock)
15717 ("python-nose" ,python-nose)))
15718 (propagated-inputs
15719 `(("python-six" ,python-six)))
15720 (home-page "https://github.com/ralphbean/ansi2html")
15721 (synopsis "Convert ANSI-decorated console output to HTML")
15722 (description
15723 "@command{ansi2html} is a Python library and command line utility for
15724 converting text with ANSI color codes to HTML or LaTeX.")
15725 (license license:gpl3+)))
15726
15727 (define-public python2-ansi2html
15728 (package-with-python2 python-ansi2html))
15729
15730 (define-public python-ddt
15731 (package
15732 (name "python-ddt")
15733 (version "1.4.1")
15734 (source
15735 (origin
15736 (method url-fetch)
15737 (uri (pypi-uri "ddt" version))
15738 (sha256
15739 (base32
15740 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
15741 (build-system python-build-system)
15742 (native-inputs
15743 `(("python-pytest" ,python-pytest)))
15744 (propagated-inputs
15745 `(("python-pyyaml" ,python-pyyaml)))
15746 (home-page "https://github.com/datadriventests/ddt")
15747 (synopsis "Data-Driven Tests")
15748 (description
15749 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
15750 running it with different test data, and make it appear as multiple test
15751 cases.")
15752 (license license:expat)))
15753
15754 (define-public python-pycountry
15755 (package
15756 (name "python-pycountry")
15757 (version "18.5.26")
15758 (source
15759 (origin
15760 (method url-fetch)
15761 (uri (pypi-uri "pycountry" version))
15762 (sha256
15763 (base32
15764 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
15765 (build-system python-build-system)
15766 (home-page "https://bitbucket.org/flyingcircus/pycountry")
15767 (synopsis "ISO databases for languages, countries, currencies, etc.")
15768 (description
15769 "@code{pycountry} provides the ISO databases for the standards:
15770 @enumerate
15771 @item 639-3 (Languages)
15772 @item 3166 (Countries)
15773 @item 3166-3 (Deleted Countries)
15774 @item 3166-2 (Subdivisions of countries)
15775 @item 4217 (Currencies)
15776 @item 15924 (Scripts)
15777 @end enumerate
15778 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
15779 through a Python API.")
15780 (license license:lgpl2.1+)))
15781
15782 (define-public python2-pycountry
15783 (package-with-python2 python-pycountry))
15784
15785 (define-public python-pycosat
15786 (package
15787 (name "python-pycosat")
15788 (version "0.6.3")
15789 (source
15790 (origin
15791 (method url-fetch)
15792 (uri (pypi-uri "pycosat" version ".zip"))
15793 (sha256
15794 (base32
15795 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
15796 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
15797 (build-system python-build-system)
15798 (native-inputs
15799 `(("unzip" ,unzip)))
15800 (home-page "https://github.com/ContinuumIO/pycosat")
15801 (synopsis "Bindings to picosat (a SAT solver)")
15802 (description
15803 "This package provides efficient Python bindings to @code{picosat} on
15804 the C level. When importing pycosat, the @code{picosat} solver becomes part
15805 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
15806 Problem} (SAT) solver.")
15807 (license license:expat)))
15808
15809 (define-public python2-pycosat
15810 (package-with-python2 python-pycosat))
15811
15812 (define-public python2-ruamel.ordereddict
15813 (package
15814 (name "python2-ruamel.ordereddict")
15815 (version "0.4.9")
15816 (source
15817 (origin
15818 (method url-fetch)
15819 (uri (pypi-uri "ruamel.ordereddict" version))
15820 (sha256
15821 (base32
15822 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
15823 (build-system python-build-system)
15824 (arguments
15825 `(#:python ,python-2
15826 #:phases
15827 (modify-phases %standard-phases
15828 (delete 'check)
15829 (add-after 'install 'check
15830 (lambda* (#:key inputs outputs #:allow-other-keys)
15831 (add-installed-pythonpath inputs outputs)
15832 (invoke "python" "test/testordereddict.py"))))))
15833 (home-page "https://bitbucket.org/ruamel/ordereddict")
15834 (synopsis "Version of dict that keeps keys in insertion order")
15835 (description
15836 "This is an implementation of an ordered dictionary with @dfn{Key
15837 Insertion Order} (KIO: updates of values do not affect the position of the
15838 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15839 removed and put at the back). The standard library module @code{OrderedDict},
15840 implemented later, implements a subset of @code{ordereddict} functionality.
15841 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15842 Order} (KSO, no sorting function can be specified, but a transform can be
15843 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15844 (license license:expat)))
15845
15846 (define-public python-pypeg2
15847 (package
15848 (name "python-pypeg2")
15849 (version "2.15.2")
15850 (source
15851 (origin
15852 (method url-fetch)
15853 (uri (pypi-uri "pyPEG2" version))
15854 (sha256
15855 (base32
15856 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15857 (build-system python-build-system)
15858 (propagated-inputs `(("python-lxml" ,python-lxml)))
15859 (arguments
15860 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15861 '(#:tests? #f))
15862 (home-page "https://fdik.org/pyPEG/")
15863 (synopsis "Parsing Expression Grammars in Python")
15864 (description "PyPEG is an intrinsic parser interpreter framework for
15865 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15866 parse many formal languages.")
15867 (license license:gpl2)))
15868
15869 (define-public python-incremental
15870 (package
15871 (name "python-incremental")
15872 (version "17.5.0")
15873 (source
15874 (origin
15875 (method url-fetch)
15876 (uri (pypi-uri "incremental" version))
15877 (sha256
15878 (base32
15879 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15880 (build-system python-build-system)
15881 (home-page "https://github.com/hawkowl/incremental")
15882 (synopsis "Library for versioning Python projects")
15883 (description "Incremental is a small library that versions your Python
15884 projects.")
15885 (license license:expat)))
15886
15887 (define-public python2-incremental
15888 (package-with-python2 python-incremental))
15889
15890 (define-public python-invoke
15891 (package
15892 (name "python-invoke")
15893 (home-page "https://www.pyinvoke.org/")
15894 (version "1.5.0")
15895 (source (origin
15896 (method url-fetch)
15897 (uri (pypi-uri "invoke" version))
15898 (sha256
15899 (base32
15900 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
15901 (build-system python-build-system)
15902 (arguments
15903 ;; XXX: Requires many dependencies that are not yet in Guix.
15904 `(#:tests? #f
15905 #:phases
15906 (modify-phases %standard-phases
15907 (add-after 'unpack 'fix-bash-path
15908 (lambda* (#:key inputs #:allow-other-keys)
15909 (let ((bash (assoc-ref inputs "bash")))
15910 (substitute* "invoke/config.py"
15911 (("shell = \"/bin/bash\"")
15912 (string-append "shell = \"" bash "/bin/bash\""))
15913 )
15914 #t))))))
15915 (inputs
15916 `(("bash" ,bash-minimal)))
15917 (synopsis "Pythonic task execution")
15918 (description
15919 "Invoke is a Python task execution tool and library, drawing inspiration
15920 from various sources to arrive at a powerful and clean feature set. It is
15921 evolved from the Fabric project, but focuses on local and abstract concerns
15922 instead of servers and network commands.")
15923 (license license:bsd-3)))
15924
15925 (define-public python2-invoke
15926 (package-with-python2 python-invoke))
15927
15928 (define-public python-automat
15929 (package
15930 (name "python-automat")
15931 (version "20.2.0")
15932 (source (origin
15933 (method url-fetch)
15934 (uri (pypi-uri "Automat" version))
15935 (sha256
15936 (base32
15937 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15938 (build-system python-build-system)
15939 ;; We disable the tests because they require python-twisted, while
15940 ;; python-twisted depends on python-automat. Twisted is optional, but the
15941 ;; tests fail if it is not available. Also see
15942 ;; <https://github.com/glyph/automat/issues/71>.
15943 (arguments '(#:tests? #f))
15944 (native-inputs
15945 `(("python-m2r" ,python-m2r)
15946 ("python-setuptools-scm" ,python-setuptools-scm)
15947 ("python-graphviz" ,python-graphviz)))
15948 (propagated-inputs
15949 `(("python-six" ,python-six)
15950 ("python-attrs" ,python-attrs)))
15951 (home-page "https://github.com/glyph/Automat")
15952 (synopsis "Self-service finite-state machines")
15953 (description "Automat is a library for concise, idiomatic Python
15954 expression of finite-state automata (particularly deterministic finite-state
15955 transducers).")
15956 (license license:expat)))
15957
15958 (define-public python2-automat
15959 (package-with-python2 python-automat))
15960
15961 (define-public python-m2r
15962 (package
15963 (name "python-m2r")
15964 (version "0.2.1")
15965 (source (origin
15966 (method url-fetch)
15967 (uri (pypi-uri "m2r" version))
15968 (sha256
15969 (base32
15970 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15971 (build-system python-build-system)
15972 (propagated-inputs
15973 `(("python-docutils" ,python-docutils)
15974 ("python-mistune" ,python-mistune)))
15975 (native-inputs
15976 `(("python-pygments" ,python-pygments)
15977 ("python-mock" ,python-mock)))
15978 (home-page "https://github.com/miyakogi/m2r")
15979 (synopsis "Markdown to reStructuredText converter")
15980 (description "M2R converts a markdown file including reST markups to valid
15981 reST format.")
15982 (license license:expat)))
15983
15984 (define-public python2-m2r
15985 (package-with-python2 python-m2r))
15986
15987 (define-public python-constantly
15988 (package
15989 (name "python-constantly")
15990 (version "15.1.0")
15991 (source (origin
15992 (method url-fetch)
15993 (uri (pypi-uri "constantly" version))
15994 (sha256
15995 (base32
15996 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15997 (build-system python-build-system)
15998 (home-page "https://github.com/twisted/constantly")
15999 (synopsis "Symbolic constants in Python")
16000 (description "Constantly is a Python library that provides symbolic
16001 constant support. It includes collections and constants with text, numeric,
16002 and bit flag values.")
16003 (license license:expat)))
16004
16005 (define-public python2-constantly
16006 (package-with-python2 python-constantly))
16007
16008 (define-public python-attrs
16009 (package
16010 (name "python-attrs")
16011 (version "19.3.0")
16012 (source (origin
16013 (method url-fetch)
16014 (uri (pypi-uri "attrs" version))
16015 (sha256
16016 (base32
16017 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
16018 (build-system python-build-system)
16019 (arguments
16020 `(#:modules ((guix build utils)
16021 (guix build python-build-system)
16022 (ice-9 ftw)
16023 (srfi srfi-1)
16024 (srfi srfi-26))
16025 #:phases (modify-phases %standard-phases
16026 (replace 'check
16027 (lambda _
16028 (let ((cwd (getcwd)))
16029 (setenv "PYTHONPATH"
16030 (string-append
16031 cwd "/build/"
16032 (find (cut string-prefix? "lib" <>)
16033 (scandir (string-append cwd "/build")))
16034 ":"
16035 (getenv "PYTHONPATH")))
16036 (invoke "python" "-m" "pytest")))))))
16037 (native-inputs
16038 `(("python-coverage" ,python-coverage)
16039 ("python-hypothesis" ,python-hypothesis)
16040 ("python-pympler" ,python-pympler)
16041 ("python-pytest" ,python-pytest)
16042 ("python-six" ,python-six)
16043 ("python-sphinx" ,python-sphinx)
16044 ("python-zope-interface" ,python-zope-interface)))
16045 (home-page "https://github.com/python-attrs/attrs/")
16046 (synopsis "Attributes without boilerplate")
16047 (description "@code{attrs} is a Python package with class decorators that
16048 ease the chores of implementing the most common attribute-related object
16049 protocols.")
16050 (license license:expat)))
16051
16052 (define-public python2-attrs
16053 (package-with-python2 python-attrs))
16054
16055 (define-public python-attrs-bootstrap
16056 (package
16057 (inherit python-attrs)
16058 (name "python-attrs-bootstrap")
16059 (native-inputs `())
16060 (arguments `(#:tests? #f))))
16061
16062 (define-public python2-attrs-bootstrap
16063 (package-with-python2 python-attrs-bootstrap))
16064
16065 (define-public python2-cliapp
16066 (package
16067 (name "python2-cliapp")
16068 (version "1.20180812.1")
16069 (source
16070 (origin
16071 (method url-fetch)
16072 (uri (string-append
16073 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
16074 version ".tar.gz"))
16075 (sha256
16076 (base32
16077 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
16078 (build-system python-build-system)
16079 (arguments
16080 `(#:python ,python-2
16081 #:phases
16082 (modify-phases %standard-phases
16083 ;; check phase needs to be run before the build phase. If not,
16084 ;; coverage-test-runner looks for tests for the built source files,
16085 ;; and fails.
16086 (delete 'check)
16087 (add-before 'build 'check
16088 (lambda _
16089 ;; Disable python3 tests
16090 (substitute* "check"
16091 (("python3") "# python3"))
16092 (invoke "./check"))))))
16093 (native-inputs
16094 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
16095 ("python2-pep8" ,python2-pep8)))
16096 (propagated-inputs
16097 `(("python2-pyaml" ,python2-pyaml)))
16098 (home-page "https://liw.fi/cliapp/")
16099 (synopsis "Python framework for command line programs")
16100 (description "@code{python2-cliapp} is a python framework for
16101 command line programs. It contains the typical stuff such programs
16102 need to do, such as parsing the command line for options, and
16103 iterating over input files.")
16104 (license license:gpl2+)))
16105
16106 (define-public python2-ttystatus
16107 (package
16108 (name "python2-ttystatus")
16109 (version "0.38")
16110 (source
16111 (origin
16112 (method git-fetch)
16113 (uri (git-reference
16114 (url "http://git.liw.fi/ttystatus")
16115 ;; There are no tags after ttystatus-0.36.
16116 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
16117 (sha256
16118 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
16119 (file-name (git-file-name name version))))
16120 (build-system python-build-system)
16121 (native-inputs
16122 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
16123 ("python2-pep8" ,python2-pep8)))
16124 (arguments
16125 `(#:python ,python-2
16126 #:phases
16127 (modify-phases %standard-phases
16128 ;; check phase needs to be run before the build phase. If not,
16129 ;; coverage-test-runner looks for tests for the built source files,
16130 ;; and fails.
16131 (delete 'check)
16132 (add-before 'build 'check
16133 (lambda _ (invoke "make" "check"))))))
16134 (home-page "https://liw.fi/ttystatus/")
16135 (synopsis "Python library for showing progress reporting and
16136 status updates on terminals")
16137 (description "@code{python2-ttystatus} is a python library for
16138 showing progress reporting and status updates on terminals, for
16139 command line programs. Output is automatically adapted to the width
16140 of the terminal: truncated if it does not fit, and resized if the
16141 terminal size changes.")
16142 (license license:gpl3+)))
16143
16144 (define-public python2-tracing
16145 (package
16146 (name "python2-tracing")
16147 (version "0.10")
16148 (source
16149 (origin
16150 (method url-fetch)
16151 (uri (string-append
16152 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
16153 version ".tar.gz"))
16154 (sha256
16155 (base32
16156 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
16157 (build-system python-build-system)
16158 (arguments
16159 `(#:python ,python-2))
16160 (home-page "https://liw.fi/tracing/")
16161 (synopsis "Python debug logging helper")
16162 (description "@code{python2-tracing} is a python library for
16163 logging debug messages. It provides a way to turn debugging messages
16164 on and off, based on the filename they occur in. It is much faster
16165 than using @code{logging.Filter} to accomplish the same thing, which
16166 matters when code is run in production mode. The actual logging still
16167 happens using the @code{logging} library.")
16168 (license license:gpl3+)))
16169
16170 (define-public python2-larch
16171 (package
16172 (name "python2-larch")
16173 (version "1.20151025")
16174 (source
16175 (origin
16176 (method url-fetch)
16177 (uri (string-append
16178 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
16179 version ".tar.gz"))
16180 (patches (search-patches
16181 "python2-larch-coverage-4.0a6-compatibility.patch"))
16182 (sha256
16183 (base32
16184 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
16185 (build-system python-build-system)
16186 (arguments
16187 `(#:python ,python-2
16188 #:phases
16189 (modify-phases %standard-phases
16190 ;; check phase needs to be run before the build phase. If not,
16191 ;; coverage-test-runner looks for tests for the built source files,
16192 ;; and fails.
16193 (delete 'check)
16194 (add-before 'build 'check
16195 (lambda _ (invoke "make" "check"))))))
16196 (native-inputs
16197 `(("cmdtest" ,cmdtest)
16198 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
16199 (propagated-inputs
16200 `(("python2-tracing" ,python2-tracing)))
16201 (home-page "https://liw.fi/larch/")
16202 (synopsis "Python copy-on-write B-tree library")
16203 (description "@code{python2-larch} is an implementation of
16204 particular kind of B-tree, based on research by Ohad Rodeh. See
16205 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
16206 on the data structure.
16207
16208 The distinctive feature of this B-tree is that a node is never
16209 (conceptually) modified. Instead, all updates are done by
16210 copy-on-write. This makes it easy to clone a tree, and modify only the
16211 clone, while other processes access the original tree.")
16212 (license license:gpl3+)))
16213
16214 (define-public python-astroid
16215 (package
16216 (name "python-astroid")
16217 (version "2.4.2")
16218 (source
16219 (origin
16220 (method url-fetch)
16221 (uri (pypi-uri "astroid" version))
16222 (sha256
16223 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
16224 (modules '((guix build utils)))
16225 (snippet
16226 '(begin
16227 ;; Check to see if the version pinning has been removed.
16228 (substitute* "astroid/__pkginfo__.py"
16229 (("==1\\.4\\.\\*") ">=1.4.0"))
16230 #t))))
16231 (build-system python-build-system)
16232 (propagated-inputs
16233 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
16234 ("python-six" ,python-six)
16235 ("python-wrapt" ,python-wrapt)))
16236 (native-inputs
16237 `(("python-dateutil" ,python-dateutil)
16238 ("python-pytest" ,python-pytest)
16239 ("python-pytest-runner" ,python-pytest-runner)))
16240 (home-page "https://github.com/PyCQA/astroid")
16241 (synopsis "Common base representation of python source code for pylint and
16242 other projects")
16243 (description "@code{python-astroid} provides a common base representation
16244 of python source code for projects such as pychecker, pyreverse, pylint, etc.
16245
16246 It provides a compatible representation which comes from the _ast module. It
16247 rebuilds the tree generated by the builtin _ast module by recursively walking
16248 down the AST and building an extended ast. The new node classes have
16249 additional methods and attributes for different usages. They include some
16250 support for static inference and local name scopes. Furthermore, astroid
16251 builds partial trees by inspecting living objects.")
16252 (license license:lgpl2.1+)
16253 (properties `((python2-variant . ,(delay python2-astroid))))))
16254
16255 (define-public python2-astroid
16256 (let ((base (package-with-python2
16257 (strip-python2-variant python-astroid))))
16258 (package (inherit base)
16259 ;; Version 2.x removes python2 support.
16260 (version "1.6.5")
16261 (source
16262 (origin
16263 (method url-fetch)
16264 (uri (pypi-uri "astroid" version))
16265 (sha256
16266 (base32
16267 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
16268 (arguments
16269 (substitute-keyword-arguments (package-arguments base)
16270 ((#:phases phases)
16271 `(modify-phases ,phases
16272 (add-after 'unpack 'remove-spurious-test
16273 (lambda _
16274 ;; https://github.com/PyCQA/astroid/issues/276
16275 (delete-file "astroid/tests/unittest_brain.py")
16276 #t))
16277 (replace 'check
16278 (lambda _
16279 (invoke"python" "-m" "unittest" "discover"
16280 "-p" "unittest*.py")))))))
16281 (native-inputs `())
16282 (propagated-inputs
16283 `(("python2-backports-functools-lru-cache"
16284 ,python2-backports-functools-lru-cache)
16285 ("python2-enum34" ,python2-enum34)
16286 ("python2-singledispatch" ,python2-singledispatch)
16287 ,@(alist-delete "python-typed-ast"
16288 (package-propagated-inputs base)))))))
16289
16290 (define-public python-isbnlib
16291 (package
16292 (name "python-isbnlib")
16293 (version "3.10.4")
16294 (source
16295 (origin
16296 (method url-fetch)
16297 (uri (pypi-uri "isbnlib" version))
16298 (sha256
16299 (base32
16300 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
16301 (build-system python-build-system)
16302 (arguments '(#:tests? #f)) ; No test
16303 (home-page "https://github.com/xlcnd/isbnlib")
16304 (synopsis "Python library to work with ISBN strings")
16305 (description "@code{python-isbnlib} is a (pure) python library that provides
16306 several useful methods and functions to validate, clean, transform, hyphenate and
16307 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
16308 version, is suitable to be include as a dependency in other projects.")
16309 (license license:lgpl3+)))
16310
16311 (define-public python-isort
16312 (package
16313 (name "python-isort")
16314 (version "4.3.4")
16315 (source
16316 (origin
16317 (method git-fetch)
16318 (uri (git-reference
16319 ;; Tests pass only from the Github sources
16320 (url "https://github.com/timothycrosley/isort")
16321 (commit version)))
16322 (file-name (git-file-name name version))
16323 (sha256
16324 (base32
16325 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
16326 (build-system python-build-system)
16327 (native-inputs
16328 `(("python-mock" ,python-mock)
16329 ("python-pytest" ,python-pytest)))
16330 (home-page "https://github.com/timothycrosley/isort")
16331 (synopsis "Python utility/library to sort python imports")
16332 (description "@code{python-isort} is a python utility/library to sort
16333 imports alphabetically, and automatically separated into sections. It
16334 provides a command line utility, a python library and plugins for various
16335 editors.")
16336 (license license:expat)
16337 (properties `((python2-variant . ,(delay python2-isort))))))
16338
16339 (define-public python2-isort
16340 (let ((base (package-with-python2
16341 (strip-python2-variant python-isort))))
16342 (package/inherit base
16343 (native-inputs
16344 `(("python2-futures" ,python2-futures)
16345 ,@(package-native-inputs base))))))
16346
16347 (define-public python2-backports-functools-lru-cache
16348 (package
16349 (name "python2-backports-functools-lru-cache")
16350 (version "1.6.1")
16351 (source
16352 (origin
16353 (method url-fetch)
16354 ;; only the pypi tarballs contain the necessary metadata
16355 (uri (pypi-uri "backports.functools_lru_cache" version))
16356 (sha256
16357 (base32
16358 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
16359 (build-system python-build-system)
16360 (native-inputs
16361 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
16362 (arguments
16363 `(#:python ,python-2))
16364 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
16365 (synopsis "Backport of functools.lru_cache from Python 3.3")
16366 (description "@code{python2-backports-functools-lru-cache} is a backport
16367 of @code{functools.lru_cache} from python 3.3.")
16368 (license license:expat)))
16369
16370 (define-public python-configparser
16371 (package
16372 (name "python-configparser")
16373 (version "4.0.2")
16374 (source
16375 (origin
16376 (method url-fetch)
16377 (uri (pypi-uri "configparser" version))
16378 (sha256
16379 (base32
16380 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
16381 (native-inputs
16382 `(("python-setuptools_scm" ,python-setuptools-scm)))
16383 (build-system python-build-system)
16384 (home-page "https://github.com/jaraco/configparser/")
16385 (synopsis "Backport of configparser from python 3.5")
16386 (description "@code{python-configparser} is a backport of
16387 @code{configparser} from Python 3.5 so that it can be used directly
16388 in other versions.")
16389 (license license:expat)))
16390
16391 (define-public python2-configparser
16392 (package-with-python2 python-configparser))
16393
16394 (define-public python-iniconfig
16395 (package
16396 (name "python-iniconfig")
16397 (version "1.1.1")
16398 (source
16399 (origin
16400 (method url-fetch)
16401 (uri (pypi-uri "iniconfig" version))
16402 (sha256
16403 (base32
16404 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
16405 (build-system python-build-system)
16406 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
16407 (synopsis "Simple INI-file parser")
16408 (description "The @code{iniconfig} package provides a small and simple
16409 INI-file parser module having a unique set of features; @code{iniconfig}
16410 @itemize
16411 @item maintains the order of sections and entries;
16412 @item supports multi-line values with or without line-continuations;
16413 @item supports \"#\" comments everywhere;
16414 @item raises errors with proper line-numbers;
16415 @item raises an error when two sections have the same name.
16416 @end itemize")
16417 (license license:expat)))
16418
16419 (define-public python-mamba
16420 (package
16421 (name "python-mamba")
16422 (version "0.11.2")
16423 (source (origin
16424 (method url-fetch)
16425 (uri (pypi-uri "mamba" version))
16426 (sha256
16427 (base32
16428 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
16429 (build-system python-build-system)
16430 (arguments `(#:tests? #f)) ; No test
16431 (propagated-inputs
16432 `(("python-clint" ,python-clint)
16433 ("python-coverage" ,python-coverage)))
16434 (home-page "https://nestorsalceda.com/mamba/")
16435 (synopsis "Test runner for Python")
16436 (description
16437 "Mamba is a Behaviour-Driven Development tool for Python developers.
16438 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
16439 (license license:expat)))
16440
16441 (define-public python-mando
16442 (package
16443 (name "python-mando")
16444 (version "0.6.4")
16445 (source (origin
16446 (method url-fetch)
16447 (uri (pypi-uri "mando" version))
16448 (sha256
16449 (base32
16450 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
16451 (build-system python-build-system)
16452 (propagated-inputs
16453 `(("python-rst2ansi" ,python-rst2ansi)
16454 ("python-six" ,python-six)))
16455 (native-inputs
16456 `(("python-pytest" ,python-pytest)))
16457 (home-page "https://mando.readthedocs.org/")
16458 (synopsis
16459 "Wrapper around argparse, allowing creation of complete CLI applications")
16460 (description
16461 "This package is a wrapper around argparse, allowing you to write complete CLI
16462 applications in seconds while maintaining all the flexibility.")
16463 (license license:expat)))
16464
16465 (define-public python2-mando
16466 (package-with-python2 python-mando))
16467
16468 (define-public python2-argparse
16469 (package
16470 (name "python2-argparse")
16471 (version "1.4.0")
16472 (source
16473 (origin
16474 (method url-fetch)
16475 (uri (pypi-uri "argparse" version))
16476 (sha256
16477 (base32
16478 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
16479 (build-system python-build-system)
16480 (arguments
16481 `(#:python ,python-2))
16482 (home-page "https://github.com/ThomasWaldmann/argparse/")
16483 (synopsis "Python command-line parsing library")
16484 (description
16485 "This package is mostly for people who want to have @code{argparse} on
16486 older Pythons because it was not part of the standard library back then.")
16487 (license license:psfl)))
16488
16489 (define-public python-fudge
16490 (package
16491 (name "python-fudge")
16492 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
16493 ;; package, which is currently the only use of this package.
16494 (version "0.9.6")
16495 (source
16496 (origin
16497 (method url-fetch)
16498 (uri (pypi-uri "fudge" version))
16499 (sha256
16500 (base32
16501 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
16502 (build-system python-build-system)
16503 (arguments
16504 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
16505 (home-page "https://github.com/fudge-py/fudge")
16506 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
16507 (description
16508 "Fudge is a Python module for using fake objects (mocks and stubs) to
16509 test real ones.
16510
16511 In readable Python code, you declare the methods available on your fake object
16512 and how they should be called. Then you inject that into your application and
16513 start testing. This declarative approach means you don’t have to record and
16514 playback actions and you don’t have to inspect your fakes after running code.
16515 If the fake object was used incorrectly then you’ll see an informative
16516 exception message with a traceback that points to the culprit.")
16517 (license license:expat)))
16518
16519 (define-public python2-fudge
16520 (package-with-python2 python-fudge))
16521
16522 (define-public python-mwclient
16523 (package
16524 (name "python-mwclient")
16525 (version "0.10.1")
16526 (source
16527 (origin
16528 (method git-fetch)
16529 ;; The PyPI version wouldn't contain tests.
16530 (uri (git-reference
16531 (url "https://github.com/mwclient/mwclient")
16532 (commit (string-append "v" version))))
16533 (file-name (git-file-name name version))
16534 (sha256
16535 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
16536 (build-system python-build-system)
16537 (propagated-inputs
16538 `(("python-requests-oauthlib" ,python-requests-oauthlib)
16539 ("python-six" ,python-six)))
16540 (native-inputs
16541 `(("python-mock" ,python-mock)
16542 ("python-pytest" ,python-pytest)
16543 ("python-pytest-cov" ,python-pytest-cov)
16544 ("python-pytest-runner" ,python-pytest-runner)
16545 ("python-responses" ,python-responses)))
16546 (home-page "https://github.com/btongminh/mwclient")
16547 (synopsis "MediaWiki API client")
16548 (description "This package provides a MediaWiki API client.")
16549 (license license:expat)))
16550
16551 (define-public python-utils
16552 (package
16553 (name "python-utils")
16554 (version "2.4.0")
16555 (source (origin
16556 (method url-fetch)
16557 (uri (pypi-uri "python-utils" version))
16558 (sha256
16559 (base32
16560 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
16561 (build-system python-build-system)
16562 (arguments
16563 `(#:phases
16564 (modify-phases %standard-phases
16565 (replace 'check
16566 (lambda* (#:key inputs outputs #:allow-other-keys)
16567 (add-installed-pythonpath inputs outputs)
16568 (delete-file "pytest.ini")
16569 (invoke "pytest" "-vv"))))))
16570 (native-inputs
16571 `(("pytest-runner" ,python-pytest-runner)
16572 ("pytest" ,python-pytest)
16573 ("six" ,python-six)))
16574 (home-page "https://github.com/WoLpH/python-utils")
16575 (synopsis "Convenient utilities not included with the standard Python install")
16576 (description
16577 "Python Utils is a collection of small Python functions and classes which
16578 make common patterns shorter and easier.")
16579 (license license:bsd-2)))
16580
16581 (define-public python-diff-match-patch
16582 (package
16583 (name "python-diff-match-patch")
16584 (version "20121119")
16585 (source
16586 (origin
16587 (method url-fetch)
16588 (uri (pypi-uri "diff-match-patch" version))
16589 (sha256
16590 (base32
16591 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
16592 (build-system python-build-system)
16593 (home-page "https://code.google.com/p/google-diff-match-patch")
16594 (synopsis "Synchronize plain text")
16595 (description "Diff Match and Patch libraries offer robust algorithms to
16596 perform the operations required for synchronizing plain text.")
16597 (license license:asl2.0)))
16598
16599 (define-public python2-diff-match-patch
16600 (package-with-python2 python-diff-match-patch))
16601
16602 (define-public python-dirsync
16603 (package
16604 (name "python-dirsync")
16605 (version "2.2.5")
16606 (source
16607 (origin
16608 (method url-fetch)
16609 (uri (pypi-uri "dirsync" version))
16610 (sha256
16611 (base32
16612 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
16613 (build-system python-build-system)
16614 (propagated-inputs
16615 `(("six" ,python-six)))
16616 (home-page "https://github.com/tkhyn/dirsync")
16617 (synopsis "Advanced directory tree synchronisation tool")
16618 (description "Advanced directory tree synchronisation tool.")
16619 (license license:expat)))
16620
16621 (define-public python2-dirsync
16622 (package-with-python2 python-dirsync))
16623
16624 (define-public python-levenshtein
16625 (package
16626 (name "python-levenshtein")
16627 (version "0.12.0")
16628 (source
16629 (origin
16630 (method url-fetch)
16631 (uri (pypi-uri "python-Levenshtein" version))
16632 (sha256
16633 (base32
16634 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
16635 (build-system python-build-system)
16636 (home-page "https://github.com/ztane/python-Levenshtein")
16637 (synopsis "Fast computation of Levenshtein distance and string similarity")
16638 (description
16639 "The Levenshtein Python C extension module contains functions for fast computation of
16640 @enumerate
16641 @item Levenshtein (edit) distance, and edit operations
16642 @item string similarity
16643 @item approximate median strings, and generally string averaging
16644 @item string sequence and set similarity
16645 @end enumerate
16646 It supports both normal and Unicode strings.")
16647 (license license:gpl2+)))
16648
16649 (define-public python2-levenshtein
16650 (package-with-python2 python-levenshtein))
16651
16652 (define-public python-scandir
16653 (package
16654 (name "python-scandir")
16655 (version "1.10.0")
16656 (source
16657 (origin
16658 (method url-fetch)
16659 (uri (pypi-uri "scandir" version))
16660 (sha256
16661 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
16662 (build-system python-build-system)
16663 (arguments
16664 `(#:phases (modify-phases %standard-phases
16665 (replace 'check
16666 (lambda _
16667 (invoke "python" "test/run_tests.py"))))))
16668 (home-page "https://github.com/benhoyt/scandir")
16669 (synopsis "Directory iteration function")
16670 (description
16671 "Directory iteration function like os.listdir(), except that instead of
16672 returning a list of bare filenames, it yields DirEntry objects that include
16673 file type and stat information along with the name. Using scandir() increases
16674 the speed of os.walk() by 2-20 times (depending on the platform and file
16675 system) by avoiding unnecessary calls to os.stat() in most cases.
16676
16677 This package is part of the Python standard library since version 3.5.")
16678 (license license:bsd-3)))
16679
16680 (define-public python2-scandir
16681 (package-with-python2 python-scandir))
16682
16683 (define-public python2-stemming
16684 (package
16685 (name "python2-stemming")
16686 (version "1.0.1")
16687 (source
16688 (origin
16689 (method url-fetch)
16690 (uri (pypi-uri "stemming" version))
16691 (sha256
16692 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
16693 (build-system python-build-system)
16694 (arguments
16695 `(#:python ,python-2))
16696 (home-page "https://bitbucket.org/mchaput/stemming/overview")
16697 (synopsis "Python implementations of various stemming algorithms")
16698 (description
16699 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
16700 stemming algorithms for English. These implementations are straightforward and
16701 efficient, unlike some Python versions of the same algorithms available on the
16702 Web. This package is an extraction of the stemming code included in the Whoosh
16703 search engine.")
16704 (license license:public-domain)))
16705
16706 (define-public python-factory-boy
16707 (package
16708 (name "python-factory-boy")
16709 (version "2.8.1")
16710 (source
16711 (origin
16712 (method url-fetch)
16713 (uri (pypi-uri "factory_boy" version))
16714 (sha256
16715 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
16716 (build-system python-build-system)
16717 (arguments
16718 ;; Tests are not included in the tarball.
16719 `(#:tests? #f))
16720 (propagated-inputs
16721 `(("faker" ,python-faker)))
16722 (home-page "https://github.com/benhoyt/scandir")
16723 (synopsis "Versatile test fixtures replacement")
16724 (description
16725 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
16726
16727 As a fixtures replacement tool, it aims to replace static, hard to maintain
16728 fixtures with easy-to-use factories for complex object.
16729
16730 Instead of building an exhaustive test setup with every possible combination
16731 of corner cases, factory_boy allows you to use objects customized for the
16732 current test, while only declaring the test-specific fields")
16733 (license license:expat)))
16734
16735 (define-public python2-factory-boy
16736 (package-with-python2 python-factory-boy))
16737
16738 (define-public python-translate-toolkit
16739 (package
16740 (name "python-translate-toolkit")
16741 (version "2.1.0")
16742 (source
16743 (origin
16744 (method url-fetch)
16745 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
16746 (sha256
16747 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
16748 (build-system python-build-system)
16749 (native-inputs
16750 `(("python-pytest" ,python-pytest)
16751 ("python-sphinx" ,python-sphinx)))
16752 (propagated-inputs
16753 `(("python-babel" ,python-babel)
16754 ("python-beautifulsoup4" ,python-beautifulsoup4)
16755 ("python-chardet" ,python-chardet)
16756 ("python-diff-match-patch" ,python-diff-match-patch)
16757 ("python-levenshtein" ,python-levenshtein)
16758 ("python-lxml" ,python-lxml)
16759 ("python-six" ,python-six)
16760 ("python-vobject" ,python-vobject)
16761 ("python-pyyaml" ,python-pyyaml)))
16762 (arguments
16763 ;; TODO: tests are not run, because they end with
16764 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
16765 ;; 'parse_funcs'
16766 ;; during test setup.
16767 `(#:tests? #f))
16768 (home-page "https://toolkit.translatehouse.org")
16769 (synopsis "Tools and API for translation and localization engineering")
16770 (description
16771 "Tools and API for translation and localization engineering. It contains
16772 several utilities, as well as an API for building localization tools.")
16773 (license license:gpl2+)))
16774
16775 (define-public python2-translate-toolkit
16776 (package-with-python2 python-translate-toolkit))
16777
16778 (define-public python-packaging
16779 (package
16780 (name "python-packaging")
16781 (version "20.0")
16782 (source
16783 (origin
16784 (method url-fetch)
16785 (uri (pypi-uri "packaging" version))
16786 ;; XXX: The URL in the patch file is wrong, it should be
16787 ;; <https://github.com/pypa/packaging/pull/256>.
16788 (patches (search-patches "python-packaging-test-arch.patch"))
16789 (sha256
16790 (base32
16791 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
16792 (build-system python-build-system)
16793 (arguments
16794 `(#:phases (modify-phases %standard-phases
16795 (replace 'check
16796 (lambda* (#:key tests? #:allow-other-keys)
16797 (if tests?
16798 (invoke "py.test" "-vv")
16799 (format #t "test suite not run~%"))
16800 #t)))))
16801 (native-inputs
16802 `(("python-pretend" ,python-pretend)
16803 ("python-pytest" ,python-pytest)))
16804 (propagated-inputs
16805 `(("python-pyparsing" ,python-pyparsing)
16806 ("python-six" ,python-six)))
16807 (home-page "https://github.com/pypa/packaging")
16808 (synopsis "Core utilities for Python packages")
16809 (description "Packaging is a Python module for dealing with Python packages.
16810 It offers an interface for working with package versions, names, and dependency
16811 information.")
16812 ;; From 'LICENSE': This software is made available under the terms of
16813 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
16814 ;; Contributions to this software is made under the terms of *both* these
16815 ;; licenses.
16816 (license (list license:asl2.0 license:bsd-2))))
16817
16818 (define-public python2-packaging
16819 (package-with-python2 python-packaging))
16820
16821 ;; Variants with minimal dependencies, for bootstrapping Pytest.
16822 (define-public python-packaging-bootstrap
16823 (hidden-package
16824 (package/inherit
16825 python-packaging
16826 (name "python-packaging-bootstrap")
16827 (native-inputs '())
16828 (propagated-inputs
16829 `(("python-pyparsing" ,python-pyparsing)))
16830 (arguments '(#:tests? #f)))))
16831
16832 (define-public python2-packaging-bootstrap
16833 (hidden-package
16834 (package/inherit
16835 python2-packaging
16836 (name "python2-packaging-bootstrap")
16837 (native-inputs '())
16838 (propagated-inputs
16839 `(("python-pyparsing" ,python2-pyparsing)))
16840 (arguments
16841 `(#:tests? #f
16842 ,@(package-arguments python2-packaging))))))
16843
16844 (define-public python-relatorio
16845 (package
16846 (name "python-relatorio")
16847 (version "0.8.0")
16848 (source
16849 (origin
16850 (method url-fetch)
16851 (uri (pypi-uri "relatorio" version))
16852 (sha256
16853 (base32
16854 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16855 (build-system python-build-system)
16856 (propagated-inputs
16857 `(("python-lxml" ,python-lxml)
16858 ("python-genshi" ,python-genshi)))
16859 (native-inputs
16860 `(("python-magic" ,python-magic)))
16861 (home-page "https://relatorio.tryton.org/")
16862 (synopsis "Templating library able to output ODT and PDF files")
16863 (description "Relatorio is a templating library which provides a way to
16864 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16865 for more filetypes can be easily added by creating plugins for them.")
16866 (license license:gpl3+)))
16867
16868 (define-public python2-relatorio
16869 (package-with-python2 python-relatorio))
16870
16871 (define-public python-radon
16872 (package
16873 (name "python-radon")
16874 (version "4.1.0")
16875 (source
16876 (origin
16877 (method url-fetch)
16878 (uri (pypi-uri "radon" version))
16879 (sha256
16880 (base32
16881 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
16882 (build-system python-build-system)
16883 (arguments
16884 `(#:phases (modify-phases %standard-phases
16885 (replace 'check
16886 (lambda _
16887 (invoke "python" "radon/tests/run.py"))))))
16888 (propagated-inputs
16889 `(("python-colorama" ,python-colorama)
16890 ("python-flake8-polyfill" ,python-flake8-polyfill)
16891 ("python-mando" ,python-mando)))
16892 (native-inputs
16893 `(("python-pytest" ,python-pytest)
16894 ("python-pytest-mock" ,python-pytest-mock)))
16895 (home-page "https://radon.readthedocs.org/")
16896 (synopsis "Code Metrics in Python")
16897 (description "Radon is a Python tool which computes various code metrics.
16898 Supported metrics are:
16899 @itemize @bullet
16900 @item raw metrics: SLOC, comment lines, blank lines, &c.
16901 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16902 @item Halstead metrics (all of them)
16903 @item the Maintainability Index (a Visual Studio metric)
16904 @end itemize")
16905 (properties `((python2-variant . ,(delay python2-radon))))
16906 (license license:expat)))
16907
16908 (define-public python2-radon
16909 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16910 (package/inherit base
16911 (propagated-inputs
16912 `(("python-configparser" ,python2-configparser)
16913 ("python-future" ,python2-future)
16914 ,@(package-propagated-inputs base))))))
16915
16916 (define-public python-sure
16917 (package
16918 (name "python-sure")
16919 (version "1.4.11")
16920 (source
16921 (origin
16922 (method url-fetch)
16923 (uri (pypi-uri "sure" version))
16924 (sha256
16925 (base32
16926 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16927 (build-system python-build-system)
16928 (propagated-inputs
16929 `(("python-mock" ,python-mock)
16930 ("python-six" ,python-six)))
16931 (native-inputs
16932 `(("python-nose" ,python-nose)))
16933 (home-page "https://github.com/gabrielfalcao/sure")
16934 (synopsis "Automated testing library in python for python")
16935 (description
16936 "Sure is a python library that leverages a DSL for writing assertions.
16937 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16938 (license license:gpl3+)))
16939
16940 (define-public python2-sure
16941 (package-with-python2 python-sure))
16942
16943 (define-public python2-couleur
16944 ;; This package does not seem to support python3 at all, hence,
16945 ;; only the python2 variant definition is provided.
16946 (package
16947 (name "python2-couleur")
16948 (version "0.6.2")
16949 (source
16950 (origin
16951 (method url-fetch)
16952 (uri (pypi-uri "couleur" version))
16953 (sha256
16954 (base32
16955 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16956 (build-system python-build-system)
16957 (arguments
16958 `(#:python ,python-2))
16959 (home-page "https://github.com/gabrielfalcao/couleur")
16960 (synopsis
16961 "ANSI terminal tool for python, colored shell and other handy fancy features")
16962 (description
16963 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16964 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16965 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16966 ;; https://github.com/gabrielfalcao/couleur/issues/11
16967 (license license:lgpl3+)))
16968
16969 (define-public python-misaka
16970 (package
16971 (name "python-misaka")
16972 (version "2.1.1")
16973 (source
16974 (origin
16975 (method url-fetch)
16976 (uri (pypi-uri "misaka" version))
16977 (sha256
16978 (base32
16979 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16980 (build-system python-build-system)
16981 (arguments
16982 `(;; Line 37 of setup.py calls self.run_command('develop')
16983 ;; in the 'check' phase. This command seems to be trying
16984 ;; to write to
16985 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16986 ;; for which it does not have the permission to write.
16987 #:tests? #f))
16988 (propagated-inputs
16989 `(("python-cffi" ,python-cffi)))
16990 (home-page "https://github.com/FSX/misaka")
16991 (synopsis "Python binding for Hoedown")
16992 (description
16993 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16994 library written in C. It features a fast HTML renderer and functionality to make custom
16995 renderers (e.g. man pages or LaTeX).")
16996 (license license:expat)))
16997
16998 (define-public python2-misaka
16999 (package-with-python2 python-misaka))
17000
17001 (define-public python2-steadymark
17002 ;; This is forced into being a python2 only variant
17003 ;; due to its dependence on couleur that has no support
17004 ;; for python3
17005 (package
17006 (name "python2-steadymark")
17007 (version "0.7.3")
17008 (source
17009 (origin
17010 (method url-fetch)
17011 (uri (pypi-uri "steadymark" version))
17012 (sha256
17013 (base32
17014 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
17015 (build-system python-build-system)
17016 (native-inputs
17017 `(("python-couleur" ,python2-couleur)
17018 ("python-sure" ,python2-sure)
17019 ("python-misaka" ,python2-misaka)))
17020 (arguments
17021 `(#:python ,python-2
17022 #:phases
17023 (modify-phases %standard-phases
17024 (add-before 'build 'patch-setup-py
17025 (lambda _
17026 ;; Update requirements from dependency==version
17027 ;; to dependency>=version
17028 (substitute* "setup.py"
17029 (("==") ">="))
17030 #t)))))
17031 (home-page "https://github.com/gabrielfalcao/steadymark")
17032 (synopsis "Markdown-based test runner for python")
17033 (description
17034 "@code{Steadymark} allows documentation to be written in github-flavoured
17035 markdown. The documentation may contain snippets of code surrounded by python
17036 code blocks and @code{Steadymark} will find these snippets and run them, making
17037 sure that there are no old malfunctional examples in the documentation examples.")
17038 (license license:expat)))
17039
17040 (define-public python-jsonpointer
17041 (package
17042 (name "python-jsonpointer")
17043 (version "1.10")
17044 (source
17045 (origin
17046 (method url-fetch)
17047 (uri (pypi-uri "jsonpointer" version))
17048 (sha256
17049 (base32
17050 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
17051 (build-system python-build-system)
17052 (home-page "https://github.com/stefankoegl/python-json-pointer")
17053 (synopsis "Identify specific nodes in a JSON document")
17054 (description "@code{jsonpointer} allows you to access specific nodes
17055 by path in a JSON document (see RFC 6901).")
17056 (license license:bsd-3)))
17057
17058 (define-public python2-jsonpointer
17059 (package-with-python2 python-jsonpointer))
17060
17061 (define-public python-jsonpatch
17062 (package
17063 (name "python-jsonpatch")
17064 (version "1.16")
17065 (source
17066 (origin
17067 (method git-fetch)
17068 ;; pypi version lacks tests.js
17069 (uri (git-reference
17070 (url "https://github.com/stefankoegl/python-json-patch")
17071 (commit (string-append "v" version))))
17072 (file-name (git-file-name name version))
17073 (sha256
17074 (base32
17075 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
17076 (build-system python-build-system)
17077 (propagated-inputs
17078 `(("python-jsonpointer" ,python-jsonpointer)))
17079 (home-page "https://github.com/stefankoegl/python-json-patch")
17080 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
17081 (description "@code{jsonpatch} is a library and program that allows
17082 applying JSON Patches according to RFC 6902.")
17083 (license license:bsd-3)))
17084
17085 (define-public python2-jsonpatch
17086 (package-with-python2 python-jsonpatch))
17087
17088 (define-public python-jsonpatch-0.4
17089 (package (inherit python-jsonpatch)
17090 (name "python-jsonpatch")
17091 (version "0.4")
17092 (source
17093 (origin
17094 (method git-fetch)
17095 (uri (git-reference
17096 (url "https://github.com/stefankoegl/python-json-patch")
17097 (commit (string-append "v" version))))
17098 (file-name (git-file-name name version))
17099 (sha256
17100 (base32
17101 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
17102
17103 (define-public python2-jsonpatch-0.4
17104 (package-with-python2 python-jsonpatch-0.4))
17105
17106 (define-public python-rfc3986
17107 (package
17108 (name "python-rfc3986")
17109 (version "1.4.0")
17110 (source (origin
17111 (method url-fetch)
17112 (uri (pypi-uri "rfc3986" version))
17113 (sha256
17114 (base32
17115 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
17116 (build-system python-build-system)
17117 (arguments
17118 `(#:modules ((guix build utils)
17119 (guix build python-build-system)
17120 (ice-9 ftw)
17121 (srfi srfi-1)
17122 (srfi srfi-26))
17123 #:phases
17124 (modify-phases %standard-phases
17125 (replace 'check
17126 (lambda _
17127 (let ((cwd (getcwd)))
17128 (setenv "PYTHONPATH"
17129 (string-append cwd "/build/"
17130 (find (cut string-prefix? "lib" <>)
17131 (scandir (string-append cwd "/build")))
17132 ":"
17133 (getenv "PYTHONPATH")))
17134 (invoke "pytest" "-v")))))))
17135 (native-inputs
17136 `(("python-pytest" ,python-pytest)))
17137 (home-page "https://rfc3986.readthedocs.io/")
17138 (synopsis "Parse and validate URI references")
17139 (description
17140 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
17141 validation and authority parsing. This module also supports RFC@tie{}6874
17142 which adds support for zone identifiers to IPv6 addresses.")
17143 (license license:asl2.0)))
17144
17145 (define-public python2-rfc3986
17146 (package-with-python2 python-rfc3986))
17147
17148 (define-public python-rfc3987
17149 (package
17150 (name "python-rfc3987")
17151 (version "1.3.7")
17152 (source
17153 (origin
17154 (method url-fetch)
17155 (uri (pypi-uri "rfc3987" version))
17156 (sha256
17157 (base32
17158 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
17159 (build-system python-build-system)
17160 (home-page "https://pypi.org/project/rfc3987/")
17161 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
17162 (description "@code{rfc3987} provides routines for parsing and
17163 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
17164 (license license:gpl3+)))
17165
17166 (define-public python2-rfc3987
17167 (package-with-python2 python-rfc3987))
17168
17169 ;; The latest commit contains fixes for building with both python3 and python2.
17170 (define-public python-rfc6555
17171 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
17172 (revision "1"))
17173 (package
17174 (name "python-rfc6555")
17175 (version (git-version "0.0.0" revision commit))
17176 (source (origin
17177 (method git-fetch)
17178 (uri (git-reference
17179 (url "https://github.com/sethmlarson/rfc6555")
17180 (commit commit)))
17181 (file-name (git-file-name name version))
17182 (sha256
17183 (base32
17184 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
17185 (build-system python-build-system)
17186 (arguments
17187 '(#:phases
17188 (modify-phases %standard-phases
17189 (replace 'check
17190 (lambda* (#:key tests? #:allow-other-keys)
17191 (if tests?
17192 ;; Other tests require network access.
17193 (invoke "pytest" "tests/test_ipv6.py")
17194 #t))))))
17195 (native-inputs
17196 `(("python-pytest" ,python-pytest)))
17197 (home-page "https://pypi.org/project/rfc6555/")
17198 (synopsis "Python implementation of RFC 6555")
17199 (description
17200 "Python implementation of the Happy Eyeballs Algorithm described in RFC
17201 6555. Provided with a single file and dead-simple API to allow easy vendoring
17202 and integration into other projects.")
17203 (properties `((python2-variant . ,(delay python2-rfc6555))))
17204 (license license:asl2.0))))
17205
17206 (define-public python2-rfc6555
17207 (let ((base (package-with-python2
17208 (strip-python2-variant python-rfc6555))))
17209 (package/inherit base
17210 (propagated-inputs
17211 `(("python2-selectors2" ,python2-selectors2))))))
17212
17213 (define-public python-bagit
17214 (package
17215 (name "python-bagit")
17216 (version "1.7.0")
17217 (source
17218 (origin
17219 (method url-fetch)
17220 (uri (pypi-uri "bagit" version))
17221 (sha256
17222 (base32
17223 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
17224 (build-system python-build-system)
17225 (native-inputs
17226 `(("python-setuptools-scm" ,python-setuptools-scm)
17227 ("python-coverage" ,python-coverage)
17228 ("python-mock" ,python-mock)))
17229 (home-page "https://libraryofcongress.github.io/bagit-python/")
17230 (synopsis "Create and validate BagIt packages")
17231 (description "Bagit is a Python library and command line utility for working
17232 with BagIt style packages. BagIt is a minimalist packaging format for digital
17233 preservation.")
17234 (license license:cc0)))
17235
17236 (define-public python-prov
17237 (package
17238 (name "python-prov")
17239 (version "2.0.0")
17240 (source
17241 (origin
17242 (method url-fetch)
17243 (uri (pypi-uri "prov" version))
17244 (sha256
17245 (base32
17246 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
17247 (build-system python-build-system)
17248 (propagated-inputs
17249 `(("python-dateutil" ,python-dateutil)
17250 ("python-lxml" ,python-lxml)
17251 ("python-networkx" ,python-networkx)
17252 ("python-rdflib" ,python-rdflib)))
17253 (native-inputs
17254 `(("graphviz" ,graphviz)
17255 ("python-pydot" ,python-pydot)))
17256 (home-page "https://github.com/trungdong/prov")
17257 (synopsis
17258 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
17259 (description
17260 "This package provides a library for W3C Provenance Data Model supporting
17261 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
17262 (license license:expat)))
17263
17264 (define-public python-arcp
17265 (package
17266 (name "python-arcp")
17267 (version "0.2.1")
17268 (source
17269 (origin
17270 (method url-fetch)
17271 (uri (pypi-uri "arcp" version))
17272 (sha256
17273 (base32
17274 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
17275 (build-system python-build-system)
17276 (native-inputs
17277 `(("python-pytest" ,python-pytest)))
17278 (home-page "http://arcp.readthedocs.io/")
17279 (synopsis
17280 "Archive and Package URI parser and generator")
17281 (description
17282 "@acronym{arcp, Archive and Package} provides functions for creating
17283 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
17284 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
17285 consume or reference hypermedia resources bundled inside a file archive or an
17286 application package, as well as to resolve URIs for archive resources within a
17287 programmatic framework. This URI scheme provides mechanisms to generate a
17288 unique base URI to represent the root of the archive, so that relative URI
17289 references in a bundled resource can be resolved within the archive without
17290 having to extract the archive content on the local file system. An arcp URI can
17291 be used for purposes of isolation (e.g. when consuming multiple archives),
17292 security constraints (avoiding \"climb out\" from the archive), or for
17293 externally identiyfing sub-resources referenced by hypermedia formats.")
17294 (license license:asl2.0)))
17295
17296 (define-public python-shellescape
17297 (package
17298 (name "python-shellescape")
17299 (version "3.8.1")
17300 (source
17301 (origin
17302 (method git-fetch)
17303 (uri (git-reference
17304 (url "https://github.com/chrissimpkins/shellescape")
17305 (commit (string-append "v" version))))
17306 (file-name (git-file-name name version))
17307 (sha256
17308 (base32
17309 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
17310 (build-system python-build-system)
17311 (arguments
17312 '(#:phases
17313 (modify-phases %standard-phases
17314 (replace 'check
17315 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
17316 (when tests?
17317 (add-installed-pythonpath inputs outputs)
17318 (invoke "python" "tests/test_shellescape.py"))
17319 #t)))))
17320 (native-inputs
17321 `(("python-pytest" ,python-pytest)))
17322 (home-page "https://github.com/chrissimpkins/shellescape")
17323 (synopsis
17324 "Shell escape a string to safely use it as a token in a shell command")
17325 (description
17326 "The shellescape Python module defines the @code{shellescape.quote()}
17327 function that returns a shell-escaped version of a Python string. This is a
17328 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
17329 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
17330 (license license:expat)))
17331
17332 (define-public python-validators
17333 (package
17334 (name "python-validators")
17335 (version "0.14.2")
17336 (source (origin
17337 (method url-fetch)
17338 (uri (pypi-uri "validators" version))
17339 (sha256
17340 (base32
17341 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
17342 (build-system python-build-system)
17343 (arguments
17344 '(#:phases (modify-phases %standard-phases
17345 (replace 'check
17346 (lambda _
17347 (invoke "pytest" "-vv"))))))
17348 (propagated-inputs
17349 `(("python-decorator" ,python-decorator)
17350 ("python-six" ,python-six)))
17351 (native-inputs
17352 `(("python-flake8" ,python-flake8)
17353 ("python-isort" ,python-isort)
17354 ("python-pytest" ,python-pytest)))
17355 (home-page "https://github.com/kvesteri/validators")
17356 (synopsis "Data validation library")
17357 (description
17358 "This package contains validators for different things such as email
17359 addresses, IP addresses, URLs, hashes and more. It has been designed to
17360 be easy to use and not require defining a schema or form just to validate
17361 some input.")
17362 (license license:expat)))
17363
17364 (define-public python2-validators
17365 (package-with-python2 python-validators))
17366
17367 (define-public python-validate-email
17368 (package
17369 (name "python-validate-email")
17370 (version "1.3")
17371 (source
17372 (origin
17373 (method url-fetch)
17374 (uri (pypi-uri "validate_email" version))
17375 (sha256
17376 (base32
17377 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
17378 (build-system python-build-system)
17379 (home-page "https://github.com/syrusakbary/validate_email")
17380 (synopsis "Verifies if an email address is valid and really exists")
17381 (description "@code{validate_email} can be used to verify if an email
17382 address is valid and really exists.")
17383 (license license:lgpl3+)))
17384
17385 (define-public python2-validate-email
17386 (package-with-python2 python-validate-email))
17387
17388 (define-public python-flex
17389 (package
17390 (name "python-flex")
17391 (version "6.10.0")
17392 (source
17393 (origin
17394 (method url-fetch)
17395 (uri (pypi-uri "flex" version))
17396 (sha256
17397 (base32
17398 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
17399 (build-system python-build-system)
17400 (propagated-inputs
17401 `(("python-click" ,python-click)
17402 ("python-iso8601" ,python-iso8601)
17403 ("python-jsonpointer" ,python-jsonpointer)
17404 ("python-pyyaml" ,python-pyyaml)
17405 ("python-requests" ,python-requests)
17406 ("python-rfc3987" ,python-rfc3987)
17407 ("python-six" ,python-six)
17408 ("python-validate-email" ,python-validate-email)))
17409 (home-page "https://github.com/pipermerriam/flex")
17410 (synopsis "Validates Swagger schemata")
17411 (description "@code{flex} can be used to validate Swagger schemata.")
17412 (license license:bsd-3)))
17413
17414 (define-public python2-flex
17415 (package-with-python2 python-flex))
17416
17417 (define-public python-marshmallow
17418 (package
17419 (name "python-marshmallow")
17420 (version "3.9.1")
17421 (source
17422 (origin
17423 (method url-fetch)
17424 (uri (pypi-uri "marshmallow" version))
17425 (sha256
17426 (base32
17427 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
17428 (build-system python-build-system)
17429 (propagated-inputs
17430 `(("python-dateutil" ,python-dateutil)
17431 ("python-simplejson" ,python-simplejson)))
17432 (native-inputs
17433 `(("python-pytest" ,python-pytest)
17434 ("python-pytz" ,python-pytz)))
17435 (home-page "https://github.com/marshmallow-code/marshmallow")
17436 (synopsis "Convert complex datatypes to and from native
17437 Python datatypes.")
17438 (description "@code{marshmallow} provides a library for converting
17439 complex datatypes to and from native Python datatypes.")
17440 (license license:expat)))
17441
17442 (define-public python-apispec
17443 (package
17444 (name "python-apispec")
17445 (version "4.0.0")
17446 (source
17447 (origin
17448 (method url-fetch)
17449 (uri (pypi-uri "apispec" version))
17450 (sha256
17451 (base32
17452 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
17453 (build-system python-build-system)
17454 (arguments
17455 '(#:phases (modify-phases %standard-phases
17456 (add-after 'unpack 'disable-prance-tests
17457 (lambda _
17458 ;; Disable validation tests since they require the
17459 ;; optional 'prance' library which is not yet in Guix.
17460 (substitute* "tests/test_ext_marshmallow_openapi.py"
17461 (("def test_openapi_tools_validate.*" all)
17462 (string-append "@pytest.mark.xfail\n" all)))))
17463 (replace 'check
17464 (lambda _
17465 (setenv "PYTHONPATH"
17466 (string-append "./build/lib:"
17467 (getenv "PYTHONPATH")))
17468 (invoke "pytest" "-vv"))))))
17469 (propagated-inputs
17470 `(("python-pyyaml" ,python-pyyaml)))
17471 (native-inputs
17472 `(("python-pytest" ,python-pytest)
17473 ("python-marshmallow" ,python-marshmallow)))
17474 (home-page "https://github.com/marshmallow-code/apispec")
17475 (synopsis "Swagger/OpenAPI specification generator")
17476 (description "@code{python-apispec} is a pluggable API specification
17477 generator. It currently supports the OpenAPI specification, formerly known
17478 as Swagger.")
17479 (license license:expat)))
17480
17481 (define-public python-flasgger
17482 (package
17483 (name "python-flasgger")
17484 (version "0.6.3")
17485 (source
17486 (origin
17487 (method git-fetch)
17488 (uri (git-reference
17489 (url "https://github.com/rochacbruno/flasgger")
17490 (commit version)))
17491 (file-name (git-file-name name version))
17492 (sha256
17493 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
17494 (build-system python-build-system)
17495 (arguments
17496 `(#:phases
17497 (modify-phases %standard-phases
17498 (replace 'check
17499 (lambda* (#:key inputs outputs #:allow-other-keys)
17500 (substitute* "Makefile"
17501 (("flake8 flasgger --ignore=F403")
17502 "flake8 flasgger --ignore=E731,F403"))
17503 (setenv "PYTHONPATH" (string-append (getcwd)
17504 ":"
17505 (getenv "PYTHONPATH")))
17506 (invoke "py.test"))))))
17507 (propagated-inputs
17508 `(("python-flask" ,python-flask)
17509 ("python-pyyaml" ,python-pyyaml)
17510 ("python-jsonschema" ,python-jsonschema)
17511 ("python-mistune" ,python-mistune)
17512 ("python-six" ,python-six)))
17513 (native-inputs
17514 `(("python-decorator" ,python-decorator)
17515 ("python-flake8" ,python-flake8)
17516 ("python-flask-restful" ,python-flask-restful)
17517 ("python-flex" ,python-flex)
17518 ("python-pytest" ,python-pytest)
17519 ("python-pytest-cov" ,python-pytest-cov)
17520 ("python-marshmallow" ,python-marshmallow)
17521 ("python-apispec" ,python-apispec)))
17522 (home-page "https://github.com/rochacbruno/flasgger/")
17523 (synopsis "Extract Swagger specs from your Flask project")
17524 (description "@code{python-flasgger} allows extracting Swagger specs
17525 from your Flask project. It is a fork of Flask-Swagger.")
17526 (license license:expat)))
17527
17528 (define-public python-swagger-spec-validator
17529 (package
17530 (name "python-swagger-spec-validator")
17531 (version "2.4.3")
17532 (source
17533 (origin
17534 (method url-fetch)
17535 (uri (pypi-uri "swagger-spec-validator" version))
17536 (sha256
17537 (base32
17538 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
17539 (build-system python-build-system)
17540 (propagated-inputs
17541 `(("python-jsonschema" ,python-jsonschema)
17542 ("python-pyyaml" ,python-pyyaml)
17543 ("python-six" ,python-six)))
17544 (home-page
17545 "https://github.com/Yelp/swagger_spec_validator")
17546 (synopsis "Validation of Swagger specifications")
17547 (description "@code{swagger_spec_validator} provides a library for
17548 validating Swagger API specifications.")
17549 (license license:asl2.0)))
17550
17551 (define-public python2-swagger-spec-validator
17552 (package-with-python2 python-swagger-spec-validator))
17553
17554 (define-public python-apache-libcloud
17555 (package
17556 (name "python-apache-libcloud")
17557 (version "3.1.0")
17558 (source
17559 (origin
17560 (method url-fetch)
17561 (uri (pypi-uri "apache-libcloud" version))
17562 (sha256
17563 (base32
17564 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
17565 (build-system python-build-system)
17566 (arguments
17567 `(#:phases
17568 (modify-phases %standard-phases
17569 (add-after 'unpack 'patch-ssh
17570 (lambda* (#:key inputs #:allow-other-keys)
17571 (substitute* "libcloud/compute/ssh.py"
17572 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
17573 "/bin/ssh" "'")))
17574 #t))
17575 (add-after 'unpack 'patch-tests
17576 (lambda _
17577 (substitute* "libcloud/test/compute/test_ssh_client.py"
17578 (("class ShellOutSSHClientTests")
17579 "@unittest.skip(\"Guix container doesn't have ssh service\")
17580 class ShellOutSSHClientTests"))
17581 #t))
17582 (add-before 'check 'copy-secret
17583 (lambda _
17584 (copy-file "libcloud/test/secrets.py-dist"
17585 "libcloud/test/secrets.py")
17586 #t)))))
17587 (inputs
17588 `(("openssh" ,openssh)))
17589 (propagated-inputs
17590 `(("python-paramiko" ,python-paramiko)
17591 ("python-requests" ,python-requests)))
17592 (native-inputs
17593 `(("python-lockfile" ,python-lockfile)
17594 ("python-mock" ,python-mock)
17595 ("python-pytest" ,python-pytest)
17596 ("python-pytest-runner" ,python-pytest-runner)
17597 ("python-requests-mock" ,python-requests-mock)))
17598 (home-page "https://libcloud.apache.org/")
17599 (synopsis "Unified Cloud API")
17600 (description "@code{libcloud} is a Python library for interacting with
17601 many of the popular cloud service providers using a unified API.")
17602 (license license:asl2.0)))
17603
17604 (define-public python-smmap
17605 (package
17606 (name "python-smmap")
17607 (version "3.0.1")
17608 (source
17609 (origin
17610 (method url-fetch)
17611 (uri (pypi-uri "smmap" version))
17612 (sha256
17613 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
17614 (build-system python-build-system)
17615 (native-inputs
17616 `(("python-nosexcover" ,python-nosexcover)))
17617 (home-page "https://github.com/Byron/smmap")
17618 (synopsis "Python sliding window memory map manager")
17619 (description "@code{smmap} is a pure Python implementation of a sliding
17620 window memory map manager.")
17621 (license license:bsd-3)))
17622
17623 (define-public python-smmap2
17624 (deprecated-package "python-smmap2" python-smmap))
17625
17626 (define-public python2-smmap
17627 (package-with-python2 python-smmap))
17628
17629 (define-public python2-smmap2
17630 (deprecated-package "python2-smmap2" python2-smmap))
17631
17632 (define-public python-regex
17633 (package
17634 (name "python-regex")
17635 (version "2020.6.8")
17636 (source (origin
17637 (method url-fetch)
17638 (uri (pypi-uri "regex" version))
17639 (sha256
17640 (base32
17641 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
17642 (build-system python-build-system)
17643 (arguments
17644 '(#:phases
17645 (modify-phases %standard-phases
17646 (replace 'check
17647 (lambda* (#:key inputs outputs #:allow-other-keys)
17648 (add-installed-pythonpath inputs outputs)
17649 (invoke "python" "-c"
17650 "from regex.test_regex import test_main; test_main()"))))))
17651 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
17652 (synopsis "Alternative regular expression module")
17653 (description "This regular expression implementation is backwards-
17654 compatible with the standard @code{re} module, but offers additional
17655 functionality like full case-folding for case-insensitive matches in Unicode.")
17656 (license license:psfl)))
17657
17658 (define-public python2-regex
17659 (package-with-python2 python-regex))
17660
17661 (define-public python-pyopengl
17662 (package
17663 (name "python-pyopengl")
17664 (version "3.1.5")
17665 (source
17666 (origin
17667 (method url-fetch)
17668 (uri (pypi-uri "PyOpenGL" version))
17669 (sha256
17670 (base32
17671 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
17672 (build-system python-build-system)
17673 (inputs
17674 `(("mesa" ,mesa)
17675 ("freeglut" ,freeglut)
17676 ("glu" ,glu)))
17677 (arguments
17678 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
17679 ;attribute 'OSMesa'
17680 #:phases
17681 (modify-phases %standard-phases
17682 (add-before 'build 'fix-paths
17683 (lambda* (#:key inputs outputs #:allow-other-keys)
17684 (substitute* '("OpenGL/platform/ctypesloader.py")
17685 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
17686 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
17687 (("'GL'")
17688 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
17689 (("'GLU'")
17690 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
17691 (("'glut',")
17692 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
17693 (("'GLESv1_CM'")
17694 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
17695 (("'GLESv2'")
17696 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
17697 ;; Not providing libgle. It seems to be very old.
17698 #t)))))
17699 (home-page "http://pyopengl.sourceforge.net")
17700 (synopsis "Standard OpenGL bindings for Python")
17701 (description
17702 "PyOpenGL is the most common cross platform Python binding to OpenGL and
17703 related APIs. The binding is created using the standard @code{ctypes}
17704 library.")
17705 (license license:bsd-3)))
17706
17707 (define-public python-pyopengl-accelerate
17708 (package
17709 (inherit python-pyopengl)
17710 (name "python-pyopengl-accelerate")
17711 (version "3.1.5")
17712 (source
17713 (origin
17714 (method url-fetch)
17715 (uri (pypi-uri "PyOpenGL-accelerate" version))
17716 (sha256
17717 (base32
17718 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
17719 (inputs
17720 `(("mesa" ,mesa)
17721 ("python-numpy" ,python-numpy))) ; for cython module
17722 ; numpy_formathandler, thus not propagated
17723 (arguments
17724 `(#:tests? #f
17725 #:phases
17726 (modify-phases %standard-phases
17727 (delete 'fix-paths))))
17728 (synopsis "Acceleration code for PyOpenGL")
17729 (description
17730 "This is the Cython-coded accelerator module for PyOpenGL.")))
17731
17732 (define-public python-rencode
17733 (package
17734 (name "python-rencode")
17735 (version "1.0.5")
17736 (source
17737 (origin
17738 (method url-fetch)
17739 (uri (pypi-uri "rencode" version))
17740 (sha256
17741 (base32
17742 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
17743 (build-system python-build-system)
17744 (arguments
17745 `(#:phases
17746 (modify-phases %standard-phases
17747 (add-before 'check 'delete-bogus-test
17748 ;; This test requires /home/aresch/Downloads, which is not provided by
17749 ;; the build environment.
17750 (lambda _
17751 (delete-file "rencode/t.py")
17752 #t)))))
17753 (native-inputs `(("pkg-config" ,pkg-config)
17754 ("python-cython" ,python-cython)))
17755 (home-page "https://github.com/aresch/rencode")
17756 (synopsis "Serialization of heterogeneous data structures")
17757 (description
17758 "The @code{rencode} module is a data structure serialization library,
17759 similar to @code{bencode} from the BitTorrent project. For complex,
17760 heterogeneous data structures with many small elements, r-encoding stake up
17761 significantly less space than b-encodings. This version of rencode is a
17762 complete rewrite in Cython to attempt to increase the performance over the
17763 pure Python module.")
17764 (license license:bsd-3)))
17765
17766 (define-public python2-rencode
17767 (package-with-python2 python-rencode))
17768
17769 (define-public python-xenon
17770 (package
17771 (name "python-xenon")
17772 (version "0.7.0")
17773 (source
17774 (origin
17775 (method url-fetch)
17776 (uri (pypi-uri "xenon" version))
17777 (sha256
17778 (base32
17779 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
17780 (build-system python-build-system)
17781 (native-inputs
17782 `(("python-pyyaml" ,python-pyyaml)
17783 ("python-radon" ,python-radon)
17784 ("python-requests" ,python-requests)
17785 ("python-flake8" ,python-flake8)
17786 ("python-tox" ,python-tox)))
17787 (arguments
17788 `(#:tests? #f ;test suite not shipped with the PyPI archive
17789 #:phases
17790 (modify-phases %standard-phases
17791 (add-before 'build 'patch-test-requirements
17792 (lambda _
17793 ;; Remove httpretty dependency for tests.
17794 (substitute* "setup.py"
17795 (("httpretty") ""))
17796 #t)))))
17797 (home-page "https://xenon.readthedocs.org/")
17798 (synopsis "Monitor code metrics for Python on your CI server")
17799 (description
17800 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
17801 Ideally, @code{xenon} is run every time code is committed. Through command
17802 line options, various thresholds can be set for the complexity of code. It
17803 will fail (i.e. it will exit with a non-zero exit code) when any of these
17804 requirements is not met.")
17805 (license license:expat)))
17806
17807 (define-public python-pysocks
17808 (package
17809 (name "python-pysocks")
17810 (version "1.7.1")
17811 (source
17812 (origin
17813 (method url-fetch)
17814 (uri (pypi-uri "PySocks" version))
17815 (sha256
17816 (base32
17817 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
17818 (build-system python-build-system)
17819 (arguments `(#:tests? #f))
17820 (home-page "https://github.com/Anorov/PySocks")
17821 (synopsis "SOCKS client module")
17822 (description "@code{pysocks} is an updated and semi-actively maintained
17823 version of @code{SocksiPy} with bug fixes and extra features.")
17824 (license license:bsd-3)))
17825
17826 (define-public python2-pysocks
17827 (package-with-python2 python-pysocks))
17828
17829 (define-public python-pydiff
17830 (package
17831 (name "python-pydiff")
17832 (version "0.2")
17833 (source
17834 (origin
17835 (method url-fetch)
17836 (uri (pypi-uri "pydiff" version))
17837 (sha256
17838 (base32
17839 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17840 (build-system python-build-system)
17841 (home-page "https://github.com/myint/pydiff")
17842 (synopsis "Library to diff two Python files at the bytecode level")
17843 (description
17844 "@code{pydiff} makes it easy to look for actual code changes while
17845 ignoring formatting changes.")
17846 (license license:expat)))
17847
17848 (define-public python2-pydiff
17849 (package-with-python2 python-pydiff))
17850
17851 (define-public python-pydub
17852 (package
17853 (name "python-pydub")
17854 (version "0.24.1")
17855 (source
17856 (origin
17857 (method url-fetch)
17858 (uri (pypi-uri "pydub" version))
17859 (sha256
17860 (base32
17861 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17862 (build-system python-build-system)
17863 (arguments
17864 `(#:phases
17865 (modify-phases %standard-phases
17866 (add-after 'unpack 'fix-ffmpeg-path
17867 (lambda* (#:key inputs #:allow-other-keys)
17868 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17869 (substitute* '("pydub/utils.py")
17870 (("return \"ffmpeg\"")
17871 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17872 (("return \"ffplay\"")
17873 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17874 (("return \"ffprobe\"")
17875 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17876 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17877 #t))))))
17878 (home-page "https://pydub.com")
17879 (inputs
17880 `(("ffmpeg" ,ffmpeg)))
17881 (propagated-inputs
17882 `(("python-scipy" ,python-scipy)))
17883 (synopsis "Manipulate audio with a high level interface in Python")
17884 (description
17885 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17886 @code{ffmpeg} to open various audio formats.")
17887 (license license:expat))) ; MIT license
17888
17889 (define-public python-tqdm
17890 (package
17891 (name "python-tqdm")
17892 (version "4.43.0")
17893 (source
17894 (origin
17895 (method url-fetch)
17896 (uri (pypi-uri "tqdm" version))
17897 (sha256
17898 (base32
17899 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17900 (build-system python-build-system)
17901 (arguments
17902 '(#:phases (modify-phases %standard-phases
17903 (replace 'check
17904 (lambda* (#:key inputs outputs #:allow-other-keys)
17905 (add-installed-pythonpath inputs outputs)
17906 ;; This invokation is taken from tox.ini.
17907 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17908 "-d" "-v" "tqdm/"))))))
17909 (native-inputs
17910 `(("python-nose" ,python-nose)))
17911 (home-page "https://github.com/tqdm/tqdm")
17912 (synopsis "Fast, extensible progress meter")
17913 (description
17914 "Make loops show a progress bar on the console by just wrapping any
17915 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17916 design and layout.")
17917 (license (list license:mpl2.0 license:expat))))
17918
17919 (define-public python2-tqdm
17920 (package-with-python2 python-tqdm))
17921
17922 (define-public python-pkginfo
17923 (package
17924 (name "python-pkginfo")
17925 (version "1.7.0")
17926 (source
17927 (origin
17928 (method url-fetch)
17929 (uri (pypi-uri "pkginfo" version))
17930 (sha256
17931 (base32
17932 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
17933 (build-system python-build-system)
17934 (arguments
17935 `(#:phases
17936 (modify-phases %standard-phases
17937 (add-before 'check 'patch-tests
17938 (lambda _
17939 (substitute* "pkginfo/tests/test_installed.py"
17940 (("test_ctor_w_package_no_PKG_INFO")
17941 "_test_ctor_w_package_no_PKG_INFO"))
17942 #t)))))
17943 (home-page
17944 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17945 (synopsis
17946 "Query metadatdata from sdists, bdists, and installed packages")
17947 (description
17948 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17949 source distriubtion (an sdist) or a binary distribution (e.g., created by
17950 running bdist_egg). It can also query the EGG-INFO directory of an installed
17951 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17952 created by running @code{python setup.py develop}).")
17953 (license license:expat)))
17954
17955 (define-public python2-pkginfo
17956 (package-with-python2 python-pkginfo))
17957
17958 (define-public python-twine
17959 (package
17960 (name "python-twine")
17961 (version "1.15.0")
17962 (source
17963 (origin
17964 (method url-fetch)
17965 (uri (pypi-uri "twine" version))
17966 (sha256
17967 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17968 (build-system python-build-system)
17969 (propagated-inputs
17970 `(("python-tqdm" ,python-tqdm)
17971 ("python-packaging" ,python-packaging)
17972 ("python-pkginfo" ,python-pkginfo)
17973 ("python-readme-renderer" ,python-readme-renderer)
17974 ("python-requests" ,python-requests)
17975 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17976 (home-page "https://github.com/pypa/twine")
17977 (synopsis "Collection of utilities for interacting with PyPI")
17978 (description
17979 "@code{twine} currently supports registering projects and uploading
17980 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17981 their files and supports any packaging format (including wheels).")
17982 (license license:asl2.0)))
17983
17984 (define-public python2-twine
17985 (package-with-python2 python-twine))
17986
17987 (define-public python-linecache2
17988 (package
17989 (name "python-linecache2")
17990 (version "1.0.0")
17991 (source
17992 (origin
17993 (method url-fetch)
17994 (uri (pypi-uri "linecache2" version))
17995 (sha256
17996 (base32
17997 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17998 (build-system python-build-system)
17999 (arguments
18000 `(;; The tests depend on unittest2, and our version is a bit too old.
18001 #:tests? #f))
18002 (native-inputs
18003 `(("python-pbr" ,python-pbr-minimal)))
18004 (home-page
18005 "https://github.com/testing-cabal/linecache2")
18006 (synopsis "Backports of the linecache module")
18007 (description
18008 "The linecache module allows one to get any line from any file, while
18009 attempting to optimize internally, using a cache, the common case where many
18010 lines are read from a single file.")
18011 (license license:psfl)))
18012
18013 (define-public python2-linecache2
18014 (package-with-python2 python-linecache2))
18015
18016 (define-public python-traceback2
18017 (package
18018 (name "python-traceback2")
18019 (version "1.4.0")
18020 (source
18021 (origin
18022 (method url-fetch)
18023 (uri (pypi-uri "traceback2" version))
18024 (sha256
18025 (base32
18026 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
18027 (build-system python-build-system)
18028 (arguments
18029 `(;; python-traceback2 and python-unittest2 depend on one another.
18030 #:tests? #f))
18031 (native-inputs
18032 `(("python-pbr" ,python-pbr-minimal)))
18033 (propagated-inputs
18034 `(("python-linecache2" ,python-linecache2)))
18035 (home-page
18036 "https://github.com/testing-cabal/traceback2")
18037 (synopsis "Backports of the traceback module")
18038 (description
18039 "This module provides a standard interface to extract, format and print
18040 stack traces of Python programs. It exactly mimics the behavior of the Python
18041 interpreter when it prints a stack trace.")
18042 (license license:psfl)))
18043
18044 (define-public python2-traceback2
18045 (package-with-python2 python-traceback2))
18046
18047 (define-public python-ratelimiter
18048 (package
18049 (name "python-ratelimiter")
18050 (version "1.2.0")
18051 (source
18052 (origin
18053 (method url-fetch)
18054 (uri (pypi-uri "ratelimiter" version))
18055 (sha256
18056 (base32
18057 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
18058 (build-system python-build-system)
18059 (arguments
18060 '(#:tests? #f)) ; There are no tests in the pypi archive.
18061 (home-page "https://github.com/RazerM/ratelimiter")
18062 (synopsis "Simple rate limiting object")
18063 (description
18064 "The @code{ratelimiter} module ensures that an operation will not be
18065 executed more than a given number of times during a given period.")
18066 (license license:asl2.0)))
18067
18068 (define-public python2-ratelimiter
18069 (package-with-python2 python-ratelimiter))
18070
18071 (define-public python-dukpy
18072 (package
18073 (name "python-dukpy")
18074 (version "0.3")
18075 (source
18076 (origin
18077 (method git-fetch)
18078 (uri (git-reference
18079 (url "https://github.com/kovidgoyal/dukpy")
18080 (commit (string-append "v" version))))
18081 (file-name (git-file-name name version))
18082 (sha256
18083 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
18084 (build-system python-build-system)
18085 (home-page "https://github.com/kovidgoyal/dukpy")
18086 (synopsis "Run JavaScript in python")
18087 (description
18088 "dukpy is a JavaScript runtime environment for Python using the duktape
18089 embeddable JavaScript engine.")
18090 ;; Dukpy is licensed under MIT like the embedded duktape library,
18091 ;; with 'errors.c' as GPL3.
18092 (license (list license:expat license:gpl3))))
18093
18094 (define-public python2-dukpy
18095 (package-with-python2 python-dukpy))
18096
18097 (define-public python-jsonrpclib-pelix
18098 (package
18099 (name "python-jsonrpclib-pelix")
18100 (version "0.3.2")
18101 (source
18102 (origin
18103 (method url-fetch)
18104 (uri (pypi-uri "jsonrpclib-pelix" version))
18105 (sha256
18106 (base32
18107 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
18108 (build-system python-build-system)
18109 (arguments
18110 `(#:tests? #f)) ; no tests in PyPI tarball
18111 (home-page "https://github.com/tcalmant/jsonrpclib/")
18112 (synopsis "JSON-RPC 2.0 client library for Python")
18113 (description
18114 "This library implements the JSON-RPC v2.0
18115 specification (backwards-compatible) as a client library for Python. This
18116 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
18117 services.")
18118 (license license:asl2.0)))
18119
18120 (define-public python2-jsonrpclib-pelix
18121 (package-with-python2 python-jsonrpclib-pelix))
18122
18123 (define-public python-setuptools-scm-git-archive
18124 (package
18125 (name "python-setuptools-scm-git-archive")
18126 (version "1.0")
18127 (source
18128 (origin
18129 (method url-fetch)
18130 (uri (pypi-uri "setuptools_scm_git_archive" version))
18131 (sha256
18132 (base32
18133 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
18134 (build-system python-build-system)
18135 (native-inputs
18136 `(("python-pytest" ,python-pytest)))
18137 (propagated-inputs
18138 `(("python-setuptools-scm" ,python-setuptools-scm)))
18139 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
18140 (synopsis "Setuptools_scm plugin for git archives")
18141 (description
18142 "The setuptools_scm_git_archive package is a plugin to
18143 setuptools_scm, which supports obtaining versions from git archives that
18144 belong to tagged versions.")
18145 (license license:expat)))
18146
18147 (define-public python2-setuptools-scm-git-archive
18148 (package-with-python2 python-setuptools-scm-git-archive))
18149
18150 (define-public python-setuptools-git
18151 (package
18152 (name "python-setuptools-git")
18153 (version "1.2")
18154 (source
18155 (origin
18156 (method url-fetch)
18157 (uri (pypi-uri "setuptools-git" version))
18158 (sha256
18159 (base32
18160 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
18161 (build-system python-build-system)
18162 (arguments
18163 `(#:phases
18164 (modify-phases %standard-phases
18165 ;; This is needed for tests.
18166 (add-after 'unpack 'configure-git
18167 (lambda _
18168 (setenv "HOME" "/tmp")
18169 (invoke "git" "config" "--global" "user.email" "guix")
18170 (invoke "git" "config" "--global" "user.name" "guix")
18171 #t)))))
18172 (native-inputs
18173 `(("git" ,git-minimal)))
18174 (home-page "https://github.com/msabramo/setuptools-git")
18175 (synopsis "Setuptools revision control system plugin for Git")
18176 (description
18177 "This package provides a plugin for Setuptools for revision control with
18178 Git.")
18179 (license license:bsd-3)))
18180
18181 (define-public python-pyclipper
18182 (package
18183 (name "python-pyclipper")
18184 (version "1.1.0.post3")
18185 (source
18186 (origin
18187 (method url-fetch)
18188 (uri (pypi-uri "pyclipper" version ".zip"))
18189 (sha256
18190 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
18191 (modules '((guix build utils)))
18192 (snippet
18193 '(begin
18194 ;; This file is generated by Cython.
18195 (delete-file "pyclipper/pyclipper.cpp") #t))))
18196 (build-system python-build-system)
18197 (arguments
18198 `(#:phases
18199 (modify-phases %standard-phases
18200 (add-before 'build 'cythonize-sources
18201 (lambda _
18202 (with-directory-excursion "pyclipper"
18203 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
18204 (propagated-inputs
18205 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
18206 (native-inputs
18207 `(("python-cython" ,python-cython)
18208 ("python-pytest" ,python-pytest)
18209 ("python-pytest-runner" ,python-pytest-runner)
18210 ("python-unittest2" ,python-unittest2)
18211 ("unzip" ,unzip)))
18212 (home-page "https://github.com/greginvm/pyclipper")
18213 (synopsis "Wrapper for Angus Johnson's Clipper library")
18214 (description
18215 "Pyclipper is a Cython wrapper for the C++ translation of the
18216 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
18217 (license license:expat)))
18218
18219 (define-public python2-pyclipper
18220 (package-with-python2 python-pyclipper))
18221
18222 (define-public python2-booleanoperations
18223 (package
18224 (name "python2-booleanoperations")
18225 (version "0.7.1")
18226 (source
18227 (origin
18228 (method url-fetch)
18229 (uri (pypi-uri "booleanOperations" version ".zip"))
18230 (sha256
18231 (base32
18232 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
18233 (build-system python-build-system)
18234 (arguments
18235 `(#:python ,python-2))
18236 (native-inputs
18237 `(("unzip" ,unzip)
18238 ("python2-pytest" ,python2-pytest)
18239 ("python2-pytest-runner" ,python2-pytest-runner)))
18240 (propagated-inputs
18241 `(("python-fonttools" ,python2-fonttools)
18242 ("python-pyclipper" ,python2-pyclipper)
18243 ("python-ufolib" ,python2-ufolib)))
18244 (home-page "https://github.com/typemytype/booleanOperations")
18245 (synopsis "Boolean operations on paths")
18246 (description
18247 "BooleanOperations provides a Python library that enables
18248 boolean operations on paths.")
18249 (license license:expat)))
18250
18251 (define-public python-tempdir
18252 (package
18253 (name "python-tempdir")
18254 (version "0.7.1")
18255 (source
18256 (origin
18257 (method url-fetch)
18258 (uri (pypi-uri "tempdir" version))
18259 (sha256
18260 (base32
18261 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
18262 (build-system python-build-system)
18263 (home-page "https://pypi.org/project/tempdir/")
18264 (arguments
18265 ;; the package has no tests
18266 '(#:tests? #f))
18267 (synopsis "Python library for managing temporary directories")
18268 (description
18269 "This library manages temporary directories that are automatically
18270 deleted with all their contents when they are no longer needed. It is
18271 particularly convenient for use in tests.")
18272 (license license:expat)))
18273
18274 (define-public python2-tempdir
18275 (package-with-python2 python-tempdir))
18276
18277 (define-public python-activepapers
18278 (package
18279 (name "python-activepapers")
18280 (version "0.2.2")
18281 (source
18282 (origin
18283 (method url-fetch)
18284 (uri (pypi-uri "ActivePapers.Py" version))
18285 (sha256
18286 (base32
18287 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
18288 (build-system python-build-system)
18289 (arguments
18290 `(#:modules ((ice-9 ftw)
18291 (srfi srfi-1)
18292 (guix build utils)
18293 (guix build python-build-system))
18294
18295 #:phases
18296 (modify-phases %standard-phases
18297 (add-after 'unpack 'delete-python2-code
18298 (lambda _
18299 (for-each delete-file
18300 '("lib/activepapers/builtins2.py"
18301 "lib/activepapers/standardlib2.py"
18302 "lib/activepapers/utility2.py"))))
18303 (replace 'check
18304 (lambda _
18305 ;; Deactivate the test cases that download files
18306 (setenv "NO_NETWORK_ACCESS" "1")
18307 ;; For some strange reason, some tests fail if nosetests runs all
18308 ;; test modules in a single execution. They pass if each test
18309 ;; module is run individually.
18310 (for-each (lambda (filename)
18311 (invoke "nosetests"
18312 (string-append "tests/" filename)))
18313 (scandir "tests"
18314 (lambda (filename)
18315 (string-suffix? ".py" filename)))))))))
18316 (native-inputs
18317 `(("python-tempdir" ,python-tempdir)
18318 ("python-nose" ,python-nose)))
18319 (propagated-inputs
18320 `(("python-h5py" ,python-h5py)))
18321 (home-page "https://www.activepapers.org/")
18322 (synopsis "Executable papers for scientific computing")
18323 (description
18324 "ActivePapers is a tool for working with executable papers, which
18325 combine data, code, and documentation in single-file packages,
18326 suitable for publication as supplementary material or on repositories
18327 such as figshare or Zenodo.")
18328 (properties `((python2-variant . ,(delay python2-activepapers))))
18329 (license license:bsd-3)))
18330
18331 (define-public python2-activepapers
18332 (let ((base (package-with-python2
18333 (strip-python2-variant python-activepapers))))
18334 (package/inherit base
18335 (arguments
18336 (substitute-keyword-arguments (package-arguments base)
18337 ((#:phases phases)
18338 `(modify-phases ,phases
18339 (delete 'delete-python2-code)
18340 (add-after 'unpack 'delete-python3-code
18341 (lambda _
18342 (for-each delete-file
18343 '("lib/activepapers/builtins3.py"
18344 "lib/activepapers/standardlib3.py"
18345 "lib/activepapers/utility3.py")))))))))))
18346
18347 (define-public python-semver
18348 (package
18349 (name "python-semver")
18350 (version "2.9.0")
18351 (source
18352 (origin
18353 (method url-fetch)
18354 (uri (pypi-uri "semver" version))
18355 (sha256
18356 (base32
18357 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
18358 (build-system python-build-system)
18359 (arguments
18360 `(#:phases (modify-phases %standard-phases
18361 (replace 'check
18362 (lambda _
18363 (delete-file "setup.cfg")
18364 (invoke "py.test"))))))
18365 (native-inputs
18366 `(("python-pytest" ,python-pytest)))
18367 (home-page "https://github.com/k-bx/python-semver")
18368 (synopsis "Python helper for Semantic Versioning")
18369 (description "This package provides a Python library for
18370 @url{Semantic Versioning, http://semver.org/}.")
18371 (license license:bsd-3)))
18372
18373 (define-public python2-semver
18374 (package-with-python2 python-semver))
18375
18376 (define-public python-pyro4
18377 (package
18378 (name "python-pyro4")
18379 (version "4.77")
18380 (source
18381 (origin
18382 (method url-fetch)
18383 (uri (pypi-uri "Pyro4" version))
18384 (sha256
18385 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
18386 (build-system python-build-system)
18387 (arguments
18388 '(#:tests? #f)) ;FIXME: Some tests require network access.
18389 (native-inputs
18390 `(("python-cloudpickle" ,python-cloudpickle)
18391 ("python-dill" ,python-dill)
18392 ("python-msgpack" ,python-msgpack)))
18393 (propagated-inputs
18394 `(("python-serpent" ,python-serpent)))
18395 (home-page "https://pyro4.readthedocs.io")
18396 (synopsis "Distributed object middleware for Python")
18397 (description
18398 "Pyro enables you to build applications in which objects can talk to each
18399 other over the network. You can just use normal Python method calls to call
18400 objects on other machines, also known as remote procedure calls (RPC).")
18401 (license license:expat)))
18402
18403 (define-public python2-pyro
18404 (package
18405 (name "python2-pyro")
18406 (version "3.16")
18407 (source
18408 (origin
18409 (method url-fetch)
18410 (uri (pypi-uri "Pyro" version))
18411 (file-name (string-append "Pyro-" version ".tar.gz"))
18412 (sha256
18413 (base32
18414 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
18415 (build-system python-build-system)
18416 (arguments
18417 ;; Pyro is not compatible with Python 3
18418 `(#:python ,python-2
18419 ;; Pyro has no test cases for automatic execution
18420 #:tests? #f))
18421 (home-page "https://pythonhosted.org/Pyro/")
18422 (synopsis "Distributed object manager for Python")
18423 (description "Pyro is a Distributed Object Technology system
18424 written in Python that is designed to be easy to use. It resembles
18425 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
18426 which is a system and language independent Distributed Object Technology
18427 and has much more to offer than Pyro or RMI. Pyro 3.x is no
18428 longer maintained. New projects should use Pyro4 instead, which
18429 is the new Pyro version that is actively developed.")
18430 (license license:expat)))
18431
18432 (define-public python2-scientific
18433 (package
18434 (name "python2-scientific")
18435 (version "2.9.4")
18436 (source
18437 (origin
18438 (method git-fetch)
18439 (uri (git-reference
18440 (url "https://github.com/khinsen/ScientificPython")
18441 (commit (string-append "rel" version))))
18442 (file-name (git-file-name name version))
18443 (sha256
18444 (base32
18445 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
18446 (build-system python-build-system)
18447 (inputs
18448 `(("netcdf" ,netcdf)))
18449 (propagated-inputs
18450 `(("python-numpy" ,python2-numpy-1.8)
18451 ("python-pyro" ,python2-pyro)))
18452 (arguments
18453 ;; ScientificPython is not compatible with Python 3
18454 `(#:python ,python-2
18455 #:tests? #f ; No test suite
18456 #:phases
18457 (modify-phases %standard-phases
18458 (replace 'build
18459 (lambda* (#:key inputs #:allow-other-keys)
18460 (invoke "python" "setup.py" "build"
18461 (string-append "--netcdf_prefix="
18462 (assoc-ref inputs "netcdf"))))))))
18463 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
18464 (synopsis "Python modules for scientific computing")
18465 (description "ScientificPython is a collection of Python modules that are
18466 useful for scientific computing. Most modules are rather general (Geometry,
18467 physical units, automatic derivatives, ...) whereas others are more
18468 domain-specific (e.g. netCDF and PDB support). The library is currently
18469 not actively maintained and works only with Python 2 and NumPy < 1.9.")
18470 (license license:cecill-c)))
18471
18472 (define-public python2-mmtk
18473 (package
18474 (name "python2-mmtk")
18475 (version "2.7.12")
18476 (source
18477 (origin
18478 (method git-fetch)
18479 (uri (git-reference
18480 (url "https://github.com/khinsen/MMTK")
18481 (commit (string-append "rel" version))))
18482 (file-name (git-file-name name version))
18483 (sha256
18484 (base32
18485 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
18486 (build-system python-build-system)
18487 (native-inputs
18488 `(("netcdf" ,netcdf)))
18489 (propagated-inputs
18490 `(("python-scientific" ,python2-scientific)
18491 ("python-tkinter" ,python-2 "tk")))
18492 (arguments
18493 `(#:python ,python-2
18494 #:tests? #f
18495 #:phases
18496 (modify-phases %standard-phases
18497 (add-before 'build 'includes-from-scientific
18498 (lambda* (#:key inputs #:allow-other-keys)
18499 (mkdir-p "Include/Scientific")
18500 (copy-recursively
18501 (string-append
18502 (assoc-ref inputs "python-scientific")
18503 "/include/python2.7/Scientific")
18504 "Include/Scientific"))))))
18505 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
18506 (synopsis "Python library for molecular simulation")
18507 (description "MMTK is a library for molecular simulations with an emphasis
18508 on biomolecules. It provides widely used methods such as Molecular Dynamics
18509 and normal mode analysis, but also basic routines for implementing new methods
18510 for simulation and analysis. The library is currently not actively maintained
18511 and works only with Python 2 and NumPy < 1.9.")
18512 (license license:cecill-c)))
18513
18514 (define-public python-phonenumbers
18515 (package
18516 (name "python-phonenumbers")
18517 (version "8.9.1")
18518 (source
18519 (origin
18520 (method url-fetch)
18521 (uri (pypi-uri "phonenumbers" version))
18522 (sha256
18523 (base32
18524 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
18525 (build-system python-build-system)
18526 (home-page
18527 "https://github.com/daviddrysdale/python-phonenumbers")
18528 (synopsis
18529 "Python library for dealing with international phone numbers")
18530 (description
18531 "This package provides a Python port of Google's libphonenumber library.")
18532 (license license:asl2.0)))
18533
18534 (define-public python2-phonenumbers
18535 (package-with-python2 python-phonenumbers))
18536
18537 (define-public python-send2trash
18538 (package
18539 (name "python-send2trash")
18540 (version "1.5.0")
18541 (source
18542 (origin (method git-fetch)
18543 ;; Source tarball on PyPI doesn't include tests.
18544 (uri (git-reference
18545 (url "https://github.com/hsoft/send2trash")
18546 (commit version)))
18547 (file-name (git-file-name name version))
18548 (sha256
18549 (base32
18550 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
18551 (build-system python-build-system)
18552 (arguments
18553 '(#:phases
18554 (modify-phases %standard-phases
18555 (add-before 'check 'pre-check
18556 (lambda _
18557 (mkdir-p "/tmp/foo")
18558 (setenv "HOME" "/tmp/foo")
18559 #t)))))
18560 (home-page "https://github.com/hsoft/send2trash")
18561 (synopsis "Send files to the user's @file{~/Trash} directory")
18562 (description "This package provides a Python library to send files to the
18563 user's @file{~/Trash} directory.")
18564 (properties `((python2-variant . ,(delay python2-send2trash))))
18565 (license license:bsd-3)))
18566
18567 (define-public python2-send2trash
18568 (let ((base (package-with-python2
18569 (strip-python2-variant python-send2trash))))
18570 (package/inherit base
18571 (arguments
18572 (substitute-keyword-arguments (package-arguments python-send2trash)
18573 ((#:phases phases)
18574 `(modify-phases ,phases
18575 (add-before 'check 'setenv
18576 (lambda _
18577 (setenv "PYTHONPATH"
18578 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18579 #t)))))))))
18580
18581 (define-public python-pyfavicon
18582 (package
18583 (name "python-pyfavicon")
18584 (version "0.1.1")
18585 (source
18586 (origin
18587 (method url-fetch)
18588 (uri (pypi-uri "pyfavicon" version))
18589 (sha256
18590 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
18591 (build-system python-build-system)
18592 (arguments
18593 ;; There are no tests in the PyPI tarball and the tests from the
18594 ;; repository require online data.
18595 '(#:tests? #f))
18596 (propagated-inputs
18597 `(("python-aiohttp" ,python-aiohttp)
18598 ("python-beautifulsoup4" ,python-beautifulsoup4)
18599 ("python-pillow" ,python-pillow)))
18600 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
18601 (synopsis "Async favicon fetcher")
18602 (description
18603 "@code{pyfavicon} is an async favicon fetcher.")
18604 (license license:expat)))
18605
18606 (define-public python-yamllint
18607 (package
18608 (name "python-yamllint")
18609 (version "1.26.1")
18610 (source
18611 (origin
18612 (method url-fetch)
18613 (uri (pypi-uri "yamllint" version))
18614 (sha256
18615 (base32 "090krlxj7az0d9yl8i20vjrqi66dfxx7y5xakjhxzsfp7qmldnc7"))))
18616 (build-system python-build-system)
18617 (propagated-inputs
18618 `(("python-pathspec" ,python-pathspec)
18619 ("python-pyyaml" ,python-pyyaml)
18620 ("python-setuptools" ,python-setuptools)))
18621 (home-page "https://github.com/adrienverge/yamllint")
18622 (synopsis "Linter for YAML files")
18623 (description
18624 "Yamllint is a linter for YAML files. yamllint does not only check for
18625 syntax validity, but for weirdnesses like key repetition and cosmetic problems
18626 such as lines length, trailing spaces, indentation, etc.")
18627 (license license:gpl3+)))
18628
18629 (define-public python-yapf
18630 (package
18631 (name "python-yapf")
18632 (version "0.29.0")
18633 (source
18634 (origin
18635 (method url-fetch)
18636 (uri (pypi-uri "yapf" version))
18637 (sha256
18638 (base32
18639 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
18640 (build-system python-build-system)
18641 (home-page "https://github.com/google/yapf")
18642 (synopsis "Formatter for Python code")
18643 (description "YAPF is a formatter for Python code. It's based off of
18644 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
18645 takes the code and reformats it to the best formatting that conforms to the
18646 style guide, even if the original code didn't violate the style guide.")
18647 (license license:asl2.0)))
18648
18649 (define-public python2-yapf
18650 (package-with-python2 python-yapf))
18651
18652 (define-public python-yq
18653 (package
18654 (name "python-yq")
18655 (version "2.11.1")
18656 (source
18657 (origin
18658 (method url-fetch)
18659 (uri (pypi-uri "yq" version))
18660 (sha256
18661 (base32
18662 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
18663 (build-system python-build-system)
18664 (arguments
18665 '(#:phases
18666 (modify-phases %standard-phases
18667 (add-after 'unpack 'patch
18668 (lambda* (#:key inputs #:allow-other-keys)
18669 (substitute* "yq/__init__.py"
18670 (("Popen\\(\\[\"jq")
18671 (string-append
18672 "Popen([\""
18673 (assoc-ref inputs "jq")
18674 "/bin/jq")))
18675 #t)))))
18676 (inputs
18677 `(("python-argcomplete" ,python-argcomplete)
18678 ("python-pyyaml" ,python-pyyaml)
18679 ("python-xmltodict" ,python-xmltodict)
18680 ("jq" ,jq)))
18681 (native-inputs
18682 `(("python-coverage" ,python-coverage)
18683 ("python-flake8" ,python-flake8)
18684 ("python-wheel" ,python-wheel)))
18685 (home-page "https://github.com/kislyuk/yq")
18686 (synopsis "Command-line YAML/XML processor")
18687 (description
18688 "This package provides @command{yq} and @command{xq} for processing YAML
18689 and XML respectively. The processing is done through @command{jq}, @command{jq}
18690 filters can be used to process the data as it passes through.")
18691 (license license:asl2.0)))
18692
18693 (define-public python-gyp
18694 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
18695 (revision "0"))
18696 (package
18697 (name "python-gyp")
18698 ;; Google does not release versions,
18699 ;; based on second most recent commit date.
18700 (version (git-version "0.0.0" revision commit))
18701 (source
18702 (origin
18703 ;; Google does not release tarballs,
18704 ;; git checkout is needed.
18705 (method git-fetch)
18706 (uri (git-reference
18707 (url "https://chromium.googlesource.com/external/gyp")
18708 (commit commit)))
18709 (file-name (git-file-name name version))
18710 (sha256
18711 (base32
18712 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
18713 (build-system python-build-system)
18714 (home-page "https://gyp.gsrc.io/")
18715 (synopsis "GYP is a Meta-Build system")
18716 (description
18717 "GYP builds build systems for large, cross platform applications.
18718 It can be used to generate XCode projects, Visual Studio projects, Ninja build
18719 files, and Makefiles.")
18720 (license license:bsd-3))))
18721
18722 (define-public python2-gyp
18723 (package-with-python2 python-gyp))
18724
18725 (define-public python-whatever
18726 (package
18727 (name "python-whatever")
18728 (version "0.6")
18729 (source
18730 (origin
18731 (method git-fetch)
18732 (uri (git-reference
18733 (url "https://github.com/Suor/whatever")
18734 (commit version)))
18735 (file-name (git-file-name name version))
18736 (sha256
18737 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
18738 (build-system python-build-system)
18739 (arguments
18740 `(#:phases
18741 (modify-phases %standard-phases
18742 (replace 'check
18743 (lambda _
18744 (invoke "py.test"))))))
18745 (native-inputs
18746 `(("python-pytest" ,python-pytest)))
18747 (home-page "https://github.com/Suor/whatever")
18748 (synopsis "Make anonymous functions by partial application of operators")
18749 (description "@code{whatever} provides an easy way to make anonymous
18750 functions by partial application of operators.")
18751 (license license:bsd-3)))
18752
18753 (define-public python2-whatever
18754 (package-with-python2 python-whatever))
18755
18756 (define-public python-funcy
18757 (package
18758 (name "python-funcy")
18759 (version "1.11")
18760 (source
18761 (origin
18762 (method git-fetch)
18763 (uri (git-reference
18764 (url "https://github.com/Suor/funcy")
18765 (commit version)))
18766 (sha256
18767 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
18768 (file-name (git-file-name name version))))
18769 (build-system python-build-system)
18770 (arguments
18771 `(#:phases
18772 (modify-phases %standard-phases
18773 (replace 'check
18774 (lambda _
18775 (invoke "py.test"))))))
18776 (native-inputs
18777 `(("python-pytest" ,python-pytest)
18778 ("python-whatever" ,python-whatever)))
18779 (home-page "https://github.com/Suor/funcy")
18780 (synopsis "Functional tools")
18781 (description "@code{funcy} is a library that provides functional tools.
18782 Examples are:
18783 @enumerate
18784 @item merge - Merges collections of the same type
18785 @item walk - Type-preserving map
18786 @item select - Selects a part of a collection
18787 @item take - Takes the first n items of a collection
18788 @item first - Takes the first item of a collection
18789 @item remove - Predicated-removes items of a collection
18790 @item concat - Concatenates two collections
18791 @item flatten - Flattens a collection with subcollections
18792 @item distinct - Returns only distinct items
18793 @item split - Predicated-splits a collection
18794 @item split_at - Splits a collection at a given item
18795 @item group_by - Groups items by group
18796 @item pairwise - Pairs off adjacent items
18797 @item partial - Partially-applies a function
18798 @item curry - Curries a function
18799 @item compose - Composes functions
18800 @item complement - Complements a predicate
18801 @item all_fn - \"all\" with predicate
18802 @end enumerate")
18803 (license license:bsd-3)))
18804
18805 (define-public python2-funcy
18806 (package-with-python2 python-funcy))
18807
18808 (define-public python-isoweek
18809 (package
18810 (name "python-isoweek")
18811 (version "1.3.3")
18812 (source
18813 (origin
18814 (method url-fetch)
18815 (uri (pypi-uri "isoweek" version))
18816 (sha256
18817 (base32
18818 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
18819 (build-system python-build-system)
18820 (home-page "https://github.com/gisle/isoweek")
18821 (synopsis "Objects representing a week")
18822 (description "The @code{isoweek} module provide the class Week that
18823 implements the week definition of ISO 8601. This standard also defines
18824 a notation for identifying weeks; yyyyWww (where the W is a literal).
18825 Week instances stringify to this form.")
18826 (license license:bsd-3)))
18827
18828 (define-public python2-isoweek
18829 (package-with-python2 python-isoweek))
18830
18831 (define-public python-pyzbar
18832 (package
18833 (name "python-pyzbar")
18834 (version "0.1.8")
18835 (source
18836 (origin
18837 ;; There's no source tarball on PyPI.
18838 (method git-fetch)
18839 (uri (git-reference
18840 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
18841 (commit (string-append "v" version))))
18842 (file-name (git-file-name name version))
18843 (sha256
18844 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
18845 (build-system python-build-system)
18846 (arguments
18847 `(#:phases
18848 (modify-phases %standard-phases
18849 (add-after 'unpack 'remove-failing-test
18850 (lambda _
18851 ;; This tests if find_library was called once, but we remove
18852 ;; the call in the stage below to make the library find libzbar.
18853 (delete-file "pyzbar/tests/test_zbar_library.py")
18854 #t))
18855 (add-before 'build 'set-library-file-name
18856 (lambda* (#:key inputs #:allow-other-keys)
18857 (let ((libzbar (assoc-ref inputs "zbar")))
18858 (substitute* "pyzbar/zbar_library.py"
18859 (("find_library\\('zbar'\\)")
18860 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18861 #t))))))
18862 (native-inputs
18863 `(("pkg-config" ,pkg-config)
18864 ("python-numpy" ,python-numpy)
18865 ("python-pillow" ,python-pillow)))
18866 (inputs
18867 `(("zbar" ,zbar)))
18868 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18869 (synopsis "Read one-dimensional barcodes and QR codes")
18870 (description
18871 "Read one-dimensional barcodes and QR codes using the zbar library.
18872
18873 Features:
18874
18875 @itemize
18876 @item Pure python
18877 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18878 @item Decodes locations of barcodes
18879 @item No dependencies, other than the zbar library itself
18880 @end itemize")
18881 (license license:expat)))
18882
18883 (define-public python-tokenize-rt
18884 (package
18885 (name "python-tokenize-rt")
18886 (version "2.0.1")
18887 (source
18888 (origin
18889 (method url-fetch)
18890 (uri (pypi-uri "tokenize-rt" version))
18891 (sha256
18892 (base32
18893 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
18894 (build-system python-build-system)
18895 (home-page "https://github.com/asottile/tokenize-rt")
18896 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
18897 (description
18898 "This Python library is a wrapper around @code{tokenize} from the Python
18899 standard library. It provides two additional tokens @code{ESCAPED_NL} and
18900 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
18901 and @code{tokens_to_src} to roundtrip.")
18902 (license license:expat)))
18903
18904 (define-public python-future-fstrings
18905 (package
18906 (name "python-future-fstrings")
18907 (version "0.4.1")
18908 (source
18909 (origin
18910 (method url-fetch)
18911 (uri (pypi-uri "future_fstrings" version))
18912 (sha256
18913 (base32
18914 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18915 (build-system python-build-system)
18916 (propagated-inputs
18917 `(("python-tokenize-rt" ,python-tokenize-rt)))
18918 (home-page "https://github.com/asottile/future-fstrings")
18919 (synopsis "Backport of fstrings to Python < 3.6")
18920 (description
18921 "This package provides a UTF-8 compatible encoding
18922 @code{future_fstrings}, which performs source manipulation. It decodes the
18923 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18924 @code{f} strings.")
18925 (license license:expat)))
18926
18927 (define-public python-typed-ast
18928 (package
18929 (name "python-typed-ast")
18930 (version "1.4.0")
18931 (source
18932 (origin
18933 (method git-fetch)
18934 (uri (git-reference
18935 (url "https://github.com/python/typed_ast")
18936 (commit version)))
18937 (sha256
18938 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18939 (file-name (git-file-name name version))))
18940 (build-system python-build-system)
18941 (arguments
18942 `(#:modules ((guix build utils)
18943 (guix build python-build-system)
18944 (ice-9 ftw)
18945 (srfi srfi-1)
18946 (srfi srfi-26))
18947 #:phases
18948 (modify-phases %standard-phases
18949 (replace 'check
18950 (lambda _
18951 (let ((cwd (getcwd)))
18952 (setenv "PYTHONPATH"
18953 (string-append cwd "/build/"
18954 (find (cut string-prefix? "lib" <>)
18955 (scandir (string-append cwd "/build")))
18956 ":"
18957 (getenv "PYTHONPATH"))))
18958 (invoke "pytest")
18959 #t)))))
18960 (native-inputs `(("python-pytest" ,python-pytest)))
18961 (home-page "https://github.com/python/typed_ast")
18962 (synopsis "Fork of Python @code{ast} modules with type comment support")
18963 (description "This package provides a parser similar to the standard
18964 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18965 include PEP 484 type comments and are independent of the version of Python
18966 under which they are run. The @code{typed_ast} parsers produce the standard
18967 Python AST (plus type comments), and are both fast and correct, as they are
18968 based on the CPython 2.7 and 3.7 parsers.")
18969 ;; See the file "LICENSE" for the details.
18970 (license (list license:psfl
18971 license:asl2.0
18972 license:expat)))) ;ast27/Parser/spark.py
18973
18974 (define-public python-typer
18975 (package
18976 (name "python-typer")
18977 (version "0.3.2")
18978 (source
18979 (origin
18980 ;; Building `python-typer` from the git repository requires the `flit-core`
18981 ;; Python package that is not installed by `python-flit`.
18982 (method url-fetch)
18983 (uri (pypi-uri "typer" version))
18984 (sha256
18985 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
18986 (build-system python-build-system)
18987 (arguments
18988 `(#:phases
18989 (modify-phases %standard-phases
18990 (add-before 'check 'disable-failing-tests
18991 (lambda _
18992 (substitute* "tests/test_completion/test_completion.py"
18993 (("def test_show_completion")
18994 "def _test_show_completion")
18995 (("def test_install_completion")
18996 "def _test_install_completion"))
18997 (substitute* "tests/test_completion/test_completion_install.py"
18998 (("def test_completion_install_bash")
18999 "def _test_completion_install_bash")
19000 (("def test_completion_install_zsh")
19001 "def _test_completion_install_zsh")
19002 (("def test_completion_install_fish")
19003 "def _test_completion_install_fish")
19004 (("def test_completion_install_powershell")
19005 "def _test_completion_install_powershell"))
19006 #t))
19007 (replace 'check
19008 (lambda _
19009 (setenv "PYTHONPATH"
19010 (string-append (getcwd) ":"
19011 (getenv "PYTHONPATH")))
19012 (invoke "python" "-m" "pytest" "tests/")
19013 #t)))))
19014 (propagated-inputs
19015 `(("python-click" ,python-click)))
19016 (native-inputs
19017 `(("python-coverage" ,python-coverage)
19018 ("python-pytest" ,python-pytest)
19019 ("python-shellingham" ,python-shellingham)))
19020 (home-page "https://github.com/tiangolo/typer")
19021 (synopsis
19022 "Typer builds CLI based on Python type hints")
19023 (description
19024 "Typer is a library for building CLI applications. It's based on
19025 Python 3.6+ type hints.")
19026 ;; MIT license
19027 (license license:expat)))
19028
19029 (define-public python-typing
19030 (package
19031 (name "python-typing")
19032 (version "3.7.4.3")
19033 (source
19034 (origin
19035 (method url-fetch)
19036 (uri (pypi-uri "typing" version))
19037 (sha256
19038 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
19039 (build-system python-build-system)
19040 (home-page "https://docs.python.org/3/library/typing.html")
19041 (synopsis "Type hints for Python")
19042 (description "This is a backport of the standard library @code{typing}
19043 module to Python versions older than 3.5. Typing defines a standard notation
19044 for Python function and variable type annotations. The notation can be used
19045 for documenting code in a concise, standard format, and it has been designed
19046 to also be used by static and runtime type checkers, static analyzers, IDEs
19047 and other tools.")
19048 (license license:psfl)))
19049
19050 (define-public python2-typing
19051 (package-with-python2 python-typing))
19052
19053 (define-public python-typing-extensions
19054 (package
19055 (name "python-typing-extensions")
19056 (version "3.7.4.3")
19057 (source
19058 (origin
19059 (method url-fetch)
19060 (uri (pypi-uri "typing_extensions" version))
19061 (sha256
19062 (base32
19063 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
19064 (build-system python-build-system)
19065 (home-page
19066 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
19067 (synopsis "Experimental type hints for Python")
19068 (description
19069 "The typing_extensions module contains additional @code{typing} hints not
19070 yet present in the of the @code{typing} standard library.
19071 Included are implementations of:
19072 @enumerate
19073 @item ClassVar
19074 @item ContextManager
19075 @item Counter
19076 @item DefaultDict
19077 @item Deque
19078 @item NewType
19079 @item NoReturn
19080 @item overload
19081 @item Protocol
19082 @item runtime
19083 @item Text
19084 @item Type
19085 @item TYPE_CHECKING
19086 @item AsyncGenerator
19087 @end enumerate\n")
19088 (license license:psfl)))
19089
19090 (define-public bpython
19091 (package
19092 (name "bpython")
19093 (version "0.20.1")
19094 (source
19095 (origin
19096 (method url-fetch)
19097 (uri (pypi-uri "bpython" version))
19098 (sha256
19099 (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
19100 (build-system python-build-system)
19101 (arguments
19102 `(#:phases
19103 (modify-phases %standard-phases
19104 (add-after 'unpack 'remove-failing-test
19105 (lambda _
19106 ;; Remove failing test. FIXME: make it pass
19107 (delete-file "bpython/test/test_args.py")
19108 #t))
19109 (add-after 'wrap 'add-aliases
19110 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
19111 (lambda* (#:key outputs #:allow-other-keys)
19112 (let ((out (assoc-ref outputs "out")))
19113 (for-each
19114 (lambda (old new)
19115 (symlink old (string-append out "/bin/" new)))
19116 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
19117 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
19118 #t)))))
19119 (propagated-inputs
19120 `(("python-pygments" ,python-pygments)
19121 ("python-requests" ,python-requests)
19122 ("python-curtsies" ,python-curtsies)
19123 ("python-greenlet" ,python-greenlet)
19124 ("python-six" ,python-six)
19125 ("python-wcwidth" ,python-wcwidth)
19126 ;; optional dependencies
19127 ("python-urwid" ,python-urwid) ; for bpython-urwid only
19128 ("python-watchdog" ,python-watchdog)
19129 ("python-jedi" ,python-jedi)))
19130 (native-inputs
19131 `(("python-sphinx" ,python-sphinx)
19132 ("python-mock" ,python-mock)))
19133 (home-page "https://bpython-interpreter.org/")
19134 (synopsis "Fancy interface to the Python interpreter")
19135 (description "Bpython is a fancy interface to the Python
19136 interpreter. bpython's main features are
19137
19138 @enumerate
19139 @item in-line syntax highlighting,
19140 @item readline-like autocomplete with suggestions displayed as you type,
19141 @item expected parameter list for any Python function,
19142 @item \"rewind\" function to pop the last line of code from memory and
19143 re-evaluate,
19144 @item send the code you've entered off to a pastebin,
19145 @item save the code you've entered to a file, and
19146 @item auto-indentation.
19147 @end enumerate")
19148 (license license:expat)))
19149
19150 (define-public python-pyinotify
19151 (package
19152 (name "python-pyinotify")
19153 (version "0.9.6")
19154 (source (origin
19155 (method url-fetch)
19156 (uri (pypi-uri "pyinotify" version))
19157 (sha256
19158 (base32
19159 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
19160 (build-system python-build-system)
19161 (arguments `(#:tests? #f)) ;no tests
19162 (home-page "https://github.com/seb-m/pyinotify")
19163 (synopsis "Python library for monitoring inotify events")
19164 (description
19165 "@code{pyinotify} provides a Python interface for monitoring
19166 file system events on Linux.")
19167 (license license:expat)))
19168
19169 (define-public python2-pyinotify
19170 (package-with-python2 python-pyinotify))
19171
19172 ;; Ada parser uses this version.
19173 (define-public python2-quex-0.67.3
19174 (package
19175 (name "python2-quex")
19176 (version "0.67.3")
19177 (source
19178 (origin
19179 (method url-fetch)
19180 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
19181 (version-major+minor version)
19182 "/quex-" version ".zip"))
19183 (sha256
19184 (base32
19185 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
19186 (build-system python-build-system)
19187 (native-inputs
19188 `(("unzip" ,unzip)))
19189 (arguments
19190 `(#:python ,python-2
19191 #:tests? #f
19192 #:phases
19193 (modify-phases %standard-phases
19194 (delete 'configure)
19195 (delete 'build)
19196 (replace 'install
19197 (lambda* (#:key outputs #:allow-other-keys)
19198 (let* ((out (assoc-ref outputs "out"))
19199 (share/quex (string-append out "/share/quex"))
19200 (bin (string-append out "/bin")))
19201 (copy-recursively "." share/quex)
19202 (mkdir-p bin)
19203 (symlink (string-append share/quex "/quex-exe.py")
19204 (string-append bin "/quex"))
19205 #t))))))
19206 (native-search-paths
19207 (list (search-path-specification
19208 (variable "QUEX_PATH")
19209 (files '("share/quex")))))
19210 (home-page "http://quex.sourceforge.net/")
19211 (synopsis "Lexical analyzer generator in Python")
19212 (description "@code{quex} is a lexical analyzer generator in Python.")
19213 (license license:lgpl2.1+))) ; Non-military
19214
19215 (define-public python2-quex
19216 (package (inherit python2-quex-0.67.3)
19217 (name "python2-quex")
19218 (version "0.68.1")
19219 (source
19220 (origin
19221 (method url-fetch)
19222 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
19223 (sha256
19224 (base32
19225 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
19226 (file-name (string-append name "-" version ".tar.gz"))))))
19227
19228 (define-public python-more-itertools
19229 (package
19230 (name "python-more-itertools")
19231 (version "8.2.0")
19232 (source
19233 (origin
19234 (method url-fetch)
19235 (uri (pypi-uri "more-itertools" version))
19236 (sha256
19237 (base32
19238 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
19239 (build-system python-build-system)
19240 (home-page "https://github.com/erikrose/more-itertools")
19241 (synopsis "More routines for operating on iterables, beyond itertools")
19242 (description "Python's built-in @code{itertools} module implements a
19243 number of iterator building blocks inspired by constructs from APL, Haskell,
19244 and SML. @code{more-itertools} includes additional building blocks for
19245 working with iterables.")
19246 (properties `((python2-variant . ,(delay python2-more-itertools))))
19247 (license license:expat)))
19248
19249 ;; The 5.x series are the last versions supporting Python 2.7.
19250 (define-public python2-more-itertools
19251 (package
19252 (inherit python-more-itertools)
19253 (name "python2-more-itertools")
19254 (version "5.0.0")
19255 (source (origin
19256 (method url-fetch)
19257 (uri (pypi-uri "more-itertools" version))
19258 (sha256
19259 (base32
19260 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
19261 (arguments
19262 `(#:python ,python-2))
19263 (propagated-inputs
19264 `(("python2-six" ,python2-six-bootstrap)))))
19265
19266 (define-public python-latexcodec
19267 (package
19268 (name "python-latexcodec")
19269 (version "1.0.7")
19270 (source
19271 (origin
19272 (method url-fetch)
19273 (uri (pypi-uri "latexcodec" version))
19274 (sha256
19275 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
19276 (build-system python-build-system)
19277 (inputs
19278 `(("python-six" ,python-six)))
19279 (home-page "https://readthedocs.org/projects/latexcodec/")
19280 (synopsis "Work with LaTeX code in Python")
19281 (description "Lexer and codec to work with LaTeX code in Python.")
19282 (license license:expat)))
19283
19284 (define-public python-pybtex
19285 (package
19286 (name "python-pybtex")
19287 (version "0.22.2")
19288 (source
19289 (origin
19290 (method url-fetch)
19291 (uri (pypi-uri "pybtex" version))
19292 (sha256
19293 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
19294 (build-system python-build-system)
19295 (native-inputs
19296 `(("python-nose" ,python-nose)))
19297 (inputs
19298 `(("python-latexcodec" ,python-latexcodec)
19299 ("python-pyyaml" ,python-pyyaml)
19300 ("python-six" ,python-six)))
19301 (arguments
19302 `(#:test-target "nosetests"))
19303 (home-page "https://pybtex.org/")
19304 (synopsis "BibTeX-compatible bibliography processor")
19305 (description "Pybtex is a BibTeX-compatible bibliography processor written
19306 in Python. You can simply type pybtex instead of bibtex.")
19307 (license license:expat)))
19308
19309 (define-public python-onetimepass
19310 (package
19311 (name "python-onetimepass")
19312 (version "1.0.1")
19313 (source
19314 (origin
19315 (method url-fetch)
19316 (uri (pypi-uri "onetimepass" version))
19317 (sha256
19318 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
19319 (build-system python-build-system)
19320 (propagated-inputs `(("python-six" ,python-six)))
19321 (home-page "https://github.com/tadeck/onetimepass/")
19322 (synopsis "One-time password library")
19323 (description "Python one-time password library for HMAC-based (HOTP) and
19324 time-based (TOTP) passwords.")
19325 (license license:expat)))
19326
19327 (define-public python-parso
19328 (package
19329 (name "python-parso")
19330 (version "0.7.1")
19331 (source
19332 (origin
19333 (method url-fetch)
19334 (uri (pypi-uri "parso" version))
19335 (sha256
19336 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
19337 (native-inputs
19338 `(("python-pytest" ,python-pytest)))
19339 (build-system python-build-system)
19340 (arguments
19341 `(#:phases (modify-phases %standard-phases
19342 (replace 'check
19343 (lambda _ (invoke "pytest" "-vv"))))))
19344 (home-page "https://github.com/davidhalter/parso")
19345 (synopsis "Python Parser")
19346 (description "Parso is a Python parser that supports error recovery and
19347 round-trip parsing for different Python versions (in multiple Python versions).
19348 Parso is also able to list multiple syntax errors in your Python file.")
19349 (license license:expat)))
19350
19351 (define-public python2-parso
19352 (package-with-python2 python-parso))
19353
19354 (define-public python-async-generator
19355 (package
19356 (name "python-async-generator")
19357 (version "1.10")
19358 (source
19359 (origin
19360 (method url-fetch)
19361 (uri (pypi-uri "async_generator" version))
19362 (sha256
19363 (base32
19364 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
19365 (build-system python-build-system)
19366 (native-inputs
19367 `(("python-pytest" ,python-pytest)))
19368 (home-page "https://github.com/python-trio/async_generator")
19369 (synopsis "Async generators and context managers for Python 3.5+")
19370 (description "@code{async_generator} back-ports Python 3.6's native async
19371 generators and Python 3.7's context managers into Python 3.5.")
19372 ;; Dual licensed.
19373 (license (list license:expat license:asl2.0))))
19374
19375 (define-public python-async-timeout
19376 (package
19377 (name "python-async-timeout")
19378 (version "3.0.1")
19379 (source
19380 (origin
19381 (method url-fetch)
19382 (uri (pypi-uri "async-timeout" version))
19383 (sha256
19384 (base32
19385 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
19386 (build-system python-build-system)
19387 (home-page "https://github.com/aio-libs/async_timeout/")
19388 (synopsis "Timeout context manager for asyncio programs")
19389 (description "@code{async-timeout} provides a timeout timeout context
19390 manager compatible with @code{asyncio}.")
19391 (license license:asl2.0)))
19392
19393 (define-public python-glob2
19394 (package
19395 (name "python-glob2")
19396 (version "0.7")
19397 (source
19398 (origin
19399 (method git-fetch)
19400 (uri (git-reference
19401 (url "https://github.com/miracle2k/python-glob2")
19402 (commit (string-append "v" version))))
19403 (file-name (git-file-name name version))
19404 (sha256
19405 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
19406 (build-system python-build-system)
19407 (home-page "https://github.com/miracle2k/python-glob2/")
19408 (synopsis "Extended Version of the python buildin glob module")
19409 (description "This is an extended version of the Python
19410 @url{http://docs.python.org/library/glob.html, built-in glob module} which
19411 adds:
19412
19413 @itemize
19414 @item The ability to capture the text matched by glob patterns, and return
19415 those matches alongside the file names.
19416 @item A recursive @code{**} globbing syntax, akin for example to the
19417 @code{globstar} option of Bash.
19418 @item The ability to replace the file system functions used, in order to glob
19419 on virtual file systems.
19420 @item Compatible with Python 2 and Python 3 (tested with 3.3).
19421 @end itemize
19422
19423 Glob2 currently based on the glob code from Python 3.3.1.")
19424 (license license:bsd-2)))
19425
19426 (define-public python2-glob2
19427 (package-with-python2 python-glob2))
19428
19429 (define-public python-gipc
19430 (package
19431 (name "python-gipc")
19432 (version "0.6.0")
19433 (source
19434 (origin
19435 (method url-fetch)
19436 (uri (pypi-uri "gipc" version ".zip"))
19437 (sha256
19438 (base32
19439 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
19440 (build-system python-build-system)
19441 (native-inputs
19442 `(("unzip" ,unzip)))
19443 (propagated-inputs
19444 `(("python-gevent" ,python-gevent)))
19445 (home-page "https://gehrcke.de/gipc/")
19446 (synopsis "Child process management in the context of gevent")
19447 (description "Usage of Python's multiprocessing package in a
19448 gevent-powered application may raise problems. With @code{gipc},
19449 process-based child processes can safely be created anywhere within a
19450 gevent-powered application.")
19451 (license license:expat)))
19452
19453 (define-public python-beautifultable
19454 (package
19455 (name "python-beautifultable")
19456 (version "1.0.0")
19457 (source
19458 (origin
19459 (method url-fetch)
19460 (uri (pypi-uri "beautifultable" version))
19461 (sha256
19462 (base32
19463 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
19464 (build-system python-build-system)
19465 (propagated-inputs
19466 `(("python-wcwidth" ,python-wcwidth)))
19467 (arguments
19468 `(#:phases
19469 (modify-phases %standard-phases
19470 (add-after 'unpack 'patch-setup.py
19471 (lambda _
19472 (substitute* "setup.py"
19473 (("setup\\(")
19474 "setup(\n test_suite=\"test\",")))))))
19475 (home-page "https://github.com/pri22296/beautifultable")
19476 (synopsis "Print ASCII tables for terminals")
19477 (description "@code{python-beautifultable} provides a class for easily
19478 printing tabular data in a visually appealing ASCII format to a terminal.
19479
19480 Features include, but are not limited to:
19481 @itemize
19482 @item Full customization of the look and feel of the table
19483 @item Row and column accessors.
19484 @item Full support for colors using ANSI sequences or any library.
19485 @item Plenty of predefined styles and option to create custom ones.
19486 @item Support for Unicode characters.
19487 @item Supports streaming table when data is slow to retrieve.
19488 @end itemize")
19489 (license license:expat)))
19490
19491 (define-public python-globber
19492 (package
19493 (name "python-globber")
19494 (version "0.2.1")
19495 (source
19496 (origin
19497 (method git-fetch)
19498 (uri (git-reference
19499 (url "https://github.com/asharov/globber")
19500 (commit version)))
19501 (file-name (git-file-name name version))
19502 (sha256
19503 (base32
19504 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
19505 (build-system python-build-system)
19506 (home-page "https://github.com/asharov/globber")
19507 (synopsis "Library for string matching with glob patterns")
19508 (description
19509 "Globber is a Python library for matching file names against glob patterns.
19510 In contrast to other glob-matching libraries, it matches arbitrary strings and
19511 doesn't require the matched names to be existing files. In addition, it
19512 supports the globstar @code{**} operator to match an arbitrary number of
19513 path components.")
19514 (license license:asl2.0)))
19515
19516 (define-public python-git-hammer
19517 (package
19518 (name "python-git-hammer")
19519 (version "0.3.1")
19520 (source
19521 (origin
19522 (method git-fetch)
19523 (uri (git-reference
19524 (url "https://github.com/asharov/git-hammer")
19525 (commit version)))
19526 (file-name (git-file-name name version))
19527 (sha256
19528 (base32
19529 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
19530 (build-system python-build-system)
19531 (arguments
19532 `(#:phases
19533 (modify-phases %standard-phases
19534 (add-after 'unpack 'patch-setup.py
19535 (lambda _
19536 (substitute* "setup.py"
19537 (("setup\\(")
19538 "setup(\n test_suite=\"test\",")))))))
19539 (propagated-inputs
19540 `(("python-beautifultable" ,python-beautifultable)
19541 ("python-dateutil" ,python-dateutil)
19542 ("python-gitpython" ,python-gitpython)
19543 ("python-globber" ,python-globber)
19544 ("python-matplotlib" ,python-matplotlib)
19545 ("python-sqlalchemy" ,python-sqlalchemy)
19546 ("python-sqlalchemy-utils"
19547 ,python-sqlalchemy-utils)))
19548 (home-page "https://github.com/asharov/git-hammer")
19549 (synopsis "Provide statistics for git repositories")
19550 (description
19551 "Git Hammer is a statistics tool for projects in git repositories.
19552 Its major feature is tracking the number of lines authored by each person for every
19553 commit, but it also includes some other useful statistics.")
19554 (license license:asl2.0)))
19555
19556 (define-public python-fusepy
19557 (package
19558 (name "python-fusepy")
19559 (version "2.0.4")
19560 (source
19561 (origin
19562 (method url-fetch)
19563 (uri (pypi-uri "fusepy" version))
19564 (sha256
19565 (base32
19566 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
19567 (build-system python-build-system)
19568 (arguments
19569 `(#:phases
19570 (modify-phases %standard-phases
19571 (add-before 'build 'set-library-file-name
19572 (lambda* (#:key inputs #:allow-other-keys)
19573 (let ((fuse (assoc-ref inputs "fuse")))
19574 (substitute* "fuse.py"
19575 (("find_library\\('fuse'\\)")
19576 (string-append "'" fuse "/lib/libfuse.so'")))
19577 #t))))))
19578 (propagated-inputs
19579 `(("fuse" ,fuse)))
19580 (home-page "https://github.com/fusepy/fusepy")
19581 (synopsis "Simple ctypes bindings for FUSE")
19582 (description "Python module that provides a simple interface to FUSE and
19583 MacFUSE. The binding is created using the standard @code{ctypes} library.")
19584 (license license:isc)))
19585
19586 (define-public python2-fusepy
19587 (package-with-python2 python-fusepy))
19588
19589 (define-public python-fusepyng
19590 (package
19591 (name "python-fusepyng")
19592 (version "1.0.7")
19593 (source
19594 (origin
19595 (method url-fetch)
19596 (uri (pypi-uri "fusepyng" version))
19597 (sha256
19598 (base32
19599 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
19600 (build-system python-build-system)
19601 (arguments
19602 '(#:phases
19603 (modify-phases %standard-phases
19604 (add-after 'unpack 'set-libfuse-path
19605 (lambda* (#:key inputs #:allow-other-keys)
19606 (let ((fuse (assoc-ref inputs "fuse")))
19607 (substitute* "fusepyng.py"
19608 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
19609 (string-append "\"" fuse "/lib/libfuse.so\""))))
19610 #t)))))
19611 (inputs
19612 `(("fuse" ,fuse)))
19613 (propagated-inputs
19614 `(("python-paramiko" ,python-paramiko)))
19615 (home-page "https://github.com/rianhunter/fusepyng")
19616 (synopsis "Simple ctypes bindings for FUSE")
19617 (description "@code{fusepyng} is a Python module that provides a simple
19618 interface to FUSE on various operating systems. It's just one file and is
19619 implemented using @code{ctypes}.")
19620 (license license:isc)))
19621
19622 (define-public python-userspacefs
19623 (package
19624 (name "python-userspacefs")
19625 (version "2.0.3")
19626 (source
19627 (origin
19628 (method url-fetch)
19629 (uri (pypi-uri "userspacefs" version))
19630 (sha256
19631 (base32
19632 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
19633 (build-system python-build-system)
19634 (propagated-inputs
19635 `(("python-fusepyng" ,python-fusepyng)))
19636 (home-page "https://github.com/rianhunter/userspacefs")
19637 (synopsis "User-space file systems for Python")
19638 (description
19639 "@code{userspacefs} is a library that allows you to easily write
19640 user-space file systems in Python.")
19641 (license license:gpl3+)))
19642
19643 (define-public python-stone
19644 (package
19645 (name "python-stone")
19646 (version "3.2.1")
19647 (source
19648 (origin
19649 (method url-fetch)
19650 (uri (pypi-uri "stone" version))
19651 (sha256
19652 (base32
19653 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
19654 (build-system python-build-system)
19655 (arguments
19656 `(#:phases
19657 (modify-phases %standard-phases
19658 (add-after 'unpack 'change-version-requirements
19659 (lambda _
19660 ;; Match the requirement in test/requirements.txt
19661 (substitute* "setup.py"
19662 (("pytest < 5") "pytest < 7"))
19663 ;; We don't care about a coverage report.
19664 (substitute* "test/requirements.txt"
19665 (("coverage.*") "coverage\n"))
19666 #t))
19667 (replace 'check
19668 (lambda* (#:key tests? #:allow-other-keys)
19669 (when tests?
19670 ;; These tests don't import currectly.
19671 (delete-file "test/test_js_client.py")
19672 (delete-file "test/test_tsd_types.py")
19673 (delete-file "test/test_python_gen.py")
19674 (setenv "PYTHONPATH"
19675 (string-append (getcwd) ":"
19676 (getenv "PYTHONPATH")))
19677 (invoke "pytest"))
19678 #t)))))
19679 (propagated-inputs
19680 `(("python-ply" ,python-ply)
19681 ("python-six" ,python-six)))
19682 (native-inputs
19683 `(("python-coverage" ,python-coverage)
19684 ("python-mock" ,python-mock)
19685 ("python-pytest" ,python-pytest)
19686 ("python-pytest-runner" ,python-pytest-runner)))
19687 (home-page "https://github.com/dropbox/stone")
19688 (synopsis "Official Api Spec Language for Dropbox")
19689 (description
19690 "Stone is an interface description language (IDL) for APIs.")
19691 (license license:expat)))
19692
19693 (define-public pybind11
19694 (package
19695 (name "pybind11")
19696 (version "2.6.1")
19697 (source (origin
19698 (method git-fetch)
19699 (uri (git-reference
19700 (url "https://github.com/pybind/pybind11")
19701 (commit (string-append "v" version))))
19702 (sha256
19703 (base32
19704 "1wh5b1xnywzxwxkyac2wvyqwzmy1qxs341jjk820r7b825wn6yad"))
19705 (file-name (git-file-name name version))))
19706 (build-system cmake-build-system)
19707 (native-inputs
19708 `(("python" ,python-wrapper)
19709
19710 ;; The following dependencies are used for tests.
19711 ("python-pytest" ,python-pytest)
19712 ("catch" ,catch-framework2-1)
19713 ("eigen" ,eigen)))
19714 (arguments
19715 `(#:configure-flags
19716 (list (string-append "-DCATCH_INCLUDE_DIR="
19717 (assoc-ref %build-inputs "catch")
19718 "/include/catch"))
19719
19720 #:phases (modify-phases %standard-phases
19721 (add-after 'install 'install-python
19722 (lambda* (#:key outputs #:allow-other-keys)
19723 (let ((out (assoc-ref outputs "out")))
19724 (with-directory-excursion "../source"
19725 (setenv "PYBIND11_USE_CMAKE" "yes")
19726 (invoke "python" "setup.py" "install"
19727 "--single-version-externally-managed"
19728 "--root=/"
19729 (string-append "--prefix=" out)))))))
19730
19731 #:test-target "check"))
19732 (home-page "https://github.com/pybind/pybind11/")
19733 (synopsis "Seamless operability between C++11 and Python")
19734 (description
19735 "@code{pybind11} is a lightweight header-only library that exposes C++
19736 types in Python and vice versa, mainly to create Python bindings of existing
19737 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
19738 library: to minimize boilerplate code in traditional extension modules by
19739 inferring type information using compile-time introspection.")
19740 (license license:bsd-3)))
19741
19742 (define-public python-pooch
19743 (package
19744 (name "python-pooch")
19745 (version "1.3.0")
19746 (source
19747 (origin
19748 (method url-fetch)
19749 (uri (pypi-uri "pooch" version))
19750 (sha256
19751 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
19752 (build-system python-build-system)
19753 (arguments
19754 `(#:tests? #f)) ;requires online data
19755 (propagated-inputs
19756 `(("python-appdirs" ,python-appdirs)
19757 ("python-packaging" ,python-packaging)
19758 ("python-requests" ,python-requests)))
19759 (home-page "https://github.com/fatiando/pooch")
19760 (synopsis "Manage your Python library's sample data files")
19761 (description
19762 "Pooch manages your Python library's sample data files: it automatically
19763 downloads and stores them in a local directory, with support for versioning
19764 and corruption checks.")
19765 (license license:bsd-3)))
19766
19767 (define-public python-fasteners
19768 (package
19769 (name "python-fasteners")
19770 (version "0.15")
19771 (source
19772 (origin
19773 (method url-fetch)
19774 (uri (pypi-uri "fasteners" version))
19775 (sha256
19776 (base32
19777 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
19778 (build-system python-build-system)
19779 (propagated-inputs
19780 `(("python-monotonic" ,python-monotonic)
19781 ("python-six" ,python-six)))
19782 (native-inputs
19783 `(("python-testtools" ,python-testtools)))
19784 (home-page "https://github.com/harlowja/fasteners")
19785 (synopsis "Python package that provides useful locks")
19786 (description
19787 "This package provides a Python program that provides following locks:
19788
19789 @itemize
19790 @item Locking decorator
19791 @item Reader-writer locks
19792 @item Inter-process locks
19793 @item Generic helpers
19794 @end itemize\n")
19795 (license license:asl2.0)))
19796
19797 (define-public python-requests-file
19798 (package
19799 (name "python-requests-file")
19800 (version "1.4.3")
19801 (source
19802 (origin
19803 (method url-fetch)
19804 (uri (pypi-uri "requests-file" version))
19805 (sha256
19806 (base32
19807 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
19808 (build-system python-build-system)
19809 (propagated-inputs
19810 `(("python-requests" ,python-requests)
19811 ("python-six" ,python-six)))
19812 (home-page
19813 "https://github.com/dashea/requests-file")
19814 (synopsis "File transport adapter for Requests")
19815 (description
19816 "Requests-File is a transport adapter for use with the Requests Python
19817 library to allow local file system access via @code{file://} URLs.")
19818 (license license:asl2.0)))
19819
19820 (define-public python2-requests-file
19821 (package-with-python2 python-requests-file))
19822
19823 (define-public python-identify
19824 (package
19825 (name "python-identify")
19826 (version "1.4.25")
19827 (source
19828 (origin
19829 ;; There are no tests in the PyPI tarball.
19830 (method git-fetch)
19831 (uri (git-reference
19832 (url "https://github.com/chriskuehl/identify")
19833 (commit (string-append "v" version))))
19834 (file-name (git-file-name name version))
19835 (sha256
19836 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
19837 (build-system python-build-system)
19838 (arguments
19839 `(#:phases
19840 (modify-phases %standard-phases
19841 (replace 'check
19842 (lambda _
19843 (invoke "pytest" "-vv"))))))
19844 (native-inputs
19845 `(("python-coverage" ,python-coverage)
19846 ("python-pytest" ,python-pytest)))
19847 (propagated-inputs
19848 `(("python-editdistance" ,python-editdistance)))
19849 (home-page "https://github.com/chriskuehl/identify")
19850 (synopsis "File identification library for Python")
19851 (description
19852 "@code{identify} is a file identification library for Python. Given
19853 a file (or some information about a file), return a set of standardized tags
19854 identifying what the file is.")
19855 (license license:expat)))
19856
19857 (define-public python-tldextract
19858 (package
19859 (name "python-tldextract")
19860 (version "2.2.0")
19861 (source
19862 (origin
19863 (method url-fetch)
19864 (uri (pypi-uri "tldextract" version))
19865 (sha256
19866 (base32
19867 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
19868 (build-system python-build-system)
19869 (native-inputs
19870 `(("python-pytest" ,python-pytest)
19871 ("python-responses" ,python-responses)))
19872 (propagated-inputs
19873 `(("python-idna" ,python-idna)
19874 ("python-requests" ,python-requests)
19875 ("python-requests-file" ,python-requests-file)))
19876 (home-page
19877 "https://github.com/john-kurkowski/tldextract")
19878 (synopsis
19879 "Separate the TLD from the registered domain and subdomains of a URL")
19880 (description
19881 "TLDExtract accurately separates the TLD from the registered domain and
19882 subdomains of a URL, using the Public Suffix List. By default, this includes
19883 the public ICANN TLDs and their exceptions. It can optionally support the
19884 Public Suffix List's private domains as well.")
19885 (license license:bsd-3)))
19886
19887 (define-public python2-tldextract
19888 (package-with-python2 python-tldextract))
19889
19890 (define-public python-nodeenv
19891 (package
19892 (name "python-nodeenv")
19893 (version "1.4.0")
19894 (source
19895 (origin
19896 ;; There's no tarball in PyPI.
19897 (method git-fetch)
19898 (uri (git-reference
19899 (url "https://github.com/ekalinin/nodeenv")
19900 (commit version)))
19901 (file-name (git-file-name name version))
19902 (sha256
19903 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
19904 (build-system python-build-system)
19905 (arguments
19906 `(#:phases
19907 (modify-phases %standard-phases
19908 (replace 'check
19909 (lambda _
19910 ;; This test fails. It tries to open a network socket.
19911 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
19912 (native-inputs
19913 `(("python-coverage" ,python-coverage)
19914 ("python-mock" ,python-mock)
19915 ("python-pytest" ,python-pytest)))
19916 (home-page "https://ekalinin.github.io/nodeenv/")
19917 (synopsis "Create isolated node.js environments")
19918 (description
19919 "Nodeenv (node.js virtual environment) is a tool to create isolated
19920 node.js environments. It creates an environment that has its own installation
19921 directories, that doesn't share libraries with other node.js virtual
19922 environments.")
19923 (license license:bsd-3)))
19924
19925 (define-public python-pynamecheap
19926 (package
19927 (name "python-pynamecheap")
19928 (version "0.0.3")
19929 (source
19930 (origin
19931 (method url-fetch)
19932 (uri (pypi-uri "PyNamecheap" version))
19933 (sha256
19934 (base32
19935 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
19936 (build-system python-build-system)
19937 (propagated-inputs
19938 `(("python-requests" ,python-requests)))
19939 (home-page
19940 "https://github.com/Bemmu/PyNamecheap")
19941 (synopsis
19942 "Namecheap API client in Python")
19943 (description
19944 "PyNamecheap is a Namecheap API client in Python.")
19945 (license license:expat)))
19946
19947 (define-public python2-pynamecheap
19948 (package-with-python2 python-pynamecheap))
19949
19950 (define-public python-dns-lexicon
19951 (package
19952 (name "python-dns-lexicon")
19953 (version "2.4.0")
19954 (source
19955 (origin
19956 (method url-fetch)
19957 (uri (pypi-uri "dns-lexicon" version))
19958 (sha256
19959 (base32
19960 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
19961 (build-system python-build-system)
19962 (arguments
19963 `(#:tests? #f)) ;requires internet access
19964 (propagated-inputs
19965 `(("python-future" ,python-future)
19966 ("python-pynamecheap" ,python-pynamecheap)
19967 ("python-requests" ,python-requests)
19968 ("python-tldextract" ,python-tldextract)
19969 ("python-urllib3" ,python-urllib3)))
19970 (home-page "https://github.com/AnalogJ/lexicon")
19971 (synopsis
19972 "Manipulate DNS records on various DNS providers")
19973 (description
19974 "Lexicon provides a way to manipulate DNS records on multiple DNS
19975 providers in a standardized way. It has a CLI but it can also be used as a
19976 Python library. It was designed to be used in automation, specifically with
19977 Let's Encrypt.")
19978 (license license:expat)))
19979
19980 (define-public python2-dns-lexicon
19981 (package-with-python2 python-dns-lexicon))
19982
19983 (define-public python-cfgv
19984 (package
19985 (name "python-cfgv")
19986 (version "3.1.0")
19987 (source
19988 (origin
19989 ;; There are no tests in the PyPI tarball.
19990 (method git-fetch)
19991 (uri (git-reference
19992 (url "https://github.com/asottile/cfgv")
19993 (commit (string-append "v" version))))
19994 (file-name (git-file-name name version))
19995 (sha256
19996 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19997 (build-system python-build-system)
19998 (arguments
19999 `(#:phases
20000 (modify-phases %standard-phases
20001 (replace 'check
20002 (lambda _
20003 (invoke "pytest" "-vv"))))))
20004 (native-inputs
20005 `(("python-covdefaults" ,python-covdefaults)
20006 ("python-coverage" ,python-coverage)
20007 ("python-pytest" ,python-pytest)))
20008 (home-page "https://github.com/asottile/cfgv")
20009 (synopsis "Configuration validation library")
20010 (description
20011 "This library helps to validate configuration files and produce human
20012 readable error messages.")
20013 (license license:expat)))
20014
20015 (define-public python-commandlines
20016 (package
20017 (name "python-commandlines")
20018 (version "0.4.1")
20019 (source
20020 (origin
20021 (method url-fetch)
20022 (uri (pypi-uri "commandlines" version))
20023 (sha256
20024 (base32
20025 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
20026 (build-system python-build-system)
20027 (home-page "https://github.com/chrissimpkins/commandlines")
20028 (synopsis "Command line argument to object parsing library")
20029 (description
20030 "@code{Commandlines} is a Python library for command line application
20031 development that supports command line argument parsing, command string
20032 validation testing and application logic.")
20033 (license license:expat)))
20034
20035 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
20036 ;; python-numba. They have a very unflexible relationship.
20037 (define-public python-numba
20038 (package
20039 (name "python-numba")
20040 (version "0.51.2")
20041 (source
20042 (origin
20043 (method url-fetch)
20044 (uri (pypi-uri "numba" version))
20045 (sha256
20046 (base32
20047 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
20048 (build-system python-build-system)
20049 (arguments
20050 `(#:phases
20051 (modify-phases %standard-phases
20052 (add-after 'unpack 'disable-proprietary-features
20053 (lambda _
20054 (setenv "NUMBA_DISABLE_HSA" "1")
20055 (setenv "NUMBA_DISABLE_CUDA" "1")
20056 #t))
20057 (replace 'check
20058 (lambda* (#:key inputs outputs #:allow-other-keys)
20059 (add-installed-pythonpath inputs outputs)
20060 ;; Something is wrong with the PYTHONPATH when running the
20061 ;; tests from the build directory, as it complains about not being
20062 ;; able to import certain modules.
20063 (with-directory-excursion "/tmp"
20064 (setenv "HOME" (getcwd))
20065 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
20066 (propagated-inputs
20067 `(("python-llvmlite" ,python-llvmlite)
20068 ("python-numpy" ,python-numpy)
20069 ("python-singledispatch" ,python-singledispatch)))
20070 (native-inputs ;for tests
20071 `(("python-jinja2" ,python-jinja2)
20072 ("python-pygments" ,python-pygments)))
20073 (home-page "https://numba.pydata.org")
20074 (synopsis "Compile Python code using LLVM")
20075 (description "Numba gives you the power to speed up your applications with
20076 high performance functions written directly in Python. With a few
20077 annotations, array-oriented and math-heavy Python code can be just-in-time
20078 compiled to native machine instructions, similar in performance to C, C++ and
20079 Fortran, without having to switch languages or Python interpreters.
20080
20081 Numba works by generating optimized machine code using the LLVM compiler
20082 infrastructure at import time, runtime, or statically (using the included pycc
20083 tool).")
20084 (license license:bsd-3)))
20085
20086 (define-public python-numcodecs
20087 (package
20088 (name "python-numcodecs")
20089 (version "0.6.4")
20090 (source
20091 (origin
20092 (method url-fetch)
20093 (uri (pypi-uri "numcodecs" version))
20094 (sha256
20095 (base32
20096 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
20097 (build-system python-build-system)
20098 (propagated-inputs
20099 `(("python-numpy" ,python-numpy)
20100 ("python-msgpack" ,python-msgpack)))
20101 (native-inputs
20102 `(("python-pytest" ,python-pytest)
20103 ("python-setuptools-scm" ,python-setuptools-scm)))
20104 (home-page "https://github.com/zarr-developers/numcodecs")
20105 (synopsis "Buffer compression and transformation codecs")
20106 (description
20107 "This Python package provides buffer compression and transformation
20108 codecs for use in data storage and communication applications.")
20109 (license license:expat)))
20110
20111 (define-public python-asciitree
20112 (package
20113 (name "python-asciitree")
20114 (version "0.3.3")
20115 (source
20116 (origin
20117 (method url-fetch)
20118 (uri (pypi-uri "asciitree" version))
20119 (sha256
20120 (base32
20121 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
20122 (build-system python-build-system)
20123 (home-page "https://github.com/mbr/asciitree")
20124 (synopsis "Draws ASCII trees")
20125 (description "This package draws tree structures using characters.")
20126 (license license:expat)))
20127
20128 (define-public python-zarr
20129 (package
20130 (name "python-zarr")
20131 (version "2.4.0")
20132 (source
20133 (origin
20134 (method url-fetch)
20135 (uri (pypi-uri "zarr" version))
20136 (sha256
20137 (base32
20138 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
20139 (build-system python-build-system)
20140 (arguments
20141 `(#:phases
20142 (modify-phases %standard-phases
20143 (add-after 'unpack 'disable-service-tests
20144 (lambda _
20145 (setenv "ZARR_TEST_ABS" "0")
20146 (setenv "ZARR_TEST_MONGO" "0")
20147 (setenv "ZARR_TEST_REDIS" "0")
20148 #t))
20149 (replace 'check
20150 (lambda _
20151 (invoke "pytest" "-vv" "-k" "not lmdb")
20152 #t)))))
20153 (propagated-inputs
20154 `(("python-asciitree" ,python-asciitree)
20155 ("python-fasteners" ,python-fasteners)
20156 ("python-numcodecs" ,python-numcodecs)
20157 ("python-numpy" ,python-numpy)))
20158 (native-inputs
20159 `(("python-pytest" ,python-pytest)
20160 ("python-setuptools-scm" ,python-setuptools-scm)))
20161 (home-page "https://github.com/zarr-developers/zarr-python")
20162 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
20163 (description
20164 "This package provides an implementation of chunked, compressed,
20165 N-dimensional arrays for Python.")
20166 (license license:expat)))
20167
20168 (define-public python-anndata
20169 (package
20170 (name "python-anndata")
20171 (version "0.7.1")
20172 (source
20173 (origin
20174 (method url-fetch)
20175 (uri (pypi-uri "anndata" version))
20176 (sha256
20177 (base32
20178 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
20179 (build-system python-build-system)
20180 (arguments
20181 `(#:phases
20182 (modify-phases %standard-phases
20183 (add-after 'unpack 'delete-inconvenient-tests
20184 (lambda _
20185 ;; This test depends on python-scikit-learn.
20186 (delete-file "anndata/tests/test_inplace_subset.py")
20187 #t))
20188 (delete 'check)
20189 (add-after 'install 'check
20190 (lambda* (#:key inputs outputs #:allow-other-keys)
20191 (add-installed-pythonpath inputs outputs)
20192 (invoke "pytest" "-vv"))))))
20193 (propagated-inputs
20194 `(("python-h5py" ,python-h5py)
20195 ("python-importlib-metadata" ,python-importlib-metadata)
20196 ("python-natsort" ,python-natsort)
20197 ("python-numcodecs" ,python-numcodecs)
20198 ("python-packaging" ,python-packaging)
20199 ("python-pandas" ,python-pandas)
20200 ("python-scipy" ,python-scipy)
20201 ("python-zarr" ,python-zarr)))
20202 (native-inputs
20203 `(("python-joblib" ,python-joblib)
20204 ("python-pytest" ,python-pytest)
20205 ("python-setuptools-scm" ,python-setuptools-scm)))
20206 (home-page "https://github.com/theislab/anndata")
20207 (synopsis "Annotated data for data analysis pipelines")
20208 (description "Anndata is a package for simple (functional) high-level APIs
20209 for data analysis pipelines. In this context, it provides an efficient,
20210 scalable way of keeping track of data together with learned annotations and
20211 reduces the code overhead typically encountered when using a mostly
20212 object-oriented library such as @code{scikit-learn}.")
20213 (license license:bsd-3)))
20214
20215 (define-public python-dill
20216 (package
20217 (name "python-dill")
20218 (version "0.3.1.1")
20219 (source
20220 (origin
20221 (method url-fetch)
20222 (uri (pypi-uri "dill" version))
20223 (sha256
20224 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
20225 (build-system python-build-system)
20226 (arguments
20227 `(#:phases
20228 (modify-phases %standard-phases
20229 (replace 'check
20230 (lambda _
20231 (with-directory-excursion "/tmp"
20232 (invoke "nosetests" "-v"))
20233 #t)))))
20234 (native-inputs
20235 `(("python-nose" ,python-nose)))
20236 (home-page "https://pypi.org/project/dill/")
20237 (synopsis "Serialize all of Python")
20238 (description "Dill extends Python's @code{pickle} module for serializing
20239 and de-serializing Python objects to the majority of the built-in Python
20240 types. Dill provides the user the same interface as the @code{pickle} module,
20241 and also includes some additional features. In addition to pickling Python
20242 objects, @code{dill} provides the ability to save the state of an interpreter
20243 session in a single command. Hence, it would be feasible to save a
20244 interpreter session, close the interpreter, ship the pickled file to another
20245 computer, open a new interpreter, unpickle the session and thus continue from
20246 the saved state of the original interpreter session.")
20247 (license license:bsd-3)))
20248
20249 (define-public python-multiprocess
20250 (package
20251 (name "python-multiprocess")
20252 (version "0.70.9")
20253 (source
20254 (origin
20255 (method url-fetch)
20256 (uri (pypi-uri "multiprocess" version))
20257 (sha256
20258 (base32
20259 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
20260 (build-system python-build-system)
20261 (arguments
20262 `(#:phases
20263 (modify-phases %standard-phases
20264 (add-after 'unpack 'disable-broken-tests
20265 (lambda _
20266 ;; This test is broken as there is no keyboard interrupt.
20267 (substitute* "py3.7/multiprocess/tests/__init__.py"
20268 (("^(.*)def test_wait_result"
20269 line indent)
20270 (string-append indent
20271 "@unittest.skip(\"Disabled by Guix\")\n"
20272 line)))
20273 #t))
20274 ;; Tests must be run after installation.
20275 (delete 'check)
20276 (add-after 'install 'check
20277 (lambda* (#:key inputs outputs #:allow-other-keys)
20278 (add-installed-pythonpath inputs outputs)
20279 (invoke "python" "-m" "multiprocess.tests")
20280 #t)))))
20281 (propagated-inputs
20282 `(("python-dill" ,python-dill)))
20283 (home-page "https://pypi.org/project/multiprocess/")
20284 (synopsis "Multiprocessing and multithreading in Python")
20285 (description
20286 "This package is a fork of the multiprocessing Python package, a package
20287 which supports the spawning of processes using the API of the standard
20288 library's @code{threading} module.")
20289 (license license:bsd-3)))
20290
20291 (define-public python-toolz
20292 (package
20293 (name "python-toolz")
20294 (version "0.9.0")
20295 (source
20296 (origin
20297 (method url-fetch)
20298 (uri (pypi-uri "toolz" version))
20299 (sha256
20300 (base32
20301 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
20302 (build-system python-build-system)
20303 ;; FIXME: tests cannot be computed: "Can't perform this operation for
20304 ;; unregistered loader type"
20305 (arguments '(#:tests? #f))
20306 (home-page "https://github.com/pytoolz/toolz/")
20307 (synopsis "List processing tools and functional utilities")
20308 (description
20309 "This package provides a set of utility functions for iterators,
20310 functions, and dictionaries.")
20311 (license license:bsd-3)))
20312
20313 (define-public python2-toolz
20314 (package-with-python2 python-toolz))
20315
20316 (define-public python-cytoolz
20317 (package
20318 (name "python-cytoolz")
20319 (version "0.9.0.1")
20320 (source
20321 (origin
20322 (method url-fetch)
20323 (uri (pypi-uri "cytoolz" version))
20324 (sha256
20325 (base32
20326 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
20327 (build-system python-build-system)
20328 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
20329 ;; 'exceptions'"
20330 (arguments '(#:tests? #f))
20331 (propagated-inputs
20332 `(("python-toolz" ,python-toolz)))
20333 (native-inputs
20334 `(("python-cython" ,python-cython)))
20335 (home-page "https://github.com/pytoolz/cytoolz")
20336 (synopsis "High performance functional utilities")
20337 (description
20338 "The cytoolz package implements the same API as provided by toolz. The
20339 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
20340 that is accessible to other projects developed in Cython.")
20341 (license license:bsd-3)))
20342
20343 (define-public python-sortedcollections
20344 (package
20345 (name "python-sortedcollections")
20346 (version "2.1.0")
20347 (source
20348 (origin
20349 (method url-fetch)
20350 (uri (pypi-uri "sortedcollections" version))
20351 (sha256
20352 (base32
20353 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
20354 (build-system python-build-system)
20355 (propagated-inputs
20356 `(("python-sortedcontainers" ,python-sortedcontainers)))
20357 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
20358 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
20359 (synopsis "Python Sorted Collections")
20360 (description "Sorted Collections is a Python sorted collections library.")
20361 (license license:asl2.0)))
20362
20363 (define-public python-sortedcontainers
20364 (package
20365 (name "python-sortedcontainers")
20366 (version "2.1.0")
20367 (source
20368 (origin
20369 (method url-fetch)
20370 (uri (pypi-uri "sortedcontainers" version))
20371 (sha256
20372 (base32
20373 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
20374 (build-system python-build-system)
20375 (arguments
20376 ;; FIXME: Tests require many extra dependencies, and would introduce
20377 ;; a circular dependency on hypothesis, which uses this package.
20378 '(#:tests? #f))
20379 (propagated-inputs
20380 `(("python-appdirs" ,python-appdirs)
20381 ("python-distlib" ,python-distlib)
20382 ("python-filelock" ,python-filelock)
20383 ("python-six" ,python-six-bootstrap)))
20384 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
20385 (synopsis "Sorted List, Sorted Dict, Sorted Set")
20386 (description
20387 "This package provides a sorted collections library, written in
20388 pure-Python.")
20389 (license license:asl2.0)))
20390
20391 (define-public python2-sortedcontainers
20392 (package-with-python2 python-sortedcontainers))
20393
20394 (define-public python-cloudpickle
20395 (package
20396 (name "python-cloudpickle")
20397 (version "1.3.0")
20398 (source
20399 (origin
20400 (method url-fetch)
20401 (uri (pypi-uri "cloudpickle" version))
20402 (sha256
20403 (base32
20404 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
20405 (build-system python-build-system)
20406 (arguments
20407 '(#:phases (modify-phases %standard-phases
20408 (add-before 'check 'do-not-override-PYTHONPATH
20409 (lambda _
20410 ;; Append to PYTHONPATH instead of overriding it so
20411 ;; that dependencies from Guix can be found.
20412 (substitute* "tests/testutils.py"
20413 (("env\\['PYTHONPATH'\\] = pythonpath")
20414 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
20415 #t))
20416 (replace 'check
20417 (lambda* (#:key tests? #:allow-other-keys)
20418 (if tests?
20419 (invoke "pytest" "-s" "-vv")
20420 (format #t "test suite not run~%"))
20421 #t)))))
20422 (native-inputs
20423 `(;; For tests.
20424 ("python-psutil" ,python-psutil)
20425 ("python-pytest" ,python-pytest)
20426 ("python-tornado" ,python-tornado)))
20427 (home-page "https://github.com/cloudpipe/cloudpickle")
20428 (synopsis "Extended pickling support for Python objects")
20429 (description
20430 "Cloudpickle makes it possible to serialize Python constructs not
20431 supported by the default pickle module from the Python standard library. It
20432 is especially useful for cluster computing where Python expressions are
20433 shipped over the network to execute on remote hosts, possibly close to the
20434 data.")
20435 (properties `((python2-variant . ,(delay python2-cloudpickle))))
20436 (license license:bsd-3)))
20437
20438 (define-public python2-cloudpickle
20439 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
20440 (package/inherit base
20441 (native-inputs
20442 `(("python-mock" ,python2-mock)
20443 ,@(package-native-inputs base)))
20444 (propagated-inputs
20445 `(("python-futures" ,python2-futures)
20446 ,@(package-propagated-inputs base))))))
20447
20448 (define-public python-locket
20449 (package
20450 (name "python-locket")
20451 (version "0.2.0")
20452 (source
20453 (origin
20454 (method url-fetch)
20455 (uri (pypi-uri "locket" version))
20456 (sha256
20457 (base32
20458 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
20459 (build-system python-build-system)
20460 (home-page "https://github.com/mwilliamson/locket.py")
20461 (synopsis "File-based locks for Python")
20462 (description
20463 "Locket implements a lock that can be used by multiple processes provided
20464 they use the same path.")
20465 (license license:bsd-2)))
20466
20467 (define-public python2-locket
20468 (package-with-python2 python-locket))
20469
20470 (define-public python-blosc
20471 (package
20472 (name "python-blosc")
20473 (version "1.5.1")
20474 (source
20475 (origin
20476 (method url-fetch)
20477 (uri (pypi-uri "blosc" version))
20478 (sha256
20479 (base32
20480 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
20481 (build-system python-build-system)
20482 ;; FIXME: all tests pass, but then this error is printed:
20483 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
20484 (arguments '(#:tests? #f))
20485 (propagated-inputs
20486 `(("python-numpy" ,python-numpy)))
20487 (home-page "https://github.com/blosc/python-blosc")
20488 (synopsis "Python wrapper for the Blosc data compressor library")
20489 (description "Blosc is a high performance compressor optimized for binary
20490 data. It has been designed to transmit data to the processor cache faster
20491 than the traditional, non-compressed, direct memory fetch approach via a
20492 @code{memcpy()} system call.
20493
20494 Blosc works well for compressing numerical arrays that contains data with
20495 relatively low entropy, like sparse data, time series, grids with
20496 regular-spaced values, etc.
20497
20498 This Python package wraps the Blosc library.")
20499 (license license:bsd-3)))
20500
20501 (define-public python2-blosc
20502 (package-with-python2 python-blosc))
20503
20504 (define-public python-partd
20505 (package
20506 (name "python-partd")
20507 (version "0.3.9")
20508 (source
20509 (origin
20510 (method url-fetch)
20511 (uri (pypi-uri "partd" version))
20512 (sha256
20513 (base32
20514 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
20515 (build-system python-build-system)
20516 (propagated-inputs
20517 `(("python-blosc" ,python-blosc)
20518 ("python-locket" ,python-locket)
20519 ("python-numpy" ,python-numpy)
20520 ("python-pandas" ,python-pandas)
20521 ("python-pyzmq" ,python-pyzmq)
20522 ("python-toolz" ,python-toolz)))
20523 (home-page "https://github.com/dask/partd/")
20524 (synopsis "Appendable key-value storage")
20525 (description "Partd stores key-value pairs. Values are raw bytes. We
20526 append on old values. Partd excels at shuffling operations.")
20527 (license license:bsd-3)))
20528
20529 (define-public python2-partd
20530 (package-with-python2 python-partd))
20531
20532 (define-public python-fsspec
20533 (package
20534 (name "python-fsspec")
20535 (version "0.6.1")
20536 (source
20537 (origin
20538 (method url-fetch)
20539 (uri (pypi-uri "fsspec" version))
20540 (sha256
20541 (base32
20542 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
20543 (build-system python-build-system)
20544 (arguments '(#:tests? #f)) ; there are none
20545 (home-page "https://github.com/intake/filesystem_spec")
20546 (synopsis "File-system specification")
20547 (description "The purpose of this package is to produce a template or
20548 specification for a file-system interface, that specific implementations
20549 should follow, so that applications making use of them can rely on a common
20550 behavior and not have to worry about the specific internal implementation
20551 decisions with any given backend.")
20552 (license license:bsd-3)))
20553
20554 (define-public python-dask
20555 (package
20556 (name "python-dask")
20557 (version "2.14.0")
20558 (source
20559 (origin
20560 (method url-fetch)
20561 (uri (pypi-uri "dask" version))
20562 (sha256
20563 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
20564 (build-system python-build-system)
20565 (arguments
20566 `(#:phases
20567 (modify-phases %standard-phases
20568 (add-after 'unpack 'disable-broken-tests
20569 (lambda _
20570 ;; This test is marked as xfail when pytest-xdist is used.
20571 (substitute* "dask/tests/test_threaded.py"
20572 (("def test_interrupt\\(\\)" m)
20573 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20574 m)))
20575 ;; This one fails with a type error:
20576 ;; TypeError: Already tz-aware, use tz_convert to convert.
20577 (substitute* "dask/dataframe/tests/test_shuffle.py"
20578 (("def test_set_index_timestamp\\(\\)" m)
20579 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20580 m)))
20581 #t))
20582 (replace 'check
20583 (lambda _ (invoke "pytest" "-vv"))))))
20584 (propagated-inputs
20585 `(("python-cloudpickle" ,python-cloudpickle)
20586 ("python-fsspec" ,python-fsspec)
20587 ("python-numpy" ,python-numpy)
20588 ("python-packaging" ,python-packaging)
20589 ("python-pandas" ,python-pandas)
20590 ("python-partd" ,python-partd)
20591 ("python-toolz" ,python-toolz)
20592 ("python-pyyaml" ,python-pyyaml)))
20593 (native-inputs
20594 `(("python-pytest" ,python-pytest)
20595 ("python-pytest-runner" ,python-pytest-runner)))
20596 (home-page "https://github.com/dask/dask/")
20597 (synopsis "Parallel computing with task scheduling")
20598 (description
20599 "Dask is a flexible parallel computing library for analytics. It
20600 consists of two components: dynamic task scheduling optimized for computation,
20601 and large data collections like parallel arrays, dataframes, and lists that
20602 extend common interfaces like NumPy, Pandas, or Python iterators to
20603 larger-than-memory or distributed environments. These parallel collections
20604 run on top of the dynamic task schedulers. ")
20605 (license license:bsd-3)))
20606
20607 (define-public python-ilinkedlist
20608 (package
20609 (name "python-ilinkedlist")
20610 (version "0.4.0")
20611 (source
20612 (origin
20613 (method url-fetch)
20614 (uri (pypi-uri "ilinkedlist" version))
20615 (sha256
20616 (base32
20617 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
20618 (build-system python-build-system)
20619 (native-inputs `(("python-pytest" ,python-pytest)))
20620 (inputs `(("python" ,python)))
20621 (home-page "https://github.com/luther9/ilinkedlist-py")
20622 (synopsis "Immutable linked list library")
20623 (description
20624 "This is a implementation of immutable linked lists for Python. It
20625 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
20626 Since a linked list is treated as immutable, it is hashable, and its length
20627 can be retrieved in constant time. Some of the terminology is inspired by
20628 LISP. It is possible to create an improper list by creating a @code{Pair}
20629 with a non-list @code{cdr}.")
20630 (license license:gpl3+)))
20631
20632 (define-public python-readlike
20633 (package
20634 (name "python-readlike")
20635 (version "0.1.3")
20636 (source
20637 (origin
20638 (method url-fetch)
20639 (uri (pypi-uri "readlike" version))
20640 (sha256
20641 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
20642 (build-system python-build-system)
20643 (home-page "https://github.com/jangler/readlike")
20644 (synopsis "GNU Readline-like line editing module")
20645 (description
20646 "This Python module provides line editing functions similar to the default
20647 Emacs-style ones of GNU Readline. Unlike the Python standard library's
20648 @code{readline} package, this one allows access to those capabilities in settings
20649 outside of a standard command-line interface. It is especially well-suited to
20650 interfacing with Urwid, due to a shared syntax for describing key inputs.
20651
20652 Currently, all stateless Readline commands are implemented. Yanking and history
20653 are not supported.")
20654 (license license:expat)))
20655
20656 (define-public python2-readlike
20657 (package-with-python2 python-readlike))
20658
20659 (define-public python-reparser
20660 (package
20661 (name "python-reparser")
20662 (version "1.4.3")
20663 (source
20664 (origin
20665 (method url-fetch)
20666 (uri (pypi-uri "ReParser" version))
20667 (sha256
20668 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
20669 (build-system python-build-system)
20670 (home-page "https://github.com/xmikos/reparser")
20671 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
20672 (description
20673 "This Python library provides a simple lexer/parser for inline markup based
20674 on regular expressions.")
20675 (license license:expat)))
20676
20677 (define-public python2-reparser
20678 (let ((reparser (package-with-python2
20679 (strip-python2-variant python-reparser))))
20680 (package/inherit reparser
20681 (propagated-inputs
20682 `(("python2-enum34" ,python2-enum34)
20683 ,@(package-propagated-inputs reparser))))))
20684
20685 (define-public python-retrying
20686 (package
20687 (name "python-retrying")
20688 (version "1.3.3")
20689 (source
20690 (origin
20691 (method git-fetch)
20692 (uri (git-reference
20693 (url "https://github.com/rholder/retrying")
20694 (commit (string-append "v" version))))
20695 (file-name (git-file-name name version))
20696 (sha256
20697 (base32
20698 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
20699 (build-system python-build-system)
20700 (propagated-inputs
20701 `(("python-six" ,python-six)))
20702 (home-page "https://github.com/rholder/retrying")
20703 (synopsis "Library for adding retry behavior")
20704 (description "Retrying is a general-purpose retrying library to simplify
20705 the task of adding retry behavior to just about anything.
20706
20707 Features:
20708
20709 @itemize
20710 @item Generic Decorator API.
20711 @item Specify stop condition (i.e. limit by number of attempts).
20712 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
20713 @item Customize retrying on Exceptions.
20714 @item Customize retrying on expected returned result.
20715 @end itemize")
20716 (license license:asl2.0)))
20717
20718 (define-public python-pre-commit
20719 (package
20720 (name "python-pre-commit")
20721 (version "2.10.0")
20722 (source
20723 (origin
20724 (method url-fetch)
20725 (uri (pypi-uri "pre_commit" version))
20726 (sha256
20727 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
20728 (build-system python-build-system)
20729 (arguments
20730 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
20731 ;; attribute 'empty_template_setup'".
20732 `(#:tests? #false))
20733 (propagated-inputs
20734 `(("python-cfgv" ,python-cfgv)
20735 ("python-identify" ,python-identify)
20736 ("python-importlib-metadata" ,python-importlib-metadata)
20737 ("python-importlib-resources" ,python-importlib-resources)
20738 ("python-nodeenv" ,python-nodeenv)
20739 ("python-pyyaml" ,python-pyyaml)
20740 ("python-toml" ,python-toml)
20741 ("python-virtualenv" ,python-virtualenv)))
20742 (home-page "https://github.com/pre-commit/pre-commit")
20743 (synopsis "Framework for managing multi-language pre-commit hooks")
20744 (description
20745 "This package provides a framework for managing and maintaining
20746 multi-language pre-commit hooks.")
20747 (license license:expat)))
20748
20749 (define-public python-precis-i18n
20750 (package
20751 (name "python-precis-i18n")
20752 (version "1.0.0")
20753 (source
20754 (origin
20755 (method url-fetch)
20756 (uri (pypi-uri "precis_i18n" version))
20757 (sha256
20758 (base32
20759 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
20760 (build-system python-build-system)
20761 (home-page "https://github.com/byllyfish/precis_i18n")
20762 (synopsis "Implementation of the PRECIS framework")
20763 (description
20764 "This module implements the PRECIS Framework as described in RFC 8264,
20765 RFC 8265 and RFC 8266.")
20766 (license license:expat)))
20767
20768 (define-public python-absl-py
20769 (package
20770 (name "python-absl-py")
20771 (version "0.6.1")
20772 (source
20773 (origin
20774 (method url-fetch)
20775 (uri (pypi-uri "absl-py" version))
20776 (sha256
20777 (base32
20778 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
20779 (build-system python-build-system)
20780 (propagated-inputs
20781 `(("python-six" ,python-six)))
20782 (home-page "https://github.com/abseil/abseil-py")
20783 (synopsis "Abseil Python common libraries")
20784 (description
20785 "This package provides the Abseil Python Common Libraries, a collection
20786 of Python libraries for building Python applications.")
20787 (license license:asl2.0)))
20788
20789 (define-public python-astor
20790 (package
20791 (name "python-astor")
20792 (version "0.8.1")
20793 (source
20794 (origin
20795 (method url-fetch)
20796 (uri (pypi-uri "astor" version))
20797 (sha256
20798 (base32
20799 "0ppscdzzvxpznclkmhhj53iz314x3pfv4yc7c6gwxqgljgdgyvka"))))
20800 (build-system python-build-system)
20801 ;; FIXME: There are two errors and two test failures.
20802 (arguments `(#:tests? #f))
20803 (home-page "https://github.com/berkerpeksag/astor")
20804 (synopsis "Read and write Python ASTs")
20805 (description "Astor is designed to allow easy manipulation of Python
20806 source via the Abstract Syntax Tree.")
20807 (license license:bsd-3)))
20808
20809 (define-public python2-astor
20810 (package-with-python2 python-astor))
20811
20812 (define-public python-astunparse
20813 (package
20814 (name "python-astunparse")
20815 (version "1.6.2")
20816 (source
20817 (origin
20818 (method url-fetch)
20819 (uri (pypi-uri "astunparse" version))
20820 (sha256
20821 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
20822 (build-system python-build-system)
20823 (arguments '(#:tests? #f)) ; there are none
20824 (propagated-inputs
20825 `(("python-six" ,python-six)
20826 ("python-wheel" ,python-wheel)))
20827 (home-page "https://github.com/simonpercivall/astunparse")
20828 (synopsis "AST unparser for Python")
20829 (description "This package provides an AST unparser for Python. It is a
20830 factored out version of @code{unparse} found in the Python source
20831 distribution.")
20832 (license license:bsd-3)))
20833
20834 (define-public python-gast
20835 (package
20836 (name "python-gast")
20837 (version "0.3.3")
20838 (source
20839 (origin
20840 (method url-fetch)
20841 (uri (pypi-uri "gast" version))
20842 (sha256
20843 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
20844 (build-system python-build-system)
20845 (propagated-inputs
20846 `(("python-astunparse" ,python-astunparse)))
20847 (home-page "https://pypi.org/project/gast/")
20848 (synopsis "Generic Python AST that abstracts the underlying Python version")
20849 (description
20850 "GAST provides a compatibility layer between the AST of various Python
20851 versions, as produced by @code{ast.parse} from the standard @code{ast}
20852 module.")
20853 (license license:bsd-3)))
20854
20855 (define-public python-wikidata
20856 (package
20857 (name "python-wikidata")
20858 (version "0.6.1")
20859 (source
20860 (origin
20861 (method url-fetch)
20862 (uri (pypi-uri "Wikidata" version))
20863 (sha256
20864 (base32
20865 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
20866 (build-system python-build-system)
20867 (propagated-inputs
20868 `(("python-babel" ,python-babel)))
20869 (home-page "https://github.com/dahlia/wikidata")
20870 (synopsis "Wikidata client library")
20871 (description
20872 "This package provides a Python interface to
20873 @url{https://www.wikidata.org/, Wikidata}.")
20874 (properties '((upstream-name . "Wikidata")))
20875 (license license:gpl3+)))
20876
20877 (define-public python-doctest-ignore-unicode
20878 (package
20879 (name "python-doctest-ignore-unicode")
20880 (version "0.1.2")
20881 (source
20882 (origin
20883 (method url-fetch)
20884 (uri (pypi-uri "doctest-ignore-unicode" version))
20885 (sha256
20886 (base32
20887 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
20888 (build-system python-build-system)
20889 (native-inputs
20890 `(("python-nose" ,python-nose)))
20891 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
20892 (synopsis "Ignore Unicode literal prefixes in doctests")
20893 (description
20894 "This package adds support for a flag to ignore Unicode literal prefixes
20895 in doctests.")
20896 (license license:asl2.0)))
20897
20898 (define-public python-attr
20899 (package
20900 (name "python-attr")
20901 (version "0.3.1")
20902 (source
20903 (origin
20904 (method url-fetch)
20905 (uri (pypi-uri "attr" version))
20906 (sha256
20907 (base32
20908 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
20909 (build-system python-build-system)
20910 (home-page "https://github.com/denis-ryzhkov/attr")
20911 (synopsis "Decorator for attributes of target function or class")
20912 (description "Simple decorator to set attributes of target function or
20913 class in a @acronym{DRY, Don't Repeat Yourself} way.")
20914 (license license:expat)))
20915
20916 (define-public python-construct
20917 (package
20918 (name "python-construct")
20919 (version "2.10.56")
20920 (source
20921 (origin
20922 (method url-fetch)
20923 (uri (pypi-uri "construct" version))
20924 (sha256
20925 (base32
20926 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
20927 (build-system python-build-system)
20928 (arguments
20929 `(#:tests? #f)) ; No tests exist.
20930 (propagated-inputs
20931 `(("python-extras" ,python-extras)
20932 ("python-arrow" ,python-arrow)
20933 ("python-numpy" ,python-numpy)
20934 ("python-ruamel.yaml" ,python-ruamel.yaml)))
20935 (home-page "https://construct.readthedocs.io")
20936 (synopsis "Declarative and symmetrical parser and builder for binary data")
20937 (description
20938 "This package provides both simple, atomic constructs (such as
20939 integers of various sizes), as well as composite ones which allow you
20940 form hierarchical and sequential structures of increasing complexity.
20941 It features bit and byte granularity, easy debugging and testing, an
20942 easy-to-extend subclass system, and lots of primitive constructs to
20943 make your work easier.")
20944 (license license:expat)))
20945
20946 (define-public python-outcome
20947 (package
20948 (name "python-outcome")
20949 (version "1.0.1")
20950 (source
20951 (origin
20952 (method url-fetch)
20953 (uri (pypi-uri "outcome" version))
20954 (sha256
20955 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
20956 (build-system python-build-system)
20957 (arguments
20958 `(#:phases
20959 (modify-phases %standard-phases
20960 (replace 'check
20961 (lambda* (#:key inputs outputs #:allow-other-keys)
20962 (add-installed-pythonpath inputs outputs)
20963 (invoke "pytest" "-vv"))))))
20964 (native-inputs
20965 `(("python-pytest" ,python-pytest)
20966 ("python-pytest-cov" ,python-pytest-cov)
20967 ("python-pytest-asyncio" ,python-pytest-asyncio)))
20968 (propagated-inputs
20969 `(("python-async-generator" ,python-async-generator)
20970 ("python-attrs" ,python-attrs)))
20971 (home-page "https://github.com/python-trio/outcome")
20972 (synopsis "Capture the outcome of Python function calls")
20973 (description
20974 "Capture the outcome of Python function calls. Extracted from the Trio
20975 project.")
20976 ;; Either license applies.
20977 (license (list license:expat license:asl2.0))))
20978
20979 (define-public python-trio
20980 (package
20981 (name "python-trio")
20982 (version "0.17.0")
20983 (source
20984 (origin
20985 (method url-fetch)
20986 (uri (pypi-uri "trio" version))
20987 (sha256
20988 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
20989 (build-system python-build-system)
20990 (arguments
20991 `(#:phases
20992 (modify-phases %standard-phases
20993 (add-before 'check 'change-home
20994 (lambda _
20995 ;; Tests require a writable home.
20996 (setenv "HOME" "/tmp")
20997 #t))
20998 (replace 'check
20999 (lambda _
21000 (invoke "pytest" "-vv" "-k"
21001 (string-append
21002 ;; This test times out.
21003 "not test_ki_protection_works"
21004 ;; Assertion errors.
21005 " and not test_guest_mode_ki"
21006 " and not test_run_in_trio_thread_ki"
21007 ;; These try to raise KeyboardInterrupt which does not work
21008 ;; in the build environment.
21009 " and not test_ki_self"
21010 " and not test_ki_wakes_us_up"
21011 ;; Failure in name resolution.
21012 " and not test_getnameinfo"
21013 " and not test_SocketType_resolve"
21014 ;; OSError: protocol not found.
21015 " and not test_getprotobyname")))))))
21016 (native-inputs
21017 `(("python-astor" ,python-astor)
21018 ("python-ipython" ,python-ipython)
21019 ("python-jedi" ,python-jedi)
21020 ("python-pylint" ,python-pylint)
21021 ("python-pyopenssl" ,python-pyopenssl)
21022 ("python-pytest" ,python-pytest)
21023 ("python-pytest-cov" ,python-pytest-cov)
21024 ("python-trustme" ,python-trustme)))
21025 (propagated-inputs
21026 `(("python-attrs" ,python-attrs)
21027 ("python-idna" ,python-idna)
21028 ("python-outcome" ,python-outcome)
21029 ("python-sniffio" ,python-sniffio)
21030 ("python-sortedcontainers"
21031 ,python-sortedcontainers)))
21032 (home-page "https://github.com/python-trio/trio")
21033 (synopsis "Friendly Python library for async concurrency and I/O")
21034 (description
21035 "Trio strives to be a production-quality, async/await-native I/O library
21036 for Python. Like all async libraries, its main purpose is to help you write
21037 programs that do multiple things at the same time with parallelized I/O.")
21038 ;; Either license applies.
21039 (license (list license:expat license:asl2.0))))
21040
21041 (define-public python-trio-typing
21042 (package
21043 (name "python-trio-typing")
21044 (version "0.5.0")
21045 (source
21046 (origin
21047 (method url-fetch)
21048 (uri (pypi-uri "trio-typing" version))
21049 (sha256
21050 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
21051 (build-system python-build-system)
21052 (arguments
21053 `(#:phases
21054 (modify-phases %standard-phases
21055 (replace 'check
21056 (lambda _
21057 (invoke "pytest" "-vv"))))))
21058 (native-inputs
21059 `(("python-attrs" ,python-attrs)
21060 ("python-pytest" ,python-pytest)))
21061 (propagated-inputs
21062 `(("python-mypy" ,python-mypy)
21063 ("python-mypy-extensions"
21064 ,python-mypy-extensions)
21065 ("python-trio" ,python-trio)
21066 ("python-typing-extensions"
21067 ,python-typing-extensions)))
21068 (home-page "https://github.com/python-trio/trio-typing")
21069 (synopsis "Static type checking support for Trio and related projects")
21070 (description
21071 "This package provides:
21072
21073 @itemize
21074 @item PEP 561 typing stubs packages for the Trio project packages:
21075
21076 @itemize
21077 @item trio (@code{trio-stubs})
21078 @item outcome (@code{outcome-stubs})
21079 @item async_generator (@code{async_generator-stubs})
21080 @end itemize
21081
21082 @item A package @code{trio_typing} containing types that Trio programs often
21083 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
21084 a mypy plugin that smooths over some limitations in the basic type hints.
21085 @end itemize")
21086 ;; Either license applies.
21087 (license (list license:expat license:asl2.0))))
21088
21089 (define-public python-humanize
21090 (package
21091 (name "python-humanize")
21092 (version "0.5.1")
21093 (source
21094 (origin
21095 (method url-fetch)
21096 (uri (pypi-uri "humanize" version))
21097 (sha256
21098 (base32
21099 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
21100 (arguments
21101 '(#:tests? #f)) ; tests not in pypi archive
21102 (build-system python-build-system)
21103 (home-page "https://github.com/jmoiron/humanize")
21104 (synopsis "Print numerical information in a human-readable form")
21105 (description "This package provides a Python module that displays numbers
21106 and dates in \"human readable\" forms. For example, it would display
21107 \"12345591313\" as \"12.3 billion\".")
21108 (license license:expat)))
21109
21110 (define-public python-txaio
21111 (package
21112 (name "python-txaio")
21113 (version "18.8.1")
21114 (source
21115 (origin
21116 (method url-fetch)
21117 (uri (pypi-uri "txaio" version))
21118 (sha256
21119 (base32
21120 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
21121 (build-system python-build-system)
21122 (propagated-inputs
21123 `(("python-twisted" ,python-twisted)
21124 ("python-six" ,python-six)))
21125 (home-page "https://github.com/crossbario/txaio")
21126 (synopsis "Compatibility layer between Python asyncio and Twisted")
21127 (description "Txaio provides a compatibility layer between the Python
21128 @code{asyncio} module and @code{Twisted}.")
21129 (license license:expat)))
21130
21131 (define-public python-toolshed
21132 (package
21133 (name "python-toolshed")
21134 (version "0.4.6")
21135 (source
21136 (origin
21137 (method url-fetch)
21138 (uri (pypi-uri "toolshed" version))
21139 (sha256
21140 (base32
21141 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
21142 (build-system python-build-system)
21143 (native-inputs
21144 `(("python-nose" ,python-nose)))
21145 (home-page "https://github.com/brentp/toolshed/")
21146 (synopsis "Collection of modules and functions for working with data")
21147 (description "This is a collection of well-tested, simple modules and
21148 functions that aim to reduce boilerplate when working with data.")
21149 (license license:bsd-2)))
21150
21151 (define-public python-annoy
21152 (package
21153 (name "python-annoy")
21154 (version "1.15.1")
21155 (source
21156 (origin
21157 (method url-fetch)
21158 (uri (pypi-uri "annoy" version))
21159 (sha256
21160 (base32
21161 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
21162 (build-system python-build-system)
21163 (native-inputs
21164 `(("python-nose" ,python-nose)))
21165 (home-page "https://github.com/spotify/annoy/")
21166 (synopsis "Approximate nearest neighbors library")
21167 (description
21168 "Annoy is a C++ library with Python bindings to search for points in
21169 space that are close to a given query point. It also creates large read-only
21170 file-based data structures that are @code{mmap}ped into memory so that many
21171 processes may share the same data.")
21172 (license license:asl2.0)))
21173
21174 (define-public python-croniter
21175 (package
21176 (name "python-croniter")
21177 (version "0.3.34")
21178 (source (origin
21179 (method url-fetch)
21180 (uri (pypi-uri "croniter" version))
21181 (sha256
21182 (base32
21183 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
21184 (build-system python-build-system)
21185 (propagated-inputs
21186 `(("python-dateutil" ,python-dateutil)
21187 ("python-natsort" ,python-natsort)))
21188 (home-page "https://github.com/kiorky/croniter")
21189 (synopsis "Iterate datetime objects with cron-like syntax")
21190 (description
21191 "@code{croniter} provides iteration for datetime object with cron-like
21192 format.")
21193 (license license:expat)))
21194
21195 (define-public python-pylzma
21196 (package
21197 (name "python-pylzma")
21198 (version "0.5.0")
21199 (source
21200 (origin
21201 (method url-fetch)
21202 (uri (pypi-uri "pylzma" version))
21203 (sha256
21204 (base32
21205 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
21206 (build-system python-build-system)
21207 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
21208 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
21209 (description "This package provides Python bindings for the LZMA library
21210 by Igor Pavlov.")
21211 (license license:lgpl2.1+)))
21212
21213 (define-public python2-pylzma
21214 (package-with-python2 python-pylzma))
21215
21216 (define-public python-ifaddr
21217 (package
21218 (name "python-ifaddr")
21219 (version "0.1.7")
21220 (source
21221 (origin
21222 (method url-fetch)
21223 (uri (pypi-uri "ifaddr" version))
21224 (sha256
21225 (base32
21226 "150sxdlicwrphmhnv03ykxplyd2jdrxz0mikgnivavgilrn8m7hz"))))
21227 (build-system python-build-system)
21228 (arguments
21229 `(#:phases
21230 (modify-phases %standard-phases
21231 (replace 'check
21232 (lambda _ (invoke "nosetests"))))))
21233 (native-inputs
21234 `(("python-nose" ,python-nose)))
21235 (home-page "https://github.com/pydron/ifaddr")
21236 (synopsis "Network interface and IP address enumeration library")
21237 (description "This package provides a network interface and IP address
21238 enumeration library in Python.")
21239 (license license:expat)))
21240
21241 (define-public python-zeroconf
21242 (package
21243 (name "python-zeroconf")
21244 (version "0.28.8")
21245 (source
21246 (origin
21247 (method url-fetch)
21248 (uri (pypi-uri "zeroconf" version))
21249 (sha256
21250 (base32
21251 "0narq8haa3b375vfblbyil77n8bw0wxqnanl91pl0wwwm884mqjb"))))
21252 (build-system python-build-system)
21253 (native-inputs
21254 `(("python-nose" ,python-nose)))
21255 (propagated-inputs
21256 `(("python-ifaddr" ,python-ifaddr)))
21257 (arguments
21258 `(#:phases
21259 (modify-phases %standard-phases
21260 (replace 'check
21261 (lambda _ ;; Networking isn't available for these tests.
21262 (invoke "nosetests" "-v"
21263 "--exclude" "test_integration_with_listener_ipv6"
21264 "--exclude" "test_launch_and_close_v6_only"
21265 "--exclude" "test_launch_and_close_v4_v6"
21266 "--exclude" "test_launch_and_close"))))))
21267 (home-page "https://github.com/jstasiak/python-zeroconf")
21268 (synopsis "Pure Python mDNS service discovery")
21269 (description
21270 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
21271 compatible).")
21272 (license license:lgpl2.1+)))
21273
21274 (define-public python2-zeroconf
21275 (package
21276 (name "python2-zeroconf")
21277
21278 ;; This is the last version that supports Python 2.x.
21279 (version "0.19.1")
21280 (source
21281 (origin
21282 (method url-fetch)
21283 (uri (pypi-uri "zeroconf" version))
21284 (sha256
21285 (base32
21286 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
21287 (build-system python-build-system)
21288 (arguments
21289 `(#:python ,python-2
21290 #:phases
21291 (modify-phases %standard-phases
21292 (add-after 'unpack 'patch-requires
21293 (lambda* (#:key inputs #:allow-other-keys)
21294 (substitute* "setup.py"
21295 (("enum-compat")
21296 "enum34"))
21297 #t)))))
21298 (native-inputs
21299 `(("python2-six" ,python2-six)
21300 ("python2-enum32" ,python2-enum34)
21301 ("python2-netifaces" ,python2-netifaces)
21302 ("python2-typing" ,python2-typing)))
21303 (home-page "https://github.com/jstasiak/python-zeroconf")
21304 (synopsis "Pure Python mDNS service discovery")
21305 (description
21306 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
21307 compatible).")
21308 (license license:lgpl2.1+)))
21309
21310 (define-public python-bsddb3
21311 (package
21312 (name "python-bsddb3")
21313 (version "6.2.6")
21314 (source
21315 (origin
21316 (method url-fetch)
21317 (uri (pypi-uri "bsddb3" version))
21318 (sha256
21319 (base32
21320 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
21321 (build-system python-build-system)
21322 (inputs
21323 `(("bdb" ,bdb)))
21324 (arguments
21325 '(#:phases
21326 (modify-phases %standard-phases
21327 (add-after 'unpack 'configure-locations
21328 (lambda* (#:key inputs #:allow-other-keys)
21329 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
21330 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
21331 #t))
21332 (replace 'check
21333 (lambda _
21334 (invoke "python3" "test3.py" "-v"))))))
21335 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
21336 (synopsis "Python bindings for Oracle Berkeley DB")
21337 (description
21338 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
21339 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
21340 Transaction objects, and each of these is exposed as a Python type in the
21341 bsddb3.db module. The database objects can use various access methods: btree,
21342 hash, recno, and queue. Complete support of Berkeley DB distributed
21343 transactions. Complete support for Berkeley DB Replication Manager.
21344 Complete support for Berkeley DB Base Replication. Support for RPC.")
21345 (license license:bsd-3)))
21346
21347 (define-public python-dbfread
21348 (package
21349 (name "python-dbfread")
21350 (version "2.0.7")
21351 (source (origin
21352 (method url-fetch)
21353 (uri (pypi-uri "dbfread" version))
21354 (sha256
21355 (base32
21356 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
21357 (build-system python-build-system)
21358 (native-inputs
21359 `(("python-pytest" ,python-pytest)))
21360 (home-page "https://dbfread.readthedocs.io")
21361 (synopsis "Read DBF Files with Python")
21362 (description
21363 "This library reads DBF files and returns the data as native Python data
21364 types for further processing. It is primarily intended for batch jobs and
21365 one-off scripts.")
21366 (license license:expat)))
21367
21368 (define-public python-cached-property
21369 (package
21370 (name "python-cached-property")
21371 (version "1.5.1")
21372 (source
21373 (origin
21374 (method url-fetch)
21375 (uri (pypi-uri "cached-property" version))
21376 (sha256
21377 (base32
21378 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
21379 (build-system python-build-system)
21380 (arguments
21381 `(#:phases
21382 (modify-phases %standard-phases
21383 ;; https://github.com/pydanny/cached-property/issues/131
21384 ;; recent versions of freezegun break one test
21385 (add-after 'unpack 'disable-broken-test
21386 (lambda _
21387 (substitute* "tests/test_cached_property.py"
21388 (("def test_threads_ttl_expiry\\(self\\)" m)
21389 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
21390 " " m)))
21391 #t)))))
21392 (native-inputs
21393 `(("python-freezegun" ,python-freezegun)))
21394 (home-page
21395 "https://github.com/pydanny/cached-property")
21396 (synopsis
21397 "Decorator for caching properties in classes")
21398 (description
21399 "This package provides a decorator which makes caching
21400 time-or-computationally-expensive properties quick and easy and works in Python
21401 2 or 3.")
21402 (license license:bsd-3)))
21403
21404 (define-public python-folium
21405 (package
21406 (name "python-folium")
21407 (version "0.12.1")
21408 (source
21409 (origin
21410 ;; PyPI has a ".whl" file but not a proper source release.
21411 ;; Thus, fetch code from Git.
21412 (method git-fetch)
21413 (uri (git-reference
21414 (url "https://github.com/python-visualization/folium")
21415 (commit (string-append "v" version))))
21416 (file-name (git-file-name name version))
21417 (sha256
21418 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
21419 (build-system python-build-system)
21420 (propagated-inputs
21421 `(("python-branca" ,python-branca)
21422 ("python-jinja2" ,python-jinja2)
21423 ("python-numpy" ,python-numpy)
21424 ("python-requests" ,python-requests)))
21425 (native-inputs
21426 `(("python-pytest" ,python-pytest)))
21427 (home-page "https://github.com/python-visualization/folium")
21428 (synopsis "Make beautiful maps with Leaflet.js & Python")
21429 (description "@code{folium} makes it easy to visualize data that’s been
21430 manipulated in Python on an interactive leaflet map. It enables both the
21431 binding of data to a map for @code{choropleth} visualizations as well as
21432 passing rich vector/raster/HTML visualizations as markers on the map.
21433
21434 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
21435 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
21436 supports Image, Video, GeoJSON and TopoJSON overlays.")
21437 (license license:expat)))
21438
21439 (define-public jube
21440 (package
21441 ;; This is a command-line tool, so no "python-" prefix.
21442 (name "jube")
21443 (version "2.2.2")
21444 (source (origin
21445 (method url-fetch)
21446 (uri (string-append
21447 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
21448 version))
21449 (sha256
21450 (base32
21451 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
21452 (file-name (string-append "jube-" version ".tar.gz"))))
21453 (build-system python-build-system)
21454 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
21455 (synopsis "Benchmarking environment")
21456 (description
21457 "JUBE helps perform and analyze benchmarks in a systematic way. For each
21458 benchmarked application, benchmark data is stored in a format that allows JUBE
21459 to deduct the desired information. This data can be parsed by automatic pre-
21460 and post-processing scripts that draw information and store it more densely
21461 for manual interpretation.")
21462 (license license:gpl3+)))
21463
21464 (define-public python-pyroutelib3
21465 (package
21466 (name "python-pyroutelib3")
21467 (version "1.3.post1")
21468 (source
21469 (origin
21470 (method url-fetch)
21471 (uri (pypi-uri "pyroutelib3" version))
21472 (sha256
21473 (base32
21474 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
21475 (build-system python-build-system)
21476 (propagated-inputs
21477 `(("python-dateutil" ,python-dateutil)))
21478 (home-page "https://github.com/MKuranowski/pyroutelib3")
21479 (synopsis "Library for simple routing on OSM data")
21480 (description "Library for simple routing on OSM data")
21481 (license license:gpl3+)))
21482
21483 (define-public python-bibtexparser
21484 (package
21485 (name "python-bibtexparser")
21486 (version "1.1.0")
21487 (source
21488 (origin
21489 (method url-fetch)
21490 (uri (pypi-uri "bibtexparser" version))
21491 (sha256
21492 (base32
21493 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
21494 (build-system python-build-system)
21495 (propagated-inputs
21496 `(("python-pyparsing" ,python-pyparsing)))
21497 (native-inputs
21498 `(("python-future" ,python-future)))
21499 (home-page "https://github.com/sciunto-org/python-bibtexparser")
21500 (synopsis "Python library to parse BibTeX files")
21501 (description "BibtexParser is a Python library to parse BibTeX files.")
21502 (license (list license:bsd-3 license:lgpl3))))
21503
21504 (define-public python-distro
21505 (package
21506 (name "python-distro")
21507 (version "1.4.0")
21508 (source
21509 (origin
21510 (method url-fetch)
21511 (uri (pypi-uri "distro" version))
21512 (sha256
21513 (base32
21514 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
21515 (build-system python-build-system)
21516 (native-inputs
21517 `(("python-pytest" ,python-pytest)))
21518 (home-page "https://github.com/nir0s/distro")
21519 (synopsis
21520 "OS platform information API")
21521 (description
21522 "@code{distro} provides information about the OS distribution it runs on,
21523 such as a reliable machine-readable ID, or version information.
21524
21525 It is the recommended replacement for Python's original
21526 `platform.linux_distribution` function (which will be removed in Python 3.8).
21527 @code{distro} also provides a command-line interface to output the platform
21528 information in various formats.")
21529 (license license:asl2.0)))
21530
21531 (define-public python-cairosvg
21532 (package
21533 (name "python-cairosvg")
21534 (version "2.5.0")
21535 (source
21536 (origin
21537 (method url-fetch)
21538 (uri (pypi-uri "CairoSVG" version))
21539 (sha256
21540 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
21541 (build-system python-build-system)
21542 (arguments
21543 `(#:phases
21544 (modify-phases %standard-phases
21545 (replace 'check
21546 (lambda _ (invoke "pytest"))))))
21547 (propagated-inputs
21548 `(("python-cairocffi" ,python-cairocffi)
21549 ("python-cssselect2" ,python-cssselect2)
21550 ("python-defusedxml" ,python-defusedxml)
21551 ("python-pillow" ,python-pillow)
21552 ("python-tinycss2" ,python-tinycss2)))
21553 (native-inputs
21554 `(("python-pytest-flake8" ,python-pytest-flake8)
21555 ("python-pytest-isort" ,python-pytest-isort)
21556 ("python-pytest-runner" ,python-pytest-runner)))
21557 (home-page "https://cairosvg.org/")
21558 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
21559 (description "CairoSVG is a SVG converter based on Cairo. It can export
21560 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
21561 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
21562 parsed, the result is drawn to a Cairo surface that can be exported to
21563 qvarious formats: PDF, PostScript, PNG and even SVG.")
21564 (license license:lgpl3+)))
21565
21566 (define-public python-pyphen
21567 (package
21568 (name "python-pyphen")
21569 (version "0.10.0")
21570 (source
21571 (origin
21572 (method url-fetch)
21573 (uri (pypi-uri "Pyphen" version))
21574 (sha256
21575 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
21576 (build-system python-build-system)
21577 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
21578 ;; embedded set provided by upstream - like Debian does.
21579 (home-page "https://github.com/Kozea/Pyphen")
21580 (synopsis "Pure Python module to hyphenate text")
21581 (description "Pyphen is a pure Python module to hyphenate text using
21582 existing Hunspell hyphenation dictionaries.")
21583 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
21584
21585 (define-public python-intelhex
21586 (package
21587 (name "python-intelhex")
21588 (version "2.2.1")
21589 (source
21590 (origin
21591 (method url-fetch)
21592 (uri (pypi-uri "intelhex" version))
21593 (sha256
21594 (base32
21595 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
21596 (build-system python-build-system)
21597 (arguments '(#:tests? #f)) ;issue with version
21598 (home-page "https://pypi.org/project/IntelHex/")
21599 (synopsis "Python library for Intel HEX files manipulations")
21600 (description "The Intel HEX file format is widely used in microprocessors
21601 and microcontrollers area (embedded systems etc.) as the de facto standard for
21602 representation of code to be programmed into microelectronic devices. This
21603 package provides an intelhex Python library to read, write, create from
21604 scratch and manipulate data from Intel HEX file format. It also includes
21605 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
21606 converters and more, those based on the library itself.")
21607 (license license:bsd-3)))
21608
21609 (define-public python-pykwalify
21610 (package
21611 (name "python-pykwalify")
21612 (version "1.7.0")
21613 (source
21614 (origin
21615 (method url-fetch)
21616 (uri (pypi-uri "pykwalify" version))
21617 (sha256
21618 (base32
21619 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
21620 (build-system python-build-system)
21621 (arguments '(#:tests? #f)) ;missing dependencies
21622 (propagated-inputs
21623 `(("python-dateutil" ,python-dateutil)
21624 ("python-docopt" ,python-docopt)
21625 ("python-pyyaml" ,python-pyyaml)))
21626 (home-page "https://github.com/grokzen/pykwalify")
21627 (synopsis
21628 "Python lib/cli for JSON/YAML schema validation")
21629 (description
21630 "This package provides a parser, schema validator, and data binding tool
21631 for YAML and JSON.")
21632 (license license:expat)))
21633
21634 (define-public python-dbusmock
21635 (package
21636 (name "python-dbusmock")
21637 (version "0.18.3")
21638 (source
21639 (origin
21640 (method url-fetch)
21641 (uri (pypi-uri "python-dbusmock" version))
21642 (sha256
21643 (base32
21644 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
21645 (build-system python-build-system)
21646 (arguments
21647 '(#:phases
21648 (modify-phases %standard-phases
21649 (add-after 'unpack 'patch-shell-path
21650 (lambda _
21651 (substitute* "tests/test_code.py"
21652 (("/bin/bash") (which "bash")))
21653 #t)))))
21654 (native-inputs
21655 `(;; For tests.
21656 ("dbus" ,dbus) ; for dbus-daemon
21657 ("python-nose" ,python-nose)
21658 ("which" ,which)))
21659 (propagated-inputs
21660 `(("python-dbus" ,python-dbus)
21661 ("python-pygobject" ,python-pygobject)))
21662 (home-page "https://github.com/martinpitt/python-dbusmock")
21663 (synopsis "Python library for mock D-Bus objects")
21664 (description "python-dbusmock allows for the easy creation of mock objects on
21665 D-Bus. This is useful for writing tests for software which talks to D-Bus
21666 services such as upower, systemd, logind, gnome-session or others, and it is
21667 hard (or impossible without root privileges) to set the state of the real
21668 services to what you expect in your tests.")
21669 (license license:lgpl3+)))
21670
21671 (define-public python-jsonplus
21672 (package
21673 (name "python-jsonplus")
21674 (version "0.8.0")
21675 (home-page "https://github.com/randomir/jsonplus")
21676 (source (origin
21677 (method url-fetch)
21678 (uri (pypi-uri "jsonplus" version))
21679 (sha256
21680 (base32
21681 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
21682 (build-system python-build-system)
21683 ;; XXX: No tests on PyPI, and the repository has no tags.
21684 (arguments '(#:tests? #f))
21685 (propagated-inputs
21686 `(("python-dateutil" ,python-dateutil)
21687 ("python-simplejson" ,python-simplejson)
21688 ("python-sortedcontainers" ,python-sortedcontainers)))
21689 (synopsis "Serialize Python types to/from JSON")
21690 (description
21691 "This package provides functionality to serialize arbitrary data types
21692 to and from JSON. Common data types are implemented and it is easy to
21693 register custom encoders and decoders.")
21694 (license license:expat)))
21695
21696 (define-public python-ujson
21697 (package
21698 (name "python-ujson")
21699 (version "4.0.2")
21700 (source
21701 (origin
21702 (method url-fetch)
21703 (uri (pypi-uri "ujson" version))
21704 (sha256
21705 (base32
21706 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
21707 (modules '((guix build utils)))
21708 (snippet
21709 '(begin (delete-file-recursively "deps") #t))))
21710 (build-system python-build-system)
21711 (arguments
21712 `(#:phases
21713 (modify-phases %standard-phases
21714 (add-after 'unpack 'link-to-system-double-conversion
21715 (lambda* (#:key inputs #:allow-other-keys)
21716 (let ((d-c (assoc-ref inputs "double-conversion")))
21717 (substitute* "setup.py"
21718 (("./deps/double-conversion/double-conversion\"")
21719 (string-append d-c "/include/double-conversion\""))
21720 (("-lstdc++" stdc)
21721 (string-append "-L" d-c "/lib\","
21722 " \"-ldouble-conversion\","
21723 " \"" stdc)))
21724 #t)))
21725 (replace 'check
21726 (lambda* (#:key inputs outputs #:allow-other-keys)
21727 (add-installed-pythonpath inputs outputs)
21728 (invoke "pytest"))))))
21729 (native-inputs
21730 `(("double-conversion" ,double-conversion)
21731 ("python-setuptools-scm" ,python-setuptools-scm)
21732 ("python-pytest" ,python-pytest)))
21733 (home-page "https://github.com/ultrajson/ultrajson")
21734 (synopsis "Ultra fast JSON encoder and decoder for Python")
21735 (description
21736 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
21737 bindings for Python 3.")
21738 (license license:bsd-3)))
21739
21740 (define-public python-iocapture
21741 ;; The latest release is more than a year older than this commit.
21742 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
21743 (revision "1"))
21744 (package
21745 (name "python-iocapture")
21746 (version "0.1.2")
21747 (source
21748 (origin
21749 (method git-fetch)
21750 (uri (git-reference
21751 (url "https://github.com/oinume/iocapture")
21752 (commit commit)))
21753 (file-name (git-file-name name version))
21754 (sha256
21755 (base32
21756 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
21757 (build-system python-build-system)
21758 (arguments
21759 `(#:phases
21760 (modify-phases %standard-phases
21761 (delete 'check)
21762 (add-after 'install 'check
21763 (lambda* (#:key inputs outputs #:allow-other-keys)
21764 (add-installed-pythonpath inputs outputs)
21765 (invoke "py.test" "-v" "tests")
21766 #t)))))
21767 (propagated-inputs
21768 `(("python-flexmock" ,python-flexmock)
21769 ("python-pytest" ,python-pytest)
21770 ("python-pytest-cov" ,python-pytest-cov)
21771 ("python-six" ,python-six)))
21772 (home-page "https://github.com/oinume/iocapture")
21773 (synopsis "Python capturing tool for stdout and stderr")
21774 (description
21775 "This package helps you to capture the standard out (stdout) and the
21776 standard error channel (stderr) in your program.")
21777 (license license:expat))))
21778
21779 (define-public python-argh
21780 ;; There are 21 commits since the latest release containing important
21781 ;; improvements.
21782 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
21783 (revision "1"))
21784 (package
21785 (name "python-argh")
21786 (version (git-version "0.26.2" revision commit))
21787 (source
21788 (origin
21789 (method git-fetch)
21790 (uri (git-reference
21791 (url "https://github.com/neithere/argh")
21792 (commit commit)))
21793 (file-name (git-file-name name version))
21794 (sha256
21795 (base32
21796 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
21797 (build-system python-build-system)
21798 (propagated-inputs
21799 `(("python-iocapture" ,python-iocapture)
21800 ("python-mock" ,python-mock)
21801 ("python-pytest" ,python-pytest)
21802 ("python-pytest-cov" ,python-pytest-cov)
21803 ("python-pytest-xdist" ,python-pytest-xdist)
21804 ("python-tox" ,python-tox)))
21805 (home-page "https://github.com/neithere/argh/")
21806 (synopsis "Argparse wrapper with natural syntax")
21807 (description
21808 "python-argh is a small library that provides several layers of
21809 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
21810 always possible to declare a command with the highest possible (and least
21811 flexible) layer and then tune the behaviour with any of the lower layers
21812 including the native API of @code{python-argparse}.")
21813 (license license:lgpl3+))))
21814
21815 (define-public python-ppft
21816 (package
21817 (name "python-ppft")
21818 (version "1.6.6.1")
21819 (source
21820 (origin
21821 (method url-fetch)
21822 (uri (pypi-uri "ppft" version))
21823 (sha256
21824 (base32
21825 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
21826 (build-system python-build-system)
21827 (arguments '(#:tests? #f)) ; there are none
21828 (propagated-inputs
21829 `(("python-six" ,python-six)))
21830 (home-page "https://pypi.org/project/ppft/")
21831 (synopsis "Fork of Parallel Python")
21832 (description
21833 "This package is a fork of Parallel Python. The Parallel Python
21834 module (@code{pp}) provides an easy and efficient way to create
21835 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
21836 computers and clusters. It features cross-platform portability and dynamic
21837 load balancing.")
21838 (license license:bsd-3)))
21839
21840 (define-public python-pox
21841 (package
21842 (name "python-pox")
21843 (version "0.2.7")
21844 (source
21845 (origin
21846 (method url-fetch)
21847 (uri (pypi-uri "pox" version))
21848 (sha256
21849 (base32
21850 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
21851 (build-system python-build-system)
21852 (arguments
21853 `(#:phases
21854 (modify-phases %standard-phases
21855 (replace 'check
21856 (lambda _
21857 (mkdir-p "/tmp/guix")
21858 (setenv "SHELL" "bash")
21859 (setenv "USERNAME" "guix")
21860 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
21861 (invoke "py.test" "-vv")
21862 #t)))))
21863 (native-inputs
21864 `(("python-pytest" ,python-pytest)
21865 ("which" ,which)))
21866 (home-page "https://pypi.org/project/pox/")
21867 (synopsis "Python utilities for file system exploration and automated builds")
21868 (description
21869 "Pox provides a collection of utilities for navigating and manipulating
21870 file systems. This module is designed to facilitate some of the low-level
21871 operating system interactions that are useful when exploring a file system on a
21872 remote host. Pox provides Python equivalents of several shell commands such
21873 as @command{which} and @command{find}. These commands allow automated
21874 discovery of what has been installed on an operating system, and where the
21875 essential tools are located.")
21876 (license license:bsd-3)))
21877
21878 (define-public python-pathos
21879 (package
21880 (name "python-pathos")
21881 (version "0.2.5")
21882 (source
21883 (origin
21884 (method url-fetch)
21885 (uri (pypi-uri "pathos" version))
21886 (sha256
21887 (base32
21888 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
21889 (build-system python-build-system)
21890 (arguments
21891 '(#:phases
21892 (modify-phases %standard-phases
21893 (replace 'check
21894 (lambda _
21895 (setenv "PYTHONPATH"
21896 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
21897 (invoke "python" "./tests/__main__.py"))))))
21898 (propagated-inputs
21899 `(("python-dill" ,python-dill)
21900 ("python-multiprocess" ,python-multiprocess)
21901 ("python-pox" ,python-pox)
21902 ("python-ppft" ,python-ppft)))
21903 (native-inputs
21904 `(("python-pytest" ,python-pytest)))
21905 (home-page "https://pypi.org/project/pathos/")
21906 (synopsis
21907 "Parallel graph management and execution in heterogeneous computing")
21908 (description
21909 "Python-pathos is a framework for heterogeneous computing. It provides a
21910 consistent high-level interface for configuring and launching parallel
21911 computations across heterogeneous resources. Python-pathos provides configurable
21912 launchers for parallel and distributed computing, where each launcher contains
21913 the syntactic logic to configure and launch jobs in an execution environment.")
21914 (license license:bsd-3)))
21915
21916 (define-public python-flit
21917 (package
21918 (name "python-flit")
21919 (version "3.2.0")
21920 ;; We fetch the sources via git because on pypi the package is split into
21921 ;; two parts: flit and flit_core; flit_core cannot be built without flit.
21922 (source (origin
21923 (method git-fetch)
21924 (uri (git-reference
21925 (url "https://github.com/takluyver/flit")
21926 (commit version)))
21927 (file-name (git-file-name name version))
21928 (sha256
21929 (base32
21930 "0fpqxpz5bv2xpv1akmc0c8yfss6sj09wdzxrlf3qw1lp1jhbzpyc"))))
21931 (build-system python-build-system)
21932 (arguments
21933 `(#:phases
21934 (modify-phases %standard-phases
21935 (add-before 'build 'bootstrap
21936 (lambda* (#:key inputs #:allow-other-keys)
21937 (let ((home (string-append (getcwd) "/home")))
21938 (mkdir-p home)
21939 (setenv "HOME" home))
21940 (for-each make-file-writable (find-files "."))
21941 (copy-recursively (assoc-ref inputs "python-testpath")
21942 (string-append (getcwd) "/testpath"))
21943 (substitute* "pyproject.toml"
21944 (("\"testpath\",") ""))
21945 (invoke "python" "bootstrap_dev.py")))
21946 (replace 'build
21947 (lambda _
21948 ;; A ZIP archive should be generated, but it fails with "ZIP does
21949 ;; not support timestamps before 1980". Luckily,
21950 ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
21951 ;; 1980.
21952 (setenv "SOURCE_DATE_EPOCH" "315532800")
21953 (for-each (lambda (toml)
21954 (invoke "python3" "-m" "flit"
21955 "--debug" "--ini-file" toml
21956 "build"))
21957 '("testpath/pyproject.toml"
21958 "pyproject.toml"))
21959 (with-directory-excursion "flit_core"
21960 (invoke "python" "build_dists.py"))))
21961 (replace 'install
21962 (lambda* (#:key inputs outputs #:allow-other-keys)
21963 (add-installed-pythonpath inputs outputs)
21964 (let ((out (assoc-ref outputs "out")))
21965 (delete-file-recursively "./home")
21966 (for-each (lambda (wheel)
21967 (format #true wheel)
21968 (invoke "python" "-m" "pip" "install"
21969 wheel (string-append "--prefix=" out)))
21970 (append
21971 (find-files "flit_core/dist" "\\.whl$")
21972 (find-files "dist" "\\.whl$")))))))
21973 #:tests? #f)) ; XXX: Check requires network access.
21974 (propagated-inputs
21975 `(("python-pytoml" ,python-pytoml)
21976 ("python-toml" ,python-toml)))
21977 (native-inputs
21978 `(("python-docutils" ,python-docutils)
21979 ("python-responses" ,python-responses)
21980 ("python-pygments-github-lexers" ,python-pygments-github-lexers)
21981 ("python-pytest" ,python-pytest)
21982 ("python-pytest-cov" ,python-pytest-cov)
21983 ("python-sphinx" ,python-sphinx)
21984 ("python-sphinxcontrib-github-alt" ,python-sphinxcontrib-github-alt)
21985 ;; This package needs testpath, but testpath also needs flit...
21986 ("python-testpath"
21987 ,(let ((name "python-testpath")
21988 (version "0.4.4"))
21989 (origin
21990 (method git-fetch)
21991 (uri (git-reference
21992 (url "https://github.com/jupyter/testpath")
21993 (commit version)))
21994 (file-name (git-file-name name version))
21995 (sha256
21996 (base32
21997 "1fwv4d3p54xx1x942s104irr35lszvv6jnr4nn1scsfvc0m1qmbk")))))))
21998 (home-page "https://flit.readthedocs.io/")
21999 (synopsis
22000 "Simple packaging tool for simple packages")
22001 (description
22002 "Flit is a simple way to put Python packages and modules on PyPI. Flit
22003 packages a single importable module or package at a time, using the import
22004 name as the name on PyPI. All subpackages and data files within a package
22005 are included automatically.")
22006 (license license:bsd-3)))
22007
22008 (define-public python-pathtools
22009 (package
22010 (name "python-pathtools")
22011 (version "0.1.2")
22012 (source
22013 (origin
22014 (method url-fetch)
22015 (uri (pypi-uri "pathtools" version))
22016 (sha256
22017 (base32
22018 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
22019 (build-system python-build-system)
22020 (home-page
22021 "https://github.com/gorakhargosh/pathtools")
22022 (synopsis "Path utilities for Python")
22023 (description "Pattern matching and various utilities for file systems
22024 paths.")
22025 (license license:expat)))
22026
22027 (define-public python-fastentrypoints
22028 (package
22029 (name "python-fastentrypoints")
22030 (version "0.12")
22031 (source
22032 (origin
22033 (method url-fetch)
22034 (uri (pypi-uri "fastentrypoints" version))
22035 (sha256
22036 (base32
22037 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
22038 (build-system python-build-system)
22039 (home-page
22040 "https://github.com/ninjaaron/fast-entry_points")
22041 (synopsis
22042 "Makes entry_points specified in setup.py load more quickly")
22043 (description
22044 "Using entry_points in your setup.py makes scripts that start really
22045 slowly because it imports pkg_resources. This package allows such setup
22046 scripts to load entry points more quickly.")
22047 (license license:bsd-3)))
22048
22049 (define-public python-funcparserlib
22050 (package
22051 (name "python-funcparserlib")
22052 (version "0.3.6")
22053 (source
22054 (origin
22055 (method url-fetch)
22056 (uri (pypi-uri "funcparserlib" version))
22057 (sha256
22058 (base32
22059 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
22060 (native-inputs
22061 `(("python-tox" ,python-tox)))
22062 (arguments
22063 `(#:phases
22064 (modify-phases %standard-phases
22065 (replace 'check
22066 (lambda _
22067 (invoke "tox"))))))
22068 (build-system python-build-system)
22069 (home-page
22070 "https://github.com/vlasovskikh/funcparserlib")
22071 (synopsis
22072 "Recursive descent parsing library based on functional combinators")
22073 (description
22074 "This package is a recursive descent parsing library for Python based on
22075 functional combinators. Parser combinators are just higher-order functions
22076 that take parsers as their arguments and return them as result values.")
22077 (license license:expat)))
22078
22079 (define-public python-speg
22080 (package
22081 (name "python-speg")
22082 (version "0.3")
22083 (source
22084 (origin
22085 (method url-fetch)
22086 (uri (pypi-uri "speg" version ".zip"))
22087 (sha256
22088 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
22089 (arguments
22090 `(#:tests? #f)) ;FIXME: tests fail, not sure why
22091 (native-inputs
22092 `(("unzip" ,unzip)))
22093 (build-system python-build-system)
22094 (home-page "https://github.com/avakar/speg")
22095 (synopsis "PEG-based parser interpreter with memoization")
22096 (description "This package is a PEG-based parser and interpreter with
22097 memoization.")
22098 (license license:expat)))
22099
22100 (define-public python-cson
22101 (package
22102 (name "python-cson")
22103 (version "0.8")
22104 (source
22105 (origin
22106 (method url-fetch)
22107 (uri (pypi-uri "cson" version))
22108 (sha256
22109 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
22110 (build-system python-build-system)
22111 (propagated-inputs
22112 `(("python-speg" ,python-speg)))
22113 (home-page "https://github.com/avakar/pycson")
22114 (synopsis "Parser for Coffeescript Object Notation (CSON)")
22115 (description "This package is a parser for Coffeescript Object
22116 Notation (CSON).")
22117 (license license:expat)))
22118
22119 (define-public python-asynctest
22120 (package
22121 (name "python-asynctest")
22122 (version "0.13.0")
22123 (source
22124 (origin
22125 (method url-fetch)
22126 (uri (pypi-uri "asynctest" version))
22127 (sha256
22128 (base32
22129 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
22130 (build-system python-build-system)
22131 (arguments
22132 '(#:phases
22133 (modify-phases %standard-phases
22134 (replace 'check
22135 (lambda _
22136 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
22137 (add-after 'unpack 'disable-tests
22138 (lambda* _
22139 ;; XXX: 7 tests fail out of 220. Disable them for now.
22140 (substitute* (list "test/test_selector.py"
22141 "test/test_mock.py")
22142 (("def test_events_watched_outside_test_are_ignored")
22143 "@unittest.skip('disabled by guix')
22144 def test_events_watched_outside_test_are_ignored")
22145 (("def test_awaited_from_autospec_mock.*" line)
22146 (string-append line " return True\n"))
22147 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
22148 (string-append line " return True\n"))
22149 (("def test_patch_coroutine_with_multiple_scopes.*" line)
22150 (string-append line " return True\n"))
22151 (("def test_multiple_patches_on_coroutine.*" line)
22152 (string-append line " return True\n"))
22153 (("def test_patch_coroutine_only_when_running.*" line)
22154 (string-append line " return True\n")))
22155 #t)))))
22156 (home-page "https://github.com/Martiusweb/asynctest")
22157 (synopsis "Extension of unittest for testing asyncio libraries")
22158 (description
22159 "The package asynctest is built on top of the standard unittest module
22160 and cuts down boilerplate code when testing libraries for asyncio.")
22161 (license license:asl2.0)))
22162
22163 (define-public python-aionotify
22164 (package
22165 (name "python-aionotify")
22166 (version "0.2.0")
22167 (source
22168 (origin
22169 ;; Source tarball on PyPi lacks tests
22170 (method git-fetch)
22171 (uri (git-reference
22172 (url "https://github.com/rbarrois/aionotify")
22173 (commit (string-append "v" version))))
22174 (file-name (git-file-name name version))
22175 (sha256
22176 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
22177 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
22178 (build-system python-build-system)
22179 (home-page "https://github.com/rbarrois/aionotify")
22180 (synopsis "Asyncio-powered inotify library")
22181 (description
22182 "@code{aionotify} is a simple, asyncio-based inotify library.")
22183 (license license:bsd-3)))
22184
22185 (define-public python-forbiddenfruit
22186 (package
22187 (name "python-forbiddenfruit")
22188 (version "0.1.3")
22189 (source
22190 (origin
22191 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
22192 (method git-fetch)
22193 (uri (git-reference
22194 (url "https://github.com/clarete/forbiddenfruit")
22195 (commit version)))
22196 (file-name (git-file-name name version))
22197 (sha256
22198 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
22199 (build-system python-build-system)
22200 (arguments
22201 '(#:phases
22202 (modify-phases %standard-phases
22203 (replace 'check
22204 (lambda _
22205 (invoke "make" "SKIP_DEPS=1"))))))
22206 (native-inputs
22207 `(("python-nose" ,python-nose)
22208 ("python-coverage" ,python-coverage)))
22209 (home-page "https://github.com/clarete/forbiddenfruit")
22210 (synopsis "Patch python built-in objects")
22211 (description "This project allows Python code to extend built-in types.")
22212 (license (list license:gpl3+ license:expat))))
22213
22214 (define-public python-k5test
22215 (package
22216 (name "python-k5test")
22217 (version "0.9.2")
22218 (source
22219 (origin
22220 (method url-fetch)
22221 (uri (pypi-uri "k5test" version))
22222 (sha256
22223 (base32
22224 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
22225 (build-system python-build-system)
22226 (propagated-inputs
22227 `(("python-six" ,python-six)
22228 ;; `which`, `kadmin.local` binaries called inside library
22229 ("which" ,which)
22230 ("mit-krb5" ,mit-krb5)))
22231 (native-inputs `(("mit-krb5" ,mit-krb5)))
22232 (arguments
22233 '(#:phases
22234 (modify-phases %standard-phases
22235 (add-after 'unpack 'patch-paths
22236 (lambda* _
22237 (substitute* "k5test/realm.py"
22238 (("'kadmin_local'") "'kadmin.local'")))))))
22239 (home-page "https://github.com/pythongssapi/k5test")
22240 (synopsis "Library for setting up self-contained Kerberos 5 environments")
22241 (description
22242 "@code{k5test} is a library for setting up self-contained Kerberos 5
22243 environments, and running Python unit tests inside those environments. It is
22244 based on the file of the same name found alongside the MIT Kerberos 5 unit
22245 tests.")
22246 (license license:isc)))
22247
22248 (define-public python-gssapi
22249 (package
22250 (name "python-gssapi")
22251 (version "1.6.12")
22252 (source
22253 (origin
22254 (method url-fetch)
22255 (uri (pypi-uri "gssapi" version))
22256 (sha256
22257 (base32
22258 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
22259 (build-system python-build-system)
22260 (propagated-inputs
22261 `(("python-decorator" ,python-decorator)
22262 ("python-six" ,python-six)))
22263 (inputs
22264 `(("mit-krb5" ,mit-krb5)))
22265 ;; for tests
22266 (native-inputs
22267 `(("python-parameterized" ,python-parameterized)
22268 ("python-k5test" ,python-k5test)
22269 ("python-nose" ,python-nose)))
22270 (home-page "https://github.com/pythongssapi/python-gssapi")
22271 (synopsis "Python GSSAPI Wrapper")
22272 (description
22273 "Python-GSSAPI provides both low-level and high level wrappers around the
22274 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
22275 also be usable with other GSSAPI mechanisms.")
22276 (license license:isc)))
22277
22278 (define-public python-check-manifest
22279 (package
22280 (name "python-check-manifest")
22281 (version "0.37")
22282 (source
22283 (origin
22284 (method url-fetch)
22285 (uri (pypi-uri "check-manifest" version))
22286 (sha256
22287 (base32
22288 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
22289 (build-system python-build-system)
22290 (native-inputs
22291 `(("python-mock" ,python-mock)
22292 ("git" ,git)))
22293 (home-page "https://github.com/mgedmin/check-manifest")
22294 (synopsis "Check MANIFEST.in in a Python source package for completeness")
22295 (description "Python package can include a MANIFEST.in file to help with
22296 sending package files to the Python Package Index. This package checks that
22297 file to ensure it completely and accurately describes your project.")
22298 (license license:expat)))
22299
22300 (define-public python-android-stringslib
22301 (package
22302 (name "python-android-stringslib")
22303 (version "0.1.2")
22304 (source
22305 (origin
22306 (method git-fetch)
22307 (uri (git-reference
22308 (url "https://framagit.org/tyreunom/python-android-strings-lib")
22309 (commit (string-append "v" version))))
22310 (file-name (git-file-name name version))
22311 (sha256
22312 (base32
22313 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
22314 (build-system python-build-system)
22315 (arguments
22316 `(#:tests? #f))
22317 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
22318 (synopsis "Android strings.xml support")
22319 (description "Android Strings Lib provides support for android's strings.xml
22320 files. These files are used to translate strings in android apps.")
22321 (license license:expat)))
22322
22323 (define-public python-watchdog
22324 (package
22325 (name "python-watchdog")
22326 (version "0.9.0")
22327 (source
22328 (origin
22329 (method url-fetch)
22330 (uri (pypi-uri "watchdog" version))
22331 (sha256
22332 (base32
22333 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
22334 (build-system python-build-system)
22335 (arguments
22336 `(#:phases
22337 (modify-phases %standard-phases
22338 (add-before 'check 'remove-failing
22339 (lambda _
22340 (delete-file "tests/test_inotify_buffer.py")
22341 (delete-file "tests/test_snapshot_diff.py")
22342 #t)))))
22343 (propagated-inputs
22344 `(("python-argh" ,python-argh)
22345 ("python-pathtools" ,python-pathtools)
22346 ("python-pyyaml" ,python-pyyaml)))
22347 (native-inputs
22348 `(("python-pytest-cov" ,python-pytest-cov)
22349 ("python-pytest-timeout" ,python-pytest-timeout)))
22350 (home-page "https://github.com/gorakhargosh/watchdog")
22351 (synopsis "File system events monitoring")
22352 (description "This package provides a way to monitor file system events
22353 such as a file modification and trigger an action. This is similar to inotify,
22354 but portable.")
22355 (license license:asl2.0)))
22356
22357 (define-public python-watchgod
22358 (package
22359 (name "python-watchgod")
22360 (version "0.6")
22361 (source
22362 (origin
22363 ;; There are no tests in the PyPI tarball.
22364 (method git-fetch)
22365 (uri (git-reference
22366 (url "https://github.com/samuelcolvin/watchgod")
22367 (commit (string-append "v" version))))
22368 (file-name (git-file-name name version))
22369 (sha256
22370 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
22371 (build-system python-build-system)
22372 (arguments
22373 `(#:phases
22374 (modify-phases %standard-phases
22375 (replace 'check
22376 (lambda _
22377 (invoke "pytest" "-vv"))))))
22378 (native-inputs
22379 `(("python-coverage" ,python-coverage)
22380 ("python-docutils" ,python-docutils)
22381 ("python-flake8" ,python-flake8)
22382 ("python-isort" ,python-isort)
22383 ("python-pycodestyle" ,python-pycodestyle)
22384 ("python-pyflakes" ,python-pyflakes)
22385 ("python-pygments" ,python-pygments)
22386 ("python-pytest" ,python-pytest)
22387 ("python-pytest-cov" ,python-pytest-cov)
22388 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
22389 ("python-pytest-mock" ,python-pytest-mock)
22390 ("python-pytest-sugar" ,python-pytest-sugar)
22391 ("python-pytest-toolbox" ,python-pytest-toolbox)))
22392 (home-page "https://github.com/samuelcolvin/watchgod")
22393 (synopsis "Simple, modern file watching and code reload in Python")
22394 (description
22395 "Simple, modern file watching and code reload in Python inspired by
22396 @code{watchdog}. Among the differences are a unified approach for each
22397 operating systems and an elegant approach to concurrency using threading.")
22398 (license license:expat)))
22399
22400 (define-public python-wget
22401 (package
22402 (name "python-wget")
22403 (version "3.2")
22404 (source
22405 (origin
22406 (method url-fetch)
22407 (uri (pypi-uri "wget" version ".zip"))
22408 (sha256
22409 (base32
22410 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
22411 (build-system python-build-system)
22412 (native-inputs `(("unzip" ,unzip)))
22413 (home-page "https://bitbucket.org/techtonik/python-wget/")
22414 (synopsis "Pure Python download utility")
22415 (description "The python-wget library provides an API to download files
22416 with features similar to the @command{wget} utility.")
22417 (license license:unlicense)))
22418
22419 (define-public offlate
22420 (package
22421 (name "offlate")
22422 (version "0.5")
22423 (source
22424 (origin
22425 (method git-fetch)
22426 (uri (git-reference
22427 (url "https://framagit.org/tyreunom/offlate")
22428 (commit version)))
22429 (file-name (git-file-name name version))
22430 (sha256
22431 (base32
22432 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
22433 (build-system python-build-system)
22434 (arguments
22435 ;; No tests
22436 `(#:tests? #f))
22437 (propagated-inputs
22438 `(("python-android-stringslib" ,python-android-stringslib)
22439 ("python-dateutil" ,python-dateutil)
22440 ("python-gitlab" ,python-gitlab)
22441 ("python-lxml" ,python-lxml)
22442 ("python-polib" ,python-polib)
22443 ("python-pyenchant" ,python-pyenchant)
22444 ("python-pygit2" ,python-pygit2)
22445 ("python-pygithub" ,python-pygithub)
22446 ("python-pyqt" ,python-pyqt)
22447 ("python-requests" ,python-requests)
22448 ("python-ruamel.yaml" ,python-ruamel.yaml)
22449 ("python-translation-finder" ,python-translation-finder)
22450 ("python-watchdog" ,python-watchdog)))
22451 (native-inputs
22452 `(("qttools" ,qttools)))
22453 (home-page "https://framagit.org/tyreunom/offlate")
22454 (synopsis "Offline translation interface for online translation tools")
22455 (description "Offlate offers a unified interface for different translation
22456 file formats, as well as many different online translation platforms. You can
22457 use it to get work from online platforms, specialized such as the Translation
22458 Project, or not such a gitlab instance when your upstream doesn't use any
22459 dedicated platform. The tool proposes a unified interface for any format and
22460 an upload option to send your work back to the platform.")
22461 (license license:gpl3+)))
22462
22463 (define-public python-titlecase
22464 (package
22465 (name "python-titlecase")
22466 (version "0.12.0")
22467 (source
22468 (origin
22469 (method url-fetch)
22470 (uri (pypi-uri "titlecase" version))
22471 (sha256
22472 (base32
22473 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
22474 (build-system python-build-system)
22475 (native-inputs
22476 `(("python-nose" ,python-nose)))
22477 (home-page "https://github.com/ppannuto/python-titlecase")
22478 (synopsis "Capitalize strings similar to book titles")
22479 (description
22480 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
22481 It capitalizes (predominantly English) strings in a way that is similar to
22482 book titles, using the New York Times Manual of Style to leave certain words
22483 lowercase.")
22484 (license license:expat)))
22485
22486 (define-public python-pypng
22487 (package
22488 (name "python-pypng")
22489 (version "0.0.20")
22490 (source
22491 (origin
22492 (method url-fetch)
22493 (uri (pypi-uri "pypng" version))
22494 (sha256
22495 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
22496 (build-system python-build-system)
22497 (home-page "https://github.com/drj11/pypng")
22498 (synopsis "Pure Python PNG image encoder/decoder")
22499 (description
22500 "The PyPNG module implements support for PNG images. It reads and writes
22501 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
22502 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
22503 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
22504 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
22505 A number of optional chunks can be specified (when writing) and
22506 understood (when reading): tRNS, bKGD, gAMA.
22507
22508 PyPNG is not a high level toolkit for image processing (like PIL) and does not
22509 aim at being a replacement or competitor. Its strength lies in fine-grained
22510 extensive support of PNG features. It can also read and write Netpbm PAM
22511 files, with a focus on its use as an intermediate format for implementing
22512 custom PNG processing.")
22513 (license license:expat)))
22514
22515 (define-public python-fuzzywuzzy
22516 (package
22517 (name "python-fuzzywuzzy")
22518 (version "0.18.0")
22519 (source
22520 (origin
22521 (method url-fetch)
22522 (uri (pypi-uri "fuzzywuzzy" version))
22523 (sha256
22524 (base32
22525 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
22526 (build-system python-build-system)
22527 (native-inputs
22528 `(("python-hypothesis" ,python-hypothesis)
22529 ("python-pycodestyle" ,python-pycodestyle)
22530 ("python-pytest" ,python-pytest)))
22531 (propagated-inputs
22532 `(("python-levenshtein" ,python-levenshtein)))
22533 (home-page "https://github.com/seatgeek/fuzzywuzzy")
22534 (synopsis "Fuzzy string matching in Python")
22535 (description "Approximate string matching using
22536 @emph{Levenshtein Distance} to calculate the differences between
22537 sequences.")
22538 (license license:gpl2)))
22539
22540 (define-public python2-fuzzywuzzy
22541 (package-with-python2 python-fuzzywuzzy))
22542
22543 (define-public python-block-tracing
22544 (package
22545 (name "python-block-tracing")
22546 (version "1.0.1")
22547 (source
22548 (origin
22549 (method url-fetch)
22550 (uri (pypi-uri "block_tracing" version))
22551 (sha256
22552 (base32
22553 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
22554 (build-system python-build-system)
22555 (arguments '(#:tests? #f)) ; no tests
22556 (home-page "https://github.com/rianhunter/block_tracing")
22557 (synopsis "Protect process memory")
22558 (description
22559 "@code{block_tracing} is a tiny Python library that can be used to
22560 prevent debuggers and other applications from inspecting the memory within
22561 your process.")
22562 (license license:expat)))
22563
22564 (define-public python-gcovr
22565 (package
22566 (name "python-gcovr")
22567 (version "4.2")
22568 (source
22569 (origin
22570 (method url-fetch)
22571 (uri (pypi-uri "gcovr" version))
22572 (sha256
22573 (base32
22574 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
22575 (build-system python-build-system)
22576 (propagated-inputs
22577 `(("python-lxml" ,python-lxml)
22578 ("python-jinja2" ,python-jinja2)))
22579 (home-page "https://gcovr.com/")
22580 (synopsis "Utility for generating code coverage results")
22581 (description
22582 "Gcovr provides a utility for managing the use of the GNU gcov
22583 utility and generating summarized code coverage results. It is inspired
22584 by the Python coverage.py package, which provides a similar utility for
22585 Python.")
22586 (license license:bsd-3)))
22587
22588 (define-public python-owslib
22589 (package
22590 (name "python-owslib")
22591 (version "0.19.2")
22592 (source
22593 (origin
22594 (method url-fetch)
22595 (uri (pypi-uri "OWSLib" version))
22596 (sha256
22597 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
22598 (build-system python-build-system)
22599 (arguments
22600 '(#:tests? #f)) ; TODO: package dependencies required for tests.
22601 (synopsis "Interface for Open Geospatial Consortium web service")
22602 (description
22603 "OWSLib is a Python package for client programming with Open Geospatial
22604 Consortium (OGC) web service (hence OWS) interface standards, and their related
22605 content models.")
22606 (home-page "https://geopython.github.io/OWSLib/")
22607 (license license:bsd-3)))
22608
22609 (define-public python-docusign-esign
22610 (package
22611 (name "python-docusign-esign")
22612 (version "3.1.0")
22613 (source (origin
22614 (method url-fetch)
22615 (uri (pypi-uri "docusign_esign" version))
22616 (sha256
22617 (base32
22618 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
22619 (build-system python-build-system)
22620 ;; Testing requires undocumented setup changes, and so testing is disabled here.
22621 (arguments `(#:tests? #f))
22622 (propagated-inputs
22623 `(("python-certifi" ,python-certifi)
22624 ("python-six" ,python-six)
22625 ("python-dateutil" ,python-dateutil)
22626 ("python-urllib3" ,python-urllib3)
22627 ("python-pyjwt" ,python-pyjwt)
22628 ("python-cryptography" ,python-cryptography)
22629 ("python-nose" ,python-nose)))
22630 (synopsis "DocuSign Python Client")
22631 (description "The Official DocuSign Python Client Library used to interact
22632 with the eSign REST API. Send, sign, and approve documents using this client.")
22633 (home-page "https://www.docusign.com/devcenter")
22634 (license license:expat)))
22635
22636 (define-public python-xattr
22637 (package
22638 (name "python-xattr")
22639 (version "0.9.7")
22640 (source
22641 (origin
22642 (method url-fetch)
22643 (uri (pypi-uri "xattr" version))
22644 (sha256
22645 (base32
22646 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
22647 (build-system python-build-system)
22648 (propagated-inputs
22649 `(("python-cffi" ,python-cffi)))
22650 (home-page "https://github.com/xattr/xattr")
22651 (synopsis
22652 "Python wrapper for extended file system attributes")
22653 (description "This package provides a Python wrapper for using extended
22654 file system attributes. Extended attributes extend the basic attributes of files
22655 and directories in the file system. They are stored as name:data pairs
22656 associated with file system objects (files, directories, symlinks, etc).")
22657 (license license:expat)))
22658
22659 (define-public python-json-logger
22660 (package
22661 (name "python-json-logger")
22662 (version "0.1.11")
22663 (source
22664 (origin
22665 (method url-fetch)
22666 (uri (pypi-uri "python-json-logger" version))
22667 (sha256
22668 (base32
22669 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
22670 (build-system python-build-system)
22671 (home-page
22672 "https://github.com/madzak/python-json-logger")
22673 (synopsis "JSON log formatter in Python")
22674 (description "This library allows standard Python logging to output log data
22675 as JSON objects. With JSON we can make our logs more readable by machines and
22676 we can stop writing custom parsers for syslog-type records.")
22677 (license license:bsd-3)))
22678
22679 (define-public python-daiquiri
22680 (package
22681 (name "python-daiquiri")
22682 (version "2.1.1")
22683 (source
22684 (origin
22685 (method url-fetch)
22686 (uri (pypi-uri "daiquiri" version))
22687 (sha256
22688 (base32
22689 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
22690 (build-system python-build-system)
22691 (propagated-inputs
22692 `(("python-json-logger" ,python-json-logger)))
22693 (native-inputs
22694 `(("python-mock" ,python-mock)
22695 ("python-pytest" ,python-pytest)
22696 ("python-setuptools-scm" ,python-setuptools-scm)
22697 ("python-six" ,python-six)))
22698 (home-page "https://github.com/jd/daiquiri")
22699 (synopsis
22700 "Library to configure Python logging easily")
22701 (description "The daiquiri library provides an easy way to configure
22702 logging in Python. It also provides some custom formatters and handlers.")
22703 (license license:asl2.0)))
22704
22705 (define-public python-pifpaf
22706 (package
22707 (name "python-pifpaf")
22708 (version "2.5.0")
22709 (source
22710 (origin
22711 (method url-fetch)
22712 (uri (pypi-uri "pifpaf" version))
22713 (sha256
22714 (base32
22715 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
22716 (build-system python-build-system)
22717 (arguments
22718 '(#:phases
22719 (modify-phases %standard-phases
22720 (replace 'check
22721 (lambda _
22722 (invoke "python" "setup.py" "testr" "--slowest"
22723 "--testr-args=until-failure"))))))
22724 (propagated-inputs
22725 `(("python-click" ,python-click)
22726 ("python-daiquiri" ,python-daiquiri)
22727 ("python-fixtures" ,python-fixtures)
22728 ("python-jinja2" ,python-jinja2)
22729 ("python-pbr" ,python-pbr)
22730 ("python-psutil" ,python-psutil)
22731 ("python-six" ,python-six)
22732 ("python-xattr" ,python-xattr)))
22733 (native-inputs
22734 `(("python-mock" ,python-mock)
22735 ("python-os-testr" ,python-os-testr)
22736 ("python-requests" ,python-requests)
22737 ("python-testrepository" ,python-testrepository)
22738 ("python-testtools" ,python-testtools)))
22739 (home-page "https://github.com/jd/pifpaf")
22740 (synopsis "Tools and fixtures to manage daemons for testing in Python")
22741 (description "Pifpaf is a suite of fixtures and a command-line tool that
22742 starts and stops daemons for a quick throw-away usage. This is typically
22743 useful when needing these daemons to run integration testing. It originally
22744 evolved from its precursor @code{overtest}.")
22745 (license license:asl2.0)))
22746
22747 (define-public python-pytest-check-links
22748 (package
22749 (name "python-pytest-check-links")
22750 (version "0.3.0")
22751 (source
22752 (origin
22753 (method url-fetch)
22754 ;; URI uses underscores
22755 (uri (pypi-uri "pytest_check_links" version))
22756 (sha256
22757 (base32
22758 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
22759 (build-system python-build-system)
22760 (propagated-inputs
22761 `(("python-docutils" ,python-docutils)
22762 ("python-html5lib" ,python-html5lib)
22763 ("python-nbconvert" ,python-nbconvert)
22764 ("python-nbformat" ,python-nbformat)
22765 ("python-pytest" ,python-pytest)
22766 ("python-six" ,python-six)))
22767 (native-inputs
22768 `(("python-pbr-minimal" ,python-pbr-minimal)))
22769 (home-page "https://github.com/minrk/pytest-check-links")
22770 (synopsis "Check links in files")
22771 (description "This package provides a pytest plugin that checks URLs for
22772 HTML-containing files.")
22773 (license license:bsd-3)))
22774
22775 (define-public python-json5
22776 (package
22777 (name "python-json5")
22778 (version "0.8.5")
22779 (source
22780 (origin
22781 ;; sample.json5 is missing from PyPi source tarball
22782 (method git-fetch)
22783 (uri (git-reference
22784 (url "https://github.com/dpranke/pyjson5")
22785 (commit (string-append "v" version))))
22786 (file-name (git-file-name name version))
22787 (sha256
22788 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
22789 (build-system python-build-system)
22790 (home-page "https://github.com/dpranke/pyjson5")
22791 (synopsis
22792 "Python implementation of the JSON5 data format")
22793 (description
22794 "JSON5 extends the JSON data interchange format to make it slightly more
22795 usable as a configuration language. This Python package implements parsing and
22796 dumping of JSON5 data structures.")
22797 (license license:asl2.0)))
22798
22799 (define-public python-frozendict
22800 (package
22801 (name "python-frozendict")
22802 (version "1.2")
22803 (source
22804 (origin
22805 (method url-fetch)
22806 (uri (pypi-uri "frozendict" version))
22807 (sha256
22808 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
22809 (build-system python-build-system)
22810 (home-page "https://github.com/slezica/python-frozendict")
22811 (synopsis "Simple immutable mapping for Python")
22812 (description
22813 "@dfn{frozendict} is an immutable wrapper around dictionaries that
22814 implements the complete mapping interface. It can be used as a drop-in
22815 replacement for dictionaries where immutability is desired.")
22816 (license license:expat)))
22817
22818 (define-public python-unpaddedbase64
22819 (package
22820 (name "python-unpaddedbase64")
22821 (version "1.1.0")
22822 (source
22823 (origin
22824 (method git-fetch)
22825 (uri (git-reference
22826 (url "https://github.com/matrix-org/python-unpaddedbase64")
22827 (commit (string-append "v" version))))
22828 (file-name (git-file-name name version))
22829 (sha256
22830 (base32
22831 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
22832 (build-system python-build-system)
22833 (home-page "https://pypi.org/project/unpaddedbase64/")
22834 (synopsis "Encode and decode Base64 without “=” padding")
22835 (description
22836 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
22837 using “=” characters. However this conveys no benefit so many protocols
22838 choose to use Base64 without the “=” padding.")
22839 (license license:asl2.0)))
22840
22841 (define-public python-py-cpuinfo
22842 (package
22843 (name "python-py-cpuinfo")
22844 (version "5.0.0")
22845 (source
22846 (origin
22847 (method url-fetch)
22848 (uri (pypi-uri "py-cpuinfo" version))
22849 (sha256
22850 (base32
22851 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
22852 (build-system python-build-system)
22853 (home-page "https://github.com/workhorsy/py-cpuinfo")
22854 (synopsis "Get CPU info with Python")
22855 (description
22856 "This Python module returns the CPU info by using the best sources of
22857 information for your operating system.")
22858 (license license:expat)))
22859
22860 (define-public python-canonicaljson
22861 (package
22862 (name "python-canonicaljson")
22863 (version "1.4.0")
22864 (source
22865 (origin
22866 (method url-fetch)
22867 (uri (pypi-uri "canonicaljson" version))
22868 (sha256
22869 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
22870 (build-system python-build-system)
22871 (propagated-inputs
22872 `(("python-six" ,python-six)
22873 ("python-frozendict" ,python-frozendict)
22874 ("python-simplejson" ,python-simplejson)))
22875 (home-page "https://github.com/matrix-org/python-canonicaljson")
22876 (synopsis "Canonical JSON")
22877 (description
22878 "Deterministically encode JSON.
22879
22880 @itemize
22881 @item Encodes objects and arrays as RFC 7159 JSON.
22882 @item Sorts object keys so that you get the same result each time.
22883 @item Has no insignificant whitespace to make the output as small as possible.
22884 @item Escapes only the characters that must be escaped, U+0000 to
22885 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
22886 @item Uses the shortest escape sequence for each escaped character.
22887 @item Encodes the JSON as UTF-8.
22888 @item Can encode frozendict immutable dictionaries.
22889 @end itemize")
22890 (license license:asl2.0)))
22891
22892 (define-public python-signedjson
22893 (package
22894 (name "python-signedjson")
22895 (version "1.1.1")
22896 (source
22897 (origin
22898 (method url-fetch)
22899 (uri (pypi-uri "signedjson" version))
22900 (sha256
22901 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
22902 (build-system python-build-system)
22903 (propagated-inputs
22904 `(("python-canonicaljson" ,python-canonicaljson)
22905 ("python-importlib-metadata" ,python-importlib-metadata)
22906 ("python-pynacl" ,python-pynacl)
22907 ("python-typing-extensions" ,python-typing-extensions)
22908 ("python-unpaddedbase64" ,python-unpaddedbase64)))
22909 (native-inputs
22910 `(("python-setuptools-scm" ,python-setuptools-scm)))
22911 (home-page "https://github.com/matrix-org/python-signedjson")
22912 (synopsis "Sign JSON objects with ED25519 signatures")
22913 (description
22914 "Sign JSON objects with ED25519 signatures.
22915
22916 @itemize
22917 @item More than one entity can sign the same object.
22918 @item Each entity can sign the object with more than one key making it easier to
22919 rotate keys
22920 @item ED25519 can be replaced with a different algorithm.
22921 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
22922 key.
22923 @end itemize")
22924 (license license:asl2.0)))
22925
22926 (define-public python-daemonize
22927 (package
22928 (name "python-daemonize")
22929 (version "2.5.0")
22930 (source
22931 (origin
22932 (method url-fetch)
22933 (uri (pypi-uri "daemonize" version))
22934 (sha256
22935 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
22936 (build-system python-build-system)
22937 (home-page "https://github.com/thesharp/daemonize")
22938 (synopsis "Library for writing system daemons in Python")
22939 (description "Daemonize is a library for writing system daemons in Python.")
22940 (license license:expat)))
22941
22942 (define-public python-pymacaroons
22943 (package
22944 (name "python-pymacaroons")
22945 (version "0.13.0")
22946 (source
22947 (origin
22948 (method url-fetch)
22949 (uri (pypi-uri "pymacaroons" version))
22950 (sha256
22951 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
22952 (build-system python-build-system)
22953 (propagated-inputs
22954 `(("python-six" ,python-six)
22955 ("python-pynacl" ,python-pynacl)))
22956 (home-page "https://github.com/ecordell/pymacaroons")
22957 (synopsis "Python Macaroon Library")
22958 (description
22959 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
22960 tokens, macaroons embed caveats that define specific authorization
22961 requirements for the target service, the service that issued the root macaroon
22962 and which is capable of verifying the integrity of macaroons it receives.
22963
22964 Macaroons allow for delegation and attenuation of authorization. They are
22965 simple and fast to verify, and decouple authorization policy from the
22966 enforcement of that policy.")
22967 (license license:expat)))
22968
22969 (define-public python-ldap3
22970 (package
22971 (name "python-ldap3")
22972 (version "2.7")
22973 (home-page "https://github.com/cannatag/ldap3")
22974 (source
22975 (origin
22976 (method git-fetch)
22977 (uri (git-reference (url home-page)
22978 (commit (string-append "v" version))))
22979 (file-name (git-file-name name version))
22980 (sha256
22981 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
22982 (build-system python-build-system)
22983 (arguments
22984 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
22985 #:phases (modify-phases %standard-phases
22986 (replace 'check
22987 (lambda* (#:key tests? #:allow-other-keys)
22988 (when tests?
22989 (invoke "nosetests" "-s" "test"))
22990 #t)))))
22991 (native-inputs
22992 `(("python-nose" ,python-nose)))
22993 (propagated-inputs
22994 `(("python-gssapi" ,python-gssapi)
22995 ("python-pyasn1" ,python-pyasn1)))
22996 (synopsis "Python LDAP client")
22997 (description
22998 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
22999 library.")
23000 (license license:lgpl3+)))
23001
23002 (define-public python-boltons
23003 (package
23004 (name "python-boltons")
23005 (version "20.0.0")
23006 (source
23007 (origin
23008 (method url-fetch)
23009 (uri (pypi-uri "boltons" version))
23010 (sha256
23011 (base32
23012 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
23013 (build-system python-build-system)
23014 (home-page "https://github.com/mahmoud/boltons")
23015 (synopsis "Extensions to the Python standard library")
23016 (description
23017 "Boltons is a set of over 230 pure-Python utilities in the same spirit
23018 as — and yet conspicuously missing from — the standard library, including:
23019
23020 @itemize
23021 @item Atomic file saving, bolted on with fileutils
23022 @item A highly-optimized OrderedMultiDict, in dictutils
23023 @item Two types of PriorityQueue, in queueutils
23024 @item Chunked and windowed iteration, in iterutils
23025 @item Recursive data structure iteration and merging, with iterutils.remap
23026 @item Exponential backoff functionality, including jitter, through
23027 iterutils.backoff
23028 @item A full-featured TracebackInfo type, for representing stack traces, in
23029 tbutils
23030 @end itemize")
23031 (license license:bsd-3)))
23032
23033 (define-public python-eliot
23034 (package
23035 (name "python-eliot")
23036 (version "1.12.0")
23037 (source
23038 (origin
23039 (method url-fetch)
23040 (uri (pypi-uri "eliot" version))
23041 (sha256
23042 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
23043 (build-system python-build-system)
23044 (arguments
23045 `(#:phases
23046 (modify-phases %standard-phases
23047 (add-after 'unpack 'remove-journald-support
23048 (lambda _
23049 (for-each delete-file
23050 '("eliot/tests/test_journald.py"
23051 "eliot/journald.py"))
23052 #t))
23053 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
23054 ;; remove command-line tool's tests. TODO eliot-prettyprint should
23055 ;; be installed and these tests should pass.
23056 (lambda _
23057 (delete-file "eliot/tests/test_prettyprint.py")
23058 #t)))))
23059 (propagated-inputs
23060 `(("python-boltons" ,python-boltons)
23061 ("python-pyrsistent" ,python-pyrsistent)
23062 ("python-six" ,python-six)
23063 ("python-zope-interface" ,python-zope-interface)))
23064 (native-inputs
23065 `(("python-black" ,python-black)
23066 ("python-coverage" ,python-coverage)
23067 ("python-dask" ,python-dask)
23068 ("python-flake8" ,python-flake8)
23069 ("python-hypothesis" ,python-hypothesis)
23070 ("python-pytest" ,python-pytest)
23071 ("python-setuptools" ,python-setuptools)
23072 ("python-sphinx" ,python-sphinx)
23073 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
23074 ("python-testtools" ,python-testtools)
23075 ("python-twine" ,python-twine)
23076 ("python-twisted" ,python-twisted)))
23077 (home-page "https://github.com/itamarst/eliot/")
23078 (synopsis "Eliot: the logging system that tells you why it happened")
23079 (description
23080 "@dfn{eliot} is a Python logging system that outputs causal chains of
23081 actions: actions can spawn other actions, and eventually they either succeed
23082 or fail. The resulting logs tell you the story of what your software did: what
23083 happened, and what caused it.")
23084 (license license:asl2.0)))
23085
23086 (define-public python-pem
23087 (package
23088 (name "python-pem")
23089 (version "20.1.0")
23090 (source
23091 (origin
23092 (method url-fetch)
23093 (uri (pypi-uri "pem" version))
23094 (sha256
23095 (base32
23096 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
23097 (build-system python-build-system)
23098 (native-inputs
23099 `(("python-certifi" ,python-certifi)
23100 ("python-coverage" ,python-coverage)
23101 ("python-pretend" ,python-pretend)
23102 ("python-pyopenssl" ,python-pyopenssl)
23103 ("python-pytest" ,python-pytest)
23104 ("python-sphinx" ,python-sphinx)
23105 ("python-twisted" ,python-twisted)))
23106 (home-page "https://pem.readthedocs.io/")
23107 (synopsis "Easy PEM file parsing in Python")
23108 (description
23109 "This package provides a Python module for parsing and splitting PEM files.")
23110 (license license:expat)))
23111
23112 (define-public python-txsni
23113 ;; We need a few commits on top of 0.1.9 for compatibility with newer
23114 ;; Python and OpenSSL.
23115 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
23116 (revision "0"))
23117 (package
23118 (name "python-txsni")
23119 (version (git-version "0.1.9" revision commit))
23120 (home-page "https://github.com/glyph/txsni")
23121 (source
23122 (origin
23123 (method git-fetch)
23124 (uri (git-reference (url home-page) (commit commit)))
23125 (file-name (git-file-name name version))
23126 (sha256
23127 (base32
23128 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
23129 (build-system python-build-system)
23130 (propagated-inputs
23131 `(("python-pyopenssl" ,python-pyopenssl)
23132 ("python-service-identity" ,python-service-identity)
23133 ("python-twisted" ,python-twisted)))
23134 (synopsis "Run TLS servers with Twisted")
23135 (description
23136 "This package provides an easy-to-use SNI endpoint for use
23137 with the Twisted web framework.")
23138 (license license:expat))))
23139
23140 (define-public python-txacme
23141 (package
23142 (name "python-txacme")
23143 (version "0.9.2")
23144 (source
23145 (origin
23146 (method url-fetch)
23147 (uri (pypi-uri "txacme" version))
23148 (sha256
23149 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
23150 (build-system python-build-system)
23151 (propagated-inputs
23152 `(("python-acme" ,python-acme)
23153 ("python-attrs" ,python-attrs)
23154 ("python-eliot" ,python-eliot)
23155 ("python-josepy" ,python-josepy)
23156 ("python-pem" ,python-pem)
23157 ("python-treq" ,python-treq)
23158 ("python-twisted" ,python-twisted)
23159 ("python-txsni" ,python-txsni)))
23160 (native-inputs
23161 `(("python-fixtures" ,python-fixtures)
23162 ("python-hypothesis" ,python-hypothesis)
23163 ("python-mock" ,python-mock)
23164 ("python-service-identity"
23165 ,python-service-identity)
23166 ("python-testrepository" ,python-testrepository)
23167 ("python-testscenarios" ,python-testscenarios)
23168 ("python-testtools" ,python-testtools)))
23169 (home-page "https://github.com/twisted/txacme")
23170 (synopsis "Twisted implexmentation of the ACME protocol")
23171 (description
23172 "ACME is Automatic Certificate Management Environment, a protocol that
23173 allows clients and certificate authorities to automate verification and
23174 certificate issuance. The ACME protocol is used by the free Let's Encrypt
23175 Certificate Authority.
23176
23177 txacme is an implementation of the protocol for Twisted, the event-driven
23178 networking engine for Python.")
23179 (license license:expat)))
23180
23181 (define-public python-pysaml2
23182 (package
23183 (name "python-pysaml2")
23184 (version "6.5.1")
23185 (source
23186 (origin
23187 (method url-fetch)
23188 (uri (pypi-uri "pysaml2" version))
23189 (sha256
23190 (base32
23191 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
23192 (build-system python-build-system)
23193 (propagated-inputs
23194 `(("python-cryptography" ,python-cryptography)
23195 ("python-dateutil" ,python-dateutil)
23196 ("python-defusedxml" ,python-defusedxml)
23197 ("python-importlib-resources"
23198 ,python-importlib-resources)
23199 ("python-pyopenssl" ,python-pyopenssl)
23200 ("python-pytz" ,python-pytz)
23201 ("python-requests" ,python-requests)
23202 ("python-six" ,python-six)
23203 ("python-xmlschema" ,python-xmlschema)))
23204 (home-page "https://idpy.org")
23205 (synopsis "Python implementation of SAML Version 2 Standard")
23206 (description
23207 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
23208 It contains all necessary pieces for building a SAML2 service provider or
23209 an identity provider. The distribution contains examples of both.
23210
23211 This package was originally written to work in a WSGI environment, but
23212 there are extensions that allow you to use it with other frameworks.")
23213 (license license:asl2.0)))
23214
23215 (define-public python-click-plugins
23216 (package
23217 (name "python-click-plugins")
23218 (version "1.1.1")
23219 (source
23220 (origin
23221 (method url-fetch)
23222 (uri (pypi-uri "click-plugins" version))
23223 (sha256
23224 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
23225 (build-system python-build-system)
23226 (native-inputs
23227 `(("python-pytest" ,python-pytest)))
23228 (propagated-inputs
23229 `(("python-click" ,python-click)))
23230 (synopsis "Extension for Click to register external CLI commands")
23231 (description "This package provides n extension module for Click to
23232 register external CLI commands via setuptools entry-points.")
23233 (home-page "https://github.com/click-contrib/click-plugins")
23234 (license license:bsd-3)))
23235
23236 (define-public python-diceware
23237 (package
23238 (name "python-diceware")
23239 (version "0.9.6")
23240 (source
23241 (origin
23242 (method url-fetch)
23243 (uri (pypi-uri "diceware" version))
23244 (sha256
23245 (base32
23246 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
23247 (build-system python-build-system)
23248 (native-inputs
23249 `(("python-coverage" ,python-coverage)
23250 ("python-pytest" ,python-pytest)
23251 ("python-pytest-runner" ,python-pytest-runner)))
23252 (home-page "https://github.com/ulif/diceware/")
23253 (synopsis "Generates memorable passphrases")
23254 (description "This package generates passphrases by concatenating words
23255 randomly picked from wordlists. It supports several sources of
23256 randomness (including real life dice) and different wordlists (including
23257 cryptographically signed ones).")
23258 (license license:gpl3+)))
23259
23260 (define-public python-dictdiffer
23261 (package
23262 (name "python-dictdiffer")
23263 (version "0.8.1")
23264 (source (origin
23265 (method url-fetch)
23266 (uri (pypi-uri "dictdiffer" version))
23267 (sha256
23268 (base32
23269 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
23270 (build-system python-build-system)
23271 (native-inputs
23272 `(("python-check-manifest" ,python-check-manifest)
23273 ("python-coverage" ,python-coverage)
23274 ("python-isort" ,python-isort)
23275 ("python-mock" ,python-mock)
23276 ("python-pydoctstyle" ,python-pydocstyle)
23277 ("python-pytest-cache" ,python-pytest-cache)
23278 ("python-pytest-cov" ,python-pytest-cov)
23279 ("python-pytest-pep8" ,python-pytest-pep8)
23280 ("python-pytest-runner" ,python-pytest-runner)
23281 ("python-pytest" ,python-pytest)
23282 ("python-setuptools-scm" ,python-setuptools-scm)
23283 ("python-tox" ,python-tox)))
23284 (home-page "https://github.com/inveniosoftware/dictdiffer")
23285 (synopsis "Diff and patch Python dictionary objects")
23286 (description
23287 "Dictdiffer is a Python module that helps you to diff and patch
23288 dictionaries.")
23289 (license license:expat)))
23290
23291 (define-public pyzo
23292 (package
23293 (name "pyzo")
23294 (version "4.11.2")
23295 (source
23296 (origin
23297 (method url-fetch)
23298 (uri (pypi-uri "pyzo" version))
23299 (sha256
23300 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
23301 (build-system python-build-system)
23302 (arguments
23303 `(#:phases
23304 (modify-phases %standard-phases
23305 (add-before 'check 'fix-home-directory
23306 (lambda _
23307 ;; Tests fail with "Permission denied: '/homeless-shelter'".
23308 (setenv "HOME" "/tmp")
23309 #t)))
23310 ;; Tests fail with "Uncaught Python exception: python: undefined
23311 ;; symbol: objc_getClass".
23312 #:tests? #f))
23313 (propagated-inputs
23314 `(("python-pyqt" ,python-pyqt)))
23315 (home-page "https://pyzo.org")
23316 (synopsis
23317 "Python IDE for scientific computing")
23318 (description
23319 "Pyzo is a Python IDE focused on interactivity and introspection,
23320 which makes it very suitable for scientific computing. Its practical
23321 design is aimed at simplicity and efficiency.
23322
23323 It consists of two main components, the editor and the shell, and uses
23324 a set of pluggable tools to help the programmer in various ways. Some
23325 example tools are source structure, project manager, interactive help,
23326 workspace...")
23327 (license license:bsd-2)))
23328
23329 (define-public python-osc
23330 (package
23331 (name "python-osc")
23332 (version "1.7.4")
23333 (source
23334 (origin
23335 (method url-fetch)
23336 (uri (pypi-uri "python-osc" version))
23337 (sha256
23338 (base32
23339 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
23340 (build-system python-build-system)
23341 (home-page "https://github.com/attwad/python-osc")
23342 (synopsis "Open Sound Control server and client implementations")
23343 (description
23344 "@code{python-osc} is a pure Python library with no external
23345 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
23346 Open Sound Control 1.0} specification.")
23347 (license license:unlicense)))
23348
23349 (define-public python-voluptuous
23350 (package
23351 (name "python-voluptuous")
23352 (version "0.11.7")
23353 (source
23354 (origin
23355 (method url-fetch)
23356 (uri (pypi-uri "voluptuous" version))
23357 (sha256
23358 (base32
23359 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
23360 (build-system python-build-system)
23361 (native-inputs
23362 `(("python-nose" ,python-nose)))
23363 (home-page "https://github.com/alecthomas/voluptuous")
23364 (synopsis "Python data validation library")
23365 (description
23366 "Voluptuous is a Python data validation library. It is primarily
23367 intended for validating data coming into Python as JSON, YAML, etc.")
23368 (license license:bsd-3)))
23369
23370 (define-public python-cmd2
23371 (package
23372 (name "python-cmd2")
23373 (version "1.0.2")
23374 (source
23375 (origin
23376 (method url-fetch)
23377 (uri (pypi-uri "cmd2" version))
23378 (sha256
23379 (base32
23380 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
23381 (build-system python-build-system)
23382 (propagated-inputs
23383 `(("python-attrs" ,python-attrs)
23384 ("python-colorama" ,python-colorama)
23385 ("python-pyperclip" ,python-pyperclip)
23386 ("python-wcwidth" ,python-wcwidth)))
23387 (native-inputs
23388 `(("python-codecov" ,python-codecov)
23389 ("python-coverage" ,python-coverage)
23390 ("python-doc8" ,python-doc8)
23391 ("python-flake8" ,python-flake8)
23392 ("python-invoke" ,python-invoke)
23393 ("python-mock" ,python-mock)
23394 ("python-pytest" ,python-pytest)
23395 ("python-pytest-cov" ,python-pytest-cov)
23396 ("python-pytest-mock" ,python-pytest-mock)
23397 ("python-setuptools-scm" ,python-setuptools-scm)
23398 ("python-sphinx" ,python-sphinx)
23399 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
23400 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
23401 ("python-tox" ,python-tox)
23402 ("python-twine" ,python-twine)
23403 ("which" ,which)))
23404 (home-page "https://github.com/python-cmd2/cmd2")
23405 (synopsis "Tool for building interactive command line applications")
23406 (description
23407 "Cmd2 is a tool for building interactive command line applications in
23408 Python. Its goal is to make it quick and easy for developers to build
23409 feature-rich and user-friendly interactive command line applications. It
23410 provides a simple API which is an extension of Python's built-in @code{cmd}
23411 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
23412 make your life easier and eliminates much of the boilerplate code which would
23413 be necessary when using @code{cmd}.")
23414 (license license:expat)))
23415
23416 (define-public python-pytidylib
23417 (package
23418 (name "python-pytidylib")
23419 (version "0.3.2")
23420 (source (origin
23421 (method url-fetch)
23422 (uri (pypi-uri "pytidylib" version))
23423 (sha256
23424 (base32
23425 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
23426 (build-system python-build-system)
23427 (arguments
23428 '(#:phases
23429 (modify-phases %standard-phases
23430 (add-before 'build 'qualify-libtidy
23431 (lambda* (#:key inputs #:allow-other-keys)
23432 (let ((libtidy (string-append (assoc-ref inputs "tidy")
23433 "/lib/libtidy.so")))
23434 (substitute* "tidylib/tidy.py"
23435 (("ctypes\\.util\\.find_library\\('tidy'\\)")
23436 (format #f "'~a'" libtidy)))
23437 #t))))))
23438 (inputs `(("tidy" ,tidy)))
23439 (home-page "https://github.com/countergram/pytidylib")
23440 (synopsis "Python wrapper for HTML Tidy library")
23441 (description
23442 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
23443 allows you, from Python code, to “fix” invalid (X)HTML markup.")
23444 (license license:expat)))
23445
23446 (define-public python2-pytidylib
23447 (package-with-python2 python-pytidylib))
23448
23449 (define-public python-mujson
23450 (package
23451 (name "python-mujson")
23452 (version "1.4")
23453 (source
23454 (origin
23455 (method url-fetch)
23456 (uri (pypi-uri "mujson" version))
23457 (sha256
23458 (base32
23459 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
23460 (build-system python-build-system)
23461 (home-page "https://github.com/mattgiles/mujson")
23462 (synopsis "Use the fastest JSON functions available at import time")
23463 (description "This package selects the fastest JSON functions available
23464 at import time.")
23465 (license license:expat)))
23466
23467 (define-public python-bashlex
23468 (package
23469 (name "python-bashlex")
23470 (version "0.14")
23471 (source
23472 (origin
23473 (method url-fetch)
23474 (uri (pypi-uri "bashlex" version))
23475 (sha256
23476 (base32
23477 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
23478 (build-system python-build-system)
23479 (arguments
23480 `(#:phases
23481 (modify-phases %standard-phases
23482 (add-before 'build 'pregenerate-yacc-tables
23483 (lambda _
23484 ;; parser.py caches tables, which attempts to write to site lib
23485 ;; see https://github.com/idank/bashlex/issues/51
23486 (invoke "python" "-c" "import bashlex"))))))
23487 (home-page
23488 "https://github.com/idank/bashlex")
23489 (synopsis "Python parser for bash")
23490 (description "@code{bashlex} is a Python port of the parser used
23491 internally by GNU bash.
23492
23493 For the most part it's transliterated from C, the major differences are:
23494
23495 @itemize
23496 @item it does not execute anything
23497 @item it is reentrant
23498 @item it generates a complete AST
23499 @end itemize
23500 ")
23501 (license license:gpl3+)))
23502
23503 (define-public python-jinxed
23504 (package
23505 (name "python-jinxed")
23506 (version "1.0.0")
23507 (source
23508 (origin
23509 (method url-fetch)
23510 (uri (pypi-uri "jinxed" version))
23511 (sha256
23512 (base32
23513 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
23514 (build-system python-build-system)
23515 (arguments
23516 '(#:phases
23517 (modify-phases %standard-phases
23518 (add-before 'check 'set-environment-variables
23519 (lambda* (#:key inputs #:allow-other-keys)
23520 (let ((ncurses (assoc-ref inputs "ncurses")))
23521 (setenv "TERM" "LINUX")
23522 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
23523 #t))))
23524 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
23525 (native-inputs
23526 `(("ncurses" ,ncurses)))
23527 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
23528 (synopsis "Jinxed Terminal Library")
23529 (description
23530 "Jinxed is an implementation of a subset of the Python curses library.")
23531 (license license:mpl2.0)))
23532
23533 (define-public python-blessed
23534 (package
23535 (name "python-blessed")
23536 (version "1.17.8")
23537 (source
23538 (origin
23539 (method url-fetch)
23540 (uri (pypi-uri "blessed" version))
23541 (sha256
23542 (base32
23543 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
23544 (modules '((guix build utils)))
23545 (snippet
23546 '(begin
23547 ;; Don't get hung up on Windows test failures.
23548 (delete-file "blessed/win_terminal.py") #t))))
23549 (build-system python-build-system)
23550 (propagated-inputs
23551 `(("python-jinxed" ,python-jinxed)
23552 ("python-six" ,python-six)
23553 ("python-wcwidth" ,python-wcwidth)))
23554 (native-inputs
23555 `(("python-mock" ,python-mock)
23556 ("python-pytest" ,python-pytest)))
23557 (home-page "https://github.com/jquast/blessed")
23558 (synopsis "Wrapper around terminal capabilities")
23559 (description
23560 "Blessed is a thin, practical wrapper around terminal styling, screen
23561 positioning, and keyboard input.")
23562 (license license:expat)))
23563
23564 (define-public python-readme-renderer
23565 (package
23566 (name "python-readme-renderer")
23567 (version "26.0")
23568 (source
23569 (origin
23570 (method url-fetch)
23571 (uri (pypi-uri "readme_renderer" version))
23572 (sha256
23573 (base32
23574 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
23575 (build-system python-build-system)
23576 (propagated-inputs
23577 `(("python-bleach" ,python-bleach)
23578 ("python-docutils" ,python-docutils)
23579 ("python-pygments" ,python-pygments)
23580 ("python-six" ,python-six)))
23581 (native-inputs
23582 `(("python-mock" ,python-mock)
23583 ("python-pytest" ,python-pytest)))
23584 (home-page "https://github.com/pypa/readme_renderer")
23585 (synopsis "Render README files in Warehouse")
23586 (description
23587 "Readme Renderer is a library that will safely render arbitrary README
23588 files into HTML. It is designed to be used in Warehouse to render the
23589 @code{long_description} for packages. It can handle Markdown, reStructuredText,
23590 and plain text.")
23591 (license license:asl2.0)))
23592
23593 (define-public python-lazr-delegates
23594 (package
23595 (name "python-lazr-delegates")
23596 (version "2.0.4")
23597 (source
23598 (origin
23599 (method url-fetch)
23600 (uri (pypi-uri "lazr.delegates" version))
23601 (sha256
23602 (base32
23603 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
23604 (build-system python-build-system)
23605 (arguments
23606 '(#:phases
23607 (modify-phases %standard-phases
23608 (replace 'check
23609 (lambda _
23610 (invoke "python" "setup.py" "nosetests"))))))
23611 (native-inputs
23612 `(("python-nose" ,python-nose)))
23613 (propagated-inputs
23614 `(("python-zope-interface" ,python-zope-interface)))
23615 (home-page "https://launchpad.net/lazr.delegates")
23616 (synopsis "Easily write objects that delegate behavior")
23617 (description
23618 "The @code{lazr.delegates} package makes it easy to write objects that
23619 delegate behavior to another object. The new object adds some property or
23620 behavior on to the other object, while still providing the underlying interface,
23621 and delegating behavior.")
23622 (license license:lgpl3)))
23623
23624 (define-public python-lazr-config
23625 (package
23626 (name "python-lazr-config")
23627 (version "2.2.2")
23628 (source
23629 (origin
23630 (method url-fetch)
23631 (uri (pypi-uri "lazr.config" version))
23632 (sha256
23633 (base32
23634 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
23635 (build-system python-build-system)
23636 (arguments
23637 '(#:phases
23638 (modify-phases %standard-phases
23639 (replace 'check
23640 (lambda _
23641 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
23642 (native-inputs
23643 `(("python-nose" ,python-nose)))
23644 (propagated-inputs
23645 `(("python-lazr-delegates" ,python-lazr-delegates)
23646 ("python-zope-interface" ,python-zope-interface)))
23647 (home-page "https://launchpad.net/lazr.config")
23648 (synopsis "Create configuration schemas and process and validate configurations")
23649 (description
23650 "The LAZR config system is typically used to manage process configuration.
23651 Process configuration is for saying how things change when we run systems on
23652 different machines, or under different circumstances. This system uses ini-like
23653 file format of section, keys, and values. The config file supports inheritance
23654 to minimize duplication of information across files. The format supports schema
23655 validation.")
23656 (license license:lgpl3)))
23657
23658 (define-public python-flufl-bounce
23659 (package
23660 (name "python-flufl-bounce")
23661 (version "3.0.1")
23662 (source
23663 (origin
23664 (method url-fetch)
23665 (uri (pypi-uri "flufl.bounce" version))
23666 (sha256
23667 (base32
23668 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
23669 (build-system python-build-system)
23670 (propagated-inputs
23671 `(("python-atpublic" ,python-atpublic)
23672 ("python-zope-interface" ,python-zope-interface)))
23673 (native-inputs
23674 `(("python-nose2" ,python-nose2)))
23675 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
23676 (synopsis "Email bounce detectors")
23677 (description "The @code{flufl.bounce} library provides a set of heuristics
23678 and an API for detecting the original bouncing email addresses from a bounce
23679 message. Many formats found in the wild are supported, as are VERP and
23680 RFC 3464.")
23681 (license (list license:asl2.0
23682 license:lgpl3)))) ; only for setup_headers.py
23683
23684 (define-public python-flufl-i18n
23685 (package
23686 (name "python-flufl-i18n")
23687 (version "3.0")
23688 (source
23689 (origin
23690 (method url-fetch)
23691 (uri (pypi-uri "flufl.i18n" version))
23692 (sha256
23693 (base32
23694 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
23695 (build-system python-build-system)
23696 (propagated-inputs
23697 `(("python-atpublic" ,python-atpublic)))
23698 (home-page "https://flufli18n.readthedocs.io")
23699 (synopsis "API for Python internationalization")
23700 (description
23701 "This package provides a high-level, convenient API for managing
23702 internationalization/translation contexts in Python applications. There is a
23703 simple API for single-context applications, such as command line scripts which
23704 only need to translate into one language during the entire course of their
23705 execution. There is a more flexible, but still convenient API for multi-context
23706 applications, such as servers, which may need to switch language contexts for
23707 different tasks.")
23708 (license license:asl2.0)))
23709
23710 (define-public python-flufl-lock
23711 (package
23712 (name "python-flufl-lock")
23713 (version "4.0")
23714 (source
23715 (origin
23716 (method url-fetch)
23717 (uri (pypi-uri "flufl.lock" version))
23718 (sha256
23719 (base32
23720 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
23721 (build-system python-build-system)
23722 (propagated-inputs
23723 `(("python-atpublic" ,python-atpublic)
23724 ("python-psutil" ,python-psutil)))
23725 (home-page "https://flufllock.readthedocs.io")
23726 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
23727 (description
23728 "The @dfn{flufl.lock} package provides NFS-safe file locking with
23729 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
23730 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
23731 and have a maximum lifetime built-in.")
23732 (license (list license:asl2.0
23733 license:lgpl3)))) ; only for setup_helpers.py
23734
23735 (define-public python-flufl-testing
23736 (package
23737 (name "python-flufl-testing")
23738 (version "0.8")
23739 (source
23740 (origin
23741 (method url-fetch)
23742 (uri (pypi-uri "flufl.testing" version))
23743 (sha256
23744 (base32
23745 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
23746 (build-system python-build-system)
23747 (native-inputs
23748 `(("python-nose2" ,python-nose2)))
23749 (home-page "https://gitlab.com/warsaw/flufl.testing")
23750 (synopsis "Collection of test tool plugins")
23751 (description
23752 "This package contains a small collection of test tool plugins for
23753 @code{nose2} and @code{flake8}.")
23754 (license license:asl2.0)))
23755
23756 (define-public python-devtools
23757 (package
23758 (name "python-devtools")
23759 (version "0.6")
23760 (source
23761 (origin
23762 (method git-fetch)
23763 (uri (git-reference
23764 (url "https://github.com/samuelcolvin/python-devtools")
23765 (commit (string-append "v" version))))
23766 (file-name (git-file-name name version))
23767 (sha256
23768 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
23769 (build-system python-build-system)
23770 (native-inputs
23771 `(("python-pytest" ,python-pytest)
23772 ("python-pytest-mock" ,python-pytest-mock)))
23773 (propagated-inputs
23774 `(("python-pygments" ,python-pygments)))
23775 (arguments
23776 `(#:phases (modify-phases %standard-phases
23777 (replace 'check
23778 (lambda _
23779 (invoke "pytest")
23780 #t)))))
23781 (home-page "https://github.com/samuelcolvin/python-devtools")
23782 (synopsis "Debug command and development tools")
23783 (description
23784 "This package provides a debug print command and other development tools.
23785 It adds a simple and readable way to print stuff during development.")
23786 (license license:expat)))
23787
23788 (define-public python-dateparser
23789 (package
23790 (name "python-dateparser")
23791 (version "0.7.6")
23792 (source
23793 (origin
23794 (method url-fetch)
23795 (uri (pypi-uri "dateparser" version))
23796 (sha256
23797 (base32
23798 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
23799 (build-system python-build-system)
23800 (propagated-inputs
23801 `(("python-dateutil" ,python-dateutil)
23802 ("python-pytz" ,python-pytz)
23803 ("python-regex" ,python-regex)
23804 ("python-ruamel.yaml" ,python-ruamel.yaml)
23805 ("python-tzlocal" ,python-tzlocal)))
23806 (native-inputs
23807 `(("python-mock" ,python-mock)
23808 ("python-parameterized" ,python-parameterized)
23809 ("tzdata" ,tzdata-for-tests)))
23810 (arguments
23811 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
23812 #:tests? #f
23813 #:phases
23814 (modify-phases %standard-phases
23815 (add-before 'check 'set-check-environment
23816 (lambda* (#:key inputs #:allow-other-keys)
23817 (setenv "TZ" "UTC")
23818 (setenv "TZDIR"
23819 (string-append (assoc-ref inputs "tzdata")
23820 "/share/zoneinfo"))
23821 #t)))))
23822 (home-page "https://github.com/scrapinghub/dateparser")
23823 (synopsis
23824 "Date parsing library designed to parse dates from HTML pages")
23825 (description
23826 "@code{python-dateparser} provides modules to easily parse localized
23827 dates in almost any string formats commonly found on web pages.")
23828 (license license:bsd-3)))
23829
23830 (define-public python-dparse
23831 (package
23832 (name "python-dparse")
23833 (version "0.5.1")
23834 (source
23835 (origin
23836 (method url-fetch)
23837 (uri (pypi-uri "dparse" version))
23838 (sha256
23839 (base32
23840 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
23841 (build-system python-build-system)
23842 (native-inputs
23843 `(("python-pytest" ,python-pytest)))
23844 (propagated-inputs
23845 `(("python-packaging" ,python-packaging)
23846 ("python-pyyaml" ,python-pyyaml)
23847 ("python-toml" ,python-toml)))
23848 (home-page "https://github.com/pyupio/dparse")
23849 (synopsis "Parser for Python dependency files")
23850 (description "This package provides a parser for Python dependency files.")
23851 (license license:expat)))
23852
23853 (define-public python-dpath
23854 (package
23855 (name "python-dpath")
23856 (version "2.0.1")
23857 (source
23858 (origin
23859 (method url-fetch)
23860 (uri (pypi-uri "dpath" version))
23861 (sha256
23862 (base32
23863 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
23864 (build-system python-build-system)
23865 (native-inputs
23866 `(("python-hypothesis" ,python-hypothesis)
23867 ("python-mock" ,python-mock)
23868 ("python-nose" ,python-nose)))
23869 (arguments
23870 '(#:phases
23871 (modify-phases %standard-phases
23872 (replace 'check
23873 (lambda* (#:key inputs outputs #:allow-other-keys)
23874 (add-installed-pythonpath inputs outputs)
23875 ;; This invokation is taken from tox.ini.
23876 (invoke "nosetests" "-d" "-v" "tests/"))))))
23877 (home-page "https://github.com/akesterson/dpath-python")
23878 (synopsis "File-system-like pathing and searching for dictionaries")
23879 (description
23880 "@code{python-dpath} is a library for accessing and searching
23881 dictionaries via /slashed/paths ala xpath.
23882
23883 Basically it lets you glob over a dictionary as if it were a file system. It
23884 allows you to specify globs (ala the bash eglob syntax, through some advanced
23885 fnmatch.fnmatch magic) to access dictionary elements, and provides some
23886 facility for filtering those results.")
23887 (license license:expat)))
23888
23889 (define-public python-safety
23890 (package
23891 (name "python-safety")
23892 (version "1.9.0")
23893 (source
23894 (origin
23895 (method url-fetch)
23896 (uri (pypi-uri "safety" version))
23897 (sha256
23898 (base32
23899 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
23900 (build-system python-build-system)
23901 (arguments
23902 `(#:phases
23903 (modify-phases %standard-phases
23904 (add-after 'unpack 'disable-tests
23905 (lambda _
23906 (substitute* "tests/test_safety.py"
23907 ;; requires network
23908 (("def test_check_live") "def _test_check_live"))
23909 #t)))))
23910 (propagated-inputs
23911 `(("python-click" ,python-click)
23912 ("python-dparse" ,python-dparse)
23913 ("python-packaging" ,python-packaging)
23914 ("python-requests" ,python-requests)))
23915 (home-page "https://github.com/pyupio/safety")
23916 (synopsis "Check installed dependencies for known vulnerabilities")
23917 (description "Safety checks installed dependencies for known vulnerabilities.
23918 By default it uses the open Python vulnerability database Safety DB.")
23919 (license license:expat)))
23920
23921 (define-public python-pypandoc
23922 (package
23923 (name "python-pypandoc")
23924 (version "1.5")
23925 (source
23926 (origin
23927 (method url-fetch)
23928 (uri (pypi-uri "pypandoc" version))
23929 (sha256
23930 (base32
23931 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
23932 (build-system python-build-system)
23933 (inputs
23934 `(("pandoc" ,pandoc)
23935 ("pandoc-citeproc" ,pandoc-citeproc)))
23936 (propagated-inputs
23937 `(("wheel" ,python-wheel)))
23938 (native-inputs
23939 `(("texlive" ,(texlive-union (list texlive-amsfonts
23940 texlive-fonts-ec
23941 texlive-latex-hyperref
23942 texlive-latex-oberdiek
23943 texlive-lm
23944 texlive-xcolor)))))
23945 (arguments
23946 `(#:phases
23947 (modify-phases %standard-phases
23948 (add-before 'check 'disable-tests
23949 (lambda _
23950 ;; Disable test requiring network access
23951 (substitute* "tests.py"
23952 (("test_basic_conversion_from_http_url")
23953 "skip_test_basic_conversion_from_http_url"))
23954 ;; Needed by texlive-union to generate fonts
23955 (setenv "HOME" "/tmp")
23956 #t)))))
23957 (home-page "https://github.com/bebraw/pypandoc")
23958 (synopsis "Python wrapper for pandoc")
23959 (description "pypandoc is a thin Python wrapper around pandoc
23960 and pandoc-citeproc.")
23961 (license license:expat)))
23962
23963 (define-public python-rnc2rng
23964 (package
23965 (name "python-rnc2rng")
23966 (version "2.6.4")
23967 (source
23968 (origin
23969 (method url-fetch)
23970 (uri (pypi-uri "rnc2rng" version))
23971 (sha256
23972 (base32
23973 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
23974 (build-system python-build-system)
23975 (propagated-inputs
23976 `(("python-rply" ,python-rply)))
23977 (arguments
23978 `(#:phases (modify-phases %standard-phases
23979 (replace 'check
23980 (lambda _
23981 (invoke "python" "test.py"))))))
23982 (home-page "https://github.com/djc/rnc2rng")
23983 (synopsis "Convert RELAX NG Compact to regular syntax")
23984 (description
23985 "This package provides the @command{rnc2rng} command-line tool as well as
23986 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
23987 equivalent schemata in the XML-based default RELAX NG syntax.")
23988 (license license:expat)))
23989
23990 (define-public python-telethon
23991 (package
23992 (name "python-telethon")
23993 (version "1.17.5")
23994 (source
23995 (origin
23996 (method git-fetch)
23997 (uri (git-reference
23998 (url "https://github.com/LonamiWebs/Telethon")
23999 (commit (string-append "v" version))))
24000 (file-name (git-file-name name version))
24001 (sha256
24002 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
24003 (build-system python-build-system)
24004 (arguments
24005 '(#:phases
24006 (modify-phases %standard-phases
24007 (replace 'check
24008 (lambda* (#:key tests? #:allow-other-keys)
24009 (when tests?
24010 (invoke "py.test" "-v"))
24011 #t)))))
24012 (propagated-inputs
24013 `(("python-rsa" ,python-rsa)
24014 ("python-pyaes" ,python-pyaes)))
24015 (native-inputs
24016 `(("python-pytest" ,python-pytest)
24017 ("python-pytest-asyncio" ,python-pytest-asyncio)
24018 ("python-pytest-trio" ,python-pytest-trio)))
24019 (home-page "https://docs.telethon.dev")
24020 (synopsis "Full-featured Telegram client library for Python 3")
24021 (description "This library is designed to make it easy to write Python
24022 programs that can interact with Telegram.")
24023 (license license:expat)))
24024
24025 (define-public python-citeproc-py
24026 (package
24027 (name "python-citeproc-py")
24028 (version "0.5.1")
24029 (source
24030 (origin
24031 (method url-fetch)
24032 (uri (pypi-uri "citeproc-py" version))
24033 (sha256
24034 (base32
24035 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
24036 (build-system python-build-system)
24037 (propagated-inputs
24038 `(("python-lxml" ,python-lxml)
24039 ("python-rnc2rng" ,python-rnc2rng)))
24040 (home-page
24041 "https://github.com/brechtm/citeproc-py")
24042 (synopsis "Citations and bibliography formatter")
24043 (description
24044 "Citeproc-py is a CSL processor for Python. It aims to implement the
24045 CSL 1.0.1 specification. citeproc-py can output styled citations and
24046 bibliographies in a number of different output formats. Currently supported
24047 are plain text, reStructuredText and HTML.")
24048 (license license:bsd-2)))
24049
24050 (define-public python-inform
24051 (package
24052 (name "python-inform")
24053 (version "1.23.0")
24054 (source
24055 (origin
24056 (method url-fetch)
24057 (uri (pypi-uri "inform" version))
24058 (sha256
24059 (base32
24060 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
24061 (build-system python-build-system)
24062 (arguments
24063 `(#:tests? #f)) ; PyPI tarball lacks tests
24064 (native-inputs
24065 `(("python-hypothesis" ,python-hypothesis)
24066 ("python-pytest-cov" ,python-pytest-cov)
24067 ("python-pytest-runner" ,python-pytest-runner)))
24068 (propagated-inputs
24069 `(("python-arrow" ,python-arrow)
24070 ("python-six" ,python-six)))
24071 (home-page "https://inform.readthedocs.io")
24072 (synopsis "Print & logging utilities for communicating with user")
24073 (description
24074 "Inform is designed to display messages from programs that are typically run from
24075 a console. It provides a collection of ‘print’ functions that allow you to simply and
24076 cleanly print different types of messages.")
24077 (license license:gpl3+)))
24078
24079 (define-public python-nestedtext
24080 (package
24081 (name "python-nestedtext")
24082 (version "1.0.0")
24083 (source
24084 (origin
24085 (method url-fetch)
24086 (uri (pypi-uri "nestedtext" version))
24087 (sha256
24088 (base32
24089 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
24090 (build-system python-build-system)
24091 (arguments
24092 `(#:tests? #f)) ; PyPI tarball lacks tests
24093 (propagated-inputs
24094 `(("python-inform" ,python-inform)))
24095 (home-page "https://nestedtext.org")
24096 (synopsis "Human readable and writable data interchange format")
24097 (description
24098 "NestedText is a file format for holding data that is to be entered, edited, or
24099 viewed by people. It allows data to be organized into a nested collection of
24100 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
24101 without the complexity and risk of YAML and without the syntactic clutter of JSON.
24102 NestedText is both simple and natural. Only a small number of concepts and rules must
24103 be kept in mind when creating it. It is easily created, modified, or viewed with
24104 a text editor and easily understood and used by both programmers and non-programmers.")
24105 (license license:expat))) ; MIT license
24106
24107 (define-public python-nest-asyncio
24108 (package
24109 (name "python-nest-asyncio")
24110 (version "1.5.1")
24111 (source
24112 (origin
24113 (method url-fetch)
24114 (uri (pypi-uri "nest_asyncio" version))
24115 (sha256
24116 (base32
24117 "1anha29fcijminn5bh2icnx8x7nk39lna9wkc72262i12p2s3idg"))))
24118 (build-system python-build-system)
24119 (home-page "https://github.com/erdewit/nest_asyncio")
24120 (synopsis "Patch asyncio to allow nested event loops")
24121 (description
24122 "By design @code{asyncio} does not allow its event loop to be nested.
24123 This presents a practical problem: when in an environment where the event loop
24124 is already running it's impossible to run tasks and wait for the result. This
24125 module patches @code{asyncio} to allow nested use of @code{asyncio.run} and
24126 @code{loop.run_until_complete}.")
24127 (license license:bsd-3)))
24128
24129 (define-public python-parallel
24130 (package
24131 (name "python-parallel")
24132 (version "1.6.4.4")
24133 (source
24134 (origin
24135 (method url-fetch)
24136 (uri (string-append
24137 "https://www.parallelpython.com/downloads/pp/pp-"
24138 version ".zip"))
24139 (sha256
24140 (base32
24141 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
24142 (native-inputs
24143 `(("unzip" ,unzip)))
24144 (build-system python-build-system)
24145 (arguments '(#:tests? #f)) ; No test suite.
24146 (home-page "https://www.parallelpython.com")
24147 (synopsis "Parallel and distributed programming for Python")
24148 (description "Parallel Python module (PP) provides an easy and efficient
24149 way to create parallel-enabled applications for SMP computers and clusters.
24150 PP module features cross-platform portability and dynamic load balancing.
24151 Thus applications written with PP will parallelize efficiently even on
24152 heterogeneous and multi-platform clusters (including clusters running other
24153 applications with variable CPU loads).")
24154 (license license:bsd-3)))
24155
24156 (define-public python2-parallel
24157 (package-with-python2 python-parallel))
24158
24159 (define-public python-djvulibre
24160 (package
24161 (name "python-djvulibre")
24162 (version "0.8.6")
24163 (source
24164 (origin
24165 (method url-fetch)
24166 (uri (pypi-uri "python-djvulibre" version))
24167 (sha256
24168 (base32 "089smpq29ll0z37lnq26r2f72d31i33xm9fw9pc6hlcsm6nbjbiv"))))
24169 (build-system python-build-system)
24170 (native-inputs
24171 `(("ghostscript" ,ghostscript)
24172 ("pkg-config" ,pkg-config)
24173 ("python-nose" ,python-nose)))
24174 (inputs
24175 `(("djvulibre" ,djvulibre)
24176 ("python-cython" ,python-cython)))
24177 (arguments
24178 `(#:phases
24179 (modify-phases %standard-phases
24180 (add-after 'unpack 'fix-tests
24181 (lambda _
24182 ;; Unit tests try to load the 'dllpath.py' and fail, because it
24183 ;; doesn't make sense on GNU/Linux.
24184 (delete-file "djvu/dllpath.py")
24185 #t)))))
24186 (synopsis "Python bindings for DjVuLibre")
24187 (description "This is a set of Python bindings for the DjVuLibre library.")
24188 (home-page "https://jwilk.net/software/python-djvulibre")
24189 (license license:gpl2)))
24190
24191 (define-public python2-djvulibre
24192 (package-with-python2 python-djvulibre))
24193
24194 (define-public python-versioneer
24195 (package
24196 (name "python-versioneer")
24197 (version "0.19")
24198 (source
24199 (origin
24200 (method url-fetch)
24201 (uri (pypi-uri "versioneer" version))
24202 (sha256
24203 (base32
24204 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
24205 (build-system python-build-system)
24206 (home-page
24207 "https://github.com/python-versioneer/python-versioneer")
24208 (synopsis
24209 "Version-string management for VCS-controlled trees")
24210 (description
24211 "@code{versioneer} is a tool for managing a recorded version number in
24212 distutils-based python projects. The goal is to remove the tedious and
24213 error-prone \"update the embedded version string\" step from your release
24214 process.")
24215 (license license:public-domain)))
24216
24217 (define-public python2-gamera
24218 (package
24219 (name "python2-gamera")
24220 (version "3.4.4")
24221 (source
24222 (origin
24223 (method url-fetch)
24224 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
24225 "gamera-" version ".tar.gz"))
24226 (sha256
24227 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
24228 (modules '((guix build utils)))
24229 (snippet
24230 '(begin
24231 ;; Remove bundled libraries.
24232 (for-each delete-file-recursively
24233 '("src/libpng-1.2.5"
24234 "src/libtiff"
24235 "src/zlib-1.2.8"))))))
24236 (build-system python-build-system)
24237 (inputs
24238 `(("libpng" ,libpng)
24239 ("libtiff" ,libtiff)
24240 ("python2-wxpython" ,python2-wxpython)
24241 ("zlib" ,zlib)))
24242 (arguments
24243 `(#:python ,python-2))
24244 (synopsis "Framework for building document analysis applications")
24245 (description
24246 "Gamera is a toolkit for building document image recognition systems.")
24247 (home-page "https://gamera.informatik.hsnr.de/")
24248 (license license:gpl2+)))
24249
24250 (define-public python-contextvars
24251 (package
24252 (name "python-contextvars")
24253 (version "2.4")
24254 (source
24255 (origin
24256 (method url-fetch)
24257 (uri (pypi-uri "contextvars" version))
24258 (sha256
24259 (base32
24260 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
24261 (build-system python-build-system)
24262 (propagated-inputs
24263 `(("python-immutables" ,python-immutables)))
24264 (home-page
24265 "https://github.com/MagicStack/contextvars")
24266 (synopsis "PEP 567 Backport")
24267 (description "This package implements a backport of Python 3.7
24268 @code{contextvars} module (see PEP 567) for Python 3.6.")
24269 (license license:asl2.0)))
24270
24271 (define-public python-aiofiles
24272 (package
24273 (name "python-aiofiles")
24274 (version "0.6.0")
24275 (source
24276 (origin
24277 (method url-fetch)
24278 (uri (pypi-uri "aiofiles" version))
24279 (sha256
24280 (base32
24281 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
24282 (build-system python-build-system)
24283 (home-page "https://github.com/Tinche/aiofiles")
24284 (synopsis "File support for @code{asyncio}")
24285 (description "@code{python-aiofiles} is a library for handling local
24286 disk files in asyncio applications.")
24287 (license license:asl2.0)))
24288
24289 (define-public python-pyre-extensions
24290 (package
24291 (name "python-pyre-extensions")
24292 (version "0.0.18")
24293 (source
24294 (origin
24295 (method url-fetch)
24296 (uri (pypi-uri "pyre-extensions" version))
24297 (sha256
24298 (base32
24299 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
24300 (build-system python-build-system)
24301 (propagated-inputs
24302 `(("python-typing-extensions"
24303 ,python-typing-extensions)
24304 ("python-typing-inspect" ,python-typing-inspect)))
24305 (home-page "https://pyre-check.org")
24306 (synopsis
24307 "Type system extensions for use with @code{python-pyre}")
24308 (description
24309 "@code{python-pyre-extensions} defines extensions to the standard
24310 @code{typing} module that are supported by the Pyre typechecker.")
24311 (license license:expat)))
24312
24313 (define-public python-dataclasses
24314 (package
24315 (name "python-dataclasses")
24316 (version "0.7")
24317 (source
24318 (origin
24319 (method url-fetch)
24320 (uri (pypi-uri "dataclasses" version))
24321 (sha256
24322 (base32
24323 "1rh8111fbws2vxyf2qy2zw3x6p6cq1jfz8pf904gig5qwg56sjj9"))))
24324 (build-system python-build-system)
24325 (home-page
24326 "https://github.com/ericvsmith/dataclasses")
24327 (synopsis
24328 "Backport of the @code{dataclasses} module for Python 3.6")
24329 (description
24330 "This is an implementation of PEP 557, Data Classes. It is a
24331 backport of the @code{dataclasses} module for Python 3.6.")
24332 (license license:asl2.0)))
24333
24334 (define-public python-pywatchman
24335 (package
24336 (name "python-pywatchman")
24337 (version "1.4.1")
24338 (source
24339 (origin
24340 (method url-fetch)
24341 (uri (pypi-uri "pywatchman" version))
24342 (sha256
24343 (base32
24344 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
24345 (build-system python-build-system)
24346 (arguments
24347 `(#:tests? #f)) ;there are none
24348 (home-page
24349 "https://facebook.github.io/watchman/")
24350 (synopsis "Watchman client for python")
24351 (description "@code{python-pywatchman} is a library to connect and
24352 query Watchman to discover file changes.")
24353 (license license:bsd-3)))
24354
24355 (define-public python-helpdev
24356 (package
24357 (name "python-helpdev")
24358 (version "0.7.1")
24359 (source
24360 (origin
24361 (method url-fetch)
24362 (uri (pypi-uri "helpdev" version))
24363 (sha256
24364 (base32
24365 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
24366 (build-system python-build-system)
24367 (arguments
24368 `(#:phases
24369 (modify-phases %standard-phases
24370 (replace 'check
24371 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
24372 (when tests?
24373 (add-installed-pythonpath inputs outputs)
24374 (invoke "pytest" "tests"))
24375 #t)))))
24376 (propagated-inputs
24377 `(("python-importlib-metadata" ,python-importlib-metadata)))
24378 (native-inputs
24379 `(("python-pytest" ,python-pytest)))
24380 (home-page "https://gitlab.com/dpizetta/helpdev")
24381 (synopsis
24382 "Extract information about the Python environment easily")
24383 (description
24384 "Helpdev is a library to easily extract information about the Python
24385 environment.")
24386 (license license:expat)))
24387
24388 (define-public python-qdarkstyle
24389 (package
24390 (name "python-qdarkstyle")
24391 (version "2.8.1")
24392 (source
24393 (origin
24394 (method url-fetch)
24395 (uri (pypi-uri "QDarkStyle" version))
24396 (sha256
24397 (base32
24398 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
24399 (build-system python-build-system)
24400 (arguments
24401 `(;; Fails unable to detect valid Qt bindings even when
24402 ;; added as native-inputs.
24403 #:tests? #f))
24404 (propagated-inputs
24405 `(("python-helpdev" ,python-helpdev)
24406 ("python-qtpy" ,python-qtpy)))
24407 (home-page
24408 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
24409 (synopsis
24410 "Complete dark stylesheet for Python and Qt applications")
24411 (description "QDarkStyle is the most complete dark stylesheet for Python and
24412 Qt applications.")
24413 (license license:expat)))
24414
24415 (define-public python-bitstring
24416 (package
24417 (name "python-bitstring")
24418 (version "3.1.7")
24419 (source
24420 (origin
24421 (method url-fetch)
24422 (uri (pypi-uri "bitstring" version))
24423 (sha256
24424 (base32
24425 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
24426 (build-system python-build-system)
24427 (arguments
24428 `(#:phases
24429 (modify-phases %standard-phases
24430 (replace 'check
24431 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
24432 (when tests?
24433 (add-installed-pythonpath inputs outputs)
24434 (with-directory-excursion "test"
24435 (invoke "pytest")))
24436 #t)))))
24437 (native-inputs
24438 `(("python-pytest" ,python-pytest)))
24439 (home-page "https://github.com/scott-griffiths/bitstring")
24440 (synopsis
24441 "Simple construction, analysis and modification of binary data")
24442 (description
24443 "Bitstring is a library for simple construction, analysis and modification
24444 of binary data.")
24445 (license license:expat)))
24446
24447 (define-public python-confuse
24448 (package
24449 (name "python-confuse")
24450 (version "1.4.0")
24451 (source
24452 (origin
24453 (method url-fetch)
24454 (uri (pypi-uri "confuse" version))
24455 (sha256
24456 (base32
24457 "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j"))))
24458 (build-system python-build-system)
24459 (propagated-inputs
24460 `(("python-pathlib" ,python-pathlib)
24461 ("python-pyyaml" ,python-pyyaml)))
24462 (home-page "https://github.com/beetbox/confuse")
24463 (synopsis "Painless YAML configuration.")
24464 (description "Confuse is a configuration library for Python that uses
24465 YAML. It takes care of defaults, overrides, type checking, command-line
24466 integration, human-readable errors, and standard OS-specific locations.")
24467 (license license:expat)))
24468
24469 (define-public python-reflink
24470 (package
24471 (name "python-reflink")
24472 (version "0.2.1")
24473 (source
24474 (origin
24475 (method url-fetch)
24476 (uri (pypi-uri "reflink" version))
24477 (sha256
24478 (base32
24479 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
24480 (build-system python-build-system)
24481 (arguments
24482 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
24483 (propagated-inputs
24484 `(("python-cffi" ,python-cffi)))
24485 (native-inputs
24486 `(("python-pytest" ,python-pytest)
24487 ("python-pytest-runner" ,python-pytest-runner)))
24488 (home-page "https://gitlab.com/rubdos/pyreflink")
24489 (synopsis "Python wrapper around reflink system call")
24490 (description
24491 "Python reflink wraps around platform specific @code{reflink}
24492 implementations.")
24493 (license license:expat)))
24494
24495 (define-public python-pivy
24496 (package
24497 (name "python-pivy")
24498 (version "0.6.5")
24499 (source
24500 (origin
24501 (method git-fetch)
24502 (uri (git-reference
24503 (url "https://github.com/coin3d/pivy")
24504 (commit version)))
24505 (file-name (git-file-name name version))
24506 (sha256
24507 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
24508 (build-system python-build-system)
24509 (arguments
24510 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
24511 #:tests? #f
24512 #:phases
24513 (modify-phases %standard-phases
24514 (add-after 'unpack 'patch-cmake-include-dirs
24515 (lambda _
24516 ;; Patch buildsystem to respect Coin3D include directory
24517 (substitute* "CMakeLists.txt"
24518 (("\\$\\{SoQt_INCLUDE_DIRS}")
24519 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
24520 #t)))))
24521 (native-inputs
24522 `(("cmake" ,cmake)
24523 ("swig" ,swig)))
24524 (inputs
24525 `(("python-wrapper" ,python-wrapper)
24526 ("qtbase" ,qtbase)
24527 ("libxi" ,libxi)
24528 ("libice" ,libice)
24529 ("soqt" ,soqt)
24530 ("glew" ,glew)
24531 ("coin3D" ,coin3D-4)))
24532 (home-page "https://github.com/coin3d/pivy")
24533 (synopsis "Python bindings to Coin3D")
24534 (description
24535 "Pivy provides python bindings for Coin, a 3D graphics library with an
24536 Application Programming Interface based on the Open Inventor 2.1 API.")
24537 (license license:isc)))
24538
24539 (define-public python-crayons
24540 (package
24541 (name "python-crayons")
24542 (version "0.4.0")
24543 (source
24544 (origin
24545 (method url-fetch)
24546 (uri (pypi-uri "crayons" version))
24547 (sha256
24548 (base32
24549 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
24550 (build-system python-build-system)
24551 (propagated-inputs
24552 `(("python-colorama" ,python-colorama)))
24553 (home-page "https://github.com/MasterOdin/crayons")
24554 (synopsis "TextUI colors for Python")
24555 (description "This package gives you colored strings for the terminal.
24556 Crayons automatically wraps a given string in the foreground color and
24557 restores the original state after the string is printed.")
24558 (license license:expat)))
24559
24560 (define-public python-sane
24561 (package
24562 (name "python-sane")
24563 (version "2.9.1")
24564 (source
24565 (origin
24566 (method url-fetch)
24567 (uri (pypi-uri name version))
24568 (sha256
24569 (base32
24570 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
24571 (build-system python-build-system)
24572 (native-inputs
24573 `(("python-pytest" ,python-pytest)))
24574 (inputs
24575 `(("sane-backends" ,sane-backends)))
24576 (home-page "https://github.com/python-pillow/Sane")
24577 (synopsis "Python interface to the SANE scanner")
24578 (description "This package provides Python interface to the SANE scanner
24579 and frame grabber interface.")
24580 (license (license:non-copyleft
24581 ;; Yet another variant of the X/MIT license.
24582 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
24583
24584 (define-public python-screenkey
24585 (package
24586 (name "python-screenkey")
24587 (version "1.4")
24588 (source
24589 (origin
24590 (method git-fetch)
24591 (uri (git-reference
24592 (url "https://gitlab.com/screenkey/screenkey")
24593 (commit (string-append "v" version))))
24594 (file-name (git-file-name name version))
24595 (sha256
24596 (base32
24597 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
24598 (build-system python-build-system)
24599 (arguments
24600 `(#:phases
24601 (modify-phases %standard-phases
24602 (add-after 'unpack 'fix-dlopen-paths
24603 (lambda* (#:key inputs outputs #:allow-other-keys)
24604 (let* ((x11 (assoc-ref inputs "libx11"))
24605 (xtst (assoc-ref inputs "libxtst")))
24606 (substitute* "Screenkey/xlib.py"
24607 (("libX11.so.6")
24608 (string-append x11 "/lib/libX11.so.6")))
24609 (substitute* "Screenkey/xlib.py"
24610 (("libXtst.so.6")
24611 (string-append xtst "/lib/libXtst.so.6")))
24612 #t)))
24613 (add-after 'install 'wrap-screenkey
24614 (lambda* (#:key outputs #:allow-other-keys)
24615 (wrap-program
24616 (string-append (assoc-ref outputs "out") "/bin/screenkey")
24617 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
24618 `("GI_TYPELIB_PATH"
24619 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
24620 #t)))))
24621 (inputs
24622 `(("python-distutils-extra" ,python-distutils-extra)
24623 ("python-tokenize-rt" ,python-tokenize-rt)
24624 ("libx11" ,libx11)
24625 ("libxtst" ,libxtst)
24626 ("gtk+" ,gtk+)
24627 ("python-pygobject" ,python-pygobject)
24628 ("python-pycairo" ,python-pycairo)
24629 ("python-setuptools-git" ,python-setuptools-git)
24630 ("python-babel" ,python-babel)))
24631 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
24632 (synopsis
24633 "Screencast tool to display pressed keys")
24634 (description
24635 "A screencast tool to display your keys inspired by Screenflick.")
24636 (license license:gpl3+)))
24637
24638 (define-public python-jinja2-cli
24639 (package
24640 (name "python-jinja2-cli")
24641 (version "0.7.0")
24642 (source
24643 (origin
24644 (method url-fetch)
24645 (uri (pypi-uri "jinja2-cli" version))
24646 (sha256
24647 (base32
24648 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
24649 (build-system python-build-system)
24650 (propagated-inputs
24651 `(("python-jinja2" ,python-jinja2)))
24652 (native-inputs
24653 `(("python-flake8" ,python-flake8)
24654 ("python-jinja2" ,python-jinja2)
24655 ("python-pytest" ,python-pytest)))
24656 (home-page "https://github.com/mattrobenolt/jinja2-cli")
24657 (synopsis "Command-line interface to Jinja2")
24658 (description
24659 "This package provides a command-line interface (CLI) to the Jinja2
24660 template engine.")
24661 (license license:bsd-3)))
24662
24663 (define-public python-readability
24664 (package
24665 (name "python-readability")
24666 (version "0.3.1")
24667 (source
24668 (origin
24669 (method url-fetch)
24670 (uri (pypi-uri "readability" version))
24671 (sha256
24672 (base32
24673 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
24674 (build-system python-build-system)
24675 (home-page
24676 "https://github.com/andreasvc/readability/")
24677 (synopsis
24678 "Measure the readability of a given text using surface
24679 characteristics")
24680 (description
24681 "This package provides a Python library that is an implementation of
24682 traditional readability measures based on simple surface
24683 characteristics. These measures are basically linear regressions based on the
24684 number of words, syllables, and sentences.")
24685 (license license:asl2.0)))
24686
24687 (define-public python-listparser
24688 (package
24689 (name "python-listparser")
24690 (version "0.18")
24691 (source
24692 (origin
24693 (method url-fetch)
24694 (uri (pypi-uri "listparser" version))
24695 (sha256
24696 (base32
24697 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
24698 (build-system python-build-system)
24699 (home-page
24700 "https://github.com/kurtmckee/listparser")
24701 (synopsis
24702 "Parse subscription lists in Python")
24703 (description
24704 "This package provides a Python library that can parse OPML, FOAF, and
24705 iGoogle subscription lists.")
24706 (license license:expat)))
24707
24708 (define-public python-smartypants
24709 (package
24710 (name "python-smartypants")
24711 (version "2.0.1")
24712 (source
24713 (origin
24714 ;; There's no source tarball for 2.0.1 on PyPI.
24715 (method git-fetch)
24716 (uri (git-reference
24717 (url "https://github.com/leohemsted/smartypants.py")
24718 (commit (string-append "v" version))))
24719 (file-name (git-file-name name version))
24720 (sha256
24721 (base32 "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"))))
24722 (build-system python-build-system)
24723 (arguments
24724 '(#:phases
24725 (modify-phases %standard-phases
24726 (replace 'check
24727 ;; Its `setup.py test` doesn't report failure with exit status, so
24728 ;; we use `nose` instead.
24729 (lambda _
24730 (invoke "nosetests" "-v" "--exclude=^load_tests$"))))))
24731 (native-inputs
24732 ;; For tests.
24733 `(("python-docutils" ,python-docutils)
24734 ("python-nose" ,python-nose)
24735 ("python-pygments" ,python-pygments)))
24736 (home-page "https://github.com/leohemsted/smartypants.py")
24737 (synopsis "Translate punctuation characters into smart quotes")
24738 (description
24739 "@command{smartpants} can perform the following transformations:
24740 @enumerate
24741 @item Straight quotes ( \" and ' ) into \"curly\" quote HTML entities
24742 @item Backticks-style quotes (``like this'') into \"curly\" quote HTML
24743 entities
24744 @item Dashes (-- and ---) into en- and em-dash entities
24745 @item Three consecutive dots (... or . . .) into an ellipsis entity
24746 @end enumerate")
24747 (license license:bsd-3)))
24748
24749 (define-public python-typogrify
24750 (package
24751 (name "python-typogrify")
24752 (version "2.0.7")
24753 (source (origin
24754 (method url-fetch)
24755 (uri (pypi-uri "typogrify" version))
24756 (sha256
24757 (base32
24758 "0f6b2gnnxjbx1fbmkcscc6qjr4hi78kwm1wx4b766ha3va66dr4b"))))
24759 (build-system python-build-system)
24760 (arguments
24761 '(#:phases
24762 (modify-phases %standard-phases
24763 (replace 'check
24764 (lambda _
24765 (invoke "nosetests" "-v"))))))
24766 (propagated-inputs
24767 `(("python-smartypants" ,python-smartypants)))
24768 (native-inputs
24769 ;; For tests.
24770 `(("python-nose" ,python-nose)))
24771 (home-page "https://github.com/mintchaos/typogrify")
24772 (synopsis "Filters to transform text into typographically-improved HTML")
24773 (description
24774 "@code{typogrify} provides a set of custom filters that automatically
24775 apply various transformations to plain text in order to yield
24776 typographically-improved HTML. While often used in conjunction with Jinja and
24777 Django template systems, the filters can be used in any environment.")
24778 (license license:bsd-3)))
24779
24780 (define-public python-ld
24781 (package
24782 (name "python-ld")
24783 (version "0.5.0")
24784 (source
24785 (origin
24786 (method url-fetch)
24787 (uri (pypi-uri "ld" version))
24788 (sha256
24789 (base32
24790 "1k4ydp5rgkv4985v459kcl06i1igjm1ywvh2vkbi9ck1zyyri1z5"))))
24791 (build-system python-build-system)
24792 (propagated-inputs
24793 `(("python-six" ,python-six)))
24794 (home-page "https://github.com/nir0s/ld")
24795 (synopsis "OS platform information API")
24796 (description
24797 "The ld package provides information about the GNU/Linux distribution it
24798 runs on, such as a reliable machine-readable ID, or version information.")
24799 (license license:asl2.0)))
24800
24801 (define-public python-quicktions
24802 (package
24803 (name "python-quicktions")
24804 (version "1.11")
24805 (source
24806 (origin
24807 (method url-fetch)
24808 (uri (pypi-uri "quicktions" version))
24809 (sha256
24810 (base32
24811 "1px21a6x527i1bsr2p6bbf3jziqpvd1vjkvvzh13gsy4iip0yvzn"))
24812 (modules '((guix build utils)))
24813 (snippet
24814 '(begin
24815 ;; This file is generated by Cython.
24816 (delete-file "src/quicktions.c") #t))))
24817 (build-system python-build-system)
24818 (arguments
24819 `(#:phases
24820 (modify-phases %standard-phases
24821 (add-before 'build 'cythonize-sources
24822 (lambda _
24823 (with-directory-excursion "src"
24824 (invoke "cython" "quicktions.pyx"))))
24825 (replace 'check
24826 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
24827 (when tests?
24828 (add-installed-pythonpath inputs outputs)
24829 (invoke "pytest"))
24830 #t)))))
24831 (native-inputs
24832 `(("python-cython" ,python-cython)
24833 ("python-pytest" ,python-pytest)))
24834 (home-page "https://github.com/scoder/quicktions")
24835 (synopsis "Fast fractions data type for rational numbers")
24836 (description
24837 "This package provides fast fractions data type for rational numbers. It
24838 is the cythonized version of @code{fractions.Fraction}.")
24839 (license license:psfl)))
24840
24841 (define-public python-pathvalidate
24842 (package
24843 (name "python-pathvalidate")
24844 (version "2.4.1")
24845 (source
24846 (origin
24847 (method url-fetch)
24848 (uri (pypi-uri "pathvalidate" version))
24849 (sha256
24850 (base32 "0s14ycjgb44lxr2wg8lrq3b7kybmmrbf7yqz47xrqgn2gr6dk6rw"))))
24851 (build-system python-build-system)
24852 (arguments
24853 '(#:tests? #f))
24854 ;; Tests disabled because of circular dependencies.
24855 ;; pathvalidate tests depend on pytest-md-report, which
24856 ;; depends on pathvalidate.
24857 (native-inputs
24858 `(("python-allpairspy" ,python-allpairspy)
24859 ("python-click" ,python-click)
24860 ("python-faker" ,python-faker)
24861 ("python-pytest" ,python-pytest)))
24862 (home-page "https://github.com/thombashi/pathvalidate")
24863 (synopsis "Sanitize strings representing paths")
24864 (description
24865 "@code{pathvalidate} is a Python library to sanitize/validate strings
24866 representing paths or filenames.")
24867 (license license:expat)))