gnu: Add python-click-default-group.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 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 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
32 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
33 ;;; Copyright © 2016, 2017, 2018, 2020, 2021 Julien Lepiller <julien@lepiller.eu>
34 ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
35 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
36 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
37 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
38 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
39 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
40 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
41 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
42 ;;; Copyright © 2017, 2020 Roel Janssen <roel@gnu.org>
43 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
45 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
46 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
47 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
48 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
49 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
50 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
51 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
52 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
53 ;;; Copyright © 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
54 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
55 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
56 ;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
57 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
58 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
59 ;;; Copyright © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
60 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
72 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
73 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
74 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
75 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
76 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
77 ;;; Copyright © 2020, 2021 Alexandros Theodotou <alex@zrythm.org>
78 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
79 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
80 ;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
81 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
82 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
83 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
84 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
85 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
86 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
87 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
88 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
89 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
90 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
91 ;;; Copyright © 2020 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.com>
92 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
93 ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
94 ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
95 ;;; Copyright © 2019 Kristian Trandem <kristian@devup.no>
96 ;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com>
97 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
98 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
99 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
100 ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
101 ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
102 ;;;
103 ;;; This file is part of GNU Guix.
104 ;;;
105 ;;; GNU Guix is free software; you can redistribute it and/or modify it
106 ;;; under the terms of the GNU General Public License as published by
107 ;;; the Free Software Foundation; either version 3 of the License, or (at
108 ;;; your option) any later version.
109 ;;;
110 ;;; GNU Guix is distributed in the hope that it will be useful, but
111 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
112 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
113 ;;; GNU General Public License for more details.
114 ;;;
115 ;;; You should have received a copy of the GNU General Public License
116 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
117
118 (define-module (gnu packages python-xyz)
119 #:use-module ((guix licenses) #:prefix license:)
120 #:use-module (gnu packages)
121 #:use-module (gnu packages algebra)
122 #:use-module (gnu packages adns)
123 #:use-module (gnu packages aidc)
124 #:use-module (gnu packages attr)
125 #:use-module (gnu packages backup)
126 #:use-module (gnu packages bash)
127 #:use-module (gnu packages check)
128 #:use-module (gnu packages cmake)
129 #:use-module (gnu packages compression)
130 #:use-module (gnu packages crypto)
131 #:use-module (gnu packages databases)
132 #:use-module (gnu packages dbm)
133 #:use-module (gnu packages djvu)
134 #:use-module (gnu packages docker)
135 #:use-module (gnu packages enchant)
136 #:use-module (gnu packages file)
137 #:use-module (gnu packages fontutils)
138 #:use-module (gnu packages gcc)
139 #:use-module (gnu packages geo)
140 #:use-module (gnu packages ghostscript)
141 #:use-module (gnu packages gl)
142 #:use-module (gnu packages glib)
143 #:use-module (gnu packages gnome)
144 #:use-module (gnu packages gnupg)
145 #:use-module (gnu packages graphviz)
146 #:use-module (gnu packages graphics)
147 #:use-module (gnu packages gsasl)
148 #:use-module (gnu packages gstreamer)
149 #:use-module (gnu packages gtk)
150 #:use-module (gnu packages haskell-xyz)
151 #:use-module (gnu packages icu4c)
152 #:use-module (gnu packages image)
153 #:use-module (gnu packages imagemagick)
154 #:use-module (gnu packages kerberos)
155 #:use-module (gnu packages libevent)
156 #:use-module (gnu packages libffi)
157 #:use-module (gnu packages libidn)
158 #:use-module (gnu packages linux)
159 #:use-module (gnu packages llvm)
160 #:use-module (gnu packages man)
161 #:use-module (gnu packages markup)
162 #:use-module (gnu packages maths)
163 #:use-module (gnu packages monitoring)
164 #:use-module (gnu packages multiprecision)
165 #:use-module (gnu packages networking)
166 #:use-module (gnu packages ncurses)
167 #:use-module (gnu packages openstack)
168 #:use-module (gnu packages pcre)
169 #:use-module (gnu packages pdf)
170 #:use-module (gnu packages perl)
171 #:use-module (gnu packages photo)
172 #:use-module (gnu packages pkg-config)
173 #:use-module (gnu packages python)
174 #:use-module (gnu packages python-build)
175 #:use-module (gnu packages python-check)
176 #:use-module (gnu packages python-compression)
177 #:use-module (gnu packages python-crypto)
178 #:use-module (gnu packages python-science)
179 #:use-module (gnu packages python-web)
180 #:use-module (gnu packages qt)
181 #:use-module (gnu packages rdf)
182 #:use-module (gnu packages readline)
183 #:use-module (gnu packages sdl)
184 #:use-module (gnu packages search)
185 #:use-module (gnu packages scanner)
186 #:use-module (gnu packages shells)
187 #:use-module (gnu packages sphinx)
188 #:use-module (gnu packages ssh)
189 #:use-module (gnu packages swig)
190 #:use-module (gnu packages terminals)
191 #:use-module (gnu packages tex)
192 #:use-module (gnu packages texinfo)
193 #:use-module (gnu packages textutils)
194 #:use-module (gnu packages time)
195 #:use-module (gnu packages tls)
196 #:use-module (gnu packages version-control)
197 #:use-module (gnu packages video)
198 #:use-module (gnu packages web)
199 #:use-module (gnu packages wxwidgets)
200 #:use-module (gnu packages base)
201 #:use-module (gnu packages xml)
202 #:use-module (gnu packages xorg)
203 #:use-module (gnu packages xdisorg)
204 #:use-module (gnu packages tcl)
205 #:use-module (gnu packages bdw-gc)
206 #:use-module (gnu packages serialization)
207 #:use-module (guix packages)
208 #:use-module (guix download)
209 #:use-module (guix git-download)
210 #:use-module (guix hg-download)
211 #:use-module (guix utils)
212 #:use-module (guix build-system gnu)
213 #:use-module (guix build-system cmake)
214 #:use-module (guix build-system python)
215 #:use-module (guix build-system trivial)
216 #:use-module (srfi srfi-1)
217 #:use-module (srfi srfi-26))
218
219 (define-public python-slixmpp
220 (package
221 (name "python-slixmpp")
222 (version "1.5.2")
223 (source
224 (origin
225 (method git-fetch)
226 (uri
227 (git-reference
228 (url "https://lab.louiz.org/poezio/slixmpp.git")
229 (commit
230 (string-append "slix-" version))))
231 (file-name
232 (git-file-name name version))
233 (sha256
234 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
235 (build-system python-build-system)
236 (arguments
237 `(#:phases
238 (modify-phases %standard-phases
239 (add-after 'unpack 'patch
240 (lambda _
241 (substitute* "setup.py"
242 (("'CC', 'cc'")
243 "'CC', 'gcc'"))
244 #t)))))
245 (native-inputs
246 `(("cython" ,python-cython)
247 ("gnupg" ,gnupg)
248 ("pkg-config" ,pkg-config)))
249 (propagated-inputs
250 `(("python-aiodns" ,python-aiodns)
251 ("python-aiohttp" ,python-aiohttp)
252 ("python-pyasn1" ,python-pyasn1)
253 ("python-pyasn1-modules" ,python-pyasn1-modules)))
254 (inputs
255 `(("libidn" ,libidn)
256 ("python" ,python))) ; We are building a Python extension.
257 (synopsis "XMPP library without threads")
258 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
259 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
260 socket handling, the timers, the events dispatching) in order to remove all
261 threads.")
262 (home-page "https://lab.louiz.org/poezio/slixmpp")
263 (license license:expat)))
264
265 (define-public python-tenacity
266 (package
267 (name "python-tenacity")
268 (version "6.1.0")
269 (source (origin
270 (method url-fetch)
271 (uri (pypi-uri "tenacity" version))
272 (sha256
273 (base32
274 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
275 (build-system python-build-system)
276 (native-inputs
277 `(("python-setuptools-scm" ,python-setuptools-scm)
278 ("python-sphinx" ,python-sphinx)
279 ("python-tornado" ,python-tornado)
280 ("python-pytest" ,python-pytest)))
281 (propagated-inputs
282 `(("python-six" ,python-six)))
283 (arguments
284 `(#:phases (modify-phases %standard-phases
285 (replace 'check
286 (lambda _
287 (invoke "pytest")
288 #t)))))
289 (home-page "https://github.com/jd/tenacity")
290 (synopsis "Retrying library for python")
291 (description "Tenacity is a general-purpose python library to simplify the
292 task of adding retry behavior to just about anything.")
293 (license license:asl2.0)))
294
295 (define-public python-pytelegrambotapi
296 (package
297 (name "python-pytelegrambotapi")
298 (version "3.7.4")
299 (source
300 (origin
301 (method git-fetch)
302 (uri (git-reference
303 (url "https://github.com/eternnoir/pyTelegramBotAPI")
304 (commit version)))
305 (file-name (git-file-name name version))
306 (sha256
307 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
308 (build-system python-build-system)
309 (arguments
310 `(#:phases
311 (modify-phases %standard-phases
312 (replace 'check
313 (lambda* (#:key tests? #:allow-other-keys)
314 (when tests?
315 (with-directory-excursion "tests"
316 (invoke "py.test")))
317 #t)))))
318 (propagated-inputs
319 `(("python-requests" ,python-requests)))
320 (native-inputs
321 `(("python-pytest" ,python-pytest)))
322 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
323 (synopsis "Python Telegram bot api")
324 (description "This package provides a simple, but extensible Python
325 implementation for the Telegram Bot API.")
326 (license license:gpl2)))
327
328 (define-public python-colorlog
329 (package
330 (name "python-colorlog")
331 (version "4.1.0")
332 (source (origin
333 (method url-fetch)
334 (uri (pypi-uri "colorlog" version))
335 (sha256
336 (base32
337 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
338 (build-system python-build-system)
339 (native-inputs
340 `(("python-pytest" ,python-pytest)))
341 (arguments
342 `(#:phases (modify-phases %standard-phases
343 (replace 'check
344 (lambda _
345 ;; Extend PYTHONPATH so the built package will be found.
346 (setenv "PYTHONPATH"
347 (string-append (getcwd) "/build/lib:"
348 (getenv "PYTHONPATH")))
349 (invoke "pytest" "-p" "no:logging")
350 #t)))))
351 (home-page "https://github.com/borntyping/python-colorlog")
352 (synopsis "Log formatting with colors for python")
353 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
354 with Python's logging module that outputs records using terminal colors.")
355 (license license:expat)))
356
357 (define-public python-pyprind
358 (package
359 (name "python-pyprind")
360 (version "2.11.2")
361 (source (origin
362 (method url-fetch)
363 (uri (pypi-uri "PyPrind" version))
364 (sha256
365 (base32
366 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
367 (build-system python-build-system)
368 (propagated-inputs
369 `(("python-psutil" ,python-psutil)))
370 (home-page "https://github.com/rasbt/pyprind")
371 (synopsis "Python Progress Bar and Percent Indicator Utility")
372 (description "The PyPrind (Python Progress Indicator) module provides a
373 progress bar and a percentage indicator object that let you track the progress
374 of a loop structure or other iterative computation.")
375 (license license:bsd-3)))
376
377 (define-public python-gphoto2
378 (package
379 (name "python-gphoto2")
380 (version "2.2.1")
381 (source (origin
382 (method url-fetch)
383 (uri (pypi-uri "gphoto2" version))
384 (sha256
385 (base32
386 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
387 (build-system python-build-system)
388 (native-inputs
389 `(("pkg-config" ,pkg-config)))
390 (inputs
391 `(("libgphoto2" ,libgphoto2)))
392 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
393 (synopsis "Python interface to libgphoto2")
394 (description "@code{python-gphoto2} is a comprehensive Python interface
395 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
396 automatically generate the interface code.")
397 (license license:gpl3+)))
398
399 (define-public python-colour
400 (package
401 (name "python-colour")
402 (version "0.1.5")
403 (source (origin
404 (method url-fetch)
405 (uri (pypi-uri "colour" version))
406 (sha256
407 (base32
408 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
409 (build-system python-build-system)
410 (native-inputs
411 `(("python-d2to1" ,python-d2to1)))
412 (home-page "https://github.com/vaab/colour")
413 (synopsis "Convert and manipulate various color representations")
414 (description "Pythonic way to manipulate color representations (HSL, RVB,
415 web, X11, ...).")
416 (license license:expat)))
417
418 (define-public python-d2to1
419 (package
420 (name "python-d2to1")
421 (version "0.2.12.post1")
422 (source (origin
423 (method url-fetch)
424 (uri (pypi-uri "d2to1" version))
425 (sha256
426 (base32
427 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
428 (build-system python-build-system)
429 (native-inputs
430 `(("python-nose" ,python-nose)))
431 (home-page "https://github.com/embray/d2to1")
432 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
433 in python")
434 (description "The python package d2to1 (the d is for distutils) allows
435 using distutils2-like setup.cfg files for a package's metadata with a
436 distribute/setuptools setup.py script.")
437 (license license:bsd-2)))
438
439 (define-public python-rawkit
440 (package
441 (name "python-rawkit")
442 (version "0.6.0")
443 (source (origin
444 (method url-fetch)
445 (uri (pypi-uri "rawkit" version))
446 (sha256
447 (base32
448 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
449 (build-system python-build-system)
450 (native-inputs
451 `(("python-pytest" ,python-pytest)
452 ("python-mock" ,python-mock)))
453 (inputs
454 `(("libraw" ,libraw)))
455 (home-page "https://rawkit.readthedocs.io")
456 (synopsis "Ctypes-based LibRaw binding for Python")
457 (description "The rawkit package provides two modules: rawkit and libraw.
458 The rawkit module provides a high-level Pythonic interface for developing raw
459 photos, while the libraw module provides a CTypes based interface for
460 interacting with the low-level LibRaw C APIs.")
461 (license license:expat)))
462
463 (define-public python-easygui
464 (package
465 (name "python-easygui")
466 (version "0.98.1")
467 (source (origin
468 (method url-fetch)
469 (uri (pypi-uri "easygui" version))
470 (sha256
471 (base32
472 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
473 (build-system python-build-system)
474 (propagated-inputs
475 `(("python-tkinter" ,python "tk")))
476 (home-page "https://github.com/robertlugg/easygui")
477 (synopsis "GUI programming module for Python")
478 (description "EasyGUI is a module for very simple, very easy GUI
479 programming in Python. EasyGUI is different from other GUI generators in that
480 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
481 simple function calls.")
482 (license license:bsd-3)))
483
484 (define-public python-pymd4c
485 (package
486 (name "python-pymd4c")
487 (version "0.4.6.0b1")
488 (source
489 (origin
490 (method url-fetch)
491 (uri (pypi-uri "pymd4c" version))
492 (sha256
493 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
494 (build-system python-build-system)
495 (inputs
496 `(("md4c" ,md4c)))
497 (native-inputs
498 `(("python-flake8" ,python-flake8)
499 ("python-pkgconfig" ,python-pkgconfig)
500 ("pkg-config" ,pkg-config)))
501 (home-page "https://github.com/dominickpastore/pymd4c")
502 (synopsis "Python bindings for MD4C")
503 (description
504 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
505 to CommonMark.")
506 (license license:expat)))
507
508 (define-public python-pymediainfo
509 (package
510 (name "python-pymediainfo")
511 (version "4.1")
512 (source
513 (origin
514 (method url-fetch)
515 (uri (pypi-uri "pymediainfo" version))
516 (sha256
517 (base32
518 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
519 (build-system python-build-system)
520 (native-inputs
521 `(("python-setuptools-scm" ,python-setuptools-scm)
522 ("python-pytest" ,python-pytest)))
523 (inputs
524 `(("libmediainfo" ,libmediainfo)))
525 (arguments
526 `(#:phases
527 (modify-phases %standard-phases
528 (add-after 'unpack 'patch-libmediainfo
529 (lambda _
530 (substitute* "pymediainfo/__init__.py"
531 (("libmediainfo.so.0")
532 (string-append (assoc-ref %build-inputs "libmediainfo")
533 "/lib/libmediainfo.so.0")))
534 #t))
535 (replace 'check
536 (lambda _
537 ;; Extend PYTHONPATH so the built package will be found.
538 (setenv "PYTHONPATH"
539 (string-append (getcwd) "/build/lib:"
540 (getenv "PYTHONPATH")))
541 ;; Skip the only failing test "test_parse_url"
542 (invoke "pytest" "-vv" "-k" "not test_parse_url")
543 #t)))))
544 (home-page
545 "https://github.com/sbraz/pymediainfo")
546 (synopsis
547 "Python wrapper for the mediainfo library")
548 (description
549 "Python wrapper for the mediainfo library to access the technical and tag
550 data for video and audio files.")
551 (license license:expat)))
552
553 (define-public python-psutil
554 (package
555 (name "python-psutil")
556 (version "5.8.0")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "psutil" version))
561 (sha256
562 (base32 "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c"))))
563 (build-system python-build-system)
564 (arguments
565 ;; FIXME: some tests do not return and time out. Some tests fail because
566 ;; some processes survive kill().
567 '(#:tests? #f))
568 (home-page "https://github.com/giampaolo/psutil")
569 (synopsis "Library for retrieving information on running processes")
570 (description
571 "@code{psutil} (Python system and process utilities) is a library for
572 retrieving information on running processes and system utilization (CPU,
573 memory, disks, network) in Python. It is useful mainly for system monitoring,
574 profiling and limiting process resources and management of running processes.
575 It implements many functionalities offered by command line tools such as: ps,
576 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
577 iotop, uptime, pidof, tty, taskset, pmap.")
578 (properties `((python2-variant . ,(delay python2-psutil))))
579 (license license:bsd-3)))
580
581 (define-public python2-psutil
582 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
583 (package
584 (inherit base)
585 (propagated-inputs
586 `(("python2-enum34" ,python2-enum34) ;optional
587 ,@(package-propagated-inputs base))))))
588
589 (define-public python-shapely
590 (package
591 (name "python-shapely")
592 (version "1.7.1")
593 (source
594 (origin
595 (method url-fetch)
596 (uri (pypi-uri "Shapely" version))
597 (sha256
598 (base32
599 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
600 (modules '((guix build utils)))
601 (snippet
602 '(begin
603 (delete-file "shapely/speedups/_speedups.c")
604 (delete-file "shapely/vectorized/_vectorized.c")
605 #t))))
606 (build-system python-build-system)
607 (native-inputs
608 `(("python-cython" ,python-cython)
609 ("python-matplotlib" ,python-matplotlib)
610 ("python-pytest" ,python-pytest)
611 ("python-pytest-cov" ,python-pytest-cov)))
612 (inputs
613 `(("geos" ,geos)))
614 (propagated-inputs
615 `(("python-numpy" ,python-numpy)))
616 (arguments
617 `(#:phases
618 (modify-phases %standard-phases
619 (add-after 'unpack 'patch-geos-path
620 (lambda* (#:key inputs #:allow-other-keys)
621 (let ((geos (assoc-ref inputs "geos"))
622 (glibc (assoc-ref inputs ,(if (%current-target-system)
623 "cross-libc" "libc"))))
624 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
625 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
626 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
627 geos "/lib/libgeos_c.so'])"))
628 (("free = load_dll\\('c'\\)\\.free")
629 (string-append "free = load_dll('c', fallbacks=['"
630 glibc "/lib/libc.so.6']).free"))
631 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
632 (string-append "free = load_dll('c', fallbacks=['"
633 glibc "/lib/libc.so.6']).free"))))
634 #t)))))
635 (home-page "https://github.com/Toblerity/Shapely")
636 (synopsis "Library for the manipulation and analysis of geometric objects")
637 (description "Shapely is a Python package for manipulation and analysis of
638 planar geometric objects. It is based on the @code{GEOS} library.")
639 (license license:bsd-3)))
640
641 (define-public python-shortuuid
642 (package
643 (name "python-shortuuid")
644 (version "0.5.0")
645 (source
646 (origin
647 (method url-fetch)
648 (uri (pypi-uri "shortuuid" version))
649 (sha256
650 (base32
651 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
652 (build-system python-build-system)
653 (native-inputs
654 `(("python-pep8" ,python-pep8)))
655 (home-page "https://github.com/skorokithakis/shortuuid")
656 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
657 (description
658 "@code{shortuuid} is a Python library for generating concise, unambiguous
659 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
660 module and then similar looking characters are removed.")
661 (license license:bsd-3)))
662
663 (define-public python-logwrap
664 (package
665 (name "python-logwrap")
666 (version "8.2.0.post0")
667 (source
668 (origin
669 (method url-fetch)
670 (uri (pypi-uri "logwrap" version))
671 (sha256
672 (base32
673 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
674 (build-system python-build-system)
675 (arguments
676 `(#:tests? #f ; Tests not included in pypi release.
677 #:phases
678 (modify-phases %standard-phases
679 (replace 'check
680 (lambda* (#:key tests? #:allow-other-keys)
681 (when tests?
682 (invoke "pytest"))
683 #t)))))
684 (native-inputs
685 `(("python-cython" ,python-cython)
686 ("python-pytest" ,python-pytest)
687 ("python-setuptools-scm" ,python-setuptools-scm)
688 ("python-toml" ,python-toml)
689 ("python-wheel" ,python-wheel)))
690 (home-page "https://github.com/python-useful-helpers/logwrap")
691 (synopsis "Decorator for logging function arguments")
692 (description "This package provides a decorator to log function arguments
693 and function call return values in a human-readable way.")
694 (license license:asl2.0)))
695
696 (define-public python2-shapely
697 (package-with-python2 python-shapely))
698
699 (define-public python-clyent
700 (package
701 (name "python-clyent")
702 (version "1.2.1")
703 (source
704 (origin
705 (method url-fetch)
706 (uri (pypi-uri "clyent" version))
707 (sha256
708 (base32
709 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
710 (build-system python-build-system)
711 (native-inputs
712 `(("python-mock" ,python-mock)))
713 (home-page "https://github.com/Anaconda-Platform/clyent")
714 (synopsis "Command line client library")
715 (description "Clyent is a Python command line utility library. It is used
716 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
717 (license license:bsd-3)))
718
719 (define-public python2-clyent
720 (package-with-python2 python-clyent))
721
722 (define-public python-babel
723 (package
724 (name "python-babel")
725 (version "2.9.0")
726 (source
727 (origin
728 (method url-fetch)
729 (uri (pypi-uri "Babel" version))
730 (sha256
731 (base32
732 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
733 (build-system python-build-system)
734 (native-inputs
735 `(("python-freezegun" ,python-freezegun)
736 ("python-pytest" ,python-pytest)))
737 (propagated-inputs
738 `(("python-pytz" ,python-pytz)))
739 (arguments
740 `(#:phases (modify-phases %standard-phases
741 (replace 'check
742 (lambda _
743 (invoke "pytest" "-vv"))))))
744 (home-page "http://babel.pocoo.org/")
745 (synopsis
746 "Tools for internationalizing Python applications")
747 (description
748 "Babel is composed of two major parts:
749 - tools to build and work with gettext message catalogs
750 - a Python interface to the CLDR (Common Locale Data Repository), providing
751 access to various locale display names, localized number and date formatting,
752 etc. ")
753 (license license:bsd-3)))
754
755 (define-public python2-babel
756 (package-with-python2 python-babel))
757
758 (define-public python2-backport-ssl-match-hostname
759 (package
760 (name "python2-backport-ssl-match-hostname")
761 (version "3.5.0.1")
762 (source
763 (origin
764 (method url-fetch)
765 (uri (pypi-uri "backports.ssl_match_hostname" version))
766 (sha256
767 (base32
768 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
769 (build-system python-build-system)
770 (arguments
771 `(#:python ,python-2
772 #:tests? #f)) ; no test target
773 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
774 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
775 (description
776 "This backport brings the ssl.match_hostname() function to users of
777 earlier versions of Python. The function checks the hostname in the
778 certificate returned by the server to which a connection has been established,
779 and verifies that it matches the intended target hostname.")
780 (license license:psfl)))
781
782 (define-public python-bitarray
783 (package
784 (name "python-bitarray")
785 (version "1.4.0")
786 (source (origin
787 (method url-fetch)
788 (uri (pypi-uri "bitarray" version))
789 (sha256
790 (base32
791 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
792 (build-system python-build-system)
793 (home-page "https://github.com/ilanschnell/bitarray")
794 (synopsis "Efficient arrays of booleans")
795 (description "This package provides an object type which efficiently
796 represents an array of booleans. Bitarrays are sequence types and behave very
797 much like usual lists. Eight bits are represented by one byte in a contiguous
798 block of memory. The user can select between two representations:
799 little-endian and big-endian. All of the functionality is implemented in C.
800 Methods for accessing the machine representation are provided. This can be
801 useful when bit level access to binary files is required, such as portable
802 bitmap image files. Also, when dealing with compressed data which uses
803 variable bit length encoding, you may find this module useful.")
804 (license license:psfl)))
805
806 (define-public python-boolean.py
807 (package
808 (name "python-boolean.py")
809 (version "3.6")
810 (source
811 (origin
812 ;; There's no source tarball on PyPI.
813 (method git-fetch)
814 (uri (git-reference
815 (url "https://github.com/bastikr/boolean.py")
816 (commit (string-append "v" version))))
817 (file-name (git-file-name name version))
818 (sha256
819 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
820 (build-system python-build-system)
821 (home-page "https://github.com/bastikr/boolean.py")
822 (synopsis "Boolean algebra in one Python module")
823 (description
824 "This is a small Python library that implements boolean algebra.
825 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
826 @code{Symbol} class that can take on one of these two values. Calculations
827 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
828 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
829 Expressions are constructed from parsed strings or directly in Python.")
830 (license license:bsd-2)))
831
832 (define-public python-hdf4
833 (package
834 (name "python-hdf4")
835 (version "0.9")
836 (source
837 (origin
838 (method url-fetch)
839 (uri (pypi-uri name version))
840 (sha256
841 (base32
842 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
843 (build-system python-build-system)
844 (native-inputs `(("nose" ,python-nose)))
845 (propagated-inputs `(("numpy" ,python-numpy)))
846 (inputs
847 `(("hdf4" ,hdf4)
848 ("libjpeg" ,libjpeg-turbo)
849 ("zlib" ,zlib)))
850 (arguments
851 `(#:phases
852 (modify-phases %standard-phases
853 (replace 'check
854 (lambda _
855 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
856 ;; on to import numpy. Somehow this works on their CI system.
857 ;; Let's just manage PYTHONPATH here instead.
858 (substitute* "runexamples.sh"
859 (("export PYTHONPATH=.*") ""))
860 (setenv "PYTHONPATH"
861 (string-append (getcwd) ":"
862 (getenv "PYTHONPATH")))
863 (invoke "./runexamples.sh")
864 (invoke "nosetests" "-v"))))))
865 (home-page "https://github.com/fhs/python-hdf4")
866 (synopsis "Python interface to the NCSA HDF4 library")
867 (description
868 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
869 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
870 NetCDF files can also be read and modified. Python-HDF4 is a fork of
871 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
872 (license license:expat)))
873
874 (define-public python2-hdf4
875 (package-with-python2 python-hdf4))
876
877 (define-public python-h5py
878 (package
879 (name "python-h5py")
880 (version "2.10.0")
881 (source
882 (origin
883 (method url-fetch)
884 (uri (pypi-uri "h5py" version))
885 (sha256
886 (base32
887 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
888 (build-system python-build-system)
889 (arguments
890 `(#:tests? #f ; no test target
891 #:phases
892 (modify-phases %standard-phases
893 (add-after 'unpack 'fix-hdf5-paths
894 (lambda* (#:key inputs #:allow-other-keys)
895 (let ((prefix (assoc-ref inputs "hdf5")))
896 (substitute* "setup_build.py"
897 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
898 (string-append "['" prefix "/lib" "']"))
899 (("'/opt/local/include', '/usr/local/include'")
900 (string-append "'" prefix "/include" "'")))
901 (substitute* "setup_configure.py"
902 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
903 (string-append "['" prefix "/lib" "']")))
904 #t))))))
905 (propagated-inputs
906 `(("python-six" ,python-six)
907 ("python-numpy" ,python-numpy)))
908 (inputs
909 `(("hdf5" ,hdf5-1.10)))
910 (native-inputs
911 `(("python-cython" ,python-cython)
912 ("python-pkgconfig" ,python-pkgconfig)
913 ("pkg-config" ,pkg-config)))
914 (home-page "https://www.h5py.org/")
915 (synopsis "Read and write HDF5 files from Python")
916 (description
917 "The h5py package provides both a high- and low-level interface to the
918 HDF5 library from Python. The low-level interface is intended to be a
919 complete wrapping of the HDF5 API, while the high-level component supports
920 access to HDF5 files, datasets and groups using established Python and NumPy
921 concepts.")
922 (license license:bsd-3)))
923
924 (define-public python2-h5py
925 (package-with-python2 python-h5py))
926
927 (define-public python-sh
928 (package
929 (name "python-sh")
930 (version "1.12.14")
931 (source
932 (origin
933 (method url-fetch)
934 (uri (pypi-uri "sh" version))
935 (sha256
936 (base32
937 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
938 (build-system python-build-system)
939 (arguments
940 '(#:phases
941 (modify-phases %standard-phases
942 (replace 'check
943 (lambda _
944 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
945 (setenv "HOME" "/tmp")
946 (invoke "python" "sh.py" "test"))))))
947 (native-inputs
948 `(("python-coverage" ,python-coverage)))
949 (home-page "https://github.com/amoffat/sh")
950 (synopsis "Python subprocess replacement")
951 (description "This package provides a replacement for Python's
952 @code{subprocess} feature.")
953 (license license:expat)))
954
955 (define-public python2-sh
956 (package-with-python2 python-sh))
957
958 (define-public python-cftime
959 (package
960 (name "python-cftime")
961 (version "1.0.4.2")
962 (source
963 (origin
964 (method url-fetch)
965 (uri (pypi-uri "cftime" version))
966 (sha256
967 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
968 (build-system python-build-system)
969 (propagated-inputs
970 `(("python-numpy" ,python-numpy)))
971 (native-inputs
972 `(("python-coveralls" ,python-coveralls)
973 ("python-cython" ,python-cython)
974 ("python-pytest-cov" ,python-pytest-cov)))
975 (home-page "https://github.com/Unidata/cftime")
976 (synopsis "Library for time handling")
977 (description
978 "This package provides time-handling functionality that used to be part
979 of the netcdf4 package before.")
980 ;; This package claims to include code under the GPLv3 but is released
981 ;; under ISC.
982 (license (list license:isc license:gpl3+))))
983
984 (define-public python-netcdf4
985 (package
986 (name "python-netcdf4")
987 (version "1.5.3")
988 (source
989 (origin
990 (method url-fetch)
991 (uri (pypi-uri "netCDF4" version))
992 (sha256
993 (base32
994 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
995 (build-system python-build-system)
996 (arguments
997 '(#:phases
998 (modify-phases %standard-phases
999 (add-after 'unpack 'configure-locations
1000 (lambda* (#:key inputs #:allow-other-keys)
1001 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1002 #t)))))
1003 (native-inputs
1004 `(("python-cython" ,python-cython)))
1005 (propagated-inputs
1006 `(("python-numpy" ,python-numpy)
1007 ("python-cftime" ,python-cftime)))
1008 (inputs
1009 `(("netcdf" ,netcdf)
1010 ("hdf4" ,hdf4)
1011 ("hdf5" ,hdf5)))
1012 (home-page "https://github.com/Unidata/netcdf4-python")
1013 (synopsis "Python/numpy interface to the netCDF library")
1014 (description "Netcdf4-python is a Python interface to the netCDF C
1015 library. netCDF version 4 has many features not found in earlier
1016 versions of the library and is implemented on top of HDF5. This module
1017 can read and write files in both the new netCDF 4 and the old netCDF 3
1018 format, and can create files that are readable by HDF5 clients. The
1019 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1020 to users of that module.")
1021 ;; The software is mainly ISC, but includes some files covered
1022 ;; by the Expat license.
1023 (license (list license:isc license:expat))))
1024
1025 (define-public python-license-expression
1026 (package
1027 (name "python-license-expression")
1028 (version "1.2")
1029 (source
1030 (origin
1031 (method url-fetch)
1032 (uri (pypi-uri "license-expression" version))
1033 (sha256
1034 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1035 (build-system python-build-system)
1036 (propagated-inputs
1037 `(("python-boolean.py" ,python-boolean.py)))
1038 (home-page "https://github.com/nexB/license-expression")
1039 (synopsis "Apply boolean logic to license expressions")
1040 (description
1041 "This Python module defines a tiny language to evaluate and compare
1042 license expressions using boolean logic. Logical combinations of licenses can
1043 be tested for equality, containment, and equivalence. They can be normalised
1044 and simplified. It supports SPDX license expressions as well as other naming
1045 conventions and aliases in the same expression.")
1046 (license license:gpl2+)))
1047
1048 (define-public python-lockfile
1049 (package
1050 (name "python-lockfile")
1051 (version "0.12.2")
1052 (source
1053 (origin
1054 (method url-fetch)
1055 (uri (pypi-uri "lockfile" version))
1056 (sha256
1057 (base32
1058 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1059 (build-system python-build-system)
1060 (arguments '(#:test-target "check"))
1061 (native-inputs
1062 `(("python-pbr" ,python-pbr)))
1063 (home-page "https://launchpad.net/pylockfile")
1064 (synopsis "Platform-independent file locking module")
1065 (description
1066 "The lockfile package exports a LockFile class which provides a simple
1067 API for locking files.")
1068 (license license:expat)))
1069
1070 (define-public python-filelock
1071 (package
1072 (name "python-filelock")
1073 (version "3.0.12")
1074 (source
1075 (origin
1076 (method url-fetch)
1077 (uri (pypi-uri "filelock" version))
1078 (sha256
1079 (base32
1080 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1081 (build-system python-build-system)
1082 (home-page
1083 "https://github.com/benediktschmitt/py-filelock")
1084 (synopsis "Platform independent file lock")
1085 (description "@code{filelock} contains a single module implementing
1086 a platform independent file lock in Python, which provides a simple way of
1087 inter-process communication.")
1088 (license license:unlicense)))
1089
1090 (define-public python-semantic-version
1091 (package
1092 (name "python-semantic-version")
1093 (version "2.8.5")
1094 (source
1095 (origin
1096 (method url-fetch)
1097 (uri (pypi-uri "semantic_version" version))
1098 (sha256
1099 (base32
1100 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1101 (build-system python-build-system)
1102 (home-page "https://github.com/rbarrois/python-semanticversion")
1103 (synopsis "Semantic versioning module for Python")
1104 (description
1105 "The @code{semantic_version} class is a small library for handling
1106 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1107
1108 It can compare versions, generate a new version that represents a bump in one of
1109 the version levels, and check whether any given string is a proper semantic
1110 version identifier.")
1111 (license license:bsd-3)))
1112
1113 (define-public python2-semantic-version
1114 (package-with-python2 python-semantic-version))
1115
1116 (define-public python-serpent
1117 (package
1118 (name "python-serpent")
1119 (version "1.28")
1120 (source
1121 (origin
1122 (method url-fetch)
1123 (uri (pypi-uri "serpent" version))
1124 (sha256
1125 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1126 (build-system python-build-system)
1127 (native-inputs
1128 `(("python-attrs" ,python-attrs)
1129 ("python-pytz" ,python-pytz)))
1130 (home-page "https://github.com/irmen/Serpent")
1131 (synopsis "Serializer for literal Python expressions")
1132 (description
1133 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1134 serialization. It serializes an object tree into bytes (an utf-8 encoded
1135 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1136 to rebuild the original object tree.
1137
1138 Because only safe literals are encoded, it is safe to send serpent data to
1139 other machines, such as over the network.")
1140 (properties `((python2-variant . ,(delay python2-serpent))))
1141 (license license:expat)))
1142
1143 (define-public python2-serpent
1144 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1145 (package
1146 (inherit base)
1147 (propagated-inputs
1148 `(("python-enum34" ,python2-enum34)
1149 ,@(package-propagated-inputs base))))))
1150
1151 (define-public python-setuptools
1152 (package
1153 (name "python-setuptools")
1154 (version "52.0.0")
1155 (source
1156 (origin
1157 (method url-fetch)
1158 (uri (pypi-uri "setuptools" version))
1159 (sha256
1160 (base32
1161 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1162 (modules '((guix build utils)))
1163 (snippet
1164 '(begin
1165 ;; Remove included binaries which are used to build self-extracting
1166 ;; installers for Windows.
1167 ;; TODO: Find some way to build them ourself so we can include them.
1168 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1169 #t))))
1170 (build-system python-build-system)
1171 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1172 ;; One could bootstrap with an internal untested setuptools.
1173 (arguments
1174 `(#:tests? #f))
1175 (home-page "https://pypi.org/project/setuptools/")
1176 (synopsis
1177 "Library designed to facilitate packaging Python projects")
1178 (description
1179 "Setuptools is a fully-featured, stable library designed to facilitate
1180 packaging Python projects, where packaging includes:
1181 Python package and module definitions,
1182 distribution package metadata,
1183 test hooks,
1184 project installation,
1185 platform-specific details,
1186 Python 3 support.")
1187 ;; TODO: setuptools now bundles the following libraries:
1188 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1189 (license (list license:psfl ; setuptools itself
1190 license:expat ; six, appdirs, pyparsing
1191 license:asl2.0 ; packaging is dual ASL2/BSD-2
1192 license:bsd-2))
1193 (properties `((python2-variant . ,(delay python2-setuptools))))))
1194
1195 ;; Newer versions of setuptools no longer support Python 2.
1196 (define-public python2-setuptools
1197 (package
1198 (name "python2-setuptools")
1199 (version "41.0.1")
1200 (source
1201 (origin
1202 (method url-fetch)
1203 (uri (pypi-uri "setuptools" version ".zip"))
1204 (sha256
1205 (base32
1206 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1207 (modules '((guix build utils)))
1208 (snippet
1209 '(begin
1210 ;; Remove included binaries which are used to build self-extracting
1211 ;; installers for Windows.
1212 ;; TODO: Find some way to build them ourself so we can include them.
1213 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1214 #t))))
1215 (build-system python-build-system)
1216 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1217 ;; One could bootstrap with an internal untested setuptools.
1218 (arguments
1219 `(#:tests? #f))
1220 (native-inputs
1221 `(("unzip" ,unzip)))
1222 (home-page "https://pypi.org/project/setuptools/")
1223 (synopsis
1224 "Library designed to facilitate packaging Python projects")
1225 (description
1226 "Setuptools is a fully-featured, stable library designed to facilitate
1227 packaging Python projects, where packaging includes:
1228 Python package and module definitions,
1229 distribution package metadata,
1230 test hooks,
1231 project installation,
1232 platform-specific details,
1233 Python 3 support.")
1234 ;; TODO: setuptools now bundles the following libraries:
1235 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1236 (license (list license:psfl ; setuptools itself
1237 license:expat ; six, appdirs, pyparsing
1238 license:asl2.0 ; packaging is dual ASL2/BSD-2
1239 license:bsd-2))))
1240
1241 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1242 (define-public python-setuptools-for-tensorflow
1243 (hidden-package
1244 (package
1245 (inherit python-setuptools)
1246 (version "39.1.0")
1247 (source (origin
1248 (inherit (package-source python-setuptools))
1249 (uri (pypi-uri "setuptools" version ".zip"))
1250 (sha256
1251 (base32
1252 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1253
1254 (define-public python-uniseg
1255 (package
1256 (name "python-uniseg")
1257 (version "0.7.1")
1258 (source
1259 (origin
1260 (method url-fetch)
1261 (uri (pypi-uri "uniseg" version ".zip"))
1262 (sha256
1263 (base32
1264 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1265 (build-system python-build-system)
1266 (arguments
1267 '(#:tests? #f)) ; The test suite requires network access.
1268 (native-inputs
1269 `(("unzip" ,unzip)))
1270 (home-page
1271 "https://bitbucket.org/emptypage/uniseg-python")
1272 (synopsis
1273 "Python library to determine Unicode text segmentations")
1274 (description
1275 "Uniseg is a Python package used to determine Unicode text segmentations.
1276 Supported segmentations include:
1277 @enumerate
1278 @item @dfn{Code point} (any value in the Unicode codespace)
1279 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1280 multiple Unicode code points, e.g. \"G\" + acute-accent)
1281 @item Word break
1282 @item Sentence break
1283 @item Line break
1284 @end enumerate")
1285 (license license:expat)))
1286
1287 (define-public python2-uniseg
1288 (package-with-python2 python-uniseg))
1289
1290 (define-public python-humanfriendly
1291 (package
1292 (name "python-humanfriendly")
1293 (version "8.2")
1294 (source
1295 (origin
1296 (method url-fetch)
1297 (uri (pypi-uri "humanfriendly" version))
1298 (sha256
1299 (base32
1300 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1301 (build-system python-build-system)
1302 (arguments
1303 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1304 #:tests? #f))
1305 (home-page "https://humanfriendly.readthedocs.io")
1306 (synopsis "Human-friendly input and output in Python")
1307 (description
1308 "The functions and classes in @code{humanfriendly} can be used to make
1309 text interfaces more user-friendly. It includes tools to parse and format
1310 numbers, file sizes, and timespans, timers for long-running operations, menus
1311 to allow the user to choose from a list of options, and terminal interaction
1312 helpers.")
1313 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1314 (license license:expat)))
1315
1316 (define-public python2-humanfriendly
1317 (let ((base (package-with-python2
1318 (strip-python2-variant python-humanfriendly))))
1319 (package (inherit base)
1320 (propagated-inputs
1321 `(("python2-monotonic" ,python2-monotonic)
1322 ,@(package-propagated-inputs base))))))
1323
1324 (define-public python-textparser
1325 (package
1326 (name "python-textparser")
1327 (version "0.23.0")
1328 (source
1329 (origin
1330 (method url-fetch)
1331 (uri (pypi-uri "textparser" version))
1332 (sha256
1333 (base32
1334 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1335 (build-system python-build-system)
1336 (home-page "https://github.com/eerimoq/textparser")
1337 (synopsis "Fast text parser for Python")
1338 (description "This library provides a text parser written in the Python
1339 language. It aims to be fast.")
1340 (license license:expat)))
1341
1342 (define-public python-aenum
1343 (package
1344 (name "python-aenum")
1345 (version "2.2.4")
1346 (source
1347 (origin
1348 (method url-fetch)
1349 (uri (pypi-uri "aenum" version))
1350 (sha256
1351 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1352 (build-system python-build-system)
1353 (arguments
1354 `(#:phases (modify-phases %standard-phases
1355 (replace 'check
1356 (lambda _
1357 (format #t "current working dir ~s~%" (getcwd))
1358 (setenv "PYTHONPATH"
1359 (string-append ".:" (getenv "PYTHONPATH")))
1360 ;; We must run the test suite module directly, as it
1361 ;; fails to define the 'tempdir' variable in scope for
1362 ;; the tests otherwise
1363 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1364 ;; issues/32/running-tests-with-python-setuppy-test).
1365 (invoke "python3" "aenum/test.py")
1366 ;; This one fails with "NameError: name
1367 ;; 'test_pickle_dump_load' is not defined" (see:
1368 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1369 ;; /error-running-the-test_v3py-test-suite).
1370 ;; (invoke "python3" "aenum/test_v3.py")
1371 #t)))))
1372 (home-page "https://bitbucket.org/stoneleaf/aenum")
1373 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1374 (description "The aenum library includes an @code{Enum} base class, a
1375 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1376 class.")
1377 (license license:bsd-3)))
1378
1379 (define-public python-can
1380 (package
1381 (name "python-can")
1382 (version "3.3.3")
1383 (source
1384 (origin
1385 (method url-fetch)
1386 (uri (pypi-uri "python-can" version))
1387 (sha256
1388 (base32
1389 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1390 (build-system python-build-system)
1391 (arguments
1392 `(#:phases (modify-phases %standard-phases
1393 (add-after 'unpack 'relax-version-requirements
1394 (lambda _
1395 (substitute* "setup.py"
1396 (("mock~=2\\.0") "mock")
1397 (("coverage<5") "coverage")
1398 (("pytest~=4\\.3") "pytest")
1399 (("hypothesis~=4\\.56") "hypothesis"))
1400 #t))
1401 (add-after 'unpack 'fix-broken-tests
1402 ;; The tests try to run two scripts it expects should be
1403 ;; in PATH, but they aren't at this time (see:
1404 ;; https://github.com/hardbyte/python-can/issues/805).
1405 (lambda _
1406 (substitute* "test/test_scripts.py"
1407 (("\"can_logger\\.py --help\"") "")
1408 (("\"can_player\\.py --help\"") ""))
1409 #t)))))
1410 (propagated-inputs
1411 `(("python-aenum" ,python-aenum)
1412 ("python-wrapt" ,python-wrapt)))
1413 (native-inputs
1414 `(("python-codecov" ,python-codecov)
1415 ("python-coverage" ,python-coverage)
1416 ("python-future" ,python-future)
1417 ("python-hypothesis" ,python-hypothesis)
1418 ("python-mock" ,python-mock)
1419 ("python-pyserial" ,python-pyserial)
1420 ("python-pytest" ,python-pytest)
1421 ("python-pytest-cov" ,python-pytest-cov)
1422 ("python-pytest-runner" ,python-pytest-runner)
1423 ("python-pytest-timeout" ,python-pytest-timeout)))
1424 (home-page "https://github.com/hardbyte/python-can")
1425 (synopsis "Controller Area Network (CAN) interface module for Python")
1426 (description "This package defines the @code{can} module, which provides
1427 controller area network (CAN) support for Python developers; providing common
1428 abstractions to different hardware devices, and a suite of utilities for
1429 sending and receiving messages on a CAN bus.")
1430 (license license:lgpl3+)))
1431
1432 (define-public python-caniusepython3
1433 (package
1434 (name "python-caniusepython3")
1435 (version "7.2.0")
1436 (source
1437 (origin
1438 (method url-fetch)
1439 (uri (pypi-uri "caniusepython3" version))
1440 (sha256
1441 (base32
1442 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1443 (build-system python-build-system)
1444 (arguments
1445 `(#:phases (modify-phases %standard-phases
1446 (add-after 'unpack 'relax-requirements
1447 (lambda _
1448 (substitute* "setup.py"
1449 ;; These are for compatibility with Python 2.
1450 ((".*'argparse', 'backports.functools_lru_cache',.*")
1451 ""))
1452 (substitute* "dev_requirements.txt"
1453 ((".*pylint.*") "")) ;not actually required
1454 #t))
1455 (replace 'check
1456 (lambda _
1457 (invoke "py.test" "-k" "not NetworkTests"))))))
1458 (propagated-inputs
1459 `(("python-distlib" ,python-distlib)
1460 ("python-packaging" ,python-packaging)
1461 ("python-requests" ,python-requests)))
1462 (native-inputs
1463 `(("python-mock" ,python-mock)
1464 ("python-pytest" ,python-pytest)))
1465 (home-page "https://github.com/brettcannon/caniusepython3")
1466 (synopsis "Check for Python 3-incompatible Python libraries")
1467 (description "The @command{caniusepython3} command scans your project and
1468 reports the Python 3-incompatible libraries it found. It can also be used as
1469 a library.")
1470 (license license:asl2.0)))
1471
1472 (define-public python-diskcache
1473 (package
1474 (name "python-diskcache")
1475 (version "4.1.0")
1476 (source
1477 (origin
1478 (method url-fetch)
1479 (uri (pypi-uri "diskcache" version))
1480 (sha256
1481 (base32
1482 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1483 (build-system python-build-system)
1484 (arguments
1485 `(#:tests? #f)) ;test suite not included in the release
1486 (home-page "http://www.grantjenks.com/docs/diskcache/")
1487 (synopsis "Disk and file backed cache library")
1488 (description "DiskCache is a disk and file backed persistent cache.")
1489 (license license:asl2.0)))
1490
1491 (define-public python-bitstruct
1492 (package
1493 (name "python-bitstruct")
1494 (version "8.9.0")
1495 (source
1496 (origin
1497 (method url-fetch)
1498 (uri (pypi-uri "bitstruct" version))
1499 (sha256
1500 (base32
1501 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1502 (build-system python-build-system)
1503 (home-page "https://github.com/eerimoq/bitstruct")
1504 (synopsis "Python values to and C bit field structs converter")
1505 (description "This module performs conversions between Python values and C
1506 bit field structs represented as Python byte strings. It is intended to have
1507 a similar interface as the @code{struct} module from Python, but working on
1508 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1509 (license license:expat)))
1510
1511 (define-public python-cantools
1512 (package
1513 (name "python-cantools")
1514 (version "33.1.1")
1515 (source
1516 (origin
1517 ;; We take the sources from the Git repository as the documentation is
1518 ;; not included with the PyPI archive.
1519 (method git-fetch)
1520 (uri (git-reference
1521 (url "https://github.com/eerimoq/cantools")
1522 (commit version)))
1523 (file-name (git-file-name name version))
1524 (sha256
1525 (base32
1526 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1527 (build-system python-build-system)
1528 (arguments
1529 `(#:phases
1530 (modify-phases %standard-phases
1531 (add-after 'build 'build-doc
1532 (lambda _
1533 ;; See: https://github.com/eerimoq/cantools/issues/190.
1534 (substitute* "README.rst"
1535 (("https://github.com/eerimoq/cantools/raw/master\
1536 /docs/monitor.png")
1537 "monitor.png"))
1538 (with-directory-excursion "docs"
1539 (invoke "make" "man" "info"))))
1540 (add-after 'install 'install-doc
1541 (lambda* (#:key outputs #:allow-other-keys)
1542 (let* ((out (assoc-ref outputs "out"))
1543 (info (string-append out "/share/info"))
1544 (man1 (string-append out "/share/man/man1")))
1545 (format #t "CWD: ~s~%" (getcwd))
1546 (install-file "docs/_build/texinfo/cantools.info" info)
1547 (install-file "docs/_build/man/cantools.1" man1)
1548 #t))))))
1549 (native-inputs
1550 `(("sphinx" ,python-sphinx)
1551 ("texinfo" ,texinfo)))
1552 (propagated-inputs
1553 `(("python-bitstruct" ,python-bitstruct)
1554 ("python-can" ,python-can)
1555 ("python-diskcache" ,python-diskcache)
1556 ("python-textparser" ,python-textparser)))
1557 (home-page "https://github.com/eerimoq/cantools")
1558 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1559 (description "This package includes Controller Area Network (CAN) related
1560 tools that can be used to:
1561 @itemize
1562 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1563 @item encode and decode CAN messages
1564 @item multiplex simple and extended signals
1565 @item diagnose DID encoding and decoding
1566 @item dump the CAN decoder output
1567 @item test CAN nodes
1568 @item generate C source code
1569 @item monitor the CAN bus
1570 @end itemize")
1571 (license license:expat)))
1572
1573 (define-public python-capturer
1574 (package
1575 (name "python-capturer")
1576 (version "2.4")
1577 (source
1578 (origin
1579 (method url-fetch)
1580 (uri (pypi-uri "capturer" version))
1581 (sha256
1582 (base32
1583 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1584 (build-system python-build-system)
1585 (arguments
1586 `(#:tests? #f))
1587 (propagated-inputs
1588 `(("python-humanfriendly" ,python-humanfriendly)))
1589 (home-page "https://capturer.readthedocs.io")
1590 (synopsis "Capture stdout and stderr streams of the current process")
1591 (description
1592 "The capturer package makes it easy to capture the stdout and stderr
1593 streams of the current process and subprocesses. Output can be relayed
1594 to the terminal in real time but is also available to the Python program
1595 for additional processing.")
1596 (license license:expat)))
1597
1598 (define-public python2-capturer
1599 (package-with-python2 python-capturer))
1600
1601 (define-public python-case
1602 (package
1603 (name "python-case")
1604 (version "1.5.3")
1605 (source
1606 (origin
1607 (method url-fetch)
1608 (uri (pypi-uri "case" version))
1609 (sha256
1610 (base32
1611 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1612 (build-system python-build-system)
1613 (propagated-inputs
1614 `(("python-mock" ,python-mock)
1615 ("python-nose" ,python-nose)
1616 ("python-six" ,python-six)
1617 ("python-unittest2" ,python-unittest2)))
1618 (native-inputs
1619 `(("python-coverage" ,python-coverage)))
1620 (home-page "https://github.com/celery/case")
1621 (synopsis "Unittest utilities and convenience methods")
1622 (description
1623 "The @code{case} package provides utilities on top of unittest, including
1624 some helpful Python 2 compatibility convenience methods.")
1625 (license license:bsd-3)))
1626
1627 (define-public python-verboselogs
1628 (package
1629 (name "python-verboselogs")
1630 (version "1.7")
1631 (source
1632 (origin
1633 (method url-fetch)
1634 (uri (pypi-uri "verboselogs" version))
1635 (sha256
1636 (base32
1637 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1638 (build-system python-build-system)
1639 (arguments
1640 `(#:phases
1641 (modify-phases %standard-phases
1642 (replace 'check
1643 (lambda _
1644 ;; Do not run pylint plugin test, as astroid is an old
1645 ;; unsupported version.
1646 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1647 "verboselogs/tests.py"))))))
1648 (native-inputs
1649 `(("python-mock" ,python-mock)
1650 ("python-pytest" ,python-pytest)))
1651 (home-page "https://verboselogs.readthedocs.io")
1652 (synopsis "Verbose logging level for Python's logging module")
1653 (description
1654 "The @code{verboselogs} package extends Python's @code{logging} module to
1655 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1656 (license license:expat)))
1657
1658 (define-public python2-verboselogs
1659 (package-with-python2 python-verboselogs))
1660
1661 (define-public python-coloredlogs
1662 (package
1663 (name "python-coloredlogs")
1664 (version "10.0")
1665 (source
1666 (origin
1667 (method url-fetch)
1668 (uri (pypi-uri "coloredlogs" version))
1669 (sha256
1670 (base32
1671 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1672 (build-system python-build-system)
1673 (arguments
1674 `(;Tests require some updated modules
1675 #:tests? #f))
1676 (propagated-inputs
1677 `(("python-capturer" ,python-capturer)))
1678 (home-page "https://coloredlogs.readthedocs.io")
1679 (synopsis "Colored stream handler for Python's logging module")
1680 (description
1681 "The @code{coloredlogs} package enables colored terminal output for
1682 Python's logging module. The @code{ColoredFormatter} class inherits from
1683 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1684 messages in color.")
1685 (license license:expat)))
1686
1687 (define-public python2-coloredlogs
1688 (package-with-python2 python-coloredlogs))
1689
1690 (define-public python-editorconfig
1691 (package
1692 (name "python-editorconfig")
1693 (version "0.12.2")
1694 (source
1695 (origin
1696 (method url-fetch)
1697 (uri (pypi-uri "EditorConfig" version))
1698 (sha256
1699 (base32
1700 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1701 (build-system python-build-system)
1702 (home-page "https://editorconfig.org/")
1703 (synopsis "EditorConfig bindings for python")
1704 (description "The EditorConfig project consists of a file format for
1705 defining coding styles and a collection of text editor plugins that enable
1706 editors to read the file format and adhere to defined styles. EditorConfig
1707 files are easily readable and they work nicely with version control systems.")
1708 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1709 (license (list license:bsd-2 license:psfl))))
1710
1711 (define-public dosage
1712 (package
1713 (name "dosage")
1714 (version "2.17")
1715 (source
1716 (origin
1717 (method url-fetch)
1718 (uri (pypi-uri "dosage" version))
1719 (sha256
1720 (base32
1721 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1722 (build-system python-build-system)
1723 (propagated-inputs
1724 `(("python2-backports-functools-lru-cache"
1725 ,python2-backports-functools-lru-cache)
1726 ("python2-backports-shutil-get-terminal-size"
1727 ,python2-backports-shutil-get-terminal-size)
1728 ("python-cached-property" ,python-cached-property)
1729 ("python-colorama" ,python-colorama)
1730 ("python-imagesize" ,python-imagesize)
1731 ("python-importlib-metadata" ,python-importlib-metadata)
1732 ("python-lxml" ,python-lxml)
1733 ("python-requests" ,python-requests)
1734 ("python-six" ,python-six)))
1735 (native-inputs
1736 `(("python-pytest-cov" ,python-pytest-cov)
1737 ("python-pytest-xdist" ,python-pytest-xdist)
1738 ("python-responses" ,python-responses)
1739 ("python-setuptools-scm" ,python-setuptools-scm)))
1740 (home-page "https://github.com/webcomics/dosage")
1741 (synopsis "Comic strip downloader and archiver")
1742 (description "Dosage is designed to keep a local copy of specific webcomics and other
1743 picture-based content such as Picture of the Day sites. With the @command{dosage}
1744 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1745 downloaded, or download a strip for a particular date or index, if possible.")
1746 (license license:expat)))
1747
1748 (define-public python-et-xmlfile
1749 (package
1750 (name "python-et-xmlfile")
1751 (version "1.0.1")
1752 (source
1753 (origin
1754 (method url-fetch)
1755 (uri (pypi-uri "et_xmlfile" version))
1756 (sha256
1757 (base32
1758 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1759 (build-system python-build-system)
1760 (arguments
1761 `(#:phases (modify-phases %standard-phases
1762 (replace 'check
1763 (lambda _
1764 (invoke "pytest"))))))
1765 (native-inputs
1766 `(("python-pytest" ,python-pytest)
1767 ("python-lxml" ,python-lxml))) ;used for the tests
1768 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1769 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1770 (description "This Python library is based upon the @code{xmlfile} module
1771 from @code{lxml}. It aims to provide a low memory, compatible implementation
1772 of @code{xmlfile}.")
1773 (license license:expat)))
1774
1775 (define-public python2-et-xmlfile
1776 (package-with-python2 python-et-xmlfile))
1777
1778 (define-public python-openpyxl
1779 (package
1780 (name "python-openpyxl")
1781 (version "3.0.5")
1782 (source
1783 (origin
1784 ;; We use the upstream repository, as the tests are not included in the
1785 ;; PyPI releases.
1786 (method hg-fetch)
1787 (uri (hg-reference
1788 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1789 (changeset version)))
1790 (file-name (string-append name "-" version "-checkout"))
1791 (sha256
1792 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1793 (build-system python-build-system)
1794 (arguments
1795 `(#:phases (modify-phases %standard-phases
1796 (replace 'check
1797 (lambda _
1798 (invoke "pytest"))))))
1799 (native-inputs
1800 ;; For the test suite.
1801 `(("python-lxml" ,python-lxml)
1802 ("python-pillow" ,python-pillow)
1803 ("python-pytest" ,python-pytest)))
1804 (propagated-inputs
1805 `(("python-et-xmlfile" ,python-et-xmlfile)
1806 ("python-jdcal" ,python-jdcal)))
1807 (home-page "https://openpyxl.readthedocs.io")
1808 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1809 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1810 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1811 standard.")
1812 (properties `((python2-variant . ,(delay python2-openpyxl))))
1813 (license license:expat)))
1814
1815 (define-public python2-openpyxl
1816 (let ((base (package-with-python2
1817 (strip-python2-variant python-openpyxl))))
1818 (package
1819 (inherit base)
1820 ;; This is the latest version that has python2 support
1821 (version "2.6.4")
1822 (source
1823 (origin
1824 (method url-fetch)
1825 (uri (pypi-uri "openpyxl" version))
1826 (sha256
1827 (base32
1828 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1829 (arguments '(#:tests? #f))))) ; No test suite.
1830
1831 (define-public python-eventlet
1832 (package
1833 (name "python-eventlet")
1834 (version "0.25.1")
1835 (source
1836 (origin
1837 (method url-fetch)
1838 (uri (pypi-uri "eventlet" version))
1839 (sha256
1840 (base32
1841 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1842 (build-system python-build-system)
1843 (propagated-inputs
1844 `(("python-greenlet" ,python-greenlet)))
1845 (arguments
1846 ;; TODO: Requires unpackaged 'enum-compat'.
1847 '(#:tests? #f))
1848 (home-page "https://eventlet.net")
1849 (synopsis "Concurrent networking library for Python")
1850 (description
1851 "Eventlet is a concurrent networking library for Python that
1852 allows you to change how you run your code, not how you write it.
1853 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1854 Coroutines ensure that the developer uses a blocking style of programming
1855 that is similar to threading, but provide the benefits of non-blocking I/O.
1856 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1857 from the Python interpreter, or as a small part of a larger application.")
1858 (license license:expat)))
1859
1860 (define-public python-six
1861 (package
1862 (name "python-six")
1863 (version "1.14.0")
1864 (source
1865 (origin
1866 (method url-fetch)
1867 (uri (pypi-uri "six" version))
1868 (sha256
1869 (base32
1870 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1871 (build-system python-build-system)
1872 (arguments
1873 `(#:phases
1874 (modify-phases %standard-phases
1875 (replace 'check
1876 (lambda _
1877 (invoke "py.test" "-v"))))))
1878 (native-inputs
1879 `(("python-pytest" ,python-pytest-bootstrap)))
1880 (home-page "https://pypi.org/project/six/")
1881 (synopsis "Python 2 and 3 compatibility utilities")
1882 (description
1883 "Six is a Python 2 and 3 compatibility library. It provides utility
1884 functions for smoothing over the differences between the Python versions with
1885 the goal of writing Python code that is compatible on both Python versions.
1886 Six supports every Python version since 2.5. It is contained in only one
1887 Python file, so it can be easily copied into your project.")
1888 (license license:x11)))
1889
1890 (define-public python2-six
1891 (package-with-python2 python-six))
1892
1893 (define-public python-six-bootstrap
1894 (package
1895 (inherit python-six)
1896 (name "python-six-bootstrap")
1897 (native-inputs `())
1898 (arguments `(#:tests? #f))))
1899
1900 (define-public python2-six-bootstrap
1901 (package-with-python2 python-six-bootstrap))
1902
1903 (define-public python-schedule
1904 (package
1905 (name "python-schedule")
1906 (version "0.4.3")
1907 (source
1908 (origin
1909 (method url-fetch)
1910 (uri (pypi-uri "schedule" version))
1911 (sha256
1912 (base32
1913 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1914 (build-system python-build-system)
1915 (native-inputs
1916 `(("python-pytest" ,python-pytest)
1917 ("python-mock" ,python-mock)))
1918 (home-page "https://github.com/dbader/schedule")
1919 (synopsis "Schedule periodic function calls in Python")
1920 (description
1921 "Schedule is an in-process scheduler for periodic jobs that uses the
1922 builder pattern for configuration. Schedule lets you run Python functions (or
1923 any other callable) periodically at pre-determined intervals using a simple,
1924 human-friendly syntax.")
1925 (license license:expat)))
1926
1927 (define-public python2-schedule
1928 (package-with-python2 python-schedule))
1929
1930 (define-public python-scour
1931 (package
1932 (name "python-scour")
1933 (version "038.1")
1934 (source
1935 (origin
1936 (method git-fetch)
1937 (uri
1938 (git-reference
1939 (url "https://github.com/scour-project/scour")
1940 (commit
1941 (string-append "v" version))))
1942 (file-name (git-file-name name version))
1943 (sha256
1944 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1945 (propagated-inputs
1946 `(("python-six" ,python-six)))
1947 (build-system python-build-system)
1948 (home-page "https://github.com/scour-project/scour")
1949 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1950 (description "The goal of Scour is to output a file that renderes
1951 identically at a fraction of the size by removing a lot of redundant
1952 information created by most SVG editors. Optimization options are typically
1953 lossless but can be tweaked for more aggressive cleaning.")
1954 (license license:asl2.0)))
1955
1956 (define-public python-mechanize
1957 (package
1958 (name "python-mechanize")
1959 (version "0.4.5")
1960 (source
1961 (origin
1962 (method url-fetch)
1963 (uri (pypi-uri "mechanize" version))
1964 (sha256
1965 (base32
1966 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
1967 (build-system python-build-system)
1968 (propagated-inputs
1969 `(("python-html5lib" ,python-html5lib)))
1970 (home-page "https://github.com/python-mechanize/mechanize")
1971 (synopsis
1972 "Stateful programmatic web browsing in Python")
1973 (description
1974 "Mechanize implements stateful programmatic web browsing in Python,
1975 after Andy Lester’s Perl module WWW::Mechanize.")
1976 (license license:bsd-3)))
1977
1978 (define-public python2-mechanize
1979 (package-with-python2 python-mechanize))
1980
1981 (define-public python-simpleaudio
1982 (package
1983 (name "python-simpleaudio")
1984 (version "1.0.4")
1985 (source
1986 (origin
1987 (method url-fetch)
1988 (uri (pypi-uri "simpleaudio" version))
1989 (sha256
1990 (base32
1991 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
1992 (build-system python-build-system)
1993 (arguments
1994 `(#:tests? #f))
1995 (inputs
1996 `(("alsa-lib" ,alsa-lib)))
1997 (home-page
1998 "https://github.com/hamiltron/py-simple-audio")
1999 (synopsis "Simple, asynchronous audio playback for Python 3")
2000 (description
2001 "The @code{simplaudio} package provides cross-platform, dependency-free
2002 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2003 (license license:expat))) ; MIT license
2004
2005 (define-public python-simplejson
2006 (package
2007 (name "python-simplejson")
2008 (version "3.17.0")
2009 (source
2010 (origin
2011 (method url-fetch)
2012 (uri (pypi-uri "simplejson" version))
2013 (sha256
2014 (base32
2015 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
2016 (build-system python-build-system)
2017 (home-page "http://simplejson.readthedocs.org/en/latest/")
2018 (synopsis
2019 "Json library for Python")
2020 (description
2021 "JSON (JavaScript Object Notation) is a subset of JavaScript
2022 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2023 format.
2024
2025 Simplejson exposes an API familiar to users of the standard library marshal
2026 and pickle modules. It is the externally maintained version of the json
2027 library contained in Python 2.6, but maintains compatibility with Python 2.5
2028 and (currently) has significant performance advantages, even without using
2029 the optional C extension for speedups. Simplejson is also supported on
2030 Python 3.3+.")
2031 (license license:x11)))
2032
2033 (define-public python2-simplejson
2034 (package-with-python2 python-simplejson))
2035
2036
2037 (define-public python-pyicu
2038 (package
2039 (name "python-pyicu")
2040 (version "2.4.3")
2041 (source
2042 (origin
2043 (method url-fetch)
2044 (uri (pypi-uri "PyICU" version))
2045 (sha256
2046 (base32
2047 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
2048 (build-system python-build-system)
2049 (inputs
2050 `(("icu4c" ,icu4c)))
2051 (native-inputs
2052 `(("python-pytest" ,python-pytest)
2053 ("python-six" ,python-six)))
2054 (home-page "https://github.com/ovalhub/pyicu")
2055 (synopsis "Python extension wrapping the ICU C++ API")
2056 (description
2057 "PyICU is a python extension wrapping the ICU C++ API.")
2058 (license license:x11)))
2059
2060 (define-public python2-pyicu
2061 (package-with-python2 python-pyicu))
2062
2063 (define-public python-dogtail
2064 (package
2065 (name "python-dogtail")
2066 (version "0.9.11")
2067 (source (origin
2068 (method url-fetch)
2069 (uri
2070 (string-append
2071 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2072 "dogtail-" version ".tar.gz"))
2073 (sha256
2074 (base32
2075 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2076 (build-system python-build-system)
2077 (arguments
2078 `(#:tests? #f ; TODO Launching dbus for the tests
2079 ; fails
2080 #:phases
2081 (modify-phases %standard-phases
2082 (replace 'check
2083 (lambda* (#:key tests? #:allow-other-keys)
2084 (when tests?
2085 (system "Xvfb :1 &")
2086 (setenv "DISPLAY" ":1")
2087 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2088 #t)))))
2089 (propagated-inputs
2090 `(("python-pygobject" ,python-pygobject)
2091 ("python-pycairo" ,python-pycairo)
2092 ("python-pyatspi" ,python-pyatspi)))
2093 (native-inputs
2094 `(("python-nose" ,python-nose)
2095 ("gtk+" ,gtk+)
2096 ("xvfb" ,xorg-server)
2097 ("dbus" ,dbus)
2098 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2099 ("gobject-introspection" ,gobject-introspection)))
2100 (home-page "https://gitlab.com/dogtail/dogtail/")
2101 (synopsis "GUI test tool and automation framework written in Python")
2102 (description
2103 "Dogtail is a GUI test tool and automation framework written in Python.
2104 It uses Accessibility (a11y) technologies to communicate with desktop
2105 applications. dogtail scripts are written in Python and executed like any
2106 other Python program.")
2107 (license license:gpl2+)))
2108
2109 (define-public python2-dogtail
2110 (package-with-python2 python-dogtail))
2111
2112 (define-public python-empy
2113 (package
2114 (name "python-empy")
2115 (version "3.3.3")
2116 (source (origin
2117 (method url-fetch)
2118 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2119 version ".tar.gz"))
2120 (sha256
2121 (base32
2122 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2123 (build-system python-build-system)
2124 (arguments
2125 `(#:tests? #f)) ; python2 only
2126 (home-page "http://www.alcyone.com/software/empy/")
2127 (synopsis "Templating system for Python")
2128 (description
2129 "EmPy is a system for embedding Python expressions and statements in
2130 template text; it takes an EmPy source file, processes it, and produces
2131 output. This is accomplished via expansions, which are special signals to the
2132 EmPy system and are set off by a special prefix (by default the at sign, @@).
2133 EmPy can expand arbitrary Python expressions and statements in this way, as
2134 well as a variety of special forms. Textual data not explicitly delimited in
2135 this way is sent unaffected to the output, allowing Python to be used in
2136 effect as a markup language. Also supported are callbacks via hooks,
2137 recording and playback via diversions, and dynamic, chainable filters. The
2138 system is highly configurable via command line options and embedded
2139 commands.")
2140 (license license:lgpl2.1+)))
2141
2142 (define-public python2-empy
2143 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2144 (package
2145 (inherit base)
2146 (arguments `(,@(package-arguments base)
2147 #:tests? #t)))))
2148
2149 (define-public python2-element-tree
2150 (package
2151 (name "python2-element-tree")
2152 (version "1.2.6")
2153 (source (origin
2154 (method url-fetch)
2155 (uri (string-append
2156 "http://effbot.org/media/downloads/elementtree-"
2157 version "-20050316.tar.gz"))
2158 (sha256
2159 (base32
2160 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2161 (build-system python-build-system)
2162 (arguments
2163 `(#:python ,python-2 ; seems to be part of Python 3
2164 #:tests? #f)) ; no 'test' sub-command
2165 (synopsis "Toolkit for XML processing in Python")
2166 (description
2167 "ElementTree is a Python library supporting lightweight XML processing.")
2168 (home-page "https://effbot.org/zone/element-index.htm")
2169 (license (license:x11-style
2170 "http://docs.python.org/2/license.html"
2171 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2172
2173 (define-public python2-pybugz
2174 (package
2175 (name "python2-pybugz")
2176 (version "0.6.11")
2177 (source (origin
2178 (method url-fetch)
2179 (uri (string-append
2180 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2181 version ".tar.gz"))
2182 (sha256
2183 (base32
2184 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2185 (patches (search-patches "pybugz-stty.patch"
2186 "pybugz-encode-error.patch"))))
2187 (build-system python-build-system)
2188 (arguments
2189 `(#:python ,python-2 ; SyntaxError with Python 3
2190 #:tests? #f)) ; no 'test' sub-command
2191 (propagated-inputs
2192 `(("element-tree" ,python2-element-tree)))
2193 (synopsis "Python and command-line interface to Bugzilla")
2194 (description
2195 "PyBugz is a Python library and command-line tool to query the Bugzilla
2196 bug tracking system. It is meant as an aid to speed up interaction with the
2197 bug tracker.")
2198 (home-page "http://www.liquidx.net/pybugz/")
2199 (license license:gpl2)))
2200
2201 (define-public python2-enum
2202 (package
2203 (name "python2-enum")
2204 (version "0.4.6")
2205 (source (origin
2206 (method url-fetch)
2207 (uri (pypi-uri "enum" version))
2208 (sha256
2209 (base32
2210 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2211 (build-system python-build-system)
2212 (arguments
2213 `(#:python ,python-2))
2214 (home-page "https://pypi.org/project/enum/")
2215 (synopsis "Robust enumerated type support in Python")
2216 (description
2217 "This provides a module for robust enumerations in Python. It has
2218 been superseded by the Python standard library and is provided only for
2219 compatibility.")
2220 ;; Choice of either license.
2221 (license (list license:gpl3+ license:psfl))))
2222
2223 (define-public python-enum34
2224 (package
2225 (name "python-enum34")
2226 (version "1.1.6")
2227 (source
2228 (origin
2229 (method url-fetch)
2230 (uri (pypi-uri "enum34" version))
2231 (sha256
2232 (base32
2233 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2234 (build-system python-build-system)
2235 (home-page "https://pypi.org/project/enum34/")
2236 (synopsis "Backported Python 3.4 Enum")
2237 (description
2238 "Enum34 is the new Python stdlib enum module available in Python 3.4
2239 backported for previous versions of Python from 2.4 to 3.3.")
2240 (license license:bsd-3)))
2241
2242 (define-public python2-enum34
2243 (package-with-python2 python-enum34))
2244
2245 (define-public python-parse-type
2246 (package
2247 (name "python-parse-type")
2248 (version "0.4.2")
2249 (source
2250 (origin
2251 (method url-fetch)
2252 (uri (pypi-uri "parse_type" version))
2253 (sha256
2254 (base32
2255 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2256 (build-system python-build-system)
2257 (propagated-inputs
2258 `(("python-six" ,python-six)
2259 ("python-parse" ,python-parse)))
2260 (native-inputs
2261 `(("python-pytest" ,python-pytest)
2262 ("python-pytest-runner" ,python-pytest-runner)))
2263 (home-page "https://github.com/jenisys/parse_type")
2264 (synopsis "Extended parse module")
2265 (description
2266 "Parse_type extends the python parse module.")
2267 (properties
2268 `((python2-variant . ,(delay python2-parse-type))))
2269 (license license:bsd-3)))
2270
2271 (define-public python2-parse-type
2272 (let ((base (package-with-python2
2273 (strip-python2-variant python-parse-type))))
2274 (package (inherit base)
2275 (propagated-inputs
2276 `(("python2-enum34" ,python2-enum34)
2277 ,@(package-propagated-inputs base))))))
2278
2279 (define-public python-parse
2280 (package
2281 (name "python-parse")
2282 (version "1.18.0")
2283 (source
2284 (origin
2285 (method url-fetch)
2286 (uri (pypi-uri "parse" version))
2287 (sha256
2288 (base32
2289 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2290 (build-system python-build-system)
2291 (arguments
2292 `(#:phases
2293 (modify-phases %standard-phases
2294 (replace 'check
2295 (lambda _ (invoke "python" "test_parse.py"))))))
2296 (home-page "https://github.com/r1chardj0n3s/parse")
2297 (synopsis "Parse strings")
2298 (description
2299 "Parse strings using a specification based on the Python @code{format()}
2300 syntax.")
2301 (license license:x11)))
2302
2303 (define-public python-polib
2304 (package
2305 (name "python-polib")
2306 (version "1.1.0")
2307 (source (origin
2308 (method url-fetch)
2309 (uri (pypi-uri "polib" version))
2310 (sha256
2311 (base32
2312 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2313 (build-system python-build-system)
2314 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2315 (synopsis "Manipulate, create and modify gettext files")
2316 (description "Polib can manipulate any gettext format (po, pot and mo)
2317 files. It can be used to create po files from scratch or to modify
2318 existing ones.")
2319 (license license:expat)))
2320
2321 (define-public python2-polib
2322 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2323 (package
2324 (inherit base)
2325 (arguments `(,@(package-arguments base)
2326 ;; Tests don't work with python2.
2327 #:tests? #f)))))
2328
2329 (define-public python-poyo
2330 (package
2331 (name "python-poyo")
2332 (version "0.5.0")
2333 (source
2334 (origin
2335 (method url-fetch)
2336 (uri (pypi-uri "poyo" version))
2337 (sha256
2338 (base32
2339 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2340 (build-system python-build-system)
2341 (home-page "https://github.com/hackebrot/poyo")
2342 (synopsis "Lightweight YAML Parser for Python")
2343 (description
2344 "This package provides a lightweight YAML Parser for Python. It supports
2345 only a chosen subset of the YAML format that is required to parse cookiecutter
2346 user configuration files. It does not have support for serializing into YAML
2347 and is not compatible with JSON.")
2348 (license license:expat)))
2349
2350 (define-public scons
2351 (package
2352 (name "scons")
2353 (version "3.0.4")
2354 (source (origin
2355 (method git-fetch)
2356 (uri (git-reference
2357 (url "https://github.com/SCons/scons")
2358 (commit version)))
2359 (file-name (git-file-name name version))
2360 (sha256
2361 (base32
2362 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2363 (build-system python-build-system)
2364 (arguments
2365 `(#:use-setuptools? #f ; still relies on distutils
2366 #:tests? #f ; no 'python setup.py test' command
2367 #:phases
2368 (modify-phases %standard-phases
2369 (add-before 'build 'bootstrap
2370 (lambda _
2371 (substitute* "src/engine/SCons/compat/__init__.py"
2372 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2373 "sys.modules[new] = __import__(old)"))
2374 (substitute* "src/engine/SCons/Platform/__init__.py"
2375 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2376 "mod = __import__(full_name)"))
2377 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2378 (chdir "build/scons")
2379 #t)))))
2380 (home-page "https://scons.org/")
2381 (synopsis "Software construction tool written in Python")
2382 (description
2383 "SCons is a software construction tool. Think of SCons as an improved,
2384 cross-platform substitute for the classic Make utility with integrated
2385 functionality similar to autoconf/automake and compiler caches such as ccache.
2386 In short, SCons is an easier, more reliable and faster way to build
2387 software.")
2388 (license license:x11)))
2389
2390 (define-public scons-python2
2391 (package
2392 (inherit (package-with-python2 scons))
2393 (name "scons-python2")))
2394
2395 (define-public python-extension-helpers
2396 (package
2397 (name "python-extension-helpers")
2398 (version "0.1")
2399 (source
2400 (origin
2401 (method url-fetch)
2402 (uri (pypi-uri "extension-helpers" version))
2403 (sha256
2404 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2405 (build-system python-build-system)
2406 (native-inputs
2407 `(("coverage" ,python-coverage)
2408 ("pytest" ,python-pytest-astropy)
2409 ("pytest-cov" ,python-pytest-cov)
2410 ("setuptools-scm" ,python-setuptools-scm)))
2411 (home-page "https://github.com/astropy/astropy-helpers")
2412 (synopsis
2413 "Utilities for building and installing packages in the Astropy ecosystem")
2414 (description
2415 "The extension-helpers package includes many build, installation, and
2416 documentation-related tools used by the Astropy project.")
2417 (license license:bsd-3)))
2418
2419 (define-public python-extras
2420 (package
2421 (name "python-extras")
2422 (version "1.0.0")
2423 (source
2424 (origin
2425 (method url-fetch)
2426 (uri (pypi-uri "extras" version))
2427 (sha256
2428 (base32
2429 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2430 (build-system python-build-system)
2431 (arguments
2432 ;; FIXME: Circular dependency on testtools.
2433 '(#:tests? #f))
2434 (home-page "https://github.com/testing-cabal/extras")
2435 (synopsis "Useful extensions to the Python standard library")
2436 (description
2437 "Extras is a set of extensions to the Python standard library.")
2438 (license license:expat)))
2439
2440 (define-public python2-extras
2441 (package-with-python2 python-extras))
2442
2443 (define-public python-mimeparse
2444 (package
2445 (name "python-mimeparse")
2446 (version "1.6.0")
2447 (source
2448 (origin
2449 (method url-fetch)
2450 (uri (pypi-uri "python-mimeparse" version))
2451 (sha256
2452 (base32
2453 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2454 (build-system python-build-system)
2455 (arguments
2456 '(#:phases
2457 (modify-phases %standard-phases
2458 (replace 'check
2459 (lambda _
2460 (invoke "./mimeparse_test.py"))))))
2461 (home-page
2462 "https://github.com/dbtsai/python-mimeparse")
2463 (synopsis "Python library for parsing MIME types")
2464 (description
2465 "Mimeparse provides basic functions for parsing MIME type names and
2466 matching them against a list of media-ranges.")
2467 (license license:expat)))
2468
2469 (define-public python2-mimeparse
2470 (package-with-python2 python-mimeparse))
2471
2472 (define-public python-miniboa
2473 (package
2474 (name "python-miniboa")
2475 (version "1.0.7")
2476 (source
2477 (origin
2478 (method url-fetch)
2479 (uri (pypi-uri "miniboa" version))
2480 (sha256
2481 (base32
2482 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2483 (build-system python-build-system)
2484 (home-page "https://github.com/shmup/miniboa")
2485 (synopsis "Simple, single-threaded Telnet server")
2486 (description
2487 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2488 server.")
2489 (license license:asl2.0)))
2490
2491 (define-public python2-miniboa
2492 (package-with-python2 python-miniboa))
2493
2494 (define-public python-pafy
2495 (package
2496 (name "python-pafy")
2497 (version "0.5.3.1")
2498 (source
2499 (origin
2500 (method url-fetch)
2501 (uri (pypi-uri "pafy" version))
2502 (sha256
2503 (base32
2504 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2505 (build-system python-build-system)
2506 (arguments
2507 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2508 (propagated-inputs
2509 ;; Youtube-dl is a python package which is imported in the file
2510 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2511 `(("youtube-dl" ,youtube-dl)))
2512 (home-page "https://np1.github.io/pafy/")
2513 (synopsis "Retrieve YouTube content and metadata")
2514 (description
2515 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2516 (license license:lgpl3+)))
2517
2518 (define-public python2-funcsigs
2519 (package
2520 (name "python2-funcsigs")
2521 (version "1.0.2")
2522 (source (origin
2523 (method url-fetch)
2524 (uri (pypi-uri "funcsigs" version))
2525 (sha256
2526 (base32
2527 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2528 (build-system python-build-system)
2529 (arguments
2530 `(#:python ,python-2))
2531 (native-inputs
2532 `(("python2-unittest2" ,python2-unittest2)))
2533 (home-page "http://funcsigs.readthedocs.org")
2534 (synopsis "Python function signatures from PEP362")
2535 (description
2536 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2537 (license license:asl2.0)))
2538
2539 (define-public python2-funcsigs-bootstrap
2540 (package
2541 (inherit python2-funcsigs)
2542 (name "python2-funcsigs-bootstrap")
2543 (native-inputs `())
2544 (arguments
2545 `(#:tests? #f
2546 ,@(package-arguments python2-funcsigs)))))
2547
2548 (define-public python-py
2549 (package
2550 (name "python-py")
2551 (version "1.8.1")
2552 (source
2553 (origin
2554 (method url-fetch)
2555 (uri (pypi-uri "py" version))
2556 (sha256
2557 (base32
2558 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2559 (build-system python-build-system)
2560 (arguments
2561 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2562 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2563 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2564 ;; Is this module globally installed?"
2565 '(#:tests? #f))
2566 (native-inputs
2567 `(("python-setuptools-scm" ,python-setuptools-scm)))
2568 (home-page "https://github.com/pytest-dev/py")
2569 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2570 (description
2571 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2572 code introspection, and logging.")
2573 (license license:expat)))
2574
2575 (define-public python-py-next
2576 (package
2577 (inherit python-py)
2578 (version "1.9.0")
2579 (source
2580 (origin
2581 (method url-fetch)
2582 (uri (pypi-uri "py" version))
2583 (sha256
2584 (base32
2585 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
2586
2587 (define-public python2-py
2588 (package-with-python2 python-py))
2589
2590 ;; Recent versions of python-fixtures and python-testrepository need
2591 ;; python-pbr for packaging, which itself needs these two packages for
2592 ;; testing.
2593 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2594 ;; same source, just without any test dependencies and with tests disabled.
2595 ;; python-pbr-minmal is then used to package python-fixtures and
2596 ;; python-testrepository.
2597 ;; Strictly speaking we currently could remove the test-requirements from the
2598 ;; normal python-pbr package (and save this package) since test are disabled
2599 ;; there anyway. But this may change in future.
2600 (define-public python-pbr-minimal
2601 (package
2602 (name "python-pbr-minimal")
2603 (version "3.0.1")
2604 (source
2605 (origin
2606 (method url-fetch)
2607 (uri (pypi-uri "pbr" version))
2608 (sha256
2609 (base32
2610 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2611 (build-system python-build-system)
2612 (arguments
2613 `(#:tests? #f))
2614 (home-page "https://docs.openstack.org/pbr/latest/")
2615 (synopsis "Minimal build of python-pbr used for bootstrapping")
2616 (description
2617 "Used only for bootstrapping python2-pbr, you should not need this.")
2618 (license license:asl2.0)))
2619
2620 (define-public python-pbr
2621 (package
2622 (inherit python-pbr-minimal)
2623 (name "python-pbr")
2624 (arguments
2625 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2626 (propagated-inputs
2627 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2628 (native-inputs
2629 `(("python-fixtures" ,python-fixtures-bootstrap)
2630 ;; discover, coverage, hacking, subunit
2631 ("python-mock" ,python-mock)
2632 ("python-six" ,python-six)
2633 ("python-sphinx" ,python-sphinx)
2634 ("python-testrepository" ,python-testrepository-bootstrap)
2635 ("python-testresources" ,python-testresources-bootstrap)
2636 ("python-testscenarios" ,python-testscenarios-bootstrap)
2637 ("python-testtools" ,python-testtools-bootstrap)
2638 ("python-virtualenv" ,python-virtualenv)))
2639 (synopsis "Enhance the default behavior of Python’s setuptools")
2640 (description
2641 "Python Build Reasonableness (PBR) is a library that injects some useful
2642 and sensible default behaviors into your setuptools run. It will set
2643 versions, process requirements files and generate AUTHORS and ChangeLog file
2644 from git information.
2645 ")))
2646
2647 (define-public python-pyrsistent
2648 (package
2649 (name "python-pyrsistent")
2650 (version "0.16.0")
2651 (home-page "https://github.com/tobgu/pyrsistent")
2652 (source (origin
2653 (method url-fetch)
2654 (uri (pypi-uri "pyrsistent" version))
2655 (sha256
2656 (base32
2657 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2658 (build-system python-build-system)
2659 (arguments
2660 '(#:phases (modify-phases %standard-phases
2661 ;; The package works fine with newer Pytest and Hypothesis, but
2662 ;; has pinned older versions to stay compatible with Python 2.
2663 (add-before 'check 'loosen-pytest-requirement
2664 (lambda _
2665 (substitute* "setup.py"
2666 (("pytest<5") "pytest")
2667 (("hypothesis<5") "hypothesis"))
2668 #t)))))
2669 (native-inputs
2670 `(("python-hypothesis" ,python-hypothesis)
2671 ("python-pytest" ,python-pytest)
2672 ("python-pytest-runner" ,python-pytest-runner)))
2673 (propagated-inputs
2674 `(("python-six" ,python-six)))
2675 (synopsis "Persistent data structures for Python")
2676 (description
2677 "Pyrsistent is a number of persistent collections (by some referred to as
2678 functional data structures). Persistent in the sense that they are immutable.
2679
2680 All methods on a data structure that would normally mutate it instead return a
2681 new copy of the structure containing the requested updates. The original
2682 structure is left untouched.")
2683 (license license:expat)))
2684
2685 (define-public python2-pyrsistent
2686 (package-with-python2 python-pyrsistent))
2687
2688 (define-public python-exif-read
2689 (package
2690 (name "python-exif-read")
2691 (version "2.1.2")
2692 (source (origin
2693 (method url-fetch)
2694 (uri (pypi-uri "ExifRead" version))
2695 (sha256
2696 (base32
2697 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2698 (build-system python-build-system)
2699 (arguments `(#:tests? #f)) ; no tests
2700 (home-page "https://github.com/ianare/exif-py")
2701 (synopsis "Python library to extract EXIF data from image files")
2702 (description
2703 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2704 files.")
2705 (license license:bsd-3)))
2706
2707 (define-public python2-exif-read
2708 (package-with-python2 python-exif-read))
2709
2710 (define-public python-pyld
2711 (package
2712 (name "python-pyld")
2713 (version "1.0.5")
2714 (source (origin
2715 (method url-fetch)
2716 (uri (pypi-uri "PyLD" version))
2717 (sha256
2718 (base32
2719 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2720 (build-system python-build-system)
2721 (home-page "https://github.com/digitalbazaar/pyld")
2722 (synopsis "Python implementation of the JSON-LD specification")
2723 (description
2724 "PyLD is an implementation of the JSON-LD specification.")
2725 (license license:bsd-3)))
2726
2727 (define-public python2-pyld
2728 (package-with-python2 python-pyld))
2729
2730 (define-public python-cli-helpers
2731 (package
2732 (name "python-cli-helpers")
2733 (version "2.0.1")
2734 (source
2735 (origin
2736 ;; There's no source tarball on PyPI.
2737 (method git-fetch)
2738 (uri (git-reference
2739 (url "https://github.com/dbcli/cli_helpers")
2740 (commit (string-append "v" version))))
2741 (file-name (git-file-name name version))
2742 (sha256
2743 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2744 (build-system python-build-system)
2745 (native-inputs
2746 `(("python-pytest" ,python-pytest)))
2747 (propagated-inputs
2748 `(("python-wcwidth" ,python-wcwidth)
2749 ("python-configobj" ,python-configobj)
2750 ("python-tabulate" ,python-tabulate)
2751 ("python-terminaltables" ,python-terminaltables)))
2752 (home-page "https://github.com/dbcli/cli_helpers")
2753 (synopsis "Helpers for building command-line apps")
2754 (description
2755 "CLI Helpers is a Python package that makes it easy to perform common
2756 tasks when building command-line apps. It's a helper library for command-line
2757 interfaces.")
2758 (license license:bsd-3)))
2759
2760 (define-public python-click
2761 (package
2762 (name "python-click")
2763 (version "7.1.2")
2764 (source
2765 (origin
2766 (method url-fetch)
2767 (uri (pypi-uri "click" version))
2768 (sha256
2769 (base32
2770 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2771 (build-system python-build-system)
2772 (arguments
2773 `(#:phases
2774 (modify-phases %standard-phases
2775 (add-after 'unpack 'fix-paths
2776 (lambda* (#:key inputs #:allow-other-keys)
2777 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2778 "cross-libc" "libc"))))
2779 (substitute* "src/click/_unicodefun.py"
2780 (("'locale'")
2781 (string-append "'" glibc "/bin/locale'"))))
2782 #t))
2783 (replace 'check
2784 (lambda _
2785 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2786 (invoke "python" "-m" "pytest"))))))
2787 (native-inputs
2788 `(("python-pytest" ,python-pytest)))
2789 (home-page "https://palletsprojects.com/p/click/")
2790 (synopsis "Command line library for Python")
2791 (description
2792 "Click is a Python package for creating command line interfaces in a
2793 composable way with as little code as necessary. Its name stands for
2794 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2795 with sensible defaults out of the box.")
2796 (license license:bsd-3)))
2797
2798 (define-public python2-click
2799 (package-with-python2 python-click))
2800
2801 (define-public python-click-5
2802 (package (inherit python-click)
2803 (name "python-click")
2804 (version "5.1")
2805 (source
2806 (origin
2807 (method url-fetch)
2808 (uri (pypi-uri "click" version))
2809 (sha256
2810 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2811 (arguments `())))
2812
2813 (define-public python-vcversioner
2814 (package
2815 (name "python-vcversioner")
2816 (version "2.16.0.0")
2817 (source
2818 (origin
2819 (method url-fetch)
2820 (uri (pypi-uri "vcversioner" version))
2821 (sha256
2822 (base32
2823 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2824 (build-system python-build-system)
2825 (synopsis "Python library for version number discovery")
2826 (description "Vcversioner is a Python library that inspects tagging
2827 information in a variety of version control systems in order to discover
2828 version numbers.")
2829 (home-page "https://github.com/habnabit/vcversioner")
2830 (license license:isc)))
2831
2832 (define-public python2-vcversioner
2833 (package-with-python2 python-vcversioner))
2834
2835 (define-public python-jdcal
2836 (package
2837 (name "python-jdcal")
2838 (version "1.4")
2839 (source
2840 (origin
2841 (method url-fetch)
2842 (uri (pypi-uri "jdcal" version))
2843 (sha256
2844 (base32
2845 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2846 (build-system python-build-system)
2847 (arguments
2848 `(#:phases (modify-phases %standard-phases
2849 (replace 'check
2850 (lambda _
2851 (invoke "pytest"))))))
2852 (native-inputs
2853 `(("python-pytest" ,python-pytest)))
2854 (home-page "https://github.com/phn/jdcal")
2855 (synopsis "Functions to convert between Julian dates Gregorian dates")
2856 (description "This Python library provides functions for converting
2857 between Julian dates and Gregorian dates.")
2858 (license license:bsd-2)))
2859
2860 (define-public python2-jdcal
2861 (package-with-python2 python-jdcal))
2862
2863 (define-public python-jsondiff
2864 (package
2865 (name "python-jsondiff")
2866 (version "1.2.0")
2867 (source
2868 (origin
2869 (method url-fetch)
2870 (uri (pypi-uri "jsondiff" version))
2871 (sha256
2872 (base32
2873 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2874 (build-system python-build-system)
2875 (native-inputs
2876 `(("python-nose" ,python-nose)
2877 ("python-nose-random" ,python-nose-random)))
2878 (home-page
2879 "https://github.com/fzumstein/jsondiff")
2880 (synopsis "Compare JSON and JSON-like structures in Python")
2881 (description "@code{jsondiff} is a Python library which lets you
2882 compare, diff, and patch JSON and JSON-like structures in Python.")
2883 (license license:expat)))
2884
2885 (define-public python-jsonschema
2886 (package
2887 (name "python-jsonschema")
2888 (version "3.2.0")
2889 (source (origin
2890 (method url-fetch)
2891 (uri (pypi-uri "jsonschema" version))
2892 (sha256
2893 (base32
2894 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2895 (build-system python-build-system)
2896 (arguments
2897 '(#:phases
2898 (modify-phases %standard-phases
2899 (replace 'check
2900 (lambda* (#:key inputs outputs #:allow-other-keys)
2901 (add-installed-pythonpath inputs outputs)
2902 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2903 (invoke "trial" "jsonschema"))))))
2904 (native-inputs
2905 `(("python-setuptools_scm" ,python-setuptools-scm)
2906 ("python-twisted" ,python-twisted)))
2907 (propagated-inputs
2908 `(("python-attrs" ,python-attrs)
2909 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2910 ("python-pyrsistent" ,python-pyrsistent)
2911 ("python-six" ,python-six)))
2912 (home-page "https://github.com/Julian/jsonschema")
2913 (synopsis "Implementation of JSON Schema for Python")
2914 (description
2915 "Jsonschema is an implementation of JSON Schema for Python.")
2916 (license license:expat)
2917 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2918
2919 (define-public python2-jsonschema
2920 (let ((jsonschema (package-with-python2
2921 (strip-python2-variant python-jsonschema))))
2922 (package (inherit jsonschema)
2923 (propagated-inputs
2924 `(("python2-functools32" ,python2-functools32)
2925 ,@(package-propagated-inputs jsonschema))))))
2926
2927 (define-public python-schema
2928 (package
2929 (name "python-schema")
2930 (version "0.6.6")
2931 (source
2932 (origin
2933 (method url-fetch)
2934 (uri (pypi-uri "schema" version))
2935 (sha256
2936 (base32
2937 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2938 (build-system python-build-system)
2939 (native-inputs
2940 `(("python-pytest" ,python-pytest)))
2941 (home-page "https://github.com/keleshev/schema")
2942 (synopsis "Simple data validation library")
2943 (description
2944 "@code{python-schema} is a library for validating Python data
2945 structures, such as those obtained from config-files, forms, external
2946 services or command-line parsing, converted from JSON/YAML (or
2947 something else) to Python data-types.")
2948 (license license:psfl)))
2949
2950 (define-public python2-schema
2951 (package-with-python2 python-schema))
2952
2953 (define-public python-schema-0.5
2954 (package (inherit python-schema)
2955 (version "0.5.0")
2956 (source
2957 (origin
2958 (method url-fetch)
2959 (uri (pypi-uri "schema" version))
2960 (sha256
2961 (base32
2962 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2963
2964 (define-public python2-schema-0.5
2965 (package-with-python2 python-schema-0.5))
2966
2967 (define-public python-kitchen
2968 (package
2969 (name "python-kitchen")
2970 (version "1.2.5")
2971 (source
2972 (origin
2973 (method url-fetch)
2974 (uri (pypi-uri "kitchen" version))
2975 (sha256
2976 (base32
2977 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2978 (build-system python-build-system)
2979 (propagated-inputs
2980 `(("python-chardet" ,python-chardet)))
2981 (home-page "https://github.com/fedora-infra/kitchen")
2982 (synopsis "Python API for snippets")
2983 (description "@code{kitchen} module provides a python API for all sorts of
2984 little useful snippets of code that everybody ends up writing for their projects
2985 but never seem big enough to build an independent release. Use kitchen and stop
2986 cutting and pasting that code over and over.")
2987 (license (list license:lgpl2.1+
2988 ;; subprocess.py, test_subprocess.py,
2989 ;; kitchen/pycompat25/defaultdict.py:
2990 license:psfl))))
2991
2992 (define-public python2-kitchen
2993 (package-with-python2 python-kitchen))
2994
2995 (define-public python-unidecode
2996 (package
2997 (name "python-unidecode")
2998 (version "1.1.1")
2999 (source (origin
3000 (method url-fetch)
3001 (uri (pypi-uri "Unidecode" version))
3002 (sha256
3003 (base32
3004 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3005 (build-system python-build-system)
3006 (home-page "https://pypi.org/project/Unidecode/")
3007 (synopsis "ASCII transliterations of Unicode text")
3008 (description
3009 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3010 useful when integrating with legacy code that doesn't support Unicode, or for
3011 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3012 machine identifiers from human-readable Unicode strings that should still be
3013 somewhat intelligible.")
3014 (license license:gpl2+)))
3015
3016 (define-public python2-unidecode
3017 (package-with-python2 python-unidecode))
3018
3019 (define-public python-text-unidecode
3020 (package
3021 (name "python-text-unidecode")
3022 (version "1.3")
3023 (source (origin
3024 (method url-fetch)
3025 (uri (pypi-uri "text-unidecode" version))
3026 (sha256
3027 (base32
3028 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3029 (build-system python-build-system)
3030 (arguments
3031 '(#:phases (modify-phases %standard-phases
3032 (replace 'check
3033 (lambda _
3034 (setenv "PYTHONPATH"
3035 (string-append "./build/lib:"
3036 (getenv "PYTHONPATH")))
3037 (invoke "pytest" "-vv"))))))
3038 (native-inputs
3039 `(("python-pytest" ,python-pytest)))
3040 (home-page "https://github.com/kmike/text-unidecode/")
3041 (synopsis "Decode Unicode data")
3042 (description
3043 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3044 Perl library. It can create ASCII representations of Unicode data. In general
3045 users should prefer the @code{python-unidecode} package which offers better
3046 memory usage and transliteration quality.")
3047 ;; The user can choose either license.
3048 (license (list license:clarified-artistic license:gpl2+))))
3049
3050 (define-public python2-text-unidecode
3051 (package-with-python2 python-text-unidecode))
3052
3053 (define-public python-pyjwt
3054 (package
3055 (name "python-pyjwt")
3056 (version "1.7.1")
3057 (source
3058 (origin
3059 (method url-fetch)
3060 (uri (pypi-uri "PyJWT" version))
3061 (sha256
3062 (base32
3063 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3064 (modules '((guix build utils)))
3065 (snippet
3066 '(begin
3067 (for-each delete-file-recursively
3068 (find-files "." "\\.pyc$"))
3069 #t))))
3070 (build-system python-build-system)
3071 (arguments
3072 '(#:phases (modify-phases %standard-phases
3073 (replace 'check
3074 (lambda _
3075 ;; Mimic upstream commit 3a20892442b34c7 to get
3076 ;; rid of dependency on pytest-runner < 5.0.
3077 ;; Remove substitution for PyJWT > 1.7.1.
3078 (substitute* "setup.py"
3079 ((".*pytest-runner.*")
3080 ""))
3081 (invoke "pytest" "-vv"))))))
3082 (native-inputs
3083 `(("python-pytest" ,python-pytest)
3084 ("python-pytest-cov" ,python-pytest-cov)))
3085 (home-page "https://github.com/progrium/pyjwt")
3086 (synopsis "JSON Web Token implementation in Python")
3087 (description
3088 "PyJWT is a JSON Web Token implementation written in Python.")
3089 (license license:expat)))
3090
3091 (define-public python2-pyjwt
3092 (package-with-python2 python-pyjwt))
3093
3094 (define-public python-pykka
3095 (package
3096 (name "python-pykka")
3097 (version "1.2.1")
3098 (source
3099 (origin
3100 (method url-fetch)
3101 (uri (pypi-uri "Pykka" version))
3102 (sha256
3103 (base32
3104 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
3105 (build-system python-build-system)
3106 (native-inputs
3107 `(("python-mock" ,python-mock)
3108 ("python-nose" ,python-nose)
3109 ("python-gevent" ,python-gevent)
3110 ("python-eventlet" ,python-eventlet)))
3111 (home-page "https://www.pykka.org/")
3112 (synopsis "Pykka is a Python implementation of the actor model")
3113 (description
3114 "Pykka is a Python implementation of the actor model.
3115 The actor model introduces some simple rules to control the sharing
3116 of state and cooperation between execution units, which makes it
3117 easier to build concurrent applications.")
3118 (license license:asl2.0)))
3119
3120 (define-public python-pymsgbox
3121 (package
3122 (name "python-pymsgbox")
3123 (version "1.0.6")
3124 (source
3125 (origin
3126 (method git-fetch)
3127 (uri (git-reference
3128 ;; LICENSE.txt is not present on pypi
3129 (url "https://github.com/asweigart/PyMsgBox")
3130 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3131 (file-name (git-file-name name version))
3132 (sha256
3133 (base32
3134 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3135 (arguments
3136 ;; Circular dependency to run tests:
3137 ;; Tests need pyautogui, which depends on pymsgbox.
3138 '(#:tests? #f))
3139 (build-system python-build-system)
3140 (home-page "https://github.com/asweigart/PyMsgBox")
3141 (synopsis "Python module for JavaScript-like message boxes")
3142 (description
3143 "PyMsgBox is a simple, cross-platform, pure Python module for
3144 JavaScript-like message boxes. Types of dialog boxes include:
3145 @enumerate
3146 @item alert
3147 @item confirm
3148 @item prompt
3149 @item password
3150 @end enumerate
3151 ")
3152 (license license:bsd-3)))
3153
3154 (define-public python-pympler
3155 (package
3156 (name "python-pympler")
3157 (home-page "https://pythonhosted.org/Pympler/")
3158 (version "0.8")
3159 (source (origin
3160 (method url-fetch)
3161 (uri (pypi-uri "Pympler" version))
3162 (sha256
3163 (base32
3164 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3165 (build-system python-build-system)
3166 (arguments
3167 `(#:phases (modify-phases %standard-phases
3168 (delete 'check)
3169 (add-after 'install 'check
3170 (lambda* (#:key inputs outputs #:allow-other-keys)
3171 (add-installed-pythonpath inputs outputs)
3172 (invoke "python" "setup.py" "test"))))))
3173 (synopsis "Measure, monitor and analyze memory behavior")
3174 (description
3175 "Pympler is a development tool to measure, monitor and analyze
3176 the memory behavior of Python objects in a running Python application.
3177
3178 By pympling a Python application, detailed insight in the size and the
3179 lifetime of Python objects can be obtained. Undesirable or unexpected
3180 runtime behavior like memory bloat and other @samp{pymples} can easily
3181 be identified.
3182
3183 A web profiling frontend exposes process statistics, garbage
3184 visualisation and class tracker statistics.")
3185 (license license:asl2.0)))
3186
3187 (define-public python2-pympler
3188 (package-with-python2 python-pympler))
3189
3190 (define-public python-itsdangerous
3191 (package
3192 (name "python-itsdangerous")
3193 (version "1.1.0")
3194 (source
3195 (origin
3196 (method url-fetch)
3197 (uri (pypi-uri "itsdangerous" version))
3198 (sha256
3199 (base32
3200 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3201 (build-system python-build-system)
3202 (home-page "https://palletsprojects.com/p/itsdangerous/")
3203 (synopsis "Python library for passing data to/from untrusted environments")
3204 (description
3205 "Itsdangerous provides various helpers to pass trusted data to untrusted
3206 environments and back.")
3207 (license license:bsd-3)))
3208
3209 (define-public python2-itsdangerous
3210 (package-with-python2 python-itsdangerous))
3211
3212 (define-public python-pyyaml
3213 (package
3214 (name "python-pyyaml")
3215 (version "5.3.1")
3216 (source
3217 (origin
3218 (method url-fetch)
3219 (uri (pypi-uri "PyYAML" version))
3220 (sha256
3221 (base32
3222 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3223 (build-system python-build-system)
3224 (inputs
3225 `(("libyaml" ,libyaml)))
3226 (home-page "https://pyyaml.org")
3227 (synopsis "YAML parser and emitter for Python")
3228 (description
3229 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3230 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3231 API, and sensible error messages. PyYAML supports standard YAML tags and
3232 provides Python-specific tags that represent an arbitrary Python object.")
3233 (license license:expat)))
3234
3235 (define-public python2-pyyaml
3236 (package-with-python2 python-pyyaml))
3237
3238 (define-public python-vine
3239 (package
3240 (name "python-vine")
3241 (version "1.1.4")
3242 (source
3243 (origin
3244 (method url-fetch)
3245 (uri (pypi-uri "vine" version))
3246 (sha256
3247 (base32
3248 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3249 (build-system python-build-system)
3250 (native-inputs
3251 `(("python-pytest" ,python-pytest)
3252 ("python-case" ,python-case)))
3253 (home-page "https://github.com/celery/vine")
3254 (synopsis "Promises for Python")
3255 (description
3256 "@code{vine} provides a special implementation of promises in that it can
3257 be used both for \"promise of a value\" and lazy evaluation. The biggest
3258 upside for this is that everything in a promise can also be a promise,
3259 e.g. filters, callbacks and errbacks can all be promises.")
3260 (license license:bsd-3)))
3261
3262 (define-public python-virtualenv
3263 (package
3264 (name "python-virtualenv")
3265 (version "20.2.1")
3266 (source
3267 (origin
3268 (method url-fetch)
3269 (uri (pypi-uri "virtualenv" version))
3270 (sha256
3271 (base32
3272 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3273 (build-system python-build-system)
3274 (native-inputs
3275 `(("python-mock" ,python-mock)
3276 ("python-pytest" ,python-pytest)
3277 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3278 ;; be an input at all". However, removing the input makes the build error:
3279 ;; File "setup.py", line 4, in <module>
3280 ;; raise RuntimeError("setuptools >= 41 required to build")
3281 ("python-setuptools" ,python-setuptools)
3282 ("python-setuptools-scm" ,python-setuptools-scm)))
3283 (propagated-inputs
3284 `(("python-appdirs" ,python-appdirs)
3285 ("python-distlib" ,python-distlib/next)
3286 ("python-filelock" ,python-filelock)
3287 ("python-six" ,python-six)
3288 ("python-importlib-metadata" ,python-importlib-metadata)))
3289 (home-page "https://virtualenv.pypa.io/")
3290 (synopsis "Virtual Python environment builder")
3291 (description
3292 "Virtualenv is a tool to create isolated Python environments.")
3293 (license license:expat)))
3294
3295 (define-public python-markupsafe
3296 (package
3297 (name "python-markupsafe")
3298 (version "1.1.1")
3299 (source
3300 (origin
3301 (method url-fetch)
3302 (uri (pypi-uri "MarkupSafe" version))
3303 (sha256
3304 (base32
3305 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3306 (build-system python-build-system)
3307 (arguments
3308 `(#:modules ((ice-9 ftw)
3309 (srfi srfi-1)
3310 (srfi srfi-26)
3311 (guix build utils)
3312 (guix build python-build-system))
3313 #:phases (modify-phases %standard-phases
3314 (replace 'check
3315 (lambda _
3316 (let ((cwd (getcwd))
3317 (libdir (find (cut string-prefix? "lib." <>)
3318 (scandir "build"))))
3319 (setenv "PYTHONPATH"
3320 (string-append cwd "/build/" libdir ":"
3321 (getenv "PYTHONPATH")))
3322 (invoke "pytest" "-vv")))))))
3323 (native-inputs
3324 `(("python-pytest" ,python-pytest)))
3325 (home-page "https://github.com/mitsuhiko/markupsafe")
3326 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3327 (description
3328 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3329 for Python.")
3330 (license license:bsd-3)))
3331
3332 (define-public python2-markupsafe
3333 (package-with-python2 python-markupsafe))
3334
3335 (define-public python-jinja2
3336 (package
3337 (name "python-jinja2")
3338 (version "2.11.2")
3339 (source
3340 (origin
3341 (method url-fetch)
3342 (uri (pypi-uri "Jinja2" version))
3343 (sha256
3344 (base32
3345 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3346 (build-system python-build-system)
3347 (arguments
3348 '(#:phases (modify-phases %standard-phases
3349 (replace 'check
3350 (lambda* (#:key tests? #:allow-other-keys)
3351 (if tests?
3352 (begin
3353 (setenv "PYTHONPATH"
3354 (string-append "./build/lib:"
3355 (getenv "PYTHONPATH")))
3356 (invoke "pytest" "-vv"))
3357 (format #t "test suite not run~%"))
3358 #t)))))
3359 (native-inputs
3360 `(("python-pytest" ,python-pytest)))
3361 (propagated-inputs
3362 `(("python-markupsafe" ,python-markupsafe)))
3363 (home-page "http://jinja.pocoo.org/")
3364 (synopsis "Python template engine")
3365 (description
3366 "Jinja2 is a small but fast and easy to use stand-alone template engine
3367 written in pure Python.")
3368 (license license:bsd-3)))
3369
3370 (define-public python2-jinja2
3371 (package-with-python2 python-jinja2))
3372
3373 (define-public python-jinja2-time
3374 (package
3375 (name "python-jinja2-time")
3376 (version "0.2.0")
3377 (source
3378 (origin
3379 (method url-fetch)
3380 (uri (pypi-uri "jinja2-time" version))
3381 (sha256
3382 (base32
3383 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3384 (build-system python-build-system)
3385 (propagated-inputs
3386 `(("python-arrow" ,python-arrow)
3387 ("python-jinja2" ,python-jinja2)))
3388 (home-page
3389 "https://github.com/hackebrot/jinja2-time")
3390 (synopsis "Jinja2 Extension for Dates and Times")
3391 (description
3392 "This package provides an extension for the template engine Jinja2. It
3393 adds a 'now' tag providing a convenient access to the arrow.now() API from
3394 templates. A format string can be provided to control the output.")
3395 (license license:expat)))
3396
3397 (define-public python-pystache
3398 (package
3399 (name "python-pystache")
3400 (version "0.5.4")
3401 (source (origin
3402 (method url-fetch)
3403 (uri (pypi-uri "pystache" version))
3404 (sha256
3405 (base32
3406 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3407 (build-system python-build-system)
3408 (arguments
3409 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3410 (home-page "http://defunkt.io/pystache/")
3411 (synopsis "Python logic-less template engine")
3412 (description
3413 "Pystache is a Python implementation of the framework agnostic,
3414 logic-free templating system Mustache.")
3415 (license license:expat)
3416 (properties `((python2-variant . ,(delay python2-pystache))))))
3417
3418 (define-public python2-pystache
3419 (package (inherit (package-with-python2
3420 (strip-python2-variant python-pystache)))
3421 (arguments
3422 `(#:python ,python-2
3423 #:phases
3424 (modify-phases %standard-phases
3425 (replace 'check
3426 (lambda _
3427 (invoke "python" "test_pystache.py"))))))))
3428
3429 (define-public python-joblib
3430 (package
3431 (name "python-joblib")
3432 (version "0.14.1")
3433 (source (origin
3434 (method url-fetch)
3435 (uri (pypi-uri "joblib" version))
3436 (sha256
3437 (base32
3438 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3439 (build-system python-build-system)
3440 (arguments
3441 `(#:phases
3442 (modify-phases %standard-phases
3443 (replace 'check
3444 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3445 (native-inputs
3446 `(("python-pytest" ,python-pytest)))
3447 (home-page "https://joblib.readthedocs.io/")
3448 (synopsis "Using Python functions as pipeline jobs")
3449 (description
3450 "Joblib is a set of tools to provide lightweight pipelining in Python.
3451 In particular, joblib offers: transparent disk-caching of the output values
3452 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3453 logging and tracing of the execution.")
3454 (license license:bsd-3)))
3455
3456 (define-public python2-joblib
3457 (package-with-python2 python-joblib))
3458
3459 (define-public python-daemon
3460 (package
3461 (name "python-daemon")
3462 (version "2.2.3")
3463 (source
3464 (origin
3465 (method url-fetch)
3466 (uri (pypi-uri "python-daemon" version))
3467 (sha256
3468 (base32
3469 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3470 (build-system python-build-system)
3471 (arguments
3472 `(#:phases
3473 (modify-phases %standard-phases
3474 (add-before 'check 'disable-tests
3475 (lambda _
3476 ;; FIXME: Determine why test fails
3477 (substitute* "test/test_daemon.py"
3478 (("test_detaches_process_context")
3479 "skip_test_detaches_process_context"))
3480 #t)))))
3481 (propagated-inputs
3482 `(("python-lockfile" ,python-lockfile)))
3483 (native-inputs
3484 `(("python-unittest2" ,python-unittest2)
3485 ("python-testtools" ,python-testtools)
3486 ("python-testscenarios" ,python-testscenarios)
3487 ("python-mock" ,python-mock)
3488 ("python-docutils" ,python-docutils)))
3489 (home-page "https://pagure.io/python-daemon/")
3490 (synopsis "Python library for making a Unix daemon process")
3491 (description "Python-daemon is a library that assists a Python program to
3492 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3493
3494 This library provides a @code{DaemonContext} class that manages the following
3495 important tasks for becoming a daemon process:
3496 @enumerate
3497 @item Detach the process into its own process group.
3498 @item Set process environment appropriate for running inside a chroot.
3499 @item Renounce suid and sgid privileges.
3500 @item Close all open file descriptors.
3501 @item Change the working directory, uid, gid, and umask.
3502 @item Set appropriate signal handlers.
3503 @item Open new file descriptors for stdin, stdout, and stderr.
3504 @item Manage a specified PID lock file.
3505 @item Register cleanup functions for at-exit processing.
3506 @end enumerate")
3507 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3508 (license (list license:asl2.0 license:gpl3+))))
3509
3510 (define-public python-anytree
3511 (package
3512 (name "python-anytree")
3513 (version "2.8.0")
3514 (source (origin
3515 (method url-fetch)
3516 (uri (pypi-uri "anytree" version))
3517 (sha256
3518 (base32
3519 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3520 (build-system python-build-system)
3521 (propagated-inputs
3522 `(("python-six" ,python-six)))
3523 (native-inputs
3524 `(;; For tests.
3525 ("graphviz" ,graphviz) ;for 'dot'
3526 ("python-nose" ,python-nose)))
3527 (home-page "https://github.com/c0fec0de/anytree")
3528 (synopsis "Lightweight tree data library")
3529 (description
3530 "@code{anytree} is a simple, lightweight, and extensible tree data
3531 structure for Python.")
3532 (license license:asl2.0)))
3533
3534 (define-public python-docutils
3535 (package
3536 (name "python-docutils")
3537 (version "0.16")
3538 (source
3539 (origin
3540 (method url-fetch)
3541 (uri (pypi-uri "docutils" version))
3542 (sha256
3543 (base32
3544 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3545 (build-system python-build-system)
3546 (arguments
3547 '(#:phases (modify-phases %standard-phases
3548 (replace 'check
3549 (lambda* (#:key tests? #:allow-other-keys)
3550 (if tests?
3551 (invoke "python" "test/alltests.py")
3552 (format #t "test suite not run~%"))
3553 #t)))))
3554 (home-page "http://docutils.sourceforge.net/")
3555 (synopsis "Python Documentation Utilities")
3556 (description
3557 "Docutils is a modular system for processing documentation into useful
3558 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3559 easy to use markup language, for input.
3560
3561 This package provides tools for converting @file{.rst} files to other formats
3562 via commands such as @command{rst2man}, as well as supporting Python code.")
3563 ;; Most of the source code is public domain, but some source files are
3564 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3565 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3566
3567 (define-public python2-docutils
3568 (package-with-python2 python-docutils))
3569
3570 ;; python2-sphinx fails its test suite with newer versions.
3571 (define-public python2-docutils-0.14
3572 (package
3573 (inherit python2-docutils)
3574 (version "0.14")
3575 (source (origin
3576 (method url-fetch)
3577 (uri (pypi-uri "docutils" version))
3578 (sha256
3579 (base32
3580 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3581
3582 (define-public python-restructuredtext-lint
3583 (package
3584 (name "python-restructuredtext-lint")
3585 (version "1.3.0")
3586 (source
3587 (origin
3588 (method url-fetch)
3589 (uri (pypi-uri "restructuredtext-lint" version))
3590 (sha256
3591 (base32
3592 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3593 (build-system python-build-system)
3594 (arguments
3595 `(#:phases
3596 (modify-phases %standard-phases
3597 (delete 'check)
3598 (add-after 'install 'check
3599 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3600 (when tests?
3601 (add-installed-pythonpath inputs outputs)
3602 (invoke "nosetests" "-v"))
3603 #t)))))
3604 (propagated-inputs
3605 `(("python-docutils" ,python-docutils)))
3606 (native-inputs
3607 `(("python-nose" ,python-nose)))
3608 (home-page "https://github.com/twolfson/restructuredtext-lint")
3609 (synopsis "reStructuredText linter")
3610 (description "This package provides a linter for the reStructuredText
3611 format.")
3612 (license license:unlicense)))
3613
3614 (define-public python-doc8
3615 (package
3616 (name "python-doc8")
3617 (version "0.8.0")
3618 (source
3619 (origin
3620 (method url-fetch)
3621 (uri (pypi-uri "doc8" version))
3622 (sha256
3623 (base32
3624 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3625 (build-system python-build-system)
3626 (arguments
3627 `(#:phases
3628 (modify-phases %standard-phases
3629 (delete 'check)
3630 (add-after 'install 'check
3631 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3632 (when tests?
3633 (add-installed-pythonpath inputs outputs)
3634 (invoke "pytest" "-v"))
3635 #t)))))
3636 (propagated-inputs
3637 `(("python-chardet" ,python-chardet)
3638 ("python-docutils" ,python-docutils)
3639 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3640 ("python-six" ,python-six)
3641 ("python-stevedore" ,python-stevedore)))
3642 (native-inputs
3643 `(("python-testtools" ,python-testtools)
3644 ("python-pytest" ,python-pytest)))
3645 (home-page "https://launchpad.net/doc8")
3646 (synopsis
3647 "Style checker for Sphinx (or other) RST documentation")
3648 (description
3649 "Doc8 is an opinionated style checker for reStructured Text and plain
3650 text styles of documentation.")
3651 (license license:asl2.0)))
3652
3653 (define-public python-pygments
3654 (package
3655 (name "python-pygments")
3656 (version "2.7.3")
3657 (source
3658 (origin
3659 (method url-fetch)
3660 (uri (pypi-uri "Pygments" version))
3661 (sha256
3662 (base32
3663 "05mps9r966r3dpqw6zrs1nlwjdf5y4960hl9m7abwb3qyfnarwyc"))))
3664 (build-system python-build-system)
3665 (arguments
3666 ;; FIXME: Tests require sphinx, which depends on this.
3667 '(#:tests? #f))
3668 (home-page "https://pygments.org/")
3669 (synopsis "Syntax highlighting")
3670 (description
3671 "Pygments is a syntax highlighting package written in Python.")
3672 (license license:bsd-2)
3673 (properties `((python2-variant . ,(delay python2-pygments))))))
3674
3675 ;; Pygments 2.6 and later does not support Python 2.
3676 (define-public python2-pygments
3677 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3678 (package
3679 (inherit base)
3680 (version "2.5.2")
3681 (source (origin
3682 (method url-fetch)
3683 (uri (pypi-uri "Pygments" version))
3684 (sha256
3685 (base32
3686 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3687
3688 (define-public python-bump2version
3689 (package
3690 (name "python-bump2version")
3691 (version "1.0.1")
3692 (source
3693 (origin
3694 (method url-fetch)
3695 (uri (pypi-uri "bump2version" version))
3696 (sha256
3697 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
3698 (build-system python-build-system)
3699 (arguments
3700 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
3701 ;; required: --new-version".
3702 `(#:tests? #false))
3703 (home-page "https://github.com/c4urself/bump2version")
3704 (synopsis "Version-bump your software with a single command!")
3705 (description
3706 "This package provides a small command line tool to simplify releasing
3707 software by updating all version strings in your source code by the correct
3708 increment. It also creates commits and tags.")
3709 (license license:expat)))
3710
3711 (define-public python-bumpversion
3712 (package
3713 (name "python-bumpversion")
3714 (version "0.5.3")
3715 (source
3716 (origin
3717 (method url-fetch)
3718 (uri (pypi-uri "bumpversion" version))
3719 (sha256
3720 (base32
3721 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3722 (build-system python-build-system)
3723 (home-page "https://github.com/peritus/bumpversion")
3724 (synopsis "Tool to bump software version")
3725 (description "This tool provides a command-line interface (CLI) to bump a
3726 software version simply.")
3727 (license license:expat)))
3728
3729 (define-public python-deprecated
3730 (package
3731 (name "python-deprecated")
3732 (version "1.2.5")
3733 (source
3734 (origin
3735 (method git-fetch)
3736 (uri (git-reference
3737 (url "https://github.com/tantale/deprecated")
3738 (commit (string-append "v" version))))
3739 (file-name (git-file-name name version))
3740 (sha256
3741 (base32
3742 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3743 (build-system python-build-system)
3744 (arguments
3745 `(#:phases (modify-phases %standard-phases
3746 (replace 'check
3747 (lambda _
3748 (invoke "pytest"))))))
3749 (propagated-inputs
3750 `(("python-wrapt" ,python-wrapt)))
3751 (native-inputs
3752 `(("python-bumpversion" ,python-bumpversion)
3753 ("python-pytest" ,python-pytest)
3754 ("python-pytest-cov" ,python-pytest-cov)
3755 ("python-sphinx" ,python-sphinx)
3756 ("python-tox" ,python-tox)))
3757 (home-page "https://github.com/tantale/deprecated")
3758 (synopsis "Python decorator to deprecate classes, functions or methods")
3759 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3760 to deprecate classes, functions or methods.")
3761 (license license:expat)))
3762
3763 (define-public python-pygithub
3764 (package
3765 (name "python-pygithub")
3766 (version "1.43.8")
3767 (source
3768 ;; We fetch from the Git repo because there are no tests in the PyPI
3769 ;; archive.
3770 (origin
3771 (method git-fetch)
3772 (uri (git-reference
3773 (url "https://github.com/PyGithub/PyGithub")
3774 (commit (string-append "v" version))))
3775 (file-name (git-file-name name version))
3776 (sha256
3777 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3778 (build-system python-build-system)
3779 (arguments
3780 `(#:phases (modify-phases %standard-phases
3781 ;; Some tests rely on the network.
3782 (add-after 'unpack 'disable-failing-tests
3783 (lambda _
3784 (substitute* "tests/Issue142.py"
3785 (("testDecodeJson") "disabled_testDecodeJson"))
3786 #t))
3787 (add-before 'check 'prepare-for-tests
3788 (lambda _
3789 (for-each (lambda (f)
3790 (chmod f #o666))
3791 (find-files "./tests"))
3792 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3793 (setenv "PYTHONPATH"
3794 (string-append "./tests:" (getenv "PYTHONPATH")))
3795 #t)))))
3796 (propagated-inputs
3797 `(("python-deprecated" ,python-deprecated)
3798 ("python-pyjwt" ,python-pyjwt)
3799 ("python-requests" ,python-requests)))
3800 (native-inputs `(("python-httpretty" ,python-httpretty)))
3801 (home-page "https://pygithub.readthedocs.io/en/latest/")
3802 (synopsis "Python library for the GitHub API")
3803 (description "This library allows managing GitHub resources such as
3804 repositories, user profiles, and organizations in your Python applications,
3805 using version 3 of the GitHub application programming interface (API).")
3806 (license license:lgpl3+)))
3807
3808 (define-public python-rellu
3809 (package
3810 (name "python-rellu")
3811 (version "0.7")
3812 (source
3813 (origin
3814 (method url-fetch)
3815 (uri (pypi-uri "rellu" version))
3816 (sha256
3817 (base32
3818 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3819 (build-system python-build-system)
3820 (propagated-inputs
3821 `(("python-invoke" ,python-invoke)
3822 ("python-pygithub" ,python-pygithub)))
3823 (home-page "https://github.com/robotframework/rellu")
3824 (synopsis "Utilities to create PyPI releases")
3825 (description "This collection of utilities contains tooling and templates
3826 to assist in creating releases on GitHub and publishing them on PyPI. It is
3827 designed to be used by Robot Framework and tools and libraries in its
3828 ecosystem, but can naturally be used also by other projects.")
3829 (license license:asl2.0)))
3830
3831 (define-public python-robotframework
3832 (package
3833 (name "python-robotframework")
3834 (version "3.2.2")
3835 ;; There are no tests in the PyPI archive.
3836 (source
3837 (origin
3838 (method git-fetch)
3839 (uri (git-reference
3840 (url "https://github.com/robotframework/robotframework")
3841 (commit (string-append "v" version))))
3842 (file-name (git-file-name name version))
3843 (sha256
3844 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3845 (patches (search-patches
3846 "python-robotframework-source-date-epoch.patch"))))
3847 (build-system python-build-system)
3848 (arguments
3849 `(#:phases (modify-phases %standard-phases
3850 (add-before 'build 'build-and-install-doc
3851 (lambda* (#:key outputs #:allow-other-keys)
3852 (let* ((doc-output (assoc-ref outputs "doc"))
3853 (doc (string-append doc-output "/share/"
3854 ,name "-" ,version "/")))
3855 (invoke "invoke" "library-docs" "all")
3856 (mkdir-p doc)
3857 (copy-recursively "doc/libraries"
3858 (string-append doc "/libraries"))
3859 #t)))
3860 (replace 'check
3861 (lambda* (#:key inputs #:allow-other-keys)
3862 ;; Some tests require timezone data. Otherwise, they
3863 ;; look up /etc/localtime, which doesn't exist, and fail
3864 ;; with:
3865 ;;
3866 ;; OverflowError: mktime argument out of range
3867 (setenv "TZDIR"
3868 (string-append (assoc-ref inputs "tzdata")
3869 "/share/zoneinfo"))
3870 (setenv "TZ" "Europe/Paris")
3871
3872 (invoke "python" "utest/run.py"))))))
3873 (native-inputs
3874 `(("python-invoke" ,python-invoke)
3875 ("python-rellu" ,python-rellu)
3876 ("python:tk" ,python "tk") ;used when building the HTML doc
3877 ("tzdata" ,tzdata-for-tests)))
3878 (outputs '("out" "doc"))
3879 (home-page "https://robotframework.org")
3880 (synopsis "Generic automation framework")
3881 (description "Robot Framework is a generic automation framework for
3882 acceptance testing, acceptance test driven development (ATDD), and robotic
3883 process automation (RPA).")
3884 (license license:asl2.0)))
3885
3886 (define-public python-robotframework-lint
3887 ;; There is no properly tagged release; the commit below seems to correspond
3888 ;; to the 0.9 stable release available from PyPI. The tests are not
3889 ;; included in the PyPI archive, so we fetch the sources from the upstream
3890 ;; Git repo.
3891 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3892 (revision "0"))
3893 (package
3894 (name "python-robotframework-lint")
3895 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3896 revision commit))
3897 (source
3898 (origin
3899 (method git-fetch)
3900 (uri (git-reference
3901 (url "https://github.com/boakley/robotframework-lint")
3902 (commit commit)))
3903 (file-name (git-file-name name version))
3904 (sha256
3905 (base32
3906 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3907 (build-system python-build-system)
3908 (arguments
3909 `(#:phases
3910 (modify-phases %standard-phases
3911 (replace 'check
3912 (lambda _
3913 (invoke "python" "-m" "robot" "-A"
3914 "tests/conf/default.args" "tests"))))))
3915 (propagated-inputs
3916 `(("python-robotframework" ,python-robotframework)))
3917 (home-page "https://github.com/boakley/robotframework-lint/")
3918 (synopsis "Static analysis tool (linter) for Robot Framework")
3919 (description "This package provides the @code{rflint} command-line
3920 utility, a static analysis tool (linter) for Robot Framework source files.")
3921 (license license:asl2.0))))
3922
3923 (define-public python-robotframework-sshlibrary
3924 (package
3925 (name "python-robotframework-sshlibrary")
3926 (version "3.3.0")
3927 ;; There are no tests in the PyPI archive.
3928 (source
3929 (origin
3930 (method git-fetch)
3931 (uri (git-reference
3932 (url "https://github.com/robotframework/SSHLibrary")
3933 (commit (string-append "v" version))))
3934 (file-name (git-file-name name version))
3935 (sha256
3936 (base32
3937 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3938 (build-system python-build-system)
3939 (arguments
3940 `(#:phases
3941 (modify-phases %standard-phases
3942 (add-before 'build 'build-and-install-doc
3943 (lambda* (#:key outputs #:allow-other-keys)
3944 (let* ((doc-output (assoc-ref outputs "doc"))
3945 (doc (string-append doc-output "/share/"
3946 ,name "-" ,version "/")))
3947 (invoke "chmod" "-R" "+w" "docs")
3948 (invoke "invoke" "kw-docs" "project-docs")
3949 (mkdir-p doc)
3950 (for-each delete-file (find-files "docs" "\\.rst"))
3951 (copy-recursively "docs" doc)
3952 #t)))
3953 (replace 'check
3954 (lambda _
3955 ;; Some tests require an SSH server; we remove them.
3956 (delete-file "utest/test_client_api.py")
3957 (delete-file "utest/test_scp.py")
3958 (invoke "python" "utest/run.py"))))))
3959 (propagated-inputs
3960 `(("python-robotframework" ,python-robotframework)
3961 ("python-paramiko" ,python-paramiko)
3962 ("python-scp" ,python-scp)))
3963 (native-inputs
3964 `(("openssh" ,openssh)
3965 ("which" ,which)
3966 ;; To generate the documentation
3967 ("python-docutils" ,python-docutils)
3968 ("python-invoke" ,python-invoke)
3969 ("python-pygments" ,python-pygments)
3970 ("python-rellu" ,python-rellu)))
3971 (outputs '("out" "doc"))
3972 (home-page "https://github.com/robotframework/SSHLibrary")
3973 (synopsis "Robot Framework library for SSH and SFTP")
3974 (description "SSHLibrary is a Robot Framework library providing support
3975 for SSH and SFTP. It has the following main usages:
3976 @itemize @bullet
3977 @item Executing commands on the remote machine, either blocking or non-blocking.
3978 @item Writing and reading in an interactive shell.
3979 @item Transferring files and directories over SFTP.
3980 @item Ensuring that files and directories exist on the remote machine.
3981 @end itemize")
3982 (license license:asl2.0)))
3983
3984 (define-public python-rstr
3985 (package
3986 (name "python-rstr")
3987 (version "2.2.6")
3988 (source
3989 (origin
3990 (method url-fetch)
3991 (uri (pypi-uri "rstr" version))
3992 (sha256
3993 (base32
3994 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3995 (build-system python-build-system)
3996 (home-page "https://github.com/leapfrogonline/rstr")
3997 (synopsis "Generate random strings in Python")
3998 (description "This package provides a python module for generating
3999 random strings of various types. It could be useful for fuzz testing,
4000 generating dummy data, or other applications. It has no dependencies
4001 outside the standard library.")
4002 (license license:bsd-3)))
4003
4004 (define-public python-scp
4005 (package
4006 (name "python-scp")
4007 (version "0.13.3")
4008 (source
4009 (origin
4010 (method url-fetch)
4011 (uri (pypi-uri "scp" version))
4012 (sha256
4013 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4014 (build-system python-build-system)
4015 (arguments
4016 '(#:tests? #f)) ;tests require an SSH server
4017 (propagated-inputs
4018 `(("python-paramiko" ,python-paramiko)))
4019 (home-page "https://github.com/jbardin/scp.py")
4020 (synopsis "SCP protocol module for Python and Paramiko")
4021 (description "The scp module extends the Paramiko library to send and
4022 receive files via the SCP1 protocol, as implemented by the OpenSSH
4023 @command{scp} program.")
4024 (license license:gpl2+)))
4025
4026 (define-public python-rst.linker
4027 (package
4028 (name "python-rst.linker")
4029 (version "1.11")
4030 (source
4031 (origin
4032 (method url-fetch)
4033 (uri (pypi-uri "rst.linker" version))
4034 (sha256
4035 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4036 (build-system python-build-system)
4037 (propagated-inputs
4038 `(("python-dateutil" ,python-dateutil)
4039 ("python-six" ,python-six)))
4040 (native-inputs
4041 `(("python-setuptools-scm" ,python-setuptools-scm)))
4042 ;; Test would require path.py, which would introduce a cyclic dependence.
4043 (arguments `(#:tests? #f))
4044 ;; Note: As of version 1.7 the documentation is not worth building.
4045 (home-page "https://github.com/jaraco/rst.linker")
4046 (synopsis "Sphinx plugin to add links and timestamps")
4047 (description "rst.linker automatically replaces text by a
4048 reStructuredText external reference or timestamps. It's primary purpose is to
4049 augment the changelog, but it can be used for other documents, too.")
4050 (license license:expat)))
4051
4052 (define-public python2-rst.linker
4053 (package-with-python2 python-rst.linker))
4054
4055 (define-public python-sshpubkeys
4056 (package
4057 (name "python-sshpubkeys")
4058 (version "3.1.0")
4059 (home-page "https://github.com/ojarva/python-sshpubkeys")
4060 (source (origin
4061 (method git-fetch)
4062 (uri (git-reference
4063 (url home-page)
4064 (commit (string-append "v" version))))
4065 (file-name (git-file-name name version))
4066 (sha256
4067 (base32
4068 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4069 (build-system python-build-system)
4070 (propagated-inputs
4071 `(("python-cryptography" ,python-cryptography)
4072 ("python-ecdsa" ,python-ecdsa)))
4073 (synopsis "OpenSSH public key parser")
4074 (description
4075 "This package provides a library for parsing and validating OpenSSH
4076 public key files.")
4077 (license license:bsd-3)))
4078
4079 (define-public python-feedgenerator
4080 (package
4081 (name "python-feedgenerator")
4082 (version "1.9")
4083 (source
4084 (origin
4085 (method url-fetch)
4086 (uri (pypi-uri "feedgenerator" version))
4087 (sha256
4088 (base32
4089 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4090 (modules '((guix build utils)))
4091 (snippet
4092 '(begin
4093 ;; Remove pre-compiled .pyc files from source.
4094 (for-each delete-file-recursively
4095 (find-files "." "__pycache__" #:directories? #t))
4096 (for-each delete-file (find-files "." "\\.pyc$"))
4097 #t))))
4098 (build-system python-build-system)
4099 (propagated-inputs
4100 `(("python-pytz" ,python-pytz)
4101 ("python-six" ,python-six)))
4102 (home-page "https://github.com/getpelican/feedgenerator")
4103 (synopsis
4104 "Standalone version of Django's Atom/RSS feed generator")
4105 (description
4106 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4107 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4108 (license license:bsd-3)))
4109
4110 (define-public python2-feedgenerator
4111 (package-with-python2 python-feedgenerator))
4112
4113 (define-public python-jsonrpc-server
4114 (package
4115 (name "python-jsonrpc-server")
4116 (version "0.4.0")
4117 (source
4118 (origin
4119 (method url-fetch)
4120 (uri (pypi-uri "python-jsonrpc-server" version))
4121 (sha256
4122 (base32
4123 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4124 (build-system python-build-system)
4125 (propagated-inputs
4126 `(("python-mock" ,python-mock)
4127 ("python-pytest" ,python-pytest)
4128 ("python-ujson" ,python-ujson)))
4129 (home-page
4130 "https://github.com/palantir/python-jsonrpc-server")
4131 (synopsis "JSON RPC 2.0 server library")
4132 (description
4133 "This package provides a JSON RPC 2.0 server library for Python.")
4134 (license license:expat)))
4135
4136 (define-public python-pydantic
4137 (package
4138 (name "python-pydantic")
4139 (version "1.6.1")
4140 (source
4141 (origin
4142 (method git-fetch)
4143 (uri (git-reference
4144 (url "https://github.com/samuelcolvin/pydantic")
4145 (commit (string-append "v" version))))
4146 (file-name (git-file-name name version))
4147 (sha256
4148 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4149 (build-system python-build-system)
4150 (arguments
4151 '(#:phases
4152 (modify-phases %standard-phases
4153 ;; Reported upstream:
4154 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4155 ;; Disable the faulty test as the fix is unclear.
4156 (add-before 'check 'disable-test
4157 (lambda _
4158 (substitute* "tests/test_validators.py"
4159 (("test_assert_raises_validation_error")
4160 "_test_assert_raises_validation_error"))
4161 #t))
4162 (replace 'check
4163 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4164 (native-inputs
4165 `(("python-pytest" ,python-pytest)))
4166 (home-page "https://github.com/samuelcolvin/pydantic")
4167 (synopsis "Python data validation and settings management")
4168 (description
4169 "Pydantic enforces type hints at runtime, and provides user friendly
4170 errors when data is invalid.")
4171 (license license:expat)))
4172
4173 (define-public python-pydocstyle
4174 (package
4175 (name "python-pydocstyle")
4176 (version "3.0.0")
4177 (source
4178 (origin
4179 (method url-fetch)
4180 (uri (pypi-uri "pydocstyle" version))
4181 (sha256
4182 (base32
4183 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4184 (build-system python-build-system)
4185 (propagated-inputs
4186 `(("python-six" ,python-six)
4187 ("python-snowballstemmer" ,python-snowballstemmer)))
4188 (home-page
4189 "https://github.com/PyCQA/pydocstyle/")
4190 (synopsis "Python docstring style checker")
4191 (description
4192 "This package provides a style checker for the Python Language
4193 Server (PLS).")
4194 (license license:expat)))
4195
4196 (define-public python-language-server
4197 (package
4198 (name "python-language-server")
4199 (version "0.36.2")
4200 (source
4201 (origin
4202 (method url-fetch)
4203 (uri (pypi-uri "python-language-server" version))
4204 (sha256
4205 (base32
4206 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4207 (build-system python-build-system)
4208 (propagated-inputs
4209 `(("python-autopep8" ,python-autopep8)
4210 ("python-configparser" ,python-configparser)
4211 ("python-pydocstyle" ,python-pydocstyle)
4212 ("python-future" ,python-future)
4213 ("python-jedi" ,python-jedi)
4214 ("python-jsonrpc-server" ,python-jsonrpc-server)
4215 ("python-pluggy" ,python-pluggy)
4216 ("python-pycodestyle" ,python-pycodestyle)
4217 ("python-pyflakes" ,python-pyflakes)
4218 ("python-rope" ,python-rope)
4219 ("python-ujson" ,python-ujson)
4220 ("python-yapf" ,python-yapf)))
4221 (native-inputs
4222 `(("python-coverage" ,python-coverage)
4223 ("python-flaky" ,python-flaky)
4224 ("python-matplotlib" ,python-matplotlib)
4225 ("python-mock" ,python-mock)
4226 ("python-numpy" ,python-numpy)
4227 ("python-pandas" ,python-pandas)
4228 ("python-pylint" ,python-pylint)
4229 ("python-pytest" ,python-pytest)
4230 ("python-pytest-cov" ,python-pytest-cov)
4231 ("python-versioneer" ,python-versioneer)))
4232 (home-page "https://github.com/palantir/python-language-server")
4233 (synopsis "Python implementation of the Language Server Protocol")
4234 (description
4235 "The Python Language Server (pyls) is an implementation of the Python 3
4236 language specification for the Language Server Protocol (LSP). This tool is
4237 used in text editing environments to provide a complete and integrated
4238 feature-set for programming Python effectively.")
4239 (license license:expat)))
4240
4241 (define-public python-pathspec
4242 (package
4243 (name "python-pathspec")
4244 (version "0.7.0")
4245 (source
4246 (origin
4247 (method url-fetch)
4248 (uri (pypi-uri "pathspec" version))
4249 (sha256
4250 (base32
4251 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4252 (build-system python-build-system)
4253 (home-page "https://github.com/cpburnz/python-path-specification")
4254 (synopsis "Utility library for gitignore style pattern matching of file paths")
4255 (description
4256 "This package provides a utility library for gitignore style pattern
4257 matching of file paths.")
4258 (license license:mpl2.0)))
4259
4260 (define-public python-black
4261 (package
4262 (name "python-black")
4263 (version "20.8b1")
4264 (source
4265 (origin
4266 (method url-fetch)
4267 (uri (pypi-uri "black" version))
4268 (sha256
4269 (base32
4270 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4271 (build-system python-build-system)
4272 (arguments
4273 `(#:phases
4274 (modify-phases %standard-phases
4275 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4276 (lambda _
4277 (let ((python3 (which "python3")))
4278 (substitute* '("tests/data/fmtonoff.py"
4279 "tests/data/string_prefixes.py"
4280 "tests/data/function.py"
4281 "tests/data/python37.py")
4282 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4283 (string-append "#!" python3 (if (string? minor-version)
4284 minor-version
4285 "")))))
4286 #t))
4287 (add-after 'unpack 'disable-broken-tests
4288 (lambda* (#:key outputs inputs #:allow-other-keys)
4289 ;; Make installed package available for running the tests
4290 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4291 ":" (getenv "PATH")))
4292
4293 ;; These tests are supposed to be skipped when the blackd
4294 ;; dependencies are missing, but this doesn't quite work.
4295 (substitute* "tests/test_black.py"
4296 (("( *)class BlackDTestCase.*" match indent)
4297 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4298 indent "class BlackDTestCase(unittest.TestCase):\n"))
4299 (("web.Application") "False")
4300 (("@unittest_run_loop") ""))
4301
4302 ;; Patching the above file breaks the self test
4303 (substitute* "tests/test_black.py"
4304 (("( *)def test_self" match indent)
4305 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4306
4307 (substitute* "tests/test_black.py"
4308 (("( *)def test_python38" match indent)
4309 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4310 #t)))))
4311 (propagated-inputs
4312 `(("python-click" ,python-click)
4313 ("python-attrs" ,python-attrs)
4314 ("python-appdirs" ,python-appdirs)
4315 ("python-pathspec" ,python-pathspec)
4316 ("python-mypy-extensions" ,python-mypy-extensions)
4317 ("python-regex" ,python-regex)
4318 ("python-toml" ,python-toml)
4319 ("python-typed-ast" ,python-typed-ast)
4320 ("python-typing-extensions" ,python-typing-extensions)))
4321 (native-inputs
4322 `(("python-setuptools-scm" ,python-setuptools-scm)))
4323 (home-page "https://github.com/ambv/black")
4324 (synopsis "The uncompromising code formatter")
4325 (description "Black is the uncompromising Python code formatter.")
4326 (license license:expat)))
4327
4328 (define-public python-black-macchiato
4329 (package
4330 (name "python-black-macchiato")
4331 (version "1.3.0")
4332 (source
4333 (origin
4334 (method url-fetch)
4335 (uri (pypi-uri "black-macchiato" version))
4336 (sha256
4337 (base32
4338 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4339 (build-system python-build-system)
4340 (propagated-inputs
4341 `(("python-black" ,python-black)))
4342 (home-page "https://github.com/wbolster/black-macchiato")
4343 (synopsis "Partial @code{python-black} formatting")
4344 (description
4345 "This package is built on top the @{python-black} code formatter to
4346 enable formatting of partial files.")
4347 (license license:bsd-3)))
4348
4349 (define-public python-blinker
4350 (package
4351 (name "python-blinker")
4352 (version "1.4")
4353 (source
4354 (origin
4355 (method url-fetch)
4356 (uri (pypi-uri "blinker" version))
4357 (sha256
4358 (base32
4359 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4360 (build-system python-build-system)
4361 (home-page "https://pythonhosted.org/blinker/")
4362 (synopsis "Fast, simple object-to-object and broadcast signaling")
4363 (description
4364 "Blinker provides a fast dispatching system that allows any number of
4365 interested parties to subscribe to events, or \"signals\".")
4366 (license license:expat)))
4367
4368 (define-public python2-blinker
4369 (package-with-python2 python-blinker))
4370
4371 (define-public pelican
4372 (package
4373 (name "pelican")
4374 (version "4.2.0")
4375 (source
4376 (origin
4377 (method url-fetch)
4378 (uri (pypi-uri "pelican" version))
4379 (sha256
4380 (base32
4381 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4382 (build-system python-build-system)
4383 (propagated-inputs
4384 `(("python-blinker" ,python-blinker)
4385 ("python-dateutil" ,python-dateutil)
4386 ("python-docutils" ,python-docutils)
4387 ("python-feedgenerator" ,python-feedgenerator)
4388 ("python-jinja2" ,python-jinja2)
4389 ("python-markdown" ,python-markdown)
4390 ("python-pygments" ,python-pygments)
4391 ("python-pytz" ,python-pytz)
4392 ("python-six" ,python-six)
4393 ("python-unidecode" ,python-unidecode)))
4394 (home-page "https://getpelican.com/")
4395 (arguments
4396 `(;; XXX Requires a lot more packages to do unit tests :P
4397 #:tests? #f))
4398 (synopsis "Python-based static site publishing system")
4399 (description
4400 "Pelican is a tool to generate a static blog from reStructuredText,
4401 Markdown input files, and more. Pelican uses Jinja2 for templating
4402 and is very extensible.")
4403 (license license:agpl3+)))
4404
4405 (define-public mallard-ducktype
4406 (package
4407 (name "mallard-ducktype")
4408 (version "1.0.2")
4409 (source
4410 (origin
4411 (method git-fetch)
4412 ;; git-reference because tests are not included in pypi source tarball
4413 ;; https://issues.guix.gnu.org/issue/36755#2
4414 (uri (git-reference
4415 (url "https://github.com/projectmallard/mallard-ducktype")
4416 (commit version)))
4417 (file-name (git-file-name name version))
4418 (sha256
4419 (base32
4420 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4421 (build-system python-build-system)
4422 (arguments
4423 '(#:phases
4424 (modify-phases %standard-phases
4425 (replace 'check
4426 (lambda _
4427 (with-directory-excursion "tests"
4428 (invoke "sh" "runtests")))))))
4429 (home-page "http://projectmallard.org")
4430 (synopsis "Convert Ducktype to Mallard documentation markup")
4431 (description
4432 "Ducktype is a lightweight syntax that can represent all the semantics
4433 of the Mallard XML documentation system. Ducktype files can be converted to
4434 Mallard using the @command{ducktype} tool. The yelp-tools package
4435 provides additional functionality on the produced Mallard documents.")
4436 (license license:expat)))
4437
4438 (define-public python-cython
4439 (package
4440 (name "python-cython")
4441 (version "0.29.21")
4442 (source
4443 (origin
4444 (method url-fetch)
4445 (uri (pypi-uri "Cython" version))
4446 (sha256
4447 (base32
4448 "1bcwpra7c6k30yvic3sw2v3rq2dr40ypc4zqif6kr52mpn4wnyp5"))))
4449 (build-system python-build-system)
4450 ;; we need the full python package and not just the python-wrapper
4451 ;; because we need libpython3.3m.so
4452 (inputs
4453 `(("python" ,python)))
4454 (arguments
4455 `(#:phases
4456 (modify-phases %standard-phases
4457 (add-before 'check 'set-HOME
4458 ;; some tests require access to "$HOME/.cython"
4459 (lambda _ (setenv "HOME" "/tmp") #t))
4460 (replace 'check
4461 (lambda _
4462 ;; Disable compiler optimizations to greatly reduce the running
4463 ;; time of the test suite.
4464 (setenv "CFLAGS" "-O0")
4465
4466 (invoke "python" "runtests.py" "-vv"
4467 "-j" (number->string (parallel-job-count))
4468 ;; XXX: On 32-bit architectures, running the parallel tests
4469 ;; fails on many-core systems, see
4470 ;; <https://github.com/cython/cython/issues/2807>.
4471 ,@(if (not (target-64bit?))
4472 '("-x" "run.parallel")
4473 '())))))))
4474 (home-page "https://cython.org/")
4475 (synopsis "C extensions for Python")
4476 (description "Cython is an optimising static compiler for both the Python
4477 programming language and the extended Cython programming language. It makes
4478 writing C extensions for Python as easy as Python itself.")
4479 (license license:asl2.0)
4480 (properties `((python2-variant . ,(delay python2-cython))))))
4481
4482 (define-public python2-cython
4483 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4484 (package
4485 (inherit base)
4486 (name "python2-cython")
4487 (inputs
4488 `(("python-2" ,python-2))) ;this is not automatically changed
4489 (arguments
4490 (substitute-keyword-arguments (package-arguments base)
4491 ((#:phases phases)
4492 `(modify-phases ,phases
4493 (add-before 'check 'adjust-test_embed
4494 (lambda _
4495 (substitute* "runtests.py"
4496 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4497 ;; so it can give the right -L flag to GCC when embedding static
4498 ;; builds of Python. It is unaware that the Python "config"
4499 ;; directory (where the static library lives) was renamed in
4500 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4501 ;; which works fine, because that is where the shared library is.
4502 ;;
4503 ;; It also appears to be unaware that the Makefile in Demos/embed
4504 ;; already unconditionally pass the static library location to GCC,
4505 ;; after checking sysconfig.get_config_var('LIBPL).
4506 ;;
4507 ;; The effect is that the linker is unable to resolve libexpat
4508 ;; symbols when building for Python 2, because neither the Python 2
4509 ;; shared library nor Expat is available. To fix it, we can either
4510 ;; add Expat as an input and make it visible to the linker, or just
4511 ;; prevent it from overriding the Python shared library location.
4512 ;; The end result is identical, so we take the easy route.
4513 ((" or libname not in os\\.listdir\\(libdir\\)")
4514 ""))
4515 #t)))))))))
4516
4517 ;; The RPython toolchain currently does not support Python 3.
4518 (define-public python2-rpython
4519 (package
4520 (name "python2-rpython")
4521 (version "0.2.1")
4522 (source
4523 (origin
4524 (method url-fetch)
4525 (uri (pypi-uri "rpython" version))
4526 (sha256
4527 (base32
4528 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4529 (build-system python-build-system)
4530 (arguments `(#:python ,python-2))
4531 (native-inputs
4532 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4533 (home-page "https://rpython.readthedocs.org")
4534 (synopsis "Framework for implementing interpreters and virtual machines")
4535 (description "RPython is a translation and support framework for
4536 producing implementations of dynamic languages, emphasizing a clean separation
4537 between language specification and implementation aspects.")
4538 (license license:expat)))
4539
4540 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4541 ;; python-scipy still build, as these three packages are often used together.
4542 (define-public python-numpy
4543 (package
4544 (name "python-numpy")
4545 (version "1.17.3")
4546 (source
4547 (origin
4548 (method url-fetch)
4549 (uri (string-append
4550 "https://github.com/numpy/numpy/releases/download/v"
4551 version "/numpy-" version ".tar.gz"))
4552 (sha256
4553 (base32
4554 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4555 (build-system python-build-system)
4556 (inputs
4557 `(("openblas" ,openblas)
4558 ("lapack" ,lapack)))
4559 (native-inputs
4560 `(("python-cython" ,python-cython)
4561 ("python-pytest" ,python-pytest)
4562 ("gfortran" ,gfortran)))
4563 (arguments
4564 `(#:phases
4565 (modify-phases %standard-phases
4566 (add-before 'build 'configure-blas-lapack
4567 (lambda* (#:key inputs #:allow-other-keys)
4568 (call-with-output-file "site.cfg"
4569 (lambda (port)
4570 (format port
4571 "[openblas]
4572 libraries = openblas
4573 library_dirs = ~a/lib
4574 include_dirs = ~a/include
4575
4576 # backslash-n to make emacs happy
4577 \n[lapack]
4578 lapack_libs = lapack
4579 library_dirs = ~a/lib
4580 include_dirs = ~a/include
4581 "
4582 (assoc-ref inputs "openblas")
4583 (assoc-ref inputs "openblas")
4584 (assoc-ref inputs "lapack")
4585 (assoc-ref inputs "lapack"))))
4586 #t))
4587 (add-before 'build 'fix-executable-paths
4588 (lambda* (#:key inputs #:allow-other-keys)
4589 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4590 ;; instead of /bin/sh.
4591 (substitute* "numpy/distutils/exec_command.py"
4592 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4593 (string-append match-start (assoc-ref inputs "bash") match-end)))
4594 ;; Use "gcc" executable, not "cc".
4595 (substitute* "numpy/distutils/system_info.py"
4596 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4597 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4598 #t))
4599 ;; Tests can only be run after the library has been installed and not
4600 ;; within the source directory.
4601 (delete 'check)
4602 (add-after 'install 'check
4603 (lambda* (#:key outputs inputs #:allow-other-keys)
4604 ;; Make installed package available for running the tests
4605 (add-installed-pythonpath inputs outputs)
4606 ;; Make sure "f2py" etc is found.
4607 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4608 ":" (getenv "PATH")))
4609 (with-directory-excursion "/tmp"
4610 (invoke "python" "-c"
4611 "import numpy; numpy.test(verbose=2)")))))))
4612 (home-page "https://numpy.org")
4613 (synopsis "Fundamental package for scientific computing with Python")
4614 (description "NumPy is the fundamental package for scientific computing
4615 with Python. It contains among other things: a powerful N-dimensional array
4616 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4617 and Fortran code, useful linear algebra, Fourier transform, and random number
4618 capabilities.")
4619 (properties `((python2-variant . ,(delay python2-numpy))))
4620 (license license:bsd-3)))
4621
4622 ;; Numpy 1.16.x are the last versions that support Python 2.
4623 (define-public python2-numpy
4624 (let ((numpy (package-with-python2
4625 (strip-python2-variant python-numpy))))
4626 (package/inherit
4627 numpy
4628 (version "1.16.5")
4629 (source (origin
4630 (method url-fetch)
4631 (uri (string-append
4632 "https://github.com/numpy/numpy/releases/download/v"
4633 version "/numpy-" version ".tar.gz"))
4634 (sha256
4635 (base32
4636 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4637
4638 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4639 ;; interest only for legacy code going back to NumPy's predecessor
4640 ;; Numeric.
4641 (define-public python2-numpy-1.8
4642 (package (inherit python2-numpy)
4643 (version "1.8.2")
4644 (source
4645 (origin
4646 (method git-fetch)
4647 (uri (git-reference
4648 (url "https://github.com/numpy/numpy")
4649 (commit (string-append "v" version))))
4650 (file-name (git-file-name "numpy" version))
4651 (sha256
4652 (base32
4653 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4654 (arguments
4655 (substitute-keyword-arguments (package-arguments python2-numpy)
4656 ((#:phases phases)
4657 `(modify-phases ,phases
4658 (replace 'configure-blas-lapack
4659 (lambda* (#:key inputs #:allow-other-keys)
4660 (call-with-output-file "site.cfg"
4661 (lambda (port)
4662 (format port
4663 "[openblas]
4664 libraries = openblas,lapack
4665 library_dirs = ~a/lib:~a/lib
4666 include_dirs = ~a/include:~a/include
4667 "
4668 (assoc-ref inputs "openblas")
4669 (assoc-ref inputs "lapack")
4670 (assoc-ref inputs "openblas")
4671 (assoc-ref inputs "lapack"))))
4672 #t))))))
4673 (native-inputs
4674 `(("python2-nose" ,python2-nose)))
4675 (description "NumPy is the fundamental package for scientific computing
4676 with Python. It contains among other things: a powerful N-dimensional array
4677 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4678 and Fortran code, useful linear algebra, Fourier transform, and random number
4679 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4680 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4681 Numeric.")
4682 (license license:bsd-3)))
4683
4684 (define-public python-munch
4685 (package
4686 (name "python-munch")
4687 (version "2.0.4")
4688 (source
4689 (origin
4690 (method url-fetch)
4691 (uri (pypi-uri "munch" version))
4692 (sha256
4693 (base32
4694 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4695 (build-system python-build-system)
4696 (home-page "https://github.com/Infinidat/munch")
4697 (synopsis "Dot-accessible dictionary")
4698 (description "Munch is a dot-accessible dictionary similar to JavaScript
4699 objects.")
4700 (license license:expat)))
4701
4702 (define-public python2-munch
4703 (package-with-python2 python-munch))
4704
4705 (define-public python-colormath
4706 (package
4707 (name "python-colormath")
4708 (version "3.0.0")
4709 (source
4710 (origin
4711 (method url-fetch)
4712 (uri (pypi-uri "colormath" version))
4713 (sha256
4714 (base32
4715 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4716 (build-system python-build-system)
4717 (propagated-inputs
4718 `(("python-networkx" ,python-networkx)
4719 ("python-numpy" ,python-numpy)))
4720 (home-page "https://github.com/gtaylor/python-colormath")
4721 (synopsis "Color math and conversion library")
4722 (description
4723 "This is a Python library for color math and conversions.")
4724 (license license:bsd-3)))
4725
4726 (define-public python2-colormath
4727 (package-with-python2 python-colormath))
4728
4729 (define-public python-spectra
4730 (package
4731 (name "python-spectra")
4732 (version "0.0.11")
4733 (source
4734 (origin
4735 (method url-fetch)
4736 (uri (pypi-uri "spectra" version))
4737 (sha256
4738 (base32
4739 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4740 (build-system python-build-system)
4741 (arguments
4742 `(#:phases
4743 (modify-phases %standard-phases
4744 (replace 'check
4745 (lambda _ (invoke "nosetests" "-v"))))))
4746 (propagated-inputs
4747 `(("python-colormath" ,python-colormath)))
4748 (native-inputs
4749 `(("python-nose" ,python-nose)))
4750 (home-page "https://github.com/jsvine/spectra")
4751 (synopsis "Color scales and color conversion")
4752 (description
4753 "This package provides a Python library intended to make color math,
4754 color scales, and color space conversion easy. It has support for:
4755
4756 @enumerate
4757 @item Color scales
4758 @item Color ranges
4759 @item Color blending
4760 @item Brightening/darkening colors
4761 @item Saturating/desaturating colors
4762 @item Conversion to/from multiple color spaces.
4763 @end enumerate\n")
4764 (license license:expat)))
4765
4766 (define-public python2-spectra
4767 (package-with-python2 python-spectra))
4768
4769 (define-public python-numpy-documentation
4770 (package
4771 (name "python-numpy-documentation")
4772 (version (package-version python-numpy))
4773 (source (package-source python-numpy))
4774 (build-system python-build-system)
4775 (native-inputs
4776 `(("python-matplotlib" ,python-matplotlib)
4777 ("python-numpy" ,python-numpy)
4778 ("pkg-config" ,pkg-config)
4779 ("python-sphinx" ,python-sphinx)
4780 ("python-numpydoc" ,python-numpydoc)
4781 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4782 texlive-fonts-ec
4783 texlive-generic-ifxetex
4784 texlive-generic-pdftex
4785 texlive-amsfonts
4786 texlive-latex-capt-of
4787 texlive-latex-cmap
4788 texlive-latex-environ
4789 texlive-latex-eqparbox
4790 texlive-latex-etoolbox
4791 texlive-latex-expdlist
4792 texlive-latex-fancyhdr
4793 texlive-latex-fancyvrb
4794 texlive-latex-fncychap
4795 texlive-latex-float
4796 texlive-latex-framed
4797 texlive-latex-geometry
4798 texlive-latex-graphics
4799 texlive-latex-hyperref
4800 texlive-latex-mdwtools
4801 texlive-latex-multirow
4802 texlive-latex-needspace
4803 texlive-latex-oberdiek
4804 texlive-latex-parskip
4805 texlive-latex-preview
4806 texlive-latex-tabulary
4807 texlive-latex-threeparttable
4808 texlive-latex-titlesec
4809 texlive-latex-trimspaces
4810 texlive-latex-ucs
4811 texlive-latex-upquote
4812 texlive-latex-url
4813 texlive-latex-varwidth
4814 texlive-latex-wrapfig)))
4815 ("texinfo" ,texinfo)
4816 ("perl" ,perl)
4817 ("scipy-sphinx-theme"
4818 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
4819 (origin ;the build script expects scipy-sphinx-theme as a git submodule
4820 (method git-fetch)
4821 (uri (git-reference
4822 (url "https://github.com/scipy/scipy-sphinx-theme")
4823 (commit commit)))
4824 (file-name (git-file-name "python-scipy-sphinx-theme"
4825 (string-take commit 7)))
4826 (sha256
4827 (base32
4828 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
4829 ,@(package-native-inputs python-numpy)))
4830 (arguments
4831 `(#:tests? #f ; we're only generating the documentation
4832 #:phases
4833 (modify-phases %standard-phases
4834 (delete 'build)
4835 (replace 'install
4836 (lambda* (#:key inputs outputs #:allow-other-keys)
4837 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4838 (doc (string-append
4839 data "/doc/" ,name "-"
4840 ,(package-version python-numpy)))
4841 (info-reader (string-append data "/info"))
4842 (html (string-append doc "/html"))
4843 (scipy-sphinx-theme "scipy-sphinx-theme")
4844 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4845 (pyver ,(string-append "PYVER=")))
4846
4847 ;; FIXME: this is needed to for texlive-union to generate
4848 ;; fonts, which are not found.
4849 (setenv "HOME" "/tmp")
4850
4851 (with-directory-excursion "doc"
4852 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4853 (mkdir-p html)
4854 (invoke "make" "html" pyver)
4855 (invoke "make" "latex" "PAPER=a4" pyver)
4856 (invoke "make" "-C" "build/latex"
4857 "all-pdf" "PAPER=a4" pyver)
4858 ;; FIXME: Generation of the info file fails.
4859 ;; (invoke "make" "info" pyver)
4860 ;; (mkdir-p info)
4861 ;; (copy-file "build/texinfo/numpy.info"
4862 ;; (string-append info "/numpy.info"))
4863 (for-each (lambda (file)
4864 (copy-file (string-append "build/latex" file)
4865 (string-append doc file)))
4866 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4867 (with-directory-excursion "build/html"
4868 (for-each (lambda (file)
4869 (let* ((dir (dirname file))
4870 (tgt-dir (string-append html "/" dir)))
4871 (unless (equal? "." dir)
4872 (mkdir-p tgt-dir))
4873 (install-file file html)))
4874 (find-files "." ".*")))))
4875 #t)))))
4876 (home-page (package-home-page python-numpy))
4877 (synopsis "Documentation for the python-numpy package")
4878 (description (package-description python-numpy))
4879 (license (package-license python-numpy))))
4880
4881 (define-public python2-numpy-documentation
4882 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4883 (package
4884 (inherit numpy-documentation)
4885 (native-inputs `(("python2-functools32" ,python2-functools32)
4886 ,@(package-native-inputs numpy-documentation))))))
4887
4888 (define-public python-pygit2
4889 (package
4890 (name "python-pygit2")
4891 (version "1.4.0")
4892 (source
4893 (origin
4894 (method url-fetch)
4895 (uri (pypi-uri "pygit2" version))
4896 (sha256
4897 (base32 "1j71iskvirkm8jzfmwdm79v69878m9iix8a8cn4xidgr3nmkisyb"))))
4898 (build-system python-build-system)
4899 (arguments
4900 '(#:tests? #f)) ; tests don't run correctly in our environment
4901 (propagated-inputs
4902 `(("python-cached-property" ,python-cached-property)
4903 ("python-cffi" ,python-cffi)
4904 ("libgit2" ,libgit2)))
4905 (native-inputs
4906 `(("python-pytest" ,python-pytest)))
4907 (home-page "https://github.com/libgit2/pygit2")
4908 (synopsis "Python bindings for libgit2")
4909 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4910 library, libgit2 implements Git plumbing.")
4911 ;; GPL2.0 only, with linking exception.
4912 (license license:gpl2)))
4913
4914 (define-public python-patiencediff
4915 (package
4916 (name "python-patiencediff")
4917 (version "0.2.0")
4918 (source
4919 (origin
4920 (method url-fetch)
4921 (uri (pypi-uri "patiencediff" version))
4922 (sha256
4923 (base32
4924 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4925 (build-system python-build-system)
4926 (home-page "https://www.breezy-vcs.org/")
4927 (synopsis "Python implementation of the patiencediff algorithm")
4928 (description
4929 "This package contains a Python implementation of the @code{patiencediff}
4930 algorithm. Patiencediff provides a good balance of performance, nice output for
4931 humans, and implementation simplicity.")
4932 (license license:gpl2)))
4933
4934 (define-public python-pdftotext
4935 (package
4936 (name "python-pdftotext")
4937 (version "2.1.5")
4938 (source
4939 (origin
4940 (method url-fetch)
4941 (uri (pypi-uri "pdftotext" version))
4942 (sha256
4943 (base32
4944 "19la1cw1hmkcr8big04gm2dd5fw0y0z97g930aiy29s1gaqbiblq"))))
4945 (build-system python-build-system)
4946 (inputs
4947 `(("poppler" ,poppler)))
4948 (home-page "https://github.com/jalan/pdftotext")
4949 (synopsis "Simple PDF text extraction")
4950 (description "Pdftotext is a Python library of PDF text extraction.")
4951 (license license:expat)))
4952
4953 (define-public python-pyparsing
4954 (package
4955 (name "python-pyparsing")
4956 (version "2.4.6")
4957 (source
4958 (origin
4959 (method url-fetch)
4960 (uri (pypi-uri "pyparsing" version))
4961 (sha256
4962 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4963 (build-system python-build-system)
4964 (outputs '("out" "doc"))
4965 (arguments
4966 `(#:tests? #f ; no test target
4967 #:phases
4968 (modify-phases %standard-phases
4969 (add-after 'install 'install-doc
4970 (lambda* (#:key outputs #:allow-other-keys)
4971 (let* ((doc (string-append (assoc-ref outputs "doc")
4972 "/share/doc/" ,name "-" ,version))
4973 (html-doc (string-append doc "/html"))
4974 (examples (string-append doc "/examples")))
4975 (mkdir-p html-doc)
4976 (mkdir-p examples)
4977 (for-each
4978 (lambda (dir tgt)
4979 (map (lambda (file)
4980 (install-file file tgt))
4981 (find-files dir ".*")))
4982 (list "docs" "htmldoc" "examples")
4983 (list doc html-doc examples))
4984 #t))))))
4985 (home-page "https://github.com/pyparsing/pyparsing")
4986 (synopsis "Python parsing class library")
4987 (description
4988 "The pyparsing module is an alternative approach to creating and
4989 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4990 of regular expressions. The pyparsing module provides a library of classes
4991 that client code uses to construct the grammar directly in Python code.")
4992 (license license:expat)))
4993
4994 (define-public python2-pyparsing
4995 (package-with-python2 python-pyparsing))
4996
4997 (define-public python-pyparsing-2.4.7
4998 (package
4999 (inherit python-pyparsing)
5000 (version "2.4.7")
5001 (source
5002 (origin
5003 (method url-fetch)
5004 (uri (pypi-uri "pyparsing" version))
5005 (sha256
5006 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5007
5008 (define-public python-numpydoc
5009 (package
5010 (name "python-numpydoc")
5011 (version "0.8.0")
5012 (source
5013 (origin
5014 (method url-fetch)
5015 (uri (pypi-uri "numpydoc" version))
5016 (sha256
5017 (base32
5018 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5019 (build-system python-build-system)
5020 (propagated-inputs
5021 `(("python-sphinx" ,python-sphinx)))
5022 (native-inputs
5023 `(("python-nose" ,python-nose)))
5024 (home-page "https://pypi.org/project/numpydoc/")
5025 (synopsis
5026 "Numpy's Sphinx extensions")
5027 (description
5028 "Sphinx extension to support docstrings in Numpy format.")
5029 (license license:bsd-2)
5030 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5031
5032 (define-public python2-numpydoc
5033 (let ((base (package-with-python2
5034 (strip-python2-variant python-numpydoc))))
5035 (package
5036 (inherit base)
5037 (propagated-inputs
5038 `(("python2-jinja2" ,python2-jinja2)
5039 ,@(package-propagated-inputs base))))))
5040
5041 (define-public python-numexpr
5042 (package
5043 (name "python-numexpr")
5044 (version "2.6.5")
5045 (source
5046 (origin
5047 (method url-fetch)
5048 (uri (pypi-uri "numexpr" version))
5049 (sha256
5050 (base32
5051 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
5052 (build-system python-build-system)
5053 (arguments `(#:tests? #f)) ; no tests included
5054 (propagated-inputs
5055 `(("python-numpy" ,python-numpy)))
5056 (home-page "https://github.com/pydata/numexpr")
5057 (synopsis "Fast numerical expression evaluator for NumPy")
5058 (description
5059 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5060 expressions that operate on arrays are accelerated and use less memory than
5061 doing the same calculation in Python. In addition, its multi-threaded
5062 capabilities can make use of all your cores, which may accelerate
5063 computations, most specially if they are not memory-bounded (e.g. those using
5064 transcendental functions).")
5065 (license license:expat)))
5066
5067 (define-public python2-numexpr
5068 (package-with-python2 python-numexpr))
5069
5070 (define-public python-cycler
5071 (package
5072 (name "python-cycler")
5073 (version "0.10.0")
5074 (source (origin
5075 (method url-fetch)
5076 (uri (pypi-uri "cycler" version))
5077 (sha256
5078 (base32
5079 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5080 (build-system python-build-system)
5081 (arguments
5082 ;; XXX: The current version requires 'coveralls' which we don't have.
5083 ;; Enable this for the next release which uses 'python-pytest'.
5084 '(#:tests? #f))
5085 (propagated-inputs
5086 `(("python-six" ,python-six)))
5087 (home-page "https://matplotlib.org/cycler/")
5088 (synopsis "Composable keyword argument iterator")
5089 (description
5090 "When using @code{matplotlib} and plotting more than one line, it is
5091 common to want to be able to want to be able to cycle over one or more artist
5092 styles; but the plotting logic can quickly become involved.
5093 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5094 @code{Cycler} class was developed.")
5095 (license license:bsd-3)))
5096
5097 (define-public python2-cycler
5098 (package-with-python2 python-cycler))
5099
5100 (define-public python-colorspacious
5101 (package
5102 (name "python-colorspacious")
5103 (version "1.1.2")
5104 (source
5105 (origin
5106 (method git-fetch)
5107 (uri (git-reference
5108 (url "https://github.com/njsmith/colorspacious")
5109 (commit (string-append "v" version))))
5110 (file-name (git-file-name name version))
5111 (sha256
5112 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5113 (build-system python-build-system)
5114 (propagated-inputs
5115 `(("python-numpy" ,python-numpy)))
5116 (native-inputs
5117 `(("python-nose" ,python-nose)))
5118 (arguments
5119 `(#:phases
5120 (modify-phases %standard-phases
5121 (replace 'check
5122 (lambda _
5123 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5124 (home-page "https://github.com/njsmith/colorspacious")
5125 (synopsis "Python library for colorspace conversions")
5126 (description "@code{colorspacious} is a Python library that lets you
5127 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5128 (license license:expat)))
5129
5130 (define-public python2-colorspacious
5131 (package-with-python2 python-colorspacious))
5132
5133 (define-public python-matplotlib
5134 (package
5135 (name "python-matplotlib")
5136 (version "3.1.2")
5137 (source
5138 (origin
5139 (method url-fetch)
5140 (uri (pypi-uri "matplotlib" version))
5141 (sha256
5142 (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
5143 (patches
5144 (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
5145 (build-system python-build-system)
5146 (propagated-inputs ; the following packages are all needed at run time
5147 `(("python-cycler" ,python-cycler)
5148 ("python-kiwisolver" ,python-kiwisolver)
5149 ("python-pyparsing" ,python-pyparsing)
5150 ("python-pygobject" ,python-pygobject)
5151 ("gobject-introspection" ,gobject-introspection)
5152 ("python-tkinter" ,python "tk")
5153 ("python-dateutil" ,python-dateutil)
5154 ("python-numpy" ,python-numpy)
5155 ("python-pillow" ,python-pillow)
5156 ("python-pytz" ,python-pytz)
5157 ("python-six" ,python-six)
5158 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5159 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5160 ;; object. For this reason we need to import both libraries.
5161 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5162 ("python-pycairo" ,python-pycairo)
5163 ("python-cairocffi" ,python-cairocffi)))
5164 (inputs
5165 `(("libpng" ,libpng)
5166 ("freetype" ,freetype)
5167 ("cairo" ,cairo)
5168 ("glib" ,glib)
5169 ;; FIXME: Add backends when available.
5170 ;("python-wxpython" ,python-wxpython)
5171 ("tcl" ,tcl)
5172 ("tk" ,tk)))
5173 (native-inputs
5174 `(("pkg-config" ,pkg-config)
5175 ("python-pytest" ,python-pytest)
5176 ("python-mock" ,python-mock)
5177 ("unzip" ,unzip)
5178 ("jquery-ui"
5179 ,(origin
5180 (method url-fetch)
5181 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5182 (sha256
5183 (base32
5184 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5185 (arguments
5186 `(#:phases
5187 (modify-phases %standard-phases
5188 ;; XXX We disable all image comparison tests because we're using a
5189 ;; newer version of FreeType than matplotlib expects. This leads to
5190 ;; minor differences throughout the tests.
5191 (add-after 'unpack 'fix-and-disable-failing-tests
5192 (lambda _
5193 (substitute* (append (find-files "lib/matplotlib/tests/"
5194 "test_.*\\.py$")
5195 (find-files "lib/mpl_toolkits/tests"
5196 "test_.*\\.py$"))
5197 (("^from matplotlib" match)
5198 (string-append "import pytest\n" match))
5199 (("( *)@image_comparison" match indent)
5200 (string-append indent
5201 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5202 match)))
5203 (substitute* "lib/matplotlib/tests/test_animation.py"
5204 (("/bin/sh") (which "sh")))
5205 (for-each delete-file
5206 ;; test_normal_axes, test_get_tightbbox_polar
5207 '("lib/matplotlib/tests/test_axes.py"
5208 ;; We don't use the webagg backend and this test forces it.
5209 "lib/matplotlib/tests/test_backend_webagg.py"
5210 ;; test_outward_ticks
5211 "lib/matplotlib/tests/test_tightlayout.py"
5212 ;; test_hidden_axes fails with minor extent
5213 ;; differences, possibly due to the use of a
5214 ;; different version of FreeType.
5215 "lib/matplotlib/tests/test_constrainedlayout.py"
5216 ;; Fontconfig returns no fonts.
5217 "lib/matplotlib/tests/test_font_manager.py"))
5218 #t))
5219 (add-before 'install 'install-jquery-ui
5220 (lambda* (#:key outputs inputs #:allow-other-keys)
5221 (let ((dir (string-append (assoc-ref outputs "out")
5222 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5223 (mkdir-p dir)
5224 (invoke "unzip"
5225 (assoc-ref inputs "jquery-ui")
5226 "-d" dir))
5227 #t))
5228 (replace 'check
5229 (lambda* (#:key outputs inputs #:allow-other-keys)
5230 (add-installed-pythonpath inputs outputs)
5231 (invoke "python" "tests.py" "-v"
5232 "-m" "not network and not webagg")))
5233 (add-before 'build 'configure-environment
5234 (lambda* (#:key outputs inputs #:allow-other-keys)
5235 (let ((cairo (assoc-ref inputs "cairo")))
5236 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5237 ;; has not effect.
5238 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5239 (setenv "HOME" (getcwd))
5240 ;; Fix rounding errors when using the x87 FPU.
5241 (when (string-prefix? "i686" ,(%current-system))
5242 (setenv "CFLAGS" "-ffloat-store"))
5243 (call-with-output-file "setup.cfg"
5244 (lambda (port)
5245 (format port "[directories]~%
5246 basedirlist = ~a,~a~%
5247 [packages]~%
5248 tests = True~%"
5249 (assoc-ref inputs "tcl")
5250 (assoc-ref inputs "tk")))))
5251 #t)))))
5252 (home-page "https://matplotlib.org/")
5253 (synopsis "2D plotting library for Python")
5254 (description
5255 "Matplotlib is a Python 2D plotting library which produces publication
5256 quality figures in a variety of hardcopy formats and interactive environments
5257 across platforms. Matplotlib can be used in Python scripts, the python and
5258 ipython shell, web application servers, and six graphical user interface
5259 toolkits.")
5260 (license license:psfl)
5261 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5262
5263 (define-public python2-matplotlib
5264 (let ((matplotlib (package-with-python2
5265 (strip-python2-variant python-matplotlib))))
5266 (package (inherit matplotlib)
5267 (version "2.2.4")
5268 (source
5269 (origin
5270 (method url-fetch)
5271 (uri (pypi-uri "matplotlib" version))
5272 (sha256
5273 (base32
5274 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5275 (arguments
5276 (substitute-keyword-arguments (package-arguments matplotlib)
5277 ((#:phases phases)
5278 `(modify-phases ,phases
5279 (replace 'install-jquery-ui
5280 (lambda* (#:key outputs inputs #:allow-other-keys)
5281 (let ((dir (string-append (assoc-ref outputs "out")
5282 "/lib/python2.7/site-packages/"
5283 "matplotlib/backends/web_backend/")))
5284 (mkdir-p dir)
5285 (invoke "unzip"
5286 (assoc-ref inputs "jquery-ui")
5287 "-d" dir))
5288 #t))
5289 (delete 'fix-and-disable-failing-tests)
5290 (delete 'check))))) ; These tests weren't run the the past.
5291 ;; Make sure to use special packages for Python 2 instead
5292 ;; of those automatically rewritten by package-with-python2.
5293 (propagated-inputs
5294 `(("python2-pycairo" ,python2-pycairo)
5295 ("python2-backports-functools-lru-cache"
5296 ,python2-backports-functools-lru-cache)
5297 ("python2-functools32" ,python2-functools32)
5298 ("python2-pygobject-2" ,python2-pygobject-2)
5299 ("python2-subprocess32" ,python2-subprocess32)
5300 ("python2-tkinter" ,python-2 "tk")
5301 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5302 '("python-cairocffi"
5303 "python-pycairo"
5304 "python-pygobject"
5305 "python-tkinter")))))))
5306
5307 (define-public python-matplotlib-documentation
5308 (package
5309 (name "python-matplotlib-documentation")
5310 (version (package-version python-matplotlib))
5311 (source (package-source python-matplotlib))
5312 (build-system python-build-system)
5313 (native-inputs
5314 `(("python-matplotlib" ,python-matplotlib)
5315 ("python-colorspacious" ,python-colorspacious)
5316 ("python-sphinx" ,python-sphinx)
5317 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5318 ("python-sphinx-gallery" ,python-sphinx-gallery)
5319 ("python-numpydoc" ,python-numpydoc)
5320 ("python-ipython" ,python-ipython)
5321 ("python-ipykernel" ,python-ipykernel)
5322 ("python-mock" ,python-mock)
5323 ("graphviz" ,graphviz)
5324 ("texlive" ,(texlive-union (list texlive-amsfonts
5325 texlive-latex-amsmath
5326 texlive-latex-enumitem
5327 texlive-latex-expdlist
5328 texlive-latex-geometry
5329 texlive-latex-preview
5330 texlive-latex-type1cm
5331 texlive-latex-ucs
5332
5333 texlive-generic-pdftex
5334
5335 texlive-fonts-ec
5336 texlive-fonts-adobe-times
5337 texlive-fonts-txfonts)))
5338 ("texinfo" ,texinfo)
5339 ,@(package-native-inputs python-matplotlib)))
5340 (arguments
5341 `(#:tests? #f ; we're only generating documentation
5342 #:phases
5343 (modify-phases %standard-phases
5344 ;; The tests in python-matplotlib are run after the install phase, so
5345 ;; we need to delete the extra phase here.
5346 (delete 'check)
5347 (replace 'build
5348 (lambda _
5349 (chdir "doc")
5350 (setenv "PYTHONPATH"
5351 (string-append (getenv "PYTHONPATH")
5352 ":" (getcwd) "/../examples/units"))
5353 (substitute* "conf.py"
5354 ;; Don't use git.
5355 (("^SHA = check_output.*")
5356 (string-append "SHA = \"" ,version "\"\n"))
5357 ;; Don't fetch intersphinx files from the Internet
5358 (("^explicit_order_folders" m)
5359 (string-append "intersphinx_mapping = {}\n" m))
5360 (("'sphinx.ext.intersphinx',") "")
5361 ;; Disable URL embedding which requires internet access.
5362 (("'https://docs.scipy.org/doc/numpy'") "None")
5363 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5364 (invoke "make"
5365 "SPHINXBUILD=sphinx-build"
5366 "SPHINXOPTS=" ; don't abort on warnings
5367 "html" "texinfo")))
5368 (replace 'install
5369 (lambda* (#:key inputs outputs #:allow-other-keys)
5370 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5371 (doc (string-append data "/doc/python-matplotlib-" ,version))
5372 (info (string-append data "/info"))
5373 (html (string-append doc "/html")))
5374 (mkdir-p html)
5375 (mkdir-p info)
5376 (copy-recursively "build/html" html)
5377 (symlink (string-append html "/_images")
5378 (string-append info "/matplotlib-figures"))
5379 (with-directory-excursion "build/texinfo"
5380 (substitute* "matplotlib.texi"
5381 (("@image\\{([^,]*)" all file)
5382 (string-append "@image{matplotlib-figures/" file)))
5383 (symlink (string-append html "/_images")
5384 "./matplotlib-figures")
5385 (invoke "makeinfo" "--no-split"
5386 "-o" "matplotlib.info" "matplotlib.texi"))
5387 (install-file "build/texinfo/matplotlib.info" info))
5388 #t)))))
5389 (home-page (package-home-page python-matplotlib))
5390 (synopsis "Documentation for the python-matplotlib package")
5391 (description (package-description python-matplotlib))
5392 (license (package-license python-matplotlib))))
5393
5394 (define-public python2-matplotlib-documentation
5395 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5396 (package
5397 (inherit parent)
5398 (native-inputs
5399 (alist-delete "python-sphinx-copybutton"
5400 (package-native-inputs parent))))))
5401
5402 (define-public python-matplotlib-venn
5403 (package
5404 (name "python-matplotlib-venn")
5405 (version "0.11.5")
5406 (source
5407 (origin
5408 (method url-fetch)
5409 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5410 (sha256
5411 (base32
5412 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5413 (build-system python-build-system)
5414 (arguments '(#:tests? #f)) ; tests are not included
5415 (propagated-inputs
5416 `(("python-matplotlib" ,python-matplotlib)
5417 ("python-numpy" ,python-numpy)
5418 ("python-scipy" ,python-scipy)))
5419 (native-inputs
5420 `(("unzip" ,unzip)))
5421 (home-page "https://github.com/konstantint/matplotlib-venn")
5422 (synopsis "Plot area-proportional Venn diagrams")
5423 (description
5424 "This package provides tools for plotting area-proportional two- and
5425 three-way Venn diagrams in @code{matplotlib}.")
5426 (license license:expat)))
5427
5428 (define-public python-pysnptools
5429 (package
5430 (name "python-pysnptools")
5431 (version "0.4.11")
5432 (source
5433 (origin
5434 (method url-fetch)
5435 (uri (pypi-uri "pysnptools" version))
5436 (sha256
5437 (base32
5438 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5439 (build-system python-build-system)
5440 (arguments
5441 `(#:tests? #f ; no test data are included
5442 #:phases
5443 (modify-phases %standard-phases
5444 (replace 'check
5445 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5446 (if tests?
5447 (begin
5448 (add-installed-pythonpath inputs outputs)
5449 (invoke "python3" "pysnptools/test.py"))
5450 #t))))))
5451 (propagated-inputs
5452 `(("python-dill" ,python-dill)
5453 ("python-h5py" ,python-h5py)
5454 ("python-numpy" ,python-numpy)
5455 ("python-pandas" ,python-pandas)
5456 ("python-psutil" ,python-psutil)
5457 ("python-scipy" ,python-scipy)))
5458 (native-inputs
5459 `(("python-cython" ,python-cython)))
5460 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5461 (synopsis "Library for reading and manipulating genetic data")
5462 (description
5463 "PySnpTools is a library for reading and manipulating genetic data. It
5464 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5465 those files. It can also efficiently manipulate ranges of integers using set
5466 operators such as union, intersection, and difference.")
5467 (license license:asl2.0)))
5468
5469 (define-public python2-pysnptools
5470 (package-with-python2 python-pysnptools))
5471
5472 (define-public python-wurlitzer
5473 (package
5474 (name "python-wurlitzer")
5475 (version "2.0.1")
5476 (source
5477 (origin
5478 (method url-fetch)
5479 (uri (pypi-uri "wurlitzer" version))
5480 (sha256
5481 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5482 (build-system python-build-system)
5483 (arguments
5484 '(#:phases
5485 (modify-phases %standard-phases
5486 (replace 'check
5487 (lambda _
5488 (invoke "pytest" "-vv" "test.py"))))))
5489 (native-inputs
5490 `(("python-mock" ,python-mock)
5491 ("python-pytest" ,python-pytest)))
5492 (home-page "https://github.com/minrk/wurlitzer")
5493 (synopsis "Capture C-level output in context managers")
5494 (description
5495 "This library helps to redirect @code{sys.stdout} to a stream or a file
5496 while executing some piece of code, including C code running within a Python
5497 process.")
5498 (license license:expat)))
5499
5500 (define-public python-socksipy-branch
5501 (package
5502 (name "python-socksipy-branch")
5503 (version "1.01")
5504 (source
5505 (origin
5506 (method url-fetch)
5507 (uri (pypi-uri "SocksiPy-branch" version))
5508 (sha256
5509 (base32
5510 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5511 (build-system python-build-system)
5512 (arguments
5513 `(#:tests? #f)) ; There are no tests
5514 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5515 (synopsis "Python SOCKS module")
5516 (description
5517 "SocksiPy - A Python SOCKS client module. It provides a
5518 socket-like interface that supports connections to any TCP
5519 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5520 The original version was developed by Dan Haim, this is a
5521 branch created by Mario Vilas to address some open issues,
5522 as the original project seems to have been abandoned circa 2007.")
5523 (license license:bsd-3)))
5524
5525 (define-public python2-socksipy-branch
5526 (package-with-python2 python-socksipy-branch))
5527
5528 (define-public python-socksipychain
5529 (package
5530 (name "python-socksipychain")
5531 (version "2.1.2")
5532 (source
5533 (origin
5534 (method git-fetch)
5535 (uri (git-reference
5536 (url "https://github.com/pagekite/PySocksipyChain")
5537 (commit (string-append "v" version))))
5538 (file-name (git-file-name name version))
5539 (sha256
5540 (base32
5541 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5542 (build-system python-build-system)
5543 (arguments
5544 `(#:tests? #f)) ; Tests try to access the network.
5545 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5546 (synopsis "Python SOCKS module with chained proxies support")
5547 (description
5548 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5549 adds support for arbitrary chaining of proxy servers and various modes of
5550 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5551 a simple netcat replacement with chaining support.")
5552 (license license:bsd-3)))
5553
5554 (define-public python-pycodestyle
5555 (package
5556 (name "python-pycodestyle")
5557 (version "2.6.0")
5558 (source
5559 (origin
5560 (method url-fetch)
5561 (uri (pypi-uri "pycodestyle" version))
5562 (sha256
5563 (base32
5564 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5565 (build-system python-build-system)
5566 (arguments
5567 `(#:phases
5568 (modify-phases %standard-phases
5569 (replace 'check
5570 (lambda _
5571 (invoke "pytest" "-vv"))))))
5572 (native-inputs
5573 `(("python-pytest" ,python-pytest)))
5574 (home-page "https://pycodestyle.readthedocs.io/")
5575 (synopsis "Python style guide checker")
5576 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5577 Python code against some of the style conventions in
5578 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5579 (license license:expat)))
5580
5581 (define-public python2-pycodestyle
5582 (package-with-python2 python-pycodestyle))
5583
5584 (define-public python-multidict
5585 (package
5586 (name "python-multidict")
5587 (version "4.7.5")
5588 (source
5589 (origin
5590 (method url-fetch)
5591 (uri (pypi-uri "multidict" version))
5592 (sha256
5593 (base32
5594 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5595 (build-system python-build-system)
5596 (arguments
5597 '(#:modules ((ice-9 ftw)
5598 (srfi srfi-1)
5599 (srfi srfi-26)
5600 (guix build utils)
5601 (guix build python-build-system))
5602 #:phases (modify-phases %standard-phases
5603 (replace 'check
5604 (lambda* (#:key tests? #:allow-other-keys)
5605 (if tests?
5606 (begin
5607 (let ((libdir (find (cut string-prefix? "lib." <>)
5608 (scandir "build"))))
5609 (setenv "PYTHONPATH"
5610 (string-append "./build/" libdir ":"
5611 (getenv "PYTHONPATH")))
5612 (invoke "pytest" "-vv")))
5613 (format #t "test suite not run~%"))
5614 #t)))))
5615 (native-inputs
5616 `(("python-pytest" ,python-pytest)
5617 ("python-pytest-cov" ,python-pytest-cov)))
5618 (home-page "https://github.com/aio-libs/multidict/")
5619 (synopsis "Multidict implementation")
5620 (description "Multidict is dict-like collection of key-value pairs
5621 where key might be occurred more than once in the container.")
5622 (license license:asl2.0)))
5623
5624 (define-public python-orderedmultidict
5625 (package
5626 (name "python-orderedmultidict")
5627 (version "1.0")
5628 (source
5629 (origin
5630 (method url-fetch)
5631 (uri (pypi-uri "orderedmultidict" version))
5632 (sha256
5633 (base32
5634 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5635 (build-system python-build-system)
5636 (arguments
5637 `(#:phases
5638 (modify-phases %standard-phases
5639 (add-after 'unpack 'fix-tests
5640 (lambda _
5641 ;; The package uses nosetest for running the tests.
5642 ;; Adding this initfile allows to run the test suite
5643 ;; without requiring nosetest.
5644 (with-output-to-file "tests/__init__.py" newline)
5645 #t)))))
5646 (propagated-inputs
5647 `(("python-six" ,python-six)))
5648 (native-inputs
5649 `(("python-pycodestyle" ,python-pycodestyle)))
5650 (home-page "https://github.com/gruns/orderedmultidict")
5651 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5652 (description "This package contains a library for ordered multivalue
5653 dictionaries. A multivalue dictionary is a dictionary that can store
5654 multiple values for the same key. An ordered multivalue dictionary is a
5655 multivalue dictionary that retains the order of insertions and deletions.")
5656 (license license:unlicense)))
5657
5658 (define-public python2-orderedmultidict
5659 (package-with-python2 python-orderedmultidict))
5660
5661 (define-public python-autopep8
5662 (package
5663 (name "python-autopep8")
5664 (version "1.5.3")
5665 (source
5666 (origin
5667 (method url-fetch)
5668 (uri (pypi-uri "autopep8" version))
5669 (sha256
5670 (base32
5671 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5672 (build-system python-build-system)
5673 (propagated-inputs
5674 `(("python-pycodestyle" ,python-pycodestyle)
5675 ("python-toml" ,python-toml)))
5676 (home-page "https://github.com/hhatto/autopep8")
5677 (synopsis "Format Python code according to the PEP 8 style guide")
5678 (description
5679 "@code{autopep8} automatically formats Python code to conform to
5680 the PEP 8 style guide. It uses the pycodestyle utility to determine
5681 what parts of the code needs to be formatted. @code{autopep8} is
5682 capable of fixing most of the formatting issues that can be reported
5683 by pycodestyle.")
5684 (license (license:non-copyleft
5685 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5686
5687 (define-public python2-autopep8
5688 (package-with-python2 python-autopep8))
5689
5690 (define-public python-distlib
5691 (package
5692 (name "python-distlib")
5693 (version "0.3.0")
5694 (source
5695 (origin
5696 (method url-fetch)
5697 (uri (pypi-uri "distlib" version ".zip"))
5698 (sha256
5699 (base32
5700 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5701 (build-system python-build-system)
5702 (arguments
5703 `(#:phases
5704 (modify-phases %standard-phases
5705 (add-before 'build 'no-/bin/sh
5706 (lambda _
5707 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5708 (("/bin/sh") (which "sh")))
5709 #t))
5710 (add-before 'check 'prepare-test-env
5711 (lambda _
5712 (setenv "HOME" "/tmp")
5713 ;; NOTE: Any value works, the variable just has to be present.
5714 (setenv "SKIP_ONLINE" "1")
5715 #t)))))
5716 (native-inputs `(("unzip" ,unzip)))
5717 (home-page "https://bitbucket.org/pypa/distlib")
5718 (synopsis "Distribution utilities")
5719 (description "Distlib is a library which implements low-level functions that
5720 relate to packaging and distribution of Python software. It is intended to be
5721 used as the basis for third-party packaging tools.")
5722 (license license:psfl)))
5723
5724 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
5725 (define-public python-distlib/next
5726 (package
5727 (inherit python-distlib)
5728 (version "0.3.1")
5729 (source
5730 (origin
5731 (method url-fetch)
5732 (uri (pypi-uri "distlib" version ".zip"))
5733 (sha256
5734 (base32
5735 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
5736
5737 (define-public python-distutils-extra
5738 (package
5739 (name "python-distutils-extra")
5740 (version "2.38")
5741 (source
5742 (origin
5743 (method url-fetch)
5744 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5745 version "/+download/python-distutils-extra-"
5746 version ".tar.gz"))
5747 (sha256
5748 (base32
5749 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5750 (build-system python-build-system)
5751 (home-page "https://launchpad.net/python-distutils-extra/")
5752 (synopsis "Enhancements to Python's distutils")
5753 (description
5754 "The python-distutils-extra module enables you to easily integrate
5755 gettext support, themed icons, and scrollkeeper-based documentation into
5756 Python's distutils.")
5757 (license license:gpl2)))
5758
5759 (define-public python2-distutils-extra
5760 (package-with-python2 python-distutils-extra))
5761
5762 (define-public python2-elib.intl
5763 (package
5764 (name "python2-elib.intl")
5765 (version "0.0.3")
5766 (source
5767 (origin
5768 ;; This project doesn't tag releases or publish tarballs, so we take
5769 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5770 (method git-fetch)
5771 (uri (git-reference
5772 (url "https://github.com/dieterv/elib.intl")
5773 (commit "d09997cfef")))
5774 (file-name (string-append name "-" version "-checkout"))
5775 (sha256
5776 (base32
5777 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5778 (build-system python-build-system)
5779 (arguments
5780 ;; incompatible with Python 3 (exception syntax)
5781 `(#:python ,python-2
5782 #:tests? #f))
5783 (home-page "https://github.com/dieterv/elib.intl")
5784 (synopsis "Enhanced internationalization for Python")
5785 (description
5786 "The elib.intl module provides enhanced internationalization (I18N)
5787 services for your Python modules and applications.")
5788 (license license:lgpl3+)))
5789
5790 (define-public python-olefile
5791 (package
5792 (name "python-olefile")
5793 (version "0.46")
5794 (source
5795 (origin
5796 (method url-fetch)
5797 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5798 "download/v" version "/olefile-" version ".tar.gz"))
5799 (file-name (string-append name "-" version ".tar.gz"))
5800 (sha256
5801 (base32
5802 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5803 (build-system python-build-system)
5804 (home-page "https://www.decalage.info/python/olefileio")
5805 (synopsis "Read and write Microsoft OLE2 files.")
5806 (description
5807 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5808 Storage or Compound Document, Microsoft Office). It is an improved version of
5809 the OleFileIO module from PIL, the Python Image Library.")
5810 (license license:bsd-3)))
5811
5812 (define-public python2-olefile
5813 (package-with-python2 python-olefile))
5814
5815 (define-public python-pikepdf
5816 (package
5817 (name "python-pikepdf")
5818 (version "2.8.0.post2")
5819 (source
5820 (origin
5821 (method url-fetch)
5822 (uri (pypi-uri "pikepdf" version))
5823 (sha256
5824 (base32 "0ya9bir41bz61y2njlcr5ni8l6cjsy0h5vg9ayxhw7dzgcibj0yp"))))
5825 (build-system python-build-system)
5826 (arguments
5827 `(#:tests? #false)) ;require python-xmp-toolkit
5828 (native-inputs
5829 `(("pybind11" ,pybind11)
5830 ("python-setuptools" ,python-setuptools)
5831 ("python-setuptools-scm" ,python-setuptools-scm/next)
5832 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
5833 ("python-toml" ,python-toml)
5834 ("python-wheel" ,python-wheel)))
5835 (inputs
5836 `(("qpdf" ,qpdf)))
5837 (propagated-inputs
5838 `(("python-lxml" ,python-lxml)
5839 ("python-pillow" ,python-pillow)))
5840 (home-page "https://github.com/pikepdf/pikepdf")
5841 (synopsis "Read and write PDFs with Python")
5842 (description
5843 "pikepdf is a Python library for reading and writing PDF files.")
5844 (license license:mpl2.0)))
5845
5846 (define-public python-pillow
5847 (package
5848 (name "python-pillow")
5849 (version "8.1.1")
5850 (source
5851 (origin
5852 (method url-fetch)
5853 (uri (pypi-uri "Pillow" version))
5854 (sha256
5855 (base32
5856 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
5857 (build-system python-build-system)
5858 (native-inputs
5859 `(("python-pytest" ,python-pytest)))
5860 (inputs
5861 `(("freetype" ,freetype)
5862 ("lcms" ,lcms)
5863 ("libjpeg" ,libjpeg-turbo)
5864 ("libtiff" ,libtiff)
5865 ("libwebp" ,libwebp)
5866 ("openjpeg" ,openjpeg)
5867 ("zlib" ,zlib)))
5868 (propagated-inputs
5869 `(("python-olefile" ,python-olefile)))
5870 (arguments
5871 `(#:phases
5872 (modify-phases %standard-phases
5873 (add-after 'unpack 'patch-ldconfig
5874 (lambda _
5875 (substitute* "setup.py"
5876 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5877 (replace 'check
5878 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5879 (if tests?
5880 (begin
5881 (setenv "HOME" (getcwd))
5882 ;; Make installed package available for running the tests.
5883 (add-installed-pythonpath inputs outputs)
5884 (invoke "python" "selftest.py" "--installed")
5885 (invoke "python" "-m" "pytest" "-vv"))
5886 #t))))))
5887 (home-page "https://python-pillow.org")
5888 (synopsis "Fork of the Python Imaging Library")
5889 (description
5890 "The Python Imaging Library adds image processing capabilities to your
5891 Python interpreter. This library provides extensive file format support, an
5892 efficient internal representation, and fairly powerful image processing
5893 capabilities. The core image library is designed for fast access to data
5894 stored in a few basic pixel formats. It should provide a solid foundation for
5895 a general image processing tool.")
5896 (properties `((python2-variant . ,(delay python2-pillow))))
5897 (license (license:x11-style
5898 "http://www.pythonware.com/products/pil/license.htm"
5899 "The PIL Software License"))))
5900
5901 (define-public python2-pillow
5902 (package-with-python2
5903 (package
5904 (inherit (strip-python2-variant python-pillow))
5905 ;; Version 6 is the last series with Python 2 support.
5906 (version "6.2.2")
5907 (source
5908 (origin
5909 (method url-fetch)
5910 (uri (pypi-uri "Pillow" version))
5911 (sha256
5912 (base32
5913 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
5914
5915 (define-public python-pillow-2.9
5916 (package
5917 (inherit python-pillow)
5918 (version "2.9.0")
5919 (source
5920 (origin
5921 (method url-fetch)
5922 (uri (pypi-uri "Pillow" version))
5923 (sha256
5924 (base32
5925 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5926 (arguments
5927 (substitute-keyword-arguments (package-arguments python-pillow)
5928 ((#:tests? _ #f) #f)))
5929 (properties '((hidden? #t)))))
5930
5931 (define-public python-pillow-simd
5932 (package
5933 (inherit python-pillow)
5934 (name "python-pillow-simd")
5935 (version "7.1.2")
5936 ;; The PyPI tarball does not include test files.
5937 (source
5938 (origin
5939 (method git-fetch)
5940 (uri (git-reference
5941 (url "https://github.com/uploadcare/pillow-simd")
5942 (commit version)))
5943 (file-name (git-file-name name version))
5944 (sha256
5945 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
5946 (arguments
5947 (substitute-keyword-arguments
5948 (package-arguments python-pillow)
5949 ((#:phases phases)
5950 `(modify-phases ,phases
5951 (add-after 'unpack 'make-tests-writable
5952 (lambda _
5953 (for-each make-file-writable (find-files "Tests"))
5954 #t))))))
5955 (inputs
5956 `(("libraqm" ,libraqm)
5957 ("libimagequant" ,libimagequant)
5958 ,@(package-inputs python-pillow)))
5959 (home-page "https://github.com/uploadcare/pillow-simd")
5960 (synopsis "Fork of the Python Imaging Library (Pillow)")
5961 (description "This package is a fork of Pillow which adds support for SIMD
5962 parallelism.")))
5963
5964 (define-public python-roifile
5965 (package
5966 (name "python-roifile")
5967 (version "2020.5.28")
5968 (source
5969 (origin
5970 (method url-fetch)
5971 (uri (pypi-uri "roifile" version))
5972 (sha256
5973 (base32
5974 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5975 (build-system python-build-system)
5976 (arguments `(#:tests? #f)) ; there are none
5977 (propagated-inputs
5978 `(("python-numpy" ,python-numpy)))
5979 (home-page "https://www.lfd.uci.edu/~gohlke/")
5980 (synopsis "Read and write ImageJ ROI format")
5981 (description "Roifile is a Python library to read, write, create, and plot
5982 ImageJ ROIs, an undocumented and ImageJ application specific format to store
5983 regions of interest, geometric shapes, paths, text, etc for image overlays.")
5984 (license license:bsd-3)))
5985
5986 (define-public python-tifffile
5987 (package
5988 (name "python-tifffile")
5989 (version "2020.6.3")
5990 (source
5991 (origin
5992 (method url-fetch)
5993 (uri (pypi-uri "tifffile" version))
5994 (sha256
5995 (base32
5996 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5997 (build-system python-build-system)
5998 ;; Tests require lfdfiles, which depends on tifffile
5999 (arguments `(#:tests? #f))
6000 (propagated-inputs
6001 `(("python-numpy" ,python-numpy)
6002 ;;("python-lfdfiles" ,python-lfdfiles)
6003 ("python-roifile" ,python-roifile)))
6004 (home-page "https://www.lfd.uci.edu/~gohlke/")
6005 (synopsis "Read and write TIFF(r) files")
6006 (description "This package lets you read image and metadata from many
6007 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6008 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6009 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6010 (license license:bsd-3)))
6011
6012 (define-public python-lfdfiles
6013 (package
6014 (name "python-lfdfiles")
6015 (version "2020.1.1")
6016 (source
6017 (origin
6018 (method url-fetch)
6019 (uri (pypi-uri "lfdfiles" version))
6020 (sha256
6021 (base32
6022 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
6023 (build-system python-build-system)
6024 (propagated-inputs
6025 `(("python-click" ,python-click)
6026 ("python-numpy" ,python-numpy)
6027 ("python-tifffile" ,python-tifffile)))
6028 (home-page "https://www.lfd.uci.edu/~gohlke/")
6029 (synopsis "Work with LFD data files")
6030 (description
6031 "Lfdfiles is a Python library and console script for reading, writing,
6032 converting, and viewing many of the proprietary file formats used to store
6033 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6034 (license license:bsd-3)))
6035
6036 (define-public python-imageio
6037 (package
6038 (name "python-imageio")
6039 (version "2.8.0")
6040 (source
6041 (origin
6042 (method url-fetch)
6043 (uri (pypi-uri "imageio" version))
6044 (sha256
6045 (base32
6046 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6047 (build-system python-build-system)
6048 (arguments
6049 `(#:tests? #f ; many tests require online data
6050 #:phases
6051 (modify-phases %standard-phases
6052 (replace 'check
6053 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6054 (if tests?
6055 (begin
6056 ;; Make installed package available for running the tests.
6057 (add-installed-pythonpath inputs outputs)
6058 (invoke "pytest" "-vv"))
6059 #t))))))
6060 (propagated-inputs
6061 `(("python-numpy" ,python-numpy)
6062 ("python-pillow" ,python-pillow)
6063 ("python-psutil" ,python-psutil)))
6064 (native-inputs
6065 `(("python-pytest" ,python-pytest)))
6066 (home-page "https://imageio.github.io/")
6067 (synopsis "Library for reading and writing a wide range of image data")
6068 (description
6069 "Imageio is a Python library that provides an easy interface to read and
6070 write a wide range of image data, including animated images, video, volumetric
6071 data, and scientific formats.")
6072 (license license:bsd-2)))
6073
6074 (define-public python-pycparser
6075 (package
6076 (name "python-pycparser")
6077 (version "2.20")
6078 (source
6079 (origin
6080 (method url-fetch)
6081 (uri (pypi-uri "pycparser" version))
6082 (sha256
6083 (base32
6084 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6085 (outputs '("out" "doc"))
6086 (build-system python-build-system)
6087 (native-inputs
6088 `(("pkg-config" ,pkg-config)))
6089 (arguments
6090 `(#:phases
6091 (modify-phases %standard-phases
6092 (replace 'check
6093 (lambda _
6094 (with-directory-excursion "tests"
6095 (invoke "python" "all_tests.py"))
6096 #t))
6097 (add-after 'install 'install-doc
6098 (lambda* (#:key outputs #:allow-other-keys)
6099 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6100 (doc (string-append data "/doc/" ,name "-" ,version))
6101 (examples (string-append doc "/examples")))
6102 (mkdir-p examples)
6103 (for-each (lambda (file)
6104 (copy-file (string-append "." file)
6105 (string-append doc file)))
6106 '("/README.rst" "/CHANGES" "/LICENSE"))
6107 (copy-recursively "examples" examples)
6108 #t))))))
6109 (home-page "https://github.com/eliben/pycparser")
6110 (synopsis "C parser in Python")
6111 (description
6112 "Pycparser is a complete parser of the C language, written in pure Python
6113 using the PLY parsing library. It parses C code into an AST and can serve as
6114 a front-end for C compilers or analysis tools.")
6115 (license license:bsd-3)))
6116
6117 (define-public python2-pycparser
6118 (package-with-python2 python-pycparser))
6119
6120 (define-public python-xlsxwriter
6121 (package
6122 (name "python-xlsxwriter")
6123 (version "1.3.7")
6124 (source
6125 (origin
6126 ;; There are no tests in the PyPI tarball.
6127 (method git-fetch)
6128 (uri (git-reference
6129 (url "https://github.com/jmcnamara/XlsxWriter")
6130 (commit (string-append "RELEASE_" version))))
6131 (file-name (git-file-name name version))
6132 (sha256
6133 (base32 "1qg40r2mwrqfmhaxnary1cfgi0dwwazp5qga7c9p2cdji2v0x5rm"))))
6134 (build-system python-build-system)
6135 (home-page "https://github.com/jmcnamara/XlsxWriter")
6136 (synopsis "Python module for creating Excel XLSX files")
6137 (description
6138 "XlsxWriter is a Python module that can be used to write text, numbers,
6139 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
6140 (license license:bsd-2)))
6141
6142 (define-public python-pywavelets
6143 (package
6144 (name "python-pywavelets")
6145 (version "1.1.1")
6146 (home-page "https://github.com/PyWavelets/pywt")
6147 (source (origin
6148 (method url-fetch)
6149 (uri (pypi-uri "PyWavelets" version))
6150 (sha256
6151 (base32
6152 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6153 (build-system python-build-system)
6154 (arguments
6155 '(#:modules ((ice-9 ftw)
6156 (srfi srfi-1)
6157 (srfi srfi-26)
6158 (guix build utils)
6159 (guix build python-build-system))
6160 #:phases
6161 (modify-phases %standard-phases
6162 (replace 'check
6163 (lambda _
6164 (let ((cwd (getcwd))
6165 (libdir (find (cut string-prefix? "lib." <>)
6166 (scandir "build"))))
6167 (with-directory-excursion (string-append cwd "/build/" libdir)
6168 (invoke "pytest" "-vv"))))))))
6169 (native-inputs
6170 `(("python-matplotlib" ,python-matplotlib) ;for tests
6171 ("python-pytest" ,python-pytest)))
6172 (propagated-inputs
6173 `(("python-numpy" ,python-numpy)))
6174 (synopsis "Wavelet transforms in Python")
6175 (description
6176 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6177 mathematical basis functions that are localized in both time and frequency.
6178 Wavelet transforms are time-frequency transforms employing wavelets. They are
6179 similar to Fourier transforms, the difference being that Fourier transforms are
6180 localized only in frequency instead of in time and frequency.")
6181 (license license:expat)))
6182
6183 (define-public python-pywal
6184 (package
6185 (name "python-pywal")
6186 (version "3.3.0")
6187 (source
6188 (origin
6189 (method git-fetch)
6190 (uri (git-reference
6191 (url "https://github.com/dylanaraps/pywal")
6192 (commit version)))
6193 (file-name (git-file-name name version))
6194 (sha256
6195 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
6196 (build-system python-build-system)
6197 (arguments
6198 `(#:phases
6199 (modify-phases %standard-phases
6200 (add-before 'check 'fix-home-directory
6201 (lambda _
6202 ;; Tests fail with "Permission denied: '/homeless-shelter'".
6203 (setenv "HOME" "/tmp")
6204 #t)))))
6205 (inputs
6206 `(("imagemagick" ,imagemagick)))
6207 (home-page "https://github.com/dylanaraps/pywal")
6208 (synopsis "Color palette generator and applicator")
6209 (description
6210 "Pywal is a tool that generates a color palette from the dominant colors
6211 in an image. It then applies the colors system-wide and on-the-fly in all of
6212 your favourite programs.")
6213 (license license:expat)))
6214
6215 (define-public python-pywinrm
6216 (package
6217 (name "python-pywinrm")
6218 (version "0.4.1")
6219 (source
6220 (origin
6221 (method url-fetch)
6222 (uri (pypi-uri "pywinrm" version))
6223 (sha256
6224 (base32
6225 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6226 (build-system python-build-system)
6227 (propagated-inputs
6228 `(("python-six" ,python-six)
6229 ("python-requests_ntlm" ,python-requests_ntlm)
6230 ("python-xmltodict" ,python-xmltodict)
6231 ("python-kerberos" ,python-kerberos)))
6232 (native-inputs
6233 `(("python-mock" ,python-mock)
6234 ("python-pytest" ,python-pytest)))
6235 (home-page "https://github.com/diyan/pywinrm/")
6236 (synopsis
6237 "Python library for Windows Remote Management (WinRM)")
6238 (description
6239 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6240 service. It allows you to invoke commands on target Windows machines from
6241 any machine that can run Python.")
6242 (license license:expat)))
6243
6244 (define-public python-xcffib
6245 (package
6246 (name "python-xcffib")
6247 (version "0.6.0")
6248 (source
6249 (origin
6250 (method url-fetch)
6251 (uri (pypi-uri "xcffib" version))
6252 (sha256
6253 (base32
6254 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6255 (build-system python-build-system)
6256 (inputs
6257 `(("libxcb" ,libxcb)))
6258 (propagated-inputs
6259 `(("python-cffi" ,python-cffi) ; used at run time
6260 ("python-six" ,python-six)))
6261 (arguments
6262 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6263 #:tests? #f
6264 #:phases
6265 (modify-phases %standard-phases
6266 (add-after 'unpack 'fix-libxcb-path
6267 (lambda* (#:key inputs #:allow-other-keys)
6268 (let ((libxcb (assoc-ref inputs "libxcb")))
6269 (substitute* '("xcffib/__init__.py")
6270 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6271 #t)))
6272 (add-after 'install 'install-doc
6273 (lambda* (#:key outputs #:allow-other-keys)
6274 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6275 "/doc/" ,name "-" ,version)))
6276 (mkdir-p doc)
6277 (copy-file "README.md"
6278 (string-append doc "/README.md"))
6279 #t))))))
6280 (home-page "https://github.com/tych0/xcffib")
6281 (synopsis "XCB Python bindings")
6282 (description
6283 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6284 support for Python 3 and PyPy. It is based on cffi.")
6285 (license license:expat)))
6286
6287 (define-public python2-xcffib
6288 (package-with-python2 python-xcffib))
6289
6290 (define-public python-cairocffi
6291 (package
6292 (name "python-cairocffi")
6293 (version "1.2.0")
6294 (source
6295 (origin
6296 ;; The PyPI archive does not include the documentation, so use Git.
6297 (method git-fetch)
6298 (uri (git-reference
6299 (url "https://github.com/Kozea/cairocffi")
6300 (commit (string-append "v" version))))
6301 (file-name (git-file-name name version))
6302 (sha256
6303 (base32
6304 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6305 (build-system python-build-system)
6306 (outputs '("out" "doc"))
6307 (inputs
6308 `(("glib" ,glib)
6309 ("gtk+" ,gtk+)
6310 ("gdk-pixbuf" ,gdk-pixbuf)
6311 ("cairo" ,cairo)))
6312 (native-inputs
6313 `(("python-numpy" ,python-numpy)
6314 ("python-pytest" ,python-pytest)
6315 ("python-pytest-cov" ,python-pytest-cov)
6316 ("python-pytest-runner" ,python-pytest-runner)
6317 ("python-sphinx" ,python-sphinx)
6318 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6319 (propagated-inputs
6320 `(("python-xcffib" ,python-xcffib))) ; used at run time
6321 (arguments
6322 `(#:phases
6323 (modify-phases %standard-phases
6324 (add-after 'unpack 'patch-paths
6325 (lambda* (#:key inputs #:allow-other-keys)
6326 (substitute* "cairocffi/__init__.py"
6327 ;; Hack the dynamic library loading mechanism.
6328 (("find_library\\(library_name\\)")
6329 "\"found\"")
6330 (("filenames = \\(library_filename,\\) \\+ filenames")
6331 "pass")
6332 (("libcairo.so.2")
6333 (string-append (assoc-ref inputs "cairo")
6334 "/lib/libcairo.so.2")))
6335 (substitute* "cairocffi/pixbuf.py"
6336 (("libgdk_pixbuf-2.0.so.0")
6337 (string-append (assoc-ref inputs "gdk-pixbuf")
6338 "/lib/libgdk_pixbuf-2.0.so.0"))
6339 (("libgobject-2.0.so.0")
6340 (string-append (assoc-ref inputs "glib")
6341 "/lib/libgobject-2.0.so.0"))
6342 (("libglib-2.0.so.0")
6343 (string-append (assoc-ref inputs "glib")
6344 "/lib/libglib-2.0.so.0"))
6345 (("libgdk-3.so.0")
6346 (string-append (assoc-ref inputs "gtk+")
6347 "/lib/libgdk-3.so.0")))
6348 #t))
6349 (add-after 'unpack 'disable-linters
6350 ;; Their check fails; none of our business.
6351 (lambda _
6352 (substitute* "setup.cfg"
6353 ((".*pytest-flake8.*") "")
6354 ((".*pytest-isort.*") "")
6355 (("--flake8") "")
6356 (("--isort") ""))
6357 #t))
6358 (add-after 'install 'install-doc
6359 (lambda* (#:key inputs outputs #:allow-other-keys)
6360 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6361 (doc (string-append data "/doc/" ,name "-" ,version))
6362 (html (string-append doc "/html")))
6363 (setenv "LD_LIBRARY_PATH"
6364 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6365 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6366 (setenv "LANG" "en_US.UTF-8")
6367 (mkdir-p html)
6368 (for-each (lambda (file)
6369 (copy-file (string-append "." file)
6370 (string-append doc file)))
6371 '("/README.rst" "/NEWS.rst"))
6372 (system* "python" "setup.py" "build_sphinx")
6373 (copy-recursively "docs/_build/html" html)
6374 #t))))))
6375 (home-page "https://github.com/Kozea/cairocffi")
6376 (synopsis "Python bindings and object-oriented API for Cairo")
6377 (description
6378 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6379 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6380 graphics library with support for multiple backends including image buffers,
6381 PNG, PostScript, PDF, and SVG file output.")
6382 (license license:bsd-3)))
6383
6384 (define-public python2-cairocffi
6385 (package-with-python2 python-cairocffi))
6386
6387 (define-public python-decorator
6388 (package
6389 (name "python-decorator")
6390 (version "4.3.0")
6391 (source
6392 (origin
6393 (method url-fetch)
6394 (uri (pypi-uri "decorator" version))
6395 (sha256
6396 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6397 (build-system python-build-system)
6398 (home-page "https://pypi.org/project/decorator/")
6399 (synopsis "Python module to simplify usage of decorators")
6400 (description
6401 "The aim of the decorator module is to simplify the usage of decorators
6402 for the average programmer, and to popularize decorators usage giving examples
6403 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6404 etc. The core of this module is a decorator factory.")
6405 (license license:expat)))
6406
6407 (define-public python2-decorator
6408 (package-with-python2 python-decorator))
6409
6410 (define-public python-drmaa
6411 (package
6412 (name "python-drmaa")
6413 (version "0.7.7")
6414 (source
6415 (origin
6416 (method url-fetch)
6417 (uri (pypi-uri "drmaa" version))
6418 (sha256
6419 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6420 (build-system python-build-system)
6421 ;; The test suite requires libdrmaa which is provided by the cluster
6422 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6423 ;; should be set to the path of the libdrmaa library.
6424 (arguments '(#:tests? #f))
6425 (native-inputs
6426 `(("python-nose" ,python-nose)))
6427 (home-page "https://pypi.org/project/drmaa/")
6428 (synopsis "Python bindings for the DRMAA library")
6429 (description
6430 "A Python package for Distributed Resource Management (DRM) job
6431 submission and control. This package is an implementation of the DRMAA 1.0
6432 Python language binding specification.")
6433 (license license:bsd-3)))
6434
6435 (define-public python2-drmaa
6436 (package-with-python2 python-drmaa))
6437
6438 (define-public python-grako
6439 (package
6440 (name "python-grako")
6441 (version "3.99.9")
6442 (source
6443 (origin
6444 (method url-fetch)
6445 (uri
6446 (pypi-uri "grako" version ".zip"))
6447 (sha256
6448 (base32
6449 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6450 (build-system python-build-system)
6451 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6452 (native-inputs
6453 `(("unzip" ,unzip)
6454 ("python-pytest" ,python-pytest)
6455 ("python-pytest-runner" ,python-pytest-runner)))
6456 (home-page "https://bitbucket.org/neogeny/grako")
6457 (synopsis "EBNF parser generator")
6458 (description
6459 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6460 memoizing PEG/Packrat parser in Python.")
6461 (license license:bsd-3)))
6462
6463 (define-public python2-grako
6464 (package-with-python2 python-grako))
6465
6466 (define-public python-grandalf
6467 (package
6468 (name "python-grandalf")
6469 (version "0.7")
6470 (source
6471 (origin
6472 ;; There's no source tarball on PyPI.
6473 (method git-fetch)
6474 (uri (git-reference
6475 (url "https://github.com/bdcht/grandalf")
6476 (commit (string-append "v" version))))
6477 (file-name (git-file-name name version))
6478 (sha256
6479 (base32
6480 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6481 (build-system python-build-system)
6482 (arguments
6483 '(#:phases
6484 (modify-phases %standard-phases
6485 (replace 'check
6486 (lambda _
6487 (invoke "python" "setup.py" "pytest"))))))
6488 (native-inputs
6489 `(("python-pytest" ,python-pytest)
6490 ("python-pytest-runner" ,python-pytest-runner)))
6491 (propagated-inputs
6492 `(("python-numpy" ,python-numpy)
6493 ("python-ply" ,python-ply)))
6494 (home-page "https://github.com/bdcht/grandalf")
6495 (synopsis "Graph and drawing algorithms framework")
6496 (description
6497 "Grandalf is a Python package made for experimentations with graphs
6498 drawing algorithms. It is written in pure Python, and currently implements
6499 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6500 minimization approach. While not as fast or featured as graphviz or other
6501 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6502 than thousands of nodes, while keeping the source code simple enough to tweak
6503 and hack any part of it for experimental purpose. With a total of about 1500
6504 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6505 in less than 600 lines. The energy minimization approach is comprised of only
6506 250 lines!
6507
6508 Grandalf does only 2 not-so-simple things:
6509 @itemize
6510 @item computing the nodes (x,y) coordinates (based on provided nodes
6511 dimensions, and a chosen layout)
6512 @item routing the edges with lines or nurbs
6513 @end itemize
6514
6515 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6516 will help you find where to draw things like nodes and edges, but it’s up to
6517 you to actually draw things with your favorite toolkit.")
6518 ;; The user can choose either license.
6519 (license (list license:gpl2 license:epl1.0))))
6520
6521 (define-public python-gridmap
6522 (package
6523 (name "python-gridmap")
6524 (version "0.14.0")
6525 (source
6526 (origin
6527 (method git-fetch)
6528 (uri (git-reference
6529 (url "https://github.com/pygridtools/gridmap")
6530 (commit (string-append "v" version))))
6531 (file-name (git-file-name name version))
6532 (sha256
6533 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6534 (build-system python-build-system)
6535 (arguments
6536 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6537 (propagated-inputs
6538 `(("python-psutil" ,python-psutil)
6539 ("python-drmaa" ,python-drmaa)
6540 ("python-pyzmq" ,python-pyzmq)))
6541 (home-page "https://github.com/pygridtools/gridmap")
6542 (synopsis "Create jobs on a cluster directly from Python")
6543 (description
6544 "Gridmap is a Python package to allow you to easily create jobs on the
6545 cluster directly from Python. You can directly map Python functions onto the
6546 cluster without needing to write any wrapper code yourself.")
6547 (license license:gpl3+)))
6548
6549 (define-public python2-gridmap
6550 (package-with-python2 python-gridmap))
6551
6552 (define-public python-honcho
6553 (package
6554 (name "python-honcho")
6555 (version "1.0.1")
6556 (source
6557 (origin
6558 (method git-fetch)
6559 (uri (git-reference
6560 (url "https://github.com/nickstenning/honcho")
6561 (commit (string-append "v" version))))
6562 (file-name (git-file-name name version))
6563 (sha256
6564 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6565 (build-system python-build-system)
6566 (native-inputs
6567 `(("python-pytest" ,python-pytest)
6568 ("python-mock" ,python-mock)
6569 ("python-tox" ,python-tox)
6570 ("which" ,which))) ;for tests
6571 (propagated-inputs
6572 `(("python-jinja2" ,python-jinja2)))
6573 (arguments
6574 `(#:phases
6575 (modify-phases %standard-phases
6576 (delete 'check)
6577 (add-after 'install 'check
6578 (lambda* (#:key outputs inputs #:allow-other-keys)
6579 ;; fix honcho path in testsuite
6580 (substitute* "tests/conftest.py"
6581 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6582 "/bin/honcho" "'")))
6583 ;; It's easier to run tests after install.
6584 ;; Make installed package available for running the tests
6585 (add-installed-pythonpath inputs outputs)
6586 (invoke "py.test" "-v"))))))
6587 (home-page "https://github.com/nickstenning/honcho")
6588 (synopsis "Manage Procfile-based applications")
6589 (description
6590 "A Procfile is a file which describes how to run an application
6591 consisting of several processes. honcho starts all listed processes.
6592 The output of all running processes is collected by honcho and
6593 displayed.")
6594 (license license:expat)))
6595
6596 (define-public python-pexpect
6597 (package
6598 (name "python-pexpect")
6599 (version "4.8.0")
6600 (source
6601 (origin
6602 (method url-fetch)
6603 (uri (pypi-uri "pexpect" version))
6604 (sha256
6605 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6606 (build-system python-build-system)
6607 (arguments
6608 `(#:phases
6609 (modify-phases %standard-phases
6610 (add-before 'check 'prepare-tests
6611 (lambda _
6612 (substitute* (find-files "tests")
6613 (("/bin/ls") (which "ls"))
6614 (("/bin/echo") (which "echo"))
6615 (("/bin/which") (which "which"))
6616 ;; Many tests try to use the /bin directory which
6617 ;; is not present in the build environment.
6618 ;; Use one that's non-empty and unlikely to change.
6619 (("/bin'") "/dev'")
6620 ;; Disable failing test. See upstream bug report
6621 ;; https://github.com/pexpect/pexpect/issues/568
6622 (("def test_bash") "def _test_bash"))
6623 ;; XXX: Socket connection test gets "Connection reset by peer".
6624 ;; Why does it not work? Delete for now.
6625 (delete-file "tests/test_socket.py")
6626 #t))
6627 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6628 (native-inputs
6629 `(("python-nose" ,python-nose)
6630 ("python-pytest" ,python-pytest)
6631 ("man-db" ,man-db)
6632 ("which" ,which)
6633 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6634 (propagated-inputs
6635 `(("python-ptyprocess" ,python-ptyprocess)))
6636 (home-page "http://pexpect.readthedocs.org/")
6637 (synopsis "Controlling interactive console applications")
6638 (description
6639 "Pexpect is a pure Python module for spawning child applications;
6640 controlling them; and responding to expected patterns in their output.
6641 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6642 child application and control it as if a human were typing commands.")
6643 (license license:isc)))
6644
6645 (define-public python2-pexpect
6646 (package-with-python2 python-pexpect))
6647
6648 (define-public python-setuptools-scm
6649 (package
6650 (name "python-setuptools-scm")
6651 (version "3.4.3")
6652 (source (origin
6653 (method url-fetch)
6654 (uri (pypi-uri "setuptools_scm" version))
6655 (sha256
6656 (base32
6657 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6658 (build-system python-build-system)
6659 (home-page "https://github.com/pypa/setuptools_scm/")
6660 (synopsis "Manage Python package versions in SCM metadata")
6661 (description
6662 "Setuptools_scm handles managing your Python package versions in
6663 @dfn{software configuration management} (SCM) metadata instead of declaring
6664 them as the version argument or in a SCM managed file.")
6665 (license license:expat)))
6666
6667 ;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
6668 (define-public python-setuptools-scm/next
6669 (package
6670 (inherit python-setuptools-scm)
6671 (version "5.0.1")
6672 (source
6673 (origin
6674 (method url-fetch)
6675 (uri (pypi-uri "setuptools_scm" version))
6676 (sha256
6677 (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
6678
6679 (define-public python2-setuptools-scm
6680 (package-with-python2 python-setuptools-scm))
6681
6682 (define-public python-sexpdata
6683 (package
6684 (name "python-sexpdata")
6685 (version "0.0.3")
6686 (source
6687 (origin
6688 (method url-fetch)
6689 (uri (pypi-uri "sexpdata" version))
6690 (sha256
6691 (base32
6692 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6693 (build-system python-build-system)
6694 (home-page "https://github.com/jd-boyd/sexpdata")
6695 (synopsis "S-expression parser for Python")
6696 (description
6697 "Sexpdata is an S-expression parser/serializer. It has load and dump
6698 functions like pickle, json or PyYAML module.")
6699 (license license:bsd-3)))
6700
6701 (define-public python-pathlib2
6702 (package
6703 (name "python-pathlib2")
6704 (version "2.3.3")
6705 (source
6706 (origin
6707 (method url-fetch)
6708 (uri (pypi-uri "pathlib2" version))
6709 (sha256
6710 (base32
6711 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6712 (build-system python-build-system)
6713 (propagated-inputs
6714 `(("python-scandir" ,python-scandir)
6715 ("python-six" ,python-six)))
6716 (home-page "https://pypi.org/project/pathlib2/")
6717 (synopsis "Object-oriented file system paths")
6718 (description "The goal of pathlib2 is to provide a backport of the
6719 standard @code{pathlib} module which tracks the standard library module, so
6720 all the newest features of the standard @code{pathlib} can be used also on
6721 older Python versions.")
6722 (license license:expat)))
6723
6724 (define-public python-importlib-resources
6725 (package
6726 (name "python-importlib-resources")
6727 (version "3.0.0")
6728 (source
6729 (origin
6730 (method url-fetch)
6731 (uri (pypi-uri "importlib_resources" version))
6732 (sha256
6733 (base32
6734 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6735 (build-system python-build-system)
6736 (native-inputs
6737 `(("python-setuptools-scm" ,python-setuptools-scm)
6738 ("python-toml" ,python-toml)))
6739 (home-page "http://importlib-resources.readthedocs.io/")
6740 (synopsis "Read resources from Python packages")
6741 (description
6742 "@code{importlib_resources} is a backport of Python 3's standard library
6743 @code{importlib.resources} module for Python 2.7, and Python 3.")
6744 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6745 (license license:asl2.0)))
6746
6747 (define-public python2-importlib-resources
6748 (package
6749 (name "python2-importlib-resources")
6750 (version "1.0.2")
6751 (source (origin
6752 (method url-fetch)
6753 (uri (pypi-uri "importlib_resources" version))
6754 (sha256
6755 (base32
6756 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6757 (build-system python-build-system)
6758 (arguments
6759 `(#:python ,python-2
6760 #:phases (modify-phases %standard-phases
6761 ;; The build system tests for python-wheel, but it is
6762 ;; not required for Guix nor the test suite. Just drop
6763 ;; it to make bootstrapping pytest easier.
6764 (add-after 'unpack 'drop-wheel-dependency
6765 (lambda _
6766 (substitute* "setup.cfg"
6767 (("^[[:blank:]]+wheel")
6768 ""))
6769 #t)))))
6770 (propagated-inputs
6771 `(("python-pathlib2" ,python2-pathlib2)
6772 ("python-typing" ,python2-typing)))
6773 (home-page "https://gitlab.com/python-devs/importlib_resources")
6774 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6775 (description
6776 "This package provides an implementation of @code{importlib.resources}
6777 for older versions of Python.")
6778 (license license:asl2.0)))
6779
6780 ;; For importlib-metadata-bootstrap below.
6781 (define-public python2-importlib-resources-bootstrap
6782 (hidden-package
6783 (package/inherit
6784 python2-importlib-resources
6785 (name "python2-importlib-resources-bootstrap")
6786 (propagated-inputs
6787 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6788 ("python-typing" ,python2-typing))))))
6789
6790 (define-public python-importlib-metadata
6791 (package
6792 (name "python-importlib-metadata")
6793 (version "1.5.0")
6794 (source
6795 (origin
6796 (method url-fetch)
6797 (uri (pypi-uri "importlib_metadata" version))
6798 (sha256
6799 (base32
6800 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6801 (build-system python-build-system)
6802 (propagated-inputs
6803 `(("python-zipp" ,python-zipp)))
6804 (native-inputs
6805 `(("python-setuptools-scm" ,python-setuptools-scm)
6806 ("python-pyfakefs" ,python-pyfakefs)
6807 ("python-packaging" ,python-packaging)))
6808 (home-page "https://importlib-metadata.readthedocs.io/")
6809 (synopsis "Read metadata from Python packages")
6810 (description
6811 "@code{importlib_metadata} is a library which provides an API for
6812 accessing an installed Python package's metadata, such as its entry points or
6813 its top-level name. This functionality intends to replace most uses of
6814 @code{pkg_resources} entry point API and metadata API. Along with
6815 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6816 need to use the older and less efficient @code{pkg_resources} package.")
6817 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6818 (license license:asl2.0)))
6819
6820 (define-public python2-importlib-metadata
6821 (let ((base (package-with-python2 (strip-python2-variant
6822 python-importlib-metadata))))
6823 (package/inherit
6824 base
6825 (name "python2-importlib-metadata")
6826 (native-inputs
6827 `(("python-setuptools-scm" ,python2-setuptools-scm)
6828 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6829 ("python-packaging" ,python2-packaging-bootstrap)))
6830 (propagated-inputs
6831 `(("python-configparser" ,python2-configparser)
6832 ("python-contextlib2" ,python2-contextlib2)
6833 ("python-importlib-resources" ,python2-importlib-resources)
6834 ("python-pathlib2" ,python2-pathlib2)
6835 ,@(package-propagated-inputs base))))))
6836
6837 ;; This package is used by python2-pytest, and thus must not depend on it.
6838 (define-public python2-importlib-metadata-bootstrap
6839 (hidden-package
6840 (package/inherit
6841 python2-importlib-metadata
6842 (name "python2-importlib-metadata-bootstrap")
6843 (arguments
6844 `(#:tests? #f
6845 ,@(package-arguments python2-importlib-metadata)))
6846 (propagated-inputs
6847 `(("python-zipp" ,python2-zipp-bootstrap)
6848 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6849 ("python-configparser" ,python2-configparser)
6850 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6851 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6852
6853 (define-public python-importmagic
6854 (package
6855 (name "python-importmagic")
6856 (version "0.1.7")
6857 (source
6858 (origin
6859 (method url-fetch)
6860 (uri (pypi-uri "importmagic" version))
6861 (sha256
6862 (base32
6863 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6864 (build-system python-build-system)
6865 (home-page "https://github.com/alecthomas/importmagic")
6866 (synopsis "Library for adding, removing and managing Python imports")
6867 (description
6868 "Importmagic is a Python library for automatically managing imports by
6869 finding unresolved symbols in Python code and their corresponding imports.")
6870 (license license:bsd-3)))
6871
6872 (define-public python-inotify-simple
6873 (package
6874 (name "python-inotify-simple")
6875 (version "1.3.5")
6876 (source
6877 (origin
6878 (method git-fetch)
6879 (uri (git-reference
6880 (url "https://github.com/chrisjbillington/inotify_simple")
6881 (commit version)))
6882 (file-name (git-file-name name version))
6883 (sha256
6884 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
6885 (build-system python-build-system)
6886 (home-page
6887 "https://github.com/chrisjbillington/inotify_simple")
6888 (synopsis "Simple wrapper around inotify library")
6889 (description
6890 "@code{inotify-simple} is a simple wrapper around inotify library.")
6891 (license license:bsd-3)))
6892
6893 (define-public python-jaraco-packaging
6894 (package
6895 (name "python-jaraco-packaging")
6896 (version "6.1")
6897 (source
6898 (origin
6899 (method url-fetch)
6900 (uri (pypi-uri "jaraco.packaging" version))
6901 (sha256
6902 (base32
6903 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6904 (build-system python-build-system)
6905 (propagated-inputs
6906 `(("python-pytest" ,python-pytest)
6907 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6908 ("python-pytest-flake8" ,python-pytest-flake8)
6909 ("python-rst.linker" ,python-rst.linker)
6910 ("python-setuptools" ,python-setuptools)
6911 ("python-setuptools-scm" ,python-setuptools-scm)
6912 ("python-six" ,python-six)
6913 ("python-sphinx" ,python-sphinx)))
6914 (home-page "https://github.com/jaraco/jaraco.packaging")
6915 (synopsis "Tools to supplement packaging Python releases")
6916 (description
6917 "This package provides various tools to supplement packaging Python
6918 releases.")
6919 (license license:expat)))
6920
6921 (define-public python-pathpy
6922 (package
6923 (name "python-pathpy")
6924 (version "11.5.1")
6925 (source
6926 (origin
6927 (method url-fetch)
6928 (uri (pypi-uri "path.py" version))
6929 (sha256
6930 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6931 (outputs '("out" "doc"))
6932 (build-system python-build-system)
6933 (propagated-inputs
6934 `(("python-appdirs" ,python-appdirs)
6935 ("python-importlib-metadata" ,python-importlib-metadata)))
6936 (native-inputs
6937 `(("python-setuptools-scm" ,python-setuptools-scm)
6938 ("python-sphinx" ,python-sphinx)
6939 ("python-rst.linker" ,python-rst.linker)
6940 ("python-pytest" ,python-pytest)
6941 ("python-pytest-runner" ,python-pytest-runner)
6942 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6943 (arguments
6944 `(#:phases
6945 (modify-phases %standard-phases
6946 (add-after 'build 'build-doc
6947 (lambda _
6948 (setenv "LANG" "en_US.UTF-8")
6949 (invoke "python" "setup.py" "build_sphinx")))
6950 (add-after 'install 'install-doc
6951 (lambda* (#:key outputs #:allow-other-keys)
6952 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6953 (doc (string-append data "/doc/" ,name "-" ,version))
6954 (html (string-append doc "/html")))
6955 (mkdir-p html)
6956 (for-each (lambda (file)
6957 (copy-file file (string-append doc "/" file)))
6958 '("README.rst" "CHANGES.rst"))
6959 (copy-recursively "build/sphinx/html" html)
6960 #t)))
6961 (replace 'check
6962 (lambda _
6963 ;; The import time test aborts if an import takes longer than
6964 ;; 100ms. It may very well take a little longer than that.
6965 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6966 (home-page "https://github.com/jaraco/path.py")
6967 (synopsis "Python module wrapper for built-in os.path")
6968 (description
6969 "@code{path.py} implements path objects as first-class entities, allowing
6970 common operations on files to be invoked on those path objects directly.")
6971 (license license:expat)))
6972
6973 (define-public python-simplegeneric
6974 (package
6975 (name "python-simplegeneric")
6976 (version "0.8.1")
6977 (source
6978 (origin
6979 (method url-fetch)
6980 (uri (pypi-uri "simplegeneric" version ".zip"))
6981 (sha256
6982 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6983 (build-system python-build-system)
6984 (native-inputs
6985 `(("unzip" ,unzip)))
6986 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6987 (synopsis "Python module for simple generic functions")
6988 (description
6989 "The simplegeneric module lets you define simple single-dispatch generic
6990 functions, akin to Python’s built-in generic functions like @code{len()},
6991 @code{iter()} and so on. However, instead of using specially-named methods,
6992 these generic functions use simple lookup tables, akin to those used by
6993 e.g. @code{pickle.dump()} and other generic functions found in the Python
6994 standard library.")
6995 (license license:zpl2.1)))
6996
6997 (define-public python2-simplegeneric
6998 (package-with-python2 python-simplegeneric))
6999
7000 (define-public python-ipython-genutils
7001 ;; TODO: This package is retired, check if can be removed, see description.
7002 (package
7003 (name "python-ipython-genutils")
7004 (version "0.1.0")
7005 (source
7006 (origin
7007 (method url-fetch)
7008 (uri (pypi-uri "ipython_genutils" version))
7009 (sha256
7010 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7011 (build-system python-build-system)
7012 (arguments `(#:tests? #f)) ; no tests
7013 (home-page "https://ipython.org")
7014 (synopsis "Vestigial utilities from IPython")
7015 (description
7016 "This package provides retired utilities from IPython. No packages
7017 outside IPython/Jupyter should depend on it.
7018
7019 This package shouldn't exist. It contains some common utilities shared by
7020 Jupyter and IPython projects during The Big Split. As soon as possible, those
7021 packages will remove their dependency on this, and this package will go
7022 away.")
7023 (license license:bsd-3)))
7024
7025 (define-public python2-ipython-genutils
7026 (package-with-python2 python-ipython-genutils))
7027
7028 (define-public python-ipyparallel
7029 (package
7030 (name "python-ipyparallel")
7031 (version "6.2.4")
7032 (source
7033 (origin
7034 (method url-fetch)
7035 (uri (pypi-uri "ipyparallel" version))
7036 (sha256
7037 (base32
7038 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7039 (build-system python-build-system)
7040 (arguments
7041 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7042 #:phases
7043 (modify-phases %standard-phases
7044 (add-before 'check 'prepare-for-tests
7045 (lambda _
7046 (setenv "HOME" (getcwd))
7047 #t)))))
7048 (propagated-inputs
7049 `(("python-dateutil" ,python-dateutil)
7050 ("python-decorator" ,python-decorator)
7051 ("python-ipykernel" ,python-ipykernel)
7052 ("python-ipython" ,python-ipython)
7053 ("python-ipython-genutils" ,python-ipython-genutils)
7054 ("python-jupyter-client" ,python-jupyter-client)
7055 ("python-pyzmq" ,python-pyzmq)
7056 ("python-tornado" ,python-tornado)
7057 ("python-traitlets" ,python-traitlets)))
7058 (native-inputs
7059 `(("python-ipython" ,python-ipython)
7060 ("python-mock" ,python-mock)
7061 ("python-nose" ,python-nose)
7062 ("python-pytest" ,python-pytest)
7063 ("python-pytest-cov" ,python-pytest-cov)
7064 ("python-testpath" ,python-testpath)))
7065 (home-page "https://ipython.org/")
7066 (synopsis "Interactive Parallel Computing with IPython")
7067 (description
7068 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7069 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7070 CLI scripts:
7071 @enumerate
7072 @item ipcluster - start/stop a cluster
7073 @item ipcontroller - start a scheduler
7074 @item ipengine - start an engine
7075 @end enumerate")
7076 (license license:bsd-3)))
7077
7078 (define-public python2-ipyparallel
7079 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
7080 (package
7081 (inherit ipyparallel)
7082 (propagated-inputs
7083 `(("python2-futures" ,python2-futures)
7084 ,@(package-propagated-inputs ipyparallel))))))
7085
7086 (define-public python-ipython-cluster-helper
7087 (package
7088 (name "python-ipython-cluster-helper")
7089 (version "0.6.4")
7090 (source
7091 (origin
7092 (method url-fetch)
7093 (uri (pypi-uri "ipython-cluster-helper" version))
7094 (sha256
7095 (base32
7096 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
7097 (modules '((guix build utils)))
7098 (snippet
7099 '(begin (substitute* "requirements.txt"
7100 (("ipython.*") "ipython\n"))
7101 #t))))
7102 (build-system python-build-system)
7103 (arguments
7104 `(#:tests? #f ; Test suite can't find IPython.
7105 #:phases
7106 (modify-phases %standard-phases
7107 (replace 'check
7108 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7109 (if tests?
7110 (begin
7111 (setenv "HOME" (getcwd))
7112 (add-installed-pythonpath inputs outputs)
7113 (invoke "python" "example/example.py" "--local"))
7114 #t))))))
7115 (propagated-inputs
7116 `(("python-ipyparallel" ,python-ipyparallel)
7117 ("python-ipython" ,python-ipython)
7118 ("python-netifaces" ,python-netifaces)
7119 ("python-pyzmq" ,python-pyzmq)
7120 ("python-setuptools" ,python-setuptools)
7121 ("python-six" ,python-six)))
7122 (home-page "https://github.com/roryk/ipython-cluster-helper")
7123 (synopsis
7124 "Simplify IPython cluster start up and use for multiple schedulers")
7125 (description
7126 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
7127 profile, launches a cluster and returns a view. On program exit it shuts the
7128 cluster down and deletes the throwaway profile.")
7129 (license license:expat)))
7130
7131 (define-public python2-ipython-cluster-helper
7132 (package-with-python2 python-ipython-cluster-helper))
7133
7134 (define-public python-traitlets
7135 (package
7136 (name "python-traitlets")
7137 (version "4.3.3")
7138 (source
7139 (origin
7140 (method url-fetch)
7141 (uri (pypi-uri "traitlets" version))
7142 (sha256
7143 (base32
7144 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
7145 (build-system python-build-system)
7146 (arguments
7147 `(#:phases
7148 (modify-phases %standard-phases
7149 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
7150 (propagated-inputs
7151 `(("python-ipython-genutils" ,python-ipython-genutils)
7152 ("python-decorator" ,python-decorator)))
7153 (native-inputs
7154 `(("python-pytest" ,python-pytest)))
7155 (properties `((python2-variant . ,(delay python2-traitlets))))
7156 (home-page "https://ipython.org")
7157 (synopsis "Configuration system for Python applications")
7158 (description
7159 "Traitlets is a framework that lets Python classes have attributes with
7160 type checking, dynamically calculated default values, and ‘on change’
7161 callbacks. The package also includes a mechanism to use traitlets for
7162 configuration, loading values from files or from command line arguments. This
7163 is a distinct layer on top of traitlets, so you can use traitlets in your code
7164 without using the configuration machinery.")
7165 (license license:bsd-3)))
7166
7167 (define-public python2-traitlets
7168 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
7169 (package
7170 (inherit traitlets)
7171 (propagated-inputs
7172 `(("python2-enum34" ,python2-enum34)
7173 ,@(package-propagated-inputs traitlets))))))
7174
7175 (define-public python-jupyter-core
7176 (package
7177 (name "python-jupyter-core")
7178 (version "4.4.0")
7179 (source
7180 (origin
7181 (method url-fetch)
7182 (uri (string-append (pypi-uri "jupyter_core" version)))
7183 (sha256
7184 (base32
7185 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
7186 (build-system python-build-system)
7187 ;; FIXME: not sure how to run the tests
7188 (arguments `(#:tests? #f))
7189 (propagated-inputs
7190 `(("python-traitlets" ,python-traitlets)))
7191 (home-page "https://jupyter.org/")
7192 (synopsis "Jupyter base package")
7193 (description
7194 "Jupyter core is the base package on which Jupyter projects rely.")
7195 (license license:bsd-3)))
7196
7197 (define-public python2-jupyter-core
7198 (package-with-python2 python-jupyter-core))
7199
7200 (define-public python-jupyter-client
7201 (package
7202 (name "python-jupyter-client")
7203 (version "5.2.4")
7204 (source
7205 (origin
7206 (method url-fetch)
7207 (uri (pypi-uri "jupyter_client" version))
7208 (sha256
7209 (base32
7210 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
7211 (build-system python-build-system)
7212 ;; Tests fail because of missing native python kernel which I assume is
7213 ;; provided by the ipython package, which we cannot use because it would
7214 ;; cause a dependency cycle.
7215 (arguments
7216 `(#:tests? #f
7217
7218 #:phases (modify-phases %standard-phases
7219 (add-after 'unpack 'set-tool-file-names
7220 (lambda* (#:key inputs #:allow-other-keys)
7221 (let ((iproute (assoc-ref inputs "iproute")))
7222 (substitute* "jupyter_client/localinterfaces.py"
7223 (("'ip'")
7224 (string-append "'" iproute "/sbin/ip'")))
7225 #t))))))
7226 (inputs
7227 `(("iproute" ,iproute)))
7228 (propagated-inputs
7229 `(("python-pyzmq" ,python-pyzmq)
7230 ("python-traitlets" ,python-traitlets)
7231 ("python-jupyter-core" ,python-jupyter-core)))
7232 (home-page "https://jupyter.org/")
7233 (synopsis "Jupyter protocol implementation and client libraries")
7234 (description
7235 "The @code{jupyter_client} package contains the reference implementation
7236 of the Jupyter protocol. It also provides client and kernel management APIs
7237 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7238 installing @code{kernelspec}s for use with Jupyter frontends.")
7239 (license license:bsd-3)))
7240
7241 (define-public python2-jupyter-client
7242 (package-with-python2 python-jupyter-client))
7243
7244 (define-public python-ipykernel
7245 (package
7246 (name "python-ipykernel")
7247 (version "5.1.3")
7248 (source
7249 (origin
7250 (method url-fetch)
7251 (uri (pypi-uri "ipykernel" version))
7252 (sha256
7253 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
7254 (build-system python-build-system)
7255 (arguments
7256 `(#:phases
7257 (modify-phases %standard-phases
7258 (replace 'check
7259 (lambda _
7260 (setenv "HOME" "/tmp")
7261 (invoke "pytest" "-v")
7262 #t))
7263 (add-after 'install 'set-python-file-name
7264 (lambda* (#:key outputs #:allow-other-keys)
7265 ;; Record the absolute file name of the 'python' executable in
7266 ;; 'kernel.json'.
7267 (let ((out (assoc-ref outputs "out")))
7268 (substitute* (string-append out "/share/jupyter"
7269 "/kernels/python3/kernel.json")
7270 (("\"python\"")
7271 (string-append "\"" (which "python") "\"")))
7272 #t))))))
7273 (propagated-inputs
7274 `(("python-ipython" ,python-ipython)
7275 ;; imported at runtime during connect
7276 ("python-jupyter-client" ,python-jupyter-client)))
7277 (native-inputs
7278 `(("python-flaky" ,python-flaky)
7279 ("python-nose" ,python-nose)
7280 ("python-pytest" ,python-pytest)))
7281 (home-page "https://ipython.org")
7282 (synopsis "IPython Kernel for Jupyter")
7283 (description
7284 "This package provides the IPython kernel for Jupyter.")
7285 (properties `((python2-variant . ,(delay python2-ipykernel))))
7286 (license license:bsd-3)))
7287
7288 ;; Version 5.x and above no longer support Python 2.
7289 (define-public python2-ipykernel
7290 (package
7291 (name "python2-ipykernel")
7292 (version "4.10.1")
7293 (source
7294 (origin
7295 (method url-fetch)
7296 (uri (pypi-uri "ipykernel" version))
7297 (sha256
7298 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
7299 (build-system python-build-system)
7300 (arguments
7301 `(#:python ,python-2))
7302 (propagated-inputs
7303 `(("python2-ipython" ,python2-ipython)
7304 ;; imported at runtime during connect
7305 ("python2-jupyter-client" ,python2-jupyter-client)
7306 ("python2-tornado" ,python2-tornado)
7307 ("python2-traitlets" ,python2-traitlets)))
7308 (native-inputs
7309 `(("python2-mock" ,python2-mock)
7310 ("python2-nose" ,python2-nose)
7311 ("python2-pytest" ,python2-pytest)
7312 ("python2-pytest-cov" ,python2-pytest-cov)))
7313 (home-page "https://ipython.org")
7314 (synopsis "IPython Kernel for Jupyter")
7315 (description
7316 "This package provides the IPython kernel for Jupyter.")
7317 (license license:bsd-3)))
7318
7319 (define-public python-pari-jupyter
7320 (package
7321 (name "python-pari-jupyter")
7322 (version "1.3.2")
7323 (source
7324 (origin
7325 (method url-fetch)
7326 (uri (pypi-uri "pari_jupyter" version))
7327 (sha256
7328 (base32
7329 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7330 (build-system python-build-system)
7331 (propagated-inputs
7332 `(("python-ipykernel" ,python-ipykernel)))
7333 (inputs
7334 `(("pari-gp" ,pari-gp)
7335 ("readline" ,readline)))
7336 (arguments
7337 `(#:tests? #f)) ; no test suite
7338 (home-page
7339 "https://github.com/jdemeyer/pari_jupyter")
7340 (synopsis "A Jupyter kernel for PARI/GP")
7341 (description "The package provides a PARI/GP kernel for Jupyter.")
7342 (license license:gpl3+)))
7343
7344 (define-public python-backcall
7345 (package
7346 (name "python-backcall")
7347 (version "0.1.0")
7348 (source
7349 (origin
7350 (method url-fetch)
7351 (uri (pypi-uri "backcall" version))
7352 (sha256
7353 (base32
7354 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
7355 (build-system python-build-system)
7356 (home-page "https://github.com/takluyver/backcall/")
7357 (synopsis "Specifications for callback functions passed in to an API")
7358 (description
7359 "If your code lets other people supply callback functions, it's important
7360 to specify the function signature you expect, and check that functions support
7361 that. Adding extra parameters later would break other peoples code unless
7362 you're careful. The @code{backcall} package provides a way of specifying the
7363 callback signature using a prototype function.")
7364 (license license:bsd-3)))
7365
7366 (define-public python-ipython
7367 (package
7368 (name "python-ipython")
7369 (version "7.9.0")
7370 (source
7371 (origin
7372 (method url-fetch)
7373 (uri (pypi-uri "ipython" version ".tar.gz"))
7374 (sha256
7375 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7376 (build-system python-build-system)
7377 (propagated-inputs
7378 `(("python-backcall" ,python-backcall)
7379 ("python-pyzmq" ,python-pyzmq)
7380 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7381 ("python-terminado" ,python-terminado)
7382 ("python-matplotlib" ,python-matplotlib)
7383 ("python-numpy" ,python-numpy)
7384 ("python-numpydoc" ,python-numpydoc)
7385 ("python-jedi" ,python-jedi)
7386 ("python-jinja2" ,python-jinja2)
7387 ("python-mistune" ,python-mistune)
7388 ("python-pexpect" ,python-pexpect)
7389 ("python-pickleshare" ,python-pickleshare)
7390 ("python-simplegeneric" ,python-simplegeneric)
7391 ("python-jsonschema" ,python-jsonschema)
7392 ("python-traitlets" ,python-traitlets)
7393 ("python-nbformat" ,python-nbformat)
7394 ("python-pygments" ,python-pygments)))
7395 (inputs
7396 `(("readline" ,readline)
7397 ("which" ,which)))
7398 (native-inputs
7399 `(("graphviz" ,graphviz)
7400 ("pkg-config" ,pkg-config)
7401 ("python-requests" ,python-requests) ;; for tests
7402 ("python-testpath" ,python-testpath)
7403 ("python-nose" ,python-nose)))
7404 (arguments
7405 `(#:phases
7406 (modify-phases %standard-phases
7407 (add-after 'unpack 'make-docs-reproducible
7408 (lambda _
7409 (substitute* "IPython/sphinxext/ipython_directive.py"
7410 ((".*import datetime") "")
7411 ((".*datetime.datetime.now\\(\\)") "")
7412 (("%timeit") "# %timeit"))
7413 #t))
7414 ;; Tests can only be run after the library has been installed and not
7415 ;; within the source directory.
7416 (delete 'check)
7417 (add-after 'install 'check
7418 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7419 (if tests?
7420 (begin
7421 ;; Make installed package available for running the tests
7422 (add-installed-pythonpath inputs outputs)
7423 (setenv "HOME" "/tmp/") ;; required by a test
7424 ;; We only test the core because one of the other tests
7425 ;; tries to import ipykernel.
7426 (invoke "python" "IPython/testing/iptest.py"
7427 "-v" "IPython/core/tests"))
7428 #t)))
7429 (add-before 'check 'fix-tests
7430 (lambda* (#:key inputs #:allow-other-keys)
7431 (substitute* "./IPython/utils/_process_posix.py"
7432 (("/usr/bin/env', 'which") (which "which")))
7433 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7434 (("#!/usr/bin/env python")
7435 (string-append "#!" (which "python"))))
7436 ;; This test introduces a circular dependency on ipykernel
7437 ;; (which depends on ipython).
7438 (delete-file "IPython/core/tests/test_display.py")
7439 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7440 (delete-file "IPython/core/tests/test_interactiveshell.py")
7441 #t)))))
7442 (home-page "https://ipython.org")
7443 (synopsis "IPython is a tool for interactive computing in Python")
7444 (description
7445 "IPython provides a rich architecture for interactive computing with:
7446 Powerful interactive shells, a browser-based notebook, support for interactive
7447 data visualization, embeddable interpreters and tools for parallel
7448 computing.")
7449 (properties `((python2-variant . ,(delay python2-ipython))))
7450 (license license:bsd-3)))
7451
7452 ;; This is the latest release of the LTS version of ipython with support for
7453 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7454 ;; dropped support for Python 2.7.
7455 (define-public python2-ipython
7456 (package
7457 (name "python2-ipython")
7458 (version "5.8.0")
7459 (source
7460 (origin
7461 (method url-fetch)
7462 (uri (pypi-uri "ipython" version ".tar.gz"))
7463 (sha256
7464 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7465 (build-system python-build-system)
7466 (propagated-inputs
7467 `(("python2-backports-shutil-get-terminal-size"
7468 ,python2-backports-shutil-get-terminal-size)
7469 ("python2-pathlib2" ,python2-pathlib2)
7470 ("python2-pyzmq" ,python2-pyzmq)
7471 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7472 ("python2-terminado" ,python2-terminado)
7473 ("python2-matplotlib" ,python2-matplotlib)
7474 ("python2-numpy" ,python2-numpy)
7475 ("python2-numpydoc" ,python2-numpydoc)
7476 ("python2-jinja2" ,python2-jinja2)
7477 ("python2-mistune" ,python2-mistune)
7478 ("python2-pexpect" ,python2-pexpect)
7479 ("python2-pickleshare" ,python2-pickleshare)
7480 ("python2-simplegeneric" ,python2-simplegeneric)
7481 ("python2-jsonschema" ,python2-jsonschema)
7482 ("python2-traitlets" ,python2-traitlets)
7483 ("python2-nbformat" ,python2-nbformat)
7484 ("python2-pygments" ,python2-pygments)))
7485 (inputs
7486 `(("readline" ,readline)
7487 ("which" ,which)))
7488 (native-inputs
7489 `(("graphviz" ,graphviz)
7490 ("pkg-config" ,pkg-config)
7491 ("python2-requests" ,python2-requests) ;; for tests
7492 ("python2-testpath" ,python2-testpath)
7493 ("python2-mock" ,python2-mock)
7494 ("python2-nose" ,python2-nose)))
7495 (arguments
7496 `(#:python ,python-2
7497 #:phases
7498 (modify-phases %standard-phases
7499 (add-before 'check 'delete-broken-tests
7500 (lambda* (#:key inputs #:allow-other-keys)
7501 ;; These tests throw errors for unknown reasons.
7502 (delete-file "IPython/core/tests/test_displayhook.py")
7503 (delete-file "IPython/core/tests/test_magic_terminal.py")
7504 (delete-file "IPython/core/tests/test_profile.py")
7505 #t)))))
7506 (home-page "https://ipython.org")
7507 (synopsis "IPython is a tool for interactive computing in Python")
7508 (description
7509 "IPython provides a rich architecture for interactive computing with:
7510 Powerful interactive shells, a browser-based notebook, support for interactive
7511 data visualization, embeddable interpreters and tools for parallel
7512 computing.")
7513 (license license:bsd-3)))
7514
7515 (define-public python-ipython-documentation
7516 (package
7517 (inherit python-ipython)
7518 (name "python-ipython-documentation")
7519 (version (package-version python-ipython))
7520 (arguments
7521 `(#:phases
7522 (modify-phases %standard-phases
7523 (delete 'build)
7524 (delete 'check)
7525 (replace 'install
7526 (lambda* (#:key outputs #:allow-other-keys)
7527 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7528 (doc (string-append data "/doc/" ,name "-" ,version))
7529 (html (string-append doc "/html"))
7530 (man1 (string-append data "/man/man1"))
7531 (info (string-append data "/info"))
7532 (examples (string-append doc "/examples"))
7533 (python-arg (string-append "PYTHON=" (which "python"))))
7534 (setenv "LANG" "en_US.utf8")
7535 (with-directory-excursion "docs"
7536 ;; FIXME: pdf fails to build
7537 ;;(system* "make" "pdf" "PAPER=a4")
7538 (system* "make" python-arg "html")
7539 ;; FIXME: the generated texi file contains ^@^@, which trips
7540 ;; up the parser.
7541 ;; (system* "make" python-arg "info")
7542 )
7543 (copy-recursively "docs/man" man1)
7544 (copy-recursively "examples" examples)
7545 (copy-recursively "docs/build/html" html)
7546 ;; (copy-file "docs/build/latex/ipython.pdf"
7547 ;; (string-append doc "/ipython.pdf"))
7548 (mkdir-p info)
7549 ;; (copy-file "docs/build/texinfo/ipython.info"
7550 ;; (string-append info "/ipython.info"))
7551 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7552 #t)))))
7553 (inputs
7554 `(("python-ipython" ,python-ipython)
7555 ("python-ipykernel" ,python-ipykernel)))
7556 (native-inputs
7557 `(("python-sphinx" ,python-sphinx)
7558 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7559 ;; FIXME: It's possible that a smaller union would work just as well.
7560 ("texlive" ,(texlive-union (list texlive-amsfonts
7561 texlive-fonts-ec
7562 texlive-generic-ifxetex
7563 texlive-generic-pdftex
7564 texlive-latex-capt-of
7565 texlive-latex-cmap
7566 texlive-latex-environ
7567 texlive-latex-eqparbox
7568 texlive-latex-etoolbox
7569 texlive-latex-expdlist
7570 texlive-latex-fancyhdr
7571 texlive-latex-fancyvrb
7572 texlive-latex-fncychap
7573 texlive-latex-float
7574 texlive-latex-framed
7575 texlive-latex-geometry
7576 texlive-latex-graphics
7577 texlive-latex-hyperref
7578 texlive-latex-mdwtools
7579 texlive-latex-multirow
7580 texlive-latex-needspace
7581 texlive-latex-oberdiek
7582 texlive-latex-parskip
7583 texlive-latex-preview
7584 texlive-latex-tabulary
7585 texlive-latex-threeparttable
7586 texlive-latex-titlesec
7587 texlive-latex-trimspaces
7588 texlive-latex-ucs
7589 texlive-latex-upquote
7590 texlive-latex-url
7591 texlive-latex-varwidth
7592 texlive-latex-wrapfig)))
7593 ("texinfo" ,texinfo)))))
7594
7595 (define-public python-urwid
7596 (package
7597 (name "python-urwid")
7598 (version "2.1.0")
7599 (source
7600 (origin
7601 (method url-fetch)
7602 (uri (pypi-uri "urwid" version))
7603 (sha256
7604 (base32
7605 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7606 (build-system python-build-system)
7607 (home-page "http://urwid.org")
7608 (synopsis "Console user interface library for Python")
7609 (description
7610 "Urwid is a curses-based UI/widget library for Python. It includes many
7611 features useful for text console applications.")
7612 (license license:lgpl2.1+)))
7613
7614 (define-public python2-urwid
7615 (package-with-python2 python-urwid))
7616
7617 (define-public python-urwidtrees
7618 (package
7619 (name "python-urwidtrees")
7620 (version "1.0.2")
7621 (source
7622 (origin
7623 (method git-fetch)
7624 ;; package author intends on distributing via github rather than pypi:
7625 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7626 (uri (git-reference
7627 (url "https://github.com/pazz/urwidtrees")
7628 (commit version)))
7629 (file-name (git-file-name name version))
7630 (sha256
7631 (base32
7632 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7633 (build-system python-build-system)
7634 (arguments
7635 '(#:use-setuptools? #f
7636 #:tests? #f)) ; no tests
7637 (propagated-inputs `(("python-urwid" ,python-urwid)))
7638 (home-page "https://github.com/pazz/urwidtrees")
7639 (synopsis "Tree widgets for urwid")
7640 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7641 toolkit. Use it to build trees of widgets.")
7642 (license license:gpl3+)))
7643
7644 (define-public python2-urwidtrees
7645 (package-with-python2 python-urwidtrees))
7646
7647 (define-public python-ua-parser
7648 (package
7649 (name "python-ua-parser")
7650 (version "0.8.0")
7651 (source
7652 (origin
7653 (method url-fetch)
7654 (uri (pypi-uri "ua-parser" version))
7655 (sha256
7656 (base32
7657 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7658 (build-system python-build-system)
7659 (arguments
7660 `(#:tests? #f)) ;no test suite in release
7661 (native-inputs
7662 `(("python-pyyaml" ,python-pyyaml)))
7663 (home-page "https://github.com/ua-parser/uap-python")
7664 (synopsis "User agent parser")
7665 (description
7666 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7667 (license license:asl2.0)))
7668
7669 (define-public python2-ua-parser
7670 (package-with-python2 python-ua-parser))
7671
7672 (define-public python-user-agents
7673 (package
7674 (name "python-user-agents")
7675 (version "1.1.0")
7676 (source
7677 (origin
7678 (method url-fetch)
7679 (uri (pypi-uri "user-agents" version))
7680 (sha256
7681 (base32
7682 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7683 (build-system python-build-system)
7684 (arguments
7685 `(#:tests? #f)) ;missing devices.json test file in release
7686 (propagated-inputs
7687 `(("python-ua-parser" ,python-ua-parser)))
7688 (home-page "https://github.com/selwin/python-user-agents")
7689 (synopsis "User Agent strings parsing library")
7690 (description
7691 "A library to identify devices (phones, tablets) and their capabilities by
7692 parsing (browser/HTTP) user agent strings.")
7693 (license license:expat)))
7694
7695 (define-public python2-user-agents
7696 (package-with-python2 python-user-agents))
7697
7698 (define-public python-dbus
7699 (package
7700 (name "python-dbus")
7701 (version "1.2.16")
7702 (source
7703 (origin
7704 (method url-fetch)
7705 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7706 "dbus-python-" version ".tar.gz"))
7707 (sha256
7708 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7709 (build-system gnu-build-system)
7710 (native-inputs
7711 `(("pkg-config" ,pkg-config)))
7712 (inputs
7713 `(("python" ,python-wrapper)
7714 ("dbus-glib" ,dbus-glib)))
7715 (synopsis "Python bindings for D-bus")
7716 (description "python-dbus provides bindings for libdbus, the reference
7717 implementation of D-Bus.")
7718 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7719 (license license:expat)))
7720
7721 (define-public python2-dbus
7722 (package (inherit python-dbus)
7723 (name "python2-dbus")
7724 (inputs `(("python" ,python-2)
7725 ,@(alist-delete "python"
7726 (package-inputs python-dbus)
7727 equal?)))))
7728
7729 (define-public python-notify2
7730 (package
7731 (name "python-notify2")
7732 (version "0.3.1")
7733 (source
7734 (origin
7735 (method url-fetch)
7736 (uri (pypi-uri "notify2" version))
7737 (sha256
7738 (base32
7739 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7740 (build-system python-build-system)
7741 (arguments `(#:tests? #f)) ; tests depend on system state
7742 (native-inputs
7743 `(("python-dbus" ,python-dbus)))
7744 (home-page "https://bitbucket.org/takluyver/pynotify2")
7745 (synopsis "Python interface to D-Bus notifications")
7746 (description
7747 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7748 It is a reimplementation of pynotify in pure Python, and an alternative to
7749 the GObject Introspection bindings to libnotify for non-GTK applications.")
7750 (license (list license:bsd-2
7751 license:lgpl2.1+))))
7752
7753 (define-public python2-notify2
7754 (package-with-python2 python-notify2))
7755
7756 ;; beautifulsoup4 has a totally different namespace than 3.x,
7757 ;; and pypi seems to put it under its own name, so I guess we should too
7758 (define-public python-beautifulsoup4
7759 (package
7760 (name "python-beautifulsoup4")
7761 (version "4.9.1")
7762 (source
7763 (origin
7764 (method url-fetch)
7765 (uri (pypi-uri "beautifulsoup4" version))
7766 (sha256
7767 (base32
7768 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7769 (build-system python-build-system)
7770 (arguments
7771 `(#:phases
7772 (modify-phases %standard-phases
7773 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7774 ;; must use this conversion script when building with Python 3. The
7775 ;; conversion script also runs the tests.
7776 ;; For more information, see the file 'convert-py3k' in the source
7777 ;; distribution.
7778 (replace 'check
7779 (lambda _ (invoke "./convert-py3k"))))))
7780 (propagated-inputs
7781 `(("python-soupsieve" ,python-soupsieve)))
7782 (home-page
7783 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7784 (synopsis
7785 "Python screen-scraping library")
7786 (description
7787 "Beautiful Soup is a Python library designed for rapidly setting up
7788 screen-scraping projects. It offers Pythonic idioms for navigating,
7789 searching, and modifying a parse tree, providing a toolkit for
7790 dissecting a document and extracting what you need. It automatically
7791 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7792 (license license:expat)
7793 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7794
7795 (define-public python2-beautifulsoup4
7796 (package
7797 (inherit (package-with-python2
7798 (strip-python2-variant python-beautifulsoup4)))
7799 (arguments `(#:python ,python-2))))
7800
7801 (define-public python-soupsieve
7802 (package
7803 (name "python-soupsieve")
7804 (version "2.0.1")
7805 (source
7806 (origin
7807 (method url-fetch)
7808 (uri (pypi-uri "soupsieve" version))
7809 (sha256
7810 (base32
7811 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7812 (build-system python-build-system)
7813 (arguments `(#:tests? #f))
7814 ;;XXX: 2 tests fail currently despite claming they were to be
7815 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7816 ;;don't want to create a circular dependency.
7817 (home-page "https://github.com/facelessuser/soupsieve")
7818 (synopsis "CSS selector library")
7819 (description
7820 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7821 Soup 4. It aims to provide selecting, matching, and filtering using modern
7822 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7823 specifications up through the latest CSS level 4 drafts and beyond (though
7824 some are not yet implemented).")
7825 (properties `((python2-variant . ,(delay python2-soupsieve))))
7826 (license license:expat)))
7827
7828 ;; This is the last version that supports python-2
7829 (define-public python2-soupsieve
7830 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7831 (package
7832 (inherit base)
7833 (version "1.9.6")
7834 (source
7835 (origin
7836 (method url-fetch)
7837 (uri (pypi-uri "soupsieve" version))
7838 (sha256
7839 (base32
7840 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7841 (propagated-inputs
7842 `(("python2-backports-functools-lru-cache"
7843 ,python2-backports-functools-lru-cache)
7844 ,@(package-propagated-inputs base))))))
7845
7846 (define-public python-netifaces
7847 (package
7848 (name "python-netifaces")
7849 (version "0.10.9")
7850 (source
7851 (origin
7852 (method url-fetch)
7853 (uri (pypi-uri "netifaces" version))
7854 (sha256
7855 (base32
7856 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7857 (build-system python-build-system)
7858 (home-page "https://github.com/al45tair/netifaces")
7859 (synopsis
7860 "Python module for portable network interface information")
7861 (description
7862 "Netifaces is a Python module providing information on network
7863 interfaces in an easy and portable manner.")
7864 (license license:expat)))
7865
7866 (define-public python2-netifaces
7867 (package-with-python2 python-netifaces))
7868
7869 (define-public python-networkx
7870 (package
7871 (name "python-networkx")
7872 (version "2.5")
7873 (source
7874 (origin
7875 (method url-fetch)
7876 (uri (pypi-uri "networkx" version))
7877 (sha256
7878 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7879 (build-system python-build-system)
7880 (arguments
7881 '(#:phases (modify-phases %standard-phases
7882 (replace 'check
7883 (lambda* (#:key tests? #:allow-other-keys)
7884 (if tests?
7885 (invoke "pytest" "-vv" "--pyargs" "networkx")
7886 (format #t "test suite not run~%"))
7887 #t)))))
7888 ;; python-decorator is needed at runtime.
7889 (propagated-inputs
7890 `(("python-decorator" ,python-decorator)))
7891 (native-inputs
7892 `(("python-pytest" ,python-pytest)))
7893 (home-page "https://networkx.github.io/")
7894 (synopsis "Python module for creating and manipulating graphs and networks")
7895 (description
7896 "NetworkX is a Python package for the creation, manipulation, and study
7897 of the structure, dynamics, and functions of complex networks.")
7898 (properties `((python2-variant . ,(delay python2-networkx))))
7899 (license license:bsd-3)))
7900
7901 ;; NetworkX 2.2 is the last version with support for Python 2.
7902 (define-public python2-networkx
7903 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7904 (package
7905 (inherit base)
7906 (version "2.2")
7907 (source (origin
7908 (method url-fetch)
7909 (uri (pypi-uri "networkx" version ".zip"))
7910 (sha256
7911 (base32
7912 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7913 (arguments
7914 `(#:python ,python-2))
7915 (native-inputs
7916 `(("python-nose" ,python2-nose)
7917 ("unzip" ,unzip))))))
7918
7919 (define-public python-datrie
7920 (package
7921 (name "python-datrie")
7922 (version "0.8.2")
7923 (source
7924 (origin
7925 (method url-fetch)
7926 (uri (pypi-uri "datrie" version))
7927 (sha256
7928 (base32
7929 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7930 (build-system python-build-system)
7931 (native-inputs
7932 `(("python-cython" ,python-cython)
7933 ("python-hypothesis" ,python-hypothesis)
7934 ("python-pytest" ,python-pytest)
7935 ("python-pytest-runner" ,python-pytest-runner)))
7936 (home-page "https://github.com/kmike/datrie")
7937 (synopsis "Fast, efficiently stored trie for Python")
7938 (description
7939 "This package provides a fast, efficiently stored trie implementation for
7940 Python.")
7941 (license license:lgpl2.1+)))
7942
7943 (define-public snakemake
7944 (package
7945 (name "snakemake")
7946 (version "5.32.2")
7947 (source
7948 (origin
7949 (method url-fetch)
7950 (uri (pypi-uri "snakemake" version))
7951 (sha256
7952 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
7953 (build-system python-build-system)
7954 (arguments
7955 ;; TODO: Package missing test dependencies.
7956 '(#:tests? #f
7957 #:phases
7958 (modify-phases %standard-phases
7959 ;; For cluster execution Snakemake will call Python. Since there is
7960 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7961 ;; this by calling the snakemake wrapper instead.
7962 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7963 (lambda* (#:key outputs #:allow-other-keys)
7964 (substitute* "snakemake/executors/__init__.py"
7965 (("\\{sys.executable\\} -m snakemake")
7966 (string-append (assoc-ref outputs "out")
7967 "/bin/snakemake")))
7968 #t)))))
7969 (propagated-inputs
7970 `(("python-appdirs" ,python-appdirs)
7971 ("python-configargparse" ,python-configargparse)
7972 ("python-datrie" ,python-datrie)
7973 ("python-docutils" ,python-docutils)
7974 ("python-gitpython" ,python-gitpython)
7975 ("python-jinja2" ,python-jinja2)
7976 ("python-jsonschema" ,python-jsonschema)
7977 ("python-networkx" ,python-networkx)
7978 ("python-psutil" ,python-psutil)
7979 ("python-pyyaml" ,python-pyyaml)
7980 ("python-ratelimiter" ,python-ratelimiter)
7981 ("python-requests" ,python-requests)
7982 ("python-wrapt" ,python-wrapt)))
7983 (home-page "https://snakemake.readthedocs.io")
7984 (synopsis "Python-based execution environment for make-like workflows")
7985 (description
7986 "Snakemake aims to reduce the complexity of creating workflows by
7987 providing a clean and modern domain specific specification language (DSL) in
7988 Python style, together with a fast and comfortable execution environment.")
7989 (license license:expat)))
7990
7991 (define-public python-pyqrcode
7992 (package
7993 (name "python-pyqrcode")
7994 (version "1.2.1")
7995 (source
7996 (origin
7997 (method url-fetch)
7998 (uri (pypi-uri "PyQRCode" version))
7999 (sha256
8000 (base32
8001 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8002 (build-system python-build-system)
8003 (home-page
8004 "https://github.com/mnooner256/pyqrcode")
8005 (synopsis "QR code generator")
8006 (description
8007 "Pyqrcode is a QR code generator written purely in Python with
8008 SVG, EPS, PNG and terminal output.")
8009 (license license:bsd-3)))
8010
8011 (define-public python-seaborn
8012 (package
8013 (name "python-seaborn")
8014 (version "0.10.0")
8015 (source
8016 (origin
8017 (method url-fetch)
8018 (uri (pypi-uri "seaborn" version))
8019 (sha256
8020 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
8021 (build-system python-build-system)
8022 (arguments
8023 `(#:phases
8024 (modify-phases %standard-phases
8025 (add-before 'check 'start-xserver
8026 (lambda* (#:key inputs #:allow-other-keys)
8027 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8028 ;; There must be a running X server and make check doesn't
8029 ;; start one. Therefore we must do it.
8030 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8031 (setenv "DISPLAY" ":1")
8032 #t)))
8033 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
8034 (propagated-inputs
8035 `(("python-pandas" ,python-pandas)
8036 ("python-matplotlib" ,python-matplotlib)
8037 ("python-numpy" ,python-numpy)
8038 ("python-scipy" ,python-scipy)))
8039 (native-inputs
8040 `(("python-pytest" ,python-pytest)
8041 ("xorg-server" ,xorg-server-for-tests)))
8042 (home-page "https://seaborn.pydata.org/")
8043 (synopsis "Statistical data visualization")
8044 (description
8045 "Seaborn is a library for making attractive and informative statistical
8046 graphics in Python. It is built on top of matplotlib and tightly integrated
8047 with the PyData stack, including support for numpy and pandas data structures
8048 and statistical routines from scipy and statsmodels.")
8049 (properties `((python2-variant . ,(delay python2-seaborn))))
8050 (license license:bsd-3)))
8051
8052 ;; 0.9.1 is the last release with support for Python 2.
8053 (define-public python2-seaborn
8054 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8055 (package
8056 (inherit base)
8057 (version "0.9.1")
8058 (source (origin
8059 (method url-fetch)
8060 (uri (pypi-uri "seaborn" version))
8061 (sha256
8062 (base32
8063 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8064
8065 (define-public python-mpmath
8066 (package
8067 (name "python-mpmath")
8068 (version "1.1.0")
8069 (source (origin
8070 (method url-fetch)
8071 (uri (pypi-uri "mpmath" version))
8072 (file-name (git-file-name name version))
8073 (sha256
8074 (base32
8075 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8076 (build-system python-build-system)
8077 (native-inputs
8078 `(("python-pytest" ,python-pytest)))
8079 (arguments
8080 '(#:phases
8081 (modify-phases %standard-phases
8082 (replace 'check
8083 (lambda _
8084 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8085 (home-page "https://mpmath.org")
8086 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8087 (description
8088 "@code{mpmath} can be used as an arbitrary-precision substitute for
8089 Python's float/complex types and math/cmath modules, but also does much
8090 more advanced mathematics.")
8091 (license license:bsd-3)))
8092
8093 (define-public python2-mpmath
8094 (package-with-python2 python-mpmath))
8095
8096 (define-public python-bigfloat
8097 (package
8098 (name "python-bigfloat")
8099 (version "0.3.0")
8100 (source
8101 (origin
8102 (method url-fetch)
8103 (uri (pypi-uri "bigfloat" version))
8104 (sha256
8105 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8106 (build-system python-build-system)
8107 (inputs
8108 `(("mpfr" ,mpfr)))
8109 (home-page "https://github.com/mdickinson/bigfloat")
8110 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8111 (description
8112 "This package provides a Python interface to the MPFR library for
8113 multiprecision arithmetic.")
8114 (license license:lgpl3+)))
8115
8116 (define-public python2-bigfloat
8117 (package-with-python2 python-bigfloat))
8118
8119 (define-public python-sympy
8120 (package
8121 (name "python-sympy")
8122 (version "1.7.1")
8123 (source
8124 (origin
8125 (method url-fetch)
8126 (uri (pypi-uri "sympy" version))
8127 (sha256
8128 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8129 (build-system python-build-system)
8130 (arguments
8131 `(#:phases
8132 (modify-phases %standard-phases
8133 (replace 'check
8134 (lambda* (#:key outputs #:allow-other-keys)
8135 (invoke
8136 (or (which "python3") (which "python"))
8137 "-c" "import sympy; sympy.test(\"/core\")"))))))
8138 (propagated-inputs
8139 `(("python-mpmath" ,python-mpmath)))
8140 (home-page "https://www.sympy.org/")
8141 (synopsis "Python library for symbolic mathematics")
8142 (description
8143 "SymPy is a Python library for symbolic mathematics. It aims to become a
8144 full-featured computer algebra system (CAS) while keeping the code as simple
8145 as possible in order to be comprehensible and easily extensible.")
8146 (license license:bsd-3)))
8147
8148 (define-public python2-sympy
8149 (package
8150 (inherit (package-with-python2 python-sympy))
8151 (version "1.5.1") ; last release for python2
8152 (source
8153 (origin
8154 (method url-fetch)
8155 (uri (pypi-uri "sympy" version))
8156 (sha256
8157 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8158
8159 (define-public python-q
8160 (package
8161 (name "python-q")
8162 (version "2.6")
8163 (source
8164 (origin
8165 (method url-fetch)
8166 (uri (pypi-uri "q" version))
8167 (sha256
8168 (base32
8169 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
8170 (build-system python-build-system)
8171 (home-page "https://github.com/zestyping/q")
8172 (synopsis "Quick-and-dirty debugging output for tired programmers")
8173 (description
8174 "q is a Python module for \"print\" style of debugging Python code. It
8175 provides convenient short API for print out of values, tracebacks, and
8176 falling into the Python interpreter.")
8177 (license license:asl2.0)))
8178
8179 (define-public python2-q
8180 (package-with-python2 python-q))
8181
8182 (define-public python-xlib
8183 (package
8184 (name "python-xlib")
8185 (version "0.29")
8186 (source
8187 (origin
8188 (method git-fetch)
8189 (uri (git-reference
8190 (url "https://github.com/python-xlib/python-xlib")
8191 (commit version)))
8192 (file-name (git-file-name name version))
8193 (sha256
8194 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
8195 (build-system python-build-system)
8196 (arguments
8197 `(#:phases
8198 (modify-phases %standard-phases
8199 (add-before 'check 'start-xserver
8200 (lambda* (#:key inputs #:allow-other-keys)
8201 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8202 ;; There must be a running X server and make check doesn't
8203 ;; start one. Therefore we must do it.
8204 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8205 (setenv "DISPLAY" ":1")
8206 #t))))))
8207 (native-inputs
8208 `(("python-mock" ,python-mock)
8209 ("python-setuptools-scm" ,python-setuptools-scm)
8210 ("xorg-server" ,xorg-server)))
8211 (propagated-inputs
8212 `(("python-six" ,python-six)))
8213 (home-page "https://github.com/python-xlib/python-xlib")
8214 (synopsis "Python X11 client library")
8215 (description
8216 "The Python X Library is intended to be a fully functional
8217 X client library for Python programs. It is useful to implement
8218 low-level X clients. It is written entirely in Python.")
8219 (license license:gpl2+)))
8220
8221 (define-public python2-xlib
8222 (package-with-python2 python-xlib))
8223
8224 (define-public python-singledispatch
8225 (package
8226 (name "python-singledispatch")
8227 (version "3.4.0.3")
8228 (source
8229 (origin
8230 (method url-fetch)
8231 (uri (pypi-uri "singledispatch" version))
8232 (sha256
8233 (base32
8234 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8235 (build-system python-build-system)
8236 (native-inputs
8237 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8238 (home-page
8239 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8240 (synopsis "Backport of singledispatch feature from Python 3.4")
8241 (description
8242 "This library brings functools.singledispatch from Python 3.4 to Python
8243 2.6-3.3.")
8244 (license license:expat)))
8245
8246 (define-public python2-singledispatch
8247 (package-with-python2 python-singledispatch))
8248
8249 ;; the python- version can be removed with python-3.5
8250 (define-public python-backports-abc
8251 (package
8252 (name "python-backports-abc")
8253 (version "0.5")
8254 (source
8255 (origin
8256 (method url-fetch)
8257 (uri (pypi-uri "backports_abc" version))
8258 (sha256
8259 (base32
8260 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
8261 (build-system python-build-system)
8262 (home-page "https://github.com/cython/backports_abc")
8263 (synopsis "Backport of additions to the 'collections.abc' module")
8264 (description
8265 "Python-backports-abc provides a backport of additions to the
8266 @code{collections.abc} module in Python-3.5.")
8267 (license license:psfl)))
8268
8269 (define-public python2-backports-abc
8270 (package-with-python2 python-backports-abc))
8271
8272 (define-public python-backports-csv
8273 (package
8274 (name "python-backports-csv")
8275 (version "1.0.7")
8276 (source
8277 (origin
8278 (method url-fetch)
8279 (uri (pypi-uri "backports.csv" version))
8280 (sha256
8281 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8282 (build-system python-build-system)
8283 (home-page "https://github.com/ryanhiebert/backports.csv")
8284 (synopsis "Backport of Python 3's csv module for Python 2")
8285 (description
8286 "Provides a backport of Python 3's @code{csv} module for parsing
8287 comma separated values. The API of the @code{csv} module in Python 2
8288 is drastically different from the @code{csv} module in Python 3.
8289 This is due, for the most part, to the difference between str in
8290 Python 2 and Python 3.")
8291 (license license:psfl)))
8292
8293 (define-public python2-backports-csv
8294 (package-with-python2 python-backports-csv))
8295
8296 (define-public python2-backports-shutil-get-terminal-size
8297 (package
8298 (name "python2-backports-shutil-get-terminal-size")
8299 (version "1.0.0")
8300 (source
8301 (origin
8302 (method url-fetch)
8303 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8304 (sha256
8305 (base32
8306 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8307 (build-system python-build-system)
8308 (arguments
8309 `(#:python ,python-2
8310 #:phases
8311 (modify-phases %standard-phases
8312 (replace 'check
8313 (lambda _
8314 (setenv "PYTHONPATH" (string-append "./build/lib:"
8315 (getenv "PYTHONPATH")))
8316 (invoke "py.test" "-v"))))))
8317 (native-inputs
8318 `(("python2-pytest" ,python2-pytest)))
8319 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8320 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8321 (description
8322 "This package provides a backport of the @code{get_terminal_size
8323 function} from Python 3.3's @code{shutil}.
8324 Unlike the original version it is written in pure Python rather than C,
8325 so it might be a tiny bit slower.")
8326 (license license:expat)))
8327
8328 (define-public python-waf
8329 (package
8330 (name "python-waf")
8331 (version "2.0.19")
8332 (source (origin
8333 (method url-fetch)
8334 (uri (string-append "https://waf.io/"
8335 "waf-" version ".tar.bz2"))
8336 (sha256
8337 (base32
8338 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8339 (build-system python-build-system)
8340 (arguments
8341 '(#:phases
8342 (modify-phases %standard-phases
8343 (replace 'build
8344 (lambda _
8345 ;; XXX: Find a way to add all extra tools.
8346 (let ((tools '("gccdeps"
8347 "clang_compilation_database")))
8348 (invoke "python" "waf-light" "configure" "build"
8349 (string-append "--tools="
8350 (string-join tools ","))))))
8351 (replace 'check
8352 (lambda _
8353 (invoke "python" "waf" "--version")))
8354 (replace 'install
8355 (lambda* (#:key outputs #:allow-other-keys)
8356 (let ((out (assoc-ref outputs "out")))
8357 (install-file "waf" (string-append out "/bin")))
8358 #t))
8359 ;; waf breaks when it is wrapped.
8360 (delete 'wrap))))
8361 (home-page "https://waf.io/")
8362 (synopsis "Python-based build system")
8363 (description
8364 "Waf is a Python-based framework for configuring, compiling and installing
8365 applications.")
8366 (license license:bsd-3)))
8367
8368 (define-public python2-waf
8369 (package-with-python2 python-waf))
8370
8371 (define-public python-pyzmq
8372 (package
8373 (name "python-pyzmq")
8374 (version "17.1.2")
8375 (source
8376 (origin
8377 (method url-fetch)
8378 (uri (pypi-uri "pyzmq" version))
8379 (sha256
8380 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8381 (build-system python-build-system)
8382 (arguments
8383 `(#:configure-flags
8384 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8385 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8386 ;; --inplace' for 'python setup.py test' to work.
8387 #:tests? #f))
8388 (inputs
8389 `(("zeromq" ,zeromq)))
8390 (native-inputs
8391 `(("pkg-config" ,pkg-config)
8392 ("python-nose" ,python-nose)))
8393 (home-page "https://github.com/zeromq/pyzmq")
8394 (synopsis "Python bindings for 0MQ")
8395 (description
8396 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8397 (license license:bsd-4)))
8398
8399 (define-public python2-pyzmq
8400 (package-with-python2 python-pyzmq))
8401
8402 (define-public python-pep8
8403 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8404 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8405 ;; some dependents' test suites, and nothing more.
8406 (package
8407 (name "python-pep8")
8408 (version "1.7.0")
8409 (source
8410 (origin
8411 (method url-fetch)
8412 (uri (pypi-uri "pep8" version))
8413 (sha256
8414 (base32
8415 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8416 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8417 (build-system python-build-system)
8418 (home-page "https://pep8.readthedocs.org/")
8419 (synopsis "Python style guide checker")
8420 (description
8421 "This tools checks Python code against some of the style conventions in
8422 PEP 8.")
8423 (license license:expat)))
8424
8425 (define-public python2-pep8
8426 (package-with-python2 python-pep8))
8427
8428 (define-public python-pep517
8429 (package
8430 (inherit python-pep517-bootstrap)
8431 (name "python-pep517")
8432 (arguments
8433 '(#:phases
8434 (modify-phases %standard-phases
8435 (replace 'check
8436 (lambda* (#:key tests? #:allow-other-keys)
8437 (delete-file "pytest.ini")
8438 ;; This test tries to connect to the internet
8439 (delete-file "tests/test_meta.py")
8440 (if tests?
8441 (invoke "pytest")
8442 #t))))))
8443 (native-inputs
8444 `(("python-mock" ,python-mock)
8445 ("python-pytest" ,python-pytest)
8446 ("python-testpath" ,python-testpath)))
8447 (properties `((python2-variant . ,(delay python2-pep517))))))
8448
8449 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8450 (define-public python2-pep517
8451 (let ((base (package-with-python2
8452 (strip-python2-variant python-pep517))))
8453 (package
8454 (inherit base)
8455 (name "python2-pep517")
8456 (arguments
8457 `(#:tests? #f
8458 ,@(package-arguments base)))
8459 (native-inputs `()))))
8460
8461 (define-public python-pyflakes
8462 (package
8463 (name "python-pyflakes")
8464 (version "2.2.0")
8465 (source
8466 (origin
8467 (method url-fetch)
8468 (uri (pypi-uri "pyflakes" version))
8469 (sha256
8470 (base32
8471 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8472 (build-system python-build-system)
8473 (home-page
8474 "https://github.com/pyflakes/pyflakes")
8475 (synopsis "Passive checker of Python programs")
8476 (description
8477 "Pyflakes statically checks Python source code for common errors.")
8478 (license license:expat)))
8479
8480 (define-public python2-pyflakes
8481 (package-with-python2 python-pyflakes))
8482
8483 (define-public python-mccabe
8484 (package
8485 (name "python-mccabe")
8486 (version "0.6.1")
8487 (source
8488 (origin
8489 (method url-fetch)
8490 (uri (pypi-uri "mccabe" version))
8491 (sha256
8492 (base32
8493 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8494 (build-system python-build-system)
8495 (native-inputs
8496 `(("python-pytest" ,python-pytest-bootstrap)
8497 ("python-pytest-runner" ,python-pytest-runner)))
8498 (home-page "https://github.com/flintwork/mccabe")
8499 (synopsis "McCabe checker, plugin for flake8")
8500 (description
8501 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8502 complexity of Python source code.")
8503 (license license:expat)))
8504
8505 (define-public python2-mccabe
8506 (package-with-python2 python-mccabe))
8507
8508 (define-public python-flake8
8509 (package
8510 (name "python-flake8")
8511 (version "3.8.4")
8512 (source (origin
8513 (method url-fetch)
8514 (uri (pypi-uri "flake8" version))
8515 (sha256
8516 (base32
8517 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8518 (build-system python-build-system)
8519 (arguments
8520 `(#:phases
8521 (modify-phases %standard-phases
8522 (delete 'check)
8523 (add-after 'install 'check
8524 (lambda* (#:key inputs outputs #:allow-other-keys)
8525 (add-installed-pythonpath inputs outputs)
8526 (invoke "pytest" "-v")
8527 #t)))))
8528 (propagated-inputs
8529 `(("python-pycodestyle" ,python-pycodestyle)
8530 ("python-entrypoints" ,python-entrypoints)
8531 ("python-pyflakes" ,python-pyflakes)
8532 ("python-mccabe" ,python-mccabe)))
8533 (native-inputs
8534 `(("python-mock" ,python-mock)
8535 ("python-pytest" ,python-pytest-bootstrap)))
8536 (home-page "https://gitlab.com/pycqa/flake8")
8537 (synopsis
8538 "The modular source code checker: pep8, pyflakes and co")
8539 (description
8540 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8541 (properties `((python2-variant . ,(delay python2-flake8))))
8542 (license license:expat)))
8543
8544 (define-public python2-flake8
8545 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8546 (package (inherit base)
8547 (propagated-inputs
8548 `(("python2-configparser" ,python2-configparser)
8549 ("python2-enum34" ,python2-enum34)
8550 ("python2-functools32" ,python2-functools32)
8551 ("python2-typing" ,python2-typing)
8552 ,@(package-propagated-inputs base))))))
8553
8554 (define-public python-flake8-bugbear
8555 (package
8556 (name "python-flake8-bugbear")
8557 (version "20.1.4")
8558 (source
8559 (origin
8560 (method url-fetch)
8561 (uri (pypi-uri "flake8-bugbear" version))
8562 (sha256
8563 (base32
8564 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8565 (build-system python-build-system)
8566 (arguments
8567 '(#:phases
8568 (modify-phases %standard-phases
8569 (add-before 'check 'disable-test
8570 (lambda _
8571 ;; This test fails on slow computers.
8572 (substitute* "tests/test_bugbear.py"
8573 (("def test_does_not_crash_on_any_valid_code")
8574 "def _test_does_not_crash_on_any_valid_code")))))))
8575 (native-inputs
8576 `(("python-hypothesis" ,python-hypothesis)
8577 ("python-hypothesmith" ,python-hypothesmith)))
8578 (propagated-inputs
8579 `(("python-attrs" ,python-attrs)
8580 ("python-flake8" ,python-flake8)))
8581 (home-page "https://github.com/PyCQA/flake8-bugbear")
8582 (synopsis
8583 "Flake8 plugin for finding likely bugs and design problems in your program")
8584 (description
8585 "This package contains a plugin for Flake8 finding likely bugs and
8586 design problems in your program. It contains warnings that don't belong
8587 in pyflakes and pycodestyle.")
8588 (license license:expat)))
8589
8590 (define-public python-flake8-implicit-str-concat
8591 (package
8592 (name "python-flake8-implicit-str-concat")
8593 (version "0.2.0")
8594 (source
8595 (origin
8596 (method url-fetch)
8597 (uri (pypi-uri "flake8_implicit_str_concat" version))
8598 (sha256
8599 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
8600 (build-system python-build-system)
8601 (propagated-inputs
8602 `(("python-attrs" ,python-attrs)
8603 ("python-more-itertools" ,python-more-itertools)))
8604 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
8605 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
8606 (description
8607 "This is a plugin for the Python code checking tool Flake8 to encourage
8608 correct string literal concatenation.
8609
8610 It looks for style problems like implicitly concatenated string literals on
8611 the same line (which can be introduced by the code formating tool Black), or
8612 unnecessary plus operators for explicit string literal concatenation.")
8613 (license license:expat)))
8614
8615 (define-public python-flake8-polyfill
8616 (package
8617 (name "python-flake8-polyfill")
8618 (version "1.0.2")
8619 (source
8620 (origin
8621 (method url-fetch)
8622 (uri (pypi-uri "flake8-polyfill" version))
8623 (sha256
8624 (base32
8625 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8626 (build-system python-build-system)
8627 (arguments
8628 '(#:phases
8629 (modify-phases %standard-phases
8630 (replace 'check
8631 (lambda _
8632 ;; Be compatible with Pytest 4:
8633 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8634 (substitute* "setup.cfg"
8635 (("\\[pytest\\]")
8636 "[tool:pytest]"))
8637
8638 (setenv "PYTHONPATH"
8639 (string-append (getcwd) "/build/lib:"
8640 (getenv "PYTHONPATH")))
8641 (invoke "py.test" "-v"))))))
8642 (native-inputs
8643 `(("python-flake8" ,python-flake8)
8644 ("python-mock" ,python-mock)
8645 ("python-pep8" ,python-pep8)
8646 ("python-pycodestyle" ,python-pycodestyle)
8647 ("python-pytest" ,python-pytest)))
8648 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8649 (synopsis "Polyfill package for Flake8 plugins")
8650 (description
8651 "This package that provides some compatibility helpers for Flake8
8652 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8653 (license license:expat)))
8654
8655 (define-public python2-flake8-polyfill
8656 (package-with-python2 python-flake8-polyfill))
8657
8658 (define-public python-flake8-print
8659 (package
8660 (name "python-flake8-print")
8661 (version "4.0.0")
8662 (source
8663 (origin
8664 (method url-fetch)
8665 (uri (pypi-uri "flake8-print" version))
8666 (sha256
8667 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
8668 (build-system python-build-system)
8669 (propagated-inputs
8670 `(("python-flake8" ,python-flake8)
8671 ("python-pycodestyle" ,python-pycodestyle)
8672 ("python-six" ,python-six)))
8673 (home-page "https://github.com/jbkahn/flake8-print")
8674 (synopsis "Print statement checker plugin for Flake8")
8675 (description
8676 "This plugin for Flake8 checks for @code{print} statements in Python
8677 files.")
8678 (license license:expat)))
8679
8680 (define-public python-flake8-pyi
8681 (package
8682 (name "python-flake8-pyi")
8683 (version "20.5.0")
8684 (source
8685 (origin
8686 (method url-fetch)
8687 (uri (pypi-uri "flake8-pyi" version))
8688 (sha256
8689 (base32
8690 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8691 (build-system python-build-system)
8692 (propagated-inputs
8693 `(("python-attrs" ,python-attrs)
8694 ("python-flake8" ,python-flake8)
8695 ("python-pyflakes" ,python-pyflakes)))
8696 (home-page "https://github.com/ambv/flake8-pyi")
8697 (synopsis
8698 "Flake8 plugin that provides specializations for type hinting stub files")
8699 (description
8700 "This package contains a plugin that provides specializations for
8701 type hinting stub files, especially interesting for linting typeshed. It
8702 adds the @file{.pyi} extension to the default value of the @code{--filename}
8703 command-line argument to Flake8. This means stubs are linted by default with
8704 this plugin enabled, without needing to explicitly list every file. It
8705 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8706 expressions after the entire file has been read. This enables support for
8707 first-class forward references that stub files use.")
8708 (license license:expat)))
8709
8710 (define-public python-flake8-pie
8711 (package
8712 (name "python-flake8-pie")
8713 (version "0.5.0")
8714 (source
8715 (origin
8716 (method url-fetch)
8717 (uri (pypi-uri "flake8-pie" version))
8718 (sha256
8719 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8720 (build-system python-build-system)
8721 (home-page "https://github.com/sbdchd/flake8-pie")
8722 (synopsis "Flake8 extension that implements lints")
8723 (description
8724 "This package provides a flake8 extension that implements miscellaneous
8725 lints.")
8726 (license license:bsd-2)))
8727
8728 (define-public python-autoflake
8729 (package
8730 (name "python-autoflake")
8731 (version "1.3.1")
8732 (source
8733 (origin
8734 (method url-fetch)
8735 (uri (pypi-uri "autoflake" version))
8736 (sha256
8737 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8738 (build-system python-build-system)
8739 (propagated-inputs
8740 `(("python-pyflakes" ,python-pyflakes)))
8741 (home-page "https://github.com/myint/autoflake")
8742 (synopsis "Removes unused imports and unused variables")
8743 (description
8744 "@code{autoflake} removes unused imports and unused variables from Python
8745 code as reported by @code{pyflakes}.
8746
8747 By default, it only removes unused imports for modules that are part of the
8748 standard library. Removal of unused variables is also disabled by default.
8749 It also removes useless @code{pass} statements.")
8750 (license license:expat)))
8751
8752 (define-public python-mistune
8753 (package
8754 (name "python-mistune")
8755 (version "0.8.4")
8756 (source
8757 (origin
8758 (method url-fetch)
8759 (uri (pypi-uri "mistune" version))
8760 (sha256
8761 (base32
8762 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8763 (build-system python-build-system)
8764 (native-inputs
8765 `(("python-nose" ,python-nose)
8766 ("python-cython" ,python-cython)))
8767 (home-page "https://github.com/lepture/mistune")
8768 (synopsis "Markdown parser in pure Python")
8769 (description "This package provides a fast markdown parser in pure
8770 Python.")
8771 (license license:bsd-3)))
8772
8773 (define-public python2-mistune
8774 (package-with-python2 python-mistune))
8775
8776 (define-public python-markdown
8777 (package
8778 (name "python-markdown")
8779 (version "3.2.1")
8780 (source
8781 (origin
8782 (method url-fetch)
8783 (uri (pypi-uri "Markdown" version))
8784 (sha256
8785 (base32
8786 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8787 (build-system python-build-system)
8788 (native-inputs
8789 `(("python-nose" ,python-nose)
8790 ("python-pyyaml" ,python-pyyaml)))
8791 (home-page "https://python-markdown.github.io/")
8792 (synopsis "Python implementation of Markdown")
8793 (description
8794 "This package provides a Python implementation of John Gruber's
8795 Markdown. The library features international input, various Markdown
8796 extensions, and several HTML output formats. A command line wrapper
8797 markdown_py is also provided to convert Markdown files to HTML.")
8798 (properties `((python2-variant . ,(delay python2-markdown))))
8799 (license license:bsd-3)))
8800
8801 ;; Markdown 3.2 dropped support for Python 2.
8802 (define-public python2-markdown
8803 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8804 (package/inherit
8805 base
8806 (version "3.1.1")
8807 (source (origin
8808 (method url-fetch)
8809 (uri (pypi-uri "Markdown" version))
8810 (sha256
8811 (base32
8812 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8813
8814 (define-public python-ptyprocess
8815 (package
8816 (name "python-ptyprocess")
8817 (version "0.5.2")
8818 (source
8819 (origin
8820 (method url-fetch)
8821 (uri (pypi-uri "ptyprocess" version))
8822 (sha256
8823 (base32
8824 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8825 (build-system python-build-system)
8826 (native-inputs
8827 `(("python-nose" ,python-nose)))
8828 (arguments
8829 `(#:phases
8830 (modify-phases %standard-phases
8831 (replace 'check
8832 (lambda _ (invoke "nosetests"))))))
8833 (home-page "https://github.com/pexpect/ptyprocess")
8834 (synopsis "Run a subprocess in a pseudo terminal")
8835 (description
8836 "This package provides a Python library used to launch a subprocess in a
8837 pseudo terminal (pty), and interact with both the process and its pty.")
8838 (license license:isc)))
8839
8840 (define-public python2-ptyprocess
8841 (package-with-python2 python-ptyprocess))
8842
8843 (define-public python-cram
8844 (package
8845 (name "python-cram")
8846 (version "0.7")
8847 (home-page "https://bitheap.org/cram/")
8848 (source (origin
8849 (method url-fetch)
8850 (uri (list (string-append home-page "cram-"
8851 version ".tar.gz")
8852 (pypi-uri "cram" version)))
8853 (sha256
8854 (base32
8855 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8856 (arguments
8857 '(#:phases
8858 (modify-phases %standard-phases
8859 (add-after 'unpack 'patch-source
8860 (lambda _
8861 (substitute* (find-files "cram" ".*\\.py$")
8862 ;; Replace default shell path.
8863 (("/bin/sh") (which "sh")))
8864 (substitute* (find-files "tests" ".*\\.t$")
8865 (("md5") "md5sum")
8866 (("/bin/bash") (which "bash"))
8867 (("/bin/sh") (which "sh")))
8868 (substitute* "cram/_test.py"
8869 ;; This hack works around a bug triggered by substituting
8870 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8871 ;; "cram -h", which breaks the output at 80 characters. This
8872 ;; causes the line showing the default shell to break into two
8873 ;; lines, but the test expects a single line...
8874 (("env\\['COLUMNS'\\] = '80'")
8875 "env['COLUMNS'] = '160'"))
8876
8877 (substitute* "Makefile"
8878 ;; Recent versions of python-coverage have caused the test
8879 ;; coverage to decrease (as of version 0.7). Allow that.
8880 (("--fail-under=100")
8881 "--fail-under=90"))
8882
8883 #t))
8884 (replace 'check
8885 ;; The test phase uses the built library and executable.
8886 (lambda* (#:key inputs outputs #:allow-other-keys)
8887 (add-installed-pythonpath inputs outputs)
8888 (setenv "PATH" (string-append (getenv "PATH") ":"
8889 (assoc-ref outputs "out") "/bin"))
8890 (invoke "make" "test"))))))
8891 (build-system python-build-system)
8892 (native-inputs
8893 `(("python-coverage" ,python-coverage)
8894 ("which" ,which)))
8895 (synopsis "Simple testing framework for command line applications")
8896 (description
8897 "Cram is a functional testing framework for command line applications.
8898 Cram tests look like snippets of interactive shell sessions. Cram runs each
8899 command and compares the command output in the test with the command’s actual
8900 output.")
8901 (license license:gpl2+)))
8902
8903 (define-public python2-cram
8904 (package-with-python2 python-cram))
8905
8906 (define-public python-crashtest
8907 (package
8908 (name "python-crashtest")
8909 (version "0.3.1")
8910 (source
8911 (origin
8912 (method url-fetch)
8913 (uri (pypi-uri "crashtest" version))
8914 (sha256
8915 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8916 (build-system python-build-system)
8917 (home-page "https://github.com/sdispater/crashtest")
8918 (synopsis "Manage Python errors with ease")
8919 (description
8920 "Python library that makes exceptions handling and inspection easier.")
8921 (license license:expat)))
8922
8923 (define-public python-straight-plugin
8924 (package
8925 (name "python-straight-plugin")
8926 (version "1.4.1")
8927 (source
8928 (origin
8929 (method url-fetch)
8930 (uri (pypi-uri "straight.plugin" version))
8931 (sha256
8932 (base32
8933 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
8934 (build-system python-build-system)
8935 (home-page "https://github.com/ironfroggy/straight.plugin")
8936 (synopsis "Simple namespaced plugin facility")
8937 (description "Straight Plugin provides a type of plugin you can create from
8938 almost any existing Python modules, and an easy way for outside developers to
8939 add functionality and customization to your projects with their own plugins.")
8940 (license license:expat)))
8941
8942 (define-public python2-straight-plugin
8943 (package-with-python2 python-straight-plugin))
8944
8945 (define-public python-fonttools
8946 (package
8947 (name "python-fonttools")
8948 (version "4.6.0")
8949 (source (origin
8950 (method url-fetch)
8951 (uri (pypi-uri "fonttools" version ".zip"))
8952 (sha256
8953 (base32
8954 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8955 (build-system python-build-system)
8956 (native-inputs
8957 `(("unzip" ,unzip)
8958 ("python-pytest" ,python-pytest)
8959 ("python-pytest-runner" ,python-pytest-runner)))
8960 (home-page "https://github.com/fonttools/fonttools")
8961 (synopsis "Tools to manipulate font files")
8962 (description
8963 "FontTools/TTX is a library to manipulate font files from Python. It
8964 supports reading and writing of TrueType/OpenType fonts, reading and writing
8965 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8966 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8967 from an XML-based format.")
8968 (license license:expat)))
8969
8970 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8971 (define-public python2-fonttools
8972 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8973 (package/inherit
8974 base
8975 (version "3.44.0")
8976 (source (origin
8977 (method url-fetch)
8978 (uri (pypi-uri "fonttools" version ".zip"))
8979 (sha256
8980 (base32
8981 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8982
8983 (define-public python-ly
8984 (package
8985 (name "python-ly")
8986 (version "0.9.5")
8987 (source
8988 (origin
8989 (method url-fetch)
8990 (uri (pypi-uri name version))
8991 (sha256
8992 (base32
8993 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8994 (build-system python-build-system)
8995 (arguments
8996 ;; FIXME: Some tests need network access.
8997 '(#:tests? #f))
8998 (synopsis "Tool and library for manipulating LilyPond files")
8999 (description "This package provides a Python library to parse, manipulate
9000 or create documents in LilyPond format. A command line program ly is also
9001 provided that can be used to do various manipulations with LilyPond files.")
9002 (home-page "https://pypi.org/project/python-ly/")
9003 (license license:gpl2+)))
9004
9005 (define-public python-appdirs
9006 (package
9007 (name "python-appdirs")
9008 (version "1.4.3")
9009 (source
9010 (origin
9011 (method url-fetch)
9012 (uri (pypi-uri "appdirs" version))
9013 (sha256
9014 (base32
9015 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9016 (build-system python-build-system)
9017 (home-page "https://github.com/ActiveState/appdirs")
9018 (synopsis
9019 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9020 (description
9021 "This module provides a portable way of finding out where user data
9022 should be stored on various operating systems.")
9023 (license license:expat)))
9024
9025 (define-public python2-appdirs
9026 (package-with-python2 python-appdirs))
9027
9028 (define-public python-gorilla
9029 (package
9030 (name "python-gorilla")
9031 (version "0.3.0")
9032 (source (origin
9033 (method url-fetch)
9034 (uri (pypi-uri "gorilla" version))
9035 (sha256
9036 (base32
9037 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9038 (build-system python-build-system)
9039 (home-page "https://github.com/christophercrouzet/gorilla")
9040 (synopsis "Convenient monkey patching with Python")
9041 (description
9042 "Gorilla is a Python library that provides a convenient approach to
9043 monkey patching. Monkey patching is the process of modifying module and
9044 class attributes at runtime with the purpose of replacing or extending
9045 third-party code.")
9046 (license license:expat)))
9047
9048 (define-public python-llfuse
9049 (package
9050 (name "python-llfuse")
9051 (version "1.3.8")
9052 (source (origin
9053 (method url-fetch)
9054 (uri (pypi-uri "llfuse" version))
9055 (sha256
9056 (base32
9057 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9058 (build-system python-build-system)
9059 (inputs
9060 `(("fuse" ,fuse)
9061 ("attr" ,attr)))
9062 (native-inputs
9063 `(("pkg-config" ,pkg-config)))
9064 (synopsis "Python bindings for FUSE")
9065 (description
9066 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9067 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9068 (license license:lgpl2.0+)
9069 (properties `((python2-variant . ,(delay python2-llfuse))))))
9070
9071 (define-public python2-llfuse
9072 (package (inherit (package-with-python2
9073 (strip-python2-variant python-llfuse)))
9074 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
9075
9076 (define-public python-msgpack
9077 (package
9078 (name "python-msgpack")
9079 (version "1.0.0")
9080 (source (origin
9081 (method url-fetch)
9082 (uri (pypi-uri "msgpack" version))
9083 (sha256
9084 (base32
9085 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
9086 (build-system python-build-system)
9087 (arguments
9088 `(#:modules ((guix build utils)
9089 (guix build python-build-system)
9090 (ice-9 ftw)
9091 (srfi srfi-1)
9092 (srfi srfi-26))
9093 #:phases
9094 (modify-phases %standard-phases
9095 (replace 'check
9096 (lambda _
9097 (let ((cwd (getcwd)))
9098 (setenv "PYTHONPATH"
9099 (string-append cwd "/build/"
9100 (find (cut string-prefix? "lib" <>)
9101 (scandir (string-append cwd "/build")))
9102 ":"
9103 (getenv "PYTHONPATH")))
9104 (invoke "pytest" "-v" "test")))))))
9105 (native-inputs
9106 `(("python-pytest" ,python-pytest)))
9107 (synopsis "MessagePack (de)serializer")
9108 (description "MessagePack is a fast, compact binary serialization format,
9109 suitable for similar data to JSON. This package provides CPython bindings for
9110 reading and writing MessagePack data.")
9111 (home-page "https://pypi.org/project/msgpack/")
9112 (license license:asl2.0)))
9113
9114 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
9115 ;; release 0.5. Some packages like borg still call it by the old name for now.
9116 ;; <https://bugs.gnu.org/30662>
9117 (define-public python-msgpack-transitional
9118 (package
9119 (inherit python-msgpack)
9120 (name "python-msgpack-transitional")
9121 (version "0.5.6")
9122 (source (origin
9123 (method url-fetch)
9124 (uri (pypi-uri "msgpack" version))
9125 (sha256
9126 (base32
9127 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
9128 (arguments
9129 (substitute-keyword-arguments (package-arguments python-msgpack)
9130 ((#:phases phases)
9131 `(modify-phases ,phases
9132 (add-after 'unpack 'configure-transitional
9133 (lambda _
9134 ;; Keep using the old name.
9135 (substitute* "setup.py"
9136 (("TRANSITIONAL = False")
9137 "TRANSITIONAL = 1"))
9138 #t))))))))
9139
9140 (define-public python2-msgpack
9141 (package-with-python2 python-msgpack))
9142
9143 (define-public python-netaddr
9144 (package
9145 (name "python-netaddr")
9146 (version "0.7.19")
9147 (source
9148 (origin
9149 (method url-fetch)
9150 (uri (pypi-uri "netaddr" version))
9151 (sha256
9152 (base32
9153 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
9154 (build-system python-build-system)
9155 (arguments `(#:tests? #f)) ;; No tests.
9156 (home-page "https://github.com/drkjam/netaddr/")
9157 (synopsis "Pythonic manipulation of network addresses")
9158 (description
9159 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
9160 and MAC network addresses.")
9161 (license license:bsd-3)))
9162
9163 (define-public python2-netaddr
9164 (package-with-python2 python-netaddr))
9165
9166 (define-public python2-pyroute2
9167 (package
9168 (name "python2-pyroute2")
9169 (version "0.5.6")
9170 (source
9171 (origin
9172 (method url-fetch)
9173 (uri (pypi-uri "pyroute2" version))
9174 (sha256
9175 (base32
9176 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
9177 (build-system python-build-system)
9178 (arguments
9179 `(#:python ,python-2)) ;Python 3.x is not supported
9180 (home-page "https://github.com/svinota/pyroute2")
9181 (synopsis "Python netlink library")
9182 (description
9183 "Pyroute2 is a pure Python netlink library with minimal dependencies.
9184 Supported netlink families and protocols include:
9185 @itemize
9186 @item rtnl, network settings - addresses, routes, traffic controls
9187 @item nfnetlink - netfilter API: ipset, nftables, ...
9188 @item ipq - simplest userspace packet filtering, iptables QUEUE target
9189 @item devlink - manage and monitor devlink-enabled hardware
9190 @item generic - generic netlink families
9191 @itemize
9192 @item nl80211 - wireless functions API (basic support)
9193 @item taskstats - extended process statistics
9194 @item acpi_events - ACPI events monitoring
9195 @item thermal_events - thermal events monitoring
9196 @item VFS_DQUOT - disk quota events monitoring
9197 @end itemize
9198 @end itemize")
9199 (license license:gpl2+)))
9200
9201 (define-public python-wrapt
9202 (package
9203 (name "python-wrapt")
9204 (version "1.11.2")
9205 (source
9206 (origin
9207 (method url-fetch)
9208 (uri (pypi-uri "wrapt" version))
9209 (sha256
9210 (base32
9211 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
9212 (build-system python-build-system)
9213 (arguments
9214 ;; Tests are not included in the tarball, they are only available in the
9215 ;; git repository.
9216 `(#:tests? #f))
9217 (home-page "https://github.com/GrahamDumpleton/wrapt")
9218 (synopsis "Module for decorators, wrappers and monkey patching")
9219 (description
9220 "The aim of the wrapt module is to provide a transparent object proxy for
9221 Python, which can be used as the basis for the construction of function
9222 wrappers and decorator functions.")
9223 (license license:bsd-2)))
9224
9225 (define-public python2-wrapt
9226 (package-with-python2 python-wrapt))
9227
9228 (define-public python-commonmark
9229 (package
9230 (name "python-commonmark")
9231 (version "0.9.1")
9232 (source
9233 (origin
9234 (method url-fetch)
9235 (uri (pypi-uri "commonmark" version))
9236 (sha256
9237 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
9238 (build-system python-build-system)
9239 (arguments
9240 `(#:phases
9241 (modify-phases %standard-phases
9242 (replace 'check
9243 (lambda* (#:key inputs outputs #:allow-other-keys)
9244 (add-installed-pythonpath inputs outputs)
9245 (invoke "python" "setup.py" "test"))))))
9246 (home-page "https://github.com/readthedocs/commonmark.py")
9247 (synopsis "Python parser for the CommonMark Markdown spec")
9248 (description
9249 "This module is a pure Python port of jgm's @code{commonmark.js}, a
9250 Markdown parser and renderer for the CommonMark specification, using only
9251 native modules.")
9252 (license license:bsd-3)))
9253
9254 (define-public python-xlrd
9255 (package
9256 (name "python-xlrd")
9257 (version "1.2.0")
9258 (source (origin
9259 (method url-fetch)
9260 (uri (pypi-uri "xlrd" version))
9261 (sha256
9262 (base32
9263 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
9264 (build-system python-build-system)
9265 (arguments
9266 `(#:phases
9267 (modify-phases %standard-phases
9268 ;; Some tests depend on writing a temporary file to the user's home
9269 ;; directory.
9270 (add-after 'unpack 'fix-tests
9271 (lambda _
9272 (delete-file "tests/test_open_workbook.py")
9273 #t)))))
9274 (home-page "http://www.python-excel.org/")
9275 (synopsis "Library for extracting data from Excel files")
9276 (description "This package provides a library to extract data from
9277 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
9278 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
9279 Unicode-aware. It is not intended as an end-user tool.")
9280 (license license:bsd-3)))
9281
9282 (define-public python2-xlrd
9283 (package-with-python2 python-xlrd))
9284
9285 (define-public python-immutables
9286 (package
9287 (name "python-immutables")
9288 (version "0.14")
9289 (source
9290 (origin
9291 (method url-fetch)
9292 (uri (pypi-uri "immutables" version))
9293 (sha256
9294 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9295 (build-system python-build-system)
9296 (home-page "https://github.com/MagicStack/immutables")
9297 (synopsis "High-performance immutable mapping type for Python")
9298 (description
9299 "An immutable mapping type for Python. The underlying datastructure is a
9300 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9301 functional languages.")
9302 (license license:asl2.0)))
9303
9304 (define-public python-prettytable
9305 (package
9306 (name "python-prettytable")
9307 (version "0.7.2")
9308 (source
9309 (origin
9310 (method url-fetch)
9311 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9312 (sha256
9313 (base32
9314 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9315 (build-system python-build-system)
9316 (home-page "https://code.google.com/archive/p/prettytable/")
9317 (synopsis "Display tabular data in an ASCII table format")
9318 (description
9319 "A library designed to represent tabular data in visually appealing ASCII
9320 tables. PrettyTable allows for selection of which columns are to be printed,
9321 independent alignment of columns (left or right justified or centred) and
9322 printing of sub-tables by specifying a row range.")
9323 (license license:bsd-3)))
9324
9325 (define-public python2-prettytable
9326 (package-with-python2 python-prettytable))
9327
9328 (define-public python-curio
9329 (package
9330 (name "python-curio")
9331 (version "1.2")
9332 (source
9333 (origin
9334 (method url-fetch)
9335 (uri (pypi-uri "curio" version))
9336 (sha256
9337 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9338 (build-system python-build-system)
9339 (arguments
9340 `(#:phases
9341 (modify-phases %standard-phases
9342 (replace 'check
9343 (lambda* (#:key inputs outputs #:allow-other-keys)
9344 (add-installed-pythonpath inputs outputs)
9345 (invoke "pytest" "-vv" "-k"
9346 ;; Tries to open an outgoing connection.
9347 "not test_ssl_outgoing"))))))
9348 (native-inputs
9349 `(("python-pytest" ,python-pytest)))
9350 (home-page "https://github.com/dabeaz/curio")
9351 (synopsis "Coroutine-based library for concurrent Python")
9352 (description
9353 "Curio is a coroutine-based library for concurrent Python systems
9354 programming. It provides standard programming abstractions such as as
9355 tasks, sockets, files, locks, and queues.")
9356 (license license:bsd-3)))
9357
9358 (define-public python-tables
9359 (package
9360 (name "python-tables")
9361 (version "3.6.1")
9362 (source
9363 (origin
9364 (method url-fetch)
9365 (uri (pypi-uri "tables" version))
9366 (sha256
9367 (base32
9368 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9369 (modules '((guix build utils)))
9370 (snippet
9371 '(begin
9372 ;; Remove pre-compiled .pyc files from source.
9373 (for-each delete-file-recursively
9374 (find-files "." "__pycache__" #:directories? #t))
9375 (for-each delete-file (find-files "." "\\.pyc$"))
9376 #t))))
9377 (build-system python-build-system)
9378 (arguments
9379 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9380 ;; or "check", so we must override the build and check phases.
9381 #:phases
9382 (modify-phases %standard-phases
9383 (add-after 'unpack 'use-gcc
9384 (lambda _
9385 (substitute* "setup.py"
9386 (("^( +)compiler = new_compiler\\(\\)" line indent)
9387 (string-append line
9388 "\n"
9389 indent
9390 "compiler.set_executables(compiler='gcc',"
9391 "compiler_so='gcc',"
9392 "linker_exe='gcc',"
9393 "linker_so='gcc -shared')")))
9394 #t))
9395 (add-after 'unpack 'disable-tuning
9396 (lambda _
9397 (substitute* "setup.py"
9398 (("cpu_flags = .*")
9399 "cpu_flags = ['sse2']\n"))
9400 #t))
9401 (replace 'build
9402 (lambda* (#:key inputs #:allow-other-keys)
9403 (invoke "python" "setup.py" "build"
9404 (string-append "--hdf5="
9405 (assoc-ref inputs "hdf5")))))
9406 (replace 'check
9407 (lambda* (#:key inputs #:allow-other-keys)
9408 (invoke "python" "setup.py" "check"
9409 (string-append "--hdf5="
9410 (assoc-ref inputs "hdf5"))))))))
9411 (propagated-inputs
9412 `(("python-numexpr" ,python-numexpr)
9413 ("python-numpy" ,python-numpy)))
9414 (native-inputs
9415 `(("python-cython" ,python-cython)
9416 ("pkg-config" ,pkg-config)))
9417 (inputs
9418 `(("hdf5" ,hdf5-1.10)
9419 ("bzip2" ,bzip2)
9420 ("zlib" ,zlib)))
9421 (home-page "https://www.pytables.org/")
9422 (synopsis "Hierarchical datasets for Python")
9423 (description "PyTables is a package for managing hierarchical datasets and
9424 designed to efficiently cope with extremely large amounts of data.")
9425 (license license:bsd-3)))
9426
9427 (define-public python2-tables
9428 (package-with-python2 python-tables))
9429
9430 (define-public python-sniffio
9431 (package
9432 (name "python-sniffio")
9433 (version "1.1.0")
9434 (source
9435 (origin
9436 (method url-fetch)
9437 (uri (pypi-uri "sniffio" version))
9438 (sha256
9439 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9440 (build-system python-build-system)
9441 (arguments
9442 `(#:phases
9443 (modify-phases %standard-phases
9444 (replace 'check
9445 (lambda _
9446 (invoke "pytest" "-vv"))))))
9447 (native-inputs
9448 `(("python-curio" ,python-curio)
9449 ("python-pytest" ,python-pytest)
9450 ("python-pytest-cov" ,python-pytest-cov)))
9451 (home-page "https://github.com/python-trio/sniffio")
9452 (synopsis "Detect which async library a program is running under")
9453 (description "This package detects which async library a program is
9454 running under. It supports multiple async I/O packages, like Trio, and
9455 asyncio.")
9456 ;; Either license applies.
9457 (license (list license:expat license:asl2.0))))
9458
9459 (define-public python-pytest-black
9460 (package
9461 (name "python-pytest-black")
9462 (version "0.3.8")
9463 (source
9464 (origin
9465 (method url-fetch)
9466 (uri (pypi-uri "pytest-black" version))
9467 (sha256
9468 (base32
9469 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9470 (build-system python-build-system)
9471 (propagated-inputs
9472 `(("python-pytest" ,python-pytest)
9473 ("python-black" ,python-black)
9474 ("python-toml" ,python-toml)))
9475 (native-inputs
9476 `(("python-setuptools-scm" ,python-setuptools-scm)))
9477 (home-page "https://github.com/shopkeep/pytest-black")
9478 (synopsis "Pytest plugin to enable format checking with black")
9479 (description
9480 "This package provides a pytest plugin to enable format checking with the
9481 Python code formatter \"black\".")
9482 (license license:expat)))
9483
9484 (define-public python-get-version
9485 (package
9486 (name "python-get-version")
9487 (version "2.1")
9488 (source
9489 (origin
9490 (method url-fetch)
9491 (uri (pypi-uri "get_version" version))
9492 (sha256
9493 (base32
9494 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9495 (build-system python-build-system)
9496 (propagated-inputs
9497 `(("python-pygments" ,python-pygments)
9498 ("python-pytest" ,python-pytest)
9499 ("python-pytest-black" ,python-pytest-black)
9500 ("python-pytest-cov" ,python-pytest-cov)
9501 ("python-setuptools" ,python-setuptools)
9502 ("python-testpath" ,python-testpath)))
9503 (home-page "https://github.com/flying-sheep/get_version")
9504 (synopsis "Version helper in the spirit of versioneer")
9505 (description
9506 "This package provides a version helper that lets you automatically use
9507 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9508 also supports getting the version from Python source distributions or, once
9509 your package is installed, via @code{pkg_resources} (part of
9510 @code{setuptools}).")
9511 (license license:gpl3+)))
9512
9513 (define-public python-legacy-api-wrap
9514 (package
9515 (name "python-legacy-api-wrap")
9516 (version "1.2")
9517 (source
9518 (origin
9519 (method url-fetch)
9520 (uri (pypi-uri "legacy-api-wrap" version))
9521 (sha256
9522 (base32
9523 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9524 (build-system python-build-system)
9525 (propagated-inputs
9526 `(("python-get-version" ,python-get-version)
9527 ("python-pytest" ,python-pytest)
9528 ("python-pytest-black" ,python-pytest-black)
9529 ("python-pytest-cov" ,python-pytest-cov)
9530 ("python-setuptools" ,python-setuptools)))
9531 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9532 (synopsis "Legacy API wrapper")
9533 (description "This module defines a decorator to wrap legacy APIs. The
9534 primary use case is APIs defined before keyword-only parameters existed.")
9535 (license license:gpl3+)))
9536
9537 (define-public python-pyasn1
9538 (package
9539 (name "python-pyasn1")
9540 (version "0.4.8")
9541 (source
9542 (origin
9543 (method url-fetch)
9544 (uri (pypi-uri "pyasn1" version))
9545 (sha256
9546 (base32
9547 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9548 (build-system python-build-system)
9549 (home-page "http://pyasn1.sourceforge.net/")
9550 (synopsis "ASN.1 types and codecs")
9551 (description
9552 "This is an implementation of ASN.1 types and codecs in Python. It is
9553 suitable for a wide range of protocols based on the ASN.1 specification.")
9554 (license license:bsd-2)))
9555
9556 (define-public python2-pyasn1
9557 (package-with-python2 python-pyasn1))
9558
9559 (define-public python-pyasn1-modules
9560 (package
9561 (name "python-pyasn1-modules")
9562 (version "0.2.2")
9563 (source
9564 (origin
9565 (method url-fetch)
9566 (uri (pypi-uri "pyasn1-modules" version))
9567 (sha256
9568 (base32
9569 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9570 (build-system python-build-system)
9571 (propagated-inputs
9572 `(("python-pyasn1" ,python-pyasn1)))
9573 (home-page "https://sourceforge.net/projects/pyasn1/")
9574 (synopsis "ASN.1 codec implementations")
9575 (description
9576 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9577 implementations of ASN.1-based codecs and protocols.")
9578 (license license:bsd-3)))
9579
9580 (define-public python2-pyasn1-modules
9581 (package-with-python2 python-pyasn1-modules))
9582
9583 (define-public python-ipaddress
9584 (package
9585 (name "python-ipaddress")
9586 (version "1.0.22")
9587 (source (origin
9588 (method url-fetch)
9589 (uri (pypi-uri "ipaddress" version))
9590 (sha256
9591 (base32
9592 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9593 (build-system python-build-system)
9594 (home-page "https://github.com/phihag/ipaddress")
9595 (synopsis "IP address manipulation library")
9596 (description
9597 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9598 in Python. This library is used to create, poke at, and manipulate IPv4 and
9599 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9600 module to older versions of Python.")
9601 (license license:psfl)))
9602
9603 (define-public python2-ipaddress
9604 (package-with-python2 python-ipaddress))
9605
9606 (define-public python2-ipaddr
9607 (package
9608 (name "python2-ipaddr")
9609 (version "2.1.11")
9610 (source
9611 (origin
9612 (method url-fetch)
9613 (uri (pypi-uri "ipaddr" version))
9614 (sha256
9615 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9616 (build-system python-build-system)
9617 (arguments
9618 `(#:python ,python-2 ;version 2 only
9619 #:phases
9620 (modify-phases %standard-phases
9621 (replace 'check
9622 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9623 (home-page "https://github.com/google/ipaddr-py")
9624 (synopsis "IP address manipulation library")
9625 (description
9626 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9627 IPv6 addresses and networks.
9628
9629 For new implementations you may prefer to use the standard module
9630 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9631 versions of Python.")
9632 (license license:asl2.0)))
9633
9634 (define-public python-idna
9635 (package
9636 (name "python-idna")
9637 (version "2.10")
9638 (source
9639 (origin
9640 (method url-fetch)
9641 (uri (pypi-uri "idna" version))
9642 (sha256
9643 (base32
9644 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9645 (build-system python-build-system)
9646 (home-page "https://github.com/kjd/idna")
9647 (synopsis "Internationalized domain names in applications")
9648 (description
9649 "This is a library to support the Internationalised Domain Names in
9650 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9651 protocol is often referred to as “IDNA2008” and can produce different results
9652 from the earlier standard from 2003. The library is also intended to act as a
9653 suitable drop-in replacement for the “encodings.idna” module that comes with
9654 the Python standard library but currently only supports the older 2003
9655 specification.")
9656 (license license:bsd-4)))
9657
9658 (define-public python-idna-2.7
9659 (package (inherit python-idna)
9660 (version "2.7")
9661 (source (origin
9662 (method url-fetch)
9663 (uri (pypi-uri "idna" version))
9664 (sha256
9665 (base32
9666 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9667
9668
9669 (define-public python2-idna
9670 (package-with-python2 python-idna))
9671
9672 (define-public python-libsass
9673 (package
9674 (name "python-libsass")
9675 (version "0.20.1")
9676 (source
9677 (origin
9678 ;; PyPI tarball is missing some test files.
9679 (method git-fetch)
9680 (uri (git-reference
9681 (url "https://github.com/sass/libsass-python")
9682 (commit version)))
9683 (file-name (git-file-name name version))
9684 (sha256
9685 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9686 (build-system python-build-system)
9687 (arguments
9688 `(#:phases
9689 (modify-phases %standard-phases
9690 ;; Use Guix package of libsass instead of compiling from a checkout.
9691 (add-before 'build 'set-libsass
9692 (lambda _
9693 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9694 #t))
9695 (replace 'check
9696 (lambda* (#:key inputs outputs #:allow-other-keys)
9697 (add-installed-pythonpath inputs outputs)
9698 (invoke "pytest" "sasstests.py"))))))
9699 (native-inputs
9700 `(("python-pytest" ,python-pytest)
9701 ("python-werkzeug" ,python-werkzeug)))
9702 (inputs
9703 `(("libsass" ,libsass)))
9704 (propagated-inputs
9705 `(("python-six" ,python-six)))
9706 (home-page "https://sass.github.io/libsass-python/")
9707 (synopsis "Straightforward binding of libsass for Python")
9708 (description
9709 "This package provides a simple Python extension module @code{sass} which
9710 is binding LibSass.")
9711 (license license:expat)))
9712
9713 (define-public python-idna-ssl
9714 (package
9715 (name "python-idna-ssl")
9716 (version "1.0.1")
9717 (source
9718 (origin
9719 (method url-fetch)
9720 (uri (pypi-uri "idna-ssl" version))
9721 (sha256
9722 (base32
9723 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9724 (build-system python-build-system)
9725 (arguments
9726 `(#:tests? #f)) ;circular dependency with python-aiohttp
9727 (home-page "https://github.com/aio-libs/idna-ssl")
9728 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9729 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9730 domains support.")
9731 (license license:expat)))
9732
9733 (define-public python-pretend
9734 (package
9735 (name "python-pretend")
9736 (version "1.0.9")
9737 (source
9738 (origin
9739 (method url-fetch)
9740 (uri (pypi-uri "pretend" version))
9741 (sha256
9742 (base32
9743 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9744 (build-system python-build-system)
9745 (home-page "https://github.com/alex/pretend")
9746 (synopsis "Library for stubbing in Python")
9747 (description
9748 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9749 technique for writing tests. You may hear the term mixed up with mocks,
9750 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9751 responses, rather than doing any computation.")
9752 (license license:bsd-3)))
9753
9754 (define-public python2-pretend
9755 (package-with-python2 python-pretend))
9756
9757 (define-public python-pip
9758 (package
9759 (name "python-pip")
9760 (version "20.2.4")
9761 (source
9762 (origin
9763 (method url-fetch)
9764 (uri (pypi-uri "pip" version))
9765 (sha256
9766 (base32
9767 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
9768 (build-system python-build-system)
9769 (arguments
9770 '(#:tests? #f)) ; there are no tests in the pypi archive.
9771 (home-page "https://pip.pypa.io/")
9772 (synopsis "Package manager for Python software")
9773 (description
9774 "Pip is a package manager for Python software, that finds packages on the
9775 Python Package Index (PyPI).")
9776 (license license:expat)))
9777
9778 (define-public python2-pip
9779 (package-with-python2 python-pip))
9780
9781 (define-public python-tlsh
9782 (package
9783 (name "python-tlsh")
9784 (version "3.4.5")
9785 (home-page "https://github.com/trendmicro/tlsh")
9786 (source
9787 (origin
9788 (method git-fetch)
9789 (uri (git-reference
9790 (url "https://github.com/trendmicro/tlsh")
9791 (commit (string-append "v" version))))
9792 (file-name (git-file-name name version))
9793 (sha256
9794 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9795 (build-system cmake-build-system)
9796 (arguments
9797 '(#:out-of-source? #f
9798 #:phases (modify-phases %standard-phases
9799 (replace
9800 'install
9801 (lambda* (#:key outputs #:allow-other-keys)
9802 ;; Build and install the Python bindings. The underlying
9803 ;; C++ library is apparently not meant to be installed.
9804 (let ((out (assoc-ref outputs "out")))
9805 (with-directory-excursion "py_ext"
9806 (and (system* "python" "setup.py" "build")
9807 (system* "python" "setup.py" "install"
9808 (string-append "--prefix=" out))))))))))
9809 (inputs `(("python" ,python-wrapper))) ;for the bindings
9810 (synopsis "Fuzzy matching library for Python")
9811 (description
9812 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9813 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9814 value which can be used for similarity comparisons. Similar objects have
9815 similar hash values, which allows for the detection of similar objects by
9816 comparing their hash values. The byte stream should have a sufficient amount
9817 of complexity; for example, a byte stream of identical bytes will not generate
9818 a hash value.")
9819 (license license:asl2.0)))
9820
9821 (define-public python2-tlsh
9822 (package
9823 (inherit python-tlsh)
9824 (name "python2-tlsh")
9825 (inputs `(("python" ,python-2)))))
9826
9827 (define-public python-termcolor
9828 (package
9829 (name "python-termcolor")
9830 (version "1.1.0")
9831 (source
9832 (origin
9833 (method url-fetch)
9834 (uri (pypi-uri "termcolor" version))
9835 (sha256
9836 (base32
9837 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9838 (build-system python-build-system)
9839 (arguments
9840 ;; There are no tests.
9841 `(#:tests? #f))
9842 (home-page "https://pypi.org/project/termcolor/")
9843 (synopsis "ANSII Color formatting for terminal output")
9844 (description
9845 "This package provides ANSII Color formatting for output in terminals.")
9846 (license license:expat)))
9847
9848 (define-public python2-termcolor
9849 (package-with-python2 python-termcolor))
9850
9851 (define-public python-terminaltables
9852 (package
9853 (name "python-terminaltables")
9854 (version "3.1.0")
9855 (source
9856 (origin
9857 (method url-fetch)
9858 (uri (pypi-uri "terminaltables" version))
9859 (sha256
9860 (base32
9861 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9862 (build-system python-build-system)
9863 (home-page "https://github.com/Robpol86/terminaltables")
9864 (synopsis
9865 "Generate simple tables in terminals from a nested list of strings")
9866 (description
9867 "This package makes it easy to draw tables in terminal/console
9868 applications from a list of lists of strings. It supports multi-line rows.")
9869 (license license:expat)))
9870
9871 (define-public python-libarchive-c
9872 (package
9873 (name "python-libarchive-c")
9874 (version "2.9")
9875 (source (origin
9876 (method url-fetch)
9877 (uri (pypi-uri "libarchive-c" version))
9878 (sha256
9879 (base32
9880 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9881 (build-system python-build-system)
9882 (arguments
9883 '(#:phases (modify-phases %standard-phases
9884 (add-before
9885 'build 'reference-libarchive
9886 (lambda* (#:key inputs #:allow-other-keys)
9887 ;; Retain the absolute file name of libarchive.so.
9888 (let ((libarchive (assoc-ref inputs "libarchive")))
9889 (substitute* "libarchive/ffi.py"
9890 (("find_library\\('archive'\\)")
9891 (string-append "'" libarchive
9892 "/lib/libarchive.so'"))))))
9893 (replace 'check
9894 (lambda _ (invoke "pytest" "-vv"))))))
9895 (native-inputs
9896 `(("python-mock" ,python-mock)
9897 ("python-pytest" ,python-pytest)))
9898 (inputs
9899 `(("libarchive" ,libarchive)))
9900 (home-page "https://github.com/Changaco/python-libarchive-c")
9901 (synopsis "Python interface to libarchive")
9902 (description
9903 "This package provides Python bindings to libarchive, a C library to
9904 access possibly compressed archives in many different formats. It uses
9905 Python's @code{ctypes} foreign function interface (FFI).")
9906 (license license:lgpl2.0+)))
9907
9908 (define-public python2-libarchive-c
9909 (package-with-python2 python-libarchive-c))
9910
9911 (define-public python-file
9912 (package
9913 (inherit file)
9914 (name "python-file")
9915 (build-system python-build-system)
9916 (arguments
9917 '(#:tests? #f ;no tests
9918 #:configure-flags '("--single-version-externally-managed" "--root=/")
9919 #:phases (modify-phases %standard-phases
9920 (add-before 'build 'change-directory
9921 (lambda _
9922 (chdir "python")
9923 #t))
9924 (add-before 'build 'set-library-file-name
9925 (lambda* (#:key inputs #:allow-other-keys)
9926 (let ((file (assoc-ref inputs "file")))
9927 (substitute* "magic.py"
9928 (("find_library\\('magic'\\)")
9929 (string-append "'" file "/lib/libmagic.so'")))
9930 #t))))))
9931 (inputs `(("file" ,file)))
9932 (native-inputs (if (%current-target-system)
9933 `(("self" ,this-package))
9934 '()))
9935 (synopsis "Python bindings to the libmagic file type guesser")
9936 (description "This package provides Python bindings to the libmagic file
9937 type guesser.
9938
9939 Note that this module and the @code{python-magic} module both provide a
9940 @file{magic.py} file; these two modules, which are different and were
9941 developed separately, both serve the same purpose: provide Python bindings for
9942 libmagic.")))
9943
9944 (define-public python2-file
9945 (package-with-python2 python-file))
9946
9947 (define-public python-debian
9948 (package
9949 (name "python-debian")
9950 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9951 (version "0.1.36")
9952 (source
9953 (origin
9954 ;; Use git-fetch, as pypi doesn't include test suite.
9955 (method git-fetch)
9956 (uri (git-reference
9957 (url home-page)
9958 (commit version)))
9959 (file-name (git-file-name name version))
9960 (sha256
9961 (base32
9962 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9963 (build-system python-build-system)
9964 (arguments
9965 `(#:phases (modify-phases %standard-phases
9966 (add-after 'unpack 'remove-debian-specific-tests
9967 ;; python-apt, apt and dpkg are not yet available in guix,
9968 ;; and these tests heavily depend on them.
9969 (lambda _
9970 (delete-file "lib/debian/tests/test_deb822.py")
9971 (delete-file "lib/debian/tests/test_debfile.py")
9972 #t)))))
9973 (propagated-inputs
9974 `(("python-six" ,python-six)
9975 ("python-chardet" ,python-chardet)))
9976 (synopsis "Debian package related modules")
9977 (description
9978 ;; XXX: Use @enumerate instead of @itemize to work around
9979 ;; <http://bugs.gnu.org/21772>.
9980 "This package provides Python modules that abstract many formats of
9981 Debian-related files, such as:
9982
9983 @enumerate
9984 @item Debtags information;
9985 @item @file{debian/changelog} files;
9986 @item packages files, pdiffs;
9987 @item control files of single or multiple RFC822-style paragraphs---e.g.
9988 @file{debian/control}, @file{.changes}, @file{.dsc};
9989 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
9990 contained files and meta-information.
9991 @end enumerate\n")
9992
9993 ;; Modules are either GPLv2+ or GPLv3+.
9994 (license license:gpl3+)))
9995
9996 (define-public python-nbformat
9997 (package
9998 (name "python-nbformat")
9999 (version "4.4.0")
10000 (source
10001 (origin
10002 (method url-fetch)
10003 (uri (pypi-uri "nbformat" version))
10004 (sha256
10005 (base32
10006 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
10007 (build-system python-build-system)
10008 (arguments `(#:tests? #f)) ; no test target
10009 (propagated-inputs
10010 `(("python-ipython-genutils" ,python-ipython-genutils)
10011 ("python-jsonschema" ,python-jsonschema)
10012 ("python-jupyter-core" ,python-jupyter-core)
10013 ("python-traitlets" ,python-traitlets)))
10014 (home-page "https://jupyter.org")
10015 (synopsis "Jupyter Notebook format")
10016 (description "This package provides the reference implementation of the
10017 Jupyter Notebook format and Python APIs for working with notebooks.")
10018 (license license:bsd-3)))
10019
10020 (define-public python2-nbformat
10021 (package-with-python2 python-nbformat))
10022
10023 (define-public python-bleach
10024 (package
10025 (name "python-bleach")
10026 (version "3.1.5")
10027 (source
10028 (origin
10029 (method url-fetch)
10030 (uri (pypi-uri "bleach" version))
10031 (sha256
10032 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
10033 (build-system python-build-system)
10034 (propagated-inputs
10035 `(("python-webencodings" ,python-webencodings)
10036 ("python-six" ,python-six)))
10037 (native-inputs
10038 `(("python-datrie" ,python-datrie)
10039 ("python-genshi" ,python-genshi)
10040 ("python-lxml" ,python-lxml)
10041 ("python-pytest" ,python-pytest)))
10042 (home-page "https://github.com/mozilla/bleach")
10043 (synopsis "Whitelist-based HTML-sanitizing tool")
10044 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
10045 (license license:asl2.0)))
10046
10047 (define-public python2-bleach
10048 (package-with-python2 python-bleach))
10049
10050 (define-public python-entrypoints
10051 (package
10052 (name "python-entrypoints")
10053 (version "0.3")
10054 (source
10055 (origin
10056 (method url-fetch)
10057 (uri (pypi-uri "entrypoints" version))
10058 (sha256
10059 (base32
10060 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
10061 (build-system python-build-system)
10062 ;; The package does not come with a setup.py file, so we have to generate
10063 ;; one ourselves.
10064 (arguments
10065 `(#:tests? #f
10066 #:phases
10067 (modify-phases %standard-phases
10068 (add-after 'unpack 'create-setup.py
10069 (lambda _
10070 (call-with-output-file "setup.py"
10071 (lambda (port)
10072 (format port "\
10073 from setuptools import setup
10074 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
10075 " ,version))))))))
10076 (home-page "https://github.com/takluyver/entrypoints")
10077 (synopsis "Discover and load entry points from installed Python packages")
10078 (description "Entry points are a way for Python packages to advertise
10079 objects with some common interface. The most common examples are
10080 @code{console_scripts} entry points, which define shell commands by
10081 identifying a Python function to run. The @code{entrypoints} module contains
10082 functions to find and load entry points.")
10083 (license license:expat)))
10084
10085 (define-public python2-entrypoints
10086 (package-with-python2 python-entrypoints))
10087
10088 (define-public python-epc
10089 (package
10090 (name "python-epc")
10091 (version "0.0.5")
10092 (source
10093 (origin
10094 (method url-fetch)
10095 (uri (pypi-uri "epc" version))
10096 (sha256
10097 (base32
10098 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
10099 (build-system python-build-system)
10100 (propagated-inputs
10101 `(("python-sexpdata" ,python-sexpdata)))
10102 (native-inputs
10103 `(("python-nose" ,python-nose)))
10104 (home-page "https://github.com/tkf/python-epc")
10105 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
10106 (description
10107 "Python-EPC can call elisp functions from Python and Python functions
10108 from elisp.")
10109 (license license:gpl3)))
10110
10111 (define-public python-forex-python
10112 (package
10113 (name "python-forex-python")
10114 (version "1.5")
10115 (source
10116 (origin
10117 (method url-fetch)
10118 (uri (pypi-uri "forex-python" version))
10119 (sha256
10120 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
10121 (build-system python-build-system)
10122 (arguments
10123 ;; Tests are not included in the PyPI tarball. Also, the tests in the
10124 ;; repository require online data.
10125 `(#:tests? #f))
10126 (propagated-inputs
10127 `(("python-requests" ,python-requests)
10128 ("python-simplejson" ,python-simplejson)))
10129 (home-page "https://github.com/MicroPyramid/forex-python")
10130 (synopsis "Foreign exchange rates and currency conversion")
10131 (description
10132 "@code{python-forex-python} can be used to manipulate foreign
10133 exchange rates and to operate currency conversions.
10134
10135 Features:
10136 @itemize
10137 @item List all currency rates.
10138 @item BitCoin price for all currencies.
10139 @item Converting amount to BitCoins.
10140 @item Get historical rates for any day since 1999.
10141 @item Conversion rate for one currency(ex; USD to INR).
10142 @item Convert amount from one currency to other.('USD 10$' to INR).
10143 @item Currency symbols.
10144 @item Currency names.
10145 @end itemize")
10146 (license license:expat)))
10147
10148 (define-public python-simpleeval
10149 (package
10150 (name "python-simpleeval")
10151 (version "0.9.10")
10152 (source
10153 (origin
10154 (method url-fetch)
10155 (uri (pypi-uri "simpleeval" version))
10156 (sha256
10157 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
10158 (build-system python-build-system)
10159 (home-page "https://github.com/danthedeckie/simpleeval")
10160 (synopsis "Simple, safe single expression evaluator library")
10161 (description
10162 "This package provides a quick single file library for easily adding
10163 evaluatable expressions into python projects. Say you want to allow a user
10164 to set an alarm volume, which could depend on the time of day, alarm level,
10165 how many previous alarms had gone off, and if there is music playing at the
10166 time.")
10167 (license license:expat)))
10168
10169 (define-public python-nbconvert
10170 (package
10171 (name "python-nbconvert")
10172 (version "5.0.0b1")
10173 (source
10174 (origin
10175 (method url-fetch)
10176 (uri (pypi-uri "nbconvert" version))
10177 (sha256
10178 (base32
10179 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
10180 (build-system python-build-system)
10181 (arguments
10182 `(;; The "bdist_egg" target is disabled by default, causing the installation
10183 ;; to fail.
10184 #:configure-flags (list "bdist_egg")
10185 ;; FIXME: 5 failures, 40 errors.
10186 #:tests? #f))
10187 ;; #:phases
10188 ;; (modify-phases %standard-phases
10189 ;; (replace 'check
10190 ;; (lambda _
10191 ;; (zero? (system* "py.test" "-v")))))
10192 (native-inputs
10193 `(("python-pytest" ,python-pytest)))
10194 (propagated-inputs
10195 `(("python-bleach" ,python-bleach)
10196 ("python-entrypoints" ,python-entrypoints)
10197 ("python-jinja2" ,python-jinja2)
10198 ("python-jupyter-core" ,python-jupyter-core)
10199 ("python-mistune" ,python-mistune)
10200 ("python-nbformat" ,python-nbformat)
10201 ("python-pygments" ,python-pygments)
10202 ("python-traitlets" ,python-traitlets)))
10203 (home-page "https://jupyter.org")
10204 (synopsis "Converting Jupyter Notebooks")
10205 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
10206 notebooks to various other formats via Jinja templates. It allows you to
10207 convert an @code{.ipynb} notebook file into various static formats including:
10208
10209 @enumerate
10210 @item HTML
10211 @item LaTeX
10212 @item PDF
10213 @item Reveal JS
10214 @item Markdown (md)
10215 @item ReStructured Text (rst)
10216 @item executable script
10217 @end enumerate\n")
10218 (license license:bsd-3)))
10219
10220 (define-public python2-nbconvert
10221 (package-with-python2 python-nbconvert))
10222
10223 (define-public python-notebook
10224 (package
10225 (name "python-notebook")
10226 (version "5.7.4")
10227 (source (origin
10228 (method url-fetch)
10229 (uri (pypi-uri "notebook" version))
10230 (sha256
10231 (base32
10232 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
10233 (build-system python-build-system)
10234 (arguments
10235 `(#:phases
10236 (modify-phases %standard-phases
10237 (replace 'check
10238 (lambda _
10239 ;; These tests require a browser
10240 (delete-file-recursively "notebook/tests/selenium")
10241 ;; Some tests need HOME
10242 (setenv "HOME" "/tmp")
10243 ;; This file contains "warningfilters", which are not supported
10244 ;; by this version of nose.
10245 (delete-file "setup.cfg")
10246 (with-directory-excursion "/tmp"
10247 (invoke "nosetests" "-v"))
10248 #t)))))
10249 (propagated-inputs
10250 `(("python-jupyter-core" ,python-jupyter-core)
10251 ("python-nbformat" ,python-nbformat)
10252 ("python-nbconvert" ,python-nbconvert)
10253 ("python-prometheus-client" ,python-prometheus-client)
10254 ("python-send2trash" ,python-send2trash)
10255 ("python-terminado" ,python-terminado)))
10256 (native-inputs
10257 `(("python-nose" ,python-nose)
10258 ("python-sphinx" ,python-sphinx)
10259 ("python-requests" ,python-requests)))
10260 (home-page "https://jupyter.org/")
10261 (synopsis "Web-based notebook environment for interactive computing")
10262 (description
10263 "The Jupyter HTML notebook is a web-based notebook environment for
10264 interactive computing.")
10265 (properties `((python2-variant . ,(delay python2-notebook))))
10266 (license license:bsd-3)))
10267
10268 (define-public python2-notebook
10269 (let ((base (package-with-python2
10270 (strip-python2-variant python-notebook))))
10271 (package (inherit base)
10272 (native-inputs
10273 `(("python2-mock" ,python2-mock)
10274 ,@(package-native-inputs base)))
10275 (arguments
10276 (substitute-keyword-arguments (package-arguments base)
10277 ((#:phases phases)
10278 `(modify-phases ,phases
10279 (add-before 'check 'disable-test-case
10280 ;; The test requires network access to localhost. Curiously it
10281 ;; fails with Python 2 only. Simply make the test-case return
10282 ;; immediately.
10283 (lambda _
10284 (substitute*
10285 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
10286 (("formats = self.nbconvert_api") "return #")))))))))))
10287
10288 (define-public python-widgetsnbextension
10289 (package
10290 (name "python-widgetsnbextension")
10291 (version "3.5.1")
10292 (source
10293 (origin
10294 (method url-fetch)
10295 (uri (pypi-uri "widgetsnbextension" version))
10296 (sha256
10297 (base32
10298 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10299 (build-system python-build-system)
10300 (propagated-inputs
10301 `(("python-ipykernel" ,python-ipykernel)
10302 ("python-notebook" ,python-notebook)))
10303 (native-inputs
10304 `(("python-certifi" ,python-certifi)
10305 ("python-nose" ,python-nose)))
10306 (home-page "https://ipython.org")
10307 (synopsis "IPython HTML widgets for Jupyter")
10308 (description "This package provides interactive HTML widgets for Jupyter
10309 notebooks.")
10310 (license license:bsd-3)))
10311
10312 (define-public python2-widgetsnbextension
10313 (package-with-python2 python-widgetsnbextension))
10314
10315 (define-public python-ipywidgets
10316 (package
10317 (name "python-ipywidgets")
10318 (version "7.5.1")
10319 (source
10320 (origin
10321 (method url-fetch)
10322 (uri (pypi-uri "ipywidgets" version))
10323 (sha256
10324 (base32
10325 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10326 (build-system python-build-system)
10327 (propagated-inputs
10328 `(("python-ipython" ,python-ipython)
10329 ("python-traitlets" ,python-traitlets)
10330 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10331 (native-inputs
10332 `(("python-nose" ,python-nose)
10333 ("python-pytest" ,python-pytest)))
10334 (home-page "https://ipython.org")
10335 (synopsis "IPython HTML widgets for Jupyter")
10336 (description "Ipywidgets are interactive HTML widgets for Jupyter
10337 notebooks and the IPython kernel. Notebooks come alive when interactive
10338 widgets are used. Users gain control of their data and can visualize changes
10339 in the data.")
10340 (license license:bsd-3)))
10341
10342 (define-public python2-ipywidgets
10343 (package-with-python2 python-ipywidgets))
10344
10345 (define-public python-jupyter-console
10346 (package
10347 (name "python-jupyter-console")
10348 (version "6.1.0")
10349 (source
10350 (origin
10351 (method url-fetch)
10352 (uri (pypi-uri "jupyter_console" version))
10353 (sha256
10354 (base32
10355 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10356 (build-system python-build-system)
10357 (propagated-inputs
10358 `(("python-ipykernel" ,python-ipykernel)
10359 ("python-jupyter-client" ,python-jupyter-client)
10360 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10361 ("python-pygments" ,python-pygments)))
10362 (native-inputs
10363 `(("python-nose" ,python-nose)))
10364 (home-page "https://jupyter.org")
10365 (synopsis "Jupyter terminal console")
10366 (description "This package provides a terminal-based console frontend for
10367 Jupyter kernels. It also allows for console-based interaction with non-Python
10368 Jupyter kernels such as IJulia and IRKernel.")
10369 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10370 (license license:bsd-3)))
10371
10372 (define-public python2-jupyter-console
10373 (package
10374 (name "python2-jupyter-console")
10375 (version "5.2.0")
10376 (source
10377 (origin
10378 (method url-fetch)
10379 (uri (pypi-uri "jupyter_console" version))
10380 (sha256
10381 (base32
10382 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10383 (build-system python-build-system)
10384 (arguments
10385 `(#:python ,python-2
10386 #:tests? #f)) ; Tests only run in a TTY.
10387 (propagated-inputs
10388 `(("python2-ipykernel" ,python2-ipykernel)
10389 ("python2-jupyter-client" ,python2-jupyter-client)
10390 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10391 ("python2-pygments" ,python2-pygments)))
10392 (native-inputs
10393 `(("python2-nose" ,python2-nose)))
10394 (home-page "https://jupyter.org")
10395 (synopsis "Jupyter terminal console")
10396 (description "This package provides a terminal-based console frontend for
10397 Jupyter kernels. It also allows for console-based interaction with non-Python
10398 Jupyter kernels such as IJulia and IRKernel.")
10399 (license license:bsd-3)))
10400
10401 ;; The python-ipython and python-jupyter-console require each other. To get
10402 ;; the functionality in both packages working, strip down the
10403 ;; python-jupyter-console package when using it as an input to python-ipython.
10404 (define python-jupyter-console-minimal
10405 (package
10406 (inherit python-jupyter-console)
10407 (name "python-jupyter-console-minimal")
10408 (arguments
10409 (substitute-keyword-arguments
10410 (package-arguments python-jupyter-console)
10411 ((#:phases phases)
10412 `(modify-phases ,phases
10413 (add-after 'install 'delete-bin
10414 (lambda* (#:key outputs #:allow-other-keys)
10415 ;; Delete the bin files, to avoid conflicts in profiles
10416 ;; where python-ipython and python-jupyter-console are
10417 ;; both present.
10418 (delete-file-recursively
10419 (string-append
10420 (assoc-ref outputs "out") "/bin"))))))))
10421 ;; Remove the python-ipython propagated input, to avoid the cycle
10422 (propagated-inputs
10423 (alist-delete
10424 "python-ipython"
10425 (package-propagated-inputs python-jupyter-console)))))
10426
10427 (define-public python-qtconsole
10428 (package
10429 (name "python-qtconsole")
10430 (version "4.4.3")
10431 (source
10432 (origin
10433 (method url-fetch)
10434 (uri (pypi-uri "qtconsole" version))
10435 (sha256
10436 (base32
10437 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10438 (build-system python-build-system)
10439 (arguments
10440 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10441 ;; but we only have the LTS version 5.x. This means that there might be
10442 ;; runtime errors, but since this is a dependency of the Jupyter package,
10443 ;; and Jupyter can be used without the qtconsole we can overlook this for
10444 ;; now.
10445 `(#:tests? #f
10446 #:phases
10447 (modify-phases %standard-phases
10448 (add-before 'check 'pre-check
10449 (lambda _
10450 (setenv "QT_QPA_PLATFORM" "offscreen")
10451 #t)))))
10452 (propagated-inputs
10453 `(("python-ipykernel" ,python-ipykernel)
10454 ("python-ipython" ,python-ipython)))
10455 (native-inputs
10456 `(("python-pytest" ,python-pytest)))
10457 (home-page "https://jupyter.org")
10458 (synopsis "Jupyter Qt console")
10459 (description "This package provides a Qt-based console for Jupyter with
10460 support for rich media output.")
10461 (license license:bsd-3)))
10462
10463 (define-public python-jsbeautifier
10464 (package
10465 (name "python-jsbeautifier")
10466 (version "1.10.2")
10467 (home-page "https://github.com/beautify-web/js-beautify")
10468 (source (origin
10469 (method git-fetch)
10470 (uri (git-reference
10471 (url home-page)
10472 (commit (string-append "v" version))))
10473 (file-name (git-file-name name version))
10474 (sha256
10475 (base32
10476 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10477 (build-system python-build-system)
10478 (arguments
10479 `(#:phases (modify-phases %standard-phases
10480 (add-after 'unpack 'chdir
10481 (lambda _
10482 ;; The upstream Git repository contains all the code,
10483 ;; but this package only builds the python code.
10484 (chdir "python")
10485 #t))
10486 (add-after 'unpack 'patch-python-six-requirements
10487 (lambda _
10488 (substitute* "python/setup.py"
10489 (("six>=1.12.0")
10490 "six>=1.11.0"))
10491 #t)))))
10492 (propagated-inputs
10493 `(("python-editorconfig" ,python-editorconfig)
10494 ("python-six" ,python-six)))
10495 (native-inputs
10496 `(("python-pytest" ,python-pytest)))
10497 (synopsis "JavaScript unobfuscator and beautifier")
10498 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10499 popular online obfuscators.")
10500 (license license:expat)))
10501
10502 (define-public jupyter
10503 (package
10504 (name "jupyter")
10505 (version "1.0.0")
10506 (source
10507 (origin
10508 (method url-fetch)
10509 (uri (pypi-uri "jupyter" version))
10510 (sha256
10511 (base32
10512 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10513 (build-system python-build-system)
10514 (arguments '(#:tests? #f)) ; there are none.
10515 (propagated-inputs
10516 `(("python-ipykernel" ,python-ipykernel)
10517 ("python-ipywidgets" ,python-ipywidgets)
10518 ("python-jupyter-console" ,python-jupyter-console)
10519 ("python-nbconvert" ,python-nbconvert)
10520 ("python-notebook" ,python-notebook)
10521 ("python-qtconsole" ,python-qtconsole)))
10522 (native-search-paths
10523 (list (search-path-specification
10524 (variable "JUPYTER_PATH")
10525 (files '("share/jupyter")))))
10526 (home-page "https://jupyter.org")
10527 (synopsis "Web application for interactive documents")
10528 (description
10529 "The Jupyter Notebook is a web application that allows you to create and
10530 share documents that contain live code, equations, visualizations and
10531 explanatory text. Uses include: data cleaning and transformation, numerical
10532 simulation, statistical modeling, machine learning and much more.")
10533 (license license:bsd-3)))
10534
10535 (define-public python-chardet
10536 (package
10537 (name "python-chardet")
10538 (version "3.0.4")
10539 (source
10540 (origin
10541 (method url-fetch)
10542 (uri (pypi-uri "chardet" version))
10543 (sha256
10544 (base32
10545 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10546 (native-inputs
10547 `(("python-hypothesis" ,python-hypothesis)
10548 ("python-pytest" ,python-pytest)
10549 ("python-pytest-runner" ,python-pytest-runner)))
10550 (build-system python-build-system)
10551 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10552 (arguments `(#:tests? #f))
10553 (home-page "https://github.com/chardet/chardet")
10554 (synopsis "Universal encoding detector for Python 2 and 3")
10555 (description
10556 "This package provides @code{chardet}, a Python module that can
10557 automatically detect a wide range of file encodings.")
10558 (license license:lgpl2.1+)))
10559
10560 (define-public python2-chardet
10561 (package-with-python2 python-chardet))
10562
10563 (define-public python-docopt
10564 (package
10565 (name "python-docopt")
10566 (version "0.6.2")
10567 (source
10568 (origin
10569 (method git-fetch)
10570 ;; The release on PyPI does not include tests.
10571 (uri (git-reference
10572 (url "https://github.com/docopt/docopt")
10573 (commit version)))
10574 (file-name (git-file-name name version))
10575 (sha256
10576 (base32
10577 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10578 (build-system python-build-system)
10579 (native-inputs
10580 `(("python-pytest" ,python-pytest)))
10581 (arguments
10582 `(#:phases
10583 (modify-phases %standard-phases
10584 (replace 'check
10585 (lambda _ (invoke "py.test"))))))
10586 (home-page "http://docopt.org")
10587 (synopsis "Command-line interface description language for Python")
10588 (description "This library allows the user to define a command-line
10589 interface from a program's help message rather than specifying it
10590 programmatically with command-line parsers like @code{getopt} and
10591 @code{argparse}.")
10592 (license license:expat)))
10593
10594 (define-public python2-docopt
10595 (package-with-python2 python-docopt))
10596
10597 (define-public python-pythondialog
10598 (package
10599 (name "python-pythondialog")
10600 (version "3.4.0")
10601 (source
10602 (origin
10603 (method url-fetch)
10604 (uri (pypi-uri "pythondialog" version))
10605 (sha256
10606 (base32
10607 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10608 (build-system python-build-system)
10609 (arguments
10610 `(#:phases
10611 (modify-phases %standard-phases
10612 (add-after 'unpack 'patch-path
10613 (lambda* (#:key inputs #:allow-other-keys)
10614 (let* ((dialog (assoc-ref inputs "dialog")))
10615 ;; Since this library really wants to grovel the search path, we
10616 ;; must hardcode dialog's store path into it.
10617 (substitute* "dialog.py"
10618 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10619 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10620 #t))))
10621 #:tests? #f)) ; no test suite
10622 (propagated-inputs
10623 `(("dialog" ,dialog)))
10624 (home-page "http://pythondialog.sourceforge.net/")
10625 (synopsis "Python interface to the UNIX dialog utility")
10626 (description "A Python wrapper for the dialog utility. Its purpose is to
10627 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10628 This allows one to make simple text-mode user interfaces on Unix-like systems")
10629 (license license:lgpl2.1)
10630 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10631
10632 (define-public python2-pythondialog
10633 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10634 (package
10635 (inherit base)
10636 (version (package-version python-pythondialog))
10637 (source (origin
10638 (method url-fetch)
10639 (uri (pypi-uri "python2-pythondialog" version))
10640 (sha256
10641 (base32
10642 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10643
10644 (define-public python-configobj
10645 (package
10646 (name "python-configobj")
10647 (version "5.0.6")
10648 (source (origin
10649 (method url-fetch)
10650 (uri (pypi-uri "configobj" version))
10651 (sha256
10652 (base32
10653 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10654 ;; Patch setup.py so it looks for python-setuptools, which is
10655 ;; required to parse the keyword 'install_requires' in setup.py.
10656 (patches (search-patches "python-configobj-setuptools.patch"))))
10657 (build-system python-build-system)
10658 (propagated-inputs
10659 `(("python-six" ,python-six)))
10660 (synopsis "Config file reading, writing and validation")
10661 (description "ConfigObj is a simple but powerful config file reader and
10662 writer: an ini file round tripper. Its main feature is that it is very easy to
10663 use, with a straightforward programmer’s interface and a simple syntax for
10664 config files.")
10665 (home-page "https://github.com/DiffSK/configobj")
10666 (license license:bsd-3)))
10667
10668 (define-public python2-configobj
10669 (package-with-python2 python-configobj))
10670
10671 (define-public python-configargparse
10672 (package
10673 (name "python-configargparse")
10674 (version "1.2.3")
10675 (source (origin
10676 (method url-fetch)
10677 (uri (pypi-uri "ConfigArgParse" version))
10678 (sha256
10679 (base32
10680 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
10681 (build-system python-build-system)
10682 (native-inputs
10683 `(("python-pyyaml" ,python-pyyaml)))
10684 (arguments
10685 `(#:phases
10686 (modify-phases %standard-phases
10687 (replace 'check
10688 (lambda _
10689 ;; Bypass setuptools-shim because one test relies on "setup.py"
10690 ;; being the first argument passed to the python call.
10691 ;;
10692 ;; NOTE: Many tests do not run because they rely on Python's
10693 ;; built-in test.test_argparse, but we remove the unit tests from
10694 ;; our Python installation.
10695 (invoke "python" "setup.py" "test"))))))
10696 (synopsis "Replacement for argparse")
10697 (description "A drop-in replacement for argparse that allows options to also
10698 be set via config files and/or environment variables.")
10699 (home-page "https://github.com/bw2/ConfigArgParse")
10700 (license license:expat)))
10701
10702 (define-public python-argparse-manpage
10703 (package
10704 (name "python-argparse-manpage")
10705 (version "1.1")
10706 (source
10707 (origin
10708 (method url-fetch)
10709 (uri (pypi-uri "argparse-manpage" version))
10710 (sha256
10711 (base32
10712 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10713 (build-system python-build-system)
10714 (home-page "https://github.com/praiskup/argparse-manpage")
10715 (synopsis "Build manual page from Python's ArgumentParser object")
10716 (description
10717 "This package provides tools to build manual pages from Python's
10718 @code{ArgumentParser} object.")
10719 (license license:asl2.0)))
10720
10721 (define-public python-contextlib2
10722 (package
10723 (name "python-contextlib2")
10724 (version "0.6.0.post1")
10725 (source
10726 (origin
10727 (method url-fetch)
10728 (uri (pypi-uri "contextlib2" version))
10729 (sha256
10730 (base32
10731 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10732 (build-system python-build-system)
10733 (home-page "https://contextlib2.readthedocs.org/")
10734 (synopsis "Tools for decorators and context managers")
10735 (description "This module is primarily a backport of the Python
10736 3.2 contextlib to earlier Python versions. Like contextlib, it
10737 provides utilities for common tasks involving decorators and context
10738 managers. It also contains additional features that are not part of
10739 the standard library.")
10740 (properties `((python2-variant . ,(delay python2-contextlib2))))
10741 (license license:psfl)))
10742
10743 (define-public python2-contextlib2
10744 (let ((base (package-with-python2
10745 (strip-python2-variant python-contextlib2))))
10746 (package
10747 (inherit base)
10748 (arguments
10749 (substitute-keyword-arguments (package-arguments base)
10750 ((#:phases phases)
10751 `(modify-phases ,phases
10752 (replace 'check
10753 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10754 (native-inputs
10755 `(("python2-unittest2" ,python2-unittest2))))))
10756
10757 ;; This package is used by python2-pytest via python2-importlib-metadata,
10758 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10759 (define-public python2-contextlib2-bootstrap
10760 (hidden-package
10761 (package/inherit
10762 python2-contextlib2
10763 (name "python2-contextlib2-bootstrap")
10764 (arguments
10765 `(#:tests? #f
10766 ,@(package-arguments python2-contextlib2)))
10767 (native-inputs '()))))
10768
10769 (define-public python-texttable
10770 (package
10771 (name "python-texttable")
10772 (version "1.6.2")
10773 (source
10774 (origin
10775 (method url-fetch)
10776 (uri (pypi-uri "texttable" version))
10777 (sha256
10778 (base32
10779 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10780 (build-system python-build-system)
10781 (arguments
10782 `(#:phases
10783 (modify-phases %standard-phases
10784 (replace 'check
10785 (lambda _ (invoke "pytest" "tests.py"))))))
10786 (native-inputs
10787 `(("python-pytest" ,python-pytest)))
10788 (home-page "https://github.com/foutaise/texttable/")
10789 (synopsis "Python module for creating simple ASCII tables")
10790 (description "Texttable is a Python module for creating simple ASCII
10791 tables.")
10792 (license license:expat)))
10793
10794 (define-public python2-texttable
10795 (package-with-python2 python-texttable))
10796
10797 (define-public python-atomicwrites
10798 (package
10799 (name "python-atomicwrites")
10800 (version "1.3.0")
10801 (source (origin
10802 (method url-fetch)
10803 (uri (pypi-uri "atomicwrites" version))
10804 (sha256
10805 (base32
10806 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10807 (build-system python-build-system)
10808 (synopsis "Atomic file writes in Python")
10809 (description "Library for atomic file writes using platform dependent tools
10810 for atomic file system operations.")
10811 (home-page "https://github.com/untitaker/python-atomicwrites")
10812 (license license:expat)))
10813
10814 (define-public python2-atomicwrites
10815 (package-with-python2 python-atomicwrites))
10816
10817 (define-public python-click-threading
10818 (package
10819 (name "python-click-threading")
10820 (version "0.4.4")
10821 (source (origin
10822 (method url-fetch)
10823 (uri (pypi-uri "click-threading" version))
10824 (sha256
10825 (base32
10826 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10827 (build-system python-build-system)
10828 (propagated-inputs
10829 `(("python-click" ,python-click)))
10830 (synopsis "Utilities for multithreading in Click")
10831 (description "This package provides utilities for multithreading in Click
10832 applications.")
10833 (home-page "https://github.com/click-contrib/click-threading")
10834 (license license:expat)))
10835
10836 (define-public python-click-log
10837 (package
10838 (name "python-click-log")
10839 (version "0.3.2")
10840 (source (origin
10841 (method url-fetch)
10842 (uri (pypi-uri "click-log" version))
10843 (sha256
10844 (base32
10845 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10846 (build-system python-build-system)
10847 (propagated-inputs
10848 `(("python-click" ,python-click)))
10849 (synopsis "Logging for click applications")
10850 (description "This package provides a Python library for logging Click
10851 applications.")
10852 (home-page "https://github.com/click-contrib/click-log")
10853 (license license:expat)))
10854
10855 (define-public python-click-default-group
10856 (package
10857 (name "python-click-default-group")
10858 (version "1.2.2")
10859 (source (origin
10860 (method url-fetch)
10861 (uri (pypi-uri "click-default-group" version))
10862 (sha256
10863 (base32
10864 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
10865 (build-system python-build-system)
10866 (arguments
10867 `(#:tests? #f)) ; no target
10868 (propagated-inputs
10869 `(("python-click" ,python-click)))
10870 (synopsis "Extends click.Group")
10871 (description "This package extends click.Group to invoke a command without
10872 explicit subcommand name.")
10873 (home-page "https://github.com/click-contrib/click-default-group")
10874 (license license:bsd-3)))
10875
10876 (define-public python-structlog
10877 (package
10878 (name "python-structlog")
10879 (version "20.2.0")
10880 (source
10881 (origin
10882 (method url-fetch)
10883 (uri (pypi-uri "structlog" version))
10884 (sha256
10885 (base32
10886 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
10887 (build-system python-build-system)
10888 (arguments
10889 `(#:phases
10890 (modify-phases %standard-phases
10891 (replace 'check
10892 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10893 (when tests?
10894 (add-installed-pythonpath inputs outputs)
10895 (invoke "pytest"))
10896 #t)))))
10897 (native-inputs
10898 `(("python-coverage" ,python-coverage)
10899 ("python-freezegun" ,python-freezegun)
10900 ("python-pretend" ,python-pretend)
10901 ("python-pytest" ,python-pytest)
10902 ("python-pytest-asyncio" ,python-pytest-asyncio)
10903 ("python-simplejson" ,python-simplejson)
10904 ("python-twisted" ,python-twisted)))
10905 (home-page "https://www.structlog.org/")
10906 (synopsis "Structured Logging for Python")
10907 (description "@code{structlog} changes logging in Python by adding structure
10908 to your log entries.")
10909 (license (list license:asl2.0 license:expat))))
10910
10911 (define-public python-apipkg
10912 (package
10913 (name "python-apipkg")
10914 (version "1.5")
10915 (source (origin
10916 (method url-fetch)
10917 (uri (pypi-uri "apipkg" version))
10918 (sha256
10919 (base32
10920 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10921 (build-system python-build-system)
10922 (native-inputs
10923 `(("python-pytest" ,python-pytest)
10924 ("python-setuptools-scm" ,python-setuptools-scm)))
10925 (synopsis "Namespace control and lazy-import mechanism")
10926 (description "With apipkg you can control the exported namespace of a Python
10927 package and greatly reduce the number of imports for your users. It is a small
10928 pure Python module that works on virtually all Python versions.")
10929 (home-page "https://github.com/pytest-dev/apipkg")
10930 (license license:expat)))
10931
10932 (define-public python-execnet
10933 (package
10934 (name "python-execnet")
10935 (version "1.4.1")
10936 (source (origin
10937 (method url-fetch)
10938 (uri (pypi-uri "execnet" version))
10939 (sha256
10940 (base32
10941 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10942 (build-system python-build-system)
10943 (arguments
10944 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
10945 ;; The two test failures are caused by the lack of an `ssh` executable.
10946 ;; The test suite can be run with pytest after the 'install' phase.
10947 #:tests? #f))
10948 (native-inputs
10949 `(("python-pytest" ,python-pytest)
10950 ("python-setuptools-scm" ,python-setuptools-scm)))
10951 (propagated-inputs
10952 `(("python-apipkg" ,python-apipkg)))
10953 (synopsis "Rapid multi-Python deployment")
10954 (description "Execnet provides a share-nothing model with
10955 channel-send/receive communication for distributing execution across many
10956 Python interpreters across version, platform and network barriers. It has a
10957 minimal and fast API targeting the following uses:
10958 @enumerate
10959 @item distribute tasks to (many) local or remote CPUs
10960 @item write and deploy hybrid multi-process applications
10961 @item write scripts to administer multiple environments
10962 @end enumerate")
10963 (home-page "https://codespeak.net/execnet/")
10964 (license license:expat)))
10965
10966 (define-public python2-execnet
10967 (package-with-python2 python-execnet))
10968
10969 (define-public python-icalendar
10970 (package
10971 (name "python-icalendar")
10972 (version "4.0.5")
10973 (source (origin
10974 (method url-fetch)
10975 (uri (pypi-uri "icalendar" version))
10976 (sha256
10977 (base32
10978 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10979 (build-system python-build-system)
10980 (propagated-inputs
10981 `(("python-dateutil" ,python-dateutil)
10982 ("python-pytz" ,python-pytz)))
10983 (synopsis "Python library for parsing iCalendar files")
10984 (description "The icalendar package is a parser/generator of iCalendar
10985 files for use with Python.")
10986 (home-page "https://github.com/collective/icalendar")
10987 (license license:bsd-2)))
10988
10989 (define-public python-args
10990 (package
10991 (name "python-args")
10992 (version "0.1.0")
10993 (source (origin
10994 (method url-fetch)
10995 (uri (pypi-uri "args" version))
10996 (sha256
10997 (base32
10998 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10999 (build-system python-build-system)
11000 (home-page "https://github.com/kennethreitz/args")
11001 (synopsis "Command-line argument parser")
11002 (description
11003 "This library provides a Python module to parse command-line arguments.")
11004 (license license:bsd-3)))
11005
11006 (define-public python2-args
11007 (package-with-python2 python-args))
11008
11009 (define-public python-clint
11010 (package
11011 (name "python-clint")
11012 (version "0.5.1")
11013 (source (origin
11014 (method url-fetch)
11015 (uri (pypi-uri "clint" version))
11016 (sha256
11017 (base32
11018 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
11019 (build-system python-build-system)
11020 (arguments
11021 '(#:phases
11022 (modify-phases %standard-phases
11023 (replace 'check
11024 (lambda _ (invoke "py.test" "-v"))))))
11025 (native-inputs
11026 `(("python-pytest" ,python-pytest)))
11027 (propagated-inputs
11028 `(("python-args" ,python-args)))
11029 (home-page "https://github.com/kennethreitz/clint")
11030 (synopsis "Command-line interface tools")
11031 (description
11032 "Clint is a Python module filled with a set of tools for developing
11033 command-line applications, including tools for colored and indented
11034 output, progress bar display, and pipes.")
11035 (license license:isc)))
11036
11037 (define-public python2-clint
11038 (package-with-python2 python-clint))
11039
11040 (define-public python-rply
11041 (package
11042 (name "python-rply")
11043 (version "0.7.5")
11044 (source (origin
11045 (method url-fetch)
11046 (uri (pypi-uri "rply" version))
11047 (sha256
11048 (base32
11049 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
11050 (build-system python-build-system)
11051 (propagated-inputs
11052 `(("python-appdirs" ,python-appdirs)))
11053 (home-page "https://github.com/alex/rply")
11054 (synopsis "Parser generator for Python")
11055 (description
11056 "This package provides a pure Python based parser generator, that also
11057 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
11058 with a new public API, and RPython support.")
11059 (license license:bsd-3)))
11060
11061 (define-public python2-rply
11062 (package-with-python2 python-rply))
11063
11064 (define-public python-hy
11065 (package
11066 (name "python-hy")
11067 (version "0.18.0")
11068 (source (origin
11069 (method url-fetch)
11070 (uri (pypi-uri "hy" version))
11071 (sha256
11072 (base32
11073 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
11074 (build-system python-build-system)
11075 (arguments
11076 '(#:phases
11077 (modify-phases %standard-phases
11078 (add-before 'install 'set-HOME
11079 (lambda _
11080 (setenv "HOME" "/tmp") #t))
11081 (replace 'check
11082 (lambda _
11083 ;; Tests require write access to HOME.
11084 (setenv "HOME" "/tmp")
11085 (invoke "nosetests"))))))
11086 (native-inputs
11087 `(("python-coverage" ,python-coverage)
11088 ("python-nose" ,python-nose)))
11089 (propagated-inputs
11090 `(("python-astor" ,python-astor)
11091 ("python-colorama" ,python-colorama)
11092 ("python-rply" ,python-rply)
11093 ("python-funcparserlib"
11094 ,python-funcparserlib)))
11095 (home-page "http://hylang.org/")
11096 (synopsis "Lisp frontend to Python")
11097 (description
11098 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
11099 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
11100 Python at your fingertips, in Lisp form.")
11101 (license license:expat)))
11102
11103 (define-public python2-functools32
11104 (package
11105 (name "python2-functools32")
11106 (version "3.2.3-2")
11107 (source
11108 (origin
11109 (method url-fetch)
11110 (uri (pypi-uri "functools32" version))
11111 (sha256
11112 (base32
11113 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
11114 (build-system python-build-system)
11115 (arguments
11116 `(#:python ,python-2
11117 #:tests? #f)) ; no test target
11118 (home-page "https://github.com/MiCHiLU/python-functools32")
11119 (synopsis
11120 "Backport of the functools module from Python 3.2.3")
11121 (description
11122 "This package is a backport of the @code{functools} module from Python
11123 3.2.3 for use with older versions of Python and PyPy.")
11124 (license license:expat)))
11125
11126 (define-public python2-subprocess32
11127 (package
11128 (name "python2-subprocess32")
11129 (version "3.2.7")
11130 (source (origin
11131 (method url-fetch)
11132 (uri (pypi-uri "subprocess32" version))
11133 (sha256
11134 (base32
11135 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
11136 (patches
11137 (search-patches "python2-subprocess32-disable-input-test.patch"))))
11138 (build-system python-build-system)
11139 (arguments
11140 `(#:python ,python-2
11141 ;; The test suite fails with Python > 2.7.13:
11142 ;; import test.support
11143 ;; ImportError: No module named support
11144 #:tests? #f
11145 #:phases
11146 (modify-phases %standard-phases
11147 (add-after 'unpack 'patch-/bin/sh
11148 (lambda _
11149 (substitute* '("subprocess32.py"
11150 "test_subprocess32.py")
11151 (("/bin/sh") (which "sh")))
11152 #t)))))
11153 (home-page "https://github.com/google/python-subprocess32")
11154 (synopsis "Backport of the subprocess module from Python 3.2")
11155 (description
11156 "This is a backport of the @code{subprocess} standard library module
11157 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
11158 new features. On POSIX systems it is guaranteed to be reliable when used
11159 in threaded applications. It includes timeout support from Python 3.3 but
11160 otherwise matches 3.2’s API.")
11161 (license license:psfl)))
11162
11163 (define-public python2-futures
11164 (package
11165 (name "python2-futures")
11166 (version "3.2.0")
11167 (source
11168 (origin
11169 (method url-fetch)
11170 (uri (pypi-uri "futures" version))
11171 (sha256
11172 (base32
11173 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
11174 (build-system python-build-system)
11175 (arguments
11176 `(#:python ,python-2
11177 #:phases
11178 (modify-phases %standard-phases
11179 (replace 'check
11180 (lambda _
11181 (invoke "python" "test_futures.py")
11182 #t)))))
11183 (home-page "https://github.com/agronholm/pythonfutures")
11184 (synopsis
11185 "Backport of the concurrent.futures package from Python 3.2")
11186 (description
11187 "The concurrent.futures module provides a high-level interface for
11188 asynchronously executing callables. This package backports the
11189 concurrent.futures package from Python 3.2")
11190 (license license:bsd-3)))
11191
11192 (define-public python-promise
11193 (package
11194 (name "python-promise")
11195 (version "0.4.2")
11196 (source
11197 (origin
11198 (method url-fetch)
11199 (uri (pypi-uri "promise" version))
11200 (sha256
11201 (base32
11202 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
11203 (build-system python-build-system)
11204 ;; Tests wants python-futures, which is a python2 only program, and
11205 ;; can't be found by python-promise at test time.
11206 (arguments `(#:tests? #f))
11207 (home-page "https://github.com/syrusakbary/promise")
11208 (synopsis "Promises/A+ implementation for Python")
11209 (description
11210 "Promises/A+ implementation for Python")
11211 (properties `((python2-variant . ,(delay python2-promise))))
11212 (license license:expat)))
11213
11214 (define-public python2-promise
11215 (let ((promise (package-with-python2
11216 (strip-python2-variant python-promise))))
11217 (package (inherit promise)
11218 (arguments (substitute-keyword-arguments (package-arguments promise)
11219 ((#:tests? _) #t)))
11220 (native-inputs
11221 `(("python2-futures" ,python2-futures)
11222 ("python2-pytest" ,python2-pytest)
11223 ,@(package-native-inputs promise))))))
11224
11225 (define-public python-progressbar2
11226 (package
11227 (name "python-progressbar2")
11228 (version "3.51.3")
11229 (source
11230 (origin
11231 (method url-fetch)
11232 (uri (pypi-uri "progressbar2" version))
11233 (sha256
11234 (base32
11235 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
11236 (build-system python-build-system)
11237 (propagated-inputs
11238 `(("python-six" ,python-six)
11239 ("python-utils" ,python-utils)))
11240 (native-inputs
11241 `(("python-flake8" ,python-flake8)
11242 ("python-freezegun" ,python-freezegun)
11243 ("python-pycodestyle" ,python-pycodestyle)
11244 ("python-pytest" ,python-pytest)
11245 ("python-pytest-cache" ,python-pytest-cache)
11246 ("python-pytest-cov" ,python-pytest-cov)
11247 ("python-pytest-flakes" ,python-pytest-flakes)
11248 ("python-pytest-pep8" ,python-pytest-pep8)
11249 ("python-sphinx" ,python-sphinx)))
11250 (home-page "https://github.com/WoLpH/python-progressbar")
11251 (synopsis "Text progress bar library for Python")
11252 (description
11253 "This package provides a Python progressbar library to provide
11254 visual (yet text based) progress to long running operations.")
11255 (license license:bsd-3)))
11256
11257 (define-public python-progressbar33
11258 (package
11259 (name "python-progressbar33")
11260 (version "2.4")
11261 (source
11262 (origin
11263 (method url-fetch)
11264 (uri (pypi-uri "progressbar33" version))
11265 (sha256
11266 (base32
11267 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
11268 (build-system python-build-system)
11269 (home-page "https://github.com/germangh/python-progressbar")
11270 (synopsis "Text progress bar library for Python")
11271 (description
11272 "This package provides a text progress bar library for Python. This
11273 version only differs from the original @code{progressbar} package in that it
11274 uses relative package imports instead of absolute imports, which is necessary
11275 for the module to work under Python 3.3.")
11276 ;; Either or both of these licenses may be selected.
11277 (license (list license:lgpl2.1+ license:bsd-3))))
11278
11279 (define-public python-colorama
11280 (package
11281 (name "python-colorama")
11282 (version "0.4.4")
11283 (source
11284 (origin
11285 (method url-fetch)
11286 (uri (pypi-uri "colorama" version))
11287 (sha256
11288 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
11289 (build-system python-build-system)
11290 (synopsis "Colored terminal text rendering for Python")
11291 (description "Colorama is a Python library for rendering colored terminal
11292 text.")
11293 (home-page "https://pypi.org/project/colorama/")
11294 (license license:bsd-3)))
11295
11296 (define-public python2-colorama
11297 (package-with-python2 python-colorama))
11298
11299 (define-public python-moto
11300 (package
11301 (name "python-moto")
11302 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
11303 (version "1.3.16.dev134")
11304 (source (origin
11305 (method url-fetch)
11306 (uri (pypi-uri "moto" version))
11307 (sha256
11308 (base32
11309 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
11310 (build-system python-build-system)
11311 (arguments
11312 `(#:phases (modify-phases %standard-phases
11313 (add-after 'unpack 'patch-hardcoded-executable-names
11314 (lambda _
11315 (substitute* "moto/batch/models.py"
11316 (("/bin/sh")
11317 (which "sh")))
11318 (substitute* (find-files "tests" "\\.py$")
11319 (("#!/bin/bash")
11320 (string-append "#!" (which "bash"))))
11321 #t))
11322 (replace 'check
11323 (lambda _
11324 (setenv "PYTHONPATH" (string-append "./build/lib:"
11325 (getenv "PYTHONPATH")))
11326 (invoke "pytest" "-vv" "-m" "not network"
11327 ;; These tests require Docker.
11328 "-k" "not test_terminate_job \
11329 and not test_invoke_function_from_sqs_exception"))))))
11330 (native-inputs
11331 `(("python-flask" ,python-flask)
11332 ("python-flask-cors" ,python-flask-cors)
11333 ("python-freezegun" ,python-freezegun)
11334 ("python-parameterized" ,python-parameterized)
11335 ("python-pytest" ,python-pytest)
11336 ("python-sure" ,python-sure)))
11337 (propagated-inputs
11338 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
11339 ("python-boto" ,python-boto)
11340 ("python-boto3" ,python-boto3)
11341 ("python-botocore" ,python-botocore)
11342 ("python-cfn-lint" ,python-cfn-lint)
11343 ("python-cryptography" ,python-cryptography)
11344 ("python-dateutil" ,python-dateutil)
11345 ("python-docker" ,python-docker)
11346 ("python-idna" ,python-idna)
11347 ("python-jinja2" ,python-jinja2)
11348 ("python-jose" ,python-jose)
11349 ("python-jsondiff" ,python-jsondiff)
11350 ("python-mock" ,python-mock)
11351 ("python-pytz" ,python-pytz)
11352 ("python-pyyaml" ,python-pyyaml)
11353 ("python-requests" ,python-requests)
11354 ("python-responses" ,python-responses)
11355 ("python-six" ,python-six)
11356 ("python-sshpubkeys" ,python-sshpubkeys)
11357 ("python-werkzeug" ,python-werkzeug)
11358 ("python-xmltodict" ,python-xmltodict)))
11359 (home-page "https://github.com/spulec/moto")
11360 (synopsis "Mock out the boto library")
11361 (description
11362 "@code{moto} is a library designed to easily mock out the
11363 @code{boto} library.")
11364 (license license:asl2.0)))
11365
11366 (define-public python-rsa
11367 (package
11368 (name "python-rsa")
11369 (version "3.4.2")
11370 (source
11371 (origin
11372 (method url-fetch)
11373 (uri (pypi-uri "rsa" version))
11374 (sha256
11375 (base32
11376 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11377 (build-system python-build-system)
11378 (propagated-inputs
11379 `(("python-pyasn1" ,python-pyasn1)))
11380 (synopsis "Pure-Python RSA implementation")
11381 (description "Python-RSA is a pure-Python RSA implementation. It supports
11382 encryption and decryption, signing and verifying signatures, and key
11383 generation according to PKCS#1 version 1.5. It can be used as a Python
11384 library as well as on the command line.")
11385 (home-page "https://stuvel.eu/rsa")
11386 (license license:asl2.0)))
11387
11388 (define-public python2-rsa
11389 (package-with-python2 python-rsa))
11390
11391 (define-public python-pluggy
11392 (package
11393 (name "python-pluggy")
11394 (version "0.13.1")
11395 (source
11396 (origin
11397 (method url-fetch)
11398 (uri (pypi-uri "pluggy" version))
11399 (sha256
11400 (base32
11401 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11402 (build-system python-build-system)
11403 (native-inputs
11404 `(("python-setuptools-scm" ,python-setuptools-scm)))
11405 (synopsis "Plugin and hook calling mechanism for Python")
11406 (description "Pluggy is an extraction of the plugin manager as used by
11407 Pytest but stripped of Pytest specific details.")
11408 (home-page "https://pypi.org/project/pluggy/")
11409 (properties `((python2-variant . ,(delay python2-pluggy))))
11410 (license license:expat)))
11411
11412 (define-public python2-pluggy
11413 (let ((base (package-with-python2 (strip-python2-variant
11414 python-pluggy))))
11415 (package/inherit
11416 base
11417 (propagated-inputs
11418 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11419
11420 ;; This package requires python2-importlib-metadata, but that package
11421 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11422 ;; variant to solve the circular dependency.
11423 (define-public python2-pluggy-bootstrap
11424 (hidden-package
11425 (package/inherit
11426 python2-pluggy
11427 (name "python2-pluggy-bootstrap")
11428 (arguments
11429 `(#:tests? #f
11430 ,@(package-arguments python2-pluggy)))
11431 (propagated-inputs
11432 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11433
11434 (define-public python-tox
11435 (package
11436 (name "python-tox")
11437 (version "3.20.0")
11438 (source
11439 (origin
11440 (method url-fetch)
11441 (uri (pypi-uri "tox" version))
11442 (sha256
11443 (base32
11444 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11445 (build-system python-build-system)
11446 (arguments
11447 ;; FIXME: Tests require pytest-timeout, which itself requires
11448 ;; pytest>=2.8.0 for installation.
11449 '(#:tests? #f))
11450 (propagated-inputs
11451 `(("python-filelock" ,python-filelock)
11452 ("python-packaging" ,python-packaging)
11453 ("python-pluggy" ,python-pluggy)
11454 ("python-py" ,python-py)
11455 ("python-six" ,python-six)
11456 ("python-toml" ,python-toml)
11457 ("python-virtualenv" ,python-virtualenv)))
11458 (native-inputs
11459 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11460 ("python-pytest" ,python-pytest) ; >= 2.3.5
11461 ("python-setuptools-scm" ,python-setuptools-scm)))
11462 (home-page "https://tox.readthedocs.io")
11463 (synopsis "Virtualenv-based automation of test activities")
11464 (description "Tox is a generic virtualenv management and test command line
11465 tool. It can be used to check that a package installs correctly with
11466 different Python versions and interpreters, or run tests in each type of
11467 supported environment, or act as a frontend to continuous integration
11468 servers.")
11469 (license license:expat)))
11470
11471 (define-public python-jmespath
11472 (package
11473 (name "python-jmespath")
11474 (version "0.9.4")
11475 (source
11476 (origin
11477 (method url-fetch)
11478 (uri (pypi-uri "jmespath" version))
11479 (sha256
11480 (base32
11481 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11482 (build-system python-build-system)
11483 (native-inputs
11484 `(("python-nose" ,python-nose)))
11485 (synopsis "JSON Matching Expressions")
11486 (description "JMESPath (pronounced “james path”) is a Python library that
11487 allows one to declaratively specify how to extract elements from a JSON
11488 document.")
11489 (home-page "https://github.com/jmespath/jmespath.py")
11490 (license license:expat)))
11491
11492 (define-public python2-jmespath
11493 (package-with-python2 python-jmespath))
11494
11495 (define-public python-symengine
11496 (package
11497 (name "python-symengine")
11498 (version "0.6.1")
11499 (source
11500 (origin
11501 (method url-fetch)
11502 (uri (pypi-uri "symengine" version))
11503 (sha256
11504 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11505 (build-system python-build-system)
11506 (native-inputs
11507 `(("cmake" ,cmake)
11508 ("python-cython" ,python-cython)))
11509 (inputs
11510 `(("symengine" ,symengine)))
11511 (home-page "https://github.com/symengine/symengine.py")
11512 (synopsis "Python library providing wrappers to SymEngine")
11513 (description
11514 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11515 manipulation library.")
11516 (license license:expat)))
11517
11518 (define-public python-boto
11519 (package
11520 (name "python-boto")
11521 (version "2.49.0")
11522 (source (origin
11523 (method url-fetch)
11524 (uri (pypi-uri "boto" version))
11525 (sha256
11526 (base32
11527 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
11528 (build-system python-build-system)
11529 (arguments
11530 ;; XXX: This package is unmaintained and has problems with newer versions
11531 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
11532 ;; subset of this library, so keep it around for now, but disable tests.
11533 '(#:tests? #f))
11534 (propagated-inputs
11535 `(("python-paramiko" ,python-paramiko)
11536 ("python-requests" ,python-requests)))
11537 (home-page "https://github.com/boto/boto")
11538 (synopsis "Python interfaces for Amazon Web Services")
11539 (description
11540 "This package provides various facilities for interacting with Amazon
11541 Web Services through Python.
11542
11543 This software is unmaintained, and new projects should use @code{boto3} instead.")
11544 (license license:expat)))
11545
11546 (define-public python-botocore
11547 ;; Note: When updating botocore, also make sure that boto3 and awscli
11548 ;; are compatible.
11549 (package
11550 (name "python-botocore")
11551 (version "1.19.22")
11552 (source
11553 (origin
11554 (method url-fetch)
11555 (uri (pypi-uri "botocore" version))
11556 (sha256
11557 (base32
11558 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
11559 (build-system python-build-system)
11560 (arguments
11561 ;; FIXME: Many tests are failing.
11562 '(#:tests? #f))
11563 (propagated-inputs
11564 `(("python-dateutil" ,python-dateutil)
11565 ("python-jmespath" ,python-jmespath)
11566 ("python-urllib3" ,python-urllib3)))
11567 (home-page "https://github.com/boto/botocore")
11568 (synopsis "Low-level interface to AWS")
11569 (description "Botocore is a Python library that provides a low-level
11570 interface to the Amazon Web Services (AWS) API.")
11571 (license license:asl2.0)))
11572
11573 (define-public python2-botocore
11574 (package-with-python2 python-botocore))
11575
11576 (define-public python-boto3
11577 (package
11578 (name "python-boto3")
11579 (version "1.16.22")
11580 (home-page "https://github.com/boto/boto3")
11581 (source (origin
11582 (method git-fetch)
11583 (uri (git-reference (url home-page) (commit version)))
11584 (file-name (git-file-name name version))
11585 (sha256
11586 (base32
11587 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
11588 (arguments
11589 `(#:phases
11590 (modify-phases %standard-phases
11591 (add-after 'unpack 'delete-network-tests
11592 ;; Deleting integration tests because they are trying to connect to AWS.
11593 (lambda _
11594 (delete-file-recursively "tests/integration")
11595 #t)))))
11596 (build-system python-build-system)
11597 (native-inputs
11598 `(("python-nose" ,python-nose)
11599 ("python-mock" ,python-mock)))
11600 (propagated-inputs
11601 `(("python-botocore" ,python-botocore)
11602 ("python-jmespath" ,python-jmespath)
11603 ("python-s3transfer" ,python-s3transfer)))
11604 (synopsis "AWS SDK for Python")
11605 (description
11606 "Boto3 is a Python library for writing programs that interact with
11607 @acronym{AWS,Amazon Web Services}.")
11608 (license license:asl2.0)))
11609
11610 (define-public python-pyfiglet
11611 (package
11612 (name "python-pyfiglet")
11613 (version "0.8.post1")
11614 (source
11615 (origin
11616 (method url-fetch)
11617 (uri (pypi-uri "pyfiglet" version))
11618 (sha256
11619 (base32
11620 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11621 (build-system python-build-system)
11622 (home-page "https://github.com/pwaller/pyfiglet")
11623 (synopsis "Draw ASCII art big letters in Python")
11624 (description "This module lets you draw large letter from ordinary characters
11625 in pure Python.")
11626 (license license:expat)))
11627
11628 (define-public python-xdo
11629 (package
11630 (name "python-xdo")
11631 (version "0.3")
11632 (source (origin
11633 (method url-fetch)
11634 (uri (string-append
11635 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11636 "python-xdo_" version ".orig.tar.gz"))
11637 (sha256
11638 (base32
11639 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11640 (build-system python-build-system)
11641 (arguments
11642 '(#:phases
11643 (modify-phases %standard-phases
11644 (add-before 'install 'patch-libxdo-path
11645 ;; Hardcode the path of dynamically loaded libxdo library.
11646 (lambda* (#:key inputs #:allow-other-keys)
11647 (let ((libxdo (string-append
11648 (assoc-ref inputs "xdotool")
11649 "/lib/libxdo.so")))
11650 (substitute* "xdo/_xdo.py"
11651 (("find_library\\(\"xdo\"\\)")
11652 (simple-format #f "\"~a\"" libxdo)))
11653 #t))))
11654 #:tests? #f)) ; no tests provided
11655 (propagated-inputs
11656 `(("python-six" ,python-six)))
11657 (inputs
11658 `(("xdotool" ,xdotool)
11659 ("libX11" ,libx11)))
11660 (home-page "https://tracker.debian.org/pkg/python-xdo")
11661 (synopsis "Python library for simulating X11 keyboard/mouse input")
11662 (description "Provides bindings to libxdo for manipulating X11 via simulated
11663 input. (Note that this is mostly a legacy library; you may wish to look at
11664 python-xdo for newer bindings.)")
11665 (license license:bsd-3)))
11666
11667 (define-public python2-xdo
11668 (package-with-python2 python-xdo))
11669
11670 (define-public python-mako
11671 (package
11672 (name "python-mako")
11673 (version "1.1.3")
11674 (source
11675 (origin
11676 (method url-fetch)
11677 (uri (pypi-uri "Mako" version))
11678 (sha256
11679 (base32
11680 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11681 (build-system python-build-system)
11682 (arguments
11683 `(#:phases (modify-phases %standard-phases
11684 (replace 'check
11685 (lambda* (#:key tests? #:allow-other-keys)
11686 (if tests?
11687 (invoke "nosetests" "-v")
11688 (format #t "test suite not run~%"))
11689 #t)))))
11690 (propagated-inputs
11691 `(("python-markupsafe" ,python-markupsafe)))
11692 (native-inputs
11693 `(("python-mock" ,python-mock)
11694 ("python-nose" ,python-nose)))
11695 (home-page "https://www.makotemplates.org/")
11696 (synopsis "Templating language for Python")
11697 (description "Mako is a templating language for Python that compiles
11698 templates into Python modules.")
11699 (license license:expat)))
11700
11701 (define-public python2-mako
11702 (package-with-python2 python-mako))
11703
11704 (define-public python-waitress
11705 (package
11706 (name "python-waitress")
11707 (version "1.1.0")
11708 (source
11709 (origin
11710 (method url-fetch)
11711 (uri (pypi-uri "waitress" version))
11712 (patches (search-patches "python-waitress-fix-tests.patch"))
11713 (sha256
11714 (base32
11715 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11716 (build-system python-build-system)
11717 (home-page "https://github.com/Pylons/waitress")
11718 (synopsis "Waitress WSGI server")
11719 (description "Waitress is meant to be a production-quality pure-Python WSGI
11720 server with very acceptable performance.")
11721 (license license:zpl2.1)))
11722
11723 (define-public python2-waitress
11724 (package-with-python2 python-waitress))
11725
11726 (define-public python-whichcraft
11727 (package
11728 (name "python-whichcraft")
11729 (version "0.6.1")
11730 (source
11731 (origin
11732 (method url-fetch)
11733 (uri (pypi-uri "whichcraft" version))
11734 (sha256
11735 (base32
11736 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11737 (build-system python-build-system)
11738 (native-inputs
11739 `(("python-pytest" ,python-pytest)))
11740 (home-page "https://github.com/pydanny/whichcraft")
11741 (synopsis "Cross-platform cross-python shutil.which functionality")
11742 (description
11743 "This package provides a shim of the shutil.which function that's
11744 designed to work across multiple versions of Python.")
11745 (license license:bsd-3)))
11746
11747 (define-public python-cookiecutter
11748 (package
11749 (name "python-cookiecutter")
11750 (version "1.7.2")
11751 (source
11752 (origin
11753 (method url-fetch)
11754 (uri (pypi-uri "cookiecutter" version))
11755 (sha256
11756 (base32
11757 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11758 (build-system python-build-system)
11759 (native-inputs
11760 `(("python-freezegun" ,python-freezegun)
11761 ("python-pytest" ,python-pytest)
11762 ("python-pytest-catchlog" ,python-pytest-catchlog)
11763 ("python-pytest-cov" ,python-pytest-cov)
11764 ("python-pytest-mock" ,python-pytest-mock)))
11765 (propagated-inputs
11766 `(("python-binaryornot" ,python-binaryornot)
11767 ("python-click" ,python-click)
11768 ("python-future" ,python-future)
11769 ("python-jinja2" ,python-jinja2)
11770 ("python-jinja2-time" ,python-jinja2-time)
11771 ("python-poyo" ,python-poyo)
11772 ("python-requests" ,python-requests)
11773 ("python-slugify" ,python-slugify)
11774 ("python-text-unidecode" ,python-text-unidecode)
11775 ("python-whichcraft" ,python-whichcraft)))
11776 (home-page "https://github.com/cookiecutter/cookiecutter")
11777 (synopsis
11778 "Command-line utility that creates projects from project templates")
11779 (description
11780 "This package provides a command-line utility that creates projects from
11781 project templates, e.g. creating a Python package project from a Python package
11782 project template.")
11783 (license license:bsd-3)))
11784
11785 (define-public python-pyquery
11786 (package
11787 (name "python-pyquery")
11788 (version "1.2.17")
11789 (source
11790 (origin
11791 (method url-fetch)
11792 (uri (pypi-uri "pyquery" version))
11793 (sha256
11794 (base32
11795 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11796 (build-system python-build-system)
11797 (native-inputs
11798 `(("python-webob" ,python-webob)
11799 ("python-webtest" ,python-webtest)))
11800 (propagated-inputs
11801 `(("python-lxml" ,python-lxml)
11802 ("python-cssselect" ,python-cssselect)))
11803 (home-page "https://github.com/gawel/pyquery")
11804 (synopsis "Make jQuery-like queries on xml documents")
11805 (description "pyquery allows you to make jQuery queries on xml documents.
11806 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11807 fast xml and html manipulation.")
11808 (license license:bsd-3)))
11809
11810 (define-public python-anyjson
11811 (package
11812 (name "python-anyjson")
11813 (version "0.3.3")
11814 (source
11815 (origin
11816 (method url-fetch)
11817 (uri (pypi-uri "anyjson" version))
11818 (sha256
11819 (base32
11820 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11821 (build-system python-build-system)
11822 (arguments
11823 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
11824 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
11825 ;; whatever) so this transformation needs to be done before the tests
11826 ;; can be run. Maybe we could add a build step to transform beforehand
11827 ;; but it could be annoying/difficult.
11828 ;; We can enable tests for the Python 2 version, though, and do below.
11829 #:tests? #f))
11830 (home-page "https://bitbucket.org/runeh/anyjson/")
11831 (synopsis
11832 "Wraps best available JSON implementation in a common interface")
11833 (description
11834 "Anyjson loads whichever is the fastest JSON module installed
11835 and provides a uniform API regardless of which JSON implementation is used.")
11836 (license license:bsd-3)
11837 (properties `((python2-variant . ,(delay python2-anyjson))))))
11838
11839 (define-public python2-anyjson
11840 (let ((anyjson (package-with-python2
11841 (strip-python2-variant python-anyjson))))
11842 (package
11843 (inherit anyjson)
11844 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
11845 #:tests? #t
11846 ,@(package-arguments anyjson)))
11847 (native-inputs `(("python2-nose" ,python2-nose))))))
11848
11849 (define-public python-amqp
11850 (package
11851 (name "python-amqp")
11852 (version "2.3.2")
11853 (source
11854 (origin
11855 (method url-fetch)
11856 (uri (pypi-uri "amqp" version))
11857 (sha256
11858 (base32
11859 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
11860 (build-system python-build-system)
11861 (native-inputs
11862 `(("python-case" ,python-case)
11863 ("python-pytest-sugar" ,python-pytest-sugar)
11864 ("python-mock" ,python-mock)))
11865 (propagated-inputs
11866 `(("python-vine" ,python-vine)))
11867 (home-page "https://github.com/celery/py-amqp")
11868 (synopsis
11869 "Low-level AMQP client for Python (fork of amqplib)")
11870 (description
11871 "This is a fork of amqplib which was originally written by Barry Pederson.
11872 It is maintained by the Celery project, and used by kombu as a pure python
11873 alternative when librabbitmq is not available.")
11874 (license license:lgpl2.1+)
11875 (properties `((python2-variant . ,(delay python2-amqp))))))
11876
11877 (define-public python2-amqp
11878 (let ((amqp (package-with-python2
11879 (strip-python2-variant python-amqp))))
11880 (package
11881 (inherit amqp)
11882 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11883 ;; unmaintained. Weirdly, does not do this on the python 3
11884 ;; version?
11885 #:tests? #f
11886 ,@(package-arguments amqp))))))
11887
11888 (define-public python-txamqp
11889 (package
11890 (name "python-txamqp")
11891 (version "0.8.2")
11892 (source
11893 (origin
11894 (method url-fetch)
11895 (uri (pypi-uri "txAMQP" version))
11896 (sha256
11897 (base32
11898 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11899 (build-system python-build-system)
11900 (propagated-inputs
11901 `(("python-six" ,python-six)
11902 ("python-twisted" ,python-twisted)))
11903 (home-page "https://github.com/txamqp/txamqp")
11904 (synopsis "Communicate with AMQP peers and brokers using Twisted")
11905 (description
11906 "This package provides a Python library for communicating with AMQP peers
11907 and brokers using the asynchronous networking framework Twisted. It contains
11908 all the necessary code to connect, send and receive messages to/from an
11909 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
11910 also includes support for using Thrift RPC over AMQP in Twisted
11911 applications.")
11912 (license license:asl2.0)))
11913
11914 (define-public python2-txamqp
11915 (package-with-python2 python-txamqp))
11916
11917 (define-public python-kombu
11918 (package
11919 (name "python-kombu")
11920 (version "4.2.2")
11921 (source
11922 (origin
11923 (method url-fetch)
11924 (uri (pypi-uri "kombu" version))
11925 (sha256
11926 (base32
11927 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11928 (build-system python-build-system)
11929 (native-inputs
11930 `(("python-mock" ,python-mock)
11931 ("python-case" ,python-case)
11932 ("python-pyro4" ,python-pyro4)
11933 ("python-pytest-sugar" ,python-pytest-sugar)
11934 ("python-pytz" ,python-pytz)))
11935 (propagated-inputs
11936 `(("python-anyjson" ,python-anyjson)
11937 ("python-amqp" ,python-amqp)
11938 ("python-redis" ,python-redis)))
11939 (home-page "https://kombu.readthedocs.io")
11940 (synopsis "Message passing library for Python")
11941 (description "The aim of Kombu is to make messaging in Python as easy as
11942 possible by providing an idiomatic high-level interface for the AMQ protocol,
11943 and also provide proven and tested solutions to common messaging problems.
11944 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
11945 message orientation, queuing, routing, reliability and security, for which the
11946 RabbitMQ messaging server is the most popular implementation.")
11947 (license license:bsd-3)
11948 (properties `((python2-variant . ,(delay python2-kombu))))))
11949
11950 (define-public python2-kombu
11951 (let ((kombu (package-with-python2
11952 (strip-python2-variant python-kombu))))
11953 (package
11954 (inherit kombu)
11955 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11956 ;; It works fine on the python3 variant.
11957 #:tests? #f
11958 ,@(package-arguments kombu)))
11959 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11960 ,@(package-native-inputs kombu))))))
11961
11962 (define-public python-billiard
11963 (package
11964 (name "python-billiard")
11965 (version "3.5.0.5")
11966 (source
11967 (origin
11968 (method url-fetch)
11969 (uri (pypi-uri "billiard" version))
11970 (sha256
11971 (base32
11972 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11973 (build-system python-build-system)
11974 (native-inputs
11975 `(("python-case" ,python-case)
11976 ("python-pytest" ,python-pytest)))
11977 (home-page "https://github.com/celery/billiard")
11978 (synopsis
11979 "Python multiprocessing fork with improvements and bugfixes")
11980 (description
11981 "Billiard is a fork of the Python 2.7 multiprocessing package. The
11982 multiprocessing package itself is a renamed and updated version of R Oudkerk's
11983 pyprocessing package. This standalone variant is intended to be compatible with
11984 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
11985 (license license:bsd-3)
11986 (properties `((python2-variant . ,(delay python2-billiard))))))
11987
11988 (define-public python2-billiard
11989 (let ((billiard (package-with-python2
11990 (strip-python2-variant python-billiard))))
11991 (package
11992 (inherit billiard)
11993 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11994 ("python2-mock" ,python2-mock)
11995 ,@(package-native-inputs billiard))))))
11996
11997 (define-public python-celery
11998 (package
11999 (name "python-celery")
12000 (version "4.2.1")
12001 (source
12002 (origin
12003 (method url-fetch)
12004 (uri (pypi-uri "celery" version))
12005 (sha256
12006 (base32
12007 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
12008 (build-system python-build-system)
12009 (arguments
12010 '(;; TODO The tests fail with Python 3.7
12011 ;; https://github.com/celery/celery/issues/4849
12012 #:tests? #f
12013 #:phases
12014 (modify-phases %standard-phases
12015 (add-after 'unpack 'patch-requirements
12016 (lambda _
12017 (substitute* "requirements/test.txt"
12018 (("pytest>=3\\.0,<3\\.3")
12019 "pytest>=3.0"))
12020 #t)))))
12021 (native-inputs
12022 `(("python-case" ,python-case)
12023 ("python-pytest" ,python-pytest)))
12024 (propagated-inputs
12025 `(("python-pytz" ,python-pytz)
12026 ("python-billiard" ,python-billiard)
12027 ("python-kombu" ,python-kombu)))
12028 (home-page "https://celeryproject.org")
12029 (synopsis "Distributed Task Queue")
12030 (description "Celery is an asynchronous task queue/job queue based on
12031 distributed message passing. It is focused on real-time operation, but
12032 supports scheduling as well. The execution units, called tasks, are executed
12033 concurrently on a single or more worker servers using multiprocessing,
12034 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
12035 synchronously (wait until ready).")
12036 (license license:bsd-3)
12037 (properties `((python2-variant . ,(delay python2-celery))))))
12038
12039 (define-public python2-celery
12040 (let ((celery (package-with-python2
12041 (strip-python2-variant python-celery))))
12042 (package
12043 (inherit celery)
12044 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12045 ("python2-mock" ,python2-mock)
12046 ,@(package-native-inputs celery))))))
12047
12048 (define-public python-translitcodec
12049 (package
12050 (name "python-translitcodec")
12051 (version "0.4.0")
12052 (source
12053 (origin
12054 (method url-fetch)
12055 (uri (pypi-uri "translitcodec" version))
12056 (sha256
12057 (base32
12058 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
12059 (build-system python-build-system)
12060 (arguments
12061 `(#:tests? #f)) ; no tests provided
12062 (home-page
12063 "https://github.com/claudep/translitcodec")
12064 (synopsis
12065 "Unicode to 8-bit charset transliteration codec")
12066 (description
12067 "This package contains codecs for transliterating ISO 10646 texts into
12068 best-effort representations using smaller coded character sets (ASCII,
12069 ISO 8859, etc.).")
12070 (license license:expat)))
12071
12072 (define-public python2-translitcodec
12073 (package-with-python2 python-translitcodec))
12074
12075 (define-public python-editor
12076 (package
12077 (name "python-editor")
12078 (version "1.0.4")
12079 (source
12080 (origin
12081 (method url-fetch)
12082 (uri (pypi-uri "python-editor" version))
12083 (sha256
12084 (base32
12085 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
12086 (build-system python-build-system)
12087 (arguments
12088 '(#:tests? #f)) ;XXX: needs a TTY and an editor
12089 (home-page "https://github.com/fmoo/python-editor")
12090 (synopsis "Programmatically open an editor, capture the result")
12091 (description
12092 "python-editor is a library that provides the editor module for
12093 programmatically interfacing with your system's $EDITOR.")
12094 (license license:asl2.0)))
12095
12096 (define-public python2-editor
12097 (package-with-python2 python-editor))
12098
12099 (define-public python-multiprocessing-logging
12100 (package
12101 (name "python-multiprocessing-logging")
12102 (version "0.3.1")
12103 (home-page "https://github.com/jruere/multiprocessing-logging")
12104 (source (origin
12105 (method git-fetch)
12106 (uri (git-reference
12107 (url home-page)
12108 (commit (string-append "v" version))))
12109 (file-name (git-file-name name version))
12110 (sha256
12111 (base32
12112 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
12113 (build-system python-build-system)
12114 (synopsis "Manage logs from multiple processes")
12115 (description
12116 "This Python module implements a multiprocessing-aware @code{Handler}
12117 that, when set on the root @code{Logger}, will tunnel log records to the
12118 main process so that they are handled correctly.")
12119 (license license:lgpl3+)))
12120
12121 (define-public python-vobject
12122 (package
12123 (name "python-vobject")
12124 (version "0.9.6.1")
12125 (source (origin
12126 (method url-fetch)
12127 (uri (pypi-uri "vobject" version))
12128 (sha256
12129 (base32
12130 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
12131 (build-system python-build-system)
12132 (arguments
12133 '(;; The test suite relies on some non-portable Windows interfaces.
12134 #:tests? #f))
12135 (propagated-inputs
12136 `(("python-dateutil" ,python-dateutil)
12137 ("python-pyicu" ,python-pyicu)))
12138 (synopsis "Parse and generate vCard and vCalendar files")
12139 (description "Vobject is intended to be a full featured Python package for
12140 parsing and generating vCard and vCalendar files. Currently, iCalendar files
12141 are supported and well tested. vCard 3.0 files are supported, and all data
12142 should be imported, but only a few components are understood in a sophisticated
12143 way.")
12144 (home-page "https://eventable.github.io/vobject/")
12145 (license license:asl2.0)))
12146
12147 (define-public python2-vobject
12148 (package-with-python2 python-vobject))
12149
12150 (define-public python-munkres
12151 (package
12152 (name "python-munkres")
12153 (version "1.0.8")
12154 (source (origin
12155 (method url-fetch)
12156 (uri (pypi-uri "munkres" version))
12157 (sha256
12158 (base32
12159 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
12160 (build-system python-build-system)
12161 (arguments
12162 '(#:tests? #f)) ; no test suite
12163 (home-page "https://software.clapper.org/munkres/")
12164 (synopsis "Implementation of the Munkres algorithm")
12165 (description "The Munkres module provides an implementation of the Munkres
12166 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
12167 useful for solving the Assignment Problem.")
12168 (license license:bsd-3)))
12169
12170 (define-public python2-munkres
12171 (package-with-python2 python-munkres))
12172
12173 (define-public python-whoosh
12174 (package
12175 (name "python-whoosh")
12176 (version "2.7.4")
12177 (source
12178 (origin
12179 (method url-fetch)
12180 (uri (pypi-uri "Whoosh" version))
12181 (sha256
12182 (base32
12183 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
12184 (build-system python-build-system)
12185 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
12186 (native-inputs
12187 `(("python-pytest" ,python-pytest)))
12188 (home-page "https://bitbucket.org/mchaput/whoosh")
12189 (synopsis "Full text indexing, search, and spell checking library")
12190 (description
12191 "Whoosh is a fast, pure-Python full text indexing, search, and spell
12192 checking library.")
12193 (license license:bsd-2)))
12194
12195 (define-public python2-whoosh
12196 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
12197 (package (inherit whoosh)
12198 (propagated-inputs
12199 `(("python2-backport-ssl-match-hostname"
12200 ,python2-backport-ssl-match-hostname)
12201 ,@(package-propagated-inputs whoosh))))))
12202
12203 (define-public python-pathlib
12204 (package
12205 (name "python-pathlib")
12206 (version "1.0.1")
12207 (source (origin
12208 (method url-fetch)
12209 (uri (pypi-uri "pathlib" version))
12210 (sha256
12211 (base32
12212 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
12213 (build-system python-build-system)
12214 ;; The tests depend on the internal "test" module, which does not provide
12215 ;; a stable interface.
12216 (arguments `(#:tests? #f))
12217 (home-page "https://pathlib.readthedocs.org/")
12218 (synopsis "Object-oriented file system paths")
12219 (description "Pathlib offers a set of classes to handle file system paths.
12220 It offers the following advantages over using string objects:
12221
12222 @enumerate
12223 @item No more cumbersome use of os and os.path functions. Everything can
12224 be done easily through operators, attribute accesses, and method calls.
12225 @item Embodies the semantics of different path types. For example,
12226 comparing Windows paths ignores casing.
12227 @item Well-defined semantics, eliminating any inconsistencies or
12228 ambiguities (forward vs. backward slashes, etc.).
12229 @end enumerate
12230
12231 Note: In Python 3.4, pathlib is now part of the standard library. For other
12232 Python versions please consider python-pathlib2 instead, which tracks the
12233 standard library module. This module (python-pathlib) isn't maintained
12234 anymore.")
12235 (license license:expat)))
12236
12237 (define-public python2-pathlib
12238 (package-with-python2 python-pathlib))
12239
12240 (define-public python2-pathlib2
12241 (package
12242 (name "python2-pathlib2")
12243 (version "2.3.5")
12244 (source (origin
12245 (method url-fetch)
12246 (uri (pypi-uri "pathlib2" version))
12247 (sha256
12248 (base32
12249 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
12250 (build-system python-build-system)
12251 ;; We only need the the Python 2 variant, since for Python 3 our minimum
12252 ;; version is 3.4 which already includes this package as part of the
12253 ;; standard library.
12254 (arguments
12255 `(#:python ,python-2))
12256 (propagated-inputs
12257 `(("python2-scandir" ,python2-scandir)
12258 ("python2-six" ,python2-six)))
12259 (home-page "https://pypi.org/project/pathlib2/")
12260 (synopsis "Object-oriented file system paths - backport of standard
12261 pathlib module")
12262 (description "The goal of pathlib2 is to provide a backport of standard
12263 pathlib module which tracks the standard library module, so all the newest
12264 features of the standard pathlib can be used also on older Python versions.
12265
12266 Pathlib offers a set of classes to handle file system paths. It offers the
12267 following advantages over using string objects:
12268
12269 @enumerate
12270 @item No more cumbersome use of os and os.path functions. Everything can
12271 be done easily through operators, attribute accesses, and method calls.
12272 @item Embodies the semantics of different path types. For example,
12273 comparing Windows paths ignores casing.
12274 @item Well-defined semantics, eliminating any inconsistencies or
12275 ambiguities (forward vs. backward slashes, etc.).
12276 @end enumerate")
12277 (license license:expat)))
12278
12279 (define-public python2-pathlib2-bootstrap
12280 (hidden-package
12281 (package
12282 (inherit python2-pathlib2)
12283 (name "python2-pathlib2-bootstrap")
12284 (propagated-inputs
12285 `(("python2-scandir" ,python2-scandir)
12286 ("python2-six" ,python2-six-bootstrap))))))
12287
12288 (define-public python-jellyfish
12289 (package
12290 (name "python-jellyfish")
12291 (version "0.5.6")
12292 (source (origin
12293 (method url-fetch)
12294 (uri (pypi-uri "jellyfish" version))
12295 (sha256
12296 (base32
12297 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
12298 (build-system python-build-system)
12299 (native-inputs
12300 `(("python-pytest" ,python-pytest)))
12301 (home-page "https://github.com/jamesturk/jellyfish")
12302 (synopsis "Approximate and phonetic matching of strings")
12303 (description "Jellyfish uses a variety of string comparison and phonetic
12304 encoding algorithms to do fuzzy string matching.")
12305 (license license:bsd-2)
12306 (properties `((python2-variant . ,(delay python2-jellyfish))))))
12307
12308 (define-public python2-jellyfish
12309 (let ((jellyfish (package-with-python2
12310 (strip-python2-variant python-jellyfish))))
12311 (package (inherit jellyfish)
12312 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
12313 ,@(package-native-inputs jellyfish))))))
12314
12315 (define-public python2-unicodecsv
12316 (package
12317 (name "python2-unicodecsv")
12318 (version "0.14.1")
12319 (source (origin
12320 (method git-fetch)
12321 ;; The test suite is not included in the PyPi release.
12322 ;; https://github.com/jdunck/python-unicodecsv/issues/19
12323 (uri (git-reference
12324 (url "https://github.com/jdunck/python-unicodecsv")
12325 (commit version)))
12326 (file-name (git-file-name name version))
12327 (sha256
12328 (base32
12329 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
12330 (build-system python-build-system)
12331 (arguments
12332 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
12333 #:python ,python-2))
12334 (native-inputs
12335 `(("python2-unittest2" ,python2-unittest2)))
12336 (home-page "https://github.com/jdunck/python-unicodecsv")
12337 (synopsis "Unicode CSV module for Python 2")
12338 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
12339 module, adding support for Unicode strings.")
12340 (license license:bsd-2)))
12341
12342 (define-public python-pdfminer-six
12343 (package
12344 (name "python-pdfminer-six")
12345 (version "20201018")
12346 ;; There are no tests in the PyPI tarball.
12347 (source
12348 (origin
12349 (method git-fetch)
12350 (uri (git-reference
12351 (url "https://github.com/pdfminer/pdfminer.six")
12352 (commit version)))
12353 (file-name (git-file-name name version))
12354 (sha256
12355 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
12356 (build-system python-build-system)
12357 (arguments
12358 `(#:phases
12359 (modify-phases %standard-phases
12360 ;; Tests write to the source tree.
12361 (add-after 'unpack 'make-git-checkout-writable
12362 (lambda _
12363 (for-each make-file-writable (find-files "."))
12364 #t))
12365 (replace 'check
12366 (lambda _
12367 (invoke "make" "test")))
12368 (add-before 'reset-gzip-timestamps 'make-files-writable
12369 (lambda* (#:key outputs #:allow-other-keys)
12370 (let ((out (assoc-ref outputs "out")))
12371 (for-each make-file-writable
12372 (find-files out "\\.gz$"))
12373 #t))))))
12374 (propagated-inputs
12375 `(("python-chardet" ,python-chardet)
12376 ("python-cryptography" ,python-cryptography)
12377 ("python-sortedcontainers" ,python-sortedcontainers)))
12378 (native-inputs
12379 `(("python-nose" ,python-nose)
12380 ("python-tox" ,python-tox)))
12381 (home-page "https://github.com/pdfminer/pdfminer.six")
12382 (synopsis "PDF parser and analyzer")
12383 (description "@code{pdfminer.six} is a community maintained fork of
12384 the original PDFMiner. It is a tool for extracting information from PDF
12385 documents. It focuses on getting and analyzing text data. Pdfminer.six
12386 extracts the text from a page directly from the sourcecode of the PDF. It
12387 can also be used to get the exact location, font or color of the text.")
12388 (license license:expat)))
12389
12390 (define-public python-rarfile
12391 (package
12392 (name "python-rarfile")
12393 (version "2.8")
12394 (source (origin
12395 (method url-fetch)
12396 (uri (pypi-uri "rarfile" version))
12397 (sha256
12398 (base32
12399 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
12400 (build-system python-build-system)
12401 (arguments
12402 '(#:phases
12403 (modify-phases %standard-phases
12404 (replace 'check
12405 ;; Many tests fail, but the installation proceeds.
12406 (lambda _ (invoke "make" "-C" "test" "test"))))))
12407 (native-inputs
12408 `(("which" ,which))) ; required for tests
12409 (propagated-inputs
12410 `(("libarchive" ,libarchive)))
12411 (home-page "https://github.com/markokr/rarfile")
12412 (synopsis "RAR archive reader for Python")
12413 (description "This is Python module for RAR archive reading. The interface
12414 is made as zipfile like as possible.")
12415 (license license:isc)))
12416
12417 (define-public python2-rarfile
12418 (package-with-python2 python-rarfile))
12419
12420 (define-public python-magic
12421 (package
12422 (name "python-magic")
12423 (version "0.4.15")
12424 (source
12425 (origin
12426 (method url-fetch)
12427 (uri (pypi-uri "python-magic" version))
12428 (sha256
12429 (base32
12430 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
12431 (file-name (string-append name "-" version "-checkout"))))
12432 (build-system python-build-system)
12433 (arguments
12434 ;; The tests are unreliable, so don't run them. The tests fail
12435 ;; under Python3 because they were written for Python2 and
12436 ;; contain import statements that do not work in Python3. One of
12437 ;; the tests fails under Python2 because its assertions are
12438 ;; overly stringent; it relies on comparing output strings which
12439 ;; are brittle and can change depending on the version of
12440 ;; libmagic being used and the system on which the test is
12441 ;; running. In my case, under GuixSD 0.10.0, only one test
12442 ;; failed, and it seems to have failed only because the version
12443 ;; of libmagic that is packaged in Guix outputs a slightly
12444 ;; different (but not wrong) string than the one that the test
12445 ;; expected.
12446 '(#:tests? #f
12447 #:phases (modify-phases %standard-phases
12448 ;; Replace a specific method call with a hard-coded
12449 ;; path to the necessary libmagic.so file in the
12450 ;; store. If we don't do this, then the method call
12451 ;; will fail to find the libmagic.so file, which in
12452 ;; turn will cause any application using
12453 ;; python-magic to fail.
12454 (add-before 'build 'hard-code-path-to-libmagic
12455 (lambda* (#:key inputs #:allow-other-keys)
12456 (let ((file (assoc-ref inputs "file")))
12457 (substitute* "magic.py"
12458 (("ctypes.util.find_library\\('magic'\\)")
12459 (string-append "'" file "/lib/libmagic.so'")))
12460 #t)))
12461 (add-before 'install 'disable-egg-compression
12462 (lambda _
12463 (let ((port (open-file "setup.cfg" "a")))
12464 (display "\n[easy_install]\nzip_ok = 0\n"
12465 port)
12466 (close-port port)
12467 #t))))))
12468 (inputs
12469 ;; python-magic needs to be able to find libmagic.so.
12470 `(("file" ,file)))
12471 (home-page
12472 "https://github.com/ahupp/python-magic")
12473 (synopsis
12474 "File type identification using libmagic")
12475 (description
12476 "This module uses ctypes to access the libmagic file type
12477 identification library. It makes use of the local magic database and
12478 supports both textual and MIME-type output. Note that this module and
12479 the python-file module both provide a \"magic.py\" file; these two
12480 modules, which are different and were developed separately, both serve
12481 the same purpose: to provide Python bindings for libmagic.")
12482 (license license:expat)))
12483
12484 (define-public python2-magic
12485 (package-with-python2 python-magic))
12486
12487 (define-public python2-s3cmd
12488 (package
12489 (name "python2-s3cmd")
12490 (version "1.6.1")
12491 (source
12492 (origin
12493 (method url-fetch)
12494 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12495 "s3cmd-" version ".tar.gz"))
12496 (sha256
12497 (base32
12498 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12499 (build-system python-build-system)
12500 (arguments
12501 ;; s3cmd is written for python2 only and contains no tests.
12502 `(#:python ,python-2
12503 #:tests? #f))
12504 (propagated-inputs
12505 `(("python2-dateutil" ,python2-dateutil)
12506 ;; The python-file package also provides a magic.py module.
12507 ;; This is an unfortunate state of affairs; however, s3cmd
12508 ;; fails to install if it cannot find specifically the
12509 ;; python-magic package. Thus we include it, instead of using
12510 ;; python-file. Ironically, s3cmd sometimes works better
12511 ;; without libmagic bindings at all:
12512 ;; https://github.com/s3tools/s3cmd/issues/198
12513 ("python2-magic" ,python2-magic)))
12514 (home-page "https://s3tools.org/s3cmd")
12515 (synopsis "Command line tool for S3-compatible storage services")
12516 (description
12517 "S3cmd is a command line tool for uploading, retrieving and managing data
12518 in storage services that are compatible with the Amazon Simple Storage
12519 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12520 GnuPG encryption, and more. It also supports management of Amazon's
12521 CloudFront content delivery network.")
12522 (license license:gpl2+)))
12523
12524 (define-public python-pkgconfig
12525 (package
12526 (name "python-pkgconfig")
12527 (version "1.3.1")
12528 (source
12529 (origin
12530 (method url-fetch)
12531 (uri (pypi-uri "pkgconfig" version))
12532 (sha256
12533 (base32
12534 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
12535 (build-system python-build-system)
12536 (native-inputs
12537 `(("python-nose" ,python-nose)))
12538 (inputs
12539 `(("pkg-config" ,pkg-config)))
12540 (arguments
12541 `(#:phases
12542 (modify-phases %standard-phases
12543 (add-before 'build 'patch
12544 ;; Hard-code the path to pkg-config.
12545 (lambda _
12546 (substitute* "pkgconfig/pkgconfig.py"
12547 (("cmd = 'pkg-config")
12548 (string-append "cmd = '" (which "pkg-config"))))
12549 #t))
12550 (replace 'check
12551 (lambda _
12552 (invoke "nosetests" "test.py"))))))
12553 (home-page "https://github.com/matze/pkgconfig")
12554 (synopsis "Python interface for pkg-config")
12555 (description "This module provides a Python interface to pkg-config. It
12556 can be used to find all pkg-config packages, check if a package exists,
12557 check if a package meets certain version requirements, query CFLAGS and
12558 LDFLAGS and parse the output to build extensions with setup.py.")
12559 (license license:expat)))
12560
12561 (define-public python2-pkgconfig
12562 (package-with-python2 python-pkgconfig))
12563
12564 (define-public python-bz2file
12565 (package
12566 (name "python-bz2file")
12567 (version "0.98")
12568 (source
12569 (origin
12570 (method url-fetch)
12571 (uri (pypi-uri "bz2file" version))
12572 (sha256
12573 (base32
12574 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12575 (build-system python-build-system)
12576 (arguments
12577 `(#:tests? #f)) ; Tests use deprecated python modules.
12578 (home-page "https://github.com/nvawda/bz2file")
12579 (synopsis "Read and write bzip2-compressed files")
12580 (description
12581 "Bz2file is a Python library for reading and writing bzip2-compressed
12582 files. It contains a drop-in replacement for the I/O interface in the
12583 standard library's @code{bz2} module, including features from the latest
12584 development version of CPython that are not available in older releases.")
12585 (license license:asl2.0)))
12586
12587 (define-public python2-bz2file
12588 (package-with-python2 python-bz2file))
12589
12590 (define-public python-future
12591 (package
12592 (name "python-future")
12593 (version "0.17.1")
12594 (source
12595 (origin
12596 (method url-fetch)
12597 (uri (pypi-uri "future" version))
12598 (sha256
12599 (base32
12600 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12601 (build-system python-build-system)
12602 ;; Many tests connect to the network or are otherwise flawed.
12603 ;; https://github.com/PythonCharmers/python-future/issues/210
12604 (arguments
12605 `(#:tests? #f))
12606 (home-page "https://python-future.org")
12607 (synopsis "Single-source support for Python 3 and 2")
12608 (description
12609 "@code{python-future} is the missing compatibility layer between Python 2 and
12610 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12611 to support both Python 2 and Python 3 with minimal overhead.")
12612 (license license:expat)))
12613
12614 (define-public python2-future
12615 (package-with-python2 python-future))
12616
12617 (define-public python-cysignals
12618 (package
12619 (name "python-cysignals")
12620 (version "1.9.0")
12621 (source
12622 (origin
12623 (method url-fetch)
12624 (uri (pypi-uri "cysignals" version))
12625 (sha256
12626 (base32
12627 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12628 (build-system python-build-system)
12629 (native-inputs
12630 `(("python-cython" ,python-cython)
12631 ("python-sphinx" ,python-sphinx)))
12632 (inputs
12633 `(("pari-gp" ,pari-gp)))
12634 (arguments
12635 `(#:modules ((guix build python-build-system)
12636 ((guix build gnu-build-system) #:prefix gnu:)
12637 (guix build utils))
12638 ;; FIXME: Tests are executed after installation and currently fail
12639 ;; when not installing into standard locations; the author is working
12640 ;; on a fix.
12641 #:tests? #f
12642 #:phases
12643 (modify-phases %standard-phases
12644 (add-before
12645 'build 'configure
12646 (assoc-ref gnu:%standard-phases 'configure)))))
12647 (home-page
12648 "https://github.com/sagemath/cysignals")
12649 (synopsis
12650 "Handling of interrupts and signals for Cython")
12651 (description
12652 "The cysignals package provides mechanisms to handle interrupts (and
12653 other signals and errors) in Cython code, using two related approaches,
12654 for mixed Cython/Python code or external C libraries and pure Cython code,
12655 respectively.")
12656 (license license:lgpl3+)))
12657
12658 (define-public python2-cysignals
12659 (package-with-python2 python-cysignals))
12660
12661 (define-public python2-shedskin
12662 (package
12663 (name "python2-shedskin")
12664 (version "0.9.4")
12665 (source
12666 (origin
12667 (method url-fetch)
12668 (uri (string-append "https://github.com/shedskin/shedskin/"
12669 "releases/download/v" version
12670 "/shedskin-" version ".tgz"))
12671 (sha256
12672 (base32
12673 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12674 (build-system python-build-system)
12675 (arguments
12676 `(#:python ,python-2
12677 #:phases (modify-phases %standard-phases
12678 (add-after 'unpack 'fix-resulting-include-libs
12679 (lambda* (#:key inputs #:allow-other-keys)
12680 (let ((libgc (assoc-ref inputs "libgc"))
12681 (pcre (assoc-ref inputs "pcre")))
12682 (substitute* "shedskin/makefile.py"
12683 (("variable == 'CCFLAGS':[ ]*")
12684 (string-append "variable == 'CCFLAGS':\n"
12685 " line += ' -I " pcre "/include"
12686 " -I " libgc "/include'"))
12687 (("variable == 'LFLAGS':[ ]*")
12688 (string-append "variable == 'LFLAGS':\n"
12689 " line += ' -L" pcre "/lib"
12690 " -L " libgc "/lib'")))
12691 #t))))))
12692 (inputs `(("pcre" ,pcre)
12693 ("libgc" ,libgc)))
12694 (home-page "https://shedskin.github.io/")
12695 (synopsis "Experimental Python-2 to C++ Compiler")
12696 (description (string-append "This is an experimental compiler for a subset of
12697 Python. It generates C++ code and a Makefile."))
12698 (license (list license:gpl3 license:bsd-3 license:expat))))
12699
12700 (define-public python2-rope
12701 (package
12702 (name "python2-rope")
12703 (version "0.11.0")
12704 (source
12705 (origin
12706 (method url-fetch)
12707 (uri (pypi-uri "rope" version))
12708 (sha256
12709 (base32
12710 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12711 (arguments
12712 ;; Rope has only partial python3 support, see `python-rope'
12713 `(#:python ,python-2))
12714 (build-system python-build-system)
12715 (native-inputs
12716 `(("python2-unittest2" ,python2-unittest2)))
12717 (home-page "https://github.com/python-rope/rope")
12718 (synopsis "Refactoring library for Python")
12719 (description "Rope is a refactoring library for Python. It facilitates
12720 the renaming, moving and extracting of attributes, functions, modules, fields
12721 and parameters in Python 2 source code. These refactorings can also be applied
12722 to occurrences in strings and comments.")
12723 (license license:gpl2)))
12724
12725 (define-public python-rope
12726 (package
12727 (inherit python2-rope)
12728 (name "python-rope")
12729 (arguments `(#:python ,python-wrapper
12730 ;; XXX: Only partial python3 support, results in some failing
12731 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12732 #:tests? #f))
12733 (properties `((python2-variant . ,(delay python2-rope))))))
12734
12735 (define-public python-py3status
12736 (package
12737 (name "python-py3status")
12738 (version "3.21")
12739 (source
12740 (origin
12741 (method url-fetch)
12742 (uri (pypi-uri "py3status" version))
12743 (sha256
12744 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12745 (build-system python-build-system)
12746 (inputs
12747 `(("file" ,file)))
12748 (arguments
12749 '(#:phases
12750 (modify-phases %standard-phases
12751 ;; 'file' is used for detection of configuration file encoding
12752 ;; let's make link the dependency to particular input
12753 (add-before 'build 'patch-file-path
12754 (lambda* (#:key inputs #:allow-other-keys)
12755 (let ((file-path (assoc-ref inputs "file")))
12756 (substitute* "py3status/parse_config.py"
12757 (("\\[\"file\", \"-b\"")
12758 (string-append "['" file-path "/bin/file', '-b'")))
12759 #t))))
12760 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12761 (home-page "https://github.com/ultrabug/py3status")
12762 (synopsis "Extensible i3status wrapper written in Python")
12763 (description "py3status is an i3status wrapper which extends i3status
12764 functionality in a modular way, allowing you to extend your panel with your
12765 own code, responding to click events and updating clock every second.")
12766 (license license:bsd-3)))
12767
12768 (define-public python2-selectors2
12769 (package
12770 (name "python2-selectors2")
12771 (version "2.0.1")
12772 (source (origin
12773 (method url-fetch)
12774 (uri (pypi-uri "selectors2" version))
12775 (sha256
12776 (base32
12777 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12778 (build-system python-build-system)
12779 (arguments
12780 `(#:python ,python-2))
12781 (native-inputs
12782 `(("python2-mock" ,python2-mock)
12783 ("python2-psutil" ,python2-psutil)))
12784 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12785 (synopsis "Backport of the selectors module from Python 3.5+")
12786 (description
12787 "This package provides a drop-in replacement for the @code{selectors}
12788 module in Python 3.5 and later.")
12789 (license license:expat)))
12790
12791 (define-public python-tblib
12792 (package
12793 (name "python-tblib")
12794 (version "1.6.0")
12795 (source (origin
12796 (method url-fetch)
12797 (uri (pypi-uri "tblib" version))
12798 (sha256
12799 (base32
12800 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12801 (build-system python-build-system)
12802 (arguments
12803 `(#:phases
12804 (modify-phases %standard-phases
12805 (replace 'check
12806 (lambda _
12807 ;; Upstream runs tests after installation and the package itself
12808 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12809 ;; found.
12810 (setenv "PYTHONPATH"
12811 (string-append (getcwd) "/build/lib:"
12812 (getenv "PYTHONPATH")))
12813 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12814 (native-inputs
12815 `(("python-pytest" ,python-pytest)
12816 ("python-six" ,python-six)))
12817 (home-page "https://github.com/ionelmc/python-tblib")
12818 (synopsis "Traceback serialization library")
12819 (description
12820 "Traceback serialization allows you to:
12821
12822 @enumerate
12823 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
12824 different processes. This allows better error handling when running code over
12825 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12826
12827 @item Parse traceback strings and raise with the parsed tracebacks.
12828 @end enumerate\n")
12829 (license license:bsd-3)))
12830
12831 (define-public python2-tblib
12832 (package-with-python2 python-tblib))
12833
12834 (define-public python-greenlet
12835 (package
12836 (name "python-greenlet")
12837 (version "1.0.0")
12838 (source (origin
12839 (method url-fetch)
12840 (uri (pypi-uri "greenlet" version))
12841 (sha256
12842 (base32
12843 "1y6wbg9yhm9dw6m768n4yslp56h85pnxkk3drz6icn15g6f1d7ki"))))
12844 (build-system python-build-system)
12845 (home-page "https://greenlet.readthedocs.io/")
12846 (synopsis "Lightweight in-process concurrent programming")
12847 (description
12848 "Greenlet package is a spin-off of Stackless, a version of CPython
12849 that supports micro-threads called \"tasklets\". Tasklets run
12850 pseudo-concurrently (typically in a single or a few OS-level threads) and
12851 are synchronized with data exchanges on \"channels\".")
12852 (license (list license:psfl license:expat))))
12853
12854 (define-public python-objgraph
12855 (package
12856 (name "python-objgraph")
12857 (version "3.4.1")
12858 (source
12859 (origin
12860 (method url-fetch)
12861 (uri (pypi-uri "objgraph" version))
12862 (sha256
12863 (base32
12864 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
12865 (build-system python-build-system)
12866 (propagated-inputs
12867 `(("python-graphviz" ,python-graphviz)))
12868 (native-inputs
12869 `(("python-mock" ,python-mock)
12870 ("graphviz" ,graphviz)))
12871 (home-page "https://mg.pov.lt/objgraph/")
12872 (synopsis "Draw Python object reference graphs with graphviz")
12873 (description
12874 "This package provides tools to draw Python object reference graphs with
12875 graphviz.")
12876 (license license:expat)))
12877
12878 (define-public python2-objgraph
12879 (package-with-python2 python-objgraph))
12880
12881 (define-public python-gevent
12882 (package
12883 (name "python-gevent")
12884 (version "21.1.2")
12885 (source (origin
12886 (method url-fetch)
12887 (uri (pypi-uri "gevent" version))
12888 (sha256
12889 (base32
12890 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
12891 (modules '((guix build utils)))
12892 (snippet
12893 '(begin
12894 ;; unbunding libev and c-ares
12895 (delete-file-recursively "deps")))))
12896 (build-system python-build-system)
12897 (arguments
12898 `(#:modules ((ice-9 ftw)
12899 (ice-9 match)
12900 (srfi srfi-26)
12901 (guix build utils)
12902 (guix build python-build-system))
12903 #:phases (modify-phases %standard-phases
12904 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
12905 (lambda _
12906 (substitute* "src/gevent/subprocess.py"
12907 (("/bin/sh") (which "sh")))
12908 (for-each (lambda (file)
12909 (substitute* file
12910 (("/bin/sh") (which "sh"))
12911 (("/bin/true") (which "true"))))
12912 (find-files "src/greentest" "\\.py$"))))
12913 (add-before 'build 'do-not-use-bundled-sources
12914 (lambda _
12915 (setenv "GEVENTSETUP_EMBED" "0")
12916
12917 ;; Prevent building bundled libev.
12918 (substitute* "setup.py"
12919 (("run_make=_BUILDING")
12920 "run_make=False"))))
12921 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
12922 (lambda* (#:key inputs #:allow-other-keys)
12923 (let ((greenlet (string-append
12924 (assoc-ref inputs "python-greenlet")
12925 "/include")))
12926 (match (scandir greenlet
12927 (lambda (item)
12928 (string-prefix? "python" item)))
12929 ((python)
12930 (setenv "C_INCLUDE_PATH"
12931 (string-append greenlet "/" python ":"
12932 (or (getenv "C_INCLUDE_PATH")
12933 ""))))))))
12934 (add-before 'check 'pretend-to-be-CI
12935 (lambda _
12936 ;; A few tests are skipped due to network constraints or
12937 ;; get longer timeouts when running in a CI environment.
12938 ;; Piggy-back on that, as we need the same adjustments.
12939 (setenv "TRAVIS" "1")
12940 (setenv "APPVEYOR" "1")))
12941 (add-before 'check 'adjust-tests
12942 (lambda _
12943 (let ((disabled-tests
12944 '(;; These tests relies on networking which is
12945 ;; not available in the build container.
12946 "test__getaddrinfo_import.py"
12947 "test__server_pywsgi.py"
12948 ;; XXX: These tests borrow functionality from the
12949 ;; Python builtin 'test' module, but it is not
12950 ;; installed with the Guix Python distribution.
12951 "test_smtpd.py"
12952 "test_wsgiref.py"
12953 "test_urllib2.py"
12954 "test_thread.py"
12955 "test_threading.py"
12956 "test__threading_2.py"
12957 ;; These tests rely on KeyboardInterrupts which do not
12958 ;; work inside the build container for some reason
12959 ;; (lack of controlling terminal?).
12960 "test_subprocess.py"
12961 "test__issues461_471.py"
12962 ;; TODO: Patch out the tests that use getprotobyname, etc
12963 ;; instead of disabling all the tests from these files.
12964 "test__resolver_dnspython.py"
12965 "test__doctests.py"
12966 "test__all__.py"
12967 "test___config.py"
12968 "test__execmodules.py")))
12969 (call-with-output-file "skipped_tests.txt"
12970 (lambda (port)
12971 (format port "~a~%"
12972 (string-join disabled-tests "\n")))))))
12973 (replace 'check
12974 (lambda _
12975 ;; Make sure the build directory is on PYTHONPATH.
12976 (setenv "PYTHONPATH"
12977 (string-append
12978 (getenv "PYTHONPATH") ":"
12979 (getcwd) "/build/"
12980 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12981
12982 ;; Use the build daemons configured number of workers.
12983 (setenv "NWORKERS" (number->string (parallel-job-count)))
12984
12985 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
12986 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12987 (propagated-inputs
12988 `(("python-greenlet" ,python-greenlet)
12989 ("python-objgraph" ,python-objgraph)
12990 ("python-zope.event" ,python-zope-event)
12991 ("python-zope.interface" ,python-zope-interface)))
12992 (native-inputs
12993 `(("python-six" ,python-six)
12994
12995 ;; For tests.
12996 ("python-dnspython" ,python-dnspython)
12997 ("python-psutil" ,python-psutil)))
12998 (inputs
12999 `(("c-ares" ,c-ares)
13000 ("libev" ,libev)))
13001 (home-page "https://www.gevent.org/")
13002 (synopsis "Coroutine-based network library")
13003 (description
13004 "@code{gevent} is a coroutine-based Python networking library that uses
13005 @code{greenlet} to provide a high-level synchronous API on top of the
13006 @code{libev} event loop.")
13007 (license license:expat)))
13008
13009 (define-public python-fastimport
13010 (package
13011 (name "python-fastimport")
13012 (version "0.9.8")
13013 (source
13014 (origin
13015 (method url-fetch)
13016 (uri (pypi-uri "fastimport" version))
13017 (sha256
13018 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
13019 (build-system python-build-system)
13020 (home-page "https://github.com/jelmer/python-fastimport")
13021 (synopsis "VCS fastimport parser and generator in Python")
13022 (description "This package provides a parser for and generator of the Git
13023 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
13024 format.")
13025 (license license:gpl2+)))
13026
13027 (define-public python2-fastimport
13028 (package-with-python2 python-fastimport))
13029
13030 (define-public python-twisted
13031 (package
13032 (name "python-twisted")
13033 (version "19.7.0")
13034 (source (origin
13035 (method url-fetch)
13036 (uri (pypi-uri "Twisted" version ".tar.bz2"))
13037 (sha256
13038 (base32
13039 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
13040 (build-system python-build-system)
13041 (arguments
13042 '(#:tests? #f)) ; FIXME: some tests fail
13043 (propagated-inputs
13044 `(("python-zope-interface" ,python-zope-interface)
13045 ("python-pyhamcrest" ,python-pyhamcrest)
13046 ("python-incremental" ,python-incremental)
13047 ("python-hyperlink" ,python-hyperlink)
13048 ("python-constantly" ,python-constantly)
13049 ("python-automat" ,python-automat)))
13050 (home-page "https://twistedmatrix.com/")
13051 (synopsis "Asynchronous networking framework written in Python")
13052 (description
13053 "Twisted is an extensible framework for Python programming, with special
13054 focus on event-based network programming and multiprotocol integration.")
13055 (license license:expat)))
13056
13057 (define-public python2-twisted
13058 (package-with-python2 python-twisted))
13059
13060 (define-public python-pika
13061 (package
13062 (name "python-pika")
13063 (version "0.12.0")
13064 (source
13065 (origin
13066 (method url-fetch)
13067 (uri (pypi-uri "pika" version))
13068 (sha256
13069 (base32
13070 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
13071 (build-system python-build-system)
13072 (native-inputs
13073 `(("python-pyev" ,python-pyev)
13074 ("python-tornado" ,python-tornado)
13075 ("python-twisted" ,python-twisted)))
13076 (home-page "https://pika.readthedocs.org")
13077 (synopsis "Pure Python AMQP Client Library")
13078 (description
13079 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
13080 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
13081 network support library.")
13082 (license license:bsd-3)))
13083
13084 (define-public python2-pika
13085 (package-with-python2 python-pika))
13086
13087 (define-public python-ply
13088 (package
13089 (name "python-ply")
13090 (version "3.11")
13091 (source
13092 (origin
13093 (method url-fetch)
13094 (uri (pypi-uri "ply" version))
13095 (sha256
13096 (base32
13097 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
13098 (build-system python-build-system)
13099 (home-page "http://www.dabeaz.com/ply/")
13100 (synopsis "Python Lex & Yacc")
13101 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
13102 It uses LR parsing and does extensive error checking.")
13103 (license license:bsd-3)))
13104
13105 (define-public python-tabulate
13106 (package
13107 (name "python-tabulate")
13108 (version "0.8.7")
13109 (source (origin
13110 (method url-fetch)
13111 (uri (pypi-uri "tabulate" version))
13112 (sha256
13113 (base32
13114 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
13115 (build-system python-build-system)
13116 (arguments
13117 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
13118 ;; and the latest release is not tagged in the upstream repository.
13119 '(#:tests? #f))
13120 (home-page "https://bitbucket.org/astanin/python-tabulate")
13121 (synopsis "Pretty-print tabular data")
13122 (description
13123 "Tabulate is a library and command-line utility to pretty-print tabular
13124 data in Python.")
13125 (license license:expat)))
13126
13127 (define-public python2-tabulate
13128 (package-with-python2 python-tabulate))
13129
13130 (define-public python-kazoo
13131 (package
13132 (name "python-kazoo")
13133 (version "2.4.0")
13134 (source
13135 (origin
13136 (method url-fetch)
13137 (uri (pypi-uri "kazoo" version))
13138 (sha256
13139 (base32
13140 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
13141 (build-system python-build-system)
13142 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
13143 (propagated-inputs
13144 `(("python-six" ,python-six)))
13145 (home-page "https://kazoo.readthedocs.org")
13146 (synopsis "High-level Zookeeper client library")
13147 (description
13148 "Kazoo is a Python client library for the Apache Zookeeper distributed
13149 application service. It is designed to be easy to use and to avoid common
13150 programming errors.")
13151 (license license:asl2.0)))
13152
13153 (define-public python2-kazoo
13154 (package-with-python2 python-kazoo))
13155
13156 (define-public python-pykafka
13157 (package
13158 (name "python-pykafka")
13159 (version "2.4.0")
13160 (source (origin
13161 (method url-fetch)
13162 (uri (pypi-uri "pykafka" version))
13163 (sha256
13164 (base32
13165 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
13166 (build-system python-build-system)
13167 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
13168 (propagated-inputs
13169 `(("python-gevent" ,python-gevent)
13170 ("python-kazoo" ,python-kazoo)
13171 ("python-tabulate" ,python-tabulate)))
13172 (inputs
13173 `(("librdkafka" ,librdkafka)))
13174 (home-page "https://pykafka.readthedocs.io/")
13175 (synopsis "Apache Kafka client for Python")
13176 (description
13177 "PyKafka is a client for the Apache Kafka distributed messaging system.
13178 It includes Python implementations of Kafka producers and consumers, which
13179 are optionally backed by a C extension built on librdkafka.")
13180 (license license:asl2.0)))
13181
13182 (define-public python-wcwidth
13183 (package
13184 (name "python-wcwidth")
13185 (version "0.1.8")
13186 (source (origin
13187 (method url-fetch)
13188 (uri (pypi-uri "wcwidth" version))
13189 (sha256
13190 (base32
13191 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
13192 (build-system python-build-system)
13193 (home-page "https://github.com/jquast/wcwidth")
13194 (synopsis "Measure number of terminal column cells of wide-character codes")
13195 (description "Wcwidth measures the number of terminal column cells of
13196 wide-character codes. It is useful for those implementing a terminal emulator,
13197 or programs that carefully produce output to be interpreted by one. It is a
13198 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
13199 specified in POSIX.1-2001 and POSIX.1-2008.")
13200 (license license:expat)))
13201
13202 (define-public python2-wcwidth
13203 (package-with-python2 python-wcwidth))
13204
13205 (define-public python2-jsonrpclib
13206 (package
13207 (name "python2-jsonrpclib")
13208 (version "0.1.7")
13209 (source (origin
13210 (method url-fetch)
13211 (uri (pypi-uri "jsonrpclib" version))
13212 (sha256
13213 (base32
13214 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
13215 (build-system python-build-system)
13216 (arguments
13217 `(#:tests? #f
13218 #:python ,python-2))
13219 (home-page "https://github.com/joshmarshall/jsonrpclib/")
13220 (synopsis "Implementation of JSON-RPC specification for Python")
13221 (description
13222 "This library is an implementation of the JSON-RPC specification.
13223 It supports both the original 1.0 specification, as well as the
13224 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
13225 etc.")
13226 (license license:asl2.0)))
13227
13228 (define-public python-chai
13229 (package
13230 (name "python-chai")
13231 (version "1.1.2")
13232 (source (origin
13233 (method url-fetch)
13234 (uri (pypi-uri "chai" version))
13235 (sha256
13236 (base32
13237 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
13238 (build-system python-build-system)
13239 (home-page "https://github.com/agoragames/chai")
13240 (synopsis "Mocking framework for Python")
13241 (description
13242 "Chai provides an api for mocking, stubbing and spying your python
13243 objects, patterned after the Mocha library for Ruby.")
13244 (license license:bsd-3)))
13245
13246 (define-public python2-chai
13247 (package-with-python2 python-chai))
13248
13249 (define-public python-inflection
13250 (package
13251 (name "python-inflection")
13252 (version "0.3.1")
13253 (source
13254 (origin (method url-fetch)
13255 (uri (pypi-uri "inflection" version))
13256 (sha256
13257 (base32
13258 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
13259 (build-system python-build-system)
13260 (native-inputs
13261 `(("python-pytest" ,python-pytest)))
13262 (home-page "https://github.com/jpvanhal/inflection")
13263 (synopsis "Python string transformation library")
13264 (description
13265 "Inflection is a string transformation library. It singularizes
13266 and pluralizes English words, and transforms strings from CamelCase to
13267 underscored string.")
13268 (license license:expat)))
13269
13270 (define-public python2-inflection
13271 (package-with-python2 python-inflection))
13272
13273 (define-public python-pylev
13274 (package
13275 (name "python-pylev")
13276 (version "1.3.0")
13277 (source (origin
13278 (method url-fetch)
13279 (uri (pypi-uri "pylev" version))
13280 (sha256
13281 (base32
13282 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
13283 (build-system python-build-system)
13284 (home-page "https://github.com/toastdriven/pylev")
13285 (synopsis "Levenshtein distance implementation in Python")
13286 (description "Pure Python Levenshtein implementation, based off the
13287 Wikipedia code samples at
13288 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
13289 (license license:bsd-3)))
13290
13291 (define-public python2-pylev
13292 (package-with-python2 python-pylev))
13293
13294 (define-public python-cleo
13295 (package
13296 (name "python-cleo")
13297 (version "0.8.1")
13298 (source (origin
13299 (method url-fetch)
13300 (uri (pypi-uri "cleo" version))
13301 (sha256
13302 (base32
13303 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
13304 (build-system python-build-system)
13305 (native-inputs
13306 `( ;; For testing
13307 ("python-mock" ,python-mock)
13308 ("python-pytest-mock" ,python-pytest-mock)
13309 ("python-pytest" ,python-pytest)))
13310 (propagated-inputs
13311 `(("python-backpack" ,python-backpack)
13312 ("python-clikit" ,python-clikit)
13313 ("python-pastel" ,python-pastel)
13314 ("python-pylev" ,python-pylev)))
13315 (home-page "https://github.com/sdispater/cleo")
13316 (synopsis "Command-line arguments library for Python")
13317 (description
13318 "Cleo allows you to create command-line commands with signature in
13319 docstring and colored output.")
13320 (license license:expat)))
13321
13322 (define-public python2-cleo
13323 (package-with-python2 python-cleo))
13324
13325 (define-public python-tomlkit
13326 (package
13327 (name "python-tomlkit")
13328 (version "0.7.0")
13329 (source
13330 (origin
13331 (method url-fetch)
13332 (uri (pypi-uri "tomlkit" version))
13333 (sha256
13334 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
13335 (build-system python-build-system)
13336 (native-inputs
13337 `(("python-pytest" ,python-pytest)
13338 ("python-pyyaml" ,python-pyyaml)))
13339 (home-page "https://github.com/sdispater/tomlkit")
13340 (synopsis "Style-preserving TOML library")
13341 (description
13342 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
13343 preserves all comments, indentations, whitespace and internal element ordering,
13344 and makes them accessible and editable via an intuitive API. It can also
13345 create new TOML documents from scratch using the provided helpers. Part of the
13346 implementation has been adapted, improved, and fixed from Molten.")
13347 (license license:expat)))
13348
13349 (define-public python-shellingham
13350 (package
13351 (name "python-shellingham")
13352 (version "1.3.2")
13353 (source
13354 (origin
13355 (method url-fetch)
13356 (uri (pypi-uri "shellingham" version))
13357 (sha256
13358 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
13359 (build-system python-build-system)
13360 (arguments
13361 `(#:phases
13362 (modify-phases %standard-phases
13363 (add-after 'unpack 'restore-setup.py
13364 ;; setup.py will return in the next release.
13365 ;; <https://github.com/sarugaku/shellingham/issues/33>
13366 (lambda _
13367 (with-output-to-file "setup.py"
13368 (lambda _
13369 (display "from setuptools import setup\nsetup()\n")))
13370 #t)))))
13371 (home-page "https://github.com/sarugaku/shellingham")
13372 (synopsis "Tool to detect surrounding shell")
13373 (description
13374 "Shellingham detects what shell the current Python executable is
13375 running in.")
13376 (license license:isc)))
13377
13378 (define-public python-memcached
13379 (package
13380 (name "python-memcached")
13381 (version "1.59")
13382 (source
13383 (origin
13384 (method url-fetch)
13385 (uri (pypi-uri "python-memcached" version))
13386 (sha256
13387 (base32
13388 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13389 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13390 (build-system python-build-system)
13391 (propagated-inputs `(("python-six" ,python-six)))
13392 (home-page
13393 "https://github.com/linsomniac/python-memcached")
13394 (synopsis "Pure python memcached client")
13395 (description
13396 "This software is a pure Python interface to the memcached memory cache
13397 daemon. It is the client side software which allows storing values in one or
13398 more, possibly remote, memcached servers.")
13399 (license license:psfl)))
13400
13401 (define-public python-clikit
13402 (package
13403 (name "python-clikit")
13404 (version "0.6.2")
13405 (source
13406 (origin
13407 (method url-fetch)
13408 (uri (pypi-uri "clikit" version))
13409 (sha256
13410 (base32
13411 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13412 (build-system python-build-system)
13413 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13414 (propagated-inputs
13415 `(("python-crashtest" ,python-crashtest)
13416 ("python-pastel" ,python-pastel)
13417 ("python-pylev" ,python-pylev)))
13418 (home-page "https://github.com/sdispater/clikit")
13419 (synopsis "Group of utilities to build command line interfaces")
13420 (description
13421 "CliKit is a group of utilities to build testable command line
13422 interfaces.")
13423 (properties `((python2-variant . ,(delay python2-clikit))))
13424 (license license:expat)))
13425
13426 (define-public python2-clikit
13427 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13428 (package/inherit
13429 base
13430 (propagated-inputs
13431 `(("python-enum34" ,python2-enum34)
13432 ("python-typing" ,python2-typing)
13433 ,@(package-propagated-inputs base))))))
13434
13435 (define-public python-msgpack-python
13436 (package
13437 (name "python-msgpack-python")
13438 (version "0.5.6")
13439 (source
13440 (origin
13441 (method url-fetch)
13442 (uri (pypi-uri "msgpack-python" version))
13443 (sha256
13444 (base32
13445 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13446 (build-system python-build-system)
13447 (home-page "https://msgpack.org/")
13448 (synopsis "Package to deserialize messages in MessagePack binary format")
13449 (description
13450 "MessagePack is an efficient binary serialization format. It lets you
13451 exchange data among multiple languages like JSON. But it's faster and
13452 smaller. Small integers are encoded into a single byte, and typical short
13453 strings require only one extra byte in addition to the strings themselves.")
13454 (license license:asl2.0)))
13455
13456 (define-public python-cachy
13457 (package
13458 (name "python-cachy")
13459 (version "0.3.0")
13460 (source
13461 (origin
13462 (method url-fetch)
13463 (uri (pypi-uri "cachy" version))
13464 (sha256
13465 (base32
13466 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13467 (build-system python-build-system)
13468 (arguments
13469 '(#:phases
13470 (modify-phases %standard-phases
13471 (replace 'check
13472 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13473 "pytest"))))))
13474 (native-inputs
13475 `(("memcached" ,memcached)
13476 ("python-fakeredis" ,python-fakeredis)
13477 ("python-flexmock" ,python-flexmock)
13478 ("python-pifpaf" ,python-pifpaf)
13479 ("python-pytest" ,python-pytest)))
13480 (propagated-inputs
13481 `(("python-memcached" ,python-memcached)
13482 ("python-msgpack-python" ,python-msgpack-python)
13483 ("python-redis" ,python-redis)))
13484 (home-page "https://github.com/sdispater/cachy")
13485 (synopsis "Simple yet effective caching library")
13486 (description
13487 "Cachy provides a simple yet effective caching library. A simple but
13488 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13489 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13490 (license license:expat)))
13491
13492 (define-public poetry
13493 (package
13494 (name "poetry")
13495 (version "1.1.4")
13496 ;; Poetry can only be built from source with Poetry.
13497 (source
13498 (origin
13499 (method url-fetch)
13500 (uri (pypi-uri "poetry" version))
13501 (sha256
13502 (base32
13503 "1a2kgfiw66fvxhlqk5qc83s6l38czfh5hcsrbiy7qq5yfc8mlsll"))))
13504 (build-system python-build-system)
13505 (arguments
13506 `(#:tests? #f ;; Pypi does not have tests.
13507 #:phases
13508 (modify-phases %standard-phases
13509 (add-before 'build 'patch-setup-py
13510 (lambda _
13511 (substitute* "setup.py"
13512 ;; Allow newer versions of python-keyring.
13513 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
13514 ;; TODO: remove after the next release cycle,
13515 ;; when packaging has been updated.
13516 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
13517 #t)))))
13518 (propagated-inputs
13519 `(("python-cachecontrol" ,python-cachecontrol)
13520 ("python-cachy" ,python-cachy)
13521 ("python-cleo" ,python-cleo)
13522 ("python-clikit" ,python-clikit)
13523 ("python-html5lib" ,python-html5lib)
13524 ("python-keyring" ,python-keyring)
13525 ("python-msgpack-transitional" ,python-msgpack-transitional)
13526 ("python-packaging" ,python-packaging)
13527 ("python-pexpect" ,python-pexpect)
13528 ("python-pip" ,python-pip)
13529 ("python-pkginfo" ,python-pkginfo)
13530 ("python-poetry-core" ,python-poetry-core)
13531 ("python-requests" ,python-requests)
13532 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
13533 ("python-shellingham" ,python-shellingham)
13534 ("python-tomlkit" ,python-tomlkit)
13535 ("python-virtualenv" ,python-virtualenv)))
13536 (home-page "https://python-poetry.org")
13537 (synopsis "Python dependency management and packaging made easy")
13538 (description "Poetry is a tool for dependency management and packaging
13539 in Python. It allows you to declare the libraries your project depends on and
13540 it will manage (install/update) them for you.")
13541 (license license:expat)))
13542
13543 (define-public python-lark-parser
13544 (package
13545 (name "python-lark-parser")
13546 (version "0.9.0")
13547 (source (origin
13548 (method url-fetch)
13549 (uri (pypi-uri "lark-parser" version))
13550 (sha256
13551 (base32
13552 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13553 (build-system python-build-system)
13554 (home-page "https://github.com/lark-parser/lark")
13555 (synopsis "Multi-language parser for Python")
13556 (description
13557 "Lark is a parser built with a focus on ergonomics, performance and
13558 resilience. Lark can parse all context-free languages. That means it is
13559 capable of parsing almost any programming language out there, and to
13560 some degree most natural languages too.")
13561 (license license:expat)))
13562
13563 (define-public python-libcst
13564 (package
13565 (name "python-libcst")
13566 (version "0.3.8")
13567 (source (origin
13568 (method url-fetch)
13569 (uri (pypi-uri "libcst" version))
13570 (sha256
13571 (base32
13572 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13573 (build-system python-build-system)
13574 (arguments
13575 `(#:phases
13576 (modify-phases %standard-phases
13577 (add-after 'unpack 'remove-failing-tests
13578 (lambda _
13579 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13580 (delete-file "libcst/tests/test_fuzz.py")
13581 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13582 (delete-file "libcst/tests/test_pyre_integration.py")
13583 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13584 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13585 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13586 #t))
13587 (add-before 'check 'generate-test-data
13588 (lambda _
13589 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13590 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13591 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13592 (replace 'check
13593 (lambda _
13594 (invoke "python" "-m" "unittest")
13595 #t)))))
13596 (native-inputs
13597 `(("python-black" ,python-black)
13598 ("python-isort" ,python-isort)))
13599 (propagated-inputs
13600 `(("python-typing-extensions" ,python-typing-extensions)
13601 ("python-typing-inspect" ,python-typing-inspect)
13602 ("python-pyyaml" ,python-pyyaml)))
13603 (home-page "https://github.com/Instagram/LibCST")
13604 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13605 (description
13606 "LibCST parses Python source code as a CST tree that keeps all
13607 formatting details (comments, whitespaces, parentheses, etc). It's useful
13608 for building automated refactoring (codemod) applications and linters.
13609 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13610 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13611 naming node types and fields, LibCST creates a lossless CST that looks and
13612 feels like an AST.")
13613 (license (list license:expat
13614 ;; Some files unde libcst/_parser/ are under Python Software
13615 ;; Foundation license (see LICENSE file for details)
13616 license:psfl
13617 ;; libcst/_add_slots.py
13618 license:asl2.0))))
13619
13620 (define-public python-typing-inspect
13621 (package
13622 (name "python-typing-inspect")
13623 (version "0.6.0")
13624 (source (origin
13625 (method url-fetch)
13626 (uri (pypi-uri "typing_inspect" version))
13627 (sha256
13628 (base32
13629 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13630 (build-system python-build-system)
13631 (propagated-inputs
13632 `(("python-mypy-extensions" ,python-mypy-extensions)
13633 ("python-typing-extensions" ,python-typing-extensions)))
13634 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13635 (synopsis "API for inspection of types in the Python @code{typing} module")
13636 (description
13637 "The @code{typing_inspect} module defines experimental API for runtime
13638 inspection of types defined in the Python standard typing module.")
13639 (license license:expat)))
13640
13641 (define-public python-lazy-object-proxy
13642 (package
13643 (name "python-lazy-object-proxy")
13644 (version "1.5.1")
13645 (source (origin
13646 (method url-fetch)
13647 (uri (pypi-uri "lazy-object-proxy" version))
13648 (sha256
13649 (base32
13650 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13651 (native-inputs
13652 `(("python-setuptools-scm" ,python-setuptools-scm)))
13653 (build-system python-build-system)
13654 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13655 (synopsis "Lazy object proxy for python")
13656 (description
13657 "Lazy object proxy is an object that wraps a callable but defers the call
13658 until the object is actually required, and caches the result of said call.")
13659 (license license:bsd-2)))
13660
13661 (define-public python2-lazy-object-proxy
13662 (package-with-python2 python-lazy-object-proxy))
13663
13664 (define-public python-dnspython
13665 (package
13666 (name "python-dnspython")
13667 (version "2.0.0")
13668 (source (origin
13669 (method url-fetch)
13670 (uri (pypi-uri "dnspython" version ".zip"))
13671 (sha256
13672 (base32
13673 "1dyip5ygqqhrgcaiy7qzjpndl9xciip186paxqwkm726fj9z0jh4"))))
13674 (build-system python-build-system)
13675 (native-inputs `(("unzip" ,unzip)))
13676 (arguments '(#:tests? #f)) ; XXX: requires internet access
13677 (home-page "https://www.dnspython.org")
13678 (synopsis "DNS toolkit for Python")
13679 (description
13680 "dnspython is a DNS toolkit for Python. It supports almost all record
13681 types. It can be used for queries, zone transfers, and dynamic updates.
13682 It supports TSIG authenticated messages and EDNS0.")
13683 (license license:expat)))
13684
13685 (define-public python-dnspython-1.16
13686 (package
13687 (inherit python-dnspython)
13688 (version "1.16.0")
13689 (source (origin
13690 (method url-fetch)
13691 (uri (string-append "http://www.dnspython.org/kits/"
13692 version "/dnspython-" version ".tar.gz"))
13693 (sha256
13694 (base32
13695 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13696 (native-inputs '())))
13697
13698 (define-public python2-dnspython-1.16
13699 (package-with-python2 python-dnspython-1.16))
13700
13701 (define-public python-py3dns
13702 (package
13703 (name "python-py3dns")
13704 (version "3.2.1")
13705 (source
13706 (origin
13707 (method url-fetch)
13708 (uri (pypi-uri "py3dns" version))
13709 (sha256
13710 (base32
13711 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13712 (build-system python-build-system)
13713 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13714 ;; removing functionality so we copy from Nix and "just don't build it".
13715 (arguments
13716 `(#:phases
13717 (modify-phases %standard-phases
13718 (add-after 'unpack 'patch-source
13719 (lambda _
13720 (substitute* "setup.py"
13721 (("import DNS") "")
13722 (("DNS.__version__") (string-append "\"" ,version "\"")))
13723 #t)))
13724 #:tests? #f)) ; Also skip the tests.
13725 (home-page "https://launchpad.net/py3dns")
13726 (synopsis "Python 3 DNS library")
13727 (description "This Python 3 module provides a DNS API for looking up DNS
13728 entries from within Python 3 modules and applications. This module is a
13729 simple, lightweight implementation.")
13730 (license license:psfl)))
13731
13732 (define-public python-email-validator
13733 (package
13734 (name "python-email-validator")
13735 (version "1.0.2")
13736 (source
13737 (origin (method url-fetch)
13738 (uri (pypi-uri "email_validator" version))
13739 (sha256
13740 (base32
13741 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13742 (build-system python-build-system)
13743 (arguments
13744 '(#:phases
13745 (modify-phases %standard-phases
13746 (add-before 'build 'use-dnspython
13747 (lambda _
13748 (substitute* "setup.py"
13749 (("dnspython3") "dnspython"))
13750 #t)))))
13751 (propagated-inputs
13752 `(("python-dnspython" ,python-dnspython)
13753 ("python-idna" ,python-idna)))
13754 (home-page "https://github.com/JoshData/python-email-validator")
13755 (synopsis "Email address validation library for Python")
13756 (description
13757 "This library validates email address syntax and deliverability.")
13758 (license license:cc0)))
13759
13760 (define-public python2-email-validator
13761 (package-with-python2 python-email-validator))
13762
13763 (define-public python-ukpostcodeparser
13764 (package
13765 (name "python-ukpostcodeparser")
13766 (version "1.0.3")
13767 (source (origin
13768 (method url-fetch)
13769 (uri (pypi-uri "UkPostcodeParser" version))
13770 (sha256
13771 (base32
13772 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13773 (build-system python-build-system)
13774 (home-page "https://github.com/hamstah/ukpostcodeparser")
13775 (synopsis "UK Postcode parser for Python")
13776 (description
13777 "This library provides the @code{parse_uk_postcode} function for
13778 parsing UK postcodes.")
13779 (license license:expat)))
13780
13781 (define-public python2-ukpostcodeparser
13782 (package-with-python2 python-ukpostcodeparser))
13783
13784 (define-public python-faker
13785 (package
13786 (name "python-faker")
13787 (version "4.0.2")
13788 (source (origin
13789 (method url-fetch)
13790 (uri (pypi-uri "Faker" version))
13791 (sha256
13792 (base32
13793 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13794 (build-system python-build-system)
13795 (arguments
13796 '(#:phases
13797 (modify-phases %standard-phases
13798 (replace 'check
13799 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13800 (native-inputs
13801 `(;; For testing
13802 ("python-freezegun" ,python-freezegun)
13803 ("python-pytest" ,python-pytest)
13804 ("python-random2" ,python-random2)
13805 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13806 ("python-validators" ,python-validators)))
13807 (propagated-inputs
13808 `(("python-dateutil" ,python-dateutil)
13809 ("python-text-unidecode" ,python-text-unidecode)))
13810 (home-page "https://github.com/joke2k/faker")
13811 (synopsis "Python package that generates fake data")
13812 (description
13813 "Faker is a Python package that generates fake data such as names,
13814 addresses, and phone numbers.")
13815 (license license:expat)
13816 (properties `((python2-variant . ,(delay python2-faker))))))
13817
13818 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13819 (define-public python2-faker
13820 (let ((base (package-with-python2 (strip-python2-variant
13821 python-faker))))
13822 (package
13823 (inherit base)
13824 (version "3.0.1")
13825 (source (origin
13826 (method url-fetch)
13827 (uri (pypi-uri "Faker" version))
13828 (sha256
13829 (base32
13830 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13831 (native-inputs
13832 `(("python-mock" ,python2-mock)
13833 ,@(package-native-inputs base)))
13834 (propagated-inputs
13835 `(("python2-ipaddress" ,python2-ipaddress)
13836 ("python2-six" ,python2-six)
13837 ,@(package-propagated-inputs base))))))
13838
13839 (define-public python-pyaml
13840 (package
13841 (name "python-pyaml")
13842 (version "18.11.0")
13843 (source (origin
13844 (method url-fetch)
13845 (uri (pypi-uri "pyaml" version))
13846 (sha256
13847 (base32
13848 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13849 (build-system python-build-system)
13850 (native-inputs
13851 `(("python-unidecode" ,python-unidecode)))
13852 (propagated-inputs
13853 `(("python-pyyaml" ,python-pyyaml)))
13854 (home-page "https://github.com/mk-fg/pretty-yaml")
13855 (synopsis "YAML pretty-print library for Python")
13856 (description
13857 "pyaml is a PyYAML based python module to produce pretty and readable
13858 YAML-serialized data.")
13859 (license license:wtfpl2)))
13860
13861 (define-public python2-pyaml
13862 (package-with-python2 python-pyaml))
13863
13864 (define-public python-backpack
13865 (package
13866 (name "python-backpack")
13867 (version "0.1")
13868 (source
13869 (origin
13870 (method url-fetch)
13871 (uri (pypi-uri "backpack" version))
13872 (sha256
13873 (base32
13874 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13875 (build-system python-build-system)
13876 (native-inputs
13877 `(("python-pytest" ,python-pytest)
13878 ("python-nose" ,python-nose)))
13879 (propagated-inputs
13880 `(("python-simplejson" ,python-simplejson)))
13881 (home-page "https://github.com/sdispater/backpack")
13882 (synopsis "Utilities for working with Python collections")
13883 (description "Backpack provides some useful utilities for working with
13884 collections of data.")
13885 (license license:expat)))
13886
13887 (define-public python2-backpack
13888 (package-with-python2 python-backpack))
13889
13890 (define-public python-prompt-toolkit
13891 (package
13892 (name "python-prompt-toolkit")
13893 (version "3.0.9")
13894 (source
13895 (origin
13896 (method url-fetch)
13897 (uri (pypi-uri "prompt_toolkit" version))
13898 (sha256
13899 (base32 "0bvjp62cs6aj9lrh7njzxdjgg8pjfw3qgmr551243d9ivmcapvn5"))))
13900 (build-system python-build-system)
13901 (arguments
13902 `(#:phases
13903 (modify-phases %standard-phases
13904 (delete 'check)
13905 (add-after 'install 'post-install-check
13906 (lambda* (#:key inputs outputs #:allow-other-keys)
13907 ;; HOME is needed for the test
13908 ;; "test_pathcompleter_can_expanduser".
13909 (setenv "HOME" "/tmp")
13910 (add-installed-pythonpath inputs outputs)
13911 (invoke "py.test"))))))
13912 (propagated-inputs
13913 `(("python-wcwidth" ,python-wcwidth)))
13914 (native-inputs
13915 `(("python-pytest" ,python-pytest)))
13916 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
13917 (synopsis "Library for building command line interfaces in Python")
13918 (description
13919 "Prompt-Toolkit is a library for building interactive command line
13920 interfaces in Python. It's like GNU Readline but it also features syntax
13921 highlighting while typing, out-of-the-box multi-line input editing, advanced
13922 code completion, incremental search, support for Chinese double-width
13923 characters, mouse support, and auto suggestions.")
13924 (license license:bsd-3)
13925 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
13926
13927 (define-public python-prompt-toolkit-2
13928 (package (inherit python-prompt-toolkit)
13929 (name "python-prompt-toolkit")
13930 (version "2.0.7")
13931 (source
13932 (origin
13933 (method url-fetch)
13934 (uri (pypi-uri "prompt_toolkit" version))
13935 (sha256
13936 (base32
13937 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13938 (propagated-inputs
13939 `(("python-wcwidth" ,python-wcwidth)
13940 ("python-six" ,python-six)
13941 ("python-pygments" ,python-pygments)))
13942 (properties '())))
13943
13944 (define-public python2-prompt-toolkit
13945 (package-with-python2 python-prompt-toolkit-2))
13946
13947 (define-public python-prompt-toolkit-1
13948 (package (inherit python-prompt-toolkit-2)
13949 (version "1.0.15")
13950 (source
13951 (origin
13952 (method url-fetch)
13953 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13954 (sha256
13955 (base32
13956 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13957
13958 (define-public python2-prompt-toolkit-1
13959 (package-with-python2 python-prompt-toolkit-1))
13960
13961 (define-public python-jedi
13962 (package
13963 (name "python-jedi")
13964 (version "0.17.2")
13965 (source
13966 (origin
13967 (method url-fetch)
13968 (uri (pypi-uri "jedi" version))
13969 (sha256
13970 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13971 (build-system python-build-system)
13972 (arguments
13973 `(#:phases
13974 (modify-phases %standard-phases
13975 (replace 'check
13976 (lambda* (#:key tests? #:allow-other-keys)
13977 (when tests?
13978 (setenv "HOME" "/tmp")
13979 (invoke "python" "-m" "pytest" "-vv"))
13980 #t)))))
13981 (native-inputs
13982 `(("python-pytest" ,python-pytest)
13983 ("python-docopt" ,python-docopt)))
13984 (propagated-inputs
13985 `(("python-parso" ,python-parso)))
13986 (home-page "https://github.com/davidhalter/jedi")
13987 (synopsis "Autocompletion and static analysis library for Python")
13988 (description
13989 "Jedi is a static analysis tool for Python that can be used in Integrated
13990 Development Environments (@dfn{IDE}s) and text editors. It understands Python
13991 on a deeper level than many other static analysis frameworks for Python.
13992
13993 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13994 well.")
13995 (license license:expat)))
13996
13997 (define-public python2-jedi
13998 (package-with-python2 python-jedi))
13999
14000 (define-public ptpython
14001 (package
14002 (name "ptpython")
14003 (version "3.0.5")
14004 (source (origin
14005 (method url-fetch)
14006 (uri (pypi-uri "ptpython" version))
14007 (sha256
14008 (base32
14009 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
14010 (build-system python-build-system)
14011 (arguments
14012 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
14013 (propagated-inputs
14014 `(("python-appdirs" ,python-appdirs)
14015 ("python-jedi" ,python-jedi)
14016 ("python-prompt-toolkit" ,python-prompt-toolkit)
14017 ("python-pygments" ,python-pygments)))
14018 (home-page "https://github.com/jonathanslenders/ptpython")
14019 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
14020 (description
14021 "ptpython is a Python read-eval-print loop with IDE-like features.
14022 It supports syntax highlighting, multiline editing, autocompletion, mouse,
14023 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
14024 etc.")
14025 (license license:bsd-3)
14026 (properties `((python2-variant . ,(delay ptpython-2))))))
14027
14028 (define-public ptpython-2
14029 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
14030 (package
14031 (inherit base)
14032 (name "ptpython2"))))
14033
14034 (define-public python-stem
14035 (package
14036 (name "python-stem")
14037 (version "1.8.0")
14038 (source
14039 (origin
14040 (method url-fetch)
14041 (uri (pypi-uri "stem" version))
14042 (sha256
14043 (base32
14044 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
14045 (build-system python-build-system)
14046 (arguments
14047 `(#:phases
14048 (modify-phases %standard-phases
14049 (replace 'check
14050 (lambda _
14051 (invoke "./run_tests.py" "--unit")
14052 #t)))))
14053 (native-inputs
14054 `(("python-mock" ,python-mock)
14055 ("python-pycodestyle" ,python-pycodestyle)
14056 ("python-pyflakes" ,python-pyflakes)))
14057 (home-page "https://stem.torproject.org/")
14058 (synopsis
14059 "Python controller library that allows applications to interact with Tor")
14060 (description
14061 "Stem is a Python controller library for Tor. With it you can use Tor's
14062 control protocol to script against the Tor process and read descriptor data
14063 relays publish about themselves.")
14064 (license license:lgpl3)))
14065
14066 (define-public python2-stem
14067 (package-with-python2 python-stem))
14068
14069 (define-public python-pyserial
14070 (package
14071 (name "python-pyserial")
14072 (version "3.4")
14073 (source
14074 (origin
14075 (method url-fetch)
14076 (uri (pypi-uri "pyserial" version))
14077 (sha256
14078 (base32
14079 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
14080 (build-system python-build-system)
14081 (arguments
14082 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
14083 ;; #:phases
14084 ;; (modify-phases %standard-phases
14085 ;; (replace 'check
14086 ;; (lambda _
14087 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
14088 (home-page
14089 "https://github.com/pyserial/pyserial")
14090 (synopsis "Python Serial Port Bindings")
14091 (description "@code{pyserial} provide serial port bindings for Python. It
14092 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
14093 and/or Xon/Xoff. The port is accessed in RAW mode.")
14094 (license license:bsd-3)))
14095
14096 (define-public python2-pyserial
14097 (package-with-python2 python-pyserial))
14098
14099 (define-public python-kivy
14100 (package
14101 (name "python-kivy")
14102 (version "1.10.1")
14103 (source
14104 (origin
14105 (method url-fetch)
14106 (uri (pypi-uri "Kivy" version))
14107 (file-name (string-append name "-" version ".tar.gz"))
14108 (sha256
14109 (base32
14110 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
14111 (build-system python-build-system)
14112 (arguments
14113 `(#:tests? #f ; Tests require many optional packages
14114 #:phases
14115 (modify-phases %standard-phases
14116 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
14117 (lambda* (#:key inputs #:allow-other-keys)
14118 (setenv "KIVY_SDL2_PATH"
14119 (string-append (assoc-ref inputs "sdl-union")
14120 "/include/SDL2"))
14121 #t)))))
14122 (native-inputs
14123 `(("pkg-config" ,pkg-config)
14124 ("python-cython" ,python-cython)))
14125 (inputs
14126 `(("gstreamer" ,gstreamer)
14127 ("mesa" ,mesa)
14128 ("sdl-union"
14129 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
14130 (home-page "https://kivy.org")
14131 (synopsis
14132 "Multitouch application framework")
14133 (description
14134 "A software library for rapid development of
14135 hardware-accelerated multitouch applications.")
14136 (license license:expat)))
14137
14138 (define-public python2-kivy
14139 (package-with-python2 python-kivy))
14140
14141 (define-public python-binaryornot
14142 (package
14143 (name "python-binaryornot")
14144 (version "0.4.4")
14145 (source (origin
14146 (method url-fetch)
14147 (uri (pypi-uri "binaryornot" version))
14148 (sha256
14149 (base32
14150 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
14151 (build-system python-build-system)
14152 (arguments
14153 `(#:phases
14154 (modify-phases %standard-phases
14155 (add-after 'unpack 'patch-tests
14156 (lambda _
14157 ;; TypeError: binary() got an unexpected keyword argument
14158 ;; 'average_size'.
14159 (substitute* "tests/test_check.py"
14160 (("average_size=512") ""))
14161 #t)))))
14162 (propagated-inputs
14163 `(("python-chardet" ,python-chardet)
14164 ("python-hypothesis" ,python-hypothesis)))
14165 (home-page "https://github.com/audreyr/binaryornot")
14166 (synopsis "Package to check if a file is binary or text")
14167 (description "Ultra-lightweight pure Python package to check if a file is
14168 binary or text.")
14169 (license license:bsd-3)
14170 (properties `((python2-variant . ,(delay python2-binaryornot))))))
14171
14172 (define-public python2-binaryornot
14173 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
14174 (package (inherit base)
14175 (propagated-inputs
14176 `(("python2-enum34" ,python2-enum34)
14177 ,@(package-propagated-inputs base))))))
14178
14179 (define-public python-binwalk
14180 (package
14181 (name "python-binwalk")
14182 (version "2.2.0")
14183 (source
14184 (origin
14185 (method git-fetch)
14186 (uri (git-reference
14187 (url "https://github.com/ReFirmLabs/binwalk")
14188 (commit (string-append "v" version))))
14189 (file-name (git-file-name name version))
14190 (sha256
14191 (base32
14192 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
14193 (build-system python-build-system)
14194 (arguments
14195 `(#:phases
14196 (modify-phases %standard-phases
14197 (add-before 'check 'set-pythonpath
14198 (lambda _
14199 (setenv "PYTHONPATH"
14200 (string-append
14201 (getcwd) "/src/"
14202 ":" (getenv "PYTHONPATH")))
14203 (setenv "HOME" "")
14204 #t)))))
14205 (native-inputs
14206 `(("python-coverage" ,python-coverage)
14207 ("python-nose" ,python-nose)))
14208 (home-page "https://github.com/ReFirmLabs/binwalk")
14209 (synopsis "Firmware analysis tool")
14210 (description "Binwalk is a tool for analyzing, reverse engineering, and
14211 extracting firmware images")
14212 (license license:expat)))
14213
14214 (define-public python-nltk
14215 (package
14216 (name "python-nltk")
14217 (version "3.2.1")
14218 (source (origin
14219 (method url-fetch)
14220 (uri (pypi-uri "nltk" version))
14221 (sha256
14222 (base32
14223 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
14224 (build-system python-build-system)
14225 (arguments
14226 '(;; The tests require some extra resources to be downloaded.
14227 ;; TODO Try packaging these resources.
14228 #:tests? #f))
14229 (home-page "http://nltk.org/")
14230 (synopsis "Natural Language Toolkit")
14231 (description "It provides interfaces to over 50 corpora and lexical
14232 resources such as WordNet, along with a suite of text processing libraries
14233 for classification, tokenization, stemming, tagging, parsing, and semantic
14234 reasoning, wrappers for natural language processing libraries.")
14235 (license license:asl2.0)))
14236
14237 (define-public python2-nltk
14238 (package-with-python2 python-nltk))
14239
14240 (define-public python-pymongo
14241 (package
14242 (name "python-pymongo")
14243 (version "3.7.2")
14244 (source (origin
14245 (method url-fetch)
14246 (uri (pypi-uri "pymongo" version))
14247 (sha256
14248 (base32
14249 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
14250 (build-system python-build-system)
14251 (propagated-inputs
14252 `(("python-certifi" ,python-certifi)))
14253 (home-page "https://github.com/mongodb/mongo-python-driver")
14254 (synopsis "Python driver for MongoDB")
14255 (description "Python driver for MongoDB.")
14256 (license license:asl2.0)))
14257
14258 (define-public python2-pymongo
14259 (package-with-python2 python-pymongo))
14260
14261 (define-public python-consul
14262 (package
14263 (name "python-consul")
14264 (version "0.6.1")
14265 (source
14266 (origin
14267 (method url-fetch)
14268 (uri (pypi-uri "python-consul" version))
14269 (sha256
14270 (base32
14271 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
14272 (build-system python-build-system)
14273 (arguments
14274 '(#:tests? #f)) ; The tests are not distributed
14275 (propagated-inputs
14276 `(("python-requests" ,python-requests)
14277 ("python-six" ,python-six)))
14278 (home-page "https://github.com/cablehead/python-consul")
14279 (synopsis "Python client for Consul")
14280 (description
14281 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
14282 discovery, monitoring and configuration.")
14283 (license license:expat)))
14284
14285 (define-public python2-consul
14286 (package-with-python2 python-consul))
14287
14288 (define-public python-schematics
14289 (package
14290 (name "python-schematics")
14291 (version "1.1.1")
14292 (source
14293 (origin
14294 (method git-fetch)
14295 (uri (git-reference
14296 (url "https://github.com/schematics/schematics")
14297 (commit (string-append "v" version))))
14298 (file-name (git-file-name name version))
14299 (sha256
14300 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
14301 (build-system python-build-system)
14302 (propagated-inputs
14303 `(("python-six" ,python-six)))
14304 (arguments
14305 ;; The tests require a bunch of not very nice packages with fixed
14306 ;; version requirements (e.g. python-coveralls).
14307 `(#:tests? #f))
14308 (home-page "https://github.com/schematics/schematics")
14309 (synopsis "Python Data Structures for Humans")
14310 (description "Python Data Structures for Humans.")
14311 (license license:bsd-3)))
14312
14313 (define-public python2-schematics
14314 (package-with-python2 python-schematics))
14315
14316 (define-public python-odfpy
14317 (package
14318 (name "python-odfpy")
14319 (version "1.4.1")
14320 (source (origin
14321 (method url-fetch)
14322 (uri (pypi-uri "odfpy" version))
14323 (sha256
14324 (base32
14325 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
14326 (arguments
14327 `(#:phases
14328 (modify-phases %standard-phases
14329 (replace 'check
14330 (lambda _
14331 (setenv "PYTHONPATH" (string-append "./build/lib:"
14332 (getenv "PYTHONPATH")))
14333 (invoke "pytest" "-vv"))))))
14334 (build-system python-build-system)
14335 (native-inputs
14336 `(("python-pytest" ,python-pytest)))
14337 (propagated-inputs
14338 `(("python-defusedxml" ,python-defusedxml)))
14339 (home-page "https://github.com/eea/odfpy")
14340 (synopsis "Python API and tools to manipulate OpenDocument files")
14341 (description "Collection of libraries and utility programs written in
14342 Python to manipulate OpenDocument 1.2 files.")
14343 (license
14344 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
14345 ;; number of files with other licenses.
14346 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
14347
14348 (define-public python2-odfpy
14349 (package-with-python2 python-odfpy))
14350
14351 (define-public python-natsort
14352 (package
14353 (name "python-natsort")
14354 (version "7.0.1")
14355 (source (origin
14356 (method url-fetch)
14357 (uri (pypi-uri "natsort" version))
14358 (sha256
14359 (base32
14360 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14361 (build-system python-build-system)
14362 (arguments
14363 `(#:modules ((guix build utils)
14364 (guix build python-build-system)
14365 (srfi srfi-1)
14366 (srfi srfi-26)
14367 (ice-9 ftw))
14368 #:phases
14369 (modify-phases %standard-phases
14370 (add-before 'check 'set-cachedir
14371 ;; Tests require write access to $HOME by default
14372 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14373 (replace 'check
14374 (lambda _
14375 (let ((cwd (getcwd)))
14376 (setenv "PYTHONPATH"
14377 (string-append
14378 cwd "/build/"
14379 (find (cut string-prefix? "lib" <>)
14380 (scandir (string-append cwd "/build")))
14381 ":"
14382 (getenv "PYTHONPATH")))
14383 (invoke "pytest" "-v")))))))
14384 (native-inputs
14385 `(("python-hypothesis" ,python-hypothesis)
14386 ("python-pytest-cov" ,python-pytest-cov)
14387 ("python-pytest-mock" ,python-pytest-mock)
14388 ("python-pytest" ,python-pytest)))
14389 (propagated-inputs ; TODO: Add python-fastnumbers.
14390 `(("python-pyicu" ,python-pyicu)))
14391 (home-page "https://github.com/SethMMorton/natsort")
14392 (synopsis "Natural sorting for python and shell")
14393 (description
14394 "Natsort lets you apply natural sorting on lists instead of
14395 lexicographical. If you use the built-in @code{sorted} method in python
14396 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14397 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14398 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14399 identifies numbers and sorts them separately from strings. It can also sort
14400 version numbers, real numbers, mixed types and more, and comes with a shell
14401 command @command{natsort} that exposes this functionality in the command line.")
14402 (license license:expat)
14403 (properties `((python2-variant . ,(delay python2-natsort))))))
14404
14405 ;; Natsort 6.x are the last versions with support for Python 2.
14406 (define-public python2-natsort
14407 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14408 (package (inherit base)
14409 (version "6.2.1")
14410 (source (origin
14411 (method url-fetch)
14412 (uri (pypi-uri "natsort" version))
14413 (sha256
14414 (base32
14415 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14416 (native-inputs
14417 `(("python2-pathlib" ,python2-pathlib)
14418 ,@(package-native-inputs base))))))
14419
14420 (define-public glances
14421 (package
14422 (name "glances")
14423 (version "3.1.4")
14424 (source
14425 (origin
14426 (method url-fetch)
14427 (uri (pypi-uri "Glances" version))
14428 (sha256
14429 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
14430 (modules '((guix build utils)))
14431 (snippet
14432 '(begin
14433 ;; Glances phones PyPI for weekly update checks by default.
14434 ;; Disable these. The user can re-enable them if desired.
14435 (substitute* "glances/outdated.py"
14436 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14437 (string-append indentation
14438 "self.args.disable_check_update = True\n"
14439 line)))
14440 #t))))
14441 (build-system python-build-system)
14442 (propagated-inputs
14443 `(("python-future" ,python-future)
14444 ("python-psutil" ,python-psutil)))
14445 (home-page "https://github.com/nicolargo/glances")
14446 (synopsis "Cross-platform curses-based monitoring tool")
14447 (description
14448 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14449 Glances uses the PsUtil library to get information from your system. It
14450 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14451 (license license:lgpl3+)))
14452
14453 (define-public python-glances
14454 (deprecated-package "python-glances" glances))
14455
14456 (define-public python-graphql-core
14457 (package
14458 (name "python-graphql-core")
14459 (version "3.1.2")
14460 (source
14461 (origin
14462 (method url-fetch)
14463 (uri (pypi-uri "graphql-core" version))
14464 (sha256
14465 (base32
14466 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
14467 (build-system python-build-system)
14468 (arguments
14469 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14470 #:phases
14471 (modify-phases %standard-phases
14472 (add-after 'unpack 'patch-hardcoded-version
14473 (lambda _ (substitute*
14474 "setup.py"
14475 (("'gevent==1.1rc1'") "'gevent'"))
14476 #t)))))
14477 (native-inputs
14478 `(("python-gevent" ,python-gevent)
14479 ("python-mock" ,python-mock)
14480 ("python-pytest-mock" ,python-pytest-mock)))
14481 (propagated-inputs
14482 `(("python-promise" ,python-promise)
14483 ("python-six" ,python-six)))
14484 (home-page "https://github.com/graphql-python/graphql-core")
14485 (synopsis "GraphQL implementation for Python")
14486 (description
14487 "GraphQL implementation for Python. GraphQL is a data query language and
14488 runtime designed and used to request and deliver data to mobile and web apps.
14489 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14490 to Python.")
14491 (license license:expat)))
14492
14493 (define-public python2-graphql-core
14494 (package-with-python2 python-graphql-core))
14495
14496 (define-public python-graphql-relay
14497 (package
14498 (name "python-graphql-relay")
14499 (version "0.4.5")
14500 (source
14501 (origin
14502 (method url-fetch)
14503 (uri (pypi-uri "graphql-relay" version))
14504 (sha256
14505 (base32
14506 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14507 (build-system python-build-system)
14508 (arguments
14509 '(#:tests? #f)) ; The tests are not distributed
14510 (propagated-inputs
14511 `(("python-graphql-core" ,python-graphql-core)
14512 ("python-promise" ,python-promise)
14513 ("python-six" ,python-six)))
14514 (home-page "https://github.com/graphql-python/graphql-relay-py")
14515 (synopsis "Relay implementation for Python")
14516 (description
14517 "This is a library to allow the easy creation of Relay-compliant servers
14518 using the GraphQL Python reference implementation of a GraphQL server. It
14519 should be noted that the code is a exact port of the original
14520 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14521 from Facebook.")
14522 (license license:expat)))
14523
14524 (define-public python-graphene
14525 (package
14526 (name "python-graphene")
14527 (version "0.10.2")
14528 (source
14529 (origin
14530 (method url-fetch)
14531 (uri (pypi-uri "graphene" version))
14532 (sha256
14533 (base32
14534 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14535 (build-system python-build-system)
14536 (propagated-inputs
14537 `(("python-graphql-core" ,python-graphql-core)
14538 ("python-graphql-relay" ,python-graphql-relay)
14539 ("python-iso8601" ,python-iso8601)
14540 ("python-promise" ,python-promise)
14541 ("python-six" ,python-six)))
14542 (arguments
14543 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14544 (home-page "https://graphene-python.org/")
14545 (synopsis "GraphQL Framework for Python")
14546 (description
14547 "Graphene is a Python library for building GraphQL schemas/types.
14548 A GraphQL schema describes your data model, and provides a GraphQL server
14549 with an associated set of resolve methods that know how to fetch data.")
14550 (license license:expat)))
14551
14552 (define-public python-nautilus
14553 (package
14554 (name "python-nautilus")
14555 (version "0.4.9")
14556 (source
14557 (origin
14558 (method url-fetch)
14559 (uri (pypi-uri "nautilus" version))
14560 (sha256
14561 (base32
14562 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14563 (build-system python-build-system)
14564 (arguments `(#:tests? #f)) ; fails to import test modules
14565 (propagated-inputs
14566 `(("python-bcrypt" ,python-bcrypt)
14567 ("python-click" ,python-click)
14568 ("python-consul" ,python-consul)
14569 ("python-graphene" ,python-graphene)
14570 ("python-jinja2" ,python-jinja2)
14571 ("python-peewee" ,python-peewee)
14572 ("python-pika" ,python-pika)
14573 ("python-tornado" ,python-tornado)
14574 ("python-wtforms" ,python-wtforms)))
14575 (native-inputs
14576 `(("python-nose2" ,python-nose2)))
14577 (home-page "https://github.com/AlecAivazis/nautilus")
14578 (synopsis "Library for creating microservice applications")
14579 (description
14580 "Nautilus is a framework for flux based microservices that looks to
14581 provide extendible implementations of common aspects of a cloud so that you can
14582 focus on building massively scalable web applications.")
14583 (license license:expat)))
14584
14585 (define-public python-random2
14586 (package
14587 (name "python-random2")
14588 (version "1.0.1")
14589 (source (origin
14590 (method url-fetch)
14591 (uri (pypi-uri "random2" version ".zip"))
14592 (sha256
14593 (base32
14594 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14595 (build-system python-build-system)
14596 (native-inputs `(("unzip" ,unzip)))
14597 (home-page "http://pypi.python.org/pypi/random2")
14598 (synopsis "Python 3 version of the Python 2 @code{random} module")
14599 (description
14600 "This package provides a Python 3 ported version of Python 2.7’s
14601 @code{random} module. It has also been back-ported to work in Python 2.6.
14602
14603 In Python 3, the implementation of @code{randrange()} was changed, so that
14604 even with the same seed you get different sequences in Python 2 and 3.
14605
14606 This package closes that gap, allowing stable random number generation
14607 between the different Python versions.")
14608 (license license:psfl)))
14609
14610 (define-public python2-random2
14611 (package-with-python2 python-random2))
14612
14613 (define-public python-snowballstemmer
14614 (package
14615 (name "python-snowballstemmer")
14616 (version "2.0.0")
14617 (source (origin
14618 (method url-fetch)
14619 (uri (pypi-uri "snowballstemmer" version))
14620 (sha256
14621 (base32
14622 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14623 (build-system python-build-system)
14624 (arguments
14625 `(;; No tests exist
14626 #:tests? #f))
14627 (home-page "https://github.com/shibukawa/snowball_py")
14628 (synopsis "Snowball stemming library collection for Python")
14629 (description "This package provides 16 word stemmer algorithms generated
14630 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14631 English stemmer.")
14632 (license license:bsd-3)))
14633
14634 (define-public python2-snowballstemmer
14635 (package-with-python2 python-snowballstemmer))
14636
14637 (define-public python-setproctitle
14638 (package
14639 (name "python-setproctitle")
14640 (version "1.1.10")
14641 (source
14642 (origin
14643 (method url-fetch)
14644 (uri (pypi-uri "setproctitle" version))
14645 (sha256
14646 (base32
14647 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14648 (build-system python-build-system)
14649 (arguments
14650 '(#:phases
14651 (modify-phases %standard-phases
14652 (add-before 'check 'patch-Makefile
14653 ;; Stricly this is only required for the python2 variant.
14654 ;; But adding a phase in an inherited package seems to be
14655 ;; cumbersum. So we patch even for python3.
14656 (lambda _
14657 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14658 (when nose
14659 (substitute* "Makefile"
14660 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14661 (string-append nose "/bin/nosetests "))))
14662 #t)))
14663 (replace 'check
14664 (lambda _
14665 (setenv "PYTHON" (or (which "python3") (which "python")))
14666 (setenv "PYCONFIG" (if (which "python3-config")
14667 "python3-config --embed"
14668 "python-config"))
14669 (setenv "CC" "gcc")
14670 ;; No need to extend PYTHONPATH to find the built package, since
14671 ;; the Makefile will build anyway
14672 (invoke "make" "check"))))))
14673 (native-inputs
14674 `(("procps" ,procps))) ; required for tests
14675 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14676 (synopsis
14677 "Setproctitle implementation for Python to customize the process title")
14678 (description "The library allows a process to change its title (as displayed
14679 by system tools such as ps and top).
14680
14681 Changing the title is mostly useful in multi-process systems, for
14682 example when a master process is forked: changing the children's title
14683 allows identifying the task each process is busy with. The technique
14684 is used by PostgreSQL and the OpenSSH Server for example.")
14685 (license license:bsd-3)
14686 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14687
14688 (define-public python2-setproctitle
14689 (let ((base (package-with-python2
14690 (strip-python2-variant python-setproctitle))))
14691 (package
14692 (inherit base)
14693 (native-inputs `(("python2-nose" ,python2-nose)
14694 ,@(package-native-inputs base))))))
14695
14696 (define-public python-validictory
14697 (package
14698 (name "python-validictory")
14699 (version "1.0.1")
14700 (source
14701 (origin
14702 (method url-fetch)
14703 (uri (pypi-uri "validictory" version))
14704 (sha256
14705 (base32
14706 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14707 (build-system python-build-system)
14708 (arguments
14709 '(#:phases
14710 (modify-phases %standard-phases
14711 (add-after 'unpack 'bootstrap
14712 ;; Move the tests out of the package directory to avoid
14713 ;; packaging them.
14714 (lambda* _
14715 (rename-file "validictory/tests" "tests")
14716 (delete-file "tests/__init__.py")))
14717 (replace 'check
14718 (lambda _
14719 ;; Extend PYTHONPATH so the built package will be found.
14720 (setenv "PYTHONPATH"
14721 (string-append (getcwd) "/build/lib:"
14722 (getenv "PYTHONPATH")))
14723 (invoke "py.test" "-vv" ))))))
14724 (native-inputs
14725 `(("python-pytest" ,python-pytest)))
14726 (home-page
14727 "https://github.com/jamesturk/validictory")
14728 (synopsis "General purpose Python data validator")
14729 (description "It allows validation of arbitrary Python data structures.
14730
14731 The schema format is based on the JSON Schema
14732 proposal (http://json-schema.org), so combined with json the library is also
14733 useful as a validator for JSON data.")
14734 (license license:expat)))
14735
14736 (define-public python2-validictory
14737 (package-with-python2 python-validictory))
14738
14739 (define-public python-pyelftools
14740 (package
14741 (name "python-pyelftools")
14742 (version "0.25")
14743 (source
14744 (origin
14745 (method url-fetch)
14746 (uri (pypi-uri "pyelftools" version))
14747 (sha256
14748 (base32
14749 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14750 (build-system python-build-system)
14751 (arguments
14752 `(#:phases
14753 (modify-phases %standard-phases
14754 (add-before 'check 'set-pythonpath
14755 (lambda _
14756 (setenv "PYTHONPATH"
14757 (string-append
14758 (getcwd) "/test/"
14759 ":" (getenv "PYTHONPATH")))
14760 #t)))))
14761 (home-page
14762 "https://github.com/eliben/pyelftools")
14763 (synopsis
14764 "Analyze binary and library file information")
14765 (description "This Python library provides interfaces for parsing and
14766 analyzing two binary and library file formats; the Executable and Linking
14767 Format (ELF), and debugging information in the Debugging With Attributed
14768 Record Format (DWARF).")
14769 (license license:public-domain)))
14770
14771 (define-public python-pyev
14772 (package
14773 (name "python-pyev")
14774 (version "0.9.0")
14775 (source
14776 (origin
14777 (method url-fetch)
14778 (uri (pypi-uri "pyev" version))
14779 (sha256
14780 (base32
14781 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14782 (build-system python-build-system)
14783 (arguments
14784 `(#:tests? #f ; no test suite
14785 #:phases
14786 (modify-phases %standard-phases
14787 (add-after 'unpack 'patch
14788 (lambda* (#:key inputs #:allow-other-keys)
14789 (let ((libev (string-append (assoc-ref inputs "libev")
14790 "/lib/libev.so.4")))
14791 (substitute* "setup.py"
14792 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14793 (string-append "libev_dll_name = \"" libev "\"")))))))))
14794 (inputs
14795 `(("libev" ,libev)))
14796 (home-page "https://github.com/gabrielfalcao/pyev")
14797 (synopsis "Python libev interface")
14798 (description "Pyev provides a Python interface to libev.")
14799 (license license:gpl3)))
14800
14801 (define-public python2-pyev
14802 (package-with-python2 python-pyev))
14803
14804 (define-public python-imagesize
14805 (package
14806 (name "python-imagesize")
14807 (version "1.2.0")
14808 (source
14809 (origin
14810 (method url-fetch)
14811 (uri (pypi-uri "imagesize" version))
14812 (sha256
14813 (base32
14814 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14815 (build-system python-build-system)
14816 (home-page "https://github.com/shibukawa/imagesize_py")
14817 (synopsis "Gets image size of files in various formats in Python")
14818 (description
14819 "This package allows determination of image size from
14820 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14821 (license license:expat)))
14822
14823 (define-public python2-imagesize
14824 (package-with-python2 python-imagesize))
14825
14826 (define-public python-termstyle
14827 (package
14828 (name "python-termstyle")
14829 (version "0.1.11")
14830 (source
14831 (origin
14832 (method url-fetch)
14833 (uri (pypi-uri "termstyle" version))
14834 (sha256
14835 (base32
14836 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14837 (build-system python-build-system)
14838 (arguments
14839 '(#:phases
14840 (modify-phases %standard-phases
14841 (replace 'check
14842 (lambda _
14843 (invoke "python" "test3.py"))))))
14844 (home-page "https://github.com/gfxmonk/termstyle")
14845 (synopsis "Console text coloring for Python")
14846 (description "This package provides console text coloring for Python.")
14847 (license license:bsd-3)))
14848
14849 (define-public python-argcomplete
14850 (package
14851 (name "python-argcomplete")
14852 (version "1.11.1")
14853 (source
14854 (origin
14855 (method url-fetch)
14856 (uri (pypi-uri "argcomplete" version))
14857 (sha256
14858 (base32
14859 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14860 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14861 (build-system python-build-system)
14862 (native-inputs
14863 `(("python-coverage" ,python-coverage)
14864 ("python-flake8" ,python-flake8)
14865 ("python-pexpect" ,python-pexpect)
14866 ("python-wheel" ,python-wheel)
14867 ("tcsh" ,tcsh)
14868 ("fish" ,fish)
14869 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14870 (home-page "https://github.com/kislyuk/argcomplete")
14871 (synopsis "Shell tab completion for Python argparse")
14872 (description "argcomplete provides extensible command line tab completion
14873 of arguments and options for Python scripts using @code{argparse}. It's
14874 particularly useful for programs with many options or sub-parsers that can
14875 dynamically suggest completions; for example, when browsing resources over the
14876 network.")
14877 (license license:asl2.0)
14878 (properties `((python2-variant . ,(delay python2-argcomplete))))))
14879
14880 (define-public python2-argcomplete
14881 (let ((variant (package-with-python2
14882 (strip-python2-variant python-argcomplete))))
14883 (package
14884 (inherit variant)
14885 (arguments
14886 (substitute-keyword-arguments (package-arguments variant)
14887 ((#:phases phases '%standard-phases)
14888 `(modify-phases ,phases
14889 (add-after 'unpack 'set-my-HOME
14890 (lambda _ (setenv "HOME" "/tmp")))))))
14891 (native-inputs
14892 `(("python2-importlib-metadata" ,python2-importlib-metadata)
14893 ,@(package-native-inputs variant))))))
14894
14895 (define-public python-csscompressor
14896 (package
14897 (name "python-csscompressor")
14898 (version "0.9.5")
14899 (source
14900 (origin
14901 (method url-fetch)
14902 (uri (pypi-uri "csscompressor" version))
14903 (sha256
14904 (base32
14905 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14906 (build-system python-build-system)
14907 (arguments
14908 '(#:phases
14909 (modify-phases %standard-phases
14910 (replace 'check
14911 (lambda _
14912 (invoke "py.test"))))))
14913 (native-inputs
14914 `(("python-pytest" ,python-pytest)))
14915 (home-page "https://github.com/sprymix/csscompressor")
14916 (synopsis "Python port of YUI CSS Compressor")
14917 (description
14918 "This package provides a python port of YUI CSS Compressor.")
14919 (license license:bsd-3)))
14920
14921 (define-public python-rcssmin
14922 (package
14923 (name "python-rcssmin")
14924 (version "1.0.6")
14925 (source
14926 (origin
14927 (method url-fetch)
14928 (uri (pypi-uri "rcssmin" version))
14929 (sha256
14930 (base32
14931 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14932 (build-system python-build-system)
14933 (arguments
14934 '(#:phases
14935 (modify-phases %standard-phases
14936 (replace 'check
14937 (lambda _
14938 (invoke "python" "run_tests.py" "tests"))))))
14939 (home-page "http://opensource.perlig.de/rcssmin/")
14940 (synopsis "CSS Minifier")
14941 (description "The minifier is based on the semantics of the YUI compressor,
14942 which itself is based on the rule list by Isaac Schlueter.")
14943 (license license:asl2.0)))
14944
14945 (define-public python-rjsmin
14946 (package
14947 (name "python-rjsmin")
14948 (version "1.1.0")
14949 (source
14950 (origin
14951 (method url-fetch)
14952 (uri (pypi-uri "rjsmin" version))
14953 (sha256
14954 (base32
14955 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14956 (modules '((guix build utils)))
14957 (snippet
14958 '(begin
14959 (for-each delete-file (find-files "bench" "\\.js$"))
14960 #t))))
14961 (build-system python-build-system)
14962 (arguments
14963 '(#:tests? #f ; Not all test files included.
14964 #:phases
14965 (modify-phases %standard-phases
14966 (replace 'check
14967 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14968 (add-installed-pythonpath inputs outputs)
14969 (if tests?
14970 (invoke "py.test" "-vv" "tests")
14971 #t))))))
14972 (native-inputs
14973 `(("python-pytest" ,python-pytest)))
14974 (home-page "http://opensource.perlig.de/rjsmin/")
14975 (synopsis "Javascript Minifier")
14976 (description "@code{rJSmin} is a javascript minifier written in Python. The
14977 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14978 is a re-implementation aiming for speed, so it can be used at runtime (rather
14979 than during a preprocessing step).")
14980 (license license:asl2.0)))
14981
14982 (define-public python-xopen
14983 (package
14984 (name "python-xopen")
14985 (version "0.5.0")
14986 (source
14987 (origin
14988 (method url-fetch)
14989 (uri (pypi-uri "xopen" version))
14990 (sha256
14991 (base32
14992 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14993 (build-system python-build-system)
14994 (propagated-inputs
14995 `(("python-setuptools-scm" ,python-setuptools-scm)))
14996 (home-page "https://github.com/marcelm/xopen/")
14997 (synopsis "Open compressed files transparently")
14998 (description "This module provides an @code{xopen} function that works like
14999 Python's built-in @code{open} function, but can also deal with compressed files.
15000 Supported compression formats are gzip, bzip2 and, xz, and are automatically
15001 recognized by their file extensions. The focus is on being as efficient as
15002 possible on all supported Python versions.")
15003 (license license:expat)))
15004
15005 (define-public python2-xopen
15006 (let ((base (package-with-python2
15007 (strip-python2-variant python-xopen))))
15008 (package
15009 (inherit base)
15010 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
15011 ,@(package-propagated-inputs base))))))
15012
15013 (define-public python-cheetah
15014 (package
15015 (name "python-cheetah")
15016 (version "3.2.4")
15017 (source
15018 (origin
15019 (method url-fetch)
15020 (uri (pypi-uri "Cheetah3" version))
15021 (sha256
15022 (base32
15023 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
15024 (build-system python-build-system)
15025 (arguments
15026 `(#:modules ((guix build utils)
15027 (guix build python-build-system)
15028 (ice-9 ftw)
15029 (srfi srfi-1)
15030 (srfi srfi-26))
15031 #:phases (modify-phases %standard-phases
15032 (add-after 'unpack 'use-absolute-python
15033 (lambda _
15034 (substitute* "Cheetah/CheetahWrapper.py"
15035 (("#!/usr/bin/env python")
15036 (string-append "#!" (which "python"))))
15037 #t))
15038 (add-after 'unpack 'fix-tests
15039 (lambda _
15040 (substitute* "Cheetah/Tests/ImportHooks.py"
15041 (("os.path.dirname\\(__file__\\)")
15042 (string-append "'" (getcwd) "/Cheetah/Tests'")))
15043 #t))
15044 (replace 'check
15045 (lambda _
15046 (let ((cwd (getcwd)))
15047 (setenv "PYTHONPATH"
15048 (string-append
15049 cwd "/build/"
15050 (find (cut string-prefix? "lib" <>)
15051 (scandir (string-append cwd "/build")))
15052 ":" (getenv "PYTHONPATH")))
15053 (setenv "PATH"
15054 (string-append (getenv "PATH")
15055 ":" cwd "/bin"))
15056 (setenv "TMPDIR" "/tmp")
15057
15058 (substitute* "Cheetah/Tests/Test.py"
15059 (("unittest.TextTestRunner\\(\\)")
15060 "unittest.TextTestRunner(verbosity=2)"))
15061
15062 (invoke "python" "Cheetah/Tests/Test.py")))))))
15063 (propagated-inputs
15064 `(("python-markdown" ,python-markdown))) ;optional
15065 (home-page "https://cheetahtemplate.org/")
15066 (synopsis "Template engine")
15067 (description "Cheetah is a text-based template engine and Python code
15068 generator.
15069
15070 Cheetah can be used as a standalone templating utility or referenced as
15071 a library from other Python applications. It has many potential uses,
15072 but web developers looking for a viable alternative to ASP, JSP, PHP and
15073 PSP are expected to be its principle user group.
15074
15075 Features:
15076 @enumerate
15077 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
15078 text-based format.
15079 @item Cleanly separates content, graphic design, and program code.
15080 @item Blends the power and flexibility of Python with a simple template language
15081 that non-programmers can understand.
15082 @item Gives template writers full access to any Python data structure, module,
15083 function, object, or method in their templates.
15084 @item Makes code reuse easy by providing an object-orientated interface to
15085 templates that is accessible from Python code or other Cheetah templates.
15086 One template can subclass another and selectively reimplement sections of it.
15087 @item Provides a simple, yet powerful, caching mechanism that can dramatically
15088 improve the performance of a dynamic website.
15089 @item Compiles templates into optimized, yet readable, Python code.
15090 @end enumerate")
15091 (license (license:x11-style "file://LICENSE"))))
15092
15093 (define-public python2-cheetah
15094 (package-with-python2 python-cheetah))
15095
15096 (define-public python-dulwich
15097 (package
15098 (name "python-dulwich")
15099 (version "0.19.16")
15100 (source
15101 (origin
15102 (method url-fetch)
15103 (uri (list (string-append "https://www.dulwich.io/releases/"
15104 "dulwich-" version ".tar.gz")
15105 (pypi-uri "dulwich" version)))
15106 (sha256
15107 (base32
15108 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
15109 (build-system python-build-system)
15110 (arguments
15111 `(#:phases
15112 (modify-phases %standard-phases
15113 (add-before 'check 'fix-tests
15114 (lambda* (#:key inputs #:allow-other-keys)
15115 ;; The tests use Popen with a custom environment which doesn't
15116 ;; include PATH.
15117 (substitute* "dulwich/tests/compat/utils.py"
15118 (("'git'") (string-append "'"
15119 (which "git")
15120 "'")))
15121 (substitute* '("dulwich/tests/test_repository.py"
15122 "dulwich/tests/test_hooks.py")
15123 (("#!/bin/sh") (string-append "#!" (which "sh"))))
15124 (setenv "TEST_RUNNER" "unittest")
15125 (setenv "PYTHONHASHSEED" "random")
15126 #t)))))
15127 (propagated-inputs
15128 `(("python-fastimport" ,python-fastimport)
15129 ("python-urllib3" ,python-urllib3)))
15130 (native-inputs
15131 `(("python-mock" ,python-mock)
15132 ("python-geventhttpclient" ,python-geventhttpclient)
15133 ("git" ,git)))
15134 (home-page "https://www.dulwich.io/")
15135 (synopsis "Git implementation in Python")
15136 (description "Dulwich is an implementation of the Git file formats and
15137 protocols written in pure Python.")
15138 ;; Can be used with either license.
15139 (license (list license:asl2.0 license:gpl2+))))
15140
15141 (define-public python2-dulwich
15142 (package-with-python2 python-dulwich))
15143
15144 (define-public python-pbkdf2
15145 (package
15146 (name "python-pbkdf2")
15147 (version "1.3")
15148 (source
15149 (origin
15150 (method url-fetch)
15151 (uri (pypi-uri "pbkdf2" version))
15152 (sha256
15153 (base32
15154 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
15155 (build-system python-build-system)
15156 (arguments
15157 '(#:phases
15158 (modify-phases %standard-phases
15159 (replace 'check
15160 (lambda _
15161 (setenv "PYTHONPATH"
15162 (string-append (getcwd) "/build/lib:"
15163 (getenv "PYTHONPATH")))
15164 (invoke "python" "test/test_pbkdf2.py"))))))
15165 (propagated-inputs
15166 `(("python-pycrypto" ,python-pycrypto))) ; optional
15167 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
15168 (synopsis "Password-based key derivation")
15169 (description "This module implements the password-based key derivation
15170 function, PBKDF2, specified in RSA PKCS#5 v2.0.
15171
15172 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
15173 is part of the RSA Public Key Cryptography Standards series. The provided
15174 implementation takes a password or a passphrase and a salt value (and
15175 optionally a iteration count, a digest module, and a MAC module) and provides
15176 a file-like object from which an arbitrarily-sized key can be read.")
15177 (license license:expat)))
15178
15179 (define-public python2-pbkdf2
15180 (package-with-python2 python-pbkdf2))
15181
15182 (define-public python-qrcode
15183 (package
15184 (name "python-qrcode")
15185 (version "6.1")
15186 (source
15187 (origin
15188 (method url-fetch)
15189 (uri (pypi-uri "qrcode" version))
15190 (sha256
15191 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
15192 (build-system python-build-system)
15193 (arguments
15194 ;; FIXME: Tests require packaging 'pymaging'.
15195 '(#:tests? #f))
15196 (propagated-inputs
15197 `(("python-lxml" ,python-lxml) ; for SVG output
15198 ("python-pillow" ,python-pillow) ; for PNG output
15199 ("python-six" ,python-six)))
15200 (home-page "https://github.com/lincolnloop/python-qrcode")
15201 (synopsis "QR Code image generator")
15202 (description "This package provides a pure Python QR Code generator
15203 module. It uses the Python Imaging Library (PIL) to allow for the generation
15204 of QR Codes.
15205
15206 In addition this package provides a command line tool to generate QR codes and
15207 either write these QR codes to a file or do the output as ascii art at the
15208 console.")
15209 (license license:bsd-3)))
15210
15211 (define-public python2-qrcode
15212 (package-with-python2 python-qrcode))
15213
15214 (define-public python-rst2ansi
15215 (package
15216 (name "python-rst2ansi")
15217 (version "0.1.5")
15218 (source
15219 (origin
15220 (method url-fetch)
15221 (uri (pypi-uri "rst2ansi" version))
15222 (sha256
15223 (base32
15224 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
15225 (build-system python-build-system)
15226 (propagated-inputs
15227 `(("python-docutils" ,python-docutils)))
15228 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
15229 (synopsis "Convert RST to ANSI-decorated console output")
15230 (description
15231 "Python module dedicated to rendering RST (reStructuredText) documents
15232 to ansi-escaped strings suitable for display in a terminal.")
15233 (license license:expat)))
15234
15235 (define-public python-ansi2html
15236 (package
15237 (name "python-ansi2html")
15238 (version "1.2.0")
15239 (source
15240 (origin
15241 (method url-fetch)
15242 (uri (pypi-uri "ansi2html" version))
15243 (sha256
15244 (base32
15245 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
15246 (build-system python-build-system)
15247 (native-inputs
15248 `(("python-mock" ,python-mock)
15249 ("python-nose" ,python-nose)))
15250 (propagated-inputs
15251 `(("python-six" ,python-six)))
15252 (home-page "https://github.com/ralphbean/ansi2html")
15253 (synopsis "Convert ANSI-decorated console output to HTML")
15254 (description
15255 "@command{ansi2html} is a Python library and command line utility for
15256 converting text with ANSI color codes to HTML or LaTeX.")
15257 (license license:gpl3+)))
15258
15259 (define-public python2-ansi2html
15260 (package-with-python2 python-ansi2html))
15261
15262 (define-public python-ddt
15263 (package
15264 (name "python-ddt")
15265 (version "1.4.1")
15266 (source
15267 (origin
15268 (method url-fetch)
15269 (uri (pypi-uri "ddt" version))
15270 (sha256
15271 (base32
15272 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
15273 (build-system python-build-system)
15274 (native-inputs
15275 `(("python-pytest" ,python-pytest)))
15276 (propagated-inputs
15277 `(("python-pyyaml" ,python-pyyaml)))
15278 (home-page "https://github.com/datadriventests/ddt")
15279 (synopsis "Data-Driven Tests")
15280 (description
15281 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
15282 running it with different test data, and make it appear as multiple test
15283 cases.")
15284 (license license:expat)))
15285
15286 (define-public python-pycountry
15287 (package
15288 (name "python-pycountry")
15289 (version "18.5.26")
15290 (source
15291 (origin
15292 (method url-fetch)
15293 (uri (pypi-uri "pycountry" version))
15294 (sha256
15295 (base32
15296 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
15297 (build-system python-build-system)
15298 (home-page "https://bitbucket.org/flyingcircus/pycountry")
15299 (synopsis "ISO databases for languages, countries, currencies, etc.")
15300 (description
15301 "@code{pycountry} provides the ISO databases for the standards:
15302 @enumerate
15303 @item 639-3 (Languages)
15304 @item 3166 (Countries)
15305 @item 3166-3 (Deleted Countries)
15306 @item 3166-2 (Subdivisions of countries)
15307 @item 4217 (Currencies)
15308 @item 15924 (Scripts)
15309 @end enumerate
15310 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
15311 through a Python API.")
15312 (license license:lgpl2.1+)))
15313
15314 (define-public python2-pycountry
15315 (package-with-python2 python-pycountry))
15316
15317 (define-public python-pycosat
15318 (package
15319 (name "python-pycosat")
15320 (version "0.6.3")
15321 (source
15322 (origin
15323 (method url-fetch)
15324 (uri (pypi-uri "pycosat" version ".zip"))
15325 (sha256
15326 (base32
15327 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
15328 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
15329 (build-system python-build-system)
15330 (native-inputs
15331 `(("unzip" ,unzip)))
15332 (home-page "https://github.com/ContinuumIO/pycosat")
15333 (synopsis "Bindings to picosat (a SAT solver)")
15334 (description
15335 "This package provides efficient Python bindings to @code{picosat} on
15336 the C level. When importing pycosat, the @code{picosat} solver becomes part
15337 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
15338 Problem} (SAT) solver.")
15339 (license license:expat)))
15340
15341 (define-public python2-pycosat
15342 (package-with-python2 python-pycosat))
15343
15344 (define-public python2-ruamel.ordereddict
15345 (package
15346 (name "python2-ruamel.ordereddict")
15347 (version "0.4.9")
15348 (source
15349 (origin
15350 (method url-fetch)
15351 (uri (pypi-uri "ruamel.ordereddict" version))
15352 (sha256
15353 (base32
15354 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
15355 (build-system python-build-system)
15356 (arguments
15357 `(#:python ,python-2
15358 #:phases
15359 (modify-phases %standard-phases
15360 (delete 'check)
15361 (add-after 'install 'check
15362 (lambda* (#:key inputs outputs #:allow-other-keys)
15363 (add-installed-pythonpath inputs outputs)
15364 (invoke "python" "test/testordereddict.py"))))))
15365 (home-page "https://bitbucket.org/ruamel/ordereddict")
15366 (synopsis "Version of dict that keeps keys in insertion order")
15367 (description
15368 "This is an implementation of an ordered dictionary with @dfn{Key
15369 Insertion Order} (KIO: updates of values do not affect the position of the
15370 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15371 removed and put at the back). The standard library module @code{OrderedDict},
15372 implemented later, implements a subset of @code{ordereddict} functionality.
15373 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15374 Order} (KSO, no sorting function can be specified, but a transform can be
15375 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15376 (license license:expat)))
15377
15378 (define-public python-pypeg2
15379 (package
15380 (name "python-pypeg2")
15381 (version "2.15.2")
15382 (source
15383 (origin
15384 (method url-fetch)
15385 (uri (pypi-uri "pyPEG2" version))
15386 (sha256
15387 (base32
15388 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15389 (build-system python-build-system)
15390 (propagated-inputs `(("python-lxml" ,python-lxml)))
15391 (arguments
15392 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15393 '(#:tests? #f))
15394 (home-page "https://fdik.org/pyPEG/")
15395 (synopsis "Parsering Expression Grammars in Python")
15396 (description "PyPEG is an intrinsic parser interpreter framework for
15397 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15398 parse many formal languages.")
15399 (license license:gpl2)))
15400
15401 (define-public python-incremental
15402 (package
15403 (name "python-incremental")
15404 (version "17.5.0")
15405 (source
15406 (origin
15407 (method url-fetch)
15408 (uri (pypi-uri "incremental" version))
15409 (sha256
15410 (base32
15411 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15412 (build-system python-build-system)
15413 (home-page "https://github.com/hawkowl/incremental")
15414 (synopsis "Library for versioning Python projects")
15415 (description "Incremental is a small library that versions your Python
15416 projects.")
15417 (license license:expat)))
15418
15419 (define-public python2-incremental
15420 (package-with-python2 python-incremental))
15421
15422 (define-public python-invoke
15423 (package
15424 (name "python-invoke")
15425 (home-page "https://www.pyinvoke.org/")
15426 (version "1.5.0")
15427 (source (origin
15428 (method url-fetch)
15429 (uri (pypi-uri "invoke" version))
15430 (sha256
15431 (base32
15432 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
15433 (build-system python-build-system)
15434 (arguments
15435 ;; XXX: Requires many dependencies that are not yet in Guix.
15436 `(#:tests? #f
15437 #:phases
15438 (modify-phases %standard-phases
15439 (add-after 'unpack 'fix-bash-path
15440 (lambda* (#:key inputs #:allow-other-keys)
15441 (let ((bash (assoc-ref inputs "bash")))
15442 (substitute* "invoke/config.py"
15443 (("shell = \"/bin/bash\"")
15444 (string-append "shell = \"" bash "/bin/bash\""))
15445 )
15446 #t))))))
15447 (inputs
15448 `(("bash" ,bash-minimal)))
15449 (synopsis "Pythonic task execution")
15450 (description
15451 "Invoke is a Python task execution tool and library, drawing inspiration
15452 from various sources to arrive at a powerful and clean feature set. It is
15453 evolved from the Fabric project, but focuses on local and abstract concerns
15454 instead of servers and network commands.")
15455 (license license:bsd-3)))
15456
15457 (define-public python2-invoke
15458 (package-with-python2 python-invoke))
15459
15460 (define-public python-automat
15461 (package
15462 (name "python-automat")
15463 (version "20.2.0")
15464 (source (origin
15465 (method url-fetch)
15466 (uri (pypi-uri "Automat" version))
15467 (sha256
15468 (base32
15469 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15470 (build-system python-build-system)
15471 ;; We disable the tests because they require python-twisted, while
15472 ;; python-twisted depends on python-automat. Twisted is optional, but the
15473 ;; tests fail if it is not available. Also see
15474 ;; <https://github.com/glyph/automat/issues/71>.
15475 (arguments '(#:tests? #f))
15476 (native-inputs
15477 `(("python-m2r" ,python-m2r)
15478 ("python-setuptools-scm" ,python-setuptools-scm)
15479 ("python-graphviz" ,python-graphviz)))
15480 (propagated-inputs
15481 `(("python-six" ,python-six)
15482 ("python-attrs" ,python-attrs)))
15483 (home-page "https://github.com/glyph/Automat")
15484 (synopsis "Self-service finite-state machines")
15485 (description "Automat is a library for concise, idiomatic Python
15486 expression of finite-state automata (particularly deterministic finite-state
15487 transducers).")
15488 (license license:expat)))
15489
15490 (define-public python2-automat
15491 (package-with-python2 python-automat))
15492
15493 (define-public python-m2r
15494 (package
15495 (name "python-m2r")
15496 (version "0.2.1")
15497 (source (origin
15498 (method url-fetch)
15499 (uri (pypi-uri "m2r" version))
15500 (sha256
15501 (base32
15502 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15503 (build-system python-build-system)
15504 (propagated-inputs
15505 `(("python-docutils" ,python-docutils)
15506 ("python-mistune" ,python-mistune)))
15507 (native-inputs
15508 `(("python-pygments" ,python-pygments)
15509 ("python-mock" ,python-mock)))
15510 (home-page "https://github.com/miyakogi/m2r")
15511 (synopsis "Markdown to reStructuredText converter")
15512 (description "M2R converts a markdown file including reST markups to valid
15513 reST format.")
15514 (license license:expat)))
15515
15516 (define-public python2-m2r
15517 (package-with-python2 python-m2r))
15518
15519 (define-public python-constantly
15520 (package
15521 (name "python-constantly")
15522 (version "15.1.0")
15523 (source (origin
15524 (method url-fetch)
15525 (uri (pypi-uri "constantly" version))
15526 (sha256
15527 (base32
15528 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15529 (build-system python-build-system)
15530 (home-page "https://github.com/twisted/constantly")
15531 (synopsis "Symbolic constants in Python")
15532 (description "Constantly is a Python library that provides symbolic
15533 constant support. It includes collections and constants with text, numeric,
15534 and bit flag values.")
15535 (license license:expat)))
15536
15537 (define-public python2-constantly
15538 (package-with-python2 python-constantly))
15539
15540 (define-public python-attrs
15541 (package
15542 (name "python-attrs")
15543 (version "19.3.0")
15544 (source (origin
15545 (method url-fetch)
15546 (uri (pypi-uri "attrs" version))
15547 (sha256
15548 (base32
15549 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15550 (build-system python-build-system)
15551 (arguments
15552 `(#:modules ((guix build utils)
15553 (guix build python-build-system)
15554 (ice-9 ftw)
15555 (srfi srfi-1)
15556 (srfi srfi-26))
15557 #:phases (modify-phases %standard-phases
15558 (replace 'check
15559 (lambda _
15560 (let ((cwd (getcwd)))
15561 (setenv "PYTHONPATH"
15562 (string-append
15563 cwd "/build/"
15564 (find (cut string-prefix? "lib" <>)
15565 (scandir (string-append cwd "/build")))
15566 ":"
15567 (getenv "PYTHONPATH")))
15568 (invoke "python" "-m" "pytest")))))))
15569 (native-inputs
15570 `(("python-coverage" ,python-coverage)
15571 ("python-hypothesis" ,python-hypothesis)
15572 ("python-pympler" ,python-pympler)
15573 ("python-pytest" ,python-pytest)
15574 ("python-six" ,python-six)
15575 ("python-sphinx" ,python-sphinx)
15576 ("python-zope-interface" ,python-zope-interface)))
15577 (home-page "https://github.com/python-attrs/attrs/")
15578 (synopsis "Attributes without boilerplate")
15579 (description "@code{attrs} is a Python package with class decorators that
15580 ease the chores of implementing the most common attribute-related object
15581 protocols.")
15582 (license license:expat)))
15583
15584 (define-public python2-attrs
15585 (package-with-python2 python-attrs))
15586
15587 (define-public python-attrs-bootstrap
15588 (package
15589 (inherit python-attrs)
15590 (name "python-attrs-bootstrap")
15591 (native-inputs `())
15592 (arguments `(#:tests? #f))))
15593
15594 (define-public python2-attrs-bootstrap
15595 (package-with-python2 python-attrs-bootstrap))
15596
15597 (define-public python2-cliapp
15598 (package
15599 (name "python2-cliapp")
15600 (version "1.20180812.1")
15601 (source
15602 (origin
15603 (method url-fetch)
15604 (uri (string-append
15605 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15606 version ".tar.gz"))
15607 (sha256
15608 (base32
15609 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15610 (build-system python-build-system)
15611 (arguments
15612 `(#:python ,python-2
15613 #:phases
15614 (modify-phases %standard-phases
15615 ;; check phase needs to be run before the build phase. If not,
15616 ;; coverage-test-runner looks for tests for the built source files,
15617 ;; and fails.
15618 (delete 'check)
15619 (add-before 'build 'check
15620 (lambda _
15621 ;; Disable python3 tests
15622 (substitute* "check"
15623 (("python3") "# python3"))
15624 (invoke "./check"))))))
15625 (native-inputs
15626 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15627 ("python2-pep8" ,python2-pep8)))
15628 (propagated-inputs
15629 `(("python2-pyaml" ,python2-pyaml)))
15630 (home-page "https://liw.fi/cliapp/")
15631 (synopsis "Python framework for command line programs")
15632 (description "@code{python2-cliapp} is a python framework for
15633 command line programs. It contains the typical stuff such programs
15634 need to do, such as parsing the command line for options, and
15635 iterating over input files.")
15636 (license license:gpl2+)))
15637
15638 (define-public python2-ttystatus
15639 (package
15640 (name "python2-ttystatus")
15641 (version "0.38")
15642 (source
15643 (origin
15644 (method git-fetch)
15645 (uri (git-reference
15646 (url "http://git.liw.fi/ttystatus")
15647 ;; There are no tags after ttystatus-0.36.
15648 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15649 (sha256
15650 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15651 (file-name (git-file-name name version))))
15652 (build-system python-build-system)
15653 (native-inputs
15654 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15655 ("python2-pep8" ,python2-pep8)))
15656 (arguments
15657 `(#:python ,python-2
15658 #:phases
15659 (modify-phases %standard-phases
15660 ;; check phase needs to be run before the build phase. If not,
15661 ;; coverage-test-runner looks for tests for the built source files,
15662 ;; and fails.
15663 (delete 'check)
15664 (add-before 'build 'check
15665 (lambda _ (invoke "make" "check"))))))
15666 (home-page "https://liw.fi/ttystatus/")
15667 (synopsis "Python library for showing progress reporting and
15668 status updates on terminals")
15669 (description "@code{python2-ttystatus} is a python library for
15670 showing progress reporting and status updates on terminals, for
15671 command line programs. Output is automatically adapted to the width
15672 of the terminal: truncated if it does not fit, and resized if the
15673 terminal size changes.")
15674 (license license:gpl3+)))
15675
15676 (define-public python2-tracing
15677 (package
15678 (name "python2-tracing")
15679 (version "0.10")
15680 (source
15681 (origin
15682 (method url-fetch)
15683 (uri (string-append
15684 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15685 version ".tar.gz"))
15686 (sha256
15687 (base32
15688 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15689 (build-system python-build-system)
15690 (arguments
15691 `(#:python ,python-2))
15692 (home-page "https://liw.fi/tracing/")
15693 (synopsis "Python debug logging helper")
15694 (description "@code{python2-tracing} is a python library for
15695 logging debug messages. It provides a way to turn debugging messages
15696 on and off, based on the filename they occur in. It is much faster
15697 than using @code{logging.Filter} to accomplish the same thing, which
15698 matters when code is run in production mode. The actual logging still
15699 happens using the @code{logging} library.")
15700 (license license:gpl3+)))
15701
15702 (define-public python2-larch
15703 (package
15704 (name "python2-larch")
15705 (version "1.20151025")
15706 (source
15707 (origin
15708 (method url-fetch)
15709 (uri (string-append
15710 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15711 version ".tar.gz"))
15712 (patches (search-patches
15713 "python2-larch-coverage-4.0a6-compatibility.patch"))
15714 (sha256
15715 (base32
15716 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15717 (build-system python-build-system)
15718 (arguments
15719 `(#:python ,python-2
15720 #:phases
15721 (modify-phases %standard-phases
15722 ;; check phase needs to be run before the build phase. If not,
15723 ;; coverage-test-runner looks for tests for the built source files,
15724 ;; and fails.
15725 (delete 'check)
15726 (add-before 'build 'check
15727 (lambda _ (invoke "make" "check"))))))
15728 (native-inputs
15729 `(("cmdtest" ,cmdtest)
15730 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15731 (propagated-inputs
15732 `(("python2-tracing" ,python2-tracing)))
15733 (home-page "https://liw.fi/larch/")
15734 (synopsis "Python copy-on-write B-tree library")
15735 (description "@code{python2-larch} is an implementation of
15736 particular kind of B-tree, based on research by Ohad Rodeh. See
15737 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15738 on the data structure.
15739
15740 The distinctive feature of this B-tree is that a node is never
15741 (conceptually) modified. Instead, all updates are done by
15742 copy-on-write. This makes it easy to clone a tree, and modify only the
15743 clone, while other processes access the original tree.")
15744 (license license:gpl3+)))
15745
15746 (define-public python-astroid
15747 (package
15748 (name "python-astroid")
15749 (version "2.4.2")
15750 (source
15751 (origin
15752 (method url-fetch)
15753 (uri (pypi-uri "astroid" version))
15754 (sha256
15755 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15756 (modules '((guix build utils)))
15757 (snippet
15758 '(begin
15759 ;; Check to see if the version pinning has been removed.
15760 (substitute* "astroid/__pkginfo__.py"
15761 (("==1\\.4\\.\\*") ">=1.4.0"))
15762 #t))))
15763 (build-system python-build-system)
15764 (propagated-inputs
15765 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15766 ("python-six" ,python-six)
15767 ("python-wrapt" ,python-wrapt)))
15768 (native-inputs
15769 `(("python-dateutil" ,python-dateutil)
15770 ("python-pytest" ,python-pytest)
15771 ("python-pytest-runner" ,python-pytest-runner)))
15772 (home-page "https://github.com/PyCQA/astroid")
15773 (synopsis "Common base representation of python source code for pylint and
15774 other projects")
15775 (description "@code{python-astroid} provides a common base representation
15776 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15777
15778 It provides a compatible representation which comes from the _ast module. It
15779 rebuilds the tree generated by the builtin _ast module by recursively walking
15780 down the AST and building an extended ast. The new node classes have
15781 additional methods and attributes for different usages. They include some
15782 support for static inference and local name scopes. Furthermore, astroid
15783 builds partial trees by inspecting living objects.")
15784 (license license:lgpl2.1+)
15785 (properties `((python2-variant . ,(delay python2-astroid))))))
15786
15787 (define-public python2-astroid
15788 (let ((base (package-with-python2
15789 (strip-python2-variant python-astroid))))
15790 (package (inherit base)
15791 ;; Version 2.x removes python2 support.
15792 (version "1.6.5")
15793 (source
15794 (origin
15795 (method url-fetch)
15796 (uri (pypi-uri "astroid" version))
15797 (sha256
15798 (base32
15799 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15800 (arguments
15801 (substitute-keyword-arguments (package-arguments base)
15802 ((#:phases phases)
15803 `(modify-phases ,phases
15804 (add-after 'unpack 'remove-spurious-test
15805 (lambda _
15806 ;; https://github.com/PyCQA/astroid/issues/276
15807 (delete-file "astroid/tests/unittest_brain.py")
15808 #t))
15809 (replace 'check
15810 (lambda _
15811 (invoke"python" "-m" "unittest" "discover"
15812 "-p" "unittest*.py")))))))
15813 (native-inputs `())
15814 (propagated-inputs
15815 `(("python2-backports-functools-lru-cache"
15816 ,python2-backports-functools-lru-cache)
15817 ("python2-enum34" ,python2-enum34)
15818 ("python2-singledispatch" ,python2-singledispatch)
15819 ,@(alist-delete "python-typed-ast"
15820 (package-propagated-inputs base)))))))
15821
15822 (define-public python-isbnlib
15823 (package
15824 (name "python-isbnlib")
15825 (version "3.10.4")
15826 (source
15827 (origin
15828 (method url-fetch)
15829 (uri (pypi-uri "isbnlib" version))
15830 (sha256
15831 (base32
15832 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
15833 (build-system python-build-system)
15834 (arguments '(#:tests? #f)) ; No test
15835 (home-page "https://github.com/xlcnd/isbnlib")
15836 (synopsis "Python library to work with ISBN strings")
15837 (description "@code{python-isbnlib} is a (pure) python library that provides
15838 several useful methods and functions to validate, clean, transform, hyphenate and
15839 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
15840 version, is suitable to be include as a dependency in other projects.")
15841 (license license:lgpl3+)))
15842
15843 (define-public python-isort
15844 (package
15845 (name "python-isort")
15846 (version "4.3.4")
15847 (source
15848 (origin
15849 (method git-fetch)
15850 (uri (git-reference
15851 ;; Tests pass only from the Github sources
15852 (url "https://github.com/timothycrosley/isort")
15853 (commit version)))
15854 (file-name (git-file-name name version))
15855 (sha256
15856 (base32
15857 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15858 (build-system python-build-system)
15859 (native-inputs
15860 `(("python-mock" ,python-mock)
15861 ("python-pytest" ,python-pytest)))
15862 (home-page "https://github.com/timothycrosley/isort")
15863 (synopsis "Python utility/library to sort python imports")
15864 (description "@code{python-isort} is a python utility/library to sort
15865 imports alphabetically, and automatically separated into sections. It
15866 provides a command line utility, a python library and plugins for various
15867 editors.")
15868 (license license:expat)
15869 (properties `((python2-variant . ,(delay python2-isort))))))
15870
15871 (define-public python2-isort
15872 (let ((base (package-with-python2
15873 (strip-python2-variant python-isort))))
15874 (package (inherit base)
15875 (native-inputs
15876 `(("python2-futures" ,python2-futures)
15877 ,@(package-native-inputs base))))))
15878
15879 (define-public python2-backports-functools-lru-cache
15880 (package
15881 (name "python2-backports-functools-lru-cache")
15882 (version "1.6.1")
15883 (source
15884 (origin
15885 (method url-fetch)
15886 ;; only the pypi tarballs contain the necessary metadata
15887 (uri (pypi-uri "backports.functools_lru_cache" version))
15888 (sha256
15889 (base32
15890 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15891 (build-system python-build-system)
15892 (native-inputs
15893 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15894 (arguments
15895 `(#:python ,python-2))
15896 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
15897 (synopsis "Backport of functools.lru_cache from Python 3.3")
15898 (description "@code{python2-backports-functools-lru-cache} is a backport
15899 of @code{functools.lru_cache} from python 3.3.")
15900 (license license:expat)))
15901
15902 (define-public python-configparser
15903 (package
15904 (name "python-configparser")
15905 (version "4.0.2")
15906 (source
15907 (origin
15908 (method url-fetch)
15909 (uri (pypi-uri "configparser" version))
15910 (sha256
15911 (base32
15912 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15913 (native-inputs
15914 `(("python-setuptools_scm" ,python-setuptools-scm)))
15915 (build-system python-build-system)
15916 (home-page "https://github.com/jaraco/configparser/")
15917 (synopsis "Backport of configparser from python 3.5")
15918 (description "@code{python-configparser} is a backport of
15919 @code{configparser} from Python 3.5 so that it can be used directly
15920 in other versions.")
15921 (license license:expat)))
15922
15923 (define-public python2-configparser
15924 (package-with-python2 python-configparser))
15925
15926 (define-public python-iniconfig
15927 (package
15928 (name "python-iniconfig")
15929 (version "1.1.1")
15930 (source
15931 (origin
15932 (method url-fetch)
15933 (uri (pypi-uri "iniconfig" version))
15934 (sha256
15935 (base32
15936 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
15937 (build-system python-build-system)
15938 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
15939 (synopsis "Simple INI-file parser")
15940 (description "The @code{iniconfig} package provides a small and simple
15941 INI-file parser module having a unique set of features; @code{iniconfig}
15942 @itemize
15943 @item maintains the order of sections and entries;
15944 @item supports multi-line values with or without line-continuations;
15945 @item supports \"#\" comments everywhere;
15946 @item raises errors with proper line-numbers;
15947 @item raises an error when two sections have the same name.
15948 @end itemize")
15949 (license license:expat)))
15950
15951 (define-public python-mamba
15952 (package
15953 (name "python-mamba")
15954 (version "0.11.2")
15955 (source (origin
15956 (method url-fetch)
15957 (uri (pypi-uri "mamba" version))
15958 (sha256
15959 (base32
15960 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
15961 (build-system python-build-system)
15962 (arguments `(#:tests? #f)) ; No test
15963 (propagated-inputs
15964 `(("python-clint" ,python-clint)
15965 ("python-coverage" ,python-coverage)))
15966 (home-page "https://nestorsalceda.com/mamba/")
15967 (synopsis "Test runner for Python")
15968 (description
15969 "Mamba is a Behaviour-Driven Development tool for Python developers.
15970 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15971 (license license:expat)))
15972
15973 (define-public python-mando
15974 (package
15975 (name "python-mando")
15976 (version "0.6.4")
15977 (source (origin
15978 (method url-fetch)
15979 (uri (pypi-uri "mando" version))
15980 (sha256
15981 (base32
15982 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15983 (build-system python-build-system)
15984 (propagated-inputs
15985 `(("python-rst2ansi" ,python-rst2ansi)
15986 ("python-six" ,python-six)))
15987 (native-inputs
15988 `(("python-pytest" ,python-pytest)))
15989 (home-page "https://mando.readthedocs.org/")
15990 (synopsis
15991 "Wrapper around argparse, allowing creation of complete CLI applications")
15992 (description
15993 "This package is a wrapper around argparse, allowing you to write complete CLI
15994 applications in seconds while maintaining all the flexibility.")
15995 (license license:expat)))
15996
15997 (define-public python2-mando
15998 (package-with-python2 python-mando))
15999
16000 (define-public python2-argparse
16001 (package
16002 (name "python2-argparse")
16003 (version "1.4.0")
16004 (source
16005 (origin
16006 (method url-fetch)
16007 (uri (pypi-uri "argparse" version))
16008 (sha256
16009 (base32
16010 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
16011 (build-system python-build-system)
16012 (arguments
16013 `(#:python ,python-2))
16014 (home-page "https://github.com/ThomasWaldmann/argparse/")
16015 (synopsis "Python command-line parsing library")
16016 (description
16017 "This package is mostly for people who want to have @code{argparse} on
16018 older Pythons because it was not part of the standard library back then.")
16019 (license license:psfl)))
16020
16021 (define-public python-fudge
16022 (package
16023 (name "python-fudge")
16024 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
16025 ;; package, which is currently the only use of this package.
16026 (version "0.9.6")
16027 (source
16028 (origin
16029 (method url-fetch)
16030 (uri (pypi-uri "fudge" version))
16031 (sha256
16032 (base32
16033 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
16034 (build-system python-build-system)
16035 (arguments
16036 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
16037 (home-page "https://github.com/fudge-py/fudge")
16038 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
16039 (description
16040 "Fudge is a Python module for using fake objects (mocks and stubs) to
16041 test real ones.
16042
16043 In readable Python code, you declare the methods available on your fake object
16044 and how they should be called. Then you inject that into your application and
16045 start testing. This declarative approach means you don’t have to record and
16046 playback actions and you don’t have to inspect your fakes after running code.
16047 If the fake object was used incorrectly then you’ll see an informative
16048 exception message with a traceback that points to the culprit.")
16049 (license license:expat)))
16050
16051 (define-public python2-fudge
16052 (package-with-python2 python-fudge))
16053
16054 (define-public python-mwclient
16055 (package
16056 (name "python-mwclient")
16057 (version "0.10.1")
16058 (source
16059 (origin
16060 (method git-fetch)
16061 ;; The PyPI version wouldn't contain tests.
16062 (uri (git-reference
16063 (url "https://github.com/mwclient/mwclient")
16064 (commit (string-append "v" version))))
16065 (file-name (git-file-name name version))
16066 (sha256
16067 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
16068 (build-system python-build-system)
16069 (propagated-inputs
16070 `(("python-requests-oauthlib" ,python-requests-oauthlib)
16071 ("python-six" ,python-six)))
16072 (native-inputs
16073 `(("python-mock" ,python-mock)
16074 ("python-pytest" ,python-pytest)
16075 ("python-pytest-cov" ,python-pytest-cov)
16076 ("python-pytest-runner" ,python-pytest-runner)
16077 ("python-responses" ,python-responses)))
16078 (home-page "https://github.com/btongminh/mwclient")
16079 (synopsis "MediaWiki API client")
16080 (description "This package provides a MediaWiki API client.")
16081 (license license:expat)))
16082
16083 (define-public python-utils
16084 (package
16085 (name "python-utils")
16086 (version "2.4.0")
16087 (source (origin
16088 (method url-fetch)
16089 (uri (pypi-uri "python-utils" version))
16090 (sha256
16091 (base32
16092 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
16093 (build-system python-build-system)
16094 (arguments
16095 `(#:phases
16096 (modify-phases %standard-phases
16097 (replace 'check
16098 (lambda* (#:key inputs outputs #:allow-other-keys)
16099 (add-installed-pythonpath inputs outputs)
16100 (delete-file "pytest.ini")
16101 (invoke "pytest" "-vv"))))))
16102 (native-inputs
16103 `(("pytest-runner" ,python-pytest-runner)
16104 ("pytest" ,python-pytest)
16105 ("six" ,python-six)))
16106 (home-page "https://github.com/WoLpH/python-utils")
16107 (synopsis "Convenient utilities not included with the standard Python install")
16108 (description
16109 "Python Utils is a collection of small Python functions and classes which
16110 make common patterns shorter and easier.")
16111 (license license:bsd-2)))
16112
16113 (define-public python2-utils
16114 (package-with-python2 python-utils))
16115
16116 (define-public python-diff-match-patch
16117 (package
16118 (name "python-diff-match-patch")
16119 (version "20121119")
16120 (source
16121 (origin
16122 (method url-fetch)
16123 (uri (pypi-uri "diff-match-patch" version))
16124 (sha256
16125 (base32
16126 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
16127 (build-system python-build-system)
16128 (home-page "https://code.google.com/p/google-diff-match-patch")
16129 (synopsis "Synchronize plain text")
16130 (description "Diff Match and Patch libraries offer robust algorithms to
16131 perform the operations required for synchronizing plain text.")
16132 (license license:asl2.0)))
16133
16134 (define-public python2-diff-match-patch
16135 (package-with-python2 python-diff-match-patch))
16136
16137 (define-public python-dirsync
16138 (package
16139 (name "python-dirsync")
16140 (version "2.2.5")
16141 (source
16142 (origin
16143 (method url-fetch)
16144 (uri (pypi-uri "dirsync" version))
16145 (sha256
16146 (base32
16147 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
16148 (build-system python-build-system)
16149 (propagated-inputs
16150 `(("six" ,python-six)))
16151 (home-page "https://github.com/tkhyn/dirsync")
16152 (synopsis "Advanced directory tree synchronisation tool")
16153 (description "Advanced directory tree synchronisation tool.")
16154 (license license:expat)))
16155
16156 (define-public python2-dirsync
16157 (package-with-python2 python-dirsync))
16158
16159 (define-public python-levenshtein
16160 (package
16161 (name "python-levenshtein")
16162 (version "0.12.0")
16163 (source
16164 (origin
16165 (method url-fetch)
16166 (uri (pypi-uri "python-Levenshtein" version))
16167 (sha256
16168 (base32
16169 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
16170 (build-system python-build-system)
16171 (home-page "https://github.com/ztane/python-Levenshtein")
16172 (synopsis "Fast computation of Levenshtein distance and string similarity")
16173 (description
16174 "The Levenshtein Python C extension module contains functions for fast computation of
16175 @enumerate
16176 @item Levenshtein (edit) distance, and edit operations
16177 @item string similarity
16178 @item approximate median strings, and generally string averaging
16179 @item string sequence and set similarity
16180 @end enumerate
16181 It supports both normal and Unicode strings.")
16182 (license license:gpl2+)))
16183
16184 (define-public python2-levenshtein
16185 (package-with-python2 python-levenshtein))
16186
16187 (define-public python-scandir
16188 (package
16189 (name "python-scandir")
16190 (version "1.10.0")
16191 (source
16192 (origin
16193 (method url-fetch)
16194 (uri (pypi-uri "scandir" version))
16195 (sha256
16196 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
16197 (build-system python-build-system)
16198 (arguments
16199 `(#:phases (modify-phases %standard-phases
16200 (replace 'check
16201 (lambda _
16202 (invoke "python" "test/run_tests.py"))))))
16203 (home-page "https://github.com/benhoyt/scandir")
16204 (synopsis "Directory iteration function")
16205 (description
16206 "Directory iteration function like os.listdir(), except that instead of
16207 returning a list of bare filenames, it yields DirEntry objects that include
16208 file type and stat information along with the name. Using scandir() increases
16209 the speed of os.walk() by 2-20 times (depending on the platform and file
16210 system) by avoiding unnecessary calls to os.stat() in most cases.
16211
16212 This package is part of the Python standard library since version 3.5.")
16213 (license license:bsd-3)))
16214
16215 (define-public python2-scandir
16216 (package-with-python2 python-scandir))
16217
16218 (define-public python2-stemming
16219 (package
16220 (name "python2-stemming")
16221 (version "1.0.1")
16222 (source
16223 (origin
16224 (method url-fetch)
16225 (uri (pypi-uri "stemming" version))
16226 (sha256
16227 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
16228 (build-system python-build-system)
16229 (arguments
16230 `(#:python ,python-2))
16231 (home-page "https://bitbucket.org/mchaput/stemming/overview")
16232 (synopsis "Python implementations of various stemming algorithms")
16233 (description
16234 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
16235 stemming algorithms for English. These implementations are straightforward and
16236 efficient, unlike some Python versions of the same algorithms available on the
16237 Web. This package is an extraction of the stemming code included in the Whoosh
16238 search engine.")
16239 (license license:public-domain)))
16240
16241 (define-public python-factory-boy
16242 (package
16243 (name "python-factory-boy")
16244 (version "2.8.1")
16245 (source
16246 (origin
16247 (method url-fetch)
16248 (uri (pypi-uri "factory_boy" version))
16249 (sha256
16250 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
16251 (build-system python-build-system)
16252 (arguments
16253 ;; Tests are not included in the tarball.
16254 `(#:tests? #f))
16255 (propagated-inputs
16256 `(("faker" ,python-faker)))
16257 (home-page "https://github.com/benhoyt/scandir")
16258 (synopsis "Versatile test fixtures replacement")
16259 (description
16260 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
16261
16262 As a fixtures replacement tool, it aims to replace static, hard to maintain
16263 fixtures with easy-to-use factories for complex object.
16264
16265 Instead of building an exhaustive test setup with every possible combination
16266 of corner cases, factory_boy allows you to use objects customized for the
16267 current test, while only declaring the test-specific fields")
16268 (license license:expat)))
16269
16270 (define-public python2-factory-boy
16271 (package-with-python2 python-factory-boy))
16272
16273 (define-public python-translate-toolkit
16274 (package
16275 (name "python-translate-toolkit")
16276 (version "2.1.0")
16277 (source
16278 (origin
16279 (method url-fetch)
16280 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
16281 (sha256
16282 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
16283 (build-system python-build-system)
16284 (native-inputs
16285 `(("python-pytest" ,python-pytest)
16286 ("python-sphinx" ,python-sphinx)))
16287 (propagated-inputs
16288 `(("python-babel" ,python-babel)
16289 ("python-beautifulsoup4" ,python-beautifulsoup4)
16290 ("python-chardet" ,python-chardet)
16291 ("python-diff-match-patch" ,python-diff-match-patch)
16292 ("python-levenshtein" ,python-levenshtein)
16293 ("python-lxml" ,python-lxml)
16294 ("python-six" ,python-six)
16295 ("python-vobject" ,python-vobject)
16296 ("python-pyyaml" ,python-pyyaml)))
16297 (arguments
16298 ;; TODO: tests are not run, because they end with
16299 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
16300 ;; 'parse_funcs'
16301 ;; during test setup.
16302 `(#:tests? #f))
16303 (home-page "https://toolkit.translatehouse.org")
16304 (synopsis "Tools and API for translation and localization engineering")
16305 (description
16306 "Tools and API for translation and localization engineering. It contains
16307 several utilities, as well as an API for building localization tools.")
16308 (license license:gpl2+)))
16309
16310 (define-public python2-translate-toolkit
16311 (package-with-python2 python-translate-toolkit))
16312
16313 (define-public python-packaging
16314 (package
16315 (name "python-packaging")
16316 (version "20.0")
16317 (source
16318 (origin
16319 (method url-fetch)
16320 (uri (pypi-uri "packaging" version))
16321 ;; XXX: The URL in the patch file is wrong, it should be
16322 ;; <https://github.com/pypa/packaging/pull/256>.
16323 (patches (search-patches "python-packaging-test-arch.patch"))
16324 (sha256
16325 (base32
16326 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
16327 (build-system python-build-system)
16328 (arguments
16329 `(#:phases (modify-phases %standard-phases
16330 (replace 'check
16331 (lambda* (#:key tests? #:allow-other-keys)
16332 (if tests?
16333 (invoke "py.test" "-vv")
16334 (format #t "test suite not run~%"))
16335 #t)))))
16336 (native-inputs
16337 `(("python-pretend" ,python-pretend)
16338 ("python-pytest" ,python-pytest)))
16339 (propagated-inputs
16340 `(("python-pyparsing" ,python-pyparsing)
16341 ("python-six" ,python-six)))
16342 (home-page "https://github.com/pypa/packaging")
16343 (synopsis "Core utilities for Python packages")
16344 (description "Packaging is a Python module for dealing with Python packages.
16345 It offers an interface for working with package versions, names, and dependency
16346 information.")
16347 ;; From 'LICENSE': This software is made available under the terms of
16348 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
16349 ;; Contributions to this software is made under the terms of *both* these
16350 ;; licenses.
16351 (license (list license:asl2.0 license:bsd-2))))
16352
16353 (define-public python2-packaging
16354 (package-with-python2 python-packaging))
16355
16356 ;; Variants with minimal dependencies, for bootstrapping Pytest.
16357 (define-public python-packaging-bootstrap
16358 (hidden-package
16359 (package/inherit
16360 python-packaging
16361 (name "python-packaging-bootstrap")
16362 (native-inputs '())
16363 (propagated-inputs
16364 `(("python-pyparsing" ,python-pyparsing)))
16365 (arguments '(#:tests? #f)))))
16366
16367 (define-public python2-packaging-bootstrap
16368 (hidden-package
16369 (package/inherit
16370 python2-packaging
16371 (name "python2-packaging-bootstrap")
16372 (native-inputs '())
16373 (propagated-inputs
16374 `(("python-pyparsing" ,python2-pyparsing)))
16375 (arguments
16376 `(#:tests? #f
16377 ,@(package-arguments python2-packaging))))))
16378
16379 (define-public python-relatorio
16380 (package
16381 (name "python-relatorio")
16382 (version "0.8.0")
16383 (source
16384 (origin
16385 (method url-fetch)
16386 (uri (pypi-uri "relatorio" version))
16387 (sha256
16388 (base32
16389 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16390 (build-system python-build-system)
16391 (propagated-inputs
16392 `(("python-lxml" ,python-lxml)
16393 ("python-genshi" ,python-genshi)))
16394 (native-inputs
16395 `(("python-magic" ,python-magic)))
16396 (home-page "https://relatorio.tryton.org/")
16397 (synopsis "Templating library able to output ODT and PDF files")
16398 (description "Relatorio is a templating library which provides a way to
16399 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16400 for more filetypes can be easily added by creating plugins for them.")
16401 (license license:gpl3+)))
16402
16403 (define-public python2-relatorio
16404 (package-with-python2 python-relatorio))
16405
16406 (define-public python-radon
16407 (package
16408 (name "python-radon")
16409 (version "4.1.0")
16410 (source
16411 (origin
16412 (method url-fetch)
16413 (uri (pypi-uri "radon" version))
16414 (sha256
16415 (base32
16416 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
16417 (build-system python-build-system)
16418 (arguments
16419 `(#:phases (modify-phases %standard-phases
16420 (replace 'check
16421 (lambda _
16422 (invoke "python" "radon/tests/run.py"))))))
16423 (propagated-inputs
16424 `(("python-colorama" ,python-colorama)
16425 ("python-flake8-polyfill" ,python-flake8-polyfill)
16426 ("python-mando" ,python-mando)))
16427 (native-inputs
16428 `(("python-pytest" ,python-pytest)
16429 ("python-pytest-mock" ,python-pytest-mock)))
16430 (home-page "https://radon.readthedocs.org/")
16431 (synopsis "Code Metrics in Python")
16432 (description "Radon is a Python tool which computes various code metrics.
16433 Supported metrics are:
16434 @itemize @bullet
16435 @item raw metrics: SLOC, comment lines, blank lines, &c.
16436 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16437 @item Halstead metrics (all of them)
16438 @item the Maintainability Index (a Visual Studio metric)
16439 @end itemize")
16440 (properties `((python2-variant . ,(delay python2-radon))))
16441 (license license:expat)))
16442
16443 (define-public python2-radon
16444 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16445 (package
16446 (inherit base)
16447 (propagated-inputs
16448 `(("python-configparser" ,python2-configparser)
16449 ("python-future" ,python2-future)
16450 ,@(package-propagated-inputs base))))))
16451
16452 (define-public python-sure
16453 (package
16454 (name "python-sure")
16455 (version "1.4.11")
16456 (source
16457 (origin
16458 (method url-fetch)
16459 (uri (pypi-uri "sure" version))
16460 (sha256
16461 (base32
16462 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16463 (build-system python-build-system)
16464 (propagated-inputs
16465 `(("python-mock" ,python-mock)
16466 ("python-six" ,python-six)))
16467 (native-inputs
16468 `(("python-nose" ,python-nose)))
16469 (home-page "https://github.com/gabrielfalcao/sure")
16470 (synopsis "Automated testing library in python for python")
16471 (description
16472 "Sure is a python library that leverages a DSL for writing assertions.
16473 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16474 (license license:gpl3+)))
16475
16476 (define-public python2-sure
16477 (package-with-python2 python-sure))
16478
16479 (define-public python2-couleur
16480 ;; This package does not seem to support python3 at all, hence,
16481 ;; only the python2 variant definition is provided.
16482 (package
16483 (name "python2-couleur")
16484 (version "0.6.2")
16485 (source
16486 (origin
16487 (method url-fetch)
16488 (uri (pypi-uri "couleur" version))
16489 (sha256
16490 (base32
16491 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16492 (build-system python-build-system)
16493 (arguments
16494 `(#:python ,python-2))
16495 (home-page "https://github.com/gabrielfalcao/couleur")
16496 (synopsis
16497 "ANSI terminal tool for python, colored shell and other handy fancy features")
16498 (description
16499 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16500 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16501 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16502 ;; https://github.com/gabrielfalcao/couleur/issues/11
16503 (license license:lgpl3+)))
16504
16505 (define-public python-misaka
16506 (package
16507 (name "python-misaka")
16508 (version "2.1.1")
16509 (source
16510 (origin
16511 (method url-fetch)
16512 (uri (pypi-uri "misaka" version))
16513 (sha256
16514 (base32
16515 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16516 (build-system python-build-system)
16517 (arguments
16518 `(;; Line 37 of setup.py calls self.run_command('develop')
16519 ;; in the 'check' phase. This command seems to be trying
16520 ;; to write to
16521 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16522 ;; for which it does not have the permission to write.
16523 #:tests? #f))
16524 (propagated-inputs
16525 `(("python-cffi" ,python-cffi)))
16526 (home-page "https://github.com/FSX/misaka")
16527 (synopsis "Python binding for Hoedown")
16528 (description
16529 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16530 library written in C. It features a fast HTML renderer and functionality to make custom
16531 renderers (e.g. man pages or LaTeX).")
16532 (license license:expat)))
16533
16534 (define-public python2-misaka
16535 (package-with-python2 python-misaka))
16536
16537 (define-public python2-steadymark
16538 ;; This is forced into being a python2 only variant
16539 ;; due to its dependence on couleur that has no support
16540 ;; for python3
16541 (package
16542 (name "python2-steadymark")
16543 (version "0.7.3")
16544 (source
16545 (origin
16546 (method url-fetch)
16547 (uri (pypi-uri "steadymark" version))
16548 (sha256
16549 (base32
16550 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16551 (build-system python-build-system)
16552 (native-inputs
16553 `(("python-couleur" ,python2-couleur)
16554 ("python-sure" ,python2-sure)
16555 ("python-misaka" ,python2-misaka)))
16556 (arguments
16557 `(#:python ,python-2
16558 #:phases
16559 (modify-phases %standard-phases
16560 (add-before 'build 'patch-setup-py
16561 (lambda _
16562 ;; Update requirements from dependency==version
16563 ;; to dependency>=version
16564 (substitute* "setup.py"
16565 (("==") ">="))
16566 #t)))))
16567 (home-page "https://github.com/gabrielfalcao/steadymark")
16568 (synopsis "Markdown-based test runner for python")
16569 (description
16570 "@code{Steadymark} allows documentation to be written in github-flavoured
16571 markdown. The documentation may contain snippets of code surrounded by python
16572 code blocks and @code{Steadymark} will find these snippets and run them, making
16573 sure that there are no old malfunctional examples in the documentation examples.")
16574 (license license:expat)))
16575
16576 (define-public python-jsonpointer
16577 (package
16578 (name "python-jsonpointer")
16579 (version "1.10")
16580 (source
16581 (origin
16582 (method url-fetch)
16583 (uri (pypi-uri "jsonpointer" version))
16584 (sha256
16585 (base32
16586 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16587 (build-system python-build-system)
16588 (home-page "https://github.com/stefankoegl/python-json-pointer")
16589 (synopsis "Identify specific nodes in a JSON document")
16590 (description "@code{jsonpointer} allows you to access specific nodes
16591 by path in a JSON document (see RFC 6901).")
16592 (license license:bsd-3)))
16593
16594 (define-public python2-jsonpointer
16595 (package-with-python2 python-jsonpointer))
16596
16597 (define-public python-jsonpatch
16598 (package
16599 (name "python-jsonpatch")
16600 (version "1.16")
16601 (source
16602 (origin
16603 (method git-fetch)
16604 ;; pypi version lacks tests.js
16605 (uri (git-reference
16606 (url "https://github.com/stefankoegl/python-json-patch")
16607 (commit (string-append "v" version))))
16608 (file-name (git-file-name name version))
16609 (sha256
16610 (base32
16611 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16612 (build-system python-build-system)
16613 (propagated-inputs
16614 `(("python-jsonpointer" ,python-jsonpointer)))
16615 (home-page "https://github.com/stefankoegl/python-json-patch")
16616 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16617 (description "@code{jsonpatch} is a library and program that allows
16618 applying JSON Patches according to RFC 6902.")
16619 (license license:bsd-3)))
16620
16621 (define-public python2-jsonpatch
16622 (package-with-python2 python-jsonpatch))
16623
16624 (define-public python-jsonpatch-0.4
16625 (package (inherit python-jsonpatch)
16626 (name "python-jsonpatch")
16627 (version "0.4")
16628 (source
16629 (origin
16630 (method git-fetch)
16631 (uri (git-reference
16632 (url "https://github.com/stefankoegl/python-json-patch")
16633 (commit (string-append "v" version))))
16634 (file-name (git-file-name name version))
16635 (sha256
16636 (base32
16637 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16638
16639 (define-public python2-jsonpatch-0.4
16640 (package-with-python2 python-jsonpatch-0.4))
16641
16642 (define-public python-rfc3986
16643 (package
16644 (name "python-rfc3986")
16645 (version "1.4.0")
16646 (source (origin
16647 (method url-fetch)
16648 (uri (pypi-uri "rfc3986" version))
16649 (sha256
16650 (base32
16651 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16652 (build-system python-build-system)
16653 (arguments
16654 `(#:modules ((guix build utils)
16655 (guix build python-build-system)
16656 (ice-9 ftw)
16657 (srfi srfi-1)
16658 (srfi srfi-26))
16659 #:phases
16660 (modify-phases %standard-phases
16661 (replace 'check
16662 (lambda _
16663 (let ((cwd (getcwd)))
16664 (setenv "PYTHONPATH"
16665 (string-append cwd "/build/"
16666 (find (cut string-prefix? "lib" <>)
16667 (scandir (string-append cwd "/build")))
16668 ":"
16669 (getenv "PYTHONPATH")))
16670 (invoke "pytest" "-v")))))))
16671 (native-inputs
16672 `(("python-pytest" ,python-pytest)))
16673 (home-page "https://rfc3986.readthedocs.io/")
16674 (synopsis "Parse and validate URI references")
16675 (description
16676 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16677 validation and authority parsing. This module also supports RFC@tie{}6874
16678 which adds support for zone identifiers to IPv6 addresses.")
16679 (license license:asl2.0)))
16680
16681 (define-public python2-rfc3986
16682 (package-with-python2 python-rfc3986))
16683
16684 (define-public python-rfc3987
16685 (package
16686 (name "python-rfc3987")
16687 (version "1.3.7")
16688 (source
16689 (origin
16690 (method url-fetch)
16691 (uri (pypi-uri "rfc3987" version))
16692 (sha256
16693 (base32
16694 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16695 (build-system python-build-system)
16696 (home-page "https://pypi.org/project/rfc3987/")
16697 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16698 (description "@code{rfc3987} provides routines for parsing and
16699 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16700 (license license:gpl3+)))
16701
16702 (define-public python2-rfc3987
16703 (package-with-python2 python-rfc3987))
16704
16705 ;; The latest commit contains fixes for building with both python3 and python2.
16706 (define-public python-rfc6555
16707 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16708 (revision "1"))
16709 (package
16710 (name "python-rfc6555")
16711 (version (git-version "0.0.0" revision commit))
16712 (source (origin
16713 (method git-fetch)
16714 (uri (git-reference
16715 (url "https://github.com/sethmlarson/rfc6555")
16716 (commit commit)))
16717 (file-name (git-file-name name version))
16718 (sha256
16719 (base32
16720 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16721 (build-system python-build-system)
16722 (arguments
16723 '(#:phases
16724 (modify-phases %standard-phases
16725 (replace 'check
16726 (lambda* (#:key tests? #:allow-other-keys)
16727 (if tests?
16728 ;; Other tests require network access.
16729 (invoke "pytest" "tests/test_ipv6.py")
16730 #t))))))
16731 (native-inputs
16732 `(("python-pytest" ,python-pytest)))
16733 (home-page "https://pypi.org/project/rfc6555/")
16734 (synopsis "Python implementation of RFC 6555")
16735 (description
16736 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16737 6555. Provided with a single file and dead-simple API to allow easy vendoring
16738 and integration into other projects.")
16739 (properties `((python2-variant . ,(delay python2-rfc6555))))
16740 (license license:asl2.0))))
16741
16742 (define-public python2-rfc6555
16743 (let ((base (package-with-python2
16744 (strip-python2-variant python-rfc6555))))
16745 (package
16746 (inherit base)
16747 (propagated-inputs
16748 `(("python2-selectors2" ,python2-selectors2))))))
16749
16750 (define-public python-bagit
16751 (package
16752 (name "python-bagit")
16753 (version "1.7.0")
16754 (source
16755 (origin
16756 (method url-fetch)
16757 (uri (pypi-uri "bagit" version))
16758 (sha256
16759 (base32
16760 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
16761 (build-system python-build-system)
16762 (native-inputs
16763 `(("python-setuptools-scm" ,python-setuptools-scm)
16764 ("python-coverage" ,python-coverage)
16765 ("python-mock" ,python-mock)))
16766 (home-page "https://libraryofcongress.github.io/bagit-python/")
16767 (synopsis "Create and validate BagIt packages")
16768 (description "Bagit is a Python library and command line utility for working
16769 with BagIt style packages. BagIt is a minimalist packaging format for digital
16770 preservation.")
16771 (license license:cc0)))
16772
16773 (define-public python-prov
16774 (package
16775 (name "python-prov")
16776 (version "2.0.0")
16777 (source
16778 (origin
16779 (method url-fetch)
16780 (uri (pypi-uri "prov" version))
16781 (sha256
16782 (base32
16783 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
16784 (build-system python-build-system)
16785 (propagated-inputs
16786 `(("python-dateutil" ,python-dateutil)
16787 ("python-lxml" ,python-lxml)
16788 ("python-networkx" ,python-networkx)
16789 ("python-rdflib" ,python-rdflib)))
16790 (native-inputs
16791 `(("graphviz" ,graphviz)
16792 ("python-pydot" ,python-pydot)))
16793 (home-page "https://github.com/trungdong/prov")
16794 (synopsis
16795 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
16796 (description
16797 "This package provides a library for W3C Provenance Data Model supporting
16798 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
16799 (license license:expat)))
16800
16801 (define-public python-arcp
16802 (package
16803 (name "python-arcp")
16804 (version "0.2.1")
16805 (source
16806 (origin
16807 (method url-fetch)
16808 (uri (pypi-uri "arcp" version))
16809 (sha256
16810 (base32
16811 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
16812 (build-system python-build-system)
16813 (native-inputs
16814 `(("python-pytest" ,python-pytest)))
16815 (home-page "http://arcp.readthedocs.io/")
16816 (synopsis
16817 "Archive and Package URI parser and generator")
16818 (description
16819 "@acronym{arcp, Archive and Package} provides functions for creating
16820 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
16821 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
16822 consume or reference hypermedia resources bundled inside a file archive or an
16823 application package, as well as to resolve URIs for archive resources within a
16824 programmatic framework. This URI scheme provides mechanisms to generate a
16825 unique base URI to represent the root of the archive, so that relative URI
16826 references in a bundled resource can be resolved within the archive without
16827 having to extract the archive content on the local file system. An arcp URI can
16828 be used for purposes of isolation (e.g. when consuming multiple archives),
16829 security constraints (avoiding \"climb out\" from the archive), or for
16830 externally identiyfing sub-resources referenced by hypermedia formats.")
16831 (license license:asl2.0)))
16832
16833 (define-public python-shellescape
16834 (package
16835 (name "python-shellescape")
16836 (version "3.8.1")
16837 (source
16838 (origin
16839 (method git-fetch)
16840 (uri (git-reference
16841 (url "https://github.com/chrissimpkins/shellescape")
16842 (commit (string-append "v" version))))
16843 (file-name (git-file-name name version))
16844 (sha256
16845 (base32
16846 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
16847 (build-system python-build-system)
16848 (arguments
16849 '(#:phases
16850 (modify-phases %standard-phases
16851 (replace 'check
16852 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
16853 (when tests?
16854 (add-installed-pythonpath inputs outputs)
16855 (invoke "python" "tests/test_shellescape.py"))
16856 #t)))))
16857 (native-inputs
16858 `(("python-pytest" ,python-pytest)))
16859 (home-page "https://github.com/chrissimpkins/shellescape")
16860 (synopsis
16861 "Shell escape a string to safely use it as a token in a shell command")
16862 (description
16863 "The shellescape Python module defines the @code{shellescape.quote()}
16864 function that returns a shell-escaped version of a Python string. This is a
16865 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
16866 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
16867 (license license:expat)))
16868
16869 (define-public python-validators
16870 (package
16871 (name "python-validators")
16872 (version "0.14.2")
16873 (source (origin
16874 (method url-fetch)
16875 (uri (pypi-uri "validators" version))
16876 (sha256
16877 (base32
16878 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
16879 (build-system python-build-system)
16880 (arguments
16881 '(#:phases (modify-phases %standard-phases
16882 (replace 'check
16883 (lambda _
16884 (invoke "pytest" "-vv"))))))
16885 (propagated-inputs
16886 `(("python-decorator" ,python-decorator)
16887 ("python-six" ,python-six)))
16888 (native-inputs
16889 `(("python-flake8" ,python-flake8)
16890 ("python-isort" ,python-isort)
16891 ("python-pytest" ,python-pytest)))
16892 (home-page "https://github.com/kvesteri/validators")
16893 (synopsis "Data validation library")
16894 (description
16895 "This package contains validators for different things such as email
16896 addresses, IP addresses, URLs, hashes and more. It has been designed to
16897 be easy to use and not require defining a schema or form just to validate
16898 some input.")
16899 (license license:expat)))
16900
16901 (define-public python2-validators
16902 (package-with-python2 python-validators))
16903
16904 (define-public python-validate-email
16905 (package
16906 (name "python-validate-email")
16907 (version "1.3")
16908 (source
16909 (origin
16910 (method url-fetch)
16911 (uri (pypi-uri "validate_email" version))
16912 (sha256
16913 (base32
16914 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16915 (build-system python-build-system)
16916 (home-page "https://github.com/syrusakbary/validate_email")
16917 (synopsis "Verifies if an email address is valid and really exists")
16918 (description "@code{validate_email} can be used to verify if an email
16919 address is valid and really exists.")
16920 (license license:lgpl3+)))
16921
16922 (define-public python2-validate-email
16923 (package-with-python2 python-validate-email))
16924
16925 (define-public python-flex
16926 (package
16927 (name "python-flex")
16928 (version "6.10.0")
16929 (source
16930 (origin
16931 (method url-fetch)
16932 (uri (pypi-uri "flex" version))
16933 (sha256
16934 (base32
16935 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16936 (build-system python-build-system)
16937 (propagated-inputs
16938 `(("python-click" ,python-click)
16939 ("python-iso8601" ,python-iso8601)
16940 ("python-jsonpointer" ,python-jsonpointer)
16941 ("python-pyyaml" ,python-pyyaml)
16942 ("python-requests" ,python-requests)
16943 ("python-rfc3987" ,python-rfc3987)
16944 ("python-six" ,python-six)
16945 ("python-validate-email" ,python-validate-email)))
16946 (home-page "https://github.com/pipermerriam/flex")
16947 (synopsis "Validates Swagger schemata")
16948 (description "@code{flex} can be used to validate Swagger schemata.")
16949 (license license:bsd-3)))
16950
16951 (define-public python2-flex
16952 (package-with-python2 python-flex))
16953
16954 (define-public python-marshmallow
16955 (package
16956 (name "python-marshmallow")
16957 (version "3.9.1")
16958 (source
16959 (origin
16960 (method url-fetch)
16961 (uri (pypi-uri "marshmallow" version))
16962 (sha256
16963 (base32
16964 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
16965 (build-system python-build-system)
16966 (propagated-inputs
16967 `(("python-dateutil" ,python-dateutil)
16968 ("python-simplejson" ,python-simplejson)))
16969 (native-inputs
16970 `(("python-pytest" ,python-pytest)
16971 ("python-pytz" ,python-pytz)))
16972 (home-page "https://github.com/marshmallow-code/marshmallow")
16973 (synopsis "Convert complex datatypes to and from native
16974 Python datatypes.")
16975 (description "@code{marshmallow} provides a library for converting
16976 complex datatypes to and from native Python datatypes.")
16977 (license license:expat)))
16978
16979 (define-public python-apispec
16980 (package
16981 (name "python-apispec")
16982 (version "4.0.0")
16983 (source
16984 (origin
16985 (method url-fetch)
16986 (uri (pypi-uri "apispec" version))
16987 (sha256
16988 (base32
16989 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
16990 (build-system python-build-system)
16991 (arguments
16992 '(#:phases (modify-phases %standard-phases
16993 (add-after 'unpack 'disable-prance-tests
16994 (lambda _
16995 ;; Disable validation tests since they require the
16996 ;; optional 'prance' library which is not yet in Guix.
16997 (substitute* "tests/test_ext_marshmallow_openapi.py"
16998 (("def test_openapi_tools_validate.*" all)
16999 (string-append "@pytest.mark.xfail\n" all)))))
17000 (replace 'check
17001 (lambda _
17002 (setenv "PYTHONPATH"
17003 (string-append "./build/lib:"
17004 (getenv "PYTHONPATH")))
17005 (invoke "pytest" "-vv"))))))
17006 (propagated-inputs
17007 `(("python-pyyaml" ,python-pyyaml)))
17008 (native-inputs
17009 `(("python-pytest" ,python-pytest)
17010 ("python-marshmallow" ,python-marshmallow)))
17011 (home-page "https://github.com/marshmallow-code/apispec")
17012 (synopsis "Swagger/OpenAPI specification generator")
17013 (description "@code{python-apispec} is a pluggable API specification
17014 generator. It currently supports the OpenAPI specification, formerly known
17015 as Swagger.")
17016 (license license:expat)))
17017
17018 (define-public python-flasgger
17019 (package
17020 (name "python-flasgger")
17021 (version "0.6.3")
17022 (source
17023 (origin
17024 (method git-fetch)
17025 (uri (git-reference
17026 (url "https://github.com/rochacbruno/flasgger")
17027 (commit version)))
17028 (file-name (git-file-name name version))
17029 (sha256
17030 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
17031 (build-system python-build-system)
17032 (arguments
17033 `(#:phases
17034 (modify-phases %standard-phases
17035 (replace 'check
17036 (lambda* (#:key inputs outputs #:allow-other-keys)
17037 (substitute* "Makefile"
17038 (("flake8 flasgger --ignore=F403")
17039 "flake8 flasgger --ignore=E731,F403"))
17040 (setenv "PYTHONPATH" (string-append (getcwd)
17041 ":"
17042 (getenv "PYTHONPATH")))
17043 (invoke "py.test"))))))
17044 (propagated-inputs
17045 `(("python-flask" ,python-flask)
17046 ("python-pyyaml" ,python-pyyaml)
17047 ("python-jsonschema" ,python-jsonschema)
17048 ("python-mistune" ,python-mistune)
17049 ("python-six" ,python-six)))
17050 (native-inputs
17051 `(("python-decorator" ,python-decorator)
17052 ("python-flake8" ,python-flake8)
17053 ("python-flask-restful" ,python-flask-restful)
17054 ("python-flex" ,python-flex)
17055 ("python-pytest" ,python-pytest)
17056 ("python-pytest-cov" ,python-pytest-cov)
17057 ("python-marshmallow" ,python-marshmallow)
17058 ("python-apispec" ,python-apispec)))
17059 (home-page "https://github.com/rochacbruno/flasgger/")
17060 (synopsis "Extract Swagger specs from your Flask project")
17061 (description "@code{python-flasgger} allows extracting Swagger specs
17062 from your Flask project. It is a fork of Flask-Swagger.")
17063 (license license:expat)))
17064
17065 (define-public python-swagger-spec-validator
17066 (package
17067 (name "python-swagger-spec-validator")
17068 (version "2.4.3")
17069 (source
17070 (origin
17071 (method url-fetch)
17072 (uri (pypi-uri "swagger-spec-validator" version))
17073 (sha256
17074 (base32
17075 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
17076 (build-system python-build-system)
17077 (propagated-inputs
17078 `(("python-jsonschema" ,python-jsonschema)
17079 ("python-pyyaml" ,python-pyyaml)
17080 ("python-six" ,python-six)))
17081 (home-page
17082 "https://github.com/Yelp/swagger_spec_validator")
17083 (synopsis "Validation of Swagger specifications")
17084 (description "@code{swagger_spec_validator} provides a library for
17085 validating Swagger API specifications.")
17086 (license license:asl2.0)))
17087
17088 (define-public python2-swagger-spec-validator
17089 (package-with-python2 python-swagger-spec-validator))
17090
17091 (define-public python-apache-libcloud
17092 (package
17093 (name "python-apache-libcloud")
17094 (version "3.1.0")
17095 (source
17096 (origin
17097 (method url-fetch)
17098 (uri (pypi-uri "apache-libcloud" version))
17099 (sha256
17100 (base32
17101 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
17102 (build-system python-build-system)
17103 (arguments
17104 `(#:phases
17105 (modify-phases %standard-phases
17106 (add-after 'unpack 'patch-ssh
17107 (lambda* (#:key inputs #:allow-other-keys)
17108 (substitute* "libcloud/compute/ssh.py"
17109 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
17110 "/bin/ssh" "'")))
17111 #t))
17112 (add-after 'unpack 'patch-tests
17113 (lambda _
17114 (substitute* "libcloud/test/compute/test_ssh_client.py"
17115 (("class ShellOutSSHClientTests")
17116 "@unittest.skip(\"Guix container doesn't have ssh service\")
17117 class ShellOutSSHClientTests"))
17118 #t))
17119 (add-before 'check 'copy-secret
17120 (lambda _
17121 (copy-file "libcloud/test/secrets.py-dist"
17122 "libcloud/test/secrets.py")
17123 #t)))))
17124 (inputs
17125 `(("openssh" ,openssh)))
17126 (propagated-inputs
17127 `(("python-paramiko" ,python-paramiko)
17128 ("python-requests" ,python-requests)))
17129 (native-inputs
17130 `(("python-lockfile" ,python-lockfile)
17131 ("python-mock" ,python-mock)
17132 ("python-pytest" ,python-pytest)
17133 ("python-pytest-runner" ,python-pytest-runner)
17134 ("python-requests-mock" ,python-requests-mock)))
17135 (home-page "https://libcloud.apache.org/")
17136 (synopsis "Unified Cloud API")
17137 (description "@code{libcloud} is a Python library for interacting with
17138 many of the popular cloud service providers using a unified API.")
17139 (license license:asl2.0)))
17140
17141 (define-public python-smmap
17142 (package
17143 (name "python-smmap")
17144 (version "3.0.1")
17145 (source
17146 (origin
17147 (method url-fetch)
17148 (uri (pypi-uri "smmap" version))
17149 (sha256
17150 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
17151 (build-system python-build-system)
17152 (native-inputs
17153 `(("python-nosexcover" ,python-nosexcover)))
17154 (home-page "https://github.com/Byron/smmap")
17155 (synopsis "Python sliding window memory map manager")
17156 (description "@code{smmap} is a pure Python implementation of a sliding
17157 window memory map manager.")
17158 (license license:bsd-3)))
17159
17160 (define-public python-smmap2
17161 (deprecated-package "python-smmap2" python-smmap))
17162
17163 (define-public python2-smmap
17164 (package-with-python2 python-smmap))
17165
17166 (define-public python2-smmap2
17167 (deprecated-package "python2-smmap2" python2-smmap))
17168
17169 (define-public python-regex
17170 (package
17171 (name "python-regex")
17172 (version "2020.6.8")
17173 (source (origin
17174 (method url-fetch)
17175 (uri (pypi-uri "regex" version))
17176 (sha256
17177 (base32
17178 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
17179 (build-system python-build-system)
17180 (arguments
17181 '(#:phases
17182 (modify-phases %standard-phases
17183 (replace 'check
17184 (lambda* (#:key inputs outputs #:allow-other-keys)
17185 (add-installed-pythonpath inputs outputs)
17186 (invoke "python" "-c"
17187 "from regex.test_regex import test_main; test_main()"))))))
17188 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
17189 (synopsis "Alternative regular expression module")
17190 (description "This regular expression implementation is backwards-
17191 compatible with the standard @code{re} module, but offers additional
17192 functionality like full case-folding for case-insensitive matches in Unicode.")
17193 (license license:psfl)))
17194
17195 (define-public python2-regex
17196 (package-with-python2 python-regex))
17197
17198 (define-public python-pyopengl
17199 (package
17200 (name "python-pyopengl")
17201 (version "3.1.5")
17202 (source
17203 (origin
17204 (method url-fetch)
17205 (uri (pypi-uri "PyOpenGL" version))
17206 (sha256
17207 (base32
17208 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
17209 (build-system python-build-system)
17210 (inputs
17211 `(("mesa" ,mesa)
17212 ("freeglut" ,freeglut)
17213 ("glu" ,glu)))
17214 (arguments
17215 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
17216 ;attribute 'OSMesa'
17217 #:phases
17218 (modify-phases %standard-phases
17219 (add-before 'build 'fix-paths
17220 (lambda* (#:key inputs outputs #:allow-other-keys)
17221 (substitute* '("OpenGL/platform/ctypesloader.py")
17222 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
17223 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
17224 (("'GL'")
17225 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
17226 (("'GLU'")
17227 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
17228 (("'glut',")
17229 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
17230 (("'GLESv1_CM'")
17231 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
17232 (("'GLESv2'")
17233 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
17234 ;; Not providing libgle. It seems to be very old.
17235 #t)))))
17236 (home-page "http://pyopengl.sourceforge.net")
17237 (synopsis "Standard OpenGL bindings for Python")
17238 (description
17239 "PyOpenGL is the most common cross platform Python binding to OpenGL and
17240 related APIs. The binding is created using the standard @code{ctypes}
17241 library.")
17242 (license license:bsd-3)))
17243
17244 (define-public python-pyopengl-accelerate
17245 (package
17246 (inherit python-pyopengl)
17247 (name "python-pyopengl-accelerate")
17248 (version "3.1.5")
17249 (source
17250 (origin
17251 (method url-fetch)
17252 (uri (pypi-uri "PyOpenGL-accelerate" version))
17253 (sha256
17254 (base32
17255 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
17256 (inputs
17257 `(("mesa" ,mesa)
17258 ("python-numpy" ,python-numpy))) ; for cython module
17259 ; numpy_formathandler, thus not propagated
17260 (arguments
17261 `(#:tests? #f
17262 #:phases
17263 (modify-phases %standard-phases
17264 (delete 'fix-paths))))
17265 (synopsis "Acceleration code for PyOpenGL")
17266 (description
17267 "This is the Cython-coded accelerator module for PyOpenGL.")))
17268
17269 (define-public python-rencode
17270 (package
17271 (name "python-rencode")
17272 (version "1.0.5")
17273 (source
17274 (origin
17275 (method url-fetch)
17276 (uri (pypi-uri "rencode" version))
17277 (sha256
17278 (base32
17279 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
17280 (build-system python-build-system)
17281 (arguments
17282 `(#:phases
17283 (modify-phases %standard-phases
17284 (add-before 'check 'delete-bogus-test
17285 ;; This test requires /home/aresch/Downloads, which is not provided by
17286 ;; the build environment.
17287 (lambda _
17288 (delete-file "rencode/t.py")
17289 #t)))))
17290 (native-inputs `(("pkg-config" ,pkg-config)
17291 ("python-cython" ,python-cython)))
17292 (home-page "https://github.com/aresch/rencode")
17293 (synopsis "Serialization of heterogeneous data structures")
17294 (description
17295 "The @code{rencode} module is a data structure serialization library,
17296 similar to @code{bencode} from the BitTorrent project. For complex,
17297 heterogeneous data structures with many small elements, r-encoding stake up
17298 significantly less space than b-encodings. This version of rencode is a
17299 complete rewrite in Cython to attempt to increase the performance over the
17300 pure Python module.")
17301 (license license:bsd-3)))
17302
17303 (define-public python2-rencode
17304 (package-with-python2 python-rencode))
17305
17306 (define-public python-xenon
17307 (package
17308 (name "python-xenon")
17309 (version "0.7.0")
17310 (source
17311 (origin
17312 (method url-fetch)
17313 (uri (pypi-uri "xenon" version))
17314 (sha256
17315 (base32
17316 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
17317 (build-system python-build-system)
17318 (native-inputs
17319 `(("python-pyyaml" ,python-pyyaml)
17320 ("python-radon" ,python-radon)
17321 ("python-requests" ,python-requests)
17322 ("python-flake8" ,python-flake8)
17323 ("python-tox" ,python-tox)))
17324 (arguments
17325 `(#:tests? #f ;test suite not shipped with the PyPI archive
17326 #:phases
17327 (modify-phases %standard-phases
17328 (add-before 'build 'patch-test-requirements
17329 (lambda _
17330 ;; Remove httpretty dependency for tests.
17331 (substitute* "setup.py"
17332 (("httpretty") ""))
17333 #t)))))
17334 (home-page "https://xenon.readthedocs.org/")
17335 (synopsis "Monitor code metrics for Python on your CI server")
17336 (description
17337 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
17338 Ideally, @code{xenon} is run every time code is committed. Through command
17339 line options, various thresholds can be set for the complexity of code. It
17340 will fail (i.e. it will exit with a non-zero exit code) when any of these
17341 requirements is not met.")
17342 (license license:expat)))
17343
17344 (define-public python-pysocks
17345 (package
17346 (name "python-pysocks")
17347 (version "1.7.1")
17348 (source
17349 (origin
17350 (method url-fetch)
17351 (uri (pypi-uri "PySocks" version))
17352 (sha256
17353 (base32
17354 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
17355 (build-system python-build-system)
17356 (arguments `(#:tests? #f))
17357 (home-page "https://github.com/Anorov/PySocks")
17358 (synopsis "SOCKS client module")
17359 (description "@code{pysocks} is an updated and semi-actively maintained
17360 version of @code{SocksiPy} with bug fixes and extra features.")
17361 (license license:bsd-3)))
17362
17363 (define-public python2-pysocks
17364 (package-with-python2 python-pysocks))
17365
17366 (define-public python-pydiff
17367 (package
17368 (name "python-pydiff")
17369 (version "0.2")
17370 (source
17371 (origin
17372 (method url-fetch)
17373 (uri (pypi-uri "pydiff" version))
17374 (sha256
17375 (base32
17376 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17377 (build-system python-build-system)
17378 (home-page "https://github.com/myint/pydiff")
17379 (synopsis "Library to diff two Python files at the bytecode level")
17380 (description
17381 "@code{pydiff} makes it easy to look for actual code changes while
17382 ignoring formatting changes.")
17383 (license license:expat)))
17384
17385 (define-public python2-pydiff
17386 (package-with-python2 python-pydiff))
17387
17388 (define-public python-pydub
17389 (package
17390 (name "python-pydub")
17391 (version "0.24.1")
17392 (source
17393 (origin
17394 (method url-fetch)
17395 (uri (pypi-uri "pydub" version))
17396 (sha256
17397 (base32
17398 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17399 (build-system python-build-system)
17400 (arguments
17401 `(#:phases
17402 (modify-phases %standard-phases
17403 (add-after 'unpack 'fix-ffmpeg-path
17404 (lambda* (#:key inputs #:allow-other-keys)
17405 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17406 (substitute* '("pydub/utils.py")
17407 (("return \"ffmpeg\"")
17408 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17409 (("return \"ffplay\"")
17410 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17411 (("return \"ffprobe\"")
17412 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17413 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17414 #t))))))
17415 (home-page "https://pydub.com")
17416 (inputs
17417 `(("ffmpeg" ,ffmpeg)))
17418 (propagated-inputs
17419 `(("python-scipy" ,python-scipy)))
17420 (synopsis "Manipulate audio with a high level interface in Python")
17421 (description
17422 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17423 @code{ffmpeg} to open various audio formats.")
17424 (license license:expat))) ; MIT license
17425
17426 (define-public python-tqdm
17427 (package
17428 (name "python-tqdm")
17429 (version "4.43.0")
17430 (source
17431 (origin
17432 (method url-fetch)
17433 (uri (pypi-uri "tqdm" version))
17434 (sha256
17435 (base32
17436 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17437 (build-system python-build-system)
17438 (arguments
17439 '(#:phases (modify-phases %standard-phases
17440 (replace 'check
17441 (lambda* (#:key inputs outputs #:allow-other-keys)
17442 (add-installed-pythonpath inputs outputs)
17443 ;; This invokation is taken from tox.ini.
17444 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17445 "-d" "-v" "tqdm/"))))))
17446 (native-inputs
17447 `(("python-nose" ,python-nose)))
17448 (home-page "https://github.com/tqdm/tqdm")
17449 (synopsis "Fast, extensible progress meter")
17450 (description
17451 "Make loops show a progress bar on the console by just wrapping any
17452 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17453 design and layout.")
17454 (license (list license:mpl2.0 license:expat))))
17455
17456 (define-public python2-tqdm
17457 (package-with-python2 python-tqdm))
17458
17459 (define-public python-pkginfo
17460 (package
17461 (name "python-pkginfo")
17462 (version "1.7.0")
17463 (source
17464 (origin
17465 (method url-fetch)
17466 (uri (pypi-uri "pkginfo" version))
17467 (sha256
17468 (base32
17469 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
17470 (build-system python-build-system)
17471 (arguments
17472 `(#:phases
17473 (modify-phases %standard-phases
17474 (add-before 'check 'patch-tests
17475 (lambda _
17476 (substitute* "pkginfo/tests/test_installed.py"
17477 (("test_ctor_w_package_no_PKG_INFO")
17478 "_test_ctor_w_package_no_PKG_INFO"))
17479 #t)))))
17480 (home-page
17481 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17482 (synopsis
17483 "Query metadatdata from sdists, bdists, and installed packages")
17484 (description
17485 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17486 source distriubtion (an sdist) or a binary distribution (e.g., created by
17487 running bdist_egg). It can also query the EGG-INFO directory of an installed
17488 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17489 created by running @code{python setup.py develop}).")
17490 (license license:expat)))
17491
17492 (define-public python2-pkginfo
17493 (package-with-python2 python-pkginfo))
17494
17495 (define-public python-twine
17496 (package
17497 (name "python-twine")
17498 (version "1.15.0")
17499 (source
17500 (origin
17501 (method url-fetch)
17502 (uri (pypi-uri "twine" version))
17503 (sha256
17504 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17505 (build-system python-build-system)
17506 (propagated-inputs
17507 `(("python-tqdm" ,python-tqdm)
17508 ("python-packaging" ,python-packaging)
17509 ("python-pkginfo" ,python-pkginfo)
17510 ("python-readme-renderer" ,python-readme-renderer)
17511 ("python-requests" ,python-requests)
17512 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17513 (home-page "https://github.com/pypa/twine")
17514 (synopsis "Collection of utilities for interacting with PyPI")
17515 (description
17516 "@code{twine} currently supports registering projects and uploading
17517 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17518 their files and supports any packaging format (including wheels).")
17519 (license license:asl2.0)))
17520
17521 (define-public python2-twine
17522 (package-with-python2 python-twine))
17523
17524 (define-public python-linecache2
17525 (package
17526 (name "python-linecache2")
17527 (version "1.0.0")
17528 (source
17529 (origin
17530 (method url-fetch)
17531 (uri (pypi-uri "linecache2" version))
17532 (sha256
17533 (base32
17534 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17535 (build-system python-build-system)
17536 (arguments
17537 `(;; The tests depend on unittest2, and our version is a bit too old.
17538 #:tests? #f))
17539 (native-inputs
17540 `(("python-pbr" ,python-pbr-minimal)))
17541 (home-page
17542 "https://github.com/testing-cabal/linecache2")
17543 (synopsis "Backports of the linecache module")
17544 (description
17545 "The linecache module allows one to get any line from any file, while
17546 attempting to optimize internally, using a cache, the common case where many
17547 lines are read from a single file.")
17548 (license license:psfl)))
17549
17550 (define-public python2-linecache2
17551 (package-with-python2 python-linecache2))
17552
17553 (define-public python-traceback2
17554 (package
17555 (name "python-traceback2")
17556 (version "1.4.0")
17557 (source
17558 (origin
17559 (method url-fetch)
17560 (uri (pypi-uri "traceback2" version))
17561 (sha256
17562 (base32
17563 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17564 (build-system python-build-system)
17565 (arguments
17566 `(;; python-traceback2 and python-unittest2 depend on one another.
17567 #:tests? #f))
17568 (native-inputs
17569 `(("python-pbr" ,python-pbr-minimal)))
17570 (propagated-inputs
17571 `(("python-linecache2" ,python-linecache2)))
17572 (home-page
17573 "https://github.com/testing-cabal/traceback2")
17574 (synopsis "Backports of the traceback module")
17575 (description
17576 "This module provides a standard interface to extract, format and print
17577 stack traces of Python programs. It exactly mimics the behavior of the Python
17578 interpreter when it prints a stack trace.")
17579 (license license:psfl)))
17580
17581 (define-public python2-traceback2
17582 (package-with-python2 python-traceback2))
17583
17584 (define-public python-ratelimiter
17585 (package
17586 (name "python-ratelimiter")
17587 (version "1.2.0")
17588 (source
17589 (origin
17590 (method url-fetch)
17591 (uri (pypi-uri "ratelimiter" version))
17592 (sha256
17593 (base32
17594 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17595 (build-system python-build-system)
17596 (arguments
17597 '(#:tests? #f)) ; There are no tests in the pypi archive.
17598 (home-page "https://github.com/RazerM/ratelimiter")
17599 (synopsis "Simple rate limiting object")
17600 (description
17601 "The @code{ratelimiter} module ensures that an operation will not be
17602 executed more than a given number of times during a given period.")
17603 (license license:asl2.0)))
17604
17605 (define-public python2-ratelimiter
17606 (package-with-python2 python-ratelimiter))
17607
17608 (define-public python-dukpy
17609 (package
17610 (name "python-dukpy")
17611 (version "0.3")
17612 (source
17613 (origin
17614 (method git-fetch)
17615 (uri (git-reference
17616 (url "https://github.com/kovidgoyal/dukpy")
17617 (commit (string-append "v" version))))
17618 (file-name (git-file-name name version))
17619 (sha256
17620 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17621 (build-system python-build-system)
17622 (home-page "https://github.com/kovidgoyal/dukpy")
17623 (synopsis "Run JavaScript in python")
17624 (description
17625 "dukpy is a JavaScript runtime environment for Python using the duktape
17626 embeddable JavaScript engine.")
17627 ;; Dukpy is licensed under MIT like the embedded duktape library,
17628 ;; with 'errors.c' as GPL3.
17629 (license (list license:expat license:gpl3))))
17630
17631 (define-public python2-dukpy
17632 (package-with-python2 python-dukpy))
17633
17634 (define-public python-jsonrpclib-pelix
17635 (package
17636 (name "python-jsonrpclib-pelix")
17637 (version "0.3.2")
17638 (source
17639 (origin
17640 (method url-fetch)
17641 (uri (pypi-uri "jsonrpclib-pelix" version))
17642 (sha256
17643 (base32
17644 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17645 (build-system python-build-system)
17646 (arguments
17647 `(#:tests? #f)) ; no tests in PyPI tarball
17648 (home-page "https://github.com/tcalmant/jsonrpclib/")
17649 (synopsis "JSON-RPC 2.0 client library for Python")
17650 (description
17651 "This library implements the JSON-RPC v2.0
17652 specification (backwards-compatible) as a client library for Python. This
17653 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17654 services.")
17655 (license license:asl2.0)))
17656
17657 (define-public python2-jsonrpclib-pelix
17658 (package-with-python2 python-jsonrpclib-pelix))
17659
17660 (define-public python-setuptools-scm-git-archive
17661 (package
17662 (name "python-setuptools-scm-git-archive")
17663 (version "1.0")
17664 (source
17665 (origin
17666 (method url-fetch)
17667 (uri (pypi-uri "setuptools_scm_git_archive" version))
17668 (sha256
17669 (base32
17670 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17671 (build-system python-build-system)
17672 (native-inputs
17673 `(("python-pytest" ,python-pytest)))
17674 (propagated-inputs
17675 `(("python-setuptools-scm" ,python-setuptools-scm)))
17676 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17677 (synopsis "Setuptools_scm plugin for git archives")
17678 (description
17679 "The setuptools_scm_git_archive package is a plugin to
17680 setuptools_scm, which supports obtaining versions from git archives that
17681 belong to tagged versions.")
17682 (license license:expat)))
17683
17684 (define-public python2-setuptools-scm-git-archive
17685 (package-with-python2 python-setuptools-scm-git-archive))
17686
17687 (define-public python-setuptools-git
17688 (package
17689 (name "python-setuptools-git")
17690 (version "1.2")
17691 (source
17692 (origin
17693 (method url-fetch)
17694 (uri (pypi-uri "setuptools-git" version))
17695 (sha256
17696 (base32
17697 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17698 (build-system python-build-system)
17699 (arguments
17700 `(#:phases
17701 (modify-phases %standard-phases
17702 ;; This is needed for tests.
17703 (add-after 'unpack 'configure-git
17704 (lambda _
17705 (setenv "HOME" "/tmp")
17706 (invoke "git" "config" "--global" "user.email" "guix")
17707 (invoke "git" "config" "--global" "user.name" "guix")
17708 #t)))))
17709 (native-inputs
17710 `(("git" ,git-minimal)))
17711 (home-page "https://github.com/msabramo/setuptools-git")
17712 (synopsis "Setuptools revision control system plugin for Git")
17713 (description
17714 "This package provides a plugin for Setuptools for revision control with
17715 Git.")
17716 (license license:bsd-3)))
17717
17718 (define-public python-pyclipper
17719 (package
17720 (name "python-pyclipper")
17721 (version "1.1.0.post3")
17722 (source
17723 (origin
17724 (method url-fetch)
17725 (uri (pypi-uri "pyclipper" version ".zip"))
17726 (sha256
17727 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17728 (modules '((guix build utils)))
17729 (snippet
17730 '(begin
17731 ;; This file is generated by Cython.
17732 (delete-file "pyclipper/pyclipper.cpp") #t))))
17733 (build-system python-build-system)
17734 (arguments
17735 `(#:phases
17736 (modify-phases %standard-phases
17737 (add-before 'build 'cythonize-sources
17738 (lambda _
17739 (with-directory-excursion "pyclipper"
17740 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17741 (propagated-inputs
17742 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17743 (native-inputs
17744 `(("python-cython" ,python-cython)
17745 ("python-pytest" ,python-pytest)
17746 ("python-pytest-runner" ,python-pytest-runner)
17747 ("python-unittest2" ,python-unittest2)
17748 ("unzip" ,unzip)))
17749 (home-page "https://github.com/greginvm/pyclipper")
17750 (synopsis "Wrapper for Angus Johnson's Clipper library")
17751 (description
17752 "Pyclipper is a Cython wrapper for the C++ translation of the
17753 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17754 (license license:expat)))
17755
17756 (define-public python2-pyclipper
17757 (package-with-python2 python-pyclipper))
17758
17759 (define-public python2-booleanoperations
17760 (package
17761 (name "python2-booleanoperations")
17762 (version "0.7.1")
17763 (source
17764 (origin
17765 (method url-fetch)
17766 (uri (pypi-uri "booleanOperations" version ".zip"))
17767 (sha256
17768 (base32
17769 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17770 (build-system python-build-system)
17771 (arguments
17772 `(#:python ,python-2))
17773 (native-inputs
17774 `(("unzip" ,unzip)
17775 ("python2-pytest" ,python2-pytest)
17776 ("python2-pytest-runner" ,python2-pytest-runner)))
17777 (propagated-inputs
17778 `(("python-fonttools" ,python2-fonttools)
17779 ("python-pyclipper" ,python2-pyclipper)
17780 ("python-ufolib" ,python2-ufolib)))
17781 (home-page "https://github.com/typemytype/booleanOperations")
17782 (synopsis "Boolean operations on paths")
17783 (description
17784 "BooleanOperations provides a Python library that enables
17785 boolean operations on paths.")
17786 (license license:expat)))
17787
17788 (define-public python-tempdir
17789 (package
17790 (name "python-tempdir")
17791 (version "0.7.1")
17792 (source
17793 (origin
17794 (method url-fetch)
17795 (uri (pypi-uri "tempdir" version))
17796 (sha256
17797 (base32
17798 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17799 (build-system python-build-system)
17800 (home-page "https://pypi.org/project/tempdir/")
17801 (arguments
17802 ;; the package has no tests
17803 '(#:tests? #f))
17804 (synopsis "Python library for managing temporary directories")
17805 (description
17806 "This library manages temporary directories that are automatically
17807 deleted with all their contents when they are no longer needed. It is
17808 particularly convenient for use in tests.")
17809 (license license:expat)))
17810
17811 (define-public python2-tempdir
17812 (package-with-python2 python-tempdir))
17813
17814 (define-public python-activepapers
17815 (package
17816 (name "python-activepapers")
17817 (version "0.2.2")
17818 (source
17819 (origin
17820 (method url-fetch)
17821 (uri (pypi-uri "ActivePapers.Py" version))
17822 (sha256
17823 (base32
17824 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17825 (build-system python-build-system)
17826 (arguments
17827 `(#:modules ((ice-9 ftw)
17828 (srfi srfi-1)
17829 (guix build utils)
17830 (guix build python-build-system))
17831
17832 #:phases
17833 (modify-phases %standard-phases
17834 (add-after 'unpack 'delete-python2-code
17835 (lambda _
17836 (for-each delete-file
17837 '("lib/activepapers/builtins2.py"
17838 "lib/activepapers/standardlib2.py"
17839 "lib/activepapers/utility2.py"))))
17840 (replace 'check
17841 (lambda _
17842 ;; Deactivate the test cases that download files
17843 (setenv "NO_NETWORK_ACCESS" "1")
17844 ;; For some strange reason, some tests fail if nosetests runs all
17845 ;; test modules in a single execution. They pass if each test
17846 ;; module is run individually.
17847 (for-each (lambda (filename)
17848 (invoke "nosetests"
17849 (string-append "tests/" filename)))
17850 (scandir "tests"
17851 (lambda (filename)
17852 (string-suffix? ".py" filename)))))))))
17853 (native-inputs
17854 `(("python-tempdir" ,python-tempdir)
17855 ("python-nose" ,python-nose)))
17856 (propagated-inputs
17857 `(("python-h5py" ,python-h5py)))
17858 (home-page "https://www.activepapers.org/")
17859 (synopsis "Executable papers for scientific computing")
17860 (description
17861 "ActivePapers is a tool for working with executable papers, which
17862 combine data, code, and documentation in single-file packages,
17863 suitable for publication as supplementary material or on repositories
17864 such as figshare or Zenodo.")
17865 (properties `((python2-variant . ,(delay python2-activepapers))))
17866 (license license:bsd-3)))
17867
17868 (define-public python2-activepapers
17869 (let ((base (package-with-python2
17870 (strip-python2-variant python-activepapers))))
17871 (package
17872 (inherit base)
17873 (arguments
17874 (substitute-keyword-arguments (package-arguments base)
17875 ((#:phases phases)
17876 `(modify-phases ,phases
17877 (delete 'delete-python2-code)
17878 (add-after 'unpack 'delete-python3-code
17879 (lambda _
17880 (for-each delete-file
17881 '("lib/activepapers/builtins3.py"
17882 "lib/activepapers/standardlib3.py"
17883 "lib/activepapers/utility3.py")))))))))))
17884
17885 (define-public python-semver
17886 (package
17887 (name "python-semver")
17888 (version "2.9.0")
17889 (source
17890 (origin
17891 (method url-fetch)
17892 (uri (pypi-uri "semver" version))
17893 (sha256
17894 (base32
17895 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
17896 (build-system python-build-system)
17897 (arguments
17898 `(#:phases (modify-phases %standard-phases
17899 (replace 'check
17900 (lambda _
17901 (delete-file "setup.cfg")
17902 (invoke "py.test"))))))
17903 (native-inputs
17904 `(("python-pytest" ,python-pytest)))
17905 (home-page "https://github.com/k-bx/python-semver")
17906 (synopsis "Python helper for Semantic Versioning")
17907 (description "This package provides a Python library for
17908 @url{Semantic Versioning, http://semver.org/}.")
17909 (license license:bsd-3)))
17910
17911 (define-public python2-semver
17912 (package-with-python2 python-semver))
17913
17914 (define-public python-pyro4
17915 (package
17916 (name "python-pyro4")
17917 (version "4.77")
17918 (source
17919 (origin
17920 (method url-fetch)
17921 (uri (pypi-uri "Pyro4" version))
17922 (sha256
17923 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
17924 (build-system python-build-system)
17925 (arguments
17926 '(#:tests? #f)) ;FIXME: Some tests require network access.
17927 (native-inputs
17928 `(("python-cloudpickle" ,python-cloudpickle)
17929 ("python-dill" ,python-dill)
17930 ("python-msgpack" ,python-msgpack)))
17931 (propagated-inputs
17932 `(("python-serpent" ,python-serpent)))
17933 (home-page "https://pyro4.readthedocs.io")
17934 (synopsis "Distributed object middleware for Python")
17935 (description
17936 "Pyro enables you to build applications in which objects can talk to each
17937 other over the network. You can just use normal Python method calls to call
17938 objects on other machines, also known as remote procedure calls (RPC).")
17939 (license license:expat)))
17940
17941 (define-public python2-pyro
17942 (package
17943 (name "python2-pyro")
17944 (version "3.16")
17945 (source
17946 (origin
17947 (method url-fetch)
17948 (uri (pypi-uri "Pyro" version))
17949 (file-name (string-append "Pyro-" version ".tar.gz"))
17950 (sha256
17951 (base32
17952 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
17953 (build-system python-build-system)
17954 (arguments
17955 ;; Pyro is not compatible with Python 3
17956 `(#:python ,python-2
17957 ;; Pyro has no test cases for automatic execution
17958 #:tests? #f))
17959 (home-page "https://pythonhosted.org/Pyro/")
17960 (synopsis "Distributed object manager for Python")
17961 (description "Pyro is a Distributed Object Technology system
17962 written in Python that is designed to be easy to use. It resembles
17963 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
17964 which is a system and language independent Distributed Object Technology
17965 and has much more to offer than Pyro or RMI. Pyro 3.x is no
17966 longer maintained. New projects should use Pyro4 instead, which
17967 is the new Pyro version that is actively developed.")
17968 (license license:expat)))
17969
17970 (define-public python2-scientific
17971 (package
17972 (name "python2-scientific")
17973 (version "2.9.4")
17974 (source
17975 (origin
17976 (method git-fetch)
17977 (uri (git-reference
17978 (url "https://github.com/khinsen/ScientificPython")
17979 (commit (string-append "rel" version))))
17980 (file-name (git-file-name name version))
17981 (sha256
17982 (base32
17983 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17984 (build-system python-build-system)
17985 (inputs
17986 `(("netcdf" ,netcdf)))
17987 (propagated-inputs
17988 `(("python-numpy" ,python2-numpy-1.8)
17989 ("python-pyro" ,python2-pyro)))
17990 (arguments
17991 ;; ScientificPython is not compatible with Python 3
17992 `(#:python ,python-2
17993 #:tests? #f ; No test suite
17994 #:phases
17995 (modify-phases %standard-phases
17996 (replace 'build
17997 (lambda* (#:key inputs #:allow-other-keys)
17998 (invoke "python" "setup.py" "build"
17999 (string-append "--netcdf_prefix="
18000 (assoc-ref inputs "netcdf"))))))))
18001 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
18002 (synopsis "Python modules for scientific computing")
18003 (description "ScientificPython is a collection of Python modules that are
18004 useful for scientific computing. Most modules are rather general (Geometry,
18005 physical units, automatic derivatives, ...) whereas others are more
18006 domain-specific (e.g. netCDF and PDB support). The library is currently
18007 not actively maintained and works only with Python 2 and NumPy < 1.9.")
18008 (license license:cecill-c)))
18009
18010 (define-public python2-mmtk
18011 (package
18012 (name "python2-mmtk")
18013 (version "2.7.12")
18014 (source
18015 (origin
18016 (method git-fetch)
18017 (uri (git-reference
18018 (url "https://github.com/khinsen/MMTK")
18019 (commit (string-append "rel" version))))
18020 (file-name (git-file-name name version))
18021 (sha256
18022 (base32
18023 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
18024 (build-system python-build-system)
18025 (native-inputs
18026 `(("netcdf" ,netcdf)))
18027 (propagated-inputs
18028 `(("python-scientific" ,python2-scientific)
18029 ("python-tkinter" ,python-2 "tk")))
18030 (arguments
18031 `(#:python ,python-2
18032 #:tests? #f
18033 #:phases
18034 (modify-phases %standard-phases
18035 (add-before 'build 'includes-from-scientific
18036 (lambda* (#:key inputs #:allow-other-keys)
18037 (mkdir-p "Include/Scientific")
18038 (copy-recursively
18039 (string-append
18040 (assoc-ref inputs "python-scientific")
18041 "/include/python2.7/Scientific")
18042 "Include/Scientific"))))))
18043 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
18044 (synopsis "Python library for molecular simulation")
18045 (description "MMTK is a library for molecular simulations with an emphasis
18046 on biomolecules. It provides widely used methods such as Molecular Dynamics
18047 and normal mode analysis, but also basic routines for implementing new methods
18048 for simulation and analysis. The library is currently not actively maintained
18049 and works only with Python 2 and NumPy < 1.9.")
18050 (license license:cecill-c)))
18051
18052 (define-public python-phonenumbers
18053 (package
18054 (name "python-phonenumbers")
18055 (version "8.9.1")
18056 (source
18057 (origin
18058 (method url-fetch)
18059 (uri (pypi-uri "phonenumbers" version))
18060 (sha256
18061 (base32
18062 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
18063 (build-system python-build-system)
18064 (home-page
18065 "https://github.com/daviddrysdale/python-phonenumbers")
18066 (synopsis
18067 "Python library for dealing with international phone numbers")
18068 (description
18069 "This package provides a Python port of Google's libphonenumber library.")
18070 (license license:asl2.0)))
18071
18072 (define-public python2-phonenumbers
18073 (package-with-python2 python-phonenumbers))
18074
18075 (define-public python-send2trash
18076 (package
18077 (name "python-send2trash")
18078 (version "1.5.0")
18079 (source
18080 (origin (method git-fetch)
18081 ;; Source tarball on PyPI doesn't include tests.
18082 (uri (git-reference
18083 (url "https://github.com/hsoft/send2trash")
18084 (commit version)))
18085 (file-name (git-file-name name version))
18086 (sha256
18087 (base32
18088 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
18089 (build-system python-build-system)
18090 (arguments
18091 '(#:phases
18092 (modify-phases %standard-phases
18093 (add-before 'check 'pre-check
18094 (lambda _
18095 (mkdir-p "/tmp/foo")
18096 (setenv "HOME" "/tmp/foo")
18097 #t)))))
18098 (home-page "https://github.com/hsoft/send2trash")
18099 (synopsis "Send files to the user's @file{~/Trash} directory")
18100 (description "This package provides a Python library to send files to the
18101 user's @file{~/Trash} directory.")
18102 (properties `((python2-variant . ,(delay python2-send2trash))))
18103 (license license:bsd-3)))
18104
18105 (define-public python2-send2trash
18106 (package
18107 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
18108 (arguments
18109 (substitute-keyword-arguments (package-arguments python-send2trash)
18110 ((#:phases phases)
18111 `(modify-phases ,phases
18112 (add-before 'check 'setenv
18113 (lambda _
18114 (setenv "PYTHONPATH"
18115 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18116 #t))))))))
18117
18118 (define-public python-pyfavicon
18119 (package
18120 (name "python-pyfavicon")
18121 (version "0.1.1")
18122 (source
18123 (origin
18124 (method url-fetch)
18125 (uri (pypi-uri "pyfavicon" version))
18126 (sha256
18127 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
18128 (build-system python-build-system)
18129 (arguments
18130 ;; There are no tests in the PyPI tarball and the tests from the
18131 ;; repository require online data.
18132 '(#:tests? #f))
18133 (propagated-inputs
18134 `(("python-aiohttp" ,python-aiohttp)
18135 ("python-beautifulsoup4" ,python-beautifulsoup4)
18136 ("python-pillow" ,python-pillow)))
18137 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
18138 (synopsis "Async favicon fetcher")
18139 (description
18140 "@code{pyfavicon} is an async favicon fetcher.")
18141 (license license:expat)))
18142
18143 (define-public python-yamllint
18144 (package
18145 (name "python-yamllint")
18146 (version "1.26.0")
18147 (source
18148 (origin
18149 (method url-fetch)
18150 (uri (pypi-uri "yamllint" version))
18151 (sha256
18152 (base32 "11qhs1jk9pwvyk5k3q5blh9sq42dh1ywdf1f3i2zixf7hncwir5h"))))
18153 (build-system python-build-system)
18154 (propagated-inputs
18155 `(("python-pathspec" ,python-pathspec)
18156 ("python-pyyaml" ,python-pyyaml)
18157 ("python-setuptools" ,python-setuptools)))
18158 (home-page "https://github.com/adrienverge/yamllint")
18159 (synopsis "Linter for YAML files")
18160 (description
18161 "Yamllint is a linter for YAML files. yamllint does not only check for
18162 syntax validity, but for weirdnesses like key repetition and cosmetic problems
18163 such as lines length, trailing spaces, indentation, etc.")
18164 (license license:gpl3+)))
18165
18166 (define-public python-yapf
18167 (package
18168 (name "python-yapf")
18169 (version "0.29.0")
18170 (source
18171 (origin
18172 (method url-fetch)
18173 (uri (pypi-uri "yapf" version))
18174 (sha256
18175 (base32
18176 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
18177 (build-system python-build-system)
18178 (home-page "https://github.com/google/yapf")
18179 (synopsis "Formatter for Python code")
18180 (description "YAPF is a formatter for Python code. It's based off of
18181 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
18182 takes the code and reformats it to the best formatting that conforms to the
18183 style guide, even if the original code didn't violate the style guide.")
18184 (license license:asl2.0)))
18185
18186 (define-public python2-yapf
18187 (package-with-python2 python-yapf))
18188
18189 (define-public python-yq
18190 (package
18191 (name "python-yq")
18192 (version "2.11.1")
18193 (source
18194 (origin
18195 (method url-fetch)
18196 (uri (pypi-uri "yq" version))
18197 (sha256
18198 (base32
18199 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
18200 (build-system python-build-system)
18201 (arguments
18202 '(#:phases
18203 (modify-phases %standard-phases
18204 (add-after 'unpack 'patch
18205 (lambda* (#:key inputs #:allow-other-keys)
18206 (substitute* "yq/__init__.py"
18207 (("Popen\\(\\[\"jq")
18208 (string-append
18209 "Popen([\""
18210 (assoc-ref inputs "jq")
18211 "/bin/jq")))
18212 #t)))))
18213 (inputs
18214 `(("python-argcomplete" ,python-argcomplete)
18215 ("python-pyyaml" ,python-pyyaml)
18216 ("python-xmltodict" ,python-xmltodict)
18217 ("jq" ,jq)))
18218 (native-inputs
18219 `(("python-coverage" ,python-coverage)
18220 ("python-flake8" ,python-flake8)
18221 ("python-wheel" ,python-wheel)))
18222 (home-page "https://github.com/kislyuk/yq")
18223 (synopsis "Command-line YAML/XML processor")
18224 (description
18225 "This package provides @command{yq} and @command{xq} for processing YAML
18226 and XML respectively. The processing is done through @command{jq}, @command{jq}
18227 filters can be used to process the data as it passes through.")
18228 (license license:asl2.0)))
18229
18230 (define-public python-gyp
18231 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
18232 (revision "0"))
18233 (package
18234 (name "python-gyp")
18235 ;; Google does not release versions,
18236 ;; based on second most recent commit date.
18237 (version (git-version "0.0.0" revision commit))
18238 (source
18239 (origin
18240 ;; Google does not release tarballs,
18241 ;; git checkout is needed.
18242 (method git-fetch)
18243 (uri (git-reference
18244 (url "https://chromium.googlesource.com/external/gyp")
18245 (commit commit)))
18246 (file-name (git-file-name name version))
18247 (sha256
18248 (base32
18249 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
18250 (build-system python-build-system)
18251 (home-page "https://gyp.gsrc.io/")
18252 (synopsis "GYP is a Meta-Build system")
18253 (description
18254 "GYP builds build systems for large, cross platform applications.
18255 It can be used to generate XCode projects, Visual Studio projects, Ninja build
18256 files, and Makefiles.")
18257 (license license:bsd-3))))
18258
18259 (define-public python2-gyp
18260 (package-with-python2 python-gyp))
18261
18262 (define-public python-whatever
18263 (package
18264 (name "python-whatever")
18265 (version "0.6")
18266 (source
18267 (origin
18268 (method git-fetch)
18269 (uri (git-reference
18270 (url "https://github.com/Suor/whatever")
18271 (commit version)))
18272 (file-name (git-file-name name version))
18273 (sha256
18274 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
18275 (build-system python-build-system)
18276 (arguments
18277 `(#:phases
18278 (modify-phases %standard-phases
18279 (replace 'check
18280 (lambda _
18281 (invoke "py.test"))))))
18282 (native-inputs
18283 `(("python-pytest" ,python-pytest)))
18284 (home-page "https://github.com/Suor/whatever")
18285 (synopsis "Make anonymous functions by partial application of operators")
18286 (description "@code{whatever} provides an easy way to make anonymous
18287 functions by partial application of operators.")
18288 (license license:bsd-3)))
18289
18290 (define-public python2-whatever
18291 (package-with-python2 python-whatever))
18292
18293 (define-public python-funcy
18294 (package
18295 (name "python-funcy")
18296 (version "1.11")
18297 (source
18298 (origin
18299 (method git-fetch)
18300 (uri (git-reference
18301 (url "https://github.com/Suor/funcy")
18302 (commit version)))
18303 (sha256
18304 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
18305 (file-name (git-file-name name version))))
18306 (build-system python-build-system)
18307 (arguments
18308 `(#:phases
18309 (modify-phases %standard-phases
18310 (replace 'check
18311 (lambda _
18312 (invoke "py.test"))))))
18313 (native-inputs
18314 `(("python-pytest" ,python-pytest)
18315 ("python-whatever" ,python-whatever)))
18316 (home-page "https://github.com/Suor/funcy")
18317 (synopsis "Functional tools")
18318 (description "@code{funcy} is a library that provides functional tools.
18319 Examples are:
18320 @enumerate
18321 @item merge - Merges collections of the same type
18322 @item walk - Type-preserving map
18323 @item select - Selects a part of a collection
18324 @item take - Takes the first n items of a collection
18325 @item first - Takes the first item of a collection
18326 @item remove - Predicated-removes items of a collection
18327 @item concat - Concatenates two collections
18328 @item flatten - Flattens a collection with subcollections
18329 @item distinct - Returns only distinct items
18330 @item split - Predicated-splits a collection
18331 @item split_at - Splits a collection at a given item
18332 @item group_by - Groups items by group
18333 @item pairwise - Pairs off adjacent items
18334 @item partial - Partially-applies a function
18335 @item curry - Curries a function
18336 @item compose - Composes functions
18337 @item complement - Complements a predicate
18338 @item all_fn - \"all\" with predicate
18339 @end enumerate")
18340 (license license:bsd-3)))
18341
18342 (define-public python2-funcy
18343 (package-with-python2 python-funcy))
18344
18345 (define-public python-isoweek
18346 (package
18347 (name "python-isoweek")
18348 (version "1.3.3")
18349 (source
18350 (origin
18351 (method url-fetch)
18352 (uri (pypi-uri "isoweek" version))
18353 (sha256
18354 (base32
18355 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
18356 (build-system python-build-system)
18357 (home-page "https://github.com/gisle/isoweek")
18358 (synopsis "Objects representing a week")
18359 (description "The @code{isoweek} module provide the class Week that
18360 implements the week definition of ISO 8601. This standard also defines
18361 a notation for identifying weeks; yyyyWww (where the W is a literal).
18362 Week instances stringify to this form.")
18363 (license license:bsd-3)))
18364
18365 (define-public python2-isoweek
18366 (package-with-python2 python-isoweek))
18367
18368 (define-public python-pyzbar
18369 (package
18370 (name "python-pyzbar")
18371 (version "0.1.8")
18372 (source
18373 (origin
18374 ;; There's no source tarball on PyPI.
18375 (method git-fetch)
18376 (uri (git-reference
18377 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
18378 (commit (string-append "v" version))))
18379 (file-name (git-file-name name version))
18380 (sha256
18381 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
18382 (build-system python-build-system)
18383 (arguments
18384 `(#:phases
18385 (modify-phases %standard-phases
18386 (add-after 'unpack 'remove-failing-test
18387 (lambda _
18388 ;; This tests if find_library was called once, but we remove
18389 ;; the call in the stage below to make the library find libzbar.
18390 (delete-file "pyzbar/tests/test_zbar_library.py")
18391 #t))
18392 (add-before 'build 'set-library-file-name
18393 (lambda* (#:key inputs #:allow-other-keys)
18394 (let ((libzbar (assoc-ref inputs "zbar")))
18395 (substitute* "pyzbar/zbar_library.py"
18396 (("find_library\\('zbar'\\)")
18397 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18398 #t))))))
18399 (native-inputs
18400 `(("pkg-config" ,pkg-config)
18401 ("python-numpy" ,python-numpy)
18402 ("python-pillow" ,python-pillow)))
18403 (inputs
18404 `(("zbar" ,zbar)))
18405 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18406 (synopsis "Read one-dimensional barcodes and QR codes")
18407 (description
18408 "Read one-dimensional barcodes and QR codes using the zbar library.
18409
18410 Features:
18411
18412 @itemize
18413 @item Pure python
18414 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18415 @item Decodes locations of barcodes
18416 @item No dependencies, other than the zbar library itself
18417 @end itemize")
18418 (license license:expat)))
18419
18420 (define-public python-tokenize-rt
18421 (package
18422 (name "python-tokenize-rt")
18423 (version "2.0.1")
18424 (source
18425 (origin
18426 (method url-fetch)
18427 (uri (pypi-uri "tokenize-rt" version))
18428 (sha256
18429 (base32
18430 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
18431 (build-system python-build-system)
18432 (home-page "https://github.com/asottile/tokenize-rt")
18433 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
18434 (description
18435 "This Python library is a wrapper around @code{tokenize} from the Python
18436 standard library. It provides two additional tokens @code{ESCAPED_NL} and
18437 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
18438 and @code{tokens_to_src} to roundtrip.")
18439 (license license:expat)))
18440
18441 (define-public python-future-fstrings
18442 (package
18443 (name "python-future-fstrings")
18444 (version "0.4.1")
18445 (source
18446 (origin
18447 (method url-fetch)
18448 (uri (pypi-uri "future_fstrings" version))
18449 (sha256
18450 (base32
18451 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18452 (build-system python-build-system)
18453 (propagated-inputs
18454 `(("python-tokenize-rt" ,python-tokenize-rt)))
18455 (home-page "https://github.com/asottile/future-fstrings")
18456 (synopsis "Backport of fstrings to Python < 3.6")
18457 (description
18458 "This package provides a UTF-8 compatible encoding
18459 @code{future_fstrings}, which performs source manipulation. It decodes the
18460 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18461 @code{f} strings.")
18462 (license license:expat)))
18463
18464 (define-public python-typed-ast
18465 (package
18466 (name "python-typed-ast")
18467 (version "1.4.0")
18468 (source
18469 (origin
18470 (method git-fetch)
18471 (uri (git-reference
18472 (url "https://github.com/python/typed_ast")
18473 (commit version)))
18474 (sha256
18475 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18476 (file-name (git-file-name name version))))
18477 (build-system python-build-system)
18478 (arguments
18479 `(#:modules ((guix build utils)
18480 (guix build python-build-system)
18481 (ice-9 ftw)
18482 (srfi srfi-1)
18483 (srfi srfi-26))
18484 #:phases
18485 (modify-phases %standard-phases
18486 (replace 'check
18487 (lambda _
18488 (let ((cwd (getcwd)))
18489 (setenv "PYTHONPATH"
18490 (string-append cwd "/build/"
18491 (find (cut string-prefix? "lib" <>)
18492 (scandir (string-append cwd "/build")))
18493 ":"
18494 (getenv "PYTHONPATH"))))
18495 (invoke "pytest")
18496 #t)))))
18497 (native-inputs `(("python-pytest" ,python-pytest)))
18498 (home-page "https://github.com/python/typed_ast")
18499 (synopsis "Fork of Python @code{ast} modules with type comment support")
18500 (description "This package provides a parser similar to the standard
18501 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18502 include PEP 484 type comments and are independent of the version of Python
18503 under which they are run. The @code{typed_ast} parsers produce the standard
18504 Python AST (plus type comments), and are both fast and correct, as they are
18505 based on the CPython 2.7 and 3.7 parsers.")
18506 ;; See the file "LICENSE" for the details.
18507 (license (list license:psfl
18508 license:asl2.0
18509 license:expat)))) ;ast27/Parser/spark.py
18510
18511 (define-public python-typer
18512 (package
18513 (name "python-typer")
18514 (version "0.3.2")
18515 (source
18516 (origin
18517 ;; Building `python-typer` from the git repository requires the `flit-core`
18518 ;; Python package that is not installed by `python-flit`.
18519 (method url-fetch)
18520 (uri (pypi-uri "typer" version))
18521 (sha256
18522 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
18523 (build-system python-build-system)
18524 (arguments
18525 `(#:phases
18526 (modify-phases %standard-phases
18527 (add-before 'check 'disable-failing-tests
18528 (lambda _
18529 (substitute* "tests/test_completion/test_completion.py"
18530 (("def test_show_completion")
18531 "def _test_show_completion")
18532 (("def test_install_completion")
18533 "def _test_install_completion"))
18534 (substitute* "tests/test_completion/test_completion_install.py"
18535 (("def test_completion_install_bash")
18536 "def _test_completion_install_bash")
18537 (("def test_completion_install_zsh")
18538 "def _test_completion_install_zsh")
18539 (("def test_completion_install_fish")
18540 "def _test_completion_install_fish")
18541 (("def test_completion_install_powershell")
18542 "def _test_completion_install_powershell"))
18543 #t))
18544 (replace 'check
18545 (lambda _
18546 (setenv "PYTHONPATH"
18547 (string-append (getcwd) ":"
18548 (getenv "PYTHONPATH")))
18549 (invoke "python" "-m" "pytest" "tests/")
18550 #t)))))
18551 (propagated-inputs
18552 `(("python-click" ,python-click)))
18553 (native-inputs
18554 `(("python-coverage" ,python-coverage)
18555 ("python-pytest" ,python-pytest)
18556 ("python-shellingham" ,python-shellingham)))
18557 (home-page "https://github.com/tiangolo/typer")
18558 (synopsis
18559 "Typer builds CLI based on Python type hints")
18560 (description
18561 "Typer is a library for building CLI applications. It's based on
18562 Python 3.6+ type hints.")
18563 ;; MIT license
18564 (license license:expat)))
18565
18566 (define-public python-typing
18567 (package
18568 (name "python-typing")
18569 (version "3.7.4.3")
18570 (source
18571 (origin
18572 (method url-fetch)
18573 (uri (pypi-uri "typing" version))
18574 (sha256
18575 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18576 (build-system python-build-system)
18577 (home-page "https://docs.python.org/3/library/typing.html")
18578 (synopsis "Type hints for Python")
18579 (description "This is a backport of the standard library @code{typing}
18580 module to Python versions older than 3.5. Typing defines a standard notation
18581 for Python function and variable type annotations. The notation can be used
18582 for documenting code in a concise, standard format, and it has been designed
18583 to also be used by static and runtime type checkers, static analyzers, IDEs
18584 and other tools.")
18585 (license license:psfl)))
18586
18587 (define-public python2-typing
18588 (package-with-python2 python-typing))
18589
18590 (define-public python-typing-extensions
18591 (package
18592 (name "python-typing-extensions")
18593 (version "3.7.4.3")
18594 (source
18595 (origin
18596 (method url-fetch)
18597 (uri (pypi-uri "typing_extensions" version))
18598 (sha256
18599 (base32
18600 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
18601 (build-system python-build-system)
18602 (home-page
18603 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18604 (synopsis "Experimental type hints for Python")
18605 (description
18606 "The typing_extensions module contains additional @code{typing} hints not
18607 yet present in the of the @code{typing} standard library.
18608 Included are implementations of:
18609 @enumerate
18610 @item ClassVar
18611 @item ContextManager
18612 @item Counter
18613 @item DefaultDict
18614 @item Deque
18615 @item NewType
18616 @item NoReturn
18617 @item overload
18618 @item Protocol
18619 @item runtime
18620 @item Text
18621 @item Type
18622 @item TYPE_CHECKING
18623 @item AsyncGenerator
18624 @end enumerate\n")
18625 (license license:psfl)))
18626
18627 (define-public bpython
18628 (package
18629 (name "bpython")
18630 (version "0.20.1")
18631 (source
18632 (origin
18633 (method url-fetch)
18634 (uri (pypi-uri "bpython" version))
18635 (sha256
18636 (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
18637 (build-system python-build-system)
18638 (arguments
18639 `(#:phases
18640 (modify-phases %standard-phases
18641 (add-after 'unpack 'remove-failing-test
18642 (lambda _
18643 ;; Remove failing test. FIXME: make it pass
18644 (delete-file "bpython/test/test_args.py")
18645 #t))
18646 (add-after 'wrap 'add-aliases
18647 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18648 (lambda* (#:key outputs #:allow-other-keys)
18649 (let ((out (assoc-ref outputs "out")))
18650 (for-each
18651 (lambda (old new)
18652 (symlink old (string-append out "/bin/" new)))
18653 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18654 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18655 #t)))))
18656 (propagated-inputs
18657 `(("python-pygments" ,python-pygments)
18658 ("python-requests" ,python-requests)
18659 ("python-curtsies" ,python-curtsies)
18660 ("python-greenlet" ,python-greenlet)
18661 ("python-six" ,python-six)
18662 ("python-wcwidth" ,python-wcwidth)
18663 ;; optional dependencies
18664 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18665 ("python-watchdog" ,python-watchdog)
18666 ("python-jedi" ,python-jedi)))
18667 (native-inputs
18668 `(("python-sphinx" ,python-sphinx)
18669 ("python-mock" ,python-mock)))
18670 (home-page "https://bpython-interpreter.org/")
18671 (synopsis "Fancy interface to the Python interpreter")
18672 (description "Bpython is a fancy interface to the Python
18673 interpreter. bpython's main features are
18674
18675 @enumerate
18676 @item in-line syntax highlighting,
18677 @item readline-like autocomplete with suggestions displayed as you type,
18678 @item expected parameter list for any Python function,
18679 @item \"rewind\" function to pop the last line of code from memory and
18680 re-evaluate,
18681 @item send the code you've entered off to a pastebin,
18682 @item save the code you've entered to a file, and
18683 @item auto-indentation.
18684 @end enumerate")
18685 (license license:expat)))
18686
18687 (define-public python-pyinotify
18688 (package
18689 (name "python-pyinotify")
18690 (version "0.9.6")
18691 (source (origin
18692 (method url-fetch)
18693 (uri (pypi-uri "pyinotify" version))
18694 (sha256
18695 (base32
18696 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18697 (build-system python-build-system)
18698 (arguments `(#:tests? #f)) ;no tests
18699 (home-page "https://github.com/seb-m/pyinotify")
18700 (synopsis "Python library for monitoring inotify events")
18701 (description
18702 "@code{pyinotify} provides a Python interface for monitoring
18703 file system events on Linux.")
18704 (license license:expat)))
18705
18706 (define-public python2-pyinotify
18707 (package-with-python2 python-pyinotify))
18708
18709 ;; Ada parser uses this version.
18710 (define-public python2-quex-0.67.3
18711 (package
18712 (name "python2-quex")
18713 (version "0.67.3")
18714 (source
18715 (origin
18716 (method url-fetch)
18717 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18718 (version-major+minor version)
18719 "/quex-" version ".zip"))
18720 (sha256
18721 (base32
18722 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18723 (build-system python-build-system)
18724 (native-inputs
18725 `(("unzip" ,unzip)))
18726 (arguments
18727 `(#:python ,python-2
18728 #:tests? #f
18729 #:phases
18730 (modify-phases %standard-phases
18731 (delete 'configure)
18732 (delete 'build)
18733 (replace 'install
18734 (lambda* (#:key outputs #:allow-other-keys)
18735 (let* ((out (assoc-ref outputs "out"))
18736 (share/quex (string-append out "/share/quex"))
18737 (bin (string-append out "/bin")))
18738 (copy-recursively "." share/quex)
18739 (mkdir-p bin)
18740 (symlink (string-append share/quex "/quex-exe.py")
18741 (string-append bin "/quex"))
18742 #t))))))
18743 (native-search-paths
18744 (list (search-path-specification
18745 (variable "QUEX_PATH")
18746 (files '("share/quex")))))
18747 (home-page "http://quex.sourceforge.net/")
18748 (synopsis "Lexical analyzer generator in Python")
18749 (description "@code{quex} is a lexical analyzer generator in Python.")
18750 (license license:lgpl2.1+))) ; Non-military
18751
18752 (define-public python2-quex
18753 (package (inherit python2-quex-0.67.3)
18754 (name "python2-quex")
18755 (version "0.68.1")
18756 (source
18757 (origin
18758 (method url-fetch)
18759 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18760 (sha256
18761 (base32
18762 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18763 (file-name (string-append name "-" version ".tar.gz"))))))
18764
18765 (define-public python-more-itertools
18766 (package
18767 (name "python-more-itertools")
18768 (version "8.2.0")
18769 (source
18770 (origin
18771 (method url-fetch)
18772 (uri (pypi-uri "more-itertools" version))
18773 (sha256
18774 (base32
18775 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18776 (build-system python-build-system)
18777 (home-page "https://github.com/erikrose/more-itertools")
18778 (synopsis "More routines for operating on iterables, beyond itertools")
18779 (description "Python's built-in @code{itertools} module implements a
18780 number of iterator building blocks inspired by constructs from APL, Haskell,
18781 and SML. @code{more-itertools} includes additional building blocks for
18782 working with iterables.")
18783 (properties `((python2-variant . ,(delay python2-more-itertools))))
18784 (license license:expat)))
18785
18786 ;; The 5.x series are the last versions supporting Python 2.7.
18787 (define-public python2-more-itertools
18788 (package
18789 (inherit python-more-itertools)
18790 (name "python2-more-itertools")
18791 (version "5.0.0")
18792 (source (origin
18793 (method url-fetch)
18794 (uri (pypi-uri "more-itertools" version))
18795 (sha256
18796 (base32
18797 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18798 (arguments
18799 `(#:python ,python-2))
18800 (propagated-inputs
18801 `(("python2-six" ,python2-six-bootstrap)))))
18802
18803 (define-public python-latexcodec
18804 (package
18805 (name "python-latexcodec")
18806 (version "1.0.7")
18807 (source
18808 (origin
18809 (method url-fetch)
18810 (uri (pypi-uri "latexcodec" version))
18811 (sha256
18812 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18813 (build-system python-build-system)
18814 (inputs
18815 `(("python-six" ,python-six)))
18816 (home-page "https://readthedocs.org/projects/latexcodec/")
18817 (synopsis "Work with LaTeX code in Python")
18818 (description "Lexer and codec to work with LaTeX code in Python.")
18819 (license license:expat)))
18820
18821 (define-public python-pybtex
18822 (package
18823 (name "python-pybtex")
18824 (version "0.22.2")
18825 (source
18826 (origin
18827 (method url-fetch)
18828 (uri (pypi-uri "pybtex" version))
18829 (sha256
18830 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18831 (build-system python-build-system)
18832 (native-inputs
18833 `(("python-nose" ,python-nose)))
18834 (inputs
18835 `(("python-latexcodec" ,python-latexcodec)
18836 ("python-pyyaml" ,python-pyyaml)
18837 ("python-six" ,python-six)))
18838 (arguments
18839 `(#:test-target "nosetests"))
18840 (home-page "https://pybtex.org/")
18841 (synopsis "BibTeX-compatible bibliography processor")
18842 (description "Pybtex is a BibTeX-compatible bibliography processor written
18843 in Python. You can simply type pybtex instead of bibtex.")
18844 (license license:expat)))
18845
18846 (define-public python-onetimepass
18847 (package
18848 (name "python-onetimepass")
18849 (version "1.0.1")
18850 (source
18851 (origin
18852 (method url-fetch)
18853 (uri (pypi-uri "onetimepass" version))
18854 (sha256
18855 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
18856 (build-system python-build-system)
18857 (propagated-inputs `(("python-six" ,python-six)))
18858 (home-page "https://github.com/tadeck/onetimepass/")
18859 (synopsis "One-time password library")
18860 (description "Python one-time password library for HMAC-based (HOTP) and
18861 time-based (TOTP) passwords.")
18862 (license license:expat)))
18863
18864 (define-public python-parso
18865 (package
18866 (name "python-parso")
18867 (version "0.7.1")
18868 (source
18869 (origin
18870 (method url-fetch)
18871 (uri (pypi-uri "parso" version))
18872 (sha256
18873 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
18874 (native-inputs
18875 `(("python-pytest" ,python-pytest)))
18876 (build-system python-build-system)
18877 (arguments
18878 `(#:phases (modify-phases %standard-phases
18879 (replace 'check
18880 (lambda _ (invoke "pytest" "-vv"))))))
18881 (home-page "https://github.com/davidhalter/parso")
18882 (synopsis "Python Parser")
18883 (description "Parso is a Python parser that supports error recovery and
18884 round-trip parsing for different Python versions (in multiple Python versions).
18885 Parso is also able to list multiple syntax errors in your Python file.")
18886 (license license:expat)))
18887
18888 (define-public python2-parso
18889 (package-with-python2 python-parso))
18890
18891 (define-public python-async-generator
18892 (package
18893 (name "python-async-generator")
18894 (version "1.10")
18895 (source
18896 (origin
18897 (method url-fetch)
18898 (uri (pypi-uri "async_generator" version))
18899 (sha256
18900 (base32
18901 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
18902 (build-system python-build-system)
18903 (native-inputs
18904 `(("python-pytest" ,python-pytest)))
18905 (home-page "https://github.com/python-trio/async_generator")
18906 (synopsis "Async generators and context managers for Python 3.5+")
18907 (description "@code{async_generator} back-ports Python 3.6's native async
18908 generators and Python 3.7's context managers into Python 3.5.")
18909 ;; Dual licensed.
18910 (license (list license:expat license:asl2.0))))
18911
18912 (define-public python-async-timeout
18913 (package
18914 (name "python-async-timeout")
18915 (version "3.0.1")
18916 (source
18917 (origin
18918 (method url-fetch)
18919 (uri (pypi-uri "async-timeout" version))
18920 (sha256
18921 (base32
18922 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
18923 (build-system python-build-system)
18924 (home-page "https://github.com/aio-libs/async_timeout/")
18925 (synopsis "Timeout context manager for asyncio programs")
18926 (description "@code{async-timeout} provides a timeout timeout context
18927 manager compatible with @code{asyncio}.")
18928 (license license:asl2.0)))
18929
18930 (define-public python-glob2
18931 (package
18932 (name "python-glob2")
18933 (version "0.7")
18934 (source
18935 (origin
18936 (method git-fetch)
18937 (uri (git-reference
18938 (url "https://github.com/miracle2k/python-glob2")
18939 (commit (string-append "v" version))))
18940 (file-name (git-file-name name version))
18941 (sha256
18942 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
18943 (build-system python-build-system)
18944 (home-page "https://github.com/miracle2k/python-glob2/")
18945 (synopsis "Extended Version of the python buildin glob module")
18946 (description "This is an extended version of the Python
18947 @url{http://docs.python.org/library/glob.html, built-in glob module} which
18948 adds:
18949
18950 @itemize
18951 @item The ability to capture the text matched by glob patterns, and return
18952 those matches alongside the file names.
18953 @item A recursive @code{**} globbing syntax, akin for example to the
18954 @code{globstar} option of Bash.
18955 @item The ability to replace the file system functions used, in order to glob
18956 on virtual file systems.
18957 @item Compatible with Python 2 and Python 3 (tested with 3.3).
18958 @end itemize
18959
18960 Glob2 currently based on the glob code from Python 3.3.1.")
18961 (license license:bsd-2)))
18962
18963 (define-public python2-glob2
18964 (package-with-python2 python-glob2))
18965
18966 (define-public python-gipc
18967 (package
18968 (name "python-gipc")
18969 (version "0.6.0")
18970 (source
18971 (origin
18972 (method url-fetch)
18973 (uri (pypi-uri "gipc" version ".zip"))
18974 (sha256
18975 (base32
18976 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
18977 (build-system python-build-system)
18978 (native-inputs
18979 `(("unzip" ,unzip)))
18980 (propagated-inputs
18981 `(("python-gevent" ,python-gevent)))
18982 (home-page "https://gehrcke.de/gipc/")
18983 (synopsis "Child process management in the context of gevent")
18984 (description "Usage of Python's multiprocessing package in a
18985 gevent-powered application may raise problems. With @code{gipc},
18986 process-based child processes can safely be created anywhere within a
18987 gevent-powered application.")
18988 (license license:expat)))
18989
18990 (define-public python-beautifultable
18991 (package
18992 (name "python-beautifultable")
18993 (version "1.0.0")
18994 (source
18995 (origin
18996 (method url-fetch)
18997 (uri (pypi-uri "beautifultable" version))
18998 (sha256
18999 (base32
19000 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
19001 (build-system python-build-system)
19002 (propagated-inputs
19003 `(("python-wcwidth" ,python-wcwidth)))
19004 (arguments
19005 `(#:phases
19006 (modify-phases %standard-phases
19007 (add-after 'unpack 'patch-setup.py
19008 (lambda _
19009 (substitute* "setup.py"
19010 (("setup\\(")
19011 "setup(\n test_suite=\"test\",")))))))
19012 (home-page "https://github.com/pri22296/beautifultable")
19013 (synopsis "Print ASCII tables for terminals")
19014 (description "@code{python-beautifultable} provides a class for easily
19015 printing tabular data in a visually appealing ASCII format to a terminal.
19016
19017 Features include, but are not limited to:
19018 @itemize
19019 @item Full customization of the look and feel of the table
19020 @item Row and column accessors.
19021 @item Full support for colors using ANSI sequences or any library.
19022 @item Plenty of predefined styles and option to create custom ones.
19023 @item Support for Unicode characters.
19024 @item Supports streaming table when data is slow to retrieve.
19025 @end itemize")
19026 (license license:expat)))
19027
19028 (define-public python-globber
19029 (package
19030 (name "python-globber")
19031 (version "0.2.1")
19032 (source
19033 (origin
19034 (method git-fetch)
19035 (uri (git-reference
19036 (url "https://github.com/asharov/globber")
19037 (commit version)))
19038 (file-name (git-file-name name version))
19039 (sha256
19040 (base32
19041 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
19042 (build-system python-build-system)
19043 (home-page "https://github.com/asharov/globber")
19044 (synopsis "Library for string matching with glob patterns")
19045 (description
19046 "Globber is a Python library for matching file names against glob patterns.
19047 In contrast to other glob-matching libraries, it matches arbitrary strings and
19048 doesn't require the matched names to be existing files. In addition, it
19049 supports the globstar @code{**} operator to match an arbitrary number of
19050 path components.")
19051 (license license:asl2.0)))
19052
19053 (define-public python-git-hammer
19054 (package
19055 (name "python-git-hammer")
19056 (version "0.3.1")
19057 (source
19058 (origin
19059 (method git-fetch)
19060 (uri (git-reference
19061 (url "https://github.com/asharov/git-hammer")
19062 (commit version)))
19063 (file-name (git-file-name name version))
19064 (sha256
19065 (base32
19066 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
19067 (build-system python-build-system)
19068 (arguments
19069 `(#:phases
19070 (modify-phases %standard-phases
19071 (add-after 'unpack 'patch-setup.py
19072 (lambda _
19073 (substitute* "setup.py"
19074 (("setup\\(")
19075 "setup(\n test_suite=\"test\",")))))))
19076 (propagated-inputs
19077 `(("python-beautifultable" ,python-beautifultable)
19078 ("python-dateutil" ,python-dateutil)
19079 ("python-gitpython" ,python-gitpython)
19080 ("python-globber" ,python-globber)
19081 ("python-matplotlib" ,python-matplotlib)
19082 ("python-sqlalchemy" ,python-sqlalchemy)
19083 ("python-sqlalchemy-utils"
19084 ,python-sqlalchemy-utils)))
19085 (home-page "https://github.com/asharov/git-hammer")
19086 (synopsis "Provide statistics for git repositories")
19087 (description
19088 "Git Hammer is a statistics tool for projects in git repositories.
19089 Its major feature is tracking the number of lines authored by each person for every
19090 commit, but it also includes some other useful statistics.")
19091 (license license:asl2.0)))
19092
19093 (define-public python-fusepy
19094 (package
19095 (name "python-fusepy")
19096 (version "2.0.4")
19097 (source
19098 (origin
19099 (method url-fetch)
19100 (uri (pypi-uri "fusepy" version))
19101 (sha256
19102 (base32
19103 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
19104 (build-system python-build-system)
19105 (arguments
19106 `(#:phases
19107 (modify-phases %standard-phases
19108 (add-before 'build 'set-library-file-name
19109 (lambda* (#:key inputs #:allow-other-keys)
19110 (let ((fuse (assoc-ref inputs "fuse")))
19111 (substitute* "fuse.py"
19112 (("find_library\\('fuse'\\)")
19113 (string-append "'" fuse "/lib/libfuse.so'")))
19114 #t))))))
19115 (propagated-inputs
19116 `(("fuse" ,fuse)))
19117 (home-page "https://github.com/fusepy/fusepy")
19118 (synopsis "Simple ctypes bindings for FUSE")
19119 (description "Python module that provides a simple interface to FUSE and
19120 MacFUSE. The binding is created using the standard @code{ctypes} library.")
19121 (license license:isc)))
19122
19123 (define-public python2-fusepy
19124 (package-with-python2 python-fusepy))
19125
19126 (define-public python-fusepyng
19127 (package
19128 (name "python-fusepyng")
19129 (version "1.0.7")
19130 (source
19131 (origin
19132 (method url-fetch)
19133 (uri (pypi-uri "fusepyng" version))
19134 (sha256
19135 (base32
19136 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
19137 (build-system python-build-system)
19138 (arguments
19139 '(#:phases
19140 (modify-phases %standard-phases
19141 (add-after 'unpack 'set-libfuse-path
19142 (lambda* (#:key inputs #:allow-other-keys)
19143 (let ((fuse (assoc-ref inputs "fuse")))
19144 (substitute* "fusepyng.py"
19145 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
19146 (string-append "\"" fuse "/lib/libfuse.so\""))))
19147 #t)))))
19148 (inputs
19149 `(("fuse" ,fuse)))
19150 (propagated-inputs
19151 `(("python-paramiko" ,python-paramiko)))
19152 (home-page "https://github.com/rianhunter/fusepyng")
19153 (synopsis "Simple ctypes bindings for FUSE")
19154 (description "@code{fusepyng} is a Python module that provides a simple
19155 interface to FUSE on various operating systems. It's just one file and is
19156 implemented using @code{ctypes}.")
19157 (license license:isc)))
19158
19159 (define-public python-userspacefs
19160 (package
19161 (name "python-userspacefs")
19162 (version "2.0.3")
19163 (source
19164 (origin
19165 (method url-fetch)
19166 (uri (pypi-uri "userspacefs" version))
19167 (sha256
19168 (base32
19169 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
19170 (build-system python-build-system)
19171 (propagated-inputs
19172 `(("python-fusepyng" ,python-fusepyng)))
19173 (home-page "https://github.com/rianhunter/userspacefs")
19174 (synopsis "User-space file systems for Python")
19175 (description
19176 "@code{userspacefs} is a library that allows you to easily write
19177 user-space file systems in Python.")
19178 (license license:gpl3+)))
19179
19180 (define-public python-stone
19181 (package
19182 (name "python-stone")
19183 (version "3.2.1")
19184 (source
19185 (origin
19186 (method url-fetch)
19187 (uri (pypi-uri "stone" version))
19188 (sha256
19189 (base32
19190 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
19191 (build-system python-build-system)
19192 (arguments
19193 `(#:phases
19194 (modify-phases %standard-phases
19195 (add-after 'unpack 'change-version-requirements
19196 (lambda _
19197 ;; Match the requirement in test/requirements.txt
19198 (substitute* "setup.py"
19199 (("pytest < 5") "pytest < 7"))
19200 ;; We don't care about a coverage report.
19201 (substitute* "test/requirements.txt"
19202 (("coverage.*") "coverage\n"))
19203 #t))
19204 (replace 'check
19205 (lambda* (#:key tests? #:allow-other-keys)
19206 (when tests?
19207 ;; These tests don't import currectly.
19208 (delete-file "test/test_js_client.py")
19209 (delete-file "test/test_tsd_types.py")
19210 (delete-file "test/test_python_gen.py")
19211 (setenv "PYTHONPATH"
19212 (string-append (getcwd) ":"
19213 (getenv "PYTHONPATH")))
19214 (invoke "pytest"))
19215 #t)))))
19216 (propagated-inputs
19217 `(("python-ply" ,python-ply)
19218 ("python-six" ,python-six)))
19219 (native-inputs
19220 `(("python-coverage" ,python-coverage)
19221 ("python-mock" ,python-mock)
19222 ("python-pytest" ,python-pytest)
19223 ("python-pytest-runner" ,python-pytest-runner)))
19224 (home-page "https://github.com/dropbox/stone")
19225 (synopsis "Official Api Spec Language for Dropbox")
19226 (description
19227 "Stone is an interface description language (IDL) for APIs.")
19228 (license license:expat)))
19229
19230 (define-public pybind11
19231 (package
19232 (name "pybind11")
19233 (version "2.6.1")
19234 (source (origin
19235 (method git-fetch)
19236 (uri (git-reference
19237 (url "https://github.com/pybind/pybind11")
19238 (commit (string-append "v" version))))
19239 (sha256
19240 (base32
19241 "1wh5b1xnywzxwxkyac2wvyqwzmy1qxs341jjk820r7b825wn6yad"))
19242 (file-name (git-file-name name version))))
19243 (build-system cmake-build-system)
19244 (native-inputs
19245 `(("python" ,python-wrapper)
19246
19247 ;; The following dependencies are used for tests.
19248 ("python-pytest" ,python-pytest)
19249 ("catch" ,catch-framework2-1)
19250 ("eigen" ,eigen)))
19251 (arguments
19252 `(#:configure-flags
19253 (list (string-append "-DCATCH_INCLUDE_DIR="
19254 (assoc-ref %build-inputs "catch")
19255 "/include/catch"))
19256
19257 #:phases (modify-phases %standard-phases
19258 (add-after 'install 'install-python
19259 (lambda* (#:key outputs #:allow-other-keys)
19260 (let ((out (assoc-ref outputs "out")))
19261 (with-directory-excursion "../source"
19262 (setenv "PYBIND11_USE_CMAKE" "yes")
19263 (invoke "python" "setup.py" "install"
19264 "--single-version-externally-managed"
19265 "--root=/"
19266 (string-append "--prefix=" out)))))))
19267
19268 #:test-target "check"))
19269 (home-page "https://github.com/pybind/pybind11/")
19270 (synopsis "Seamless operability between C++11 and Python")
19271 (description
19272 "@code{pybind11} is a lightweight header-only library that exposes C++
19273 types in Python and vice versa, mainly to create Python bindings of existing
19274 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
19275 library: to minimize boilerplate code in traditional extension modules by
19276 inferring type information using compile-time introspection.")
19277 (license license:bsd-3)))
19278
19279 (define-public python-fasteners
19280 (package
19281 (name "python-fasteners")
19282 (version "0.15")
19283 (source
19284 (origin
19285 (method url-fetch)
19286 (uri (pypi-uri "fasteners" version))
19287 (sha256
19288 (base32
19289 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
19290 (build-system python-build-system)
19291 (propagated-inputs
19292 `(("python-monotonic" ,python-monotonic)
19293 ("python-six" ,python-six)))
19294 (native-inputs
19295 `(("python-testtools" ,python-testtools)))
19296 (home-page "https://github.com/harlowja/fasteners")
19297 (synopsis "Python package that provides useful locks")
19298 (description
19299 "This package provides a Python program that provides following locks:
19300
19301 @itemize
19302 @item Locking decorator
19303 @item Reader-writer locks
19304 @item Inter-process locks
19305 @item Generic helpers
19306 @end itemize\n")
19307 (license license:asl2.0)))
19308
19309 (define-public python-requests-file
19310 (package
19311 (name "python-requests-file")
19312 (version "1.4.3")
19313 (source
19314 (origin
19315 (method url-fetch)
19316 (uri (pypi-uri "requests-file" version))
19317 (sha256
19318 (base32
19319 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
19320 (build-system python-build-system)
19321 (propagated-inputs
19322 `(("python-requests" ,python-requests)
19323 ("python-six" ,python-six)))
19324 (home-page
19325 "https://github.com/dashea/requests-file")
19326 (synopsis "File transport adapter for Requests")
19327 (description
19328 "Requests-File is a transport adapter for use with the Requests Python
19329 library to allow local file system access via @code{file://} URLs.")
19330 (license license:asl2.0)))
19331
19332 (define-public python2-requests-file
19333 (package-with-python2 python-requests-file))
19334
19335 (define-public python-identify
19336 (package
19337 (name "python-identify")
19338 (version "1.4.25")
19339 (source
19340 (origin
19341 ;; There are no tests in the PyPI tarball.
19342 (method git-fetch)
19343 (uri (git-reference
19344 (url "https://github.com/chriskuehl/identify")
19345 (commit (string-append "v" version))))
19346 (file-name (git-file-name name version))
19347 (sha256
19348 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
19349 (build-system python-build-system)
19350 (arguments
19351 `(#:phases
19352 (modify-phases %standard-phases
19353 (replace 'check
19354 (lambda _
19355 (invoke "pytest" "-vv"))))))
19356 (native-inputs
19357 `(("python-coverage" ,python-coverage)
19358 ("python-pytest" ,python-pytest)))
19359 (propagated-inputs
19360 `(("python-editdistance" ,python-editdistance)))
19361 (home-page "https://github.com/chriskuehl/identify")
19362 (synopsis "File identification library for Python")
19363 (description
19364 "@code{identify} is a file identification library for Python. Given
19365 a file (or some information about a file), return a set of standardized tags
19366 identifying what the file is.")
19367 (license license:expat)))
19368
19369 (define-public python-tldextract
19370 (package
19371 (name "python-tldextract")
19372 (version "2.2.0")
19373 (source
19374 (origin
19375 (method url-fetch)
19376 (uri (pypi-uri "tldextract" version))
19377 (sha256
19378 (base32
19379 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
19380 (build-system python-build-system)
19381 (native-inputs
19382 `(("python-pytest" ,python-pytest)
19383 ("python-responses" ,python-responses)))
19384 (propagated-inputs
19385 `(("python-idna" ,python-idna)
19386 ("python-requests" ,python-requests)
19387 ("python-requests-file" ,python-requests-file)))
19388 (home-page
19389 "https://github.com/john-kurkowski/tldextract")
19390 (synopsis
19391 "Separate the TLD from the registered domain and subdomains of a URL")
19392 (description
19393 "TLDExtract accurately separates the TLD from the registered domain and
19394 subdomains of a URL, using the Public Suffix List. By default, this includes
19395 the public ICANN TLDs and their exceptions. It can optionally support the
19396 Public Suffix List's private domains as well.")
19397 (license license:bsd-3)))
19398
19399 (define-public python2-tldextract
19400 (package-with-python2 python-tldextract))
19401
19402 (define-public python-nodeenv
19403 (package
19404 (name "python-nodeenv")
19405 (version "1.4.0")
19406 (source
19407 (origin
19408 ;; There's no tarball in PyPI.
19409 (method git-fetch)
19410 (uri (git-reference
19411 (url "https://github.com/ekalinin/nodeenv")
19412 (commit version)))
19413 (file-name (git-file-name name version))
19414 (sha256
19415 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
19416 (build-system python-build-system)
19417 (arguments
19418 `(#:phases
19419 (modify-phases %standard-phases
19420 (replace 'check
19421 (lambda _
19422 ;; This test fails. It tries to open a network socket.
19423 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
19424 (native-inputs
19425 `(("python-coverage" ,python-coverage)
19426 ("python-mock" ,python-mock)
19427 ("python-pytest" ,python-pytest)))
19428 (home-page "https://ekalinin.github.io/nodeenv/")
19429 (synopsis "Create isolated node.js environments")
19430 (description
19431 "Nodeenv (node.js virtual environment) is a tool to create isolated
19432 node.js environments. It creates an environment that has its own installation
19433 directories, that doesn't share libraries with other node.js virtual
19434 environments.")
19435 (license license:bsd-3)))
19436
19437 (define-public python-pynamecheap
19438 (package
19439 (name "python-pynamecheap")
19440 (version "0.0.3")
19441 (source
19442 (origin
19443 (method url-fetch)
19444 (uri (pypi-uri "PyNamecheap" version))
19445 (sha256
19446 (base32
19447 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
19448 (build-system python-build-system)
19449 (propagated-inputs
19450 `(("python-requests" ,python-requests)))
19451 (home-page
19452 "https://github.com/Bemmu/PyNamecheap")
19453 (synopsis
19454 "Namecheap API client in Python")
19455 (description
19456 "PyNamecheap is a Namecheap API client in Python.")
19457 (license license:expat)))
19458
19459 (define-public python2-pynamecheap
19460 (package-with-python2 python-pynamecheap))
19461
19462 (define-public python-dns-lexicon
19463 (package
19464 (name "python-dns-lexicon")
19465 (version "2.4.0")
19466 (source
19467 (origin
19468 (method url-fetch)
19469 (uri (pypi-uri "dns-lexicon" version))
19470 (sha256
19471 (base32
19472 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
19473 (build-system python-build-system)
19474 (arguments
19475 `(#:tests? #f)) ;requires internet access
19476 (propagated-inputs
19477 `(("python-future" ,python-future)
19478 ("python-pynamecheap" ,python-pynamecheap)
19479 ("python-requests" ,python-requests)
19480 ("python-tldextract" ,python-tldextract)
19481 ("python-urllib3" ,python-urllib3)))
19482 (home-page "https://github.com/AnalogJ/lexicon")
19483 (synopsis
19484 "Manipulate DNS records on various DNS providers")
19485 (description
19486 "Lexicon provides a way to manipulate DNS records on multiple DNS
19487 providers in a standardized way. It has a CLI but it can also be used as a
19488 Python library. It was designed to be used in automation, specifically with
19489 Let's Encrypt.")
19490 (license license:expat)))
19491
19492 (define-public python2-dns-lexicon
19493 (package-with-python2 python-dns-lexicon))
19494
19495 (define-public python-cfgv
19496 (package
19497 (name "python-cfgv")
19498 (version "3.1.0")
19499 (source
19500 (origin
19501 ;; There are no tests in the PyPI tarball.
19502 (method git-fetch)
19503 (uri (git-reference
19504 (url "https://github.com/asottile/cfgv")
19505 (commit (string-append "v" version))))
19506 (file-name (git-file-name name version))
19507 (sha256
19508 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19509 (build-system python-build-system)
19510 (arguments
19511 `(#:phases
19512 (modify-phases %standard-phases
19513 (replace 'check
19514 (lambda _
19515 (invoke "pytest" "-vv"))))))
19516 (native-inputs
19517 `(("python-covdefaults" ,python-covdefaults)
19518 ("python-coverage" ,python-coverage)
19519 ("python-pytest" ,python-pytest)))
19520 (home-page "https://github.com/asottile/cfgv")
19521 (synopsis "Configuration validation library")
19522 (description
19523 "This library helps to validate configuration files and produce human
19524 readable error messages.")
19525 (license license:expat)))
19526
19527 (define-public python-commandlines
19528 (package
19529 (name "python-commandlines")
19530 (version "0.4.1")
19531 (source
19532 (origin
19533 (method url-fetch)
19534 (uri (pypi-uri "commandlines" version))
19535 (sha256
19536 (base32
19537 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
19538 (build-system python-build-system)
19539 (home-page "https://github.com/chrissimpkins/commandlines")
19540 (synopsis "Command line argument to object parsing library")
19541 (description
19542 "@code{Commandlines} is a Python library for command line application
19543 development that supports command line argument parsing, command string
19544 validation testing and application logic.")
19545 (license license:expat)))
19546
19547 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19548 ;; python-numba. They have a very unflexible relationship.
19549 (define-public python-numba
19550 (package
19551 (name "python-numba")
19552 (version "0.51.2")
19553 (source
19554 (origin
19555 (method url-fetch)
19556 (uri (pypi-uri "numba" version))
19557 (sha256
19558 (base32
19559 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19560 (build-system python-build-system)
19561 (arguments
19562 `(#:phases
19563 (modify-phases %standard-phases
19564 (add-after 'unpack 'disable-proprietary-features
19565 (lambda _
19566 (setenv "NUMBA_DISABLE_HSA" "1")
19567 (setenv "NUMBA_DISABLE_CUDA" "1")
19568 #t))
19569 (replace 'check
19570 (lambda* (#:key inputs outputs #:allow-other-keys)
19571 (add-installed-pythonpath inputs outputs)
19572 ;; Something is wrong with the PYTHONPATH when running the
19573 ;; tests from the build directory, as it complains about not being
19574 ;; able to import certain modules.
19575 (with-directory-excursion "/tmp"
19576 (setenv "HOME" (getcwd))
19577 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19578 (propagated-inputs
19579 `(("python-llvmlite" ,python-llvmlite)
19580 ("python-numpy" ,python-numpy)
19581 ("python-singledispatch" ,python-singledispatch)))
19582 (native-inputs ;for tests
19583 `(("python-jinja2" ,python-jinja2)
19584 ("python-pygments" ,python-pygments)))
19585 (home-page "https://numba.pydata.org")
19586 (synopsis "Compile Python code using LLVM")
19587 (description "Numba gives you the power to speed up your applications with
19588 high performance functions written directly in Python. With a few
19589 annotations, array-oriented and math-heavy Python code can be just-in-time
19590 compiled to native machine instructions, similar in performance to C, C++ and
19591 Fortran, without having to switch languages or Python interpreters.
19592
19593 Numba works by generating optimized machine code using the LLVM compiler
19594 infrastructure at import time, runtime, or statically (using the included pycc
19595 tool).")
19596 (license license:bsd-3)))
19597
19598 (define-public python-numcodecs
19599 (package
19600 (name "python-numcodecs")
19601 (version "0.6.4")
19602 (source
19603 (origin
19604 (method url-fetch)
19605 (uri (pypi-uri "numcodecs" version))
19606 (sha256
19607 (base32
19608 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19609 (build-system python-build-system)
19610 (propagated-inputs
19611 `(("python-numpy" ,python-numpy)
19612 ("python-msgpack" ,python-msgpack)))
19613 (native-inputs
19614 `(("python-pytest" ,python-pytest)
19615 ("python-setuptools-scm" ,python-setuptools-scm)))
19616 (home-page "https://github.com/zarr-developers/numcodecs")
19617 (synopsis "Buffer compression and transformation codecs")
19618 (description
19619 "This Python package provides buffer compression and transformation
19620 codecs for use in data storage and communication applications.")
19621 (license license:expat)))
19622
19623 (define-public python-asciitree
19624 (package
19625 (name "python-asciitree")
19626 (version "0.3.3")
19627 (source
19628 (origin
19629 (method url-fetch)
19630 (uri (pypi-uri "asciitree" version))
19631 (sha256
19632 (base32
19633 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19634 (build-system python-build-system)
19635 (home-page "https://github.com/mbr/asciitree")
19636 (synopsis "Draws ASCII trees")
19637 (description "This package draws tree structures using characters.")
19638 (license license:expat)))
19639
19640 (define-public python-zarr
19641 (package
19642 (name "python-zarr")
19643 (version "2.4.0")
19644 (source
19645 (origin
19646 (method url-fetch)
19647 (uri (pypi-uri "zarr" version))
19648 (sha256
19649 (base32
19650 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19651 (build-system python-build-system)
19652 (arguments
19653 `(#:phases
19654 (modify-phases %standard-phases
19655 (add-after 'unpack 'disable-service-tests
19656 (lambda _
19657 (setenv "ZARR_TEST_ABS" "0")
19658 (setenv "ZARR_TEST_MONGO" "0")
19659 (setenv "ZARR_TEST_REDIS" "0")
19660 #t))
19661 (replace 'check
19662 (lambda _
19663 (invoke "pytest" "-vv" "-k" "not lmdb")
19664 #t)))))
19665 (propagated-inputs
19666 `(("python-asciitree" ,python-asciitree)
19667 ("python-fasteners" ,python-fasteners)
19668 ("python-numcodecs" ,python-numcodecs)
19669 ("python-numpy" ,python-numpy)))
19670 (native-inputs
19671 `(("python-pytest" ,python-pytest)
19672 ("python-setuptools-scm" ,python-setuptools-scm)))
19673 (home-page "https://github.com/zarr-developers/zarr-python")
19674 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19675 (description
19676 "This package provides an implementation of chunked, compressed,
19677 N-dimensional arrays for Python.")
19678 (license license:expat)))
19679
19680 (define-public python-anndata
19681 (package
19682 (name "python-anndata")
19683 (version "0.7.1")
19684 (source
19685 (origin
19686 (method url-fetch)
19687 (uri (pypi-uri "anndata" version))
19688 (sha256
19689 (base32
19690 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19691 (build-system python-build-system)
19692 (arguments
19693 `(#:phases
19694 (modify-phases %standard-phases
19695 (add-after 'unpack 'delete-inconvenient-tests
19696 (lambda _
19697 ;; This test depends on python-scikit-learn.
19698 (delete-file "anndata/tests/test_inplace_subset.py")
19699 #t))
19700 (delete 'check)
19701 (add-after 'install 'check
19702 (lambda* (#:key inputs outputs #:allow-other-keys)
19703 (add-installed-pythonpath inputs outputs)
19704 (invoke "pytest" "-vv"))))))
19705 (propagated-inputs
19706 `(("python-h5py" ,python-h5py)
19707 ("python-importlib-metadata" ,python-importlib-metadata)
19708 ("python-natsort" ,python-natsort)
19709 ("python-numcodecs" ,python-numcodecs)
19710 ("python-packaging" ,python-packaging)
19711 ("python-pandas" ,python-pandas)
19712 ("python-scipy" ,python-scipy)
19713 ("python-zarr" ,python-zarr)))
19714 (native-inputs
19715 `(("python-joblib" ,python-joblib)
19716 ("python-pytest" ,python-pytest)
19717 ("python-setuptools-scm" ,python-setuptools-scm)))
19718 (home-page "https://github.com/theislab/anndata")
19719 (synopsis "Annotated data for data analysis pipelines")
19720 (description "Anndata is a package for simple (functional) high-level APIs
19721 for data analysis pipelines. In this context, it provides an efficient,
19722 scalable way of keeping track of data together with learned annotations and
19723 reduces the code overhead typically encountered when using a mostly
19724 object-oriented library such as @code{scikit-learn}.")
19725 (license license:bsd-3)))
19726
19727 (define-public python-dill
19728 (package
19729 (name "python-dill")
19730 (version "0.3.1.1")
19731 (source
19732 (origin
19733 (method url-fetch)
19734 (uri (pypi-uri "dill" version))
19735 (sha256
19736 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
19737 (build-system python-build-system)
19738 (arguments
19739 `(#:phases
19740 (modify-phases %standard-phases
19741 (replace 'check
19742 (lambda _
19743 (with-directory-excursion "/tmp"
19744 (invoke "nosetests" "-v"))
19745 #t)))))
19746 (native-inputs
19747 `(("python-nose" ,python-nose)))
19748 (home-page "https://pypi.org/project/dill/")
19749 (synopsis "Serialize all of Python")
19750 (description "Dill extends Python's @code{pickle} module for serializing
19751 and de-serializing Python objects to the majority of the built-in Python
19752 types. Dill provides the user the same interface as the @code{pickle} module,
19753 and also includes some additional features. In addition to pickling Python
19754 objects, @code{dill} provides the ability to save the state of an interpreter
19755 session in a single command. Hence, it would be feasible to save a
19756 interpreter session, close the interpreter, ship the pickled file to another
19757 computer, open a new interpreter, unpickle the session and thus continue from
19758 the saved state of the original interpreter session.")
19759 (license license:bsd-3)))
19760
19761 (define-public python-multiprocess
19762 (package
19763 (name "python-multiprocess")
19764 (version "0.70.9")
19765 (source
19766 (origin
19767 (method url-fetch)
19768 (uri (pypi-uri "multiprocess" version))
19769 (sha256
19770 (base32
19771 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
19772 (build-system python-build-system)
19773 (arguments
19774 `(#:phases
19775 (modify-phases %standard-phases
19776 (add-after 'unpack 'disable-broken-tests
19777 (lambda _
19778 ;; This test is broken as there is no keyboard interrupt.
19779 (substitute* "py3.7/multiprocess/tests/__init__.py"
19780 (("^(.*)def test_wait_result"
19781 line indent)
19782 (string-append indent
19783 "@unittest.skip(\"Disabled by Guix\")\n"
19784 line)))
19785 #t))
19786 ;; Tests must be run after installation.
19787 (delete 'check)
19788 (add-after 'install 'check
19789 (lambda* (#:key inputs outputs #:allow-other-keys)
19790 (add-installed-pythonpath inputs outputs)
19791 (invoke "python" "-m" "multiprocess.tests")
19792 #t)))))
19793 (propagated-inputs
19794 `(("python-dill" ,python-dill)))
19795 (home-page "https://pypi.org/project/multiprocess/")
19796 (synopsis "Multiprocessing and multithreading in Python")
19797 (description
19798 "This package is a fork of the multiprocessing Python package, a package
19799 which supports the spawning of processes using the API of the standard
19800 library's @code{threading} module.")
19801 (license license:bsd-3)))
19802
19803 (define-public python-toolz
19804 (package
19805 (name "python-toolz")
19806 (version "0.9.0")
19807 (source
19808 (origin
19809 (method url-fetch)
19810 (uri (pypi-uri "toolz" version))
19811 (sha256
19812 (base32
19813 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
19814 (build-system python-build-system)
19815 ;; FIXME: tests cannot be computed: "Can't perform this operation for
19816 ;; unregistered loader type"
19817 (arguments '(#:tests? #f))
19818 (home-page "https://github.com/pytoolz/toolz/")
19819 (synopsis "List processing tools and functional utilities")
19820 (description
19821 "This package provides a set of utility functions for iterators,
19822 functions, and dictionaries.")
19823 (license license:bsd-3)))
19824
19825 (define-public python2-toolz
19826 (package-with-python2 python-toolz))
19827
19828 (define-public python-cytoolz
19829 (package
19830 (name "python-cytoolz")
19831 (version "0.9.0.1")
19832 (source
19833 (origin
19834 (method url-fetch)
19835 (uri (pypi-uri "cytoolz" version))
19836 (sha256
19837 (base32
19838 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
19839 (build-system python-build-system)
19840 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
19841 ;; 'exceptions'"
19842 (arguments '(#:tests? #f))
19843 (propagated-inputs
19844 `(("python-toolz" ,python-toolz)))
19845 (native-inputs
19846 `(("python-cython" ,python-cython)))
19847 (home-page "https://github.com/pytoolz/cytoolz")
19848 (synopsis "High performance functional utilities")
19849 (description
19850 "The cytoolz package implements the same API as provided by toolz. The
19851 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
19852 that is accessible to other projects developed in Cython.")
19853 (license license:bsd-3)))
19854
19855 (define-public python-sortedcontainers
19856 (package
19857 (name "python-sortedcontainers")
19858 (version "2.1.0")
19859 (source
19860 (origin
19861 (method url-fetch)
19862 (uri (pypi-uri "sortedcontainers" version))
19863 (sha256
19864 (base32
19865 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
19866 (build-system python-build-system)
19867 (arguments
19868 ;; FIXME: Tests require many extra dependencies, and would introduce
19869 ;; a circular dependency on hypothesis, which uses this package.
19870 '(#:tests? #f))
19871 (propagated-inputs
19872 `(("python-appdirs" ,python-appdirs)
19873 ("python-distlib" ,python-distlib)
19874 ("python-filelock" ,python-filelock)
19875 ("python-six" ,python-six-bootstrap)))
19876 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
19877 (synopsis "Sorted List, Sorted Dict, Sorted Set")
19878 (description
19879 "This package provides a sorted collections library, written in
19880 pure-Python.")
19881 (license license:asl2.0)))
19882
19883 (define-public python2-sortedcontainers
19884 (package-with-python2 python-sortedcontainers))
19885
19886 (define-public python-cloudpickle
19887 (package
19888 (name "python-cloudpickle")
19889 (version "1.3.0")
19890 (source
19891 (origin
19892 (method url-fetch)
19893 (uri (pypi-uri "cloudpickle" version))
19894 (sha256
19895 (base32
19896 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
19897 (build-system python-build-system)
19898 (arguments
19899 '(#:phases (modify-phases %standard-phases
19900 (add-before 'check 'do-not-override-PYTHONPATH
19901 (lambda _
19902 ;; Append to PYTHONPATH instead of overriding it so
19903 ;; that dependencies from Guix can be found.
19904 (substitute* "tests/testutils.py"
19905 (("env\\['PYTHONPATH'\\] = pythonpath")
19906 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
19907 #t))
19908 (replace 'check
19909 (lambda* (#:key tests? #:allow-other-keys)
19910 (if tests?
19911 (invoke "pytest" "-s" "-vv")
19912 (format #t "test suite not run~%"))
19913 #t)))))
19914 (native-inputs
19915 `(;; For tests.
19916 ("python-psutil" ,python-psutil)
19917 ("python-pytest" ,python-pytest)
19918 ("python-tornado" ,python-tornado)))
19919 (home-page "https://github.com/cloudpipe/cloudpickle")
19920 (synopsis "Extended pickling support for Python objects")
19921 (description
19922 "Cloudpickle makes it possible to serialize Python constructs not
19923 supported by the default pickle module from the Python standard library. It
19924 is especially useful for cluster computing where Python expressions are
19925 shipped over the network to execute on remote hosts, possibly close to the
19926 data.")
19927 (properties `((python2-variant . ,(delay python2-cloudpickle))))
19928 (license license:bsd-3)))
19929
19930 (define-public python2-cloudpickle
19931 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
19932 (package
19933 (inherit base)
19934 (native-inputs
19935 `(("python-mock" ,python2-mock)
19936 ,@(package-native-inputs base)))
19937 (propagated-inputs
19938 `(("python-futures" ,python2-futures)
19939 ,@(package-propagated-inputs base))))))
19940
19941 (define-public python-locket
19942 (package
19943 (name "python-locket")
19944 (version "0.2.0")
19945 (source
19946 (origin
19947 (method url-fetch)
19948 (uri (pypi-uri "locket" version))
19949 (sha256
19950 (base32
19951 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
19952 (build-system python-build-system)
19953 (home-page "https://github.com/mwilliamson/locket.py")
19954 (synopsis "File-based locks for Python")
19955 (description
19956 "Locket implements a lock that can be used by multiple processes provided
19957 they use the same path.")
19958 (license license:bsd-2)))
19959
19960 (define-public python2-locket
19961 (package-with-python2 python-locket))
19962
19963 (define-public python-blosc
19964 (package
19965 (name "python-blosc")
19966 (version "1.5.1")
19967 (source
19968 (origin
19969 (method url-fetch)
19970 (uri (pypi-uri "blosc" version))
19971 (sha256
19972 (base32
19973 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
19974 (build-system python-build-system)
19975 ;; FIXME: all tests pass, but then this error is printed:
19976 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
19977 (arguments '(#:tests? #f))
19978 (propagated-inputs
19979 `(("python-numpy" ,python-numpy)))
19980 (home-page "https://github.com/blosc/python-blosc")
19981 (synopsis "Python wrapper for the Blosc data compressor library")
19982 (description "Blosc is a high performance compressor optimized for binary
19983 data. It has been designed to transmit data to the processor cache faster
19984 than the traditional, non-compressed, direct memory fetch approach via a
19985 @code{memcpy()} system call.
19986
19987 Blosc works well for compressing numerical arrays that contains data with
19988 relatively low entropy, like sparse data, time series, grids with
19989 regular-spaced values, etc.
19990
19991 This Python package wraps the Blosc library.")
19992 (license license:bsd-3)))
19993
19994 (define-public python2-blosc
19995 (package-with-python2 python-blosc))
19996
19997 (define-public python-partd
19998 (package
19999 (name "python-partd")
20000 (version "0.3.9")
20001 (source
20002 (origin
20003 (method url-fetch)
20004 (uri (pypi-uri "partd" version))
20005 (sha256
20006 (base32
20007 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
20008 (build-system python-build-system)
20009 (propagated-inputs
20010 `(("python-blosc" ,python-blosc)
20011 ("python-locket" ,python-locket)
20012 ("python-numpy" ,python-numpy)
20013 ("python-pandas" ,python-pandas)
20014 ("python-pyzmq" ,python-pyzmq)
20015 ("python-toolz" ,python-toolz)))
20016 (home-page "https://github.com/dask/partd/")
20017 (synopsis "Appendable key-value storage")
20018 (description "Partd stores key-value pairs. Values are raw bytes. We
20019 append on old values. Partd excels at shuffling operations.")
20020 (license license:bsd-3)))
20021
20022 (define-public python2-partd
20023 (package-with-python2 python-partd))
20024
20025 (define-public python-fsspec
20026 (package
20027 (name "python-fsspec")
20028 (version "0.6.1")
20029 (source
20030 (origin
20031 (method url-fetch)
20032 (uri (pypi-uri "fsspec" version))
20033 (sha256
20034 (base32
20035 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
20036 (build-system python-build-system)
20037 (arguments '(#:tests? #f)) ; there are none
20038 (home-page "https://github.com/intake/filesystem_spec")
20039 (synopsis "File-system specification")
20040 (description "The purpose of this package is to produce a template or
20041 specification for a file-system interface, that specific implementations
20042 should follow, so that applications making use of them can rely on a common
20043 behavior and not have to worry about the specific internal implementation
20044 decisions with any given backend.")
20045 (license license:bsd-3)))
20046
20047 (define-public python-dask
20048 (package
20049 (name "python-dask")
20050 (version "2.14.0")
20051 (source
20052 (origin
20053 (method url-fetch)
20054 (uri (pypi-uri "dask" version))
20055 (sha256
20056 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
20057 (build-system python-build-system)
20058 (arguments
20059 `(#:phases
20060 (modify-phases %standard-phases
20061 (add-after 'unpack 'disable-broken-tests
20062 (lambda _
20063 ;; This test is marked as xfail when pytest-xdist is used.
20064 (substitute* "dask/tests/test_threaded.py"
20065 (("def test_interrupt\\(\\)" m)
20066 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20067 m)))
20068 ;; This one fails with a type error:
20069 ;; TypeError: Already tz-aware, use tz_convert to convert.
20070 (substitute* "dask/dataframe/tests/test_shuffle.py"
20071 (("def test_set_index_timestamp\\(\\)" m)
20072 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20073 m)))
20074 #t))
20075 (replace 'check
20076 (lambda _ (invoke "pytest" "-vv"))))))
20077 (propagated-inputs
20078 `(("python-cloudpickle" ,python-cloudpickle)
20079 ("python-fsspec" ,python-fsspec)
20080 ("python-numpy" ,python-numpy)
20081 ("python-packaging" ,python-packaging)
20082 ("python-pandas" ,python-pandas)
20083 ("python-partd" ,python-partd)
20084 ("python-toolz" ,python-toolz)
20085 ("python-pyyaml" ,python-pyyaml)))
20086 (native-inputs
20087 `(("python-pytest" ,python-pytest)
20088 ("python-pytest-runner" ,python-pytest-runner)))
20089 (home-page "https://github.com/dask/dask/")
20090 (synopsis "Parallel computing with task scheduling")
20091 (description
20092 "Dask is a flexible parallel computing library for analytics. It
20093 consists of two components: dynamic task scheduling optimized for computation,
20094 and large data collections like parallel arrays, dataframes, and lists that
20095 extend common interfaces like NumPy, Pandas, or Python iterators to
20096 larger-than-memory or distributed environments. These parallel collections
20097 run on top of the dynamic task schedulers. ")
20098 (license license:bsd-3)))
20099
20100 (define-public python-ilinkedlist
20101 (package
20102 (name "python-ilinkedlist")
20103 (version "0.4.0")
20104 (source
20105 (origin
20106 (method url-fetch)
20107 (uri (pypi-uri "ilinkedlist" version))
20108 (sha256
20109 (base32
20110 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
20111 (build-system python-build-system)
20112 (native-inputs `(("python-pytest" ,python-pytest)))
20113 (inputs `(("python" ,python)))
20114 (home-page "https://github.com/luther9/ilinkedlist-py")
20115 (synopsis "Immutable linked list library")
20116 (description
20117 "This is a implementation of immutable linked lists for Python. It
20118 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
20119 Since a linked list is treated as immutable, it is hashable, and its length
20120 can be retrieved in constant time. Some of the terminology is inspired by
20121 LISP. It is possible to create an improper list by creating a @code{Pair}
20122 with a non-list @code{cdr}.")
20123 (license license:gpl3+)))
20124
20125 (define-public python-readlike
20126 (package
20127 (name "python-readlike")
20128 (version "0.1.3")
20129 (source
20130 (origin
20131 (method url-fetch)
20132 (uri (pypi-uri "readlike" version))
20133 (sha256
20134 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
20135 (build-system python-build-system)
20136 (home-page "https://github.com/jangler/readlike")
20137 (synopsis "GNU Readline-like line editing module")
20138 (description
20139 "This Python module provides line editing functions similar to the default
20140 Emacs-style ones of GNU Readline. Unlike the Python standard library's
20141 @code{readline} package, this one allows access to those capabilities in settings
20142 outside of a standard command-line interface. It is especially well-suited to
20143 interfacing with Urwid, due to a shared syntax for describing key inputs.
20144
20145 Currently, all stateless Readline commands are implemented. Yanking and history
20146 are not supported.")
20147 (license license:expat)))
20148
20149 (define-public python2-readlike
20150 (package-with-python2 python-readlike))
20151
20152 (define-public python-reparser
20153 (package
20154 (name "python-reparser")
20155 (version "1.4.3")
20156 (source
20157 (origin
20158 (method url-fetch)
20159 (uri (pypi-uri "ReParser" version))
20160 (sha256
20161 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
20162 (build-system python-build-system)
20163 (home-page "https://github.com/xmikos/reparser")
20164 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
20165 (description
20166 "This Python library provides a simple lexer/parser for inline markup based
20167 on regular expressions.")
20168 (license license:expat)))
20169
20170 (define-public python2-reparser
20171 (let ((reparser (package-with-python2
20172 (strip-python2-variant python-reparser))))
20173 (package (inherit reparser)
20174 (propagated-inputs
20175 `(("python2-enum34" ,python2-enum34)
20176 ,@(package-propagated-inputs reparser))))))
20177
20178 (define-public python-retrying
20179 (package
20180 (name "python-retrying")
20181 (version "1.3.3")
20182 (source
20183 (origin
20184 (method git-fetch)
20185 (uri (git-reference
20186 (url "https://github.com/rholder/retrying")
20187 (commit (string-append "v" version))))
20188 (file-name (git-file-name name version))
20189 (sha256
20190 (base32
20191 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
20192 (build-system python-build-system)
20193 (propagated-inputs
20194 `(("python-six" ,python-six)))
20195 (home-page "https://github.com/rholder/retrying")
20196 (synopsis "Library for adding retry behavior")
20197 (description "Retrying is a general-purpose retrying library to simplify
20198 the task of adding retry behavior to just about anything.
20199
20200 Features:
20201
20202 @itemize
20203 @item Generic Decorator API.
20204 @item Specify stop condition (i.e. limit by number of attempts).
20205 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
20206 @item Customize retrying on Exceptions.
20207 @item Customize retrying on expected returned result.
20208 @end itemize")
20209 (license license:asl2.0)))
20210
20211 (define-public python-pre-commit
20212 (package
20213 (name "python-pre-commit")
20214 (version "2.10.0")
20215 (source
20216 (origin
20217 (method url-fetch)
20218 (uri (pypi-uri "pre_commit" version))
20219 (sha256
20220 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
20221 (build-system python-build-system)
20222 (arguments
20223 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
20224 ;; attribute 'empty_template_setup'".
20225 `(#:tests? #false))
20226 (propagated-inputs
20227 `(("python-cfgv" ,python-cfgv)
20228 ("python-identify" ,python-identify)
20229 ("python-importlib-metadata" ,python-importlib-metadata)
20230 ("python-importlib-resources" ,python-importlib-resources)
20231 ("python-nodeenv" ,python-nodeenv)
20232 ("python-pyyaml" ,python-pyyaml)
20233 ("python-toml" ,python-toml)
20234 ("python-virtualenv" ,python-virtualenv)))
20235 (home-page "https://github.com/pre-commit/pre-commit")
20236 (synopsis "Framework for managing multi-language pre-commit hooks")
20237 (description
20238 "This package provides a framework for managing and maintaining
20239 multi-language pre-commit hooks.")
20240 (license license:expat)))
20241
20242 (define-public python-precis-i18n
20243 (package
20244 (name "python-precis-i18n")
20245 (version "1.0.0")
20246 (source
20247 (origin
20248 (method url-fetch)
20249 (uri (pypi-uri "precis_i18n" version))
20250 (sha256
20251 (base32
20252 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
20253 (build-system python-build-system)
20254 (home-page "https://github.com/byllyfish/precis_i18n")
20255 (synopsis "Implementation of the PRECIS framework")
20256 (description
20257 "This module implements the PRECIS Framework as described in RFC 8264,
20258 RFC 8265 and RFC 8266.")
20259 (license license:expat)))
20260
20261 (define-public python-absl-py
20262 (package
20263 (name "python-absl-py")
20264 (version "0.6.1")
20265 (source
20266 (origin
20267 (method url-fetch)
20268 (uri (pypi-uri "absl-py" version))
20269 (sha256
20270 (base32
20271 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
20272 (build-system python-build-system)
20273 (propagated-inputs
20274 `(("python-six" ,python-six)))
20275 (home-page "https://github.com/abseil/abseil-py")
20276 (synopsis "Abseil Python common libraries")
20277 (description
20278 "This package provides the Abseil Python Common Libraries, a collection
20279 of Python libraries for building Python applications.")
20280 (license license:asl2.0)))
20281
20282 (define-public python-astor
20283 (package
20284 (name "python-astor")
20285 (version "0.7.1")
20286 (source
20287 (origin
20288 (method url-fetch)
20289 (uri (pypi-uri "astor" version))
20290 (sha256
20291 (base32
20292 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
20293 (build-system python-build-system)
20294 ;; FIXME: There are two errors and two test failures.
20295 (arguments `(#:tests? #f))
20296 (home-page "https://github.com/berkerpeksag/astor")
20297 (synopsis "Read and write Python ASTs")
20298 (description "Astor is designed to allow easy manipulation of Python
20299 source via the Abstract Syntax Tree.")
20300 (license license:bsd-3)))
20301
20302 (define-public python2-astor
20303 (package-with-python2 python-astor))
20304
20305 (define-public python-astunparse
20306 (package
20307 (name "python-astunparse")
20308 (version "1.6.2")
20309 (source
20310 (origin
20311 (method url-fetch)
20312 (uri (pypi-uri "astunparse" version))
20313 (sha256
20314 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
20315 (build-system python-build-system)
20316 (arguments '(#:tests? #f)) ; there are none
20317 (propagated-inputs
20318 `(("python-six" ,python-six)
20319 ("python-wheel" ,python-wheel)))
20320 (home-page "https://github.com/simonpercivall/astunparse")
20321 (synopsis "AST unparser for Python")
20322 (description "This package provides an AST unparser for Python. It is a
20323 factored out version of @code{unparse} found in the Python source
20324 distribution.")
20325 (license license:bsd-3)))
20326
20327 (define-public python-gast
20328 (package
20329 (name "python-gast")
20330 (version "0.3.3")
20331 (source
20332 (origin
20333 (method url-fetch)
20334 (uri (pypi-uri "gast" version))
20335 (sha256
20336 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
20337 (build-system python-build-system)
20338 (propagated-inputs
20339 `(("python-astunparse" ,python-astunparse)))
20340 (home-page "https://pypi.org/project/gast/")
20341 (synopsis "Generic Python AST that abstracts the underlying Python version")
20342 (description
20343 "GAST provides a compatibility layer between the AST of various Python
20344 versions, as produced by @code{ast.parse} from the standard @code{ast}
20345 module.")
20346 (license license:bsd-3)))
20347
20348 (define-public python-wikidata
20349 (package
20350 (name "python-wikidata")
20351 (version "0.6.1")
20352 (source
20353 (origin
20354 (method url-fetch)
20355 (uri (pypi-uri "Wikidata" version))
20356 (sha256
20357 (base32
20358 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
20359 (build-system python-build-system)
20360 (propagated-inputs
20361 `(("python-babel" ,python-babel)))
20362 (home-page "https://github.com/dahlia/wikidata")
20363 (synopsis "Wikidata client library")
20364 (description
20365 "This package provides a Python interface to
20366 @url{https://www.wikidata.org/, Wikidata}.")
20367 (properties '((upstream-name . "Wikidata")))
20368 (license license:gpl3+)))
20369
20370 (define-public python-doctest-ignore-unicode
20371 (package
20372 (name "python-doctest-ignore-unicode")
20373 (version "0.1.2")
20374 (source
20375 (origin
20376 (method url-fetch)
20377 (uri (pypi-uri "doctest-ignore-unicode" version))
20378 (sha256
20379 (base32
20380 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
20381 (build-system python-build-system)
20382 (native-inputs
20383 `(("python-nose" ,python-nose)))
20384 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
20385 (synopsis "Ignore Unicode literal prefixes in doctests")
20386 (description
20387 "This package adds support for a flag to ignore Unicode literal prefixes
20388 in doctests.")
20389 (license license:asl2.0)))
20390
20391 (define-public python-attr
20392 (package
20393 (name "python-attr")
20394 (version "0.3.1")
20395 (source
20396 (origin
20397 (method url-fetch)
20398 (uri (pypi-uri "attr" version))
20399 (sha256
20400 (base32
20401 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
20402 (build-system python-build-system)
20403 (home-page "https://github.com/denis-ryzhkov/attr")
20404 (synopsis "Decorator for attributes of target function or class")
20405 (description "Simple decorator to set attributes of target function or
20406 class in a @acronym{DRY, Don't Repeat Yourself} way.")
20407 (license license:expat)))
20408
20409 (define-public python-construct
20410 (package
20411 (name "python-construct")
20412 (version "2.10.56")
20413 (source
20414 (origin
20415 (method url-fetch)
20416 (uri (pypi-uri "construct" version))
20417 (sha256
20418 (base32
20419 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
20420 (build-system python-build-system)
20421 (arguments
20422 `(#:tests? #f)) ; No tests exist.
20423 (propagated-inputs
20424 `(("python-extras" ,python-extras)
20425 ("python-arrow" ,python-arrow)
20426 ("python-numpy" ,python-numpy)
20427 ("python-ruamel.yaml" ,python-ruamel.yaml)))
20428 (home-page "https://construct.readthedocs.io")
20429 (synopsis "Declarative and symmetrical parser and builder for binary data")
20430 (description
20431 "This package provides both simple, atomic constructs (such as
20432 integers of various sizes), as well as composite ones which allow you
20433 form hierarchical and sequential structures of increasing complexity.
20434 It features bit and byte granularity, easy debugging and testing, an
20435 easy-to-extend subclass system, and lots of primitive constructs to
20436 make your work easier.")
20437 (license license:expat)))
20438
20439 (define-public python-outcome
20440 (package
20441 (name "python-outcome")
20442 (version "1.0.1")
20443 (source
20444 (origin
20445 (method url-fetch)
20446 (uri (pypi-uri "outcome" version))
20447 (sha256
20448 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
20449 (build-system python-build-system)
20450 (arguments
20451 `(#:phases
20452 (modify-phases %standard-phases
20453 (replace 'check
20454 (lambda* (#:key inputs outputs #:allow-other-keys)
20455 (add-installed-pythonpath inputs outputs)
20456 (invoke "pytest" "-vv"))))))
20457 (native-inputs
20458 `(("python-pytest" ,python-pytest)
20459 ("python-pytest-cov" ,python-pytest-cov)
20460 ("python-pytest-asyncio" ,python-pytest-asyncio)))
20461 (propagated-inputs
20462 `(("python-async-generator" ,python-async-generator)
20463 ("python-attrs" ,python-attrs)))
20464 (home-page "https://github.com/python-trio/outcome")
20465 (synopsis "Capture the outcome of Python function calls")
20466 (description
20467 "Capture the outcome of Python function calls. Extracted from the Trio
20468 project.")
20469 ;; Either license applies.
20470 (license (list license:expat license:asl2.0))))
20471
20472 (define-public python-trio
20473 (package
20474 (name "python-trio")
20475 (version "0.17.0")
20476 (source
20477 (origin
20478 (method url-fetch)
20479 (uri (pypi-uri "trio" version))
20480 (sha256
20481 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
20482 (build-system python-build-system)
20483 (arguments
20484 `(#:phases
20485 (modify-phases %standard-phases
20486 (add-before 'check 'change-home
20487 (lambda _
20488 ;; Tests require a writable home.
20489 (setenv "HOME" "/tmp")
20490 #t))
20491 (replace 'check
20492 (lambda _
20493 (invoke "pytest" "-vv" "-k"
20494 (string-append
20495 ;; This test times out.
20496 "not test_ki_protection_works"
20497 ;; Assertion errors.
20498 " and not test_guest_mode_ki"
20499 " and not test_run_in_trio_thread_ki"
20500 ;; These try to raise KeyboardInterrupt which does not work
20501 ;; in the build environment.
20502 " and not test_ki_self"
20503 " and not test_ki_wakes_us_up"
20504 ;; Failure in name resolution.
20505 " and not test_getnameinfo"
20506 " and not test_SocketType_resolve"
20507 ;; OSError: protocol not found.
20508 " and not test_getprotobyname")))))))
20509 (native-inputs
20510 `(("python-astor" ,python-astor)
20511 ("python-ipython" ,python-ipython)
20512 ("python-jedi" ,python-jedi)
20513 ("python-pylint" ,python-pylint)
20514 ("python-pyopenssl" ,python-pyopenssl)
20515 ("python-pytest" ,python-pytest)
20516 ("python-pytest-cov" ,python-pytest-cov)
20517 ("python-trustme" ,python-trustme)))
20518 (propagated-inputs
20519 `(("python-attrs" ,python-attrs)
20520 ("python-idna" ,python-idna)
20521 ("python-outcome" ,python-outcome)
20522 ("python-sniffio" ,python-sniffio)
20523 ("python-sortedcontainers"
20524 ,python-sortedcontainers)))
20525 (home-page "https://github.com/python-trio/trio")
20526 (synopsis "Friendly Python library for async concurrency and I/O")
20527 (description
20528 "Trio strives to be a production-quality, async/await-native I/O library
20529 for Python. Like all async libraries, its main purpose is to help you write
20530 programs that do multiple things at the same time with parallelized I/O.")
20531 ;; Either license applies.
20532 (license (list license:expat license:asl2.0))))
20533
20534 (define-public python-trio-typing
20535 (package
20536 (name "python-trio-typing")
20537 (version "0.5.0")
20538 (source
20539 (origin
20540 (method url-fetch)
20541 (uri (pypi-uri "trio-typing" version))
20542 (sha256
20543 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
20544 (build-system python-build-system)
20545 (arguments
20546 `(#:phases
20547 (modify-phases %standard-phases
20548 (replace 'check
20549 (lambda _
20550 (invoke "pytest" "-vv"))))))
20551 (native-inputs
20552 `(("python-attrs" ,python-attrs)
20553 ("python-pytest" ,python-pytest)))
20554 (propagated-inputs
20555 `(("python-mypy" ,python-mypy)
20556 ("python-mypy-extensions"
20557 ,python-mypy-extensions)
20558 ("python-trio" ,python-trio)
20559 ("python-typing-extensions"
20560 ,python-typing-extensions)))
20561 (home-page "https://github.com/python-trio/trio-typing")
20562 (synopsis "Static type checking support for Trio and related projects")
20563 (description
20564 "This package provides:
20565
20566 @itemize
20567 @item PEP 561 typing stubs packages for the Trio project packages:
20568
20569 @itemize
20570 @item trio (@code{trio-stubs})
20571 @item outcome (@code{outcome-stubs})
20572 @item async_generator (@code{async_generator-stubs})
20573 @end itemize
20574
20575 @item A package @code{trio_typing} containing types that Trio programs often
20576 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20577 a mypy plugin that smooths over some limitations in the basic type hints.
20578 @end itemize")
20579 ;; Either license applies.
20580 (license (list license:expat license:asl2.0))))
20581
20582 (define-public python-humanize
20583 (package
20584 (name "python-humanize")
20585 (version "0.5.1")
20586 (source
20587 (origin
20588 (method url-fetch)
20589 (uri (pypi-uri "humanize" version))
20590 (sha256
20591 (base32
20592 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20593 (arguments
20594 '(#:tests? #f)) ; tests not in pypi archive
20595 (build-system python-build-system)
20596 (home-page "https://github.com/jmoiron/humanize")
20597 (synopsis "Print numerical information in a human-readable form")
20598 (description "This package provides a Python module that displays numbers
20599 and dates in \"human readable\" forms. For example, it would display
20600 \"12345591313\" as \"12.3 billion\".")
20601 (license license:expat)))
20602
20603 (define-public python-txaio
20604 (package
20605 (name "python-txaio")
20606 (version "18.8.1")
20607 (source
20608 (origin
20609 (method url-fetch)
20610 (uri (pypi-uri "txaio" version))
20611 (sha256
20612 (base32
20613 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20614 (build-system python-build-system)
20615 (propagated-inputs
20616 `(("python-twisted" ,python-twisted)
20617 ("python-six" ,python-six)))
20618 (home-page "https://github.com/crossbario/txaio")
20619 (synopsis "Compatibility layer between Python asyncio and Twisted")
20620 (description "Txaio provides a compatibility layer between the Python
20621 @code{asyncio} module and @code{Twisted}.")
20622 (license license:expat)))
20623
20624 (define-public python-toolshed
20625 (package
20626 (name "python-toolshed")
20627 (version "0.4.6")
20628 (source
20629 (origin
20630 (method url-fetch)
20631 (uri (pypi-uri "toolshed" version))
20632 (sha256
20633 (base32
20634 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20635 (build-system python-build-system)
20636 (native-inputs
20637 `(("python-nose" ,python-nose)))
20638 (home-page "https://github.com/brentp/toolshed/")
20639 (synopsis "Collection of modules and functions for working with data")
20640 (description "This is a collection of well-tested, simple modules and
20641 functions that aim to reduce boilerplate when working with data.")
20642 (license license:bsd-2)))
20643
20644 (define-public python-annoy
20645 (package
20646 (name "python-annoy")
20647 (version "1.15.1")
20648 (source
20649 (origin
20650 (method url-fetch)
20651 (uri (pypi-uri "annoy" version))
20652 (sha256
20653 (base32
20654 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20655 (build-system python-build-system)
20656 (native-inputs
20657 `(("python-nose" ,python-nose)))
20658 (home-page "https://github.com/spotify/annoy/")
20659 (synopsis "Approximate nearest neighbors library")
20660 (description
20661 "Annoy is a C++ library with Python bindings to search for points in
20662 space that are close to a given query point. It also creates large read-only
20663 file-based data structures that are @code{mmap}ped into memory so that many
20664 processes may share the same data.")
20665 (license license:asl2.0)))
20666
20667 (define-public python-croniter
20668 (package
20669 (name "python-croniter")
20670 (version "0.3.34")
20671 (source (origin
20672 (method url-fetch)
20673 (uri (pypi-uri "croniter" version))
20674 (sha256
20675 (base32
20676 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20677 (build-system python-build-system)
20678 (propagated-inputs
20679 `(("python-dateutil" ,python-dateutil)
20680 ("python-natsort" ,python-natsort)))
20681 (home-page "https://github.com/kiorky/croniter")
20682 (synopsis "Iterate datetime objects with cron-like syntax")
20683 (description
20684 "@code{croniter} provides iteration for datetime object with cron-like
20685 format.")
20686 (license license:expat)))
20687
20688 (define-public python-pylzma
20689 (package
20690 (name "python-pylzma")
20691 (version "0.5.0")
20692 (source
20693 (origin
20694 (method url-fetch)
20695 (uri (pypi-uri "pylzma" version))
20696 (sha256
20697 (base32
20698 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
20699 (build-system python-build-system)
20700 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
20701 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
20702 (description "This package provides Python bindings for the LZMA library
20703 by Igor Pavlov.")
20704 (license license:lgpl2.1+)))
20705
20706 (define-public python2-pylzma
20707 (package-with-python2 python-pylzma))
20708
20709 (define-public python2-zeroconf
20710 (package
20711 (name "python2-zeroconf")
20712
20713 ;; This is the last version that supports Python 2.x.
20714 (version "0.19.1")
20715 (source
20716 (origin
20717 (method url-fetch)
20718 (uri (pypi-uri "zeroconf" version))
20719 (sha256
20720 (base32
20721 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
20722 (build-system python-build-system)
20723 (arguments
20724 `(#:python ,python-2
20725 #:phases
20726 (modify-phases %standard-phases
20727 (add-after 'unpack 'patch-requires
20728 (lambda* (#:key inputs #:allow-other-keys)
20729 (substitute* "setup.py"
20730 (("enum-compat")
20731 "enum34"))
20732 #t)))))
20733 (native-inputs
20734 `(("python2-six" ,python2-six)
20735 ("python2-enum32" ,python2-enum34)
20736 ("python2-netifaces" ,python2-netifaces)
20737 ("python2-typing" ,python2-typing)))
20738 (home-page "https://github.com/jstasiak/python-zeroconf")
20739 (synopsis "Pure Python mDNS service discovery")
20740 (description
20741 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
20742 compatible).")
20743 (license license:lgpl2.1+)))
20744
20745 (define-public python-bsddb3
20746 (package
20747 (name "python-bsddb3")
20748 (version "6.2.6")
20749 (source
20750 (origin
20751 (method url-fetch)
20752 (uri (pypi-uri "bsddb3" version))
20753 (sha256
20754 (base32
20755 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
20756 (build-system python-build-system)
20757 (inputs
20758 `(("bdb" ,bdb)))
20759 (arguments
20760 '(#:phases
20761 (modify-phases %standard-phases
20762 (add-after 'unpack 'configure-locations
20763 (lambda* (#:key inputs #:allow-other-keys)
20764 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
20765 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
20766 #t))
20767 (replace 'check
20768 (lambda _
20769 (invoke "python3" "test3.py" "-v"))))))
20770 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
20771 (synopsis "Python bindings for Oracle Berkeley DB")
20772 (description
20773 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
20774 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
20775 Transaction objects, and each of these is exposed as a Python type in the
20776 bsddb3.db module. The database objects can use various access methods: btree,
20777 hash, recno, and queue. Complete support of Berkeley DB distributed
20778 transactions. Complete support for Berkeley DB Replication Manager.
20779 Complete support for Berkeley DB Base Replication. Support for RPC.")
20780 (license license:bsd-3)))
20781
20782 (define-public python-dbfread
20783 (package
20784 (name "python-dbfread")
20785 (version "2.0.7")
20786 (source (origin
20787 (method url-fetch)
20788 (uri (pypi-uri "dbfread" version))
20789 (sha256
20790 (base32
20791 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
20792 (build-system python-build-system)
20793 (native-inputs
20794 `(("python-pytest" ,python-pytest)))
20795 (home-page "https://dbfread.readthedocs.io")
20796 (synopsis "Read DBF Files with Python")
20797 (description
20798 "This library reads DBF files and returns the data as native Python data
20799 types for further processing. It is primarily intended for batch jobs and
20800 one-off scripts.")
20801 (license license:expat)))
20802
20803 (define-public python-cached-property
20804 (package
20805 (name "python-cached-property")
20806 (version "1.5.1")
20807 (source
20808 (origin
20809 (method url-fetch)
20810 (uri (pypi-uri "cached-property" version))
20811 (sha256
20812 (base32
20813 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
20814 (build-system python-build-system)
20815 (arguments
20816 `(#:phases
20817 (modify-phases %standard-phases
20818 ;; https://github.com/pydanny/cached-property/issues/131
20819 ;; recent versions of freezegun break one test
20820 (add-after 'unpack 'disable-broken-test
20821 (lambda _
20822 (substitute* "tests/test_cached_property.py"
20823 (("def test_threads_ttl_expiry\\(self\\)" m)
20824 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
20825 " " m)))
20826 #t)))))
20827 (native-inputs
20828 `(("python-freezegun" ,python-freezegun)))
20829 (home-page
20830 "https://github.com/pydanny/cached-property")
20831 (synopsis
20832 "Decorator for caching properties in classes")
20833 (description
20834 "This package provides a decorator which makes caching
20835 time-or-computationally-expensive properties quick and easy and works in Python
20836 2 or 3.")
20837 (license license:bsd-3)))
20838
20839 (define-public python-folium
20840 (package
20841 (name "python-folium")
20842 (version "0.12.1")
20843 (source
20844 (origin
20845 ;; PyPI has a ".whl" file but not a proper source release.
20846 ;; Thus, fetch code from Git.
20847 (method git-fetch)
20848 (uri (git-reference
20849 (url "https://github.com/python-visualization/folium")
20850 (commit (string-append "v" version))))
20851 (file-name (git-file-name name version))
20852 (sha256
20853 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
20854 (build-system python-build-system)
20855 (propagated-inputs
20856 `(("python-branca" ,python-branca)
20857 ("python-jinja2" ,python-jinja2)
20858 ("python-numpy" ,python-numpy)
20859 ("python-requests" ,python-requests)))
20860 (native-inputs
20861 `(("python-pytest" ,python-pytest)))
20862 (home-page "https://github.com/python-visualization/folium")
20863 (synopsis "Make beautiful maps with Leaflet.js & Python")
20864 (description "@code{folium} makes it easy to visualize data that’s been
20865 manipulated in Python on an interactive leaflet map. It enables both the
20866 binding of data to a map for @code{choropleth} visualizations as well as
20867 passing rich vector/raster/HTML visualizations as markers on the map.
20868
20869 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
20870 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
20871 supports Image, Video, GeoJSON and TopoJSON overlays.")
20872 (license license:expat)))
20873
20874 (define-public jube
20875 (package
20876 ;; This is a command-line tool, so no "python-" prefix.
20877 (name "jube")
20878 (version "2.2.2")
20879 (source (origin
20880 (method url-fetch)
20881 (uri (string-append
20882 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
20883 version))
20884 (sha256
20885 (base32
20886 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
20887 (file-name (string-append "jube-" version ".tar.gz"))))
20888 (build-system python-build-system)
20889 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
20890 (synopsis "Benchmarking environment")
20891 (description
20892 "JUBE helps perform and analyze benchmarks in a systematic way. For each
20893 benchmarked application, benchmark data is stored in a format that allows JUBE
20894 to deduct the desired information. This data can be parsed by automatic pre-
20895 and post-processing scripts that draw information and store it more densely
20896 for manual interpretation.")
20897 (license license:gpl3+)))
20898
20899 (define-public python-pyroutelib3
20900 (package
20901 (name "python-pyroutelib3")
20902 (version "1.3.post1")
20903 (source
20904 (origin
20905 (method url-fetch)
20906 (uri (pypi-uri "pyroutelib3" version))
20907 (sha256
20908 (base32
20909 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
20910 (build-system python-build-system)
20911 (propagated-inputs
20912 `(("python-dateutil" ,python-dateutil)))
20913 (home-page "https://github.com/MKuranowski/pyroutelib3")
20914 (synopsis "Library for simple routing on OSM data")
20915 (description "Library for simple routing on OSM data")
20916 (license license:gpl3+)))
20917
20918 (define-public python-bibtexparser
20919 (package
20920 (name "python-bibtexparser")
20921 (version "1.1.0")
20922 (source
20923 (origin
20924 (method url-fetch)
20925 (uri (pypi-uri "bibtexparser" version))
20926 (sha256
20927 (base32
20928 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
20929 (build-system python-build-system)
20930 (propagated-inputs
20931 `(("python-pyparsing" ,python-pyparsing)))
20932 (native-inputs
20933 `(("python-future" ,python-future)))
20934 (home-page "https://github.com/sciunto-org/python-bibtexparser")
20935 (synopsis "Python library to parse BibTeX files")
20936 (description "BibtexParser is a Python library to parse BibTeX files.")
20937 (license (list license:bsd-3 license:lgpl3))))
20938
20939 (define-public python-distro
20940 (package
20941 (name "python-distro")
20942 (version "1.4.0")
20943 (source
20944 (origin
20945 (method url-fetch)
20946 (uri (pypi-uri "distro" version))
20947 (sha256
20948 (base32
20949 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
20950 (build-system python-build-system)
20951 (native-inputs
20952 `(("python-pytest" ,python-pytest)))
20953 (home-page "https://github.com/nir0s/distro")
20954 (synopsis
20955 "OS platform information API")
20956 (description
20957 "@code{distro} provides information about the OS distribution it runs on,
20958 such as a reliable machine-readable ID, or version information.
20959
20960 It is the recommended replacement for Python's original
20961 `platform.linux_distribution` function (which will be removed in Python 3.8).
20962 @code{distro} also provides a command-line interface to output the platform
20963 information in various formats.")
20964 (license license:asl2.0)))
20965
20966 (define-public python-cairosvg
20967 (package
20968 (name "python-cairosvg")
20969 (version "2.5.0")
20970 (source
20971 (origin
20972 (method url-fetch)
20973 (uri (pypi-uri "CairoSVG" version))
20974 (sha256
20975 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
20976 (build-system python-build-system)
20977 (arguments
20978 `(#:phases
20979 (modify-phases %standard-phases
20980 (replace 'check
20981 (lambda _ (invoke "pytest"))))))
20982 (propagated-inputs
20983 `(("python-cairocffi" ,python-cairocffi)
20984 ("python-cssselect2" ,python-cssselect2)
20985 ("python-defusedxml" ,python-defusedxml)
20986 ("python-pillow" ,python-pillow)
20987 ("python-tinycss2" ,python-tinycss2)))
20988 (native-inputs
20989 `(("python-pytest-flake8" ,python-pytest-flake8)
20990 ("python-pytest-isort" ,python-pytest-isort)
20991 ("python-pytest-runner" ,python-pytest-runner)))
20992 (home-page "https://cairosvg.org/")
20993 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
20994 (description "CairoSVG is a SVG converter based on Cairo. It can export
20995 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
20996 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
20997 parsed, the result is drawn to a Cairo surface that can be exported to
20998 qvarious formats: PDF, PostScript, PNG and even SVG.")
20999 (license license:lgpl3+)))
21000
21001 (define-public python-pyphen
21002 (package
21003 (name "python-pyphen")
21004 (version "0.10.0")
21005 (source
21006 (origin
21007 (method url-fetch)
21008 (uri (pypi-uri "Pyphen" version))
21009 (sha256
21010 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
21011 (build-system python-build-system)
21012 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
21013 ;; embedded set provided by upstream - like Debian does.
21014 (home-page "https://github.com/Kozea/Pyphen")
21015 (synopsis "Pure Python module to hyphenate text")
21016 (description "Pyphen is a pure Python module to hyphenate text using
21017 existing Hunspell hyphenation dictionaries.")
21018 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
21019
21020 (define-public python-intelhex
21021 (package
21022 (name "python-intelhex")
21023 (version "2.2.1")
21024 (source
21025 (origin
21026 (method url-fetch)
21027 (uri (pypi-uri "intelhex" version))
21028 (sha256
21029 (base32
21030 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
21031 (build-system python-build-system)
21032 (arguments '(#:tests? #f)) ;issue with version
21033 (home-page "https://pypi.org/project/IntelHex/")
21034 (synopsis "Python library for Intel HEX files manipulations")
21035 (description "The Intel HEX file format is widely used in microprocessors
21036 and microcontrollers area (embedded systems etc.) as the de facto standard for
21037 representation of code to be programmed into microelectronic devices. This
21038 package provides an intelhex Python library to read, write, create from
21039 scratch and manipulate data from Intel HEX file format. It also includes
21040 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
21041 converters and more, those based on the library itself.")
21042 (license license:bsd-3)))
21043
21044 (define-public python-pykwalify
21045 (package
21046 (name "python-pykwalify")
21047 (version "1.7.0")
21048 (source
21049 (origin
21050 (method url-fetch)
21051 (uri (pypi-uri "pykwalify" version))
21052 (sha256
21053 (base32
21054 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
21055 (build-system python-build-system)
21056 (arguments '(#:tests? #f)) ;missing dependencies
21057 (propagated-inputs
21058 `(("python-dateutil" ,python-dateutil)
21059 ("python-docopt" ,python-docopt)
21060 ("python-pyyaml" ,python-pyyaml)))
21061 (home-page "https://github.com/grokzen/pykwalify")
21062 (synopsis
21063 "Python lib/cli for JSON/YAML schema validation")
21064 (description
21065 "This package provides a parser, schema validator, and data binding tool
21066 for YAML and JSON.")
21067 (license license:expat)))
21068
21069 (define-public python-dbusmock
21070 (package
21071 (name "python-dbusmock")
21072 (version "0.18.3")
21073 (source
21074 (origin
21075 (method url-fetch)
21076 (uri (pypi-uri "python-dbusmock" version))
21077 (sha256
21078 (base32
21079 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
21080 (build-system python-build-system)
21081 (arguments
21082 '(#:phases
21083 (modify-phases %standard-phases
21084 (add-after 'unpack 'patch-shell-path
21085 (lambda _
21086 (substitute* "tests/test_code.py"
21087 (("/bin/bash") (which "bash")))
21088 #t)))))
21089 (native-inputs
21090 `(;; For tests.
21091 ("dbus" ,dbus) ; for dbus-daemon
21092 ("python-nose" ,python-nose)
21093 ("which" ,which)))
21094 (propagated-inputs
21095 `(("python-dbus" ,python-dbus)
21096 ("python-pygobject" ,python-pygobject)))
21097 (home-page "https://github.com/martinpitt/python-dbusmock")
21098 (synopsis "Python library for mock D-Bus objects")
21099 (description "python-dbusmock allows for the easy creation of mock objects on
21100 D-Bus. This is useful for writing tests for software which talks to D-Bus
21101 services such as upower, systemd, logind, gnome-session or others, and it is
21102 hard (or impossible without root privileges) to set the state of the real
21103 services to what you expect in your tests.")
21104 (license license:lgpl3+)))
21105
21106 (define-public python-jsonplus
21107 (package
21108 (name "python-jsonplus")
21109 (version "0.8.0")
21110 (home-page "https://github.com/randomir/jsonplus")
21111 (source (origin
21112 (method url-fetch)
21113 (uri (pypi-uri "jsonplus" version))
21114 (sha256
21115 (base32
21116 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
21117 (build-system python-build-system)
21118 ;; XXX: No tests on PyPI, and the repository has no tags.
21119 (arguments '(#:tests? #f))
21120 (propagated-inputs
21121 `(("python-dateutil" ,python-dateutil)
21122 ("python-simplejson" ,python-simplejson)
21123 ("python-sortedcontainers" ,python-sortedcontainers)))
21124 (synopsis "Serialize Python types to/from JSON")
21125 (description
21126 "This package provides functionality to serialize arbitrary data types
21127 to and from JSON. Common data types are implemented and it is easy to
21128 register custom encoders and decoders.")
21129 (license license:expat)))
21130
21131 (define-public python-ujson
21132 (package
21133 (name "python-ujson")
21134 (version "4.0.2")
21135 (source
21136 (origin
21137 (method url-fetch)
21138 (uri (pypi-uri "ujson" version))
21139 (sha256
21140 (base32
21141 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
21142 (modules '((guix build utils)))
21143 (snippet
21144 '(begin (delete-file-recursively "deps") #t))))
21145 (build-system python-build-system)
21146 (arguments
21147 `(#:phases
21148 (modify-phases %standard-phases
21149 (add-after 'unpack 'link-to-system-double-conversion
21150 (lambda* (#:key inputs #:allow-other-keys)
21151 (let ((d-c (assoc-ref inputs "double-conversion")))
21152 (substitute* "setup.py"
21153 (("./deps/double-conversion/double-conversion\"")
21154 (string-append d-c "/include/double-conversion\""))
21155 (("-lstdc++" stdc)
21156 (string-append "-L" d-c "/lib\","
21157 " \"-ldouble-conversion\","
21158 " \"" stdc)))
21159 #t)))
21160 (replace 'check
21161 (lambda* (#:key inputs outputs #:allow-other-keys)
21162 (add-installed-pythonpath inputs outputs)
21163 (invoke "pytest"))))))
21164 (native-inputs
21165 `(("double-conversion" ,double-conversion)
21166 ("python-setuptools-scm" ,python-setuptools-scm)
21167 ("python-pytest" ,python-pytest)))
21168 (home-page "https://github.com/ultrajson/ultrajson")
21169 (synopsis "Ultra fast JSON encoder and decoder for Python")
21170 (description
21171 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
21172 bindings for Python 3.")
21173 (license license:bsd-3)))
21174
21175 (define-public python-iocapture
21176 ;; The latest release is more than a year older than this commit.
21177 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
21178 (revision "1"))
21179 (package
21180 (name "python-iocapture")
21181 (version "0.1.2")
21182 (source
21183 (origin
21184 (method git-fetch)
21185 (uri (git-reference
21186 (url "https://github.com/oinume/iocapture")
21187 (commit commit)))
21188 (file-name (git-file-name name version))
21189 (sha256
21190 (base32
21191 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
21192 (build-system python-build-system)
21193 (arguments
21194 `(#:phases
21195 (modify-phases %standard-phases
21196 (delete 'check)
21197 (add-after 'install 'check
21198 (lambda* (#:key inputs outputs #:allow-other-keys)
21199 (add-installed-pythonpath inputs outputs)
21200 (invoke "py.test" "-v" "tests")
21201 #t)))))
21202 (propagated-inputs
21203 `(("python-flexmock" ,python-flexmock)
21204 ("python-pytest" ,python-pytest)
21205 ("python-pytest-cov" ,python-pytest-cov)
21206 ("python-six" ,python-six)))
21207 (home-page "https://github.com/oinume/iocapture")
21208 (synopsis "Python capturing tool for stdout and stderr")
21209 (description
21210 "This package helps you to capture the standard out (stdout) and the
21211 standard error channel (stderr) in your program.")
21212 (license license:expat))))
21213
21214 (define-public python-argh
21215 ;; There are 21 commits since the latest release containing important
21216 ;; improvements.
21217 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
21218 (revision "1"))
21219 (package
21220 (name "python-argh")
21221 (version (git-version "0.26.2" revision commit))
21222 (source
21223 (origin
21224 (method git-fetch)
21225 (uri (git-reference
21226 (url "https://github.com/neithere/argh")
21227 (commit commit)))
21228 (file-name (git-file-name name version))
21229 (sha256
21230 (base32
21231 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
21232 (build-system python-build-system)
21233 (propagated-inputs
21234 `(("python-iocapture" ,python-iocapture)
21235 ("python-mock" ,python-mock)
21236 ("python-pytest" ,python-pytest)
21237 ("python-pytest-cov" ,python-pytest-cov)
21238 ("python-pytest-xdist" ,python-pytest-xdist)
21239 ("python-tox" ,python-tox)))
21240 (home-page "https://github.com/neithere/argh/")
21241 (synopsis "Argparse wrapper with natural syntax")
21242 (description
21243 "python-argh is a small library that provides several layers of
21244 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
21245 always possible to declare a command with the highest possible (and least
21246 flexible) layer and then tune the behaviour with any of the lower layers
21247 including the native API of @code{python-argparse}.")
21248 (license license:lgpl3+))))
21249
21250 (define-public python-ppft
21251 (package
21252 (name "python-ppft")
21253 (version "1.6.6.1")
21254 (source
21255 (origin
21256 (method url-fetch)
21257 (uri (pypi-uri "ppft" version))
21258 (sha256
21259 (base32
21260 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
21261 (build-system python-build-system)
21262 (arguments '(#:tests? #f)) ; there are none
21263 (propagated-inputs
21264 `(("python-six" ,python-six)))
21265 (home-page "https://pypi.org/project/ppft/")
21266 (synopsis "Fork of Parallel Python")
21267 (description
21268 "This package is a fork of Parallel Python. The Parallel Python
21269 module (@code{pp}) provides an easy and efficient way to create
21270 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
21271 computers and clusters. It features cross-platform portability and dynamic
21272 load balancing.")
21273 (license license:bsd-3)))
21274
21275 (define-public python-pox
21276 (package
21277 (name "python-pox")
21278 (version "0.2.7")
21279 (source
21280 (origin
21281 (method url-fetch)
21282 (uri (pypi-uri "pox" version))
21283 (sha256
21284 (base32
21285 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
21286 (build-system python-build-system)
21287 (arguments
21288 `(#:phases
21289 (modify-phases %standard-phases
21290 (replace 'check
21291 (lambda _
21292 (mkdir-p "/tmp/guix")
21293 (setenv "SHELL" "bash")
21294 (setenv "USERNAME" "guix")
21295 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
21296 (invoke "py.test" "-vv")
21297 #t)))))
21298 (native-inputs
21299 `(("python-pytest" ,python-pytest)
21300 ("which" ,which)))
21301 (home-page "https://pypi.org/project/pox/")
21302 (synopsis "Python utilities for file system exploration and automated builds")
21303 (description
21304 "Pox provides a collection of utilities for navigating and manipulating
21305 file systems. This module is designed to facilitate some of the low-level
21306 operating system interactions that are useful when exploring a file system on a
21307 remote host. Pox provides Python equivalents of several shell commands such
21308 as @command{which} and @command{find}. These commands allow automated
21309 discovery of what has been installed on an operating system, and where the
21310 essential tools are located.")
21311 (license license:bsd-3)))
21312
21313 (define-public python-pathos
21314 (package
21315 (name "python-pathos")
21316 (version "0.2.5")
21317 (source
21318 (origin
21319 (method url-fetch)
21320 (uri (pypi-uri "pathos" version))
21321 (sha256
21322 (base32
21323 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
21324 (build-system python-build-system)
21325 (arguments
21326 '(#:phases
21327 (modify-phases %standard-phases
21328 (replace 'check
21329 (lambda _
21330 (setenv "PYTHONPATH"
21331 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
21332 (invoke "python" "./tests/__main__.py"))))))
21333 (propagated-inputs
21334 `(("python-dill" ,python-dill)
21335 ("python-multiprocess" ,python-multiprocess)
21336 ("python-pox" ,python-pox)
21337 ("python-ppft" ,python-ppft)))
21338 (native-inputs
21339 `(("python-pytest" ,python-pytest)))
21340 (home-page "https://pypi.org/project/pathos/")
21341 (synopsis
21342 "Parallel graph management and execution in heterogeneous computing")
21343 (description
21344 "Python-pathos is a framework for heterogeneous computing. It provides a
21345 consistent high-level interface for configuring and launching parallel
21346 computations across heterogeneous resources. Python-pathos provides configurable
21347 launchers for parallel and distributed computing, where each launcher contains
21348 the syntactic logic to configure and launch jobs in an execution environment.")
21349 (license license:bsd-3)))
21350
21351 (define-public python-flit
21352 (package
21353 (name "python-flit")
21354 (version "3.0.0")
21355 (source
21356 (origin
21357 (method url-fetch)
21358 (uri (pypi-uri "flit" version))
21359 (sha256
21360 (base32
21361 "14q8qa48bli2mniznc8b54qkwvhbik4kw99y01fi5gzzl620zzml"))))
21362 (build-system python-build-system)
21363 (arguments
21364 `(#:tests? #f)) ; XXX: Check requires network access.
21365 (home-page "https://flit.readthedocs.io/")
21366 (synopsis
21367 "Simple packaging tool for simple packages")
21368 (description
21369 "Flit is a simple way to put Python packages and modules on PyPI. Flit
21370 packages a single importable module or package at a time, using the import
21371 name as the name on PyPI. All subpackages and data files within a package
21372 are included automatically.")
21373 (license license:bsd-3)))
21374
21375 (define-public python-pathtools
21376 (package
21377 (name "python-pathtools")
21378 (version "0.1.2")
21379 (source
21380 (origin
21381 (method url-fetch)
21382 (uri (pypi-uri "pathtools" version))
21383 (sha256
21384 (base32
21385 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
21386 (build-system python-build-system)
21387 (home-page
21388 "https://github.com/gorakhargosh/pathtools")
21389 (synopsis "Path utilities for Python")
21390 (description "Pattern matching and various utilities for file systems
21391 paths.")
21392 (license license:expat)))
21393
21394 (define-public python-fastentrypoints
21395 (package
21396 (name "python-fastentrypoints")
21397 (version "0.12")
21398 (source
21399 (origin
21400 (method url-fetch)
21401 (uri (pypi-uri "fastentrypoints" version))
21402 (sha256
21403 (base32
21404 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
21405 (build-system python-build-system)
21406 (home-page
21407 "https://github.com/ninjaaron/fast-entry_points")
21408 (synopsis
21409 "Makes entry_points specified in setup.py load more quickly")
21410 (description
21411 "Using entry_points in your setup.py makes scripts that start really
21412 slowly because it imports pkg_resources. This package allows such setup
21413 scripts to load entry points more quickly.")
21414 (license license:bsd-3)))
21415
21416 (define-public python-funcparserlib
21417 (package
21418 (name "python-funcparserlib")
21419 (version "0.3.6")
21420 (source
21421 (origin
21422 (method url-fetch)
21423 (uri (pypi-uri "funcparserlib" version))
21424 (sha256
21425 (base32
21426 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
21427 (native-inputs
21428 `(("python-tox" ,python-tox)))
21429 (arguments
21430 `(#:phases
21431 (modify-phases %standard-phases
21432 (replace 'check
21433 (lambda _
21434 (invoke "tox"))))))
21435 (build-system python-build-system)
21436 (home-page
21437 "https://github.com/vlasovskikh/funcparserlib")
21438 (synopsis
21439 "Recursive descent parsing library based on functional combinators")
21440 (description
21441 "This package is a recursive descent parsing library for Python based on
21442 functional combinators. Parser combinators are just higher-order functions
21443 that take parsers as their arguments and return them as result values.")
21444 (license license:expat)))
21445
21446 (define-public python-speg
21447 (package
21448 (name "python-speg")
21449 (version "0.3")
21450 (source
21451 (origin
21452 (method url-fetch)
21453 (uri (pypi-uri "speg" version ".zip"))
21454 (sha256
21455 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
21456 (arguments
21457 `(#:tests? #f)) ;FIXME: tests fail, not sure why
21458 (native-inputs
21459 `(("unzip" ,unzip)))
21460 (build-system python-build-system)
21461 (home-page "https://github.com/avakar/speg")
21462 (synopsis "PEG-based parser interpreter with memoization")
21463 (description "This package is a PEG-based parser and interpreter with
21464 memoization.")
21465 (license license:expat)))
21466
21467 (define-public python-cson
21468 (package
21469 (name "python-cson")
21470 (version "0.8")
21471 (source
21472 (origin
21473 (method url-fetch)
21474 (uri (pypi-uri "cson" version))
21475 (sha256
21476 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
21477 (build-system python-build-system)
21478 (propagated-inputs
21479 `(("python-speg" ,python-speg)))
21480 (home-page "https://github.com/avakar/pycson")
21481 (synopsis "Parser for Coffeescript Object Notation (CSON)")
21482 (description "This package is a parser for Coffeescript Object
21483 Notation (CSON).")
21484 (license license:expat)))
21485
21486 (define-public python-asynctest
21487 (package
21488 (name "python-asynctest")
21489 (version "0.13.0")
21490 (source
21491 (origin
21492 (method url-fetch)
21493 (uri (pypi-uri "asynctest" version))
21494 (sha256
21495 (base32
21496 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
21497 (build-system python-build-system)
21498 (arguments
21499 '(#:phases
21500 (modify-phases %standard-phases
21501 (replace 'check
21502 (lambda _
21503 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
21504 (add-after 'unpack 'disable-tests
21505 (lambda* _
21506 ;; XXX: 7 tests fail out of 220. Disable them for now.
21507 (substitute* (list "test/test_selector.py"
21508 "test/test_mock.py")
21509 (("def test_events_watched_outside_test_are_ignored")
21510 "@unittest.skip('disabled by guix')
21511 def test_events_watched_outside_test_are_ignored")
21512 (("def test_awaited_from_autospec_mock.*" line)
21513 (string-append line " return True\n"))
21514 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
21515 (string-append line " return True\n"))
21516 (("def test_patch_coroutine_with_multiple_scopes.*" line)
21517 (string-append line " return True\n"))
21518 (("def test_multiple_patches_on_coroutine.*" line)
21519 (string-append line " return True\n"))
21520 (("def test_patch_coroutine_only_when_running.*" line)
21521 (string-append line " return True\n")))
21522 #t)))))
21523 (home-page "https://github.com/Martiusweb/asynctest")
21524 (synopsis "Extension of unittest for testing asyncio libraries")
21525 (description
21526 "The package asynctest is built on top of the standard unittest module
21527 and cuts down boilerplate code when testing libraries for asyncio.")
21528 (license license:asl2.0)))
21529
21530 (define-public python-aionotify
21531 (package
21532 (name "python-aionotify")
21533 (version "0.2.0")
21534 (source
21535 (origin
21536 ;; Source tarball on PyPi lacks tests
21537 (method git-fetch)
21538 (uri (git-reference
21539 (url "https://github.com/rbarrois/aionotify")
21540 (commit (string-append "v" version))))
21541 (file-name (git-file-name name version))
21542 (sha256
21543 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
21544 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
21545 (build-system python-build-system)
21546 (home-page "https://github.com/rbarrois/aionotify")
21547 (synopsis "Asyncio-powered inotify library")
21548 (description
21549 "@code{aionotify} is a simple, asyncio-based inotify library.")
21550 (license license:bsd-3)))
21551
21552 (define-public python-forbiddenfruit
21553 (package
21554 (name "python-forbiddenfruit")
21555 (version "0.1.3")
21556 (source
21557 (origin
21558 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21559 (method git-fetch)
21560 (uri (git-reference
21561 (url "https://github.com/clarete/forbiddenfruit")
21562 (commit version)))
21563 (file-name (git-file-name name version))
21564 (sha256
21565 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21566 (build-system python-build-system)
21567 (arguments
21568 '(#:phases
21569 (modify-phases %standard-phases
21570 (replace 'check
21571 (lambda _
21572 (invoke "make" "SKIP_DEPS=1"))))))
21573 (native-inputs
21574 `(("python-nose" ,python-nose)
21575 ("python-coverage" ,python-coverage)))
21576 (home-page "https://github.com/clarete/forbiddenfruit")
21577 (synopsis "Patch python built-in objects")
21578 (description "This project allows Python code to extend built-in types.")
21579 (license (list license:gpl3+ license:expat))))
21580
21581 (define-public python-k5test
21582 (package
21583 (name "python-k5test")
21584 (version "0.9.2")
21585 (source
21586 (origin
21587 (method url-fetch)
21588 (uri (pypi-uri "k5test" version))
21589 (sha256
21590 (base32
21591 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21592 (build-system python-build-system)
21593 (propagated-inputs
21594 `(("python-six" ,python-six)
21595 ;; `which`, `kadmin.local` binaries called inside library
21596 ("which" ,which)
21597 ("mit-krb5" ,mit-krb5)))
21598 (native-inputs `(("mit-krb5" ,mit-krb5)))
21599 (arguments
21600 '(#:phases
21601 (modify-phases %standard-phases
21602 (add-after 'unpack 'patch-paths
21603 (lambda* _
21604 (substitute* "k5test/realm.py"
21605 (("'kadmin_local'") "'kadmin.local'")))))))
21606 (home-page "https://github.com/pythongssapi/k5test")
21607 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21608 (description
21609 "@code{k5test} is a library for setting up self-contained Kerberos 5
21610 environments, and running Python unit tests inside those environments. It is
21611 based on the file of the same name found alongside the MIT Kerberos 5 unit
21612 tests.")
21613 (license license:isc)))
21614
21615 (define-public python-gssapi
21616 (package
21617 (name "python-gssapi")
21618 (version "1.6.12")
21619 (source
21620 (origin
21621 (method url-fetch)
21622 (uri (pypi-uri "gssapi" version))
21623 (sha256
21624 (base32
21625 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
21626 (build-system python-build-system)
21627 (propagated-inputs
21628 `(("python-decorator" ,python-decorator)
21629 ("python-six" ,python-six)))
21630 (inputs
21631 `(("mit-krb5" ,mit-krb5)))
21632 ;; for tests
21633 (native-inputs
21634 `(("python-parameterized" ,python-parameterized)
21635 ("python-k5test" ,python-k5test)
21636 ("python-nose" ,python-nose)))
21637 (home-page "https://github.com/pythongssapi/python-gssapi")
21638 (synopsis "Python GSSAPI Wrapper")
21639 (description
21640 "Python-GSSAPI provides both low-level and high level wrappers around the
21641 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
21642 also be usable with other GSSAPI mechanisms.")
21643 (license license:isc)))
21644
21645 (define-public python-check-manifest
21646 (package
21647 (name "python-check-manifest")
21648 (version "0.37")
21649 (source
21650 (origin
21651 (method url-fetch)
21652 (uri (pypi-uri "check-manifest" version))
21653 (sha256
21654 (base32
21655 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
21656 (build-system python-build-system)
21657 (native-inputs
21658 `(("python-mock" ,python-mock)
21659 ("git" ,git)))
21660 (home-page "https://github.com/mgedmin/check-manifest")
21661 (synopsis "Check MANIFEST.in in a Python source package for completeness")
21662 (description "Python package can include a MANIFEST.in file to help with
21663 sending package files to the Python Package Index. This package checks that
21664 file to ensure it completely and accurately describes your project.")
21665 (license license:expat)))
21666
21667 (define-public python-android-stringslib
21668 (package
21669 (name "python-android-stringslib")
21670 (version "0.1.2")
21671 (source
21672 (origin
21673 (method git-fetch)
21674 (uri (git-reference
21675 (url "https://framagit.org/tyreunom/python-android-strings-lib")
21676 (commit (string-append "v" version))))
21677 (file-name (git-file-name name version))
21678 (sha256
21679 (base32
21680 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
21681 (build-system python-build-system)
21682 (arguments
21683 `(#:tests? #f))
21684 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
21685 (synopsis "Android strings.xml support")
21686 (description "Android Strings Lib provides support for android's strings.xml
21687 files. These files are used to translate strings in android apps.")
21688 (license license:expat)))
21689
21690 (define-public python-watchdog
21691 (package
21692 (name "python-watchdog")
21693 (version "0.9.0")
21694 (source
21695 (origin
21696 (method url-fetch)
21697 (uri (pypi-uri "watchdog" version))
21698 (sha256
21699 (base32
21700 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
21701 (build-system python-build-system)
21702 (arguments
21703 `(#:phases
21704 (modify-phases %standard-phases
21705 (add-before 'check 'remove-failing
21706 (lambda _
21707 (delete-file "tests/test_inotify_buffer.py")
21708 (delete-file "tests/test_snapshot_diff.py")
21709 #t)))))
21710 (propagated-inputs
21711 `(("python-argh" ,python-argh)
21712 ("python-pathtools" ,python-pathtools)
21713 ("python-pyyaml" ,python-pyyaml)))
21714 (native-inputs
21715 `(("python-pytest-cov" ,python-pytest-cov)
21716 ("python-pytest-timeout" ,python-pytest-timeout)))
21717 (home-page "https://github.com/gorakhargosh/watchdog")
21718 (synopsis "File system events monitoring")
21719 (description "This package provides a way to monitor file system events
21720 such as a file modification and trigger an action. This is similar to inotify,
21721 but portable.")
21722 (license license:asl2.0)))
21723
21724 (define-public python-watchgod
21725 (package
21726 (name "python-watchgod")
21727 (version "0.6")
21728 (source
21729 (origin
21730 ;; There are no tests in the PyPI tarball.
21731 (method git-fetch)
21732 (uri (git-reference
21733 (url "https://github.com/samuelcolvin/watchgod")
21734 (commit (string-append "v" version))))
21735 (file-name (git-file-name name version))
21736 (sha256
21737 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
21738 (build-system python-build-system)
21739 (arguments
21740 `(#:phases
21741 (modify-phases %standard-phases
21742 (replace 'check
21743 (lambda _
21744 (invoke "pytest" "-vv"))))))
21745 (native-inputs
21746 `(("python-coverage" ,python-coverage)
21747 ("python-docutils" ,python-docutils)
21748 ("python-flake8" ,python-flake8)
21749 ("python-isort" ,python-isort)
21750 ("python-pycodestyle" ,python-pycodestyle)
21751 ("python-pyflakes" ,python-pyflakes)
21752 ("python-pygments" ,python-pygments)
21753 ("python-pytest" ,python-pytest)
21754 ("python-pytest-cov" ,python-pytest-cov)
21755 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
21756 ("python-pytest-mock" ,python-pytest-mock)
21757 ("python-pytest-sugar" ,python-pytest-sugar)
21758 ("python-pytest-toolbox" ,python-pytest-toolbox)))
21759 (home-page "https://github.com/samuelcolvin/watchgod")
21760 (synopsis "Simple, modern file watching and code reload in Python")
21761 (description
21762 "Simple, modern file watching and code reload in Python inspired by
21763 @code{watchdog}. Among the differences are a unified approach for each
21764 operating systems and an elegant approach to concurrency using threading.")
21765 (license license:expat)))
21766
21767 (define-public python-wget
21768 (package
21769 (name "python-wget")
21770 (version "3.2")
21771 (source
21772 (origin
21773 (method url-fetch)
21774 (uri (pypi-uri "wget" version ".zip"))
21775 (sha256
21776 (base32
21777 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
21778 (build-system python-build-system)
21779 (native-inputs `(("unzip" ,unzip)))
21780 (home-page "https://bitbucket.org/techtonik/python-wget/")
21781 (synopsis "Pure Python download utility")
21782 (description "The python-wget library provides an API to download files
21783 with features similar to the @command{wget} utility.")
21784 (license license:unlicense)))
21785
21786 (define-public offlate
21787 (package
21788 (name "offlate")
21789 (version "0.5")
21790 (source
21791 (origin
21792 (method git-fetch)
21793 (uri (git-reference
21794 (url "https://framagit.org/tyreunom/offlate")
21795 (commit version)))
21796 (file-name (git-file-name name version))
21797 (sha256
21798 (base32
21799 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
21800 (build-system python-build-system)
21801 (arguments
21802 ;; No tests
21803 `(#:tests? #f))
21804 (propagated-inputs
21805 `(("python-android-stringslib" ,python-android-stringslib)
21806 ("python-dateutil" ,python-dateutil)
21807 ("python-gitlab" ,python-gitlab)
21808 ("python-lxml" ,python-lxml)
21809 ("python-polib" ,python-polib)
21810 ("python-pyenchant" ,python-pyenchant)
21811 ("python-pygit2" ,python-pygit2)
21812 ("python-pygithub" ,python-pygithub)
21813 ("python-pyqt" ,python-pyqt)
21814 ("python-requests" ,python-requests)
21815 ("python-ruamel.yaml" ,python-ruamel.yaml)
21816 ("python-translation-finder" ,python-translation-finder)
21817 ("python-watchdog" ,python-watchdog)))
21818 (native-inputs
21819 `(("qttools" ,qttools)))
21820 (home-page "https://framagit.org/tyreunom/offlate")
21821 (synopsis "Offline translation interface for online translation tools")
21822 (description "Offlate offers a unified interface for different translation
21823 file formats, as well as many different online translation platforms. You can
21824 use it to get work from online platforms, specialized such as the Translation
21825 Project, or not such a gitlab instance when your upstream doesn't use any
21826 dedicated platform. The tool proposes a unified interface for any format and
21827 an upload option to send your work back to the platform.")
21828 (license license:gpl3+)))
21829
21830 (define-public python-titlecase
21831 (package
21832 (name "python-titlecase")
21833 (version "0.12.0")
21834 (source
21835 (origin
21836 (method url-fetch)
21837 (uri (pypi-uri "titlecase" version))
21838 (sha256
21839 (base32
21840 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
21841 (build-system python-build-system)
21842 (native-inputs
21843 `(("python-nose" ,python-nose)))
21844 (home-page "https://github.com/ppannuto/python-titlecase")
21845 (synopsis "Capitalize strings similar to book titles")
21846 (description
21847 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
21848 It capitalizes (predominantly English) strings in a way that is similar to
21849 book titles, using the New York Times Manual of Style to leave certain words
21850 lowercase.")
21851 (license license:expat)))
21852
21853 (define-public python-pypng
21854 (package
21855 (name "python-pypng")
21856 (version "0.0.20")
21857 (source
21858 (origin
21859 (method url-fetch)
21860 (uri (pypi-uri "pypng" version))
21861 (sha256
21862 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
21863 (build-system python-build-system)
21864 (home-page "https://github.com/drj11/pypng")
21865 (synopsis "Pure Python PNG image encoder/decoder")
21866 (description
21867 "The PyPNG module implements support for PNG images. It reads and writes
21868 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
21869 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
21870 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
21871 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
21872 A number of optional chunks can be specified (when writing) and
21873 understood (when reading): tRNS, bKGD, gAMA.
21874
21875 PyPNG is not a high level toolkit for image processing (like PIL) and does not
21876 aim at being a replacement or competitor. Its strength lies in fine-grained
21877 extensive support of PNG features. It can also read and write Netpbm PAM
21878 files, with a focus on its use as an intermediate format for implementing
21879 custom PNG processing.")
21880 (license license:expat)))
21881
21882 (define-public python-fuzzywuzzy
21883 (package
21884 (name "python-fuzzywuzzy")
21885 (version "0.18.0")
21886 (source
21887 (origin
21888 (method url-fetch)
21889 (uri (pypi-uri "fuzzywuzzy" version))
21890 (sha256
21891 (base32
21892 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
21893 (build-system python-build-system)
21894 (native-inputs
21895 `(("python-hypothesis" ,python-hypothesis)
21896 ("python-pycodestyle" ,python-pycodestyle)
21897 ("python-pytest" ,python-pytest)))
21898 (propagated-inputs
21899 `(("python-levenshtein" ,python-levenshtein)))
21900 (home-page "https://github.com/seatgeek/fuzzywuzzy")
21901 (synopsis "Fuzzy string matching in Python")
21902 (description "Approximate string matching using
21903 @emph{Levenshtein Distance} to calculate the differences between
21904 sequences.")
21905 (license license:gpl2)))
21906
21907 (define-public python2-fuzzywuzzy
21908 (package-with-python2 python-fuzzywuzzy))
21909
21910 (define-public python-block-tracing
21911 (package
21912 (name "python-block-tracing")
21913 (version "1.0.1")
21914 (source
21915 (origin
21916 (method url-fetch)
21917 (uri (pypi-uri "block_tracing" version))
21918 (sha256
21919 (base32
21920 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
21921 (build-system python-build-system)
21922 (arguments '(#:tests? #f)) ; no tests
21923 (home-page "https://github.com/rianhunter/block_tracing")
21924 (synopsis "Protect process memory")
21925 (description
21926 "@code{block_tracing} is a tiny Python library that can be used to
21927 prevent debuggers and other applications from inspecting the memory within
21928 your process.")
21929 (license license:expat)))
21930
21931 (define-public python-gcovr
21932 (package
21933 (name "python-gcovr")
21934 (version "4.2")
21935 (source
21936 (origin
21937 (method url-fetch)
21938 (uri (pypi-uri "gcovr" version))
21939 (sha256
21940 (base32
21941 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
21942 (build-system python-build-system)
21943 (propagated-inputs
21944 `(("python-lxml" ,python-lxml)
21945 ("python-jinja2" ,python-jinja2)))
21946 (home-page "https://gcovr.com/")
21947 (synopsis "Utility for generating code coverage results")
21948 (description
21949 "Gcovr provides a utility for managing the use of the GNU gcov
21950 utility and generating summarized code coverage results. It is inspired
21951 by the Python coverage.py package, which provides a similar utility for
21952 Python.")
21953 (license license:bsd-3)))
21954
21955 (define-public python-owslib
21956 (package
21957 (name "python-owslib")
21958 (version "0.19.2")
21959 (source
21960 (origin
21961 (method url-fetch)
21962 (uri (pypi-uri "OWSLib" version))
21963 (sha256
21964 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
21965 (build-system python-build-system)
21966 (arguments
21967 '(#:tests? #f)) ; TODO: package dependencies required for tests.
21968 (synopsis "Interface for Open Geospatial Consortium web service")
21969 (description
21970 "OWSLib is a Python package for client programming with Open Geospatial
21971 Consortium (OGC) web service (hence OWS) interface standards, and their related
21972 content models.")
21973 (home-page "https://geopython.github.io/OWSLib/")
21974 (license license:bsd-3)))
21975
21976 (define-public python-docusign-esign
21977 (package
21978 (name "python-docusign-esign")
21979 (version "3.1.0")
21980 (source (origin
21981 (method url-fetch)
21982 (uri (pypi-uri "docusign_esign" version))
21983 (sha256
21984 (base32
21985 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
21986 (build-system python-build-system)
21987 ;; Testing requires undocumented setup changes, and so testing is disabled here.
21988 (arguments `(#:tests? #f))
21989 (propagated-inputs
21990 `(("python-certifi" ,python-certifi)
21991 ("python-six" ,python-six)
21992 ("python-dateutil" ,python-dateutil)
21993 ("python-urllib3" ,python-urllib3)
21994 ("python-pyjwt" ,python-pyjwt)
21995 ("python-cryptography" ,python-cryptography)
21996 ("python-nose" ,python-nose)))
21997 (synopsis "DocuSign Python Client")
21998 (description "The Official DocuSign Python Client Library used to interact
21999 with the eSign REST API. Send, sign, and approve documents using this client.")
22000 (home-page "https://www.docusign.com/devcenter")
22001 (license license:expat)))
22002
22003 (define-public python-xattr
22004 (package
22005 (name "python-xattr")
22006 (version "0.9.7")
22007 (source
22008 (origin
22009 (method url-fetch)
22010 (uri (pypi-uri "xattr" version))
22011 (sha256
22012 (base32
22013 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
22014 (build-system python-build-system)
22015 (propagated-inputs
22016 `(("python-cffi" ,python-cffi)))
22017 (home-page "https://github.com/xattr/xattr")
22018 (synopsis
22019 "Python wrapper for extended file system attributes")
22020 (description "This package provides a Python wrapper for using extended
22021 file system attributes. Extended attributes extend the basic attributes of files
22022 and directories in the file system. They are stored as name:data pairs
22023 associated with file system objects (files, directories, symlinks, etc).")
22024 (license license:expat)))
22025
22026 (define-public python-json-logger
22027 (package
22028 (name "python-json-logger")
22029 (version "0.1.11")
22030 (source
22031 (origin
22032 (method url-fetch)
22033 (uri (pypi-uri "python-json-logger" version))
22034 (sha256
22035 (base32
22036 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
22037 (build-system python-build-system)
22038 (home-page
22039 "https://github.com/madzak/python-json-logger")
22040 (synopsis "JSON log formatter in Python")
22041 (description "This library allows standard Python logging to output log data
22042 as JSON objects. With JSON we can make our logs more readable by machines and
22043 we can stop writing custom parsers for syslog-type records.")
22044 (license license:bsd-3)))
22045
22046 (define-public python-daiquiri
22047 (package
22048 (name "python-daiquiri")
22049 (version "2.1.1")
22050 (source
22051 (origin
22052 (method url-fetch)
22053 (uri (pypi-uri "daiquiri" version))
22054 (sha256
22055 (base32
22056 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
22057 (build-system python-build-system)
22058 (propagated-inputs
22059 `(("python-json-logger" ,python-json-logger)))
22060 (native-inputs
22061 `(("python-mock" ,python-mock)
22062 ("python-pytest" ,python-pytest)
22063 ("python-setuptools-scm" ,python-setuptools-scm)
22064 ("python-six" ,python-six)))
22065 (home-page "https://github.com/jd/daiquiri")
22066 (synopsis
22067 "Library to configure Python logging easily")
22068 (description "The daiquiri library provides an easy way to configure
22069 logging in Python. It also provides some custom formatters and handlers.")
22070 (license license:asl2.0)))
22071
22072 (define-public python-pifpaf
22073 (package
22074 (name "python-pifpaf")
22075 (version "2.5.0")
22076 (source
22077 (origin
22078 (method url-fetch)
22079 (uri (pypi-uri "pifpaf" version))
22080 (sha256
22081 (base32
22082 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
22083 (build-system python-build-system)
22084 (arguments
22085 '(#:phases
22086 (modify-phases %standard-phases
22087 (replace 'check
22088 (lambda _
22089 (invoke "python" "setup.py" "testr" "--slowest"
22090 "--testr-args=until-failure"))))))
22091 (propagated-inputs
22092 `(("python-click" ,python-click)
22093 ("python-daiquiri" ,python-daiquiri)
22094 ("python-fixtures" ,python-fixtures)
22095 ("python-jinja2" ,python-jinja2)
22096 ("python-pbr" ,python-pbr)
22097 ("python-psutil" ,python-psutil)
22098 ("python-six" ,python-six)
22099 ("python-xattr" ,python-xattr)))
22100 (native-inputs
22101 `(("python-mock" ,python-mock)
22102 ("python-os-testr" ,python-os-testr)
22103 ("python-requests" ,python-requests)
22104 ("python-testrepository" ,python-testrepository)
22105 ("python-testtools" ,python-testtools)))
22106 (home-page "https://github.com/jd/pifpaf")
22107 (synopsis "Tools and fixtures to manage daemons for testing in Python")
22108 (description "Pifpaf is a suite of fixtures and a command-line tool that
22109 starts and stops daemons for a quick throw-away usage. This is typically
22110 useful when needing these daemons to run integration testing. It originally
22111 evolved from its precursor @code{overtest}.")
22112 (license license:asl2.0)))
22113
22114 (define-public python-pytest-check-links
22115 (package
22116 (name "python-pytest-check-links")
22117 (version "0.3.0")
22118 (source
22119 (origin
22120 (method url-fetch)
22121 ;; URI uses underscores
22122 (uri (pypi-uri "pytest_check_links" version))
22123 (sha256
22124 (base32
22125 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
22126 (build-system python-build-system)
22127 (propagated-inputs
22128 `(("python-docutils" ,python-docutils)
22129 ("python-html5lib" ,python-html5lib)
22130 ("python-nbconvert" ,python-nbconvert)
22131 ("python-nbformat" ,python-nbformat)
22132 ("python-pytest" ,python-pytest)
22133 ("python-six" ,python-six)))
22134 (native-inputs
22135 `(("python-pbr-minimal" ,python-pbr-minimal)))
22136 (home-page "https://github.com/minrk/pytest-check-links")
22137 (synopsis "Check links in files")
22138 (description "This package provides a pytest plugin that checks URLs for
22139 HTML-containing files.")
22140 (license license:bsd-3)))
22141
22142 (define-public python-json5
22143 (package
22144 (name "python-json5")
22145 (version "0.8.5")
22146 (source
22147 (origin
22148 ;; sample.json5 is missing from PyPi source tarball
22149 (method git-fetch)
22150 (uri (git-reference
22151 (url "https://github.com/dpranke/pyjson5")
22152 (commit (string-append "v" version))))
22153 (file-name (git-file-name name version))
22154 (sha256
22155 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
22156 (build-system python-build-system)
22157 (home-page "https://github.com/dpranke/pyjson5")
22158 (synopsis
22159 "Python implementation of the JSON5 data format")
22160 (description
22161 "JSON5 extends the JSON data interchange format to make it slightly more
22162 usable as a configuration language. This Python package implements parsing and
22163 dumping of JSON5 data structures.")
22164 (license license:asl2.0)))
22165
22166 (define-public python-frozendict
22167 (package
22168 (name "python-frozendict")
22169 (version "1.2")
22170 (source
22171 (origin
22172 (method url-fetch)
22173 (uri (pypi-uri "frozendict" version))
22174 (sha256
22175 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
22176 (build-system python-build-system)
22177 (home-page "https://github.com/slezica/python-frozendict")
22178 (synopsis "Simple immutable mapping for Python")
22179 (description
22180 "@dfn{frozendict} is an immutable wrapper around dictionaries that
22181 implements the complete mapping interface. It can be used as a drop-in
22182 replacement for dictionaries where immutability is desired.")
22183 (license license:expat)))
22184
22185 (define-public python-unpaddedbase64
22186 (package
22187 (name "python-unpaddedbase64")
22188 (version "1.1.0")
22189 (source
22190 (origin
22191 (method git-fetch)
22192 (uri (git-reference
22193 (url "https://github.com/matrix-org/python-unpaddedbase64")
22194 (commit (string-append "v" version))))
22195 (file-name (git-file-name name version))
22196 (sha256
22197 (base32
22198 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
22199 (build-system python-build-system)
22200 (home-page "https://pypi.org/project/unpaddedbase64/")
22201 (synopsis "Encode and decode Base64 without “=” padding")
22202 (description
22203 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
22204 using “=” characters. However this conveys no benefit so many protocols
22205 choose to use Base64 without the “=” padding.")
22206 (license license:asl2.0)))
22207
22208 (define-public python-py-cpuinfo
22209 (package
22210 (name "python-py-cpuinfo")
22211 (version "5.0.0")
22212 (source
22213 (origin
22214 (method url-fetch)
22215 (uri (pypi-uri "py-cpuinfo" version))
22216 (sha256
22217 (base32
22218 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
22219 (build-system python-build-system)
22220 (home-page "https://github.com/workhorsy/py-cpuinfo")
22221 (synopsis "Get CPU info with Python")
22222 (description
22223 "This Python module returns the CPU info by using the best sources of
22224 information for your operating system.")
22225 (license license:expat)))
22226
22227 (define-public python-canonicaljson
22228 (package
22229 (name "python-canonicaljson")
22230 (version "1.4.0")
22231 (source
22232 (origin
22233 (method url-fetch)
22234 (uri (pypi-uri "canonicaljson" version))
22235 (sha256
22236 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
22237 (build-system python-build-system)
22238 (propagated-inputs
22239 `(("python-six" ,python-six)
22240 ("python-frozendict" ,python-frozendict)
22241 ("python-simplejson" ,python-simplejson)))
22242 (home-page "https://github.com/matrix-org/python-canonicaljson")
22243 (synopsis "Canonical JSON")
22244 (description
22245 "Deterministically encode JSON.
22246
22247 @itemize
22248 @item Encodes objects and arrays as RFC 7159 JSON.
22249 @item Sorts object keys so that you get the same result each time.
22250 @item Has no insignificant whitespace to make the output as small as possible.
22251 @item Escapes only the characters that must be escaped, U+0000 to
22252 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
22253 @item Uses the shortest escape sequence for each escaped character.
22254 @item Encodes the JSON as UTF-8.
22255 @item Can encode frozendict immutable dictionaries.
22256 @end itemize")
22257 (license license:asl2.0)))
22258
22259 (define-public python-signedjson
22260 (package
22261 (name "python-signedjson")
22262 (version "1.1.1")
22263 (source
22264 (origin
22265 (method url-fetch)
22266 (uri (pypi-uri "signedjson" version))
22267 (sha256
22268 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
22269 (build-system python-build-system)
22270 (propagated-inputs
22271 `(("python-canonicaljson" ,python-canonicaljson)
22272 ("python-importlib-metadata" ,python-importlib-metadata)
22273 ("python-pynacl" ,python-pynacl)
22274 ("python-typing-extensions" ,python-typing-extensions)
22275 ("python-unpaddedbase64" ,python-unpaddedbase64)))
22276 (native-inputs
22277 `(("python-setuptools-scm" ,python-setuptools-scm)))
22278 (home-page "https://github.com/matrix-org/python-signedjson")
22279 (synopsis "Sign JSON objects with ED25519 signatures")
22280 (description
22281 "Sign JSON objects with ED25519 signatures.
22282
22283 @itemize
22284 @item More than one entity can sign the same object.
22285 @item Each entity can sign the object with more than one key making it easier to
22286 rotate keys
22287 @item ED25519 can be replaced with a different algorithm.
22288 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
22289 key.
22290 @end itemize")
22291 (license license:asl2.0)))
22292
22293 (define-public python-daemonize
22294 (package
22295 (name "python-daemonize")
22296 (version "2.5.0")
22297 (source
22298 (origin
22299 (method url-fetch)
22300 (uri (pypi-uri "daemonize" version))
22301 (sha256
22302 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
22303 (build-system python-build-system)
22304 (home-page "https://github.com/thesharp/daemonize")
22305 (synopsis "Library for writing system daemons in Python")
22306 (description "Daemonize is a library for writing system daemons in Python.")
22307 (license license:expat)))
22308
22309 (define-public python-pymacaroons
22310 (package
22311 (name "python-pymacaroons")
22312 (version "0.13.0")
22313 (source
22314 (origin
22315 (method url-fetch)
22316 (uri (pypi-uri "pymacaroons" version))
22317 (sha256
22318 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
22319 (build-system python-build-system)
22320 (propagated-inputs
22321 `(("python-six" ,python-six)
22322 ("python-pynacl" ,python-pynacl)))
22323 (home-page "https://github.com/ecordell/pymacaroons")
22324 (synopsis "Python Macaroon Library")
22325 (description
22326 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
22327 tokens, macaroons embed caveats that define specific authorization
22328 requirements for the target service, the service that issued the root macaroon
22329 and which is capable of verifying the integrity of macaroons it receives.
22330
22331 Macaroons allow for delegation and attenuation of authorization. They are
22332 simple and fast to verify, and decouple authorization policy from the
22333 enforcement of that policy.")
22334 (license license:expat)))
22335
22336 (define-public python-ldap3
22337 (package
22338 (name "python-ldap3")
22339 (version "2.7")
22340 (home-page "https://github.com/cannatag/ldap3")
22341 (source
22342 (origin
22343 (method git-fetch)
22344 (uri (git-reference (url home-page)
22345 (commit (string-append "v" version))))
22346 (file-name (git-file-name name version))
22347 (sha256
22348 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
22349 (build-system python-build-system)
22350 (arguments
22351 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
22352 #:phases (modify-phases %standard-phases
22353 (replace 'check
22354 (lambda* (#:key tests? #:allow-other-keys)
22355 (when tests?
22356 (invoke "nosetests" "-s" "test"))
22357 #t)))))
22358 (native-inputs
22359 `(("python-nose" ,python-nose)))
22360 (propagated-inputs
22361 `(("python-gssapi" ,python-gssapi)
22362 ("python-pyasn1" ,python-pyasn1)))
22363 (synopsis "Python LDAP client")
22364 (description
22365 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
22366 library.")
22367 (license license:lgpl3+)))
22368
22369 (define-public python-boltons
22370 (package
22371 (name "python-boltons")
22372 (version "20.0.0")
22373 (source
22374 (origin
22375 (method url-fetch)
22376 (uri (pypi-uri "boltons" version))
22377 (sha256
22378 (base32
22379 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
22380 (build-system python-build-system)
22381 (home-page "https://github.com/mahmoud/boltons")
22382 (synopsis "Extensions to the Python standard library")
22383 (description
22384 "Boltons is a set of over 230 pure-Python utilities in the same spirit
22385 as — and yet conspicuously missing from — the standard library, including:
22386
22387 @itemize
22388 @item Atomic file saving, bolted on with fileutils
22389 @item A highly-optimized OrderedMultiDict, in dictutils
22390 @item Two types of PriorityQueue, in queueutils
22391 @item Chunked and windowed iteration, in iterutils
22392 @item Recursive data structure iteration and merging, with iterutils.remap
22393 @item Exponential backoff functionality, including jitter, through
22394 iterutils.backoff
22395 @item A full-featured TracebackInfo type, for representing stack traces, in
22396 tbutils
22397 @end itemize")
22398 (license license:bsd-3)))
22399
22400 (define-public python-eliot
22401 (package
22402 (name "python-eliot")
22403 (version "1.12.0")
22404 (source
22405 (origin
22406 (method url-fetch)
22407 (uri (pypi-uri "eliot" version))
22408 (sha256
22409 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
22410 (build-system python-build-system)
22411 (arguments
22412 `(#:phases
22413 (modify-phases %standard-phases
22414 (add-after 'unpack 'remove-journald-support
22415 (lambda _
22416 (for-each delete-file
22417 '("eliot/tests/test_journald.py"
22418 "eliot/journald.py"))
22419 #t))
22420 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
22421 ;; remove command-line tool's tests. TODO eliot-prettyprint should
22422 ;; be installed and these tests should pass.
22423 (lambda _
22424 (delete-file "eliot/tests/test_prettyprint.py")
22425 #t)))))
22426 (propagated-inputs
22427 `(("python-boltons" ,python-boltons)
22428 ("python-pyrsistent" ,python-pyrsistent)
22429 ("python-six" ,python-six)
22430 ("python-zope-interface" ,python-zope-interface)))
22431 (native-inputs
22432 `(("python-black" ,python-black)
22433 ("python-coverage" ,python-coverage)
22434 ("python-dask" ,python-dask)
22435 ("python-flake8" ,python-flake8)
22436 ("python-hypothesis" ,python-hypothesis)
22437 ("python-pytest" ,python-pytest)
22438 ("python-setuptools" ,python-setuptools)
22439 ("python-sphinx" ,python-sphinx)
22440 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22441 ("python-testtools" ,python-testtools)
22442 ("python-twine" ,python-twine)
22443 ("python-twisted" ,python-twisted)))
22444 (home-page "https://github.com/itamarst/eliot/")
22445 (synopsis "Eliot: the logging system that tells you why it happened")
22446 (description
22447 "@dfn{eliot} is a Python logging system that outputs causal chains of
22448 actions: actions can spawn other actions, and eventually they either succeed
22449 or fail. The resulting logs tell you the story of what your software did: what
22450 happened, and what caused it.")
22451 (license license:asl2.0)))
22452
22453 (define-public python-pem
22454 (package
22455 (name "python-pem")
22456 (version "20.1.0")
22457 (source
22458 (origin
22459 (method url-fetch)
22460 (uri (pypi-uri "pem" version))
22461 (sha256
22462 (base32
22463 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
22464 (build-system python-build-system)
22465 (native-inputs
22466 `(("python-certifi" ,python-certifi)
22467 ("python-coverage" ,python-coverage)
22468 ("python-pretend" ,python-pretend)
22469 ("python-pyopenssl" ,python-pyopenssl)
22470 ("python-pytest" ,python-pytest)
22471 ("python-sphinx" ,python-sphinx)
22472 ("python-twisted" ,python-twisted)))
22473 (home-page "https://pem.readthedocs.io/")
22474 (synopsis "Easy PEM file parsing in Python")
22475 (description
22476 "This package provides a Python module for parsing and splitting PEM files.")
22477 (license license:expat)))
22478
22479 (define-public python-txsni
22480 ;; We need a few commits on top of 0.1.9 for compatibility with newer
22481 ;; Python and OpenSSL.
22482 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
22483 (revision "0"))
22484 (package
22485 (name "python-txsni")
22486 (version (git-version "0.1.9" revision commit))
22487 (home-page "https://github.com/glyph/txsni")
22488 (source
22489 (origin
22490 (method git-fetch)
22491 (uri (git-reference (url home-page) (commit commit)))
22492 (file-name (git-file-name name version))
22493 (sha256
22494 (base32
22495 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
22496 (build-system python-build-system)
22497 (propagated-inputs
22498 `(("python-pyopenssl" ,python-pyopenssl)
22499 ("python-service-identity" ,python-service-identity)
22500 ("python-twisted" ,python-twisted)))
22501 (synopsis "Run TLS servers with Twisted")
22502 (description
22503 "This package provides an easy-to-use SNI endpoint for use
22504 with the Twisted web framework.")
22505 (license license:expat))))
22506
22507 (define-public python-txacme
22508 (package
22509 (name "python-txacme")
22510 (version "0.9.2")
22511 (source
22512 (origin
22513 (method url-fetch)
22514 (uri (pypi-uri "txacme" version))
22515 (sha256
22516 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22517 (build-system python-build-system)
22518 (propagated-inputs
22519 `(("python-acme" ,python-acme)
22520 ("python-attrs" ,python-attrs)
22521 ("python-eliot" ,python-eliot)
22522 ("python-josepy" ,python-josepy)
22523 ("python-pem" ,python-pem)
22524 ("python-treq" ,python-treq)
22525 ("python-twisted" ,python-twisted)
22526 ("python-txsni" ,python-txsni)))
22527 (native-inputs
22528 `(("python-fixtures" ,python-fixtures)
22529 ("python-hypothesis" ,python-hypothesis)
22530 ("python-mock" ,python-mock)
22531 ("python-service-identity"
22532 ,python-service-identity)
22533 ("python-testrepository" ,python-testrepository)
22534 ("python-testscenarios" ,python-testscenarios)
22535 ("python-testtools" ,python-testtools)))
22536 (home-page "https://github.com/twisted/txacme")
22537 (synopsis "Twisted implexmentation of the ACME protocol")
22538 (description
22539 "ACME is Automatic Certificate Management Environment, a protocol that
22540 allows clients and certificate authorities to automate verification and
22541 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22542 Certificate Authority.
22543
22544 txacme is an implementation of the protocol for Twisted, the event-driven
22545 networking engine for Python.")
22546 (license license:expat)))
22547
22548 (define-public python-pysaml2
22549 (package
22550 (name "python-pysaml2")
22551 (version "6.5.1")
22552 (source
22553 (origin
22554 (method url-fetch)
22555 (uri (pypi-uri "pysaml2" version))
22556 (sha256
22557 (base32
22558 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
22559 (build-system python-build-system)
22560 (propagated-inputs
22561 `(("python-cryptography" ,python-cryptography)
22562 ("python-dateutil" ,python-dateutil)
22563 ("python-defusedxml" ,python-defusedxml)
22564 ("python-importlib-resources"
22565 ,python-importlib-resources)
22566 ("python-pyopenssl" ,python-pyopenssl)
22567 ("python-pytz" ,python-pytz)
22568 ("python-requests" ,python-requests)
22569 ("python-six" ,python-six)
22570 ("python-xmlschema" ,python-xmlschema)))
22571 (home-page "https://idpy.org")
22572 (synopsis "Python implementation of SAML Version 2 Standard")
22573 (description
22574 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22575 It contains all necessary pieces for building a SAML2 service provider or
22576 an identity provider. The distribution contains examples of both.
22577
22578 This package was originally written to work in a WSGI environment, but
22579 there are extensions that allow you to use it with other frameworks.")
22580 (license license:asl2.0)))
22581
22582 (define-public python-click-plugins
22583 (package
22584 (name "python-click-plugins")
22585 (version "1.1.1")
22586 (source
22587 (origin
22588 (method url-fetch)
22589 (uri (pypi-uri "click-plugins" version))
22590 (sha256
22591 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22592 (build-system python-build-system)
22593 (native-inputs
22594 `(("python-pytest" ,python-pytest)))
22595 (propagated-inputs
22596 `(("python-click" ,python-click)))
22597 (synopsis "Extension for Click to register external CLI commands")
22598 (description "This package provides n extension module for Click to
22599 register external CLI commands via setuptools entry-points.")
22600 (home-page "https://github.com/click-contrib/click-plugins")
22601 (license license:bsd-3)))
22602
22603 (define-public python-diceware
22604 (package
22605 (name "python-diceware")
22606 (version "0.9.6")
22607 (source
22608 (origin
22609 (method url-fetch)
22610 (uri (pypi-uri "diceware" version))
22611 (sha256
22612 (base32
22613 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22614 (build-system python-build-system)
22615 (native-inputs
22616 `(("python-coverage" ,python-coverage)
22617 ("python-pytest" ,python-pytest)
22618 ("python-pytest-runner" ,python-pytest-runner)))
22619 (home-page "https://github.com/ulif/diceware/")
22620 (synopsis "Generates memorable passphrases")
22621 (description "This package generates passphrases by concatenating words
22622 randomly picked from wordlists. It supports several sources of
22623 randomness (including real life dice) and different wordlists (including
22624 cryptographically signed ones).")
22625 (license license:gpl3+)))
22626
22627 (define-public python-dictdiffer
22628 (package
22629 (name "python-dictdiffer")
22630 (version "0.8.1")
22631 (source (origin
22632 (method url-fetch)
22633 (uri (pypi-uri "dictdiffer" version))
22634 (sha256
22635 (base32
22636 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
22637 (build-system python-build-system)
22638 (native-inputs
22639 `(("python-check-manifest" ,python-check-manifest)
22640 ("python-coverage" ,python-coverage)
22641 ("python-isort" ,python-isort)
22642 ("python-mock" ,python-mock)
22643 ("python-pydoctstyle" ,python-pydocstyle)
22644 ("python-pytest-cache" ,python-pytest-cache)
22645 ("python-pytest-cov" ,python-pytest-cov)
22646 ("python-pytest-pep8" ,python-pytest-pep8)
22647 ("python-pytest-runner" ,python-pytest-runner)
22648 ("python-pytest" ,python-pytest)
22649 ("python-setuptools-scm" ,python-setuptools-scm)
22650 ("python-tox" ,python-tox)))
22651 (home-page "https://github.com/inveniosoftware/dictdiffer")
22652 (synopsis "Diff and patch Python dictionary objects")
22653 (description
22654 "Dictdiffer is a Python module that helps you to diff and patch
22655 dictionaries.")
22656 (license license:expat)))
22657
22658 (define-public pyzo
22659 (package
22660 (name "pyzo")
22661 (version "4.11.2")
22662 (source
22663 (origin
22664 (method url-fetch)
22665 (uri (pypi-uri "pyzo" version))
22666 (sha256
22667 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
22668 (build-system python-build-system)
22669 (arguments
22670 `(#:phases
22671 (modify-phases %standard-phases
22672 (add-before 'check 'fix-home-directory
22673 (lambda _
22674 ;; Tests fail with "Permission denied: '/homeless-shelter'".
22675 (setenv "HOME" "/tmp")
22676 #t)))
22677 ;; Tests fail with "Uncaught Python exception: python: undefined
22678 ;; symbol: objc_getClass".
22679 #:tests? #f))
22680 (propagated-inputs
22681 `(("python-pyqt" ,python-pyqt)))
22682 (home-page "https://pyzo.org")
22683 (synopsis
22684 "Python IDE for scientific computing")
22685 (description
22686 "Pyzo is a Python IDE focused on interactivity and introspection,
22687 which makes it very suitable for scientific computing. Its practical
22688 design is aimed at simplicity and efficiency.
22689
22690 It consists of two main components, the editor and the shell, and uses
22691 a set of pluggable tools to help the programmer in various ways. Some
22692 example tools are source structure, project manager, interactive help,
22693 workspace...")
22694 (license license:bsd-2)))
22695
22696 (define-public python-osc
22697 (package
22698 (name "python-osc")
22699 (version "1.7.4")
22700 (source
22701 (origin
22702 (method url-fetch)
22703 (uri (pypi-uri "python-osc" version))
22704 (sha256
22705 (base32
22706 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
22707 (build-system python-build-system)
22708 (home-page "https://github.com/attwad/python-osc")
22709 (synopsis "Open Sound Control server and client implementations")
22710 (description
22711 "@code{python-osc} is a pure Python library with no external
22712 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
22713 Open Sound Control 1.0} specification.")
22714 (license license:unlicense)))
22715
22716 (define-public python-voluptuous
22717 (package
22718 (name "python-voluptuous")
22719 (version "0.11.7")
22720 (source
22721 (origin
22722 (method url-fetch)
22723 (uri (pypi-uri "voluptuous" version))
22724 (sha256
22725 (base32
22726 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
22727 (build-system python-build-system)
22728 (native-inputs
22729 `(("python-nose" ,python-nose)))
22730 (home-page "https://github.com/alecthomas/voluptuous")
22731 (synopsis "Python data validation library")
22732 (description
22733 "Voluptuous is a Python data validation library. It is primarily
22734 intended for validating data coming into Python as JSON, YAML, etc.")
22735 (license license:bsd-3)))
22736
22737 (define-public python-cmd2
22738 (package
22739 (name "python-cmd2")
22740 (version "1.0.2")
22741 (source
22742 (origin
22743 (method url-fetch)
22744 (uri (pypi-uri "cmd2" version))
22745 (sha256
22746 (base32
22747 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
22748 (build-system python-build-system)
22749 (propagated-inputs
22750 `(("python-attrs" ,python-attrs)
22751 ("python-colorama" ,python-colorama)
22752 ("python-pyperclip" ,python-pyperclip)
22753 ("python-wcwidth" ,python-wcwidth)))
22754 (native-inputs
22755 `(("python-codecov" ,python-codecov)
22756 ("python-coverage" ,python-coverage)
22757 ("python-doc8" ,python-doc8)
22758 ("python-flake8" ,python-flake8)
22759 ("python-invoke" ,python-invoke)
22760 ("python-mock" ,python-mock)
22761 ("python-pytest" ,python-pytest)
22762 ("python-pytest-cov" ,python-pytest-cov)
22763 ("python-pytest-mock" ,python-pytest-mock)
22764 ("python-setuptools-scm" ,python-setuptools-scm)
22765 ("python-sphinx" ,python-sphinx)
22766 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
22767 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22768 ("python-tox" ,python-tox)
22769 ("python-twine" ,python-twine)
22770 ("which" ,which)))
22771 (home-page "https://github.com/python-cmd2/cmd2")
22772 (synopsis "Tool for building interactive command line applications")
22773 (description
22774 "Cmd2 is a tool for building interactive command line applications in
22775 Python. Its goal is to make it quick and easy for developers to build
22776 feature-rich and user-friendly interactive command line applications. It
22777 provides a simple API which is an extension of Python's built-in @code{cmd}
22778 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
22779 make your life easier and eliminates much of the boilerplate code which would
22780 be necessary when using @code{cmd}.")
22781 (license license:expat)))
22782
22783 (define-public python-pytidylib
22784 (package
22785 (name "python-pytidylib")
22786 (version "0.3.2")
22787 (source (origin
22788 (method url-fetch)
22789 (uri (pypi-uri "pytidylib" version))
22790 (sha256
22791 (base32
22792 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
22793 (build-system python-build-system)
22794 (arguments
22795 '(#:phases
22796 (modify-phases %standard-phases
22797 (add-before 'build 'qualify-libtidy
22798 (lambda* (#:key inputs #:allow-other-keys)
22799 (let ((libtidy (string-append (assoc-ref inputs "tidy")
22800 "/lib/libtidy.so")))
22801 (substitute* "tidylib/tidy.py"
22802 (("ctypes\\.util\\.find_library\\('tidy'\\)")
22803 (format #f "'~a'" libtidy)))
22804 #t))))))
22805 (inputs `(("tidy" ,tidy)))
22806 (home-page "https://github.com/countergram/pytidylib")
22807 (synopsis "Python wrapper for HTML Tidy library")
22808 (description
22809 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
22810 allows you, from Python code, to “fix” invalid (X)HTML markup.")
22811 (license license:expat)))
22812
22813 (define-public python2-pytidylib
22814 (package-with-python2 python-pytidylib))
22815
22816 (define-public python-mujson
22817 (package
22818 (name "python-mujson")
22819 (version "1.4")
22820 (source
22821 (origin
22822 (method url-fetch)
22823 (uri (pypi-uri "mujson" version))
22824 (sha256
22825 (base32
22826 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
22827 (build-system python-build-system)
22828 (home-page "https://github.com/mattgiles/mujson")
22829 (synopsis "Use the fastest JSON functions available at import time")
22830 (description "This package selects the fastest JSON functions available
22831 at import time.")
22832 (license license:expat)))
22833
22834 (define-public python-bashlex
22835 (package
22836 (name "python-bashlex")
22837 (version "0.14")
22838 (source
22839 (origin
22840 (method url-fetch)
22841 (uri (pypi-uri "bashlex" version))
22842 (sha256
22843 (base32
22844 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
22845 (build-system python-build-system)
22846 (arguments
22847 `(#:phases
22848 (modify-phases %standard-phases
22849 (add-before 'build 'pregenerate-yacc-tables
22850 (lambda _
22851 ;; parser.py caches tables, which attempts to write to site lib
22852 ;; see https://github.com/idank/bashlex/issues/51
22853 (invoke "python" "-c" "import bashlex"))))))
22854 (home-page
22855 "https://github.com/idank/bashlex")
22856 (synopsis "Python parser for bash")
22857 (description "@code{bashlex} is a Python port of the parser used
22858 internally by GNU bash.
22859
22860 For the most part it's transliterated from C, the major differences are:
22861
22862 @itemize
22863 @item it does not execute anything
22864 @item it is reentrant
22865 @item it generates a complete AST
22866 @end itemize
22867 ")
22868 (license license:gpl3+)))
22869
22870 (define-public python-jinxed
22871 (package
22872 (name "python-jinxed")
22873 (version "1.0.0")
22874 (source
22875 (origin
22876 (method url-fetch)
22877 (uri (pypi-uri "jinxed" version))
22878 (sha256
22879 (base32
22880 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
22881 (build-system python-build-system)
22882 (arguments
22883 '(#:phases
22884 (modify-phases %standard-phases
22885 (add-before 'check 'set-environment-variables
22886 (lambda* (#:key inputs #:allow-other-keys)
22887 (let ((ncurses (assoc-ref inputs "ncurses")))
22888 (setenv "TERM" "LINUX")
22889 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
22890 #t))))
22891 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
22892 (native-inputs
22893 `(("ncurses" ,ncurses)))
22894 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
22895 (synopsis "Jinxed Terminal Library")
22896 (description
22897 "Jinxed is an implementation of a subset of the Python curses library.")
22898 (license license:mpl2.0)))
22899
22900 (define-public python-blessed
22901 (package
22902 (name "python-blessed")
22903 (version "1.17.8")
22904 (source
22905 (origin
22906 (method url-fetch)
22907 (uri (pypi-uri "blessed" version))
22908 (sha256
22909 (base32
22910 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
22911 (modules '((guix build utils)))
22912 (snippet
22913 '(begin
22914 ;; Don't get hung up on Windows test failures.
22915 (delete-file "blessed/win_terminal.py") #t))))
22916 (build-system python-build-system)
22917 (propagated-inputs
22918 `(("python-jinxed" ,python-jinxed)
22919 ("python-six" ,python-six)
22920 ("python-wcwidth" ,python-wcwidth)))
22921 (native-inputs
22922 `(("python-mock" ,python-mock)
22923 ("python-pytest" ,python-pytest)))
22924 (home-page "https://github.com/jquast/blessed")
22925 (synopsis "Wrapper around terminal capabilities")
22926 (description
22927 "Blessed is a thin, practical wrapper around terminal styling, screen
22928 positioning, and keyboard input.")
22929 (license license:expat)))
22930
22931 (define-public python-readme-renderer
22932 (package
22933 (name "python-readme-renderer")
22934 (version "26.0")
22935 (source
22936 (origin
22937 (method url-fetch)
22938 (uri (pypi-uri "readme_renderer" version))
22939 (sha256
22940 (base32
22941 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
22942 (build-system python-build-system)
22943 (propagated-inputs
22944 `(("python-bleach" ,python-bleach)
22945 ("python-docutils" ,python-docutils)
22946 ("python-pygments" ,python-pygments)
22947 ("python-six" ,python-six)))
22948 (native-inputs
22949 `(("python-mock" ,python-mock)
22950 ("python-pytest" ,python-pytest)))
22951 (home-page "https://github.com/pypa/readme_renderer")
22952 (synopsis "Render README files in Warehouse")
22953 (description
22954 "Readme Renderer is a library that will safely render arbitrary README
22955 files into HTML. It is designed to be used in Warehouse to render the
22956 @code{long_description} for packages. It can handle Markdown, reStructuredText,
22957 and plain text.")
22958 (license license:asl2.0)))
22959
22960 (define-public python-lazr-delegates
22961 (package
22962 (name "python-lazr-delegates")
22963 (version "2.0.4")
22964 (source
22965 (origin
22966 (method url-fetch)
22967 (uri (pypi-uri "lazr.delegates" version))
22968 (sha256
22969 (base32
22970 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
22971 (build-system python-build-system)
22972 (arguments
22973 '(#:phases
22974 (modify-phases %standard-phases
22975 (replace 'check
22976 (lambda _
22977 (invoke "python" "setup.py" "nosetests"))))))
22978 (native-inputs
22979 `(("python-nose" ,python-nose)))
22980 (propagated-inputs
22981 `(("python-zope-interface" ,python-zope-interface)))
22982 (home-page "https://launchpad.net/lazr.delegates")
22983 (synopsis "Easily write objects that delegate behavior")
22984 (description
22985 "The @code{lazr.delegates} package makes it easy to write objects that
22986 delegate behavior to another object. The new object adds some property or
22987 behavior on to the other object, while still providing the underlying interface,
22988 and delegating behavior.")
22989 (license license:lgpl3)))
22990
22991 (define-public python-lazr-config
22992 (package
22993 (name "python-lazr-config")
22994 (version "2.2.2")
22995 (source
22996 (origin
22997 (method url-fetch)
22998 (uri (pypi-uri "lazr.config" version))
22999 (sha256
23000 (base32
23001 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
23002 (build-system python-build-system)
23003 (arguments
23004 '(#:phases
23005 (modify-phases %standard-phases
23006 (replace 'check
23007 (lambda _
23008 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
23009 (native-inputs
23010 `(("python-nose" ,python-nose)))
23011 (propagated-inputs
23012 `(("python-lazr-delegates" ,python-lazr-delegates)
23013 ("python-zope-interface" ,python-zope-interface)))
23014 (home-page "https://launchpad.net/lazr.config")
23015 (synopsis "Create configuration schemas and process and validate configurations")
23016 (description
23017 "The LAZR config system is typically used to manage process configuration.
23018 Process configuration is for saying how things change when we run systems on
23019 different machines, or under different circumstances. This system uses ini-like
23020 file format of section, keys, and values. The config file supports inheritance
23021 to minimize duplication of information across files. The format supports schema
23022 validation.")
23023 (license license:lgpl3)))
23024
23025 (define-public python-flufl-bounce
23026 (package
23027 (name "python-flufl-bounce")
23028 (version "3.0.1")
23029 (source
23030 (origin
23031 (method url-fetch)
23032 (uri (pypi-uri "flufl.bounce" version))
23033 (sha256
23034 (base32
23035 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
23036 (build-system python-build-system)
23037 (propagated-inputs
23038 `(("python-atpublic" ,python-atpublic)
23039 ("python-zope-interface" ,python-zope-interface)))
23040 (native-inputs
23041 `(("python-nose2" ,python-nose2)))
23042 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
23043 (synopsis "Email bounce detectors")
23044 (description "The @code{flufl.bounce} library provides a set of heuristics
23045 and an API for detecting the original bouncing email addresses from a bounce
23046 message. Many formats found in the wild are supported, as are VERP and
23047 RFC 3464.")
23048 (license (list license:asl2.0
23049 license:lgpl3)))) ; only for setup_headers.py
23050
23051 (define-public python-flufl-i18n
23052 (package
23053 (name "python-flufl-i18n")
23054 (version "3.0")
23055 (source
23056 (origin
23057 (method url-fetch)
23058 (uri (pypi-uri "flufl.i18n" version))
23059 (sha256
23060 (base32
23061 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
23062 (build-system python-build-system)
23063 (propagated-inputs
23064 `(("python-atpublic" ,python-atpublic)))
23065 (home-page "https://flufli18n.readthedocs.io")
23066 (synopsis "API for Python internationalization")
23067 (description
23068 "This package provides a high-level, convenient API for managing
23069 internationalization/translation contexts in Python applications. There is a
23070 simple API for single-context applications, such as command line scripts which
23071 only need to translate into one language during the entire course of their
23072 execution. There is a more flexible, but still convenient API for multi-context
23073 applications, such as servers, which may need to switch language contexts for
23074 different tasks.")
23075 (license license:asl2.0)))
23076
23077 (define-public python-flufl-lock
23078 (package
23079 (name "python-flufl-lock")
23080 (version "4.0")
23081 (source
23082 (origin
23083 (method url-fetch)
23084 (uri (pypi-uri "flufl.lock" version))
23085 (sha256
23086 (base32
23087 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
23088 (build-system python-build-system)
23089 (propagated-inputs
23090 `(("python-atpublic" ,python-atpublic)
23091 ("python-psutil" ,python-psutil)))
23092 (home-page "https://flufllock.readthedocs.io")
23093 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
23094 (description
23095 "The @dfn{flufl.lock} package provides NFS-safe file locking with
23096 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
23097 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
23098 and have a maximum lifetime built-in.")
23099 (license (list license:asl2.0
23100 license:lgpl3)))) ; only for setup_helpers.py
23101
23102 (define-public python-flufl-testing
23103 (package
23104 (name "python-flufl-testing")
23105 (version "0.8")
23106 (source
23107 (origin
23108 (method url-fetch)
23109 (uri (pypi-uri "flufl.testing" version))
23110 (sha256
23111 (base32
23112 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
23113 (build-system python-build-system)
23114 (native-inputs
23115 `(("python-nose2" ,python-nose2)))
23116 (home-page "https://gitlab.com/warsaw/flufl.testing")
23117 (synopsis "Collection of test tool plugins")
23118 (description
23119 "This package contains a small collection of test tool plugins for
23120 @code{nose2} and @code{flake8}.")
23121 (license license:asl2.0)))
23122
23123 (define-public python-devtools
23124 (package
23125 (name "python-devtools")
23126 (version "0.6")
23127 (source
23128 (origin
23129 (method git-fetch)
23130 (uri (git-reference
23131 (url "https://github.com/samuelcolvin/python-devtools")
23132 (commit (string-append "v" version))))
23133 (file-name (git-file-name name version))
23134 (sha256
23135 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
23136 (build-system python-build-system)
23137 (native-inputs
23138 `(("python-pytest" ,python-pytest)
23139 ("python-pytest-mock" ,python-pytest-mock)))
23140 (propagated-inputs
23141 `(("python-pygments" ,python-pygments)))
23142 (arguments
23143 `(#:phases (modify-phases %standard-phases
23144 (replace 'check
23145 (lambda _
23146 (invoke "pytest")
23147 #t)))))
23148 (home-page "https://github.com/samuelcolvin/python-devtools")
23149 (synopsis "Debug command and development tools")
23150 (description
23151 "This package provides a debug print command and other development tools.
23152 It adds a simple and readable way to print stuff during development.")
23153 (license license:expat)))
23154
23155 (define-public python-dateparser
23156 (package
23157 (name "python-dateparser")
23158 (version "0.7.6")
23159 (source
23160 (origin
23161 (method url-fetch)
23162 (uri (pypi-uri "dateparser" version))
23163 (sha256
23164 (base32
23165 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
23166 (build-system python-build-system)
23167 (propagated-inputs
23168 `(("python-dateutil" ,python-dateutil)
23169 ("python-pytz" ,python-pytz)
23170 ("python-regex" ,python-regex)
23171 ("python-ruamel.yaml" ,python-ruamel.yaml)
23172 ("python-tzlocal" ,python-tzlocal)))
23173 (native-inputs
23174 `(("python-mock" ,python-mock)
23175 ("python-parameterized" ,python-parameterized)
23176 ("tzdata" ,tzdata-for-tests)))
23177 (arguments
23178 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
23179 #:tests? #f
23180 #:phases
23181 (modify-phases %standard-phases
23182 (add-before 'check 'set-check-environment
23183 (lambda* (#:key inputs #:allow-other-keys)
23184 (setenv "TZ" "UTC")
23185 (setenv "TZDIR"
23186 (string-append (assoc-ref inputs "tzdata")
23187 "/share/zoneinfo"))
23188 #t)))))
23189 (home-page "https://github.com/scrapinghub/dateparser")
23190 (synopsis
23191 "Date parsing library designed to parse dates from HTML pages")
23192 (description
23193 "@code{python-dateparser} provides modules to easily parse localized
23194 dates in almost any string formats commonly found on web pages.")
23195 (license license:bsd-3)))
23196
23197 (define-public python-dparse
23198 (package
23199 (name "python-dparse")
23200 (version "0.5.1")
23201 (source
23202 (origin
23203 (method url-fetch)
23204 (uri (pypi-uri "dparse" version))
23205 (sha256
23206 (base32
23207 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
23208 (build-system python-build-system)
23209 (native-inputs
23210 `(("python-pytest" ,python-pytest)))
23211 (propagated-inputs
23212 `(("python-packaging" ,python-packaging)
23213 ("python-pyyaml" ,python-pyyaml)
23214 ("python-toml" ,python-toml)))
23215 (home-page "https://github.com/pyupio/dparse")
23216 (synopsis "Parser for Python dependency files")
23217 (description "This package provides a parser for Python dependency files.")
23218 (license license:expat)))
23219
23220 (define-public python-dpath
23221 (package
23222 (name "python-dpath")
23223 (version "2.0.1")
23224 (source
23225 (origin
23226 (method url-fetch)
23227 (uri (pypi-uri "dpath" version))
23228 (sha256
23229 (base32
23230 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
23231 (build-system python-build-system)
23232 (native-inputs
23233 `(("python-hypothesis" ,python-hypothesis)
23234 ("python-mock" ,python-mock)
23235 ("python-nose" ,python-nose)))
23236 (arguments
23237 '(#:phases
23238 (modify-phases %standard-phases
23239 (replace 'check
23240 (lambda* (#:key inputs outputs #:allow-other-keys)
23241 (add-installed-pythonpath inputs outputs)
23242 ;; This invokation is taken from tox.ini.
23243 (invoke "nosetests" "-d" "-v" "tests/"))))))
23244 (home-page "https://github.com/akesterson/dpath-python")
23245 (synopsis "Filesystem-like pathing and searching for dictionaries")
23246 (description
23247 "@code{python-dpath} is a library for accessing and searching
23248 dictionaries via /slashed/paths ala xpath.
23249
23250 Basically it lets you glob over a dictionary as if it were a filesystem. It
23251 allows you to specify globs (ala the bash eglob syntax, through some advanced
23252 fnmatch.fnmatch magic) to access dictionary elements, and provides some
23253 facility for filtering those results.")
23254 (license license:expat)))
23255
23256 (define-public python-safety
23257 (package
23258 (name "python-safety")
23259 (version "1.9.0")
23260 (source
23261 (origin
23262 (method url-fetch)
23263 (uri (pypi-uri "safety" version))
23264 (sha256
23265 (base32
23266 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
23267 (build-system python-build-system)
23268 (arguments
23269 `(#:phases
23270 (modify-phases %standard-phases
23271 (add-after 'unpack 'disable-tests
23272 (lambda _
23273 (substitute* "tests/test_safety.py"
23274 ;; requires network
23275 (("def test_check_live") "def _test_check_live"))
23276 #t)))))
23277 (propagated-inputs
23278 `(("python-click" ,python-click)
23279 ("python-dparse" ,python-dparse)
23280 ("python-packaging" ,python-packaging)
23281 ("python-requests" ,python-requests)))
23282 (home-page "https://github.com/pyupio/safety")
23283 (synopsis "Check installed dependencies for known vulnerabilities")
23284 (description "Safety checks installed dependencies for known vulnerabilities.
23285 By default it uses the open Python vulnerability database Safety DB.")
23286 (license license:expat)))
23287
23288 (define-public python-pypandoc
23289 (package
23290 (name "python-pypandoc")
23291 (version "1.5")
23292 (source
23293 (origin
23294 (method url-fetch)
23295 (uri (pypi-uri "pypandoc" version))
23296 (sha256
23297 (base32
23298 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
23299 (build-system python-build-system)
23300 (inputs
23301 `(("pandoc" ,pandoc)
23302 ("pandoc-citeproc" ,pandoc-citeproc)))
23303 (propagated-inputs
23304 `(("wheel" ,python-wheel)))
23305 (native-inputs
23306 `(("texlive" ,(texlive-union (list texlive-amsfonts
23307 texlive-fonts-ec
23308 texlive-latex-hyperref
23309 texlive-latex-oberdiek
23310 texlive-lm
23311 texlive-xcolor)))))
23312 (arguments
23313 `(#:phases
23314 (modify-phases %standard-phases
23315 (add-before 'check 'disable-tests
23316 (lambda _
23317 ;; Disable test requiring network access
23318 (substitute* "tests.py"
23319 (("test_basic_conversion_from_http_url")
23320 "skip_test_basic_conversion_from_http_url"))
23321 ;; Needed by texlive-union to generate fonts
23322 (setenv "HOME" "/tmp")
23323 #t)))))
23324 (home-page "https://github.com/bebraw/pypandoc")
23325 (synopsis "Python wrapper for pandoc")
23326 (description "pypandoc is a thin Python wrapper around pandoc
23327 and pandoc-citeproc.")
23328 (license license:expat)))
23329
23330 (define-public python-rnc2rng
23331 (package
23332 (name "python-rnc2rng")
23333 (version "2.6.4")
23334 (source
23335 (origin
23336 (method url-fetch)
23337 (uri (pypi-uri "rnc2rng" version))
23338 (sha256
23339 (base32
23340 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
23341 (build-system python-build-system)
23342 (propagated-inputs
23343 `(("python-rply" ,python-rply)))
23344 (arguments
23345 `(#:phases (modify-phases %standard-phases
23346 (replace 'check
23347 (lambda _
23348 (invoke "python" "test.py"))))))
23349 (home-page "https://github.com/djc/rnc2rng")
23350 (synopsis "Convert RELAX NG Compact to regular syntax")
23351 (description
23352 "This package provides the @command{rnc2rng} command-line tool as well as
23353 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
23354 equivalent schemata in the XML-based default RELAX NG syntax.")
23355 (license license:expat)))
23356
23357 (define-public python-telethon
23358 (package
23359 (name "python-telethon")
23360 (version "1.17.5")
23361 (source
23362 (origin
23363 (method git-fetch)
23364 (uri (git-reference
23365 (url "https://github.com/LonamiWebs/Telethon")
23366 (commit (string-append "v" version))))
23367 (file-name (git-file-name name version))
23368 (sha256
23369 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
23370 (build-system python-build-system)
23371 (arguments
23372 '(#:phases
23373 (modify-phases %standard-phases
23374 (replace 'check
23375 (lambda* (#:key tests? #:allow-other-keys)
23376 (when tests?
23377 (invoke "py.test" "-v"))
23378 #t)))))
23379 (propagated-inputs
23380 `(("python-rsa" ,python-rsa)
23381 ("python-pyaes" ,python-pyaes)))
23382 (native-inputs
23383 `(("python-pytest" ,python-pytest)
23384 ("python-pytest-asyncio" ,python-pytest-asyncio)
23385 ("python-pytest-trio" ,python-pytest-trio)))
23386 (home-page "https://docs.telethon.dev")
23387 (synopsis "Full-featured Telegram client library for Python 3")
23388 (description "This library is designed to make it easy to write Python
23389 programs that can interact with Telegram.")
23390 (license license:expat)))
23391
23392 (define-public python-citeproc-py
23393 (package
23394 (name "python-citeproc-py")
23395 (version "0.5.1")
23396 (source
23397 (origin
23398 (method url-fetch)
23399 (uri (pypi-uri "citeproc-py" version))
23400 (sha256
23401 (base32
23402 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
23403 (build-system python-build-system)
23404 (propagated-inputs
23405 `(("python-lxml" ,python-lxml)
23406 ("python-rnc2rng" ,python-rnc2rng)))
23407 (home-page
23408 "https://github.com/brechtm/citeproc-py")
23409 (synopsis "Citations and bibliography formatter")
23410 (description
23411 "Citeproc-py is a CSL processor for Python. It aims to implement the
23412 CSL 1.0.1 specification. citeproc-py can output styled citations and
23413 bibliographies in a number of different output formats. Currently supported
23414 are plain text, reStructuredText and HTML.")
23415 (license license:bsd-2)))
23416
23417 (define-public python-inform
23418 (package
23419 (name "python-inform")
23420 (version "1.23.0")
23421 (source
23422 (origin
23423 (method url-fetch)
23424 (uri (pypi-uri "inform" version))
23425 (sha256
23426 (base32
23427 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
23428 (build-system python-build-system)
23429 (arguments
23430 `(#:tests? #f)) ; PyPI tarball lacks tests
23431 (native-inputs
23432 `(("python-hypothesis" ,python-hypothesis)
23433 ("python-pytest-cov" ,python-pytest-cov)
23434 ("python-pytest-runner" ,python-pytest-runner)))
23435 (propagated-inputs
23436 `(("python-arrow" ,python-arrow)
23437 ("python-six" ,python-six)))
23438 (home-page "https://inform.readthedocs.io")
23439 (synopsis "Print & logging utilities for communicating with user")
23440 (description
23441 "Inform is designed to display messages from programs that are typically run from
23442 a console. It provides a collection of ‘print’ functions that allow you to simply and
23443 cleanly print different types of messages.")
23444 (license license:gpl3+)))
23445
23446 (define-public python-nestedtext
23447 (package
23448 (name "python-nestedtext")
23449 (version "1.0.0")
23450 (source
23451 (origin
23452 (method url-fetch)
23453 (uri (pypi-uri "nestedtext" version))
23454 (sha256
23455 (base32
23456 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
23457 (build-system python-build-system)
23458 (arguments
23459 `(#:tests? #f)) ; PyPI tarball lacks tests
23460 (propagated-inputs
23461 `(("python-inform" ,python-inform)))
23462 (home-page "https://nestedtext.org")
23463 (synopsis "Human readable and writable data interchange format")
23464 (description
23465 "NestedText is a file format for holding data that is to be entered, edited, or
23466 viewed by people. It allows data to be organized into a nested collection of
23467 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
23468 without the complexity and risk of YAML and without the syntatic clutter of JSON.
23469 NestedText is both simple and natural. Only a small number of concepts and rules must
23470 be kept in mind when creating it. It is easily created, modified, or viewed with
23471 a text editor and easily understood and used by both programmers and non-programmers.")
23472 (license license:expat))) ; MIT license
23473
23474 (define-public python-parallel
23475 (package
23476 (name "python-parallel")
23477 (version "1.6.4.4")
23478 (source
23479 (origin
23480 (method url-fetch)
23481 (uri (string-append
23482 "https://www.parallelpython.com/downloads/pp/pp-"
23483 version ".zip"))
23484 (sha256
23485 (base32
23486 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
23487 (native-inputs
23488 `(("unzip" ,unzip)))
23489 (build-system python-build-system)
23490 (arguments '(#:tests? #f)) ; No test suite.
23491 (home-page "https://www.parallelpython.com")
23492 (synopsis "Parallel and distributed programming for Python")
23493 (description "Parallel Python module (PP) provides an easy and efficient
23494 way to create parallel-enabled applications for SMP computers and clusters.
23495 PP module features cross-platform portability and dynamic load balancing.
23496 Thus applications written with PP will parallelize efficiently even on
23497 heterogeneous and multi-platform clusters (including clusters running other
23498 applications with variable CPU loads).")
23499 (license license:bsd-3)))
23500
23501 (define-public python2-parallel
23502 (package-with-python2 python-parallel))
23503
23504 (define-public python-djvulibre
23505 (package
23506 (name "python-djvulibre")
23507 (version "0.8.5")
23508 (source
23509 (origin
23510 (method url-fetch)
23511 (uri (pypi-uri "python-djvulibre" version))
23512 (sha256
23513 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
23514 (build-system python-build-system)
23515 (native-inputs
23516 `(("ghostscript" ,ghostscript)
23517 ("pkg-config" ,pkg-config)
23518 ("python-nose" ,python-nose)))
23519 (inputs
23520 `(("djvulibre" ,djvulibre)
23521 ("python-cython" ,python-cython)))
23522 (arguments
23523 `(#:phases
23524 (modify-phases %standard-phases
23525 (add-after 'unpack 'fix-tests
23526 (lambda _
23527 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23528 ;; doesn't make sense on GNU/Linux.
23529 (delete-file "djvu/dllpath.py")
23530 #t)))))
23531 (synopsis "Python bindings for DjVuLibre")
23532 (description "This is a set of Python bindings for the DjVuLibre library.")
23533 (home-page "https://jwilk.net/software/python-djvulibre")
23534 (license license:gpl2)))
23535
23536 (define-public python2-djvulibre
23537 (package-with-python2 python-djvulibre))
23538
23539 (define-public python-versioneer
23540 (package
23541 (name "python-versioneer")
23542 (version "0.19")
23543 (source
23544 (origin
23545 (method url-fetch)
23546 (uri (pypi-uri "versioneer" version))
23547 (sha256
23548 (base32
23549 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
23550 (build-system python-build-system)
23551 (home-page
23552 "https://github.com/python-versioneer/python-versioneer")
23553 (synopsis
23554 "Version-string management for VCS-controlled trees")
23555 (description
23556 "@code{versioneer} is a tool for managing a recorded version number in
23557 distutils-based python projects. The goal is to remove the tedious and
23558 error-prone \"update the embedded version string\" step from your release
23559 process.")
23560 (license license:public-domain)))
23561
23562 (define-public python2-gamera
23563 (package
23564 (name "python2-gamera")
23565 (version "3.4.4")
23566 (source
23567 (origin
23568 (method url-fetch)
23569 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
23570 "gamera-" version ".tar.gz"))
23571 (sha256
23572 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
23573 (modules '((guix build utils)))
23574 (snippet
23575 '(begin
23576 ;; Remove bundled libraries.
23577 (for-each delete-file-recursively
23578 '("src/libpng-1.2.5"
23579 "src/libtiff"
23580 "src/zlib-1.2.8"))))))
23581 (build-system python-build-system)
23582 (inputs
23583 `(("libpng" ,libpng)
23584 ("libtiff" ,libtiff)
23585 ("python2-wxpython" ,python2-wxpython)
23586 ("zlib" ,zlib)))
23587 (arguments
23588 `(#:python ,python-2))
23589 (synopsis "Framework for building document analysis applications")
23590 (description
23591 "Gamera is a toolkit for building document image recognition systems.")
23592 (home-page "https://gamera.informatik.hsnr.de/")
23593 (license license:gpl2+)))
23594
23595 (define-public python-contextvars
23596 (package
23597 (name "python-contextvars")
23598 (version "2.4")
23599 (source
23600 (origin
23601 (method url-fetch)
23602 (uri (pypi-uri "contextvars" version))
23603 (sha256
23604 (base32
23605 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
23606 (build-system python-build-system)
23607 (propagated-inputs
23608 `(("python-immutables" ,python-immutables)))
23609 (home-page
23610 "https://github.com/MagicStack/contextvars")
23611 (synopsis "PEP 567 Backport")
23612 (description "This package implements a backport of Python 3.7
23613 @code{contextvars} module (see PEP 567) for Python 3.6.")
23614 (license license:asl2.0)))
23615
23616 (define-public python-aiofiles
23617 (package
23618 (name "python-aiofiles")
23619 (version "0.6.0")
23620 (source
23621 (origin
23622 (method url-fetch)
23623 (uri (pypi-uri "aiofiles" version))
23624 (sha256
23625 (base32
23626 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
23627 (build-system python-build-system)
23628 (home-page "https://github.com/Tinche/aiofiles")
23629 (synopsis "File support for @code{asyncio}")
23630 (description "@code{python-aiofiles} is a library for handling local
23631 disk files in asyncio applications.")
23632 (license license:asl2.0)))
23633
23634 (define-public python-pyre-extensions
23635 (package
23636 (name "python-pyre-extensions")
23637 (version "0.0.18")
23638 (source
23639 (origin
23640 (method url-fetch)
23641 (uri (pypi-uri "pyre-extensions" version))
23642 (sha256
23643 (base32
23644 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
23645 (build-system python-build-system)
23646 (propagated-inputs
23647 `(("python-typing-extensions"
23648 ,python-typing-extensions)
23649 ("python-typing-inspect" ,python-typing-inspect)))
23650 (home-page "https://pyre-check.org")
23651 (synopsis
23652 "Type system extensions for use with @code{python-pyre}")
23653 (description
23654 "@code{python-pyre-extensions} defines extensions to the standard
23655 @code{typing} module that are supported by the Pyre typechecker.")
23656 (license license:expat)))
23657
23658 (define-public python-dataclasses
23659 (package
23660 (name "python-dataclasses")
23661 (version "0.7")
23662 (source
23663 (origin
23664 (method url-fetch)
23665 (uri (pypi-uri "dataclasses" version))
23666 (sha256
23667 (base32
23668 "1rh8111fbws2vxyf2qy2zw3x6p6cq1jfz8pf904gig5qwg56sjj9"))))
23669 (build-system python-build-system)
23670 (home-page
23671 "https://github.com/ericvsmith/dataclasses")
23672 (synopsis
23673 "Backport of the @code{dataclasses} module for Python 3.6")
23674 (description
23675 "This is an implementation of PEP 557, Data Classes. It is a
23676 backport of the @code{dataclasses} module for Python 3.6.")
23677 (license license:asl2.0)))
23678
23679 (define-public python-pywatchman
23680 (package
23681 (name "python-pywatchman")
23682 (version "1.4.1")
23683 (source
23684 (origin
23685 (method url-fetch)
23686 (uri (pypi-uri "pywatchman" version))
23687 (sha256
23688 (base32
23689 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
23690 (build-system python-build-system)
23691 (arguments
23692 `(#:tests? #f)) ;there are none
23693 (home-page
23694 "https://facebook.github.io/watchman/")
23695 (synopsis "Watchman client for python")
23696 (description "@code{python-pywatchman} is a library to connect and
23697 query Watchman to discover file changes.")
23698 (license license:bsd-3)))
23699
23700 (define-public python-helpdev
23701 (package
23702 (name "python-helpdev")
23703 (version "0.7.1")
23704 (source
23705 (origin
23706 (method url-fetch)
23707 (uri (pypi-uri "helpdev" version))
23708 (sha256
23709 (base32
23710 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
23711 (build-system python-build-system)
23712 (arguments
23713 `(#:phases
23714 (modify-phases %standard-phases
23715 (replace 'check
23716 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
23717 (when tests?
23718 (add-installed-pythonpath inputs outputs)
23719 (invoke "pytest" "tests"))
23720 #t)))))
23721 (propagated-inputs
23722 `(("python-importlib-metadata" ,python-importlib-metadata)))
23723 (native-inputs
23724 `(("python-pytest" ,python-pytest)))
23725 (home-page "https://gitlab.com/dpizetta/helpdev")
23726 (synopsis
23727 "Extract information about the Python environment easily")
23728 (description
23729 "Helpdev is a library to easily extract information about the Python
23730 environment.")
23731 (license license:expat)))
23732
23733 (define-public python-qdarkstyle
23734 (package
23735 (name "python-qdarkstyle")
23736 (version "2.8.1")
23737 (source
23738 (origin
23739 (method url-fetch)
23740 (uri (pypi-uri "QDarkStyle" version))
23741 (sha256
23742 (base32
23743 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
23744 (build-system python-build-system)
23745 (arguments
23746 `(;; Fails unable to detect valid Qt bindings even when
23747 ;; added as native-inputs.
23748 #:tests? #f))
23749 (propagated-inputs
23750 `(("python-helpdev" ,python-helpdev)
23751 ("python-qtpy" ,python-qtpy)))
23752 (home-page
23753 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
23754 (synopsis
23755 "Complete dark stylesheet for Python and Qt applications")
23756 (description "QDarkStyle is the most complete dark stylesheet for Python and
23757 Qt applications.")
23758 (license license:expat)))
23759
23760 (define-public python-bitstring
23761 (package
23762 (name "python-bitstring")
23763 (version "3.1.7")
23764 (source
23765 (origin
23766 (method url-fetch)
23767 (uri (pypi-uri "bitstring" version))
23768 (sha256
23769 (base32
23770 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
23771 (build-system python-build-system)
23772 (arguments
23773 `(#:phases
23774 (modify-phases %standard-phases
23775 (replace 'check
23776 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
23777 (when tests?
23778 (add-installed-pythonpath inputs outputs)
23779 (with-directory-excursion "test"
23780 (invoke "pytest")))
23781 #t)))))
23782 (native-inputs
23783 `(("python-pytest" ,python-pytest)))
23784 (home-page "https://github.com/scott-griffiths/bitstring")
23785 (synopsis
23786 "Simple construction, analysis and modification of binary data")
23787 (description
23788 "Bitstring is a library for simple construction, analysis and modification
23789 of binary data.")
23790 (license license:expat)))
23791
23792 (define-public python-confuse
23793 (package
23794 (name "python-confuse")
23795 (version "1.4.0")
23796 (source
23797 (origin
23798 (method url-fetch)
23799 (uri (pypi-uri "confuse" version))
23800 (sha256
23801 (base32
23802 "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j"))))
23803 (build-system python-build-system)
23804 (propagated-inputs
23805 `(("python-pathlib" ,python-pathlib)
23806 ("python-pyyaml" ,python-pyyaml)))
23807 (home-page "https://github.com/beetbox/confuse")
23808 (synopsis "Painless YAML configuration.")
23809 (description "Confuse is a configuration library for Python that uses
23810 YAML. It takes care of defaults, overrides, type checking, command-line
23811 integration, human-readable errors, and standard OS-specific locations.")
23812 (license license:expat)))
23813
23814 (define-public python-reflink
23815 (package
23816 (name "python-reflink")
23817 (version "0.2.1")
23818 (source
23819 (origin
23820 (method url-fetch)
23821 (uri (pypi-uri "reflink" version))
23822 (sha256
23823 (base32
23824 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
23825 (build-system python-build-system)
23826 (arguments
23827 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
23828 (propagated-inputs
23829 `(("python-cffi" ,python-cffi)))
23830 (native-inputs
23831 `(("python-pytest" ,python-pytest)
23832 ("python-pytest-runner" ,python-pytest-runner)))
23833 (home-page "https://gitlab.com/rubdos/pyreflink")
23834 (synopsis "Python wrapper around reflink system call")
23835 (description
23836 "Python reflink wraps around platform specific @code{reflink}
23837 implementations.")
23838 (license license:expat)))
23839
23840 (define-public python-pivy
23841 (package
23842 (name "python-pivy")
23843 (version "0.6.5")
23844 (source
23845 (origin
23846 (method git-fetch)
23847 (uri (git-reference
23848 (url "https://github.com/coin3d/pivy")
23849 (commit version)))
23850 (file-name (git-file-name name version))
23851 (sha256
23852 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
23853 (build-system python-build-system)
23854 (arguments
23855 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
23856 #:tests? #f
23857 #:phases
23858 (modify-phases %standard-phases
23859 (add-after 'unpack 'patch-cmake-include-dirs
23860 (lambda _
23861 ;; Patch buildsystem to respect Coin3D include directory
23862 (substitute* "CMakeLists.txt"
23863 (("\\$\\{SoQt_INCLUDE_DIRS}")
23864 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
23865 #t)))))
23866 (native-inputs
23867 `(("cmake" ,cmake)
23868 ("swig" ,swig)))
23869 (inputs
23870 `(("python-wrapper" ,python-wrapper)
23871 ("qtbase" ,qtbase)
23872 ("libxi" ,libxi)
23873 ("libice" ,libice)
23874 ("soqt" ,soqt)
23875 ("glew" ,glew)
23876 ("coin3D" ,coin3D-4)))
23877 (home-page "https://github.com/coin3d/pivy")
23878 (synopsis "Python bindings to Coin3D")
23879 (description
23880 "Pivy provides python bindings for Coin, a 3D graphics library with an
23881 Application Programming Interface based on the Open Inventor 2.1 API.")
23882 (license license:isc)))
23883
23884 (define-public python-crayons
23885 (package
23886 (name "python-crayons")
23887 (version "0.4.0")
23888 (source
23889 (origin
23890 (method url-fetch)
23891 (uri (pypi-uri "crayons" version))
23892 (sha256
23893 (base32
23894 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
23895 (build-system python-build-system)
23896 (propagated-inputs
23897 `(("python-colorama" ,python-colorama)))
23898 (home-page "https://github.com/MasterOdin/crayons")
23899 (synopsis "TextUI colors for Python")
23900 (description "This package gives you colored strings for the terminal.
23901 Crayons automatically wraps a given string in the foreground color and
23902 restores the original state after the string is printed.")
23903 (license license:expat)))
23904
23905 (define-public python-sane
23906 (package
23907 (name "python-sane")
23908 (version "2.9.1")
23909 (source
23910 (origin
23911 (method url-fetch)
23912 (uri (pypi-uri name version))
23913 (sha256
23914 (base32
23915 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
23916 (build-system python-build-system)
23917 (native-inputs
23918 `(("python-pytest" ,python-pytest)))
23919 (inputs
23920 `(("sane-backends" ,sane-backends)))
23921 (home-page "https://github.com/python-pillow/Sane")
23922 (synopsis "Python interface to the SANE scanner")
23923 (description "This package provides Python interface to the SANE scanner
23924 and frame grabber interface.")
23925 (license (license:non-copyleft
23926 ;; Yet another variant of the X/MIT license.
23927 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
23928
23929 (define-public python-screenkey
23930 (package
23931 (name "python-screenkey")
23932 (version "1.4")
23933 (source
23934 (origin
23935 (method git-fetch)
23936 (uri (git-reference
23937 (url "https://gitlab.com/screenkey/screenkey")
23938 (commit (string-append "v" version))))
23939 (file-name (git-file-name name version))
23940 (sha256
23941 (base32
23942 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
23943 (build-system python-build-system)
23944 (arguments
23945 `(#:phases
23946 (modify-phases %standard-phases
23947 (add-after 'unpack 'fix-dlopen-paths
23948 (lambda* (#:key inputs outputs #:allow-other-keys)
23949 (let* ((x11 (assoc-ref inputs "libx11"))
23950 (xtst (assoc-ref inputs "libxtst")))
23951 (substitute* "Screenkey/xlib.py"
23952 (("libX11.so.6")
23953 (string-append x11 "/lib/libX11.so.6")))
23954 (substitute* "Screenkey/xlib.py"
23955 (("libXtst.so.6")
23956 (string-append xtst "/lib/libXtst.so.6")))
23957 #t)))
23958 (add-after 'install 'wrap-screenkey
23959 (lambda* (#:key outputs #:allow-other-keys)
23960 (wrap-program
23961 (string-append (assoc-ref outputs "out") "/bin/screenkey")
23962 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
23963 `("GI_TYPELIB_PATH"
23964 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
23965 #t)))))
23966 (inputs
23967 `(("python-distutils-extra" ,python-distutils-extra)
23968 ("python-tokenize-rt" ,python-tokenize-rt)
23969 ("libx11" ,libx11)
23970 ("libxtst" ,libxtst)
23971 ("gtk+" ,gtk+)
23972 ("python-pygobject" ,python-pygobject)
23973 ("python-pycairo" ,python-pycairo)
23974 ("python-setuptools-git" ,python-setuptools-git)
23975 ("python-babel" ,python-babel)))
23976 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
23977 (synopsis
23978 "Screencast tool to display pressed keys")
23979 (description
23980 "A screencast tool to display your keys inspired by Screenflick.")
23981 (license license:gpl3+)))
23982
23983 (define-public python-jinja2-cli
23984 (package
23985 (name "python-jinja2-cli")
23986 (version "0.7.0")
23987 (source
23988 (origin
23989 (method url-fetch)
23990 (uri (pypi-uri "jinja2-cli" version))
23991 (sha256
23992 (base32
23993 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
23994 (build-system python-build-system)
23995 (propagated-inputs
23996 `(("python-jinja2" ,python-jinja2)))
23997 (native-inputs
23998 `(("python-flake8" ,python-flake8)
23999 ("python-jinja2" ,python-jinja2)
24000 ("python-pytest" ,python-pytest)))
24001 (home-page "https://github.com/mattrobenolt/jinja2-cli")
24002 (synopsis "Command-line interface to Jinja2")
24003 (description
24004 "This package provides a command-line interface (CLI) to the Jinja2
24005 template engine.")
24006 (license license:bsd-3)))
24007
24008 (define-public python-readability
24009 (package
24010 (name "python-readability")
24011 (version "0.3.1")
24012 (source
24013 (origin
24014 (method url-fetch)
24015 (uri (pypi-uri "readability" version))
24016 (sha256
24017 (base32
24018 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
24019 (build-system python-build-system)
24020 (home-page
24021 "https://github.com/andreasvc/readability/")
24022 (synopsis
24023 "Measure the readability of a given text using surface
24024 characteristics")
24025 (description
24026 "This package provides a Python library that is an implementation of
24027 traditional readability measures based on simple surface
24028 characteristics. These measures are basically linear regressions based on the
24029 number of words, syllables, and sentences.")
24030 (license license:asl2.0)))
24031
24032 (define-public python-listparser
24033 (package
24034 (name "python-listparser")
24035 (version "0.18")
24036 (source
24037 (origin
24038 (method url-fetch)
24039 (uri (pypi-uri "listparser" version))
24040 (sha256
24041 (base32
24042 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
24043 (build-system python-build-system)
24044 (home-page
24045 "https://github.com/kurtmckee/listparser")
24046 (synopsis
24047 "Parse subscription lists in Python")
24048 (description
24049 "This package provides a Python library that can parse OPML, FOAF, and
24050 iGoogle subscription lists.")
24051 (license license:expat)))