gnu: ansible: Update to 2.9.6.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
ae8db9ce 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
fa8ffaa0 4;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
44d10b1f
RW
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>
02422b3b 10;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
44d10b1f
RW
11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
b742c006 14;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
44d10b1f
RW
15;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
11e46326 17;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
44d10b1f
RW
18;;; Copyright © 2015, 2017 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>
58363ee5 22;;; Copyright © 2016, 2018, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
44d10b1f
RW
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>
47956fa0 26;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
44d10b1f
RW
27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28;;; Copyright © 2016 David Craven <david@craven.ch>
fd5c264a 29;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
44d10b1f 30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
e746d1c3 31;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
44d10b1f 32;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
7261bdca 33;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller <julien@lepiller.eu>
783d1d40 34;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
44d10b1f
RW
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>
a0b2accf 40;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
44d10b1f
RW
41;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
42;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
e2ebbbcc 43;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44d10b1f
RW
44;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
45;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
dcfa0acd 46;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
44d10b1f
RW
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>
a2548a3b 53;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
44d10b1f 54;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
85cfb0e9 55;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
bd137055 56;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
44d10b1f
RW
57;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
58;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
046dd621 59;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
a91f4eba 60;;; Copyright © 2019 Sam <smbaines8@gmail.com>
8c141421 61;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
f825e605 62;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
fb236fdd 63;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
edeb04bf 64;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
e308b4f0 65;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
30e7c03a 66;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
c1bbef69 67;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
ba42a6bf 68;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
dbcef44a 69;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
479f4013 70;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
da8ca4c3 71;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
244a527d 72;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
44d10b1f
RW
73;;;
74;;; This file is part of GNU Guix.
75;;;
76;;; GNU Guix is free software; you can redistribute it and/or modify it
77;;; under the terms of the GNU General Public License as published by
78;;; the Free Software Foundation; either version 3 of the License, or (at
79;;; your option) any later version.
80;;;
81;;; GNU Guix is distributed in the hope that it will be useful, but
82;;; WITHOUT ANY WARRANTY; without even the implied warranty of
83;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84;;; GNU General Public License for more details.
85;;;
86;;; You should have received a copy of the GNU General Public License
87;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
88
89(define-module (gnu packages python-xyz)
90 #:use-module ((guix licenses) #:prefix license:)
91 #:use-module (gnu packages)
92 #:use-module (gnu packages algebra)
93 #:use-module (gnu packages adns)
94 #:use-module (gnu packages attr)
95 #:use-module (gnu packages backup)
96 #:use-module (gnu packages bash)
97 #:use-module (gnu packages check)
98 #:use-module (gnu packages compression)
99 #:use-module (gnu packages crypto)
100 #:use-module (gnu packages databases)
f825e605 101 #:use-module (gnu packages dbm)
2cbede59 102 #:use-module (gnu packages enchant)
44d10b1f
RW
103 #:use-module (gnu packages file)
104 #:use-module (gnu packages fontutils)
105 #:use-module (gnu packages gcc)
106 #:use-module (gnu packages geo)
107 #:use-module (gnu packages ghostscript)
108 #:use-module (gnu packages gl)
109 #:use-module (gnu packages glib)
e2ebbbcc 110 #:use-module (gnu packages gnome)
44d10b1f
RW
111 #:use-module (gnu packages graphviz)
112 #:use-module (gnu packages graphics)
113 #:use-module (gnu packages gstreamer)
114 #:use-module (gnu packages gtk)
115 #:use-module (gnu packages icu4c)
116 #:use-module (gnu packages image)
117 #:use-module (gnu packages imagemagick)
72c2478a 118 #:use-module (gnu packages kerberos)
44d10b1f
RW
119 #:use-module (gnu packages libevent)
120 #:use-module (gnu packages libffi)
121 #:use-module (gnu packages linux)
122 #:use-module (gnu packages llvm)
123 #:use-module (gnu packages man)
124 #:use-module (gnu packages maths)
42f0b0c2 125 #:use-module (gnu packages monitoring)
44d10b1f
RW
126 #:use-module (gnu packages multiprecision)
127 #:use-module (gnu packages networking)
128 #:use-module (gnu packages ncurses)
129 #:use-module (gnu packages openstack)
130 #:use-module (gnu packages pcre)
131 #:use-module (gnu packages perl)
a5e76112 132 #:use-module (gnu packages photo)
44d10b1f
RW
133 #:use-module (gnu packages pkg-config)
134 #:use-module (gnu packages python)
d362b11d 135 #:use-module (gnu packages python-check)
15b65617 136 #:use-module (gnu packages python-compression)
44d10b1f 137 #:use-module (gnu packages python-crypto)
ca7c3653 138 #:use-module (gnu packages python-science)
44d10b1f
RW
139 #:use-module (gnu packages python-web)
140 #:use-module (gnu packages qt)
141 #:use-module (gnu packages readline)
142 #:use-module (gnu packages sdl)
143 #:use-module (gnu packages search)
144 #:use-module (gnu packages shells)
9d0c291e 145 #:use-module (gnu packages sphinx)
44d10b1f
RW
146 #:use-module (gnu packages ssh)
147 #:use-module (gnu packages terminals)
148 #:use-module (gnu packages tex)
149 #:use-module (gnu packages texinfo)
150 #:use-module (gnu packages time)
151 #:use-module (gnu packages tls)
152 #:use-module (gnu packages version-control)
153 #:use-module (gnu packages video)
154 #:use-module (gnu packages web)
155 #:use-module (gnu packages base)
156 #:use-module (gnu packages xml)
157 #:use-module (gnu packages xorg)
158 #:use-module (gnu packages xdisorg)
159 #:use-module (gnu packages tcl)
160 #:use-module (gnu packages bdw-gc)
f98232a3 161 #:use-module (gnu packages serialization)
44d10b1f
RW
162 #:use-module (guix packages)
163 #:use-module (guix download)
164 #:use-module (guix git-download)
a042d348 165 #:use-module (guix hg-download)
44d10b1f
RW
166 #:use-module (guix utils)
167 #:use-module (guix build-system gnu)
168 #:use-module (guix build-system cmake)
169 #:use-module (guix build-system python)
170 #:use-module (guix build-system trivial)
171 #:use-module (srfi srfi-1)
172 #:use-module (srfi srfi-26))
173
2f12e660
SS
174(define-public python-tenacity
175 (package
176 (name "python-tenacity")
177 (version "6.1.0")
178 (source (origin
179 (method url-fetch)
180 (uri (pypi-uri "tenacity" version))
181 (sha256
182 (base32
183 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
184 (build-system python-build-system)
185 (native-inputs
186 `(("python-setuptools-scm" ,python-setuptools-scm)
187 ("python-sphinx" ,python-sphinx)
188 ("python-tornado" ,python-tornado)
189 ("python-pytest" ,python-pytest)))
190 (propagated-inputs
191 `(("python-six" ,python-six)))
192 (arguments
193 `(#:phases (modify-phases %standard-phases
194 (replace 'check
195 (lambda _
196 (invoke "pytest")
197 #t)))))
198 (home-page "https://github.com/jd/tenacity")
199 (synopsis "Retrying library for python")
200 (description "Tenacity is a general-purpose python library to simplify the
201task of adding retry behavior to just about anything.")
202 (license license:asl2.0)))
203
dcf95329
SS
204(define-public python-colorlog
205 (package
206 (name "python-colorlog")
207 (version "4.1.0")
208 (source (origin
209 (method url-fetch)
210 (uri (pypi-uri "colorlog" version))
211 (sha256
212 (base32
213 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
214 (build-system python-build-system)
215 (native-inputs
216 `(("python-pytest" ,python-pytest)))
217 (arguments
218 `(#:phases (modify-phases %standard-phases
219 (replace 'check
220 (lambda _
221 ;; Extend PYTHONPATH so the built package will be found.
222 (setenv "PYTHONPATH"
223 (string-append (getcwd) "/build/lib:"
224 (getenv "PYTHONPATH")))
225 (invoke "pytest" "-p" "no:logging")
226 #t)))))
227 (home-page "https://github.com/borntyping/python-colorlog")
228 (synopsis "Log formatting with colors for python")
229 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
230with Python's logging module that outputs records using terminal colors.")
231 (license license:expat)))
232
23fde56b
SS
233(define-public python-pyprind
234 (package
235 (name "python-pyprind")
236 (version "2.11.2")
237 (source (origin
238 (method url-fetch)
239 (uri (pypi-uri "PyPrind" version))
240 (sha256
241 (base32
242 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
243 (build-system python-build-system)
244 (propagated-inputs
245 `(("python-psutil" ,python-psutil)))
246 (home-page "https://github.com/rasbt/pyprind")
247 (synopsis "Python Progress Bar and Percent Indicator Utility")
248 (description "The PyPrind (Python Progress Indicator) module provides a
249progress bar and a percentage indicator object that let you track the progress
250of a loop structure or other iterative computation.")
251 (license license:bsd-3)))
252
f3465dee
SS
253(define-public python-gphoto2
254 (package
255 (name "python-gphoto2")
256 (version "2.2.1")
257 (source (origin
258 (method url-fetch)
259 (uri (pypi-uri "gphoto2" version))
260 (sha256
261 (base32
262 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
263 (build-system python-build-system)
264 (native-inputs
265 `(("pkg-config" ,pkg-config)))
266 (inputs
267 `(("libgphoto2" ,libgphoto2)))
268 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
269 (synopsis "Python interface to libgphoto2")
270 (description "@code{python-gphoto2} is a comprehensive Python interface
271(or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
272automatically generate the interface code.")
273 (license license:gpl3+)))
274
2763f0de
SS
275(define-public python-colour
276 (package
277 (name "python-colour")
278 (version "0.1.5")
279 (source (origin
280 (method url-fetch)
281 (uri (pypi-uri "colour" version))
282 (sha256
283 (base32
284 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
285 (build-system python-build-system)
286 (native-inputs
287 `(("python-d2to1" ,python-d2to1)))
288 (home-page "https://github.com/vaab/colour")
289 (synopsis "Convert and manipulate various color representations")
290 (description "Pythonic way to manipulate color representations (HSL, RVB,
291web, X11, ...).")
292 (license license:expat)))
293
5164a92e
SS
294(define-public python-d2to1
295 (package
296 (name "python-d2to1")
297 (version "0.2.12.post1")
298 (source (origin
299 (method url-fetch)
300 (uri (pypi-uri "d2to1" version))
301 (sha256
302 (base32
303 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
304 (build-system python-build-system)
305 (native-inputs
306 `(("python-nose" ,python-nose)))
307 (home-page "https://github.com/embray/d2to1")
308 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
309in python")
310 (description "The python package d2to1 (the d is for distutils) allows
311using distutils2-like setup.cfg files for a package's metadata with a
312distribute/setuptools setup.py script.")
313 (license license:bsd-2)))
314
a5e76112
SS
315(define-public python-rawkit
316 (package
317 (name "python-rawkit")
318 (version "0.6.0")
319 (source (origin
320 (method url-fetch)
321 (uri (pypi-uri "rawkit" version))
322 (sha256
323 (base32
324 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
325 (build-system python-build-system)
326 (native-inputs
327 `(("python-pytest" ,python-pytest)
328 ("python-mock" ,python-mock)))
329 (inputs
330 `(("libraw" ,libraw)))
331 (home-page "https://rawkit.readthedocs.io")
332 (synopsis "Ctypes-based LibRaw binding for Python")
333 (description "The rawkit package provides two modules: rawkit and libraw.
334The rawkit module provides a high-level Pythonic interface for developing raw
335photos, while the libraw module provides a CTypes based interface for
336interacting with the low-level LibRaw C APIs.")
337 (license license:expat)))
338
1b9c1fdb
SS
339(define-public python-easygui
340 (package
341 (name "python-easygui")
342 (version "0.98.1")
343 (source (origin
344 (method url-fetch)
345 (uri (pypi-uri "easygui" version))
346 (sha256
347 (base32
348 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
349 (build-system python-build-system)
350 (propagated-inputs
351 `(("python-tkinter" ,python "tk")))
352 (home-page "https://github.com/robertlugg/easygui")
353 (synopsis "GUI programming module for Python")
354 (description "EasyGUI is a module for very simple, very easy GUI
355programming in Python. EasyGUI is different from other GUI generators in that
356EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
357simple function calls.")
358 (license license:bsd-3)))
359
244a527d
SS
360(define-public python-pymediainfo
361 (package
362 (name "python-pymediainfo")
363 (version "4.1")
364 (source
365 (origin
366 (method url-fetch)
367 (uri (pypi-uri "pymediainfo" version))
368 (sha256
369 (base32
370 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
371 (build-system python-build-system)
372 (native-inputs
373 `(("python-setuptools-scm" ,python-setuptools-scm)
374 ("python-pytest" ,python-pytest)))
375 (inputs
376 `(("libmediainfo" ,libmediainfo)))
377 (arguments
378 `(#:phases
379 (modify-phases %standard-phases
380 (add-after 'unpack 'patch-libmediainfo
381 (lambda _
382 (substitute* "pymediainfo/__init__.py"
383 (("libmediainfo.so.0")
384 (string-append (assoc-ref %build-inputs "libmediainfo")
385 "/lib/libmediainfo.so.0")))
386 #t))
387 (replace 'check
388 (lambda _
389 ;; Extend PYTHONPATH so the built package will be found.
390 (setenv "PYTHONPATH"
391 (string-append (getcwd) "/build/lib:"
392 (getenv "PYTHONPATH")))
393 ;; Skip the only failing test "test_parse_url"
394 (invoke "pytest" "-vv" "-k" "not test_parse_url")
395 #t)))))
396 (home-page
397 "https://github.com/sbraz/pymediainfo")
398 (synopsis
399 "Python wrapper for the mediainfo library")
400 (description
401 "Python wrapper for the mediainfo library to access the technical and tag
402data for video and audio files.")
403 (license license:expat)))
404
44d10b1f
RW
405(define-public python-psutil
406 (package
407 (name "python-psutil")
e9119ac1 408 (version "5.6.5")
44d10b1f
RW
409 (source
410 (origin
411 (method url-fetch)
412 (uri (pypi-uri "psutil" version))
413 (sha256
e9119ac1 414 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
44d10b1f
RW
415 (build-system python-build-system)
416 (arguments
417 ;; FIXME: some tests does not return and times out.
418 '(#:tests? #f))
419 (home-page "https://www.github.com/giampaolo/psutil")
420 (synopsis "Library for retrieving information on running processes")
421 (description
422 "psutil (Python system and process utilities) is a library for retrieving
423information on running processes and system utilization (CPU, memory, disks,
424network) in Python. It is useful mainly for system monitoring, profiling and
425limiting process resources and management of running processes. It implements
426many functionalities offered by command line tools such as: ps, top, lsof,
427netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
428pidof, tty, taskset, pmap.")
429 (properties `((python2-variant . ,(delay python2-psutil))))
430 (license license:bsd-3)))
431
432(define-public python2-psutil
433 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
434 (package
435 (inherit base)
436 (propagated-inputs
437 `(("python2-enum34" ,python2-enum34) ;optional
438 ,@(package-propagated-inputs base))))))
439
440(define-public python-shapely
441 (package
442 (name "python-shapely")
6d94465b 443 (version "1.6.4.post2")
44d10b1f
RW
444 (source
445 (origin
446 (method url-fetch)
447 (uri (pypi-uri "Shapely" version))
448 (sha256
449 (base32
6d94465b 450 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
451 (build-system python-build-system)
452 (native-inputs
453 `(("python-cython" ,python-cython)
454 ("python-matplotlib" ,python-matplotlib)
455 ("python-pytest" ,python-pytest)
456 ("python-pytest-cov" ,python-pytest-cov)))
457 (inputs
458 `(("geos" ,geos)))
459 (propagated-inputs
460 `(("python-numpy" ,python-numpy)))
461 (arguments
462 `(#:phases
463 (modify-phases %standard-phases
464 (add-after 'unpack 'patch-geos-path
465 (lambda* (#:key inputs #:allow-other-keys)
466 (let ((geos (assoc-ref inputs "geos"))
467 (glibc (assoc-ref inputs ,(if (%current-target-system)
468 "cross-libc" "libc"))))
469 (substitute* "shapely/geos.py"
470 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
471 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
472 geos "/lib/libgeos_c.so'])"))
473 (("free = load_dll\\('c'\\)\\.free")
474 (string-append "free = load_dll('c', fallbacks=['"
475 glibc "/lib/libc.so.6']).free"))))
476 #t)))))
477 (home-page "https://github.com/Toblerity/Shapely")
478 (synopsis "Library for the manipulation and analysis of geometric objects")
479 (description "Shapely is a Python package for manipulation and analysis of
480planar geometric objects. It is based on the @code{GEOS} library.")
481 (license license:bsd-3)))
482
a91f4eba
S
483(define-public python-shortuuid
484 (package
485 (name "python-shortuuid")
486 (version "0.5.0")
487 (source
488 (origin
489 (method url-fetch)
490 (uri (pypi-uri "shortuuid" version))
491 (sha256
492 (base32
493 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
494 (build-system python-build-system)
495 (native-inputs
496 `(("python-pep8" ,python-pep8)))
497 (home-page "https://github.com/skorokithakis/shortuuid")
498 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
499 (description
500 "@code{shortuuid} is a Python library for generating concise, unambiguous
501and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
502module and then similar looking characters are removed.")
503 (license license:bsd-3)))
504
44d10b1f
RW
505(define-public python-logwrap
506 (package
507 (name "python-logwrap")
508 (version "3.2.1")
509 (source
510 (origin
511 (method url-fetch)
512 (uri (pypi-uri "logwrap" version ".zip"))
513 (sha256
514 (base32
515 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
516 (build-system python-build-system)
517 (propagated-inputs
518 `(("python-six" ,python-six)
519 ("python-typing" ,python-typing)))
520 (native-inputs
521 `(("unzip" ,unzip)
522 ("python-cython" ,python-cython)
523 ("python-pytest" ,python-pytest)
524 ("python-pytest-cov" ,python-pytest-cov)
525 ("python-pytest-runner" ,python-pytest-runner)))
526 (home-page "https://github.com/penguinolog/logwrap")
527 (synopsis "Decorator for logging function arguments")
528 (description "This package provides a decorator to log function arguments
529and function call return values in a human-readable way.")
530 (license license:asl2.0)))
531
532(define-public python2-shapely
533 (package-with-python2 python-shapely))
534
535(define-public python-clyent
536 (package
537 (name "python-clyent")
538 (version "1.2.1")
539 (source
540 (origin
541 (method url-fetch)
542 (uri (pypi-uri "clyent" version))
543 (sha256
544 (base32
545 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
546 (build-system python-build-system)
547 (native-inputs
548 `(("python-mock" ,python-mock)))
549 (home-page "https://github.com/binstar/clyent")
550 (synopsis "Command line client library")
551 (description "Clyent is a Python command line utiliy library. It is used
552by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
553 (license license:bsd-3)))
554
555(define-public python2-clyent
556 (package-with-python2 python-clyent))
557
558(define-public python-babel
559 (package
560 (name "python-babel")
dab3c841 561 (version "2.8.0")
44d10b1f
RW
562 (source
563 (origin
564 (method url-fetch)
565 (uri (pypi-uri "Babel" version))
566 (sha256
567 (base32
dab3c841 568 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
44d10b1f
RW
569 (build-system python-build-system)
570 (native-inputs
571 `(("python-freezegun" ,python-freezegun)
572 ("python-pytest" ,python-pytest)))
573 (propagated-inputs
574 `(("python-pytz" ,python-pytz)))
575 (arguments
576 `(#:phases (modify-phases %standard-phases
577 (replace 'check
8acd1e90
MB
578 (lambda _
579 (invoke "pytest" "-vv" "-k"
580 (string-append
581 ;; XXX: These tests fail when using Pytest 4.x and
582 ;; Babel 2.6.0. Try removing this for later versions.
583 "not test_no_inherit_metazone_marker_never_in_output"
584 " and not test_smoke_dates"
585 " and not test_smoke_numbers")))))))
44d10b1f
RW
586 (home-page "http://babel.pocoo.org/")
587 (synopsis
588 "Tools for internationalizing Python applications")
589 (description
590 "Babel is composed of two major parts:
591- tools to build and work with gettext message catalogs
592- a Python interface to the CLDR (Common Locale Data Repository), providing
593access to various locale display names, localized number and date formatting,
594etc. ")
595 (license license:bsd-3)))
596
597(define-public python2-babel
598 (package-with-python2 python-babel))
599
93253411
MB
600;; Sphinx < 2.0 requires this version. Remove once no longer needed.
601(define-public python2-babel-2.6
602 (package
603 (inherit python2-babel)
604 (version "2.6.0")
605 (source (origin
606 (method url-fetch)
607 (uri (pypi-uri "Babel" version))
608 (sha256
609 (base32
610 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
611
44d10b1f
RW
612(define-public python2-backport-ssl-match-hostname
613 (package
614 (name "python2-backport-ssl-match-hostname")
615 (version "3.5.0.1")
616 (source
617 (origin
618 (method url-fetch)
2c1f0d09 619 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
620 (sha256
621 (base32
622 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
623 (build-system python-build-system)
624 (arguments
625 `(#:python ,python-2
626 #:tests? #f)) ; no test target
627 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
628 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
629 (description
630 "This backport brings the ssl.match_hostname() function to users of
631earlier versions of Python. The function checks the hostname in the
632certificate returned by the server to which a connection has been established,
633and verifies that it matches the intended target hostname.")
634 (license license:psfl)))
635
dc827867
TGR
636(define-public python-boolean.py
637 (package
638 (name "python-boolean.py")
639 (version "3.6")
640 (source
641 (origin
642 ;; There's no source tarball on PyPI.
643 (method git-fetch)
644 (uri (git-reference
645 (url "https://github.com/bastikr/boolean.py")
646 (commit (string-append "v" version))))
647 (file-name (git-file-name name version))
648 (sha256
649 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
650 (build-system python-build-system)
651 (home-page "https://github.com/bastikr/boolean.py")
652 (synopsis "Boolean algebra in one Python module")
653 (description
654 "This is a small Python library that implements boolean algebra.
655It defines two base elements, @code{TRUE} and @code{FALSE}, and a
656@code{Symbol} class that can take on one of these two values. Calculations
657are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
658compositions like @code{XOR} and @code{NAND} are emulated on top of them.
659Expressions are constructed from parsed strings or directly in Python.")
660 (license license:bsd-2)))
661
44d10b1f
RW
662(define-public python-hdf4
663 (package
664 (name "python-hdf4")
665 (version "0.9")
666 (source
667 (origin
668 (method url-fetch)
669 (uri (pypi-uri name version))
670 (sha256
671 (base32
672 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
673 (build-system python-build-system)
674 (native-inputs `(("nose" ,python-nose)))
675 (propagated-inputs `(("numpy" ,python-numpy)))
676 (inputs
677 `(("hdf4" ,hdf4)
678 ("libjpeg" ,libjpeg)
679 ("zlib" ,zlib)))
680 (arguments
681 `(#:phases
682 (modify-phases %standard-phases
683 (replace 'check
684 (lambda _
685 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
686 ;; on to import numpy. Somehow this works on their CI system.
687 ;; Let's just manage PYTHONPATH here instead.
688 (substitute* "runexamples.sh"
689 (("export PYTHONPATH=.*") ""))
690 (setenv "PYTHONPATH"
691 (string-append (getcwd) ":"
692 (getenv "PYTHONPATH")))
693 (invoke "./runexamples.sh")
694 (invoke "nosetests" "-v"))))))
695 (home-page "https://github.com/fhs/python-hdf4")
696 (synopsis "Python interface to the NCSA HDF4 library")
697 (description
698 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
699which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
700NetCDF files can also be read and modified. Python-HDF4 is a fork of
701@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
702 (license license:expat)))
703
704(define-public python2-hdf4
705 (package-with-python2 python-hdf4))
706
707(define-public python-h5py
708 (package
709 (name "python-h5py")
24ce6421 710 (version "2.10.0")
44d10b1f
RW
711 (source
712 (origin
713 (method url-fetch)
714 (uri (pypi-uri "h5py" version))
715 (sha256
716 (base32
24ce6421 717 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
44d10b1f
RW
718 (build-system python-build-system)
719 (arguments
720 `(#:tests? #f ; no test target
721 #:phases
722 (modify-phases %standard-phases
723 (add-after 'unpack 'fix-hdf5-paths
724 (lambda* (#:key inputs #:allow-other-keys)
725 (let ((prefix (assoc-ref inputs "hdf5")))
726 (substitute* "setup_build.py"
727 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
728 (string-append "['" prefix "/lib" "']"))
729 (("'/opt/local/include', '/usr/local/include'")
730 (string-append "'" prefix "/include" "'")))
731 (substitute* "setup_configure.py"
732 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
733 (string-append "['" prefix "/lib" "']")))
734 #t))))))
735 (propagated-inputs
736 `(("python-six" ,python-six)
737 ("python-numpy" ,python-numpy)))
738 (inputs
24ce6421 739 `(("hdf5" ,hdf5-1.10)))
44d10b1f
RW
740 (native-inputs
741 `(("python-cython" ,python-cython)
24ce6421
RW
742 ("python-pkgconfig" ,python-pkgconfig)
743 ("pkg-config" ,pkg-config)))
efc0a587 744 (home-page "https://www.h5py.org/")
44d10b1f
RW
745 (synopsis "Read and write HDF5 files from Python")
746 (description
747 "The h5py package provides both a high- and low-level interface to the
748HDF5 library from Python. The low-level interface is intended to be a
749complete wrapping of the HDF5 API, while the high-level component supports
750access to HDF5 files, datasets and groups using established Python and NumPy
751concepts.")
752 (license license:bsd-3)))
753
754(define-public python2-h5py
755 (package-with-python2 python-h5py))
756
8b89dedc
RW
757(define-public python-sh
758 (package
759 (name "python-sh")
760 (version "1.12.14")
761 (source
762 (origin
763 (method url-fetch)
764 (uri (pypi-uri "sh" version))
765 (sha256
766 (base32
767 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
768 (build-system python-build-system)
fd3638d8
EF
769 (arguments
770 '(#:phases
771 (modify-phases %standard-phases
772 (replace 'check
773 (lambda _
ca983a2f
NG
774 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
775 (setenv "HOME" "/tmp")
fd3638d8
EF
776 (invoke "python" "sh.py" "test"))))))
777 (native-inputs
778 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
779 (home-page "https://github.com/amoffat/sh")
780 (synopsis "Python subprocess replacement")
781 (description "This package provides a replacement for Python's
782@code{subprocess} feature.")
783 (license license:expat)))
784
3869effd
RW
785(define-public python2-sh
786 (package-with-python2 python-sh))
787
d362b11d
RW
788(define-public python-cftime
789 (package
790 (name "python-cftime")
da107cf5 791 (version "1.0.4.2")
d362b11d
RW
792 (source
793 (origin
794 (method url-fetch)
795 (uri (pypi-uri "cftime" version))
796 (sha256
da107cf5 797 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
d362b11d
RW
798 (build-system python-build-system)
799 (propagated-inputs
800 `(("python-numpy" ,python-numpy)))
801 (native-inputs
802 `(("python-coveralls" ,python-coveralls)
803 ("python-cython" ,python-cython)
804 ("python-pytest-cov" ,python-pytest-cov)))
805 (home-page "https://github.com/Unidata/cftime")
806 (synopsis "Library for time handling")
807 (description
808 "This package provides time-handling functionality that used to be part
809of the netcdf4 package before.")
810 ;; This package claims to include code under the GPLv3 but is released
811 ;; under ISC.
812 (license (list license:isc license:gpl3+))))
813
44d10b1f
RW
814(define-public python-netcdf4
815 (package
816 (name "python-netcdf4")
93e7b209 817 (version "1.4.2")
44d10b1f
RW
818 (source
819 (origin
820 (method url-fetch)
821 (uri (pypi-uri "netCDF4" version))
822 (sha256
823 (base32
93e7b209 824 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 825 (build-system python-build-system)
93e7b209
RW
826 (arguments
827 '(#:phases
828 (modify-phases %standard-phases
829 (add-after 'unpack 'configure-locations
830 (lambda* (#:key inputs #:allow-other-keys)
831 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
832 #t)))))
44d10b1f
RW
833 (native-inputs
834 `(("python-cython" ,python-cython)))
835 (propagated-inputs
93e7b209
RW
836 `(("python-numpy" ,python-numpy)
837 ("python-cftime" ,python-cftime)))
44d10b1f
RW
838 (inputs
839 `(("netcdf" ,netcdf)
840 ("hdf4" ,hdf4)
841 ("hdf5" ,hdf5)))
93e7b209 842 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
843 (synopsis "Python/numpy interface to the netCDF library")
844 (description "Netcdf4-python is a Python interface to the netCDF C
845library. netCDF version 4 has many features not found in earlier
846versions of the library and is implemented on top of HDF5. This module
847can read and write files in both the new netCDF 4 and the old netCDF 3
848format, and can create files that are readable by HDF5 clients. The
849API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
850to users of that module.")
851 ;; The software is mainly ISC, but includes some files covered
852 ;; by the Expat license.
853 (license (list license:isc license:expat))))
854
855(define-public python2-netcdf4
856 (package-with-python2 python-netcdf4))
857
d6803445
TGR
858(define-public python-license-expression
859 (package
860 (name "python-license-expression")
861 (version "0.999")
862 (source
863 (origin
864 (method url-fetch)
865 (uri (pypi-uri "license-expression" version))
866 (sha256
867 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
868 (build-system python-build-system)
869 (propagated-inputs
870 `(("python-boolean.py" ,python-boolean.py)))
871 (home-page "https://github.com/nexB/license-expression")
872 (synopsis "Apply boolean logic to license expressions")
873 (description
874 "This Python module defines a tiny language to evaluate and compare
875license expressions using boolean logic. Logical combinations of licenses can
876be tested for equality, containment, and equivalence. They can be normalised
877and simplified. It supports SPDX license expressions as well as other naming
878conventions and aliases in the same expression.")
879 (license license:gpl2+)))
880
44d10b1f
RW
881(define-public python-lockfile
882 (package
883 (name "python-lockfile")
884 (version "0.12.2")
885 (source
886 (origin
887 (method url-fetch)
8318bf07 888 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
889 (sha256
890 (base32
891 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
892 (build-system python-build-system)
893 (arguments '(#:test-target "check"))
894 (native-inputs
895 `(("python-pbr" ,python-pbr)))
896 (home-page "https://launchpad.net/pylockfile")
897 (synopsis "Platform-independent file locking module")
898 (description
899 "The lockfile package exports a LockFile class which provides a simple
900API for locking files.")
901 (license license:expat)))
902
903(define-public python2-lockfile
904 (package-with-python2 python-lockfile))
905
6e792089
JK
906(define-public python-filelock
907 (package
908 (name "python-filelock")
909 (version "3.0.12")
910 (source
911 (origin
912 (method url-fetch)
913 (uri (pypi-uri "filelock" version))
914 (sha256
915 (base32
916 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
917 (build-system python-build-system)
918 (home-page
919 "https://github.com/benediktschmitt/py-filelock")
920 (synopsis "Platform independent file lock")
921 (description "@code{filelock} contains a single module implementing
922a platform independent file lock in Python, which provides a simple way of
923inter-process communication.")
924 (license license:unlicense)))
925
44d10b1f
RW
926(define-public python-semantic-version
927 (package
928 (name "python-semantic-version")
929 (version "2.6.0")
930 (source
931 (origin
932 (method url-fetch)
933 (uri (pypi-uri "semantic_version" version))
934 (sha256
935 (base32
936 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
937 (build-system python-build-system)
938 (arguments
939 `(#:tests? #f)) ; PyPI tarball lacks tests
940 (home-page "https://github.com/rbarrois/python-semanticversion")
941 (synopsis "Semantic versioning module for Python")
942 (description
943 "The @code{semantic_version} class is a small library for handling
944@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
945
946It can compare versions, generate a new version that represents a bump in one of
947the version levels, and check whether any given string is a proper semantic
948version identifier.")
949 (license license:bsd-3)))
950
951(define-public python2-semantic-version
952 (package-with-python2 python-semantic-version))
953
954(define-public python-serpent
955 (package
956 (name "python-serpent")
fa9d14ac 957 (version "1.28")
44d10b1f
RW
958 (source
959 (origin
960 (method url-fetch)
961 (uri (pypi-uri "serpent" version))
962 (sha256
fa9d14ac 963 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 964 (build-system python-build-system)
fa9d14ac
TGR
965 (native-inputs
966 `(("python-attrs" ,python-attrs)
967 ("python-pytz" ,python-pytz)))
44d10b1f
RW
968 (home-page "https://github.com/irmen/Serpent")
969 (synopsis "Serializer for literal Python expressions")
970 (description
1d3c7803
TGR
971 "Serpent provides @code{ast.literal_eval()}-compatible object tree
972serialization. It serializes an object tree into bytes (an utf-8 encoded
973string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
974to rebuild the original object tree.
975
976Because only safe literals are encoded, it is safe to send serpent data to
977other machines, such as over the network.")
44d10b1f
RW
978 (license license:expat)))
979
980(define-public python-setuptools
981 (package
982 (name "python-setuptools")
e39d4933 983 (version "41.0.1")
44d10b1f
RW
984 (source
985 (origin
986 (method url-fetch)
987 (uri (pypi-uri "setuptools" version ".zip"))
988 (sha256
989 (base32
e39d4933 990 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
991 (modules '((guix build utils)))
992 (snippet
993 '(begin
994 ;; Remove included binaries which are used to build self-extracting
995 ;; installers for Windows.
996 ;; TODO: Find some way to build them ourself so we can include them.
997 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
998 #t))))
999 (build-system python-build-system)
1000 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1001 ;; One could bootstrap with an internal untested setuptools.
1002 (arguments
1003 `(#:tests? #f))
e85af137 1004 (home-page "https://pypi.org/project/setuptools/")
44d10b1f
RW
1005 (synopsis
1006 "Library designed to facilitate packaging Python projects")
1007 (description
1008 "Setuptools is a fully-featured, stable library designed to facilitate
1009packaging Python projects, where packaging includes:
1010Python package and module definitions,
1011distribution package metadata,
1012test hooks,
1013project installation,
1014platform-specific details,
1015Python 3 support.")
1016 ;; TODO: setuptools now bundles the following libraries:
1017 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1018 (license (list license:psfl ; setuptools itself
1019 license:expat ; six, appdirs, pyparsing
1020 license:asl2.0 ; packaging is dual ASL2/BSD-2
1021 license:bsd-2))))
1022
1023(define-public python2-setuptools
1024 (package-with-python2 python-setuptools))
1025
0fdec2a3
MB
1026;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1027(define-public python-setuptools-for-tensorflow
1028 (hidden-package
1029 (package
1030 (inherit python-setuptools)
1031 (version "39.1.0")
1032 (source (origin
1033 (inherit (package-source python-setuptools))
1034 (uri (pypi-uri "setuptools" version ".zip"))
1035 (sha256
1036 (base32
1037 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1038
44d10b1f
RW
1039(define-public python-uniseg
1040 (package
1041 (name "python-uniseg")
1042 (version "0.7.1")
1043 (source
1044 (origin
1045 (method url-fetch)
1046 (uri (pypi-uri "uniseg" version ".zip"))
1047 (sha256
1048 (base32
1049 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1050 (build-system python-build-system)
1051 (arguments
1052 '(#:tests? #f)) ; The test suite requires network access.
1053 (native-inputs
1054 `(("unzip" ,unzip)))
1055 (home-page
1056 "https://bitbucket.org/emptypage/uniseg-python")
1057 (synopsis
1058 "Python library to determine Unicode text segmentations")
1059 (description
1060 "Uniseg is a Python package used to determine Unicode text segmentations.
1061Supported segmentations include:
1062@enumerate
1063@item @dfn{Code point} (any value in the Unicode codespace)
1064@item @dfn{Grapheme cluster} (user-perceived character made of a single or
1065multiple Unicode code points, e.g. \"G\" + acute-accent)
1066@item Word break
1067@item Sentence break
1068@item Line break
1069@end enumerate")
1070 (license license:expat)))
1071
1072(define-public python2-uniseg
1073 (package-with-python2 python-uniseg))
1074
1075(define-public python-humanfriendly
1076 (package
1077 (name "python-humanfriendly")
1078 (version "4.4.1")
1079 (source
1080 (origin
1081 (method url-fetch)
1082 (uri (pypi-uri "humanfriendly" version))
1083 (sha256
1084 (base32
1085 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
1086 (build-system python-build-system)
1087 (arguments
1088 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1089 #:tests? #f))
1090 (propagated-inputs
1091 `(("python-monotonic" ,python-monotonic)))
1092 (home-page "https://humanfriendly.readthedocs.io")
1093 (synopsis "Human-friendly input and output in Python")
1094 (description
1095 "The functions and classes in @code{humanfriendly} can be used to make
1096text interfaces more user-friendly. It includes tools to parse and format
1097numbers, file sizes, and timespans, timers for long-running operations, menus
1098to allow the user to choose from a list of options, and terminal interaction
1099helpers.")
1100 (license license:expat)))
1101
1102(define-public python2-humanfriendly
1103 (package-with-python2 python-humanfriendly))
1104
1105(define-public python-capturer
1106 (package
1107 (name "python-capturer")
1108 (version "2.4")
1109 (source
1110 (origin
1111 (method url-fetch)
1112 (uri (pypi-uri "capturer" version))
1113 (sha256
1114 (base32
1115 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1116 (build-system python-build-system)
1117 (arguments
1118 `(#:tests? #f))
1119 (propagated-inputs
1120 `(("python-humanfriendly" ,python-humanfriendly)))
1121 (home-page "https://capturer.readthedocs.io")
1122 (synopsis "Capture stdout and stderr streams of the current process")
1123 (description
1124 "The capturer package makes it easy to capture the stdout and stderr
1125streams of the current process and subprocesses. Output can be relayed
1126to the terminal in real time but is also available to the Python program
1127for additional processing.")
1128 (license license:expat)))
1129
1130(define-public python2-capturer
1131 (package-with-python2 python-capturer))
1132
1133(define-public python-case
1134 (package
1135 (name "python-case")
1136 (version "1.5.3")
1137 (source
1138 (origin
1139 (method url-fetch)
1140 (uri (pypi-uri "case" version))
1141 (sha256
1142 (base32
1143 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1144 (build-system python-build-system)
1145 (propagated-inputs
1146 `(("python-mock" ,python-mock)
1147 ("python-nose" ,python-nose)
1148 ("python-six" ,python-six)
1149 ("python-unittest2" ,python-unittest2)))
1150 (native-inputs
1151 `(("python-coverage" ,python-coverage)))
1152 (home-page "https://github.com/celery/case")
1153 (synopsis "Unittest utilities and convenience methods")
1154 (description
1155 "The @code{case} package provides utilities on top of unittest, including
1156some helpful Python 2 compatibility convenience methods.")
1157 (license license:bsd-3)))
1158
1159(define-public python-verboselogs
1160 (package
1161 (name "python-verboselogs")
1162 (version "1.7")
1163 (source
1164 (origin
1165 (method url-fetch)
1166 (uri (pypi-uri "verboselogs" version))
1167 (sha256
1168 (base32
1169 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1170 (build-system python-build-system)
1760c970
MO
1171 (arguments
1172 `(#:phases
1173 (modify-phases %standard-phases
1174 (replace 'check
1175 (lambda _
1176 ;; Do not run pylint plugin test, as astroid is an old
1177 ;; unsupported version.
1178 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1179 "verboselogs/tests.py"))))))
44d10b1f
RW
1180 (native-inputs
1181 `(("python-mock" ,python-mock)
1760c970 1182 ("python-pytest" ,python-pytest)))
44d10b1f
RW
1183 (home-page "https://verboselogs.readthedocs.io")
1184 (synopsis "Verbose logging level for Python's logging module")
1185 (description
1186 "The @code{verboselogs} package extends Python's @code{logging} module to
1187add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1188 (license license:expat)))
1189
1190(define-public python2-verboselogs
1191 (package-with-python2 python-verboselogs))
1192
1193(define-public python-coloredlogs
1194 (package
1195 (name "python-coloredlogs")
b2b8a39c 1196 (version "10.0")
44d10b1f
RW
1197 (source
1198 (origin
1199 (method url-fetch)
1200 (uri (pypi-uri "coloredlogs" version))
1201 (sha256
1202 (base32
b2b8a39c 1203 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
44d10b1f
RW
1204 (build-system python-build-system)
1205 (arguments
1206 `(;Tests require some updated modules
1207 #:tests? #f))
1208 (propagated-inputs
1209 `(("python-capturer" ,python-capturer)))
1210 (home-page "https://coloredlogs.readthedocs.io")
1211 (synopsis "Colored stream handler for Python's logging module")
1212 (description
1213 "The @code{coloredlogs} package enables colored terminal output for
1214Python's logging module. The @code{ColoredFormatter} class inherits from
1215@code{logging.Formatter} and uses ANSI escape sequences to render your logging
1216messages in color.")
1217 (license license:expat)))
1218
1219(define-public python2-coloredlogs
1220 (package-with-python2 python-coloredlogs))
1221
af760990
VC
1222(define-public python-editorconfig
1223 (package
1224 (name "python-editorconfig")
1225 (version "0.12.2")
1226 (source
1227 (origin
1228 (method url-fetch)
1229 (uri (pypi-uri "EditorConfig" version))
1230 (sha256
1231 (base32
1232 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1233 (build-system python-build-system)
1234 (home-page "https://editorconfig.org/")
1235 (synopsis "EditorConfig bindings for python")
1236 (description "The EditorConfig project consists of a file format for
1237defining coding styles and a collection of text editor plugins that enable
1238editors to read the file format and adhere to defined styles. EditorConfig
1239files are easily readable and they work nicely with version control systems.")
1240 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1241 (license (list license:bsd-2 license:psfl))))
1242
4caf37b0
MC
1243(define-public python-et-xmlfile
1244 (package
1245 (name "python-et-xmlfile")
1246 (version "1.0.1")
1247 (source
1248 (origin
1249 (method url-fetch)
1250 (uri (pypi-uri "et_xmlfile" version))
1251 (sha256
1252 (base32
1253 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1254 (build-system python-build-system)
1255 (arguments
1256 `(#:phases (modify-phases %standard-phases
1257 (replace 'check
1258 (lambda _
1259 (invoke "pytest"))))))
1260 (native-inputs
1261 `(("python-pytest" ,python-pytest)
1262 ("python-lxml" ,python-lxml))) ;used for the tests
1263 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1264 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1265 (description "This Python library is based upon the @code{xmlfile} module
1266from @code{lxml}. It aims to provide a low memory, compatible implementation
1267of @code{xmlfile}.")
1268 (license license:expat)))
1269
1270(define-public python2-et-xmlfile
1271 (package-with-python2 python-et-xmlfile))
1272
a042d348
MC
1273(define-public python-openpyxl
1274 (package
1275 (name "python-openpyxl")
441e6d93 1276 (version "2.6.2")
a042d348
MC
1277 (source
1278 (origin
1279 ;; We use the upstream repository, as the tests are not included in the
1280 ;; PyPI releases.
1281 (method hg-fetch)
1282 (uri (hg-reference
1283 (url "https://bitbucket.org/openpyxl/openpyxl")
1284 (changeset version)))
1285 (file-name (string-append name "-" version "-checkout"))
1286 (sha256
441e6d93 1287 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1288 (build-system python-build-system)
1289 (arguments
1290 `(#:phases (modify-phases %standard-phases
1291 (replace 'check
1292 (lambda _
1293 (invoke "pytest"))))))
1294 (native-inputs
1295 ;; For the test suite.
1296 `(("python-lxml" ,python-lxml)
1297 ("python-pillow" ,python-pillow)
1298 ("python-pytest" ,python-pytest)))
1299 (propagated-inputs
1300 `(("python-et-xmlfile" ,python-et-xmlfile)
1301 ("python-jdcal" ,python-jdcal)))
1302 (home-page "https://openpyxl.readthedocs.io")
1303 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1304 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1305XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1306standard.")
1307 (license license:expat)))
1308
44d10b1f
RW
1309(define-public python-eventlet
1310 (package
1311 (name "python-eventlet")
c9876c9b 1312 (version "0.25.1")
44d10b1f
RW
1313 (source
1314 (origin
1315 (method url-fetch)
1316 (uri (pypi-uri "eventlet" version))
1317 (sha256
1318 (base32
c9876c9b 1319 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
44d10b1f
RW
1320 (build-system python-build-system)
1321 (propagated-inputs
1322 `(("python-greenlet" ,python-greenlet)))
1323 (arguments
1324 ;; TODO: Requires unpackaged 'enum-compat'.
1325 '(#:tests? #f))
bff36617 1326 (home-page "https://eventlet.net")
44d10b1f
RW
1327 (synopsis "Concurrent networking library for Python")
1328 (description
1329 "Eventlet is a concurrent networking library for Python that
1330allows you to change how you run your code, not how you write it.
1331It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1332Coroutines ensure that the developer uses a blocking style of programming
1333that is similar to threading, but provide the benefits of non-blocking I/O.
1334The event dispatch is implicit, which means you can easily use @code{Eventlet}
1335from the Python interpreter, or as a small part of a larger application.")
1336 (license license:expat)))
1337
1338(define-public python2-eventlet
1339 (let ((base (package-with-python2
1340 (strip-python2-variant python-eventlet))))
1341 (package (inherit base)
1342 (propagated-inputs
1343 `(("python2-enum34" ,python2-enum34)
1344 ,@(package-propagated-inputs base))))))
1345
1346(define-public python-six
1347 (package
1348 (name "python-six")
6c58a06e 1349 (version "1.12.0")
44d10b1f
RW
1350 (source
1351 (origin
1352 (method url-fetch)
1353 (uri (pypi-uri "six" version))
1354 (sha256
1355 (base32
6c58a06e 1356 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1357 (build-system python-build-system)
1358 (arguments
1359 `(#:phases
1360 (modify-phases %standard-phases
1361 (replace 'check
1362 (lambda _
1363 (invoke "py.test" "-v"))))))
1364 (native-inputs
1365 `(("python-py" ,python-py)
1366 ("python-pytest" ,python-pytest-bootstrap)))
e85af137 1367 (home-page "https://pypi.org/project/six/")
44d10b1f
RW
1368 (synopsis "Python 2 and 3 compatibility utilities")
1369 (description
1370 "Six is a Python 2 and 3 compatibility library. It provides utility
1371functions for smoothing over the differences between the Python versions with
1372the goal of writing Python code that is compatible on both Python versions.
1373Six supports every Python version since 2.5. It is contained in only one
1374Python file, so it can be easily copied into your project.")
1375 (license license:x11)))
1376
1377(define-public python2-six
1378 (package-with-python2 python-six))
1379
1380(define-public python-six-bootstrap
1381 (package
1382 (inherit python-six)
1383 (name "python-six-bootstrap")
1384 (native-inputs `())
1385 (arguments `(#:tests? #f))))
1386
1387(define-public python2-six-bootstrap
1388 (package-with-python2 python-six-bootstrap))
1389
1390(define-public python-schedule
1391 (package
1392 (name "python-schedule")
1393 (version "0.4.3")
1394 (source
1395 (origin
1396 (method url-fetch)
1397 (uri (pypi-uri "schedule" version))
1398 (sha256
1399 (base32
1400 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1401 (build-system python-build-system)
1402 (native-inputs
1403 `(("python-pytest" ,python-pytest)
1404 ("python-mock" ,python-mock)))
1405 (home-page "https://github.com/dbader/schedule")
1406 (synopsis "Schedule periodic function calls in Python")
1407 (description
1408 "Schedule is an in-process scheduler for periodic jobs that uses the
1409builder pattern for configuration. Schedule lets you run Python functions (or
1410any other callable) periodically at pre-determined intervals using a simple,
1411human-friendly syntax.")
1412 (license license:expat)))
1413
1414(define-public python2-schedule
1415 (package-with-python2 python-schedule))
1416
44d10b1f
RW
1417(define-public python2-mechanize
1418 (package
1419 (name "python2-mechanize")
1420 (version "0.2.5")
1421 (source
1422 (origin
1423 (method url-fetch)
1cc184e6 1424 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1425 (sha256
1426 (base32
1427 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1428 (build-system python-build-system)
1429 (arguments
1430 `(#:python ,python-2 ; apparently incompatible with Python 3
1431 #:tests? #f))
1432 ;; test fails with message
1433 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1434 ;; (python-3.3.2) or
1435 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1436 ;; (python-2.7.5).
1437 ;; The source code is from March 2011 and probably not up-to-date
1438 ;; with respect to python unit tests.
1439 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1440 (synopsis
1441 "Stateful programmatic web browsing in Python")
1442 (description
1443 "Mechanize implements stateful programmatic web browsing in Python,
1444after Andy Lester’s Perl module WWW::Mechanize.")
1445 (license (license:non-copyleft
1446 "file://COPYING"
1447 "See COPYING in the distribution."))))
1448
1449
1450(define-public python-simplejson
1451 (package
1452 (name "python-simplejson")
1453 (version "3.14.0")
1454 (source
1455 (origin
1456 (method url-fetch)
1457 (uri (pypi-uri "simplejson" version))
1458 (sha256
1459 (base32
1460 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1461 (build-system python-build-system)
1462 (home-page "http://simplejson.readthedocs.org/en/latest/")
1463 (synopsis
1464 "Json library for Python")
1465 (description
1466 "JSON (JavaScript Object Notation) is a subset of JavaScript
1467syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1468format.
1469
1470Simplejson exposes an API familiar to users of the standard library marshal
1471and pickle modules. It is the externally maintained version of the json
1472library contained in Python 2.6, but maintains compatibility with Python 2.5
1473and (currently) has significant performance advantages, even without using
1474the optional C extension for speedups. Simplejson is also supported on
1475Python 3.3+.")
1476 (license license:x11)))
1477
1478(define-public python2-simplejson
1479 (package-with-python2 python-simplejson))
1480
1481
1482(define-public python-pyicu
1483 (package
1484 (name "python-pyicu")
dc23bb45 1485 (version "2.3.1")
44d10b1f
RW
1486 (source
1487 (origin
1488 (method url-fetch)
1489 (uri (pypi-uri "PyICU" version))
1490 (sha256
1491 (base32
dc23bb45 1492 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1493 (build-system python-build-system)
1494 (inputs
1495 `(("icu4c" ,icu4c)))
1496 (native-inputs
1497 `(("python-pytest" ,python-pytest)
1498 ("python-six" ,python-six)))
1499 (home-page "https://github.com/ovalhub/pyicu")
1500 (synopsis "Python extension wrapping the ICU C++ API")
1501 (description
1502 "PyICU is a python extension wrapping the ICU C++ API.")
1503 (properties `((python2-variant . ,(delay python2-pyicu))))
1504 (license license:x11)))
1505
1506(define-public python2-pyicu
1507 (let ((base (package-with-python2
1508 (strip-python2-variant python-pyicu))))
1509 (package
1510 (inherit base)
1511 (arguments
1512 `(,@(package-arguments base)
1513 #:phases
1514 (modify-phases %standard-phases
1515 (add-before 'check 'delete-failing-test
1516 (λ _
1517 ;; XXX: This fails due to Unicode issues unique to Python 2,
1518 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1519 (delete-file "test/test_Script.py")
1520 #t))))))))
1521
1522(define-public python2-dogtail
1523 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1524 ;; spaces in indentation" with Python 3.
1525 (package
1526 (name "python2-dogtail")
1527 (version "0.9.9")
1528 (source (origin
1529 (method url-fetch)
1530 (uri (pypi-uri "dogtail" version))
1531 (sha256
1532 (base32
1533 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1534 (build-system python-build-system)
1535 (arguments `(#:python ,python-2
1536 #:tests? #f)) ; invalid command "test"
1537 ;; Currently no offical homepage.
e85af137 1538 (home-page "https://pypi.org/project/dogtail/")
44d10b1f
RW
1539 (synopsis "GUI test tool and automation framework written in Python")
1540 (description
1541 "Dogtail is a GUI test tool and automation framework written in Python.
1542It uses Accessibility (a11y) technologies to communicate with desktop
1543applications. dogtail scripts are written in Python and executed like any
1544other Python program.")
1545 (license license:gpl2+)))
1546
1547(define-public python-empy
1548 (package
1549 (name "python-empy")
0f6d5115 1550 (version "3.3.3")
44d10b1f
RW
1551 (source (origin
1552 (method url-fetch)
1553 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1554 version ".tar.gz"))
1555 (sha256
1556 (base32
0f6d5115 1557 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1558 (build-system python-build-system)
1559 (arguments
0f6d5115 1560 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1561 (home-page "http://www.alcyone.com/software/empy/")
1562 (synopsis "Templating system for Python")
1563 (description
1564 "EmPy is a system for embedding Python expressions and statements in
1565template text; it takes an EmPy source file, processes it, and produces
1566output. This is accomplished via expansions, which are special signals to the
1567EmPy system and are set off by a special prefix (by default the at sign, @@).
1568EmPy can expand arbitrary Python expressions and statements in this way, as
1569well as a variety of special forms. Textual data not explicitly delimited in
1570this way is sent unaffected to the output, allowing Python to be used in
1571effect as a markup language. Also supported are callbacks via hooks,
1572recording and playback via diversions, and dynamic, chainable filters. The
1573system is highly configurable via command line options and embedded
1574commands.")
1575 (license license:lgpl2.1+)))
1576
1577(define-public python2-empy
0f064242
TGR
1578 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1579 (package
1580 (inherit base)
1581 (arguments `(,@(package-arguments base)
1582 #:tests? #t)))))
44d10b1f
RW
1583
1584(define-public python2-element-tree
1585 (package
1586 (name "python2-element-tree")
1587 (version "1.2.6")
1588 (source (origin
1589 (method url-fetch)
1590 (uri (string-append
1591 "http://effbot.org/media/downloads/elementtree-"
1592 version "-20050316.tar.gz"))
1593 (sha256
1594 (base32
1595 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1596 (build-system python-build-system)
1597 (arguments
1598 `(#:python ,python-2 ; seems to be part of Python 3
1599 #:tests? #f)) ; no 'test' sub-command
1600 (synopsis "Toolkit for XML processing in Python")
1601 (description
1602 "ElementTree is a Python library supporting lightweight XML processing.")
1603 (home-page "http://effbot.org/zone/element-index.htm")
1604 (license (license:x11-style
1605 "http://docs.python.org/2/license.html"
1606 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1607
1608(define-public python2-pybugz
1609 (package
1610 (name "python2-pybugz")
1611 (version "0.6.11")
1612 (source (origin
1613 (method url-fetch)
1614 (uri (string-append
1615 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1616 version ".tar.gz"))
1617 (sha256
1618 (base32
1619 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1620 (patches (search-patches "pybugz-stty.patch"
1621 "pybugz-encode-error.patch"))))
1622 (build-system python-build-system)
1623 (arguments
1624 `(#:python ,python-2 ; SyntaxError with Python 3
1625 #:tests? #f)) ; no 'test' sub-command
1626 (propagated-inputs
1627 `(("element-tree" ,python2-element-tree)))
1628 (synopsis "Python and command-line interface to Bugzilla")
1629 (description
1630 "PyBugz is a Python library and command-line tool to query the Bugzilla
1631bug tracking system. It is meant as an aid to speed up interaction with the
1632bug tracker.")
1633 (home-page "http://www.liquidx.net/pybugz/")
1634 (license license:gpl2)))
1635
1636(define-public python2-enum
1637 (package
1638 (name "python2-enum")
1639 (version "0.4.6")
1640 (source (origin
1641 (method url-fetch)
1642 (uri (pypi-uri "enum" version))
1643 (sha256
1644 (base32
1645 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1646 (build-system python-build-system)
1647 (arguments
1648 `(#:python ,python-2))
e85af137 1649 (home-page "https://pypi.org/project/enum/")
44d10b1f
RW
1650 (synopsis "Robust enumerated type support in Python")
1651 (description
1652 "This provides a module for robust enumerations in Python. It has
1653been superseded by the Python standard library and is provided only for
1654compatibility.")
1655 ;; Choice of either license.
1656 (license (list license:gpl3+ license:psfl))))
1657
1658(define-public python-enum34
1659 (package
1660 (name "python-enum34")
1661 (version "1.1.6")
1662 (source
1663 (origin
1664 (method url-fetch)
1665 (uri (pypi-uri "enum34" version))
1666 (sha256
1667 (base32
1668 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1669 (build-system python-build-system)
e85af137 1670 (home-page "https://pypi.org/project/enum34/")
44d10b1f
RW
1671 (synopsis "Backported Python 3.4 Enum")
1672 (description
1673 "Enum34 is the new Python stdlib enum module available in Python 3.4
1674backported for previous versions of Python from 2.4 to 3.3.")
1675 (license license:bsd-3)))
1676
1677(define-public python2-enum34
1678 (package-with-python2 python-enum34))
1679
1680(define-public python-parse-type
1681 (package
1682 (name "python-parse-type")
1683 (version "0.4.2")
1684 (source
1685 (origin
1686 (method url-fetch)
1687 (uri (pypi-uri "parse_type" version))
1688 (sha256
1689 (base32
1690 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1691 (build-system python-build-system)
1692 (propagated-inputs
1693 `(("python-six" ,python-six)
1694 ("python-parse" ,python-parse)))
1695 (native-inputs
1696 `(("python-pytest" ,python-pytest)
1697 ("python-pytest-runner" ,python-pytest-runner)))
1698 (home-page "https://github.com/jenisys/parse_type")
1699 (synopsis "Extended parse module")
1700 (description
1701 "Parse_type extends the python parse module.")
1702 (properties
1703 `((python2-variant . ,(delay python2-parse-type))))
1704 (license license:bsd-3)))
1705
1706(define-public python2-parse-type
1707 (let ((base (package-with-python2
1708 (strip-python2-variant python-parse-type))))
1709 (package (inherit base)
1710 (propagated-inputs
1711 `(("python2-enum34" ,python2-enum34)
1712 ,@(package-propagated-inputs base))))))
1713
1714(define-public python-parse
1715 (package
1716 (name "python-parse")
1717 (version "1.8.4")
1718 (source
1719 (origin
1720 (method url-fetch)
1721 (uri (pypi-uri "parse" version))
1722 (sha256
1723 (base32
1724 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1725 (build-system python-build-system)
1726 (arguments
1727 `(#:phases
1728 (modify-phases %standard-phases
1729 (replace 'check
1730 (lambda _ (invoke "python" "test_parse.py"))))))
1731 (home-page "https://github.com/r1chardj0n3s/parse")
1732 (synopsis "Parse strings")
1733 (description
1734 "Parse strings using a specification based on the Python @code{format()}
1735syntax.")
1736 (license license:x11)))
1737
1738(define-public python-polib
1739 (package
1740 (name "python-polib")
1741 (version "1.0.8")
1742 (source (origin
1743 (method url-fetch)
1744 (uri (pypi-uri "polib" version))
1745 (sha256
1746 (base32
1747 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1748 (build-system python-build-system)
1749 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1750 (synopsis "Manipulate, create and modify gettext files")
1751 (description "Polib can manipulate any gettext format (po, pot and mo)
1752files. It can be used to create po files from scratch or to modify
1753existing ones.")
1754 (license license:expat)))
1755
1756(define-public python2-polib
1757 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1758 (package
1759 (inherit base)
1760 (arguments `(,@(package-arguments base)
1761 ;; Tests don't work with python2.
1762 #:tests? #f)))))
1763
6830120e
TLC
1764(define-public python-poyo
1765 (package
1766 (name "python-poyo")
1767 (version "0.5.0")
1768 (source
1769 (origin
1770 (method url-fetch)
1771 (uri (pypi-uri "poyo" version))
1772 (sha256
1773 (base32
1774 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1775 (build-system python-build-system)
1776 (home-page "https://github.com/hackebrot/poyo")
1777 (synopsis "Lightweight YAML Parser for Python")
1778 (description
1779 "This package provides a lightweight YAML Parser for Python. It supports
1780only a chosen subset of the YAML format that is required to parse cookiecutter
1781user configuration files. It does not have support for serializing into YAML
1782and is not compatible with JSON.")
1783 (license license:expat)))
1784
44d10b1f
RW
1785(define-public scons
1786 (package
1787 (name "scons")
05487ed8 1788 (version "3.0.4")
44d10b1f 1789 (source (origin
ad34338d
RW
1790 (method git-fetch)
1791 (uri (git-reference
1792 (url "https://github.com/SCons/scons.git")
1793 (commit version)))
1794 (file-name (git-file-name name version))
44d10b1f
RW
1795 (sha256
1796 (base32
05487ed8 1797 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1798 (build-system python-build-system)
1799 (arguments
1800 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1801 #:tests? #f ; no 'python setup.py test' command
1802 #:phases
1803 (modify-phases %standard-phases
1804 (add-before 'build 'bootstrap
1805 (lambda _
1806 (substitute* "src/engine/SCons/compat/__init__.py"
1807 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1808 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1809 (substitute* "src/engine/SCons/Platform/__init__.py"
1810 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1811 "mod = __import__(full_name)"))
ad34338d
RW
1812 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1813 (chdir "build/scons")
1814 #t)))))
3602de33 1815 (home-page "https://scons.org/")
44d10b1f
RW
1816 (synopsis "Software construction tool written in Python")
1817 (description
1818 "SCons is a software construction tool. Think of SCons as an improved,
1819cross-platform substitute for the classic Make utility with integrated
1820functionality similar to autoconf/automake and compiler caches such as ccache.
1821In short, SCons is an easier, more reliable and faster way to build
1822software.")
1823 (license license:x11)))
1824
1825(define-public scons-python2
1826 (package
1827 (inherit (package-with-python2 scons))
1828 (name "scons-python2")))
1829
1830(define-public python-extras
1831 (package
1832 (name "python-extras")
1833 (version "1.0.0")
1834 (source
1835 (origin
1836 (method url-fetch)
1837 (uri (pypi-uri "extras" version))
1838 (sha256
1839 (base32
1840 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1841 (build-system python-build-system)
1842 (arguments
1843 ;; FIXME: Circular dependency on testtools.
1844 '(#:tests? #f))
1845 (home-page "https://github.com/testing-cabal/extras")
1846 (synopsis "Useful extensions to the Python standard library")
1847 (description
1848 "Extras is a set of extensions to the Python standard library.")
1849 (license license:expat)))
1850
1851(define-public python2-extras
1852 (package-with-python2 python-extras))
1853
1854(define-public python-mimeparse
1855 (package
1856 (name "python-mimeparse")
1857 (version "1.6.0")
1858 (source
1859 (origin
1860 (method url-fetch)
89bf667c 1861 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1862 (sha256
1863 (base32
1864 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1865 (build-system python-build-system)
1866 (arguments
1867 '(#:phases
1868 (modify-phases %standard-phases
1869 (replace 'check
1870 (lambda _
1871 (invoke "./mimeparse_test.py"))))))
1872 (home-page
1873 "https://github.com/dbtsai/python-mimeparse")
1874 (synopsis "Python library for parsing MIME types")
1875 (description
1876 "Mimeparse provides basic functions for parsing MIME type names and
1877matching them against a list of media-ranges.")
1878 (license license:expat)))
1879
1880(define-public python2-mimeparse
1881 (package-with-python2 python-mimeparse))
1882
1883(define-public python-miniboa
1884 (package
1885 (name "python-miniboa")
1886 (version "1.0.7")
1887 (source
1888 (origin
1889 (method url-fetch)
1890 (uri (pypi-uri "miniboa" version))
1891 (sha256
1892 (base32
1893 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1894 (build-system python-build-system)
1895 (home-page "https://github.com/shmup/miniboa")
1896 (synopsis "Simple, single-threaded Telnet server")
1897 (description
1898 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1899server.")
1900 (license license:asl2.0)))
1901
1902(define-public python2-miniboa
1903 (package-with-python2 python-miniboa))
1904
1905(define-public python-pafy
1906 (package
1907 (name "python-pafy")
1908 (version "0.5.3.1")
1909 (source
1910 (origin
1911 (method url-fetch)
1912 (uri (pypi-uri "pafy" version))
1913 (sha256
1914 (base32
1915 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1916 (build-system python-build-system)
1917 (arguments
1918 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1919 (propagated-inputs
1920 ;; Youtube-dl is a python package which is imported in the file
1921 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1922 `(("youtube-dl" ,youtube-dl)))
1923 (home-page "https://np1.github.io/pafy/")
1924 (synopsis "Retrieve YouTube content and metadata")
1925 (description
1926 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1927 (license license:lgpl3+)))
1928
1929(define-public python2-funcsigs
1930 (package
1931 (name "python2-funcsigs")
1932 (version "1.0.2")
1933 (source (origin
1934 (method url-fetch)
1935 (uri (pypi-uri "funcsigs" version))
1936 (sha256
1937 (base32
1938 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1939 (build-system python-build-system)
1940 (arguments
1941 `(#:python ,python-2))
1942 (native-inputs
1943 `(("python2-unittest2" ,python2-unittest2)))
1944 (home-page "http://funcsigs.readthedocs.org")
1945 (synopsis "Python function signatures from PEP362")
1946 (description
1947 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1948 (license license:asl2.0)))
1949
1950(define-public python2-funcsigs-bootstrap
1951 (package
1952 (inherit python2-funcsigs)
1953 (name "python2-funcsigs-bootstrap")
1954 (native-inputs `())
1955 (arguments
1956 `(#:tests? #f
1957 ,@(package-arguments python2-funcsigs)))))
1958
1959(define-public python-py
1960 (package
1961 (name "python-py")
08eba545 1962 (version "1.8.0")
44d10b1f
RW
1963 (source
1964 (origin
1965 (method url-fetch)
1966 (uri (pypi-uri "py" version))
1967 (sha256
1968 (base32
08eba545 1969 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1970 (build-system python-build-system)
1971 (arguments
1972 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1973 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1974 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1975 ;; Is this module globally installed?"
1976 '(#:tests? #f))
1977 (native-inputs
1978 `(("python-setuptools-scm" ,python-setuptools-scm)))
1979 (home-page "https://github.com/pytest-dev/py")
1980 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1981 (description
1982 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1983code introspection, and logging.")
1984 (license license:expat)))
1985
1986(define-public python2-py
1987 (package-with-python2 python-py))
1988
1989;; Recent versions of python-fixtures and python-testrepository need
1990;; python-pbr for packaging, which itself needs these two packages for
1991;; testing.
1992;; To fix this circular dependency, we use a build of python-pbr, based on the
1993;; same source, just without any test dependencies and with tests disabled.
1994;; python-pbr-minmal is then used to package python-fixtures and
1995;; python-testrepository.
1996;; Strictly speaking we currently could remove the test-requirements from the
1997;; normal python-pbr package (and save this package) since test are disabled
1998;; there anyway. But this may change in future.
1999(define-public python-pbr-minimal
2000 (package
2001 (name "python-pbr-minimal")
2002 (version "3.0.1")
2003 (source
2004 (origin
2005 (method url-fetch)
2006 (uri (pypi-uri "pbr" version))
2007 (sha256
2008 (base32
2009 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2010 (build-system python-build-system)
2011 (arguments
2012 `(#:tests? #f))
58d4e949 2013 (home-page "https://docs.openstack.org/pbr/latest/")
44d10b1f
RW
2014 (synopsis "Minimal build of python-pbr used for bootstrapping")
2015 (description
2016 "Used only for bootstrapping python2-pbr, you should not need this.")
2017 (license license:asl2.0)))
2018
2019(define-public python2-pbr-minimal
2020 (package-with-python2 python-pbr-minimal))
2021
2022(define-public python-pbr
2023 (package
2024 (inherit python-pbr-minimal)
2025 (name "python-pbr")
2026 (arguments
2027 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2028 (propagated-inputs
2029 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2030 (native-inputs
2031 `(("python-fixtures" ,python-fixtures-bootstrap)
2032 ;; discover, coverage, hacking, subunit
2033 ("python-mock" ,python-mock)
2034 ("python-six" ,python-six)
2035 ("python-sphinx" ,python-sphinx)
2036 ("python-testrepository" ,python-testrepository-bootstrap)
2037 ("python-testresources" ,python-testresources-bootstrap)
2038 ("python-testscenarios" ,python-testscenarios-bootstrap)
2039 ("python-testtools" ,python-testtools-bootstrap)
2040 ("python-virtualenv" ,python-virtualenv)))
2041 (synopsis "Enhance the default behavior of Python’s setuptools")
2042 (description
2043 "Python Build Reasonableness (PBR) is a library that injects some useful
2044and sensible default behaviors into your setuptools run. It will set
2045versions, process requirements files and generate AUTHORS and ChangeLog file
2046from git information.
2047")))
2048
2049(define-public python2-pbr
2050 (package-with-python2 python-pbr))
2051
ea43f0d5
MB
2052(define-public python-pyrsistent
2053 (package
2054 (name "python-pyrsistent")
c19930dc 2055 (version "0.15.7")
ea43f0d5
MB
2056 (home-page "https://github.com/tobgu/pyrsistent")
2057 (source (origin
2058 (method url-fetch)
2059 (uri (pypi-uri "pyrsistent" version))
2060 (sha256
2061 (base32
c19930dc 2062 "103j63g6lb5dfspph96zxjdpnq9h991kazd4f09ddgkpxpivbiyd"))))
ea43f0d5
MB
2063 (build-system python-build-system)
2064 (native-inputs
2065 `(("python-hypothesis" ,python-hypothesis)
2066 ("python-pytest" ,python-pytest)
2067 ("python-pytest-runner" ,python-pytest-runner)))
2068 (propagated-inputs
2069 `(("python-six" ,python-six)))
2070 (synopsis "Persistent data structures for Python")
2071 (description
2072 "Pyrsistent is a number of persistent collections (by some referred to as
2073functional data structures). Persistent in the sense that they are immutable.
2074
2075All methods on a data structure that would normally mutate it instead return a
2076new copy of the structure containing the requested updates. The original
2077structure is left untouched.")
2078 (license license:expat)))
2079
2080(define-public python2-pyrsistent
2081 (package-with-python2 python-pyrsistent))
2082
44d10b1f
RW
2083(define-public python-exif-read
2084 (package
2085 (name "python-exif-read")
2086 (version "2.1.2")
2087 (source (origin
2088 (method url-fetch)
2089 (uri (pypi-uri "ExifRead" version))
2090 (sha256
2091 (base32
2092 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2093 (build-system python-build-system)
2094 (arguments `(#:tests? #f)) ; no tests
2095 (home-page "https://github.com/ianare/exif-py")
2096 (synopsis "Python library to extract EXIF data from image files")
2097 (description
2098 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2099files.")
2100 (license license:bsd-3)))
2101
2102(define-public python2-exif-read
2103 (package-with-python2 python-exif-read))
2104
2105(define-public python-pyld
2106 (package
2107 (name "python-pyld")
6d4ed78d 2108 (version "1.0.5")
44d10b1f
RW
2109 (source (origin
2110 (method url-fetch)
2111 (uri (pypi-uri "PyLD" version))
2112 (sha256
2113 (base32
6d4ed78d 2114 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
44d10b1f
RW
2115 (build-system python-build-system)
2116 (home-page "https://github.com/digitalbazaar/pyld")
2117 (synopsis "Python implementation of the JSON-LD specification")
2118 (description
2119 "PyLD is an implementation of the JSON-LD specification.")
2120 (license license:bsd-3)))
2121
2122(define-public python2-pyld
2123 (package-with-python2 python-pyld))
2124
2125(define-public python-click
2126 (package
2127 (name "python-click")
61984855 2128 (version "7.0")
44d10b1f
RW
2129 (source
2130 (origin
2131 (method url-fetch)
2132 (uri (pypi-uri "click" version))
2133 (sha256
2134 (base32
61984855 2135 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
2136 (build-system python-build-system)
2137 (arguments
8d7e7ca6 2138 `(#:phases
44d10b1f
RW
2139 (modify-phases %standard-phases
2140 (add-after 'unpack 'fix-paths
2141 (lambda* (#:key inputs #:allow-other-keys)
2142 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2143 "cross-libc" "libc"))))
2144 (substitute* "click/_unicodefun.py"
2145 (("'locale'")
2146 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
2147 #t))
2148 (replace 'check
2149 (lambda _
2150 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
2151 (native-inputs
2152 `(("python-pytest" ,python-pytest)))
61984855 2153 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
2154 (synopsis "Command line library for Python")
2155 (description
2156 "Click is a Python package for creating command line interfaces in a
2157composable way with as little code as necessary. Its name stands for
2158\"Command Line Interface Creation Kit\". It's highly configurable but comes
2159with sensible defaults out of the box.")
2160 (license license:bsd-3)))
2161
2162(define-public python2-click
2163 (package-with-python2 python-click))
2164
2165(define-public python-wheel
2166 (package
2167 (name "python-wheel")
8f137daf 2168 (version "0.33.6")
44d10b1f
RW
2169 (source
2170 (origin
2171 (method url-fetch)
2172 (uri (pypi-uri "wheel" version))
2173 (sha256
2174 (base32
8f137daf 2175 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
44d10b1f 2176 (build-system python-build-system)
8f137daf
MB
2177 (arguments
2178 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2179 ;; fails to find the newly-built bdist_wheel library, even though it is
2180 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2181 '(#:tests? #f))
44d10b1f
RW
2182 (home-page "https://bitbucket.org/pypa/wheel/")
2183 (synopsis "Format for built Python packages")
2184 (description
2185 "A wheel is a ZIP-format archive with a specially formatted filename and
2186the @code{.whl} extension. It is designed to contain all the files for a PEP
2187376 compatible install in a way that is very close to the on-disk format. Many
2188packages will be properly installed with only the @code{Unpack} step and the
2189unpacked archive preserves enough information to @code{Spread} (copy data and
2190scripts to their final locations) at any later time. Wheel files can be
2191installed with a newer @code{pip} or with wheel's own command line utility.")
8f137daf 2192 (license license:expat)))
44d10b1f
RW
2193
2194(define-public python2-wheel
8f137daf 2195 (package-with-python2 python-wheel))
44d10b1f
RW
2196
2197(define-public python-vcversioner
2198 (package
2199 (name "python-vcversioner")
2200 (version "2.16.0.0")
2201 (source
2202 (origin
2203 (method url-fetch)
2204 (uri (pypi-uri "vcversioner" version))
2205 (sha256
2206 (base32
2207 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2208 (build-system python-build-system)
2209 (synopsis "Python library for version number discovery")
2210 (description "Vcversioner is a Python library that inspects tagging
2211information in a variety of version control systems in order to discover
2212version numbers.")
2213 (home-page "https://github.com/habnabit/vcversioner")
2214 (license license:isc)))
2215
2216(define-public python2-vcversioner
2217 (package-with-python2 python-vcversioner))
2218
5591fc4f
MC
2219(define-public python-jdcal
2220 (package
2221 (name "python-jdcal")
2222 (version "1.4")
2223 (source
2224 (origin
2225 (method url-fetch)
2226 (uri (pypi-uri "jdcal" version))
2227 (sha256
2228 (base32
2229 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2230 (build-system python-build-system)
2231 (arguments
2232 `(#:phases (modify-phases %standard-phases
2233 (replace 'check
2234 (lambda _
2235 (invoke "pytest"))))))
2236 (native-inputs
2237 `(("python-pytest" ,python-pytest)))
2238 (home-page "https://github.com/phn/jdcal")
2239 (synopsis "Functions to convert between Julian dates Gregorian dates")
2240 (description "This Python library provides functions for converting
2241between Julian dates and Gregorian dates.")
2242 (license license:bsd-2)))
2243
2244(define-public python2-jdcal
2245 (package-with-python2 python-jdcal))
2246
06d41d8d
VC
2247(define-public python-jsondiff
2248 (package
2249 (name "python-jsondiff")
2250 (version "1.2.0")
2251 (source
2252 (origin
2253 (method url-fetch)
2254 (uri (pypi-uri "jsondiff" version))
2255 (sha256
2256 (base32
2257 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2258 (build-system python-build-system)
2259 (native-inputs
2260 `(("python-nose" ,python-nose)
2261 ("python-nose-random" ,python-nose-random)))
2262 (home-page
2263 "https://github.com/fzumstein/jsondiff")
2264 (synopsis "Compare JSON and JSON-like structures in Python")
2265 (description "@code{jsondiff} is a Python library which lets you
2266compare, diff, and patch JSON and JSON-like structures in Python.")
2267 (license license:expat)))
2268
44d10b1f
RW
2269(define-public python-jsonschema
2270 (package
2271 (name "python-jsonschema")
1adde06e 2272 (version "3.0.1")
44d10b1f
RW
2273 (source (origin
2274 (method url-fetch)
786ccb87 2275 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
2276 (sha256
2277 (base32
1adde06e 2278 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
2279 (build-system python-build-system)
2280 (arguments
2281 '(#:phases
2282 (modify-phases %standard-phases
1adde06e
MB
2283 (replace 'check
2284 (lambda _
2285 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2286 (invoke "trial" "jsonschema"))))))
44d10b1f 2287 (native-inputs
1adde06e
MB
2288 `(("python-setuptools_scm" ,python-setuptools-scm)
2289 ("python-twisted" ,python-twisted)))
2290 (propagated-inputs
2291 `(("python-attrs" ,python-attrs)
2292 ("python-pyrsistent" ,python-pyrsistent)
2293 ("python-six" ,python-six)))
44d10b1f
RW
2294 (home-page "https://github.com/Julian/jsonschema")
2295 (synopsis "Implementation of JSON Schema for Python")
2296 (description
2297 "Jsonschema is an implementation of JSON Schema for Python.")
2298 (license license:expat)
2299 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2300
2301(define-public python2-jsonschema
2302 (let ((jsonschema (package-with-python2
2303 (strip-python2-variant python-jsonschema))))
2304 (package (inherit jsonschema)
44d10b1f 2305 (propagated-inputs
1adde06e
MB
2306 `(("python2-functools32" ,python2-functools32)
2307 ,@(package-propagated-inputs jsonschema))))))
44d10b1f
RW
2308
2309(define-public python-schema
2310 (package
2311 (name "python-schema")
2312 (version "0.6.6")
2313 (source
2314 (origin
2315 (method url-fetch)
2316 (uri (pypi-uri "schema" version))
2317 (sha256
2318 (base32
2319 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2320 (build-system python-build-system)
2321 (native-inputs
2322 `(("python-pytest" ,python-pytest)))
2323 (home-page "https://github.com/keleshev/schema")
2324 (synopsis "Simple data validation library")
2325 (description
2326 "@code{python-schema} is a library for validating Python data
2327structures, such as those obtained from config-files, forms, external
2328services or command-line parsing, converted from JSON/YAML (or
2329something else) to Python data-types.")
2330 (license license:psfl)))
2331
2332(define-public python2-schema
2333 (package-with-python2 python-schema))
2334
2335(define-public python-schema-0.5
2336 (package (inherit python-schema)
2337 (version "0.5.0")
2338 (source
2339 (origin
2340 (method url-fetch)
2341 (uri (pypi-uri "schema" version))
2342 (sha256
2343 (base32
2344 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2345
2346(define-public python2-schema-0.5
2347 (package-with-python2 python-schema-0.5))
2348
2349(define-public python-kitchen
2350 (package
2351 (name "python-kitchen")
2352 (version "1.2.5")
2353 (source
2354 (origin
2355 (method url-fetch)
2356 (uri (pypi-uri "kitchen" version))
2357 (sha256
2358 (base32
2359 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2360 (build-system python-build-system)
2361 (propagated-inputs
2362 `(("python-chardet" ,python-chardet)))
2363 (home-page "https://github.com/fedora-infra/kitchen")
2364 (synopsis "Python API for snippets")
2365 (description "@code{kitchen} module provides a python API for all sorts of
2366little useful snippets of code that everybody ends up writing for their projects
2367but never seem big enough to build an independent release. Use kitchen and stop
2368cutting and pasting that code over and over.")
2369 (license (list license:lgpl2.1+
2370 ;; subprocess.py, test_subprocess.py,
2371 ;; kitchen/pycompat25/defaultdict.py:
2372 license:psfl))))
2373
2374(define-public python2-kitchen
2375 (package-with-python2 python-kitchen))
2376
2377(define-public python-unidecode
2378 (package
2379 (name "python-unidecode")
eb80a300 2380 (version "1.1.1")
44d10b1f
RW
2381 (source (origin
2382 (method url-fetch)
2383 (uri (pypi-uri "Unidecode" version))
2384 (sha256
2385 (base32
eb80a300 2386 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
44d10b1f 2387 (build-system python-build-system)
e85af137 2388 (home-page "https://pypi.org/project/Unidecode/")
44d10b1f
RW
2389 (synopsis "ASCII transliterations of Unicode text")
2390 (description
2391 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2392useful when integrating with legacy code that doesn't support Unicode, or for
2393ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2394machine identifiers from human-readable Unicode strings that should still be
2395somewhat intelligible.")
2396 (license license:gpl2+)))
2397
2398(define-public python2-unidecode
2399 (package-with-python2 python-unidecode))
2400
2401(define-public python-pyjwt
2402 (package
2403 (name "python-pyjwt")
be6f2f56 2404 (version "1.7.1")
44d10b1f
RW
2405 (source
2406 (origin
2407 (method url-fetch)
2408 (uri (pypi-uri "PyJWT" version))
2409 (sha256
2410 (base32
be6f2f56 2411 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
44d10b1f
RW
2412 (modules '((guix build utils)))
2413 (snippet
2414 '(begin
2415 (for-each delete-file-recursively
2416 (find-files "." "\\.pyc$"))
2417 #t))))
2418 (build-system python-build-system)
2419 (native-inputs
2420 `(("python-pytest" ,python-pytest)
2421 ("python-pytest-cov" ,python-pytest-cov)
2422 ("python-pytest-runner" ,python-pytest-runner)))
2423 (home-page "https://github.com/progrium/pyjwt")
2424 (synopsis "JSON Web Token implementation in Python")
2425 (description
2426 "PyJWT is a JSON Web Token implementation written in Python.")
2427 (license license:expat)))
2428
2429(define-public python2-pyjwt
2430 (package-with-python2 python-pyjwt))
2431
2432(define-public python-pykka
2433 (package
2434 (name "python-pykka")
2435 (version "1.2.1")
2436 (source
2437 (origin
2438 (method url-fetch)
2439 (uri (pypi-uri "Pykka" version))
2440 (sha256
2441 (base32
2442 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2443 (build-system python-build-system)
2444 (native-inputs
2445 `(("python-mock" ,python-mock)
2446 ("python-nose" ,python-nose)
2447 ("python-gevent" ,python-gevent)
2448 ("python-eventlet" ,python-eventlet)))
2449 (home-page "https://www.pykka.org/")
2450 (synopsis "Pykka is a Python implementation of the actor model")
2451 (description
2452 "Pykka is a Python implementation of the actor model.
2453The actor model introduces some simple rules to control the sharing
2454of state and cooperation between execution units, which makes it
2455easier to build concurrent applications.")
2456 (license license:asl2.0)))
2457
2458(define-public python2-pykka
2459 (package-with-python2 python-pykka))
2460
8d22f7e3
VC
2461(define-public python-pymsgbox
2462 (package
2463 (name "python-pymsgbox")
2464 (version "1.0.6")
2465 (source
2466 (origin
2467 (method git-fetch)
2468 (uri (git-reference
2469 ;; LICENSE.txt is not present on pypi
2470 (url "https://github.com/asweigart/PyMsgBox")
2471 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2472 (file-name (git-file-name name version))
2473 (sha256
2474 (base32
2475 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2476 (arguments
2477 ;; Circular dependency to run tests:
2478 ;; Tests need pyautogui, which depends on pymsgbox.
2479 '(#:tests? #f))
2480 (build-system python-build-system)
2481 (home-page "https://github.com/asweigart/PyMsgBox")
2482 (synopsis "Python module for JavaScript-like message boxes")
2483 (description
2484 "PyMsgBox is a simple, cross-platform, pure Python module for
2485JavaScript-like message boxes. Types of dialog boxes include:
2486@enumerate
2487@item alert
2488@item confirm
2489@item prompt
2490@item password
2491@end enumerate
2492")
2493 (license license:bsd-3)))
2494
44d10b1f
RW
2495(define-public python-pympler
2496 (package
2497 (name "python-pympler")
2498 (home-page "https://pythonhosted.org/Pympler/")
6469af6f 2499 (version "0.8")
44d10b1f
RW
2500 (source (origin
2501 (method url-fetch)
2502 (uri (pypi-uri "Pympler" version))
2503 (sha256
2504 (base32
6469af6f 2505 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
44d10b1f
RW
2506 (build-system python-build-system)
2507 (arguments
2508 `(#:phases (modify-phases %standard-phases
2509 (delete 'check)
2510 (add-after 'install 'check
2511 (lambda* (#:key inputs outputs #:allow-other-keys)
2512 (add-installed-pythonpath inputs outputs)
2513 (invoke "python" "setup.py" "test"))))))
2514 (synopsis "Measure, monitor and analyze memory behavior")
2515 (description
2516 "Pympler is a development tool to measure, monitor and analyze
2517the memory behavior of Python objects in a running Python application.
2518
2519By pympling a Python application, detailed insight in the size and the
2520lifetime of Python objects can be obtained. Undesirable or unexpected
2521runtime behavior like memory bloat and other @samp{pymples} can easily
2522be identified.
2523
2524A web profiling frontend exposes process statistics, garbage
2525visualisation and class tracker statistics.")
2526 (license license:asl2.0)))
2527
2528(define-public python2-pympler
2529 (package-with-python2 python-pympler))
2530
2531(define-public python-itsdangerous
2532 (package
2533 (name "python-itsdangerous")
acfcf2ed 2534 (version "1.1.0")
44d10b1f
RW
2535 (source
2536 (origin
2537 (method url-fetch)
acfcf2ed 2538 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2539 (sha256
2540 (base32
acfcf2ed 2541 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2542 (build-system python-build-system)
acfcf2ed 2543 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2544 (synopsis "Python library for passing data to/from untrusted environments")
2545 (description
2546 "Itsdangerous provides various helpers to pass trusted data to untrusted
2547environments and back.")
2548 (license license:bsd-3)))
2549
2550(define-public python2-itsdangerous
2551 (package-with-python2 python-itsdangerous))
2552
2553(define-public python-pyyaml
2554 (package
2555 (name "python-pyyaml")
357af7f2 2556 (version "5.3")
44d10b1f
RW
2557 (source
2558 (origin
2559 (method url-fetch)
2560 (uri (pypi-uri "PyYAML" version))
2561 (sha256
2562 (base32
357af7f2 2563 "058nd4p8f25wwzy2aiwh18wcrdm6663cqbfdkgjp8y9cp7ampx79"))))
44d10b1f
RW
2564 (build-system python-build-system)
2565 (inputs
2566 `(("libyaml" ,libyaml)))
7509f34f 2567 (home-page "https://pyyaml.org")
44d10b1f
RW
2568 (synopsis "YAML parser and emitter for Python")
2569 (description
2570 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2571complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2572API, and sensible error messages. PyYAML supports standard YAML tags and
2573provides Python-specific tags that allow to represent an arbitrary Python
2574object.")
2575 (license license:expat)))
2576
2577(define-public python2-pyyaml
2578 (package-with-python2 python-pyyaml))
2579
2580(define-public python-vine
2581 (package
2582 (name "python-vine")
2583 (version "1.1.4")
2584 (source
2585 (origin
2586 (method url-fetch)
2587 (uri (pypi-uri "vine" version))
2588 (sha256
2589 (base32
2590 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2591 (build-system python-build-system)
2592 (native-inputs
2593 `(("python-pytest" ,python-pytest)
2594 ("python-case" ,python-case)))
2595 (home-page "https://github.com/celery/vine")
2596 (synopsis "Promises for Python")
2597 (description
2598 "@code{vine} provides a special implementation of promises in that it can
2599be used both for \"promise of a value\" and lazy evaluation. The biggest
2600upside for this is that everything in a promise can also be a promise,
2601e.g. filters, callbacks and errbacks can all be promises.")
2602 (license license:bsd-3)))
2603
2604(define-public python-virtualenv
2605 (package
2606 (name "python-virtualenv")
60067279 2607 (version "20.0.10")
44d10b1f
RW
2608 (source
2609 (origin
2610 (method url-fetch)
2611 (uri (pypi-uri "virtualenv" version))
2612 (sha256
2613 (base32
60067279 2614 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
44d10b1f 2615 (build-system python-build-system)
44d10b1f
RW
2616 (native-inputs
2617 `(("python-mock" ,python-mock)
94d57ba3
JK
2618 ("python-pytest" ,python-pytest)
2619 ;; NOTE: guix lint remarks that "python-setuptools should probably not
2620 ;; be an input at all". However, removing the input makes the build error:
2621 ;; File "setup.py", line 4, in <module>
2622 ;; raise RuntimeError("setuptools >= 41 required to build")
2623 ("python-setuptools" ,python-setuptools)
2624 ("python-setuptools-scm" ,python-setuptools-scm)))
828996bb 2625 (propagated-inputs
94d57ba3
JK
2626 `(("python-appdirs" ,python-appdirs)
2627 ("python-distlib" ,python-distlib)
2628 ("python-filelock" ,python-filelock)
2629 ("python-six" ,python-six)
2630 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
2631 (home-page "https://virtualenv.pypa.io/")
2632 (synopsis "Virtual Python environment builder")
2633 (description
2634 "Virtualenv is a tool to create isolated Python environments.")
7815afc9 2635 (properties `((python2-variant . ,(delay python2-virtualenv))))
44d10b1f
RW
2636 (license license:expat)))
2637
2638(define-public python2-virtualenv
7815afc9
MB
2639 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
2640 (package
2641 (inherit base)
2642 (arguments
2643 `(#:python ,python-2
2644 #:phases
2645 (modify-phases %standard-phases
2646 (add-after 'set-paths 'adjust-PYTHONPATH
2647 (lambda* (#:key inputs #:allow-other-keys)
2648 (let* ((python (assoc-ref inputs "python"))
2649 (python-sitedir (string-append python "/lib/python2.7"
2650 "/site-packages")))
2651 ;; XXX: 'python2' always comes first on PYTHONPATH
2652 ;; and shadows the 'setuptools' input. Move python2
2653 ;; last: this should be fixed in python-build-system
2654 ;; in a future rebuild cycle.
2655 (setenv "PYTHONPATH"
2656 (string-append (string-join (delete python-sitedir
2657 (string-split
2658 (getenv "PYTHONPATH")
2659 #\:))
2660 ":")
2661 ":" python-sitedir))
2662 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
2663 (getenv "PYTHONPATH"))
2664 #t))))))
2665 (propagated-inputs
2666 `(("python-contextlib2" ,python2-contextlib2)
2667 ,@(package-propagated-inputs base))))))
44d10b1f
RW
2668
2669(define-public python-markupsafe
2670 (package
2671 (name "python-markupsafe")
753eb411 2672 (version "1.1.1")
44d10b1f
RW
2673 (source
2674 (origin
2675 (method url-fetch)
5182927c 2676 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2677 (sha256
2678 (base32
753eb411 2679 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2680 (build-system python-build-system)
753eb411
MB
2681 (arguments
2682 `(#:modules ((ice-9 ftw)
2683 (srfi srfi-1)
2684 (srfi srfi-26)
2685 (guix build utils)
2686 (guix build python-build-system))
2687 #:phases (modify-phases %standard-phases
2688 (replace 'check
2689 (lambda _
2690 (let ((cwd (getcwd))
2691 (libdir (find (cut string-prefix? "lib." <>)
2692 (scandir "build"))))
2693 (setenv "PYTHONPATH"
2694 (string-append cwd "/build/" libdir ":"
2695 (getenv "PYTHONPATH")))
2696 (invoke "pytest" "-vv")))))))
2697 (native-inputs
2698 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2699 (home-page "https://github.com/mitsuhiko/markupsafe")
2700 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2701 (description
2702 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2703for Python.")
2704 (license license:bsd-3)))
2705
2706(define-public python2-markupsafe
2707 (package-with-python2 python-markupsafe))
2708
2709(define-public python-jinja2
2710 (package
2711 (name "python-jinja2")
3c8ad087 2712 (version "2.11.1")
44d10b1f
RW
2713 (source
2714 (origin
2715 (method url-fetch)
2716 (uri (pypi-uri "Jinja2" version))
2717 (sha256
2718 (base32
3c8ad087 2719 "0l72c11n959yzb8d3ankckb6yhjhm6x729zm7rkpk040qzxpy64k"))))
44d10b1f 2720 (build-system python-build-system)
dce9b8b5
MB
2721 (arguments
2722 '(#:phases (modify-phases %standard-phases
2723 (replace 'check
2724 (lambda* (#:key tests? #:allow-other-keys)
2725 (if tests?
2726 (begin
2727 (setenv "PYTHONPATH"
2728 (string-append "./build/lib:"
2729 (getenv "PYTHONPATH")))
2730 (invoke "pytest" "-vv"))
2731 (format #t "test suite not run~%"))
2732 #t)))))
2733 (native-inputs
2734 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2735 (propagated-inputs
2736 `(("python-markupsafe" ,python-markupsafe)))
2737 (home-page "http://jinja.pocoo.org/")
2738 (synopsis "Python template engine")
2739 (description
2740 "Jinja2 is a small but fast and easy to use stand-alone template engine
2741written in pure Python.")
2742 (license license:bsd-3)))
2743
2744(define-public python2-jinja2
2745 (package-with-python2 python-jinja2))
2746
ba42a6bf
TLC
2747(define-public python-jinja2-time
2748 (package
2749 (name "python-jinja2-time")
2750 (version "0.2.0")
2751 (source
2752 (origin
2753 (method url-fetch)
2754 (uri (pypi-uri "jinja2-time" version))
2755 (sha256
2756 (base32
2757 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2758 (build-system python-build-system)
2759 (propagated-inputs
2760 `(("python-arrow" ,python-arrow)
2761 ("python-jinja2" ,python-jinja2)))
2762 (home-page
2763 "https://github.com/hackebrot/jinja2-time")
2764 (synopsis "Jinja2 Extension for Dates and Times")
2765 (description
2766 "This package provides an extension for the template engine Jinja2. It
2767adds a 'now' tag providing a convenient access to the arrow.now() API from
2768templates. A format string can be provided to control the output.")
2769 (license license:expat)))
2770
44d10b1f
RW
2771(define-public python-pystache
2772 (package
2773 (name "python-pystache")
2774 (version "0.5.4")
2775 (source (origin
2776 (method url-fetch)
2777 (uri (pypi-uri "pystache" version))
2778 (sha256
2779 (base32
2780 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2781 (build-system python-build-system)
2782 (arguments
2783 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2784 (home-page "http://defunkt.io/pystache/")
2785 (synopsis "Python logic-less template engine")
2786 (description
2787 "Pystache is a Python implementation of the framework agnostic,
2788logic-free templating system Mustache.")
2789 (license license:expat)
2790 (properties `((python2-variant . ,(delay python2-pystache))))))
2791
2792(define-public python2-pystache
2793 (package (inherit (package-with-python2
2794 (strip-python2-variant python-pystache)))
2795 (arguments
2796 `(#:python ,python-2
2797 #:phases
2798 (modify-phases %standard-phases
2799 (replace 'check
2800 (lambda _
dfafc29b 2801 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2802
2803(define-public python-joblib
2804 (package
2805 (name "python-joblib")
23bc9a35 2806 (version "0.14.1")
44d10b1f
RW
2807 (source (origin
2808 (method url-fetch)
2809 (uri (pypi-uri "joblib" version))
2810 (sha256
2811 (base32
23bc9a35 2812 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
44d10b1f
RW
2813 (build-system python-build-system)
2814 (arguments
2815 `(#:phases
2816 (modify-phases %standard-phases
2817 (replace 'check
2818 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2819 (native-inputs
2820 `(("python-pytest" ,python-pytest)))
2821 (home-page "https://joblib.readthedocs.io/")
2822 (synopsis "Using Python functions as pipeline jobs")
2823 (description
2824 "Joblib is a set of tools to provide lightweight pipelining in Python.
2825In particular, joblib offers: transparent disk-caching of the output values
2826and lazy re-evaluation (memoize pattern), easy simple parallel computing
2827logging and tracing of the execution.")
2828 (license license:bsd-3)))
2829
2830(define-public python2-joblib
2831 (package-with-python2 python-joblib))
2832
a3363341
VC
2833(define-public python-daemon
2834 (package
2835 (name "python-daemon")
2836 (version "2.2.3")
2837 (source
2838 (origin
2839 (method url-fetch)
2840 (uri (pypi-uri "python-daemon" version))
2841 (sha256
2842 (base32
2843 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2844 (build-system python-build-system)
2845 (arguments
2846 `(#:phases
2847 (modify-phases %standard-phases
2848 (add-before 'check 'disable-tests
2849 (lambda _
2850 ;; FIXME: Determine why test fails
2851 (substitute* "test/test_daemon.py"
2852 (("test_detaches_process_context")
2853 "skip_test_detaches_process_context"))
2854 #t)))))
2855 (propagated-inputs
2856 `(("python-lockfile" ,python-lockfile)))
2857 (native-inputs
2858 `(("python-unittest2" ,python-unittest2)
2859 ("python-testtools" ,python-testtools)
2860 ("python-testscenarios" ,python-testscenarios)
2861 ("python-mock" ,python-mock)
2862 ("python-docutils" ,python-docutils)))
2863 (home-page "https://pagure.io/python-daemon/")
2864 (synopsis "Python library for making a Unix daemon process")
2865 (description "Python-daemon is a library that assists a Python program to
2866turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2867
2868This library provides a @code{DaemonContext} class that manages the following
2869important tasks for becoming a daemon process:
2870@enumerate
2871@item Detach the process into its own process group.
2872@item Set process environment appropriate for running inside a chroot.
2873@item Renounce suid and sgid privileges.
2874@item Close all open file descriptors.
2875@item Change the working directory, uid, gid, and umask.
2876@item Set appropriate signal handlers.
2877@item Open new file descriptors for stdin, stdout, and stderr.
2878@item Manage a specified PID lock file.
2879@item Register cleanup functions for at-exit processing.
2880@end enumerate")
2881 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2882 (license (list license:asl2.0 license:gpl3+))))
2883
544ea9c2
MB
2884(define-public python-anytree
2885 (package
2886 (name "python-anytree")
2887 (version "2.8.0")
2888 (source (origin
2889 (method url-fetch)
2890 (uri (pypi-uri "anytree" version))
2891 (sha256
2892 (base32
2893 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2894 (build-system python-build-system)
2895 (propagated-inputs
2896 `(("python-six" ,python-six)))
2897 (native-inputs
2898 `(;; For tests.
2899 ("graphviz" ,graphviz) ;for 'dot'
2900 ("python-nose" ,python-nose)))
2901 (home-page "https://github.com/c0fec0de/anytree")
2902 (synopsis "Lightweight tree data library")
2903 (description
2904 "@code{anytree} is a simple, lightweight, and extensible tree data
2905structure for Python.")
2906 (license license:asl2.0)))
2907
44d10b1f
RW
2908(define-public python-docutils
2909 (package
2910 (name "python-docutils")
da8e8dc6 2911 (version "0.16")
44d10b1f
RW
2912 (source
2913 (origin
2914 (method url-fetch)
2915 (uri (pypi-uri "docutils" version))
2916 (sha256
2917 (base32
da8e8dc6 2918 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
44d10b1f
RW
2919 (build-system python-build-system)
2920 (arguments
8cf5c9fa
MB
2921 '(#:phases (modify-phases %standard-phases
2922 (replace 'check
2923 (lambda* (#:key tests? #:allow-other-keys)
2924 (if tests?
2925 (invoke "python" "test/alltests.py")
2926 (format #t "test suite not run~%"))
2927 #t)))))
44d10b1f
RW
2928 (home-page "http://docutils.sourceforge.net/")
2929 (synopsis "Python Documentation Utilities")
2930 (description
2931 "Docutils is a modular system for processing documentation into useful
2932formats, such as HTML, XML, and LaTeX. For input Docutils supports
2933reStructuredText.")
2934 ;; Most of the source code is public domain, but some source files are
2935 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2936 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2937
2938(define-public python2-docutils
2939 (package-with-python2 python-docutils))
2940
4510aeb9
MB
2941;; python2-sphinx fails its test suite with newer versions.
2942(define-public python2-docutils-0.14
2943 (package
2944 (inherit python2-docutils)
2945 (version "0.14")
2946 (source (origin
2947 (method url-fetch)
2948 (uri (pypi-uri "docutils" version))
2949 (sha256
2950 (base32
2951 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
2952
44d10b1f
RW
2953(define-public python-pygments
2954 (package
2955 (name "python-pygments")
69002b21 2956 (version "2.5.2")
44d10b1f
RW
2957 (source
2958 (origin
2959 (method url-fetch)
2960 (uri (pypi-uri "Pygments" version))
2961 (sha256
2962 (base32
69002b21 2963 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
44d10b1f
RW
2964 (build-system python-build-system)
2965 (arguments
2966 ;; FIXME: Tests require sphinx, which depends on this.
2967 '(#:tests? #f))
69002b21 2968 (home-page "https://pygments.org/")
44d10b1f
RW
2969 (synopsis "Syntax highlighting")
2970 (description
2971 "Pygments is a syntax highlighting package written in Python.")
2972 (license license:bsd-2)))
2973
2974(define-public python2-pygments
2975 (package-with-python2 python-pygments))
2976
0f0a5ef9
MC
2977(define-public python-bumpversion
2978 (package
2979 (name "python-bumpversion")
2980 (version "0.5.3")
2981 (source
2982 (origin
2983 (method url-fetch)
2984 (uri (pypi-uri "bumpversion" version))
2985 (sha256
2986 (base32
2987 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2988 (build-system python-build-system)
2989 (home-page "https://github.com/peritus/bumpversion")
2990 (synopsis "Tool to bump software version")
2991 (description "This tool provides a command-line interface (CLI) to bump a
2992software version simply.")
2993 (license license:expat)))
2994
b24fd2c2
MC
2995(define-public python-deprecated
2996 (package
2997 (name "python-deprecated")
2998 (version "1.2.5")
2999 (source
3000 (origin
3001 (method git-fetch)
3002 (uri (git-reference
3003 (url "https://github.com/tantale/deprecated.git")
3004 (commit (string-append "v" version))))
3005 (file-name (git-file-name name version))
3006 (sha256
3007 (base32
3008 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3009 (build-system python-build-system)
3010 (arguments
3011 `(#:phases (modify-phases %standard-phases
3012 (replace 'check
3013 (lambda _
3014 (invoke "pytest"))))))
3015 (propagated-inputs
3016 `(("python-wrapt" ,python-wrapt)))
3017 (native-inputs
3018 `(("python-bumpversion" ,python-bumpversion)
3019 ("python-pytest" ,python-pytest)
3020 ("python-pytest-cov" ,python-pytest-cov)
3021 ("python-sphinx" ,python-sphinx)
3022 ("python-tox" ,python-tox)))
3023 (home-page "https://github.com/tantale/deprecated")
3024 (synopsis "Python decorator to deprecate classes, functions or methods")
3025 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3026to deprecate classes, functions or methods.")
3027 (license license:expat)))
3028
d5a998fa
MC
3029(define-public python-pygithub
3030 (package
3031 (name "python-pygithub")
749e38d7 3032 (version "1.43.8")
d5a998fa
MC
3033 (source
3034 ;; We fetch from the Git repo because there are no tests in the PyPI
3035 ;; archive.
3036 (origin
3037 (method git-fetch)
3038 (uri (git-reference
3039 (url "https://github.com/PyGithub/PyGithub.git")
3040 (commit (string-append "v" version))))
3041 (file-name (git-file-name name version))
3042 (sha256
749e38d7 3043 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
3044 (build-system python-build-system)
3045 (arguments
3046 `(#:phases (modify-phases %standard-phases
3047 ;; Some tests rely on the network.
3048 (add-after 'unpack 'disable-failing-tests
3049 (lambda _
3050 (substitute* "tests/Issue142.py"
3051 (("testDecodeJson") "disabled_testDecodeJson"))
3052 #t))
3053 (add-before 'check 'prepare-for-tests
3054 (lambda _
3055 (for-each (lambda (f)
3056 (chmod f #o666))
3057 (find-files "./tests"))
3058 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3059 (setenv "PYTHONPATH"
3060 (string-append "./tests:" (getenv "PYTHONPATH")))
3061 #t)))))
3062 (propagated-inputs
3063 `(("python-deprecated" ,python-deprecated)
3064 ("python-pyjwt" ,python-pyjwt)
3065 ("python-requests" ,python-requests)))
3066 (native-inputs `(("python-httpretty" ,python-httpretty)))
3067 (home-page "https://pygithub.readthedocs.io/en/latest/")
3068 (synopsis "Python library for the GitHub API")
3069 (description "This library allows managing GitHub resources such as
3070repositories, user profiles, and organizations in your Python applications,
3071using version 3 of the GitHub application programming interface (API).")
3072 (license license:lgpl3+)))
3073
c0c0bb38
MC
3074(define-public python-rellu
3075 (package
3076 (name "python-rellu")
3077 (version "0.7")
3078 (source
3079 (origin
3080 (method url-fetch)
3081 (uri (pypi-uri "rellu" version))
3082 (sha256
3083 (base32
3084 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3085 (build-system python-build-system)
3086 (propagated-inputs
3087 `(("python-invoke" ,python-invoke)
3088 ("python-pygithub" ,python-pygithub)))
3089 (home-page "https://github.com/robotframework/rellu")
3090 (synopsis "Utilities to create PyPI releases")
3091 (description "This collection of utilities contains tooling and templates
3092to assist in creating releases on GitHub and publishing them on PyPI. It is
3093designed to be used by Robot Framework and tools and libraries in its
3094ecosystem, but can naturally be used also by other projects.")
3095 (license license:asl2.0)))
3096
b9790285
MC
3097(define-public python-robotframework
3098 (package
3099 (name "python-robotframework")
1710b8f8 3100 (version "3.1.2")
b9790285
MC
3101 ;; There are no tests in the PyPI archive.
3102 (source
3103 (origin
3104 (method git-fetch)
3105 (uri (git-reference
3106 (url "https://github.com/robotframework/robotframework.git")
3107 (commit (string-append "v" version))))
3108 (file-name (git-file-name name version))
3109 (sha256
1710b8f8 3110 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
3111 (patches (search-patches
3112 "python-robotframework-honor-source-date-epoch.patch"))))
3113 (build-system python-build-system)
3114 (arguments
3115 `(#:phases (modify-phases %standard-phases
3116 (add-before 'build 'build-and-install-doc
3117 (lambda* (#:key outputs #:allow-other-keys)
3118 (let* ((doc-output (assoc-ref outputs "doc"))
3119 (doc (string-append doc-output "/share/"
3120 ,name "-" ,version "/")))
3121 (invoke "invoke" "library-docs" "all")
3122 (mkdir-p doc)
3123 (copy-recursively "doc/libraries"
3124 (string-append doc "/libraries"))
3125 #t)))
3126 (replace 'check
3127 (lambda _
3128 (invoke "python" "utest/run.py"))))))
3129 (native-inputs
3130 `(("python-invoke" ,python-invoke)
3131 ("python-rellu" ,python-rellu)
3132 ("python:tk" ,python "tk"))) ;used when building the HTML doc
3133 (outputs '("out" "doc"))
3134 (home-page "https://robotframework.org")
3135 (synopsis "Generic automation framework")
3136 (description "Robot Framework is a generic automation framework for
3137acceptance testing, acceptance test driven development (ATDD), and robotic
3138process automation (RPA).")
3139 (license license:asl2.0)))
3140
5b84c120
MC
3141(define-public python-robotframework-lint
3142 ;; There is no properly tagged release; the commit below seems to correspond
3143 ;; to the 0.9 stable release available from PyPI. The tests are not
3144 ;; included in the PyPI archive, so we fetch the sources from the upstream
3145 ;; Git repo.
3146 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
3147 (revision "1"))
3148 (package
3149 (name "python-robotframework-lint")
3150 (version (git-version "0.9.0" revision commit))
3151 (source
3152 (origin
3153 (method git-fetch)
3154 (uri (git-reference
3155 (url "https://github.com/boakley/robotframework-lint.git")
3156 (commit commit)))
3157 (file-name (git-file-name name version))
3158 (sha256
3159 (base32
3160 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
3161 (build-system python-build-system)
3162 (arguments
3163 `(#:phases
3164 (modify-phases %standard-phases
3165 (replace 'check
3166 (lambda _
3167 (invoke "python" "-m" "robot" "-A"
3168 "tests/conf/default.args" "tests"))))))
3169 (propagated-inputs
3170 `(("python-robotframework" ,python-robotframework)))
3171 (home-page "https://github.com/boakley/robotframework-lint/")
3172 (synopsis "Static analysis tool (linter) for Robot Framework")
3173 (description "This package provides the @code{rflint} command-line
3174utility, a static analysis tool (linter) for Robot Framework source files.")
3175 (license license:asl2.0))))
3176
c0c64f17
MC
3177(define-public python-robotframework-sshlibrary
3178 (package
3179 (name "python-robotframework-sshlibrary")
3180 (version "3.3.0")
3181 ;; There are no tests in the PyPI archive.
3182 (source
3183 (origin
3184 (method git-fetch)
3185 (uri (git-reference
3186 (url "https://github.com/robotframework/SSHLibrary.git")
3187 (commit (string-append "v" version))))
3188 (file-name (git-file-name name version))
3189 (sha256
3190 (base32
3191 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3192 (build-system python-build-system)
3193 (arguments
3194 `(#:phases
3195 (modify-phases %standard-phases
3196 (add-before 'build 'build-and-install-doc
3197 (lambda* (#:key outputs #:allow-other-keys)
3198 (let* ((doc-output (assoc-ref outputs "doc"))
3199 (doc (string-append doc-output "/share/"
3200 ,name "-" ,version "/")))
3201 (invoke "chmod" "-R" "+w" "docs")
3202 (invoke "invoke" "kw-docs" "project-docs")
3203 (mkdir-p doc)
3204 (for-each delete-file (find-files "docs" "\\.rst"))
3205 (copy-recursively "docs" doc)
3206 #t)))
3207 (replace 'check
3208 (lambda _
3209 ;; Some tests require an SSH server; we remove them.
3210 (delete-file "utest/test_client_api.py")
3211 (delete-file "utest/test_scp.py")
3212 (invoke "python" "utest/run.py"))))))
3213 (propagated-inputs
3214 `(("python-robotframework" ,python-robotframework)
3215 ("python-paramiko" ,python-paramiko)
3216 ("python-scp" ,python-scp)))
3217 (native-inputs
3218 `(("openssh" ,openssh)
3219 ("which" ,which)
3220 ;; To generate the documentation
3221 ("python-docutils" ,python-docutils)
3222 ("python-invoke" ,python-invoke)
3223 ("python-pygments" ,python-pygments)
3224 ("python-rellu" ,python-rellu)))
3225 (outputs '("out" "doc"))
3226 (home-page "https://github.com/robotframework/SSHLibrary")
3227 (synopsis "Robot Framework library for SSH and SFTP")
3228 (description "SSHLibrary is a Robot Framework library providing support
3229for SSH and SFTP. It has the following main usages:
3230@itemize @bullet
3231@item Executing commands on the remote machine, either blocking or non-blocking.
3232@item Writing and reading in an interactive shell.
3233@item Transferring files and directories over SFTP.
3234@item Ensuring that files and directories exist on the remote machine.
3235@end itemize")
3236 (license license:asl2.0)))
3237
b1daba94
VC
3238(define-public python-rstr
3239 (package
3240 (name "python-rstr")
3241 (version "2.2.6")
3242 (source
3243 (origin
3244 (method url-fetch)
3245 (uri (pypi-uri "rstr" version))
3246 (sha256
3247 (base32
3248 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3249 (build-system python-build-system)
3250 (home-page
3251 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3252 (synopsis "Generate random strings in Python")
3253 (description "This package provides a python module for generating
3254random strings of various types. It could be useful for fuzz testing,
3255generating dummy data, or other applications. It has no dependencies
3256outside the standard library.")
3257 (license license:bsd-3)))
3258
13d825fc
MC
3259(define-public python-scp
3260 (package
3261 (name "python-scp")
3262 (version "0.13.2")
3263 (source
3264 (origin
3265 (method url-fetch)
3266 (uri (pypi-uri "scp" version))
3267 (sha256
3268 (base32
3269 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3270 (build-system python-build-system)
3271 (arguments
3272 '(#:tests? #f)) ;tests require an SSH server
3273 (propagated-inputs
3274 `(("python-paramiko" ,python-paramiko)))
3275 (home-page "https://github.com/jbardin/scp.py")
3276 (synopsis "SCP protocol module for Python and Paramiko")
3277 (description "The scp module extends the Paramiko library to send and
3278receive files via the SCP1 protocol, as implemented by the OpenSSH
3279@command{scp} program.")
3280 (license license:gpl2+)))
3281
44d10b1f
RW
3282(define-public python-rst.linker
3283 (package
3284 (name "python-rst.linker")
d37e8e53 3285 (version "1.11")
44d10b1f
RW
3286 (source
3287 (origin
3288 (method url-fetch)
3289 (uri (pypi-uri "rst.linker" version))
3290 (sha256
d37e8e53 3291 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
3292 (build-system python-build-system)
3293 (propagated-inputs
3294 `(("python-dateutil" ,python-dateutil)
3295 ("python-six" ,python-six)))
3296 (native-inputs
3297 `(("python-setuptools-scm" ,python-setuptools-scm)))
3298 ;; Test would require path.py, which would introduce a cyclic dependence.
3299 (arguments `(#:tests? #f))
3300 ;; Note: As of version 1.7 the documentation is not worth building.
3301 (home-page "https://github.com/jaraco/rst.linker")
3302 (synopsis "Sphinx plugin to add links and timestamps")
3303 (description "rst.linker allows to automatically replace text by a
3304reStructuredText external reference or timestamps. It's primary purpose is to
3305augment the changelog, but it can be used for other documents, too.")
3306 (license license:expat)))
3307
3308(define-public python2-rst.linker
3309 (package-with-python2 python-rst.linker))
3310
3311(define-public python-feedgenerator
3312 (package
3313 (name "python-feedgenerator")
3314 (version "1.9")
3315 (source
3316 (origin
3317 (method url-fetch)
3318 (uri (pypi-uri "feedgenerator" version))
3319 (sha256
3320 (base32
3321 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3322 (modules '((guix build utils)))
3323 (snippet
3324 '(begin
3325 ;; Remove pre-compiled .pyc files from source.
3326 (for-each delete-file-recursively
3327 (find-files "." "__pycache__" #:directories? #t))
3328 (for-each delete-file (find-files "." "\\.pyc$"))
3329 #t))))
3330 (build-system python-build-system)
3331 (propagated-inputs
3332 `(("python-pytz" ,python-pytz)
3333 ("python-six" ,python-six)))
3334 (home-page "https://github.com/getpelican/feedgenerator")
3335 (synopsis
3336 "Standalone version of Django's Atom/RSS feed generator")
3337 (description
3338 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3339which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3340 (license license:bsd-3)))
3341
3342(define-public python2-feedgenerator
3343 (package-with-python2 python-feedgenerator))
3344
3345(define-public python-toml
3346 (package
3347 (name "python-toml")
3348 (version "0.9.4")
3349 (source
3350 (origin
3351 (method url-fetch)
3352 (uri (pypi-uri "toml" version))
3353 (sha256
3354 (base32
3355 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3356 (build-system python-build-system)
3357 (arguments
3358 `(#:tests? #f)) ;no tests suite in release
3359 (home-page "https://github.com/uiri/toml")
3360 (synopsis "Library for TOML")
3361 (description
3362 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3363Language (TOML) configuration files.")
3364 (license license:expat)))
3365
346c8752
BG
3366(define-public python-jsonrpc-server
3367 (package
3368 (name "python-jsonrpc-server")
d6cf4c6e 3369 (version "0.3.2")
346c8752
BG
3370 (source
3371 (origin
3372 (method url-fetch)
3373 (uri (pypi-uri "python-jsonrpc-server" version))
3374 (sha256
3375 (base32
d6cf4c6e 3376 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
346c8752
BG
3377 (build-system python-build-system)
3378 (propagated-inputs
3379 `(("python-future" ,python-future)
3380 ("python-mock" ,python-mock)
d6cf4c6e
BG
3381 ("python-pytest" ,python-pytest)
3382 ("python-ujson" ,python-ujson)))
346c8752
BG
3383 (home-page
3384 "https://github.com/palantir/python-jsonrpc-server")
3385 (synopsis "JSON RPC 2.0 server library")
3386 (description
1df5407c 3387 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3388 (license license:expat)))
3389
56f4ad47
BG
3390(define-public python-pydocstyle
3391 (package
3392 (name "python-pydocstyle")
3393 (version "3.0.0")
3394 (source
3395 (origin
3396 (method url-fetch)
3397 (uri (pypi-uri "pydocstyle" version))
3398 (sha256
3399 (base32
3400 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3401 (build-system python-build-system)
3402 (propagated-inputs
3403 `(("python-six" ,python-six)
3404 ("python-snowballstemmer" ,python-snowballstemmer)))
3405 (home-page
3406 "https://github.com/PyCQA/pydocstyle/")
3407 (synopsis "Python docstring style checker")
3408 (description
3409 "This package provides a style checker for the Python Language
3410Server (PLS).")
3411 (license license:expat)))
3412
be4d840c 3413(define-public python-language-server
808dd2d0
BL
3414 (package
3415 (name "python-language-server")
a42f1420 3416 (version "0.31.7")
808dd2d0
BL
3417 (source
3418 (origin
3419 (method url-fetch)
3420 (uri (pypi-uri "python-language-server" version))
3421 (sha256
3422 (base32
a42f1420 3423 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
808dd2d0
BL
3424 (build-system python-build-system)
3425 (propagated-inputs
3426 `(("python-pluggy" ,python-pluggy)
3427 ("python-jsonrpc-server" ,python-jsonrpc-server)
3428 ("python-jedi" ,python-jedi)
3429 ("python-yapf" ,python-yapf)
3430 ("python-pyflakes" ,python-pyflakes)
3431 ("python-pydocstyle" ,python-pydocstyle)
3432 ("python-pycodestyle" ,python-pycodestyle)
3433 ("python-mccabe" ,python-mccabe)
3434 ("python-rope" ,python-rope)
3435 ("python-autopep8" ,python-autopep8)
3436 ("python-flake8" ,python-flake8)
3437 ("python-pylint" ,python-pylint)))
3438 (home-page "https://github.com/palantir/python-language-server")
3439 (synopsis "Python implementation of the Language Server Protocol")
3440 (description
3441 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3442language specification for the Language Server Protocol (LSP). This tool is
3443used in text editing environments to provide a complete and integrated
3444feature-set for programming Python effectively.")
808dd2d0 3445 (license license:expat)))
be4d840c 3446
c777ecb3
RW
3447(define-public python-pathspec
3448 (package
3449 (name "python-pathspec")
3450 (version "0.7.0")
3451 (source
3452 (origin
3453 (method url-fetch)
3454 (uri (pypi-uri "pathspec" version))
3455 (sha256
3456 (base32
3457 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
3458 (build-system python-build-system)
3459 (home-page "https://github.com/cpburnz/python-path-specification")
3460 (synopsis "Utility library for gitignore style pattern matching of file paths")
3461 (description
3462 "This package provides a utility library for gitignore style pattern
3463matching of file paths.")
3464 (license license:mpl2.0)))
3465
44d10b1f
RW
3466(define-public python-black
3467 (package
3468 (name "python-black")
5f603fab 3469 (version "19.10b0")
44d10b1f
RW
3470 (source
3471 (origin
3472 (method url-fetch)
3473 (uri (pypi-uri "black" version))
3474 (sha256
3475 (base32
5f603fab 3476 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
44d10b1f
RW
3477 (build-system python-build-system)
3478 (arguments
3479 `(#:phases
3480 (modify-phases %standard-phases
3481 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3482 (lambda _
3483 (let ((python3 (which "python3")))
3484 (substitute* '("tests/data/fmtonoff.py"
3485 "tests/data/string_prefixes.py"
5f603fab
RW
3486 "tests/data/function.py"
3487 "tests/data/python37.py")
44d10b1f
RW
3488 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3489 (string-append "#!" python3 (if (string? minor-version)
3490 minor-version
5f603fab
RW
3491 "")))))
3492 #t))
3493 (add-after 'unpack 'disable-broken-tests
3494 (lambda _
3495 ;; These tests are supposed to be skipped when the blackd
3496 ;; dependencies are missing, but this doesn't quite work.
3497 (substitute* "tests/test_black.py"
3498 (("( *)class BlackDTestCase.*" match indent)
3499 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
3500 indent "class BlackDTestCase(unittest.TestCase):\n"))
3501 (("web.Application") "False")
3502 (("@unittest_run_loop") ""))
3503
3504 ;; Patching the above file breaks the self test
3505 (substitute* "tests/test_black.py"
3506 (("( *)def test_self" match indent)
3507 (string-append indent "@unittest.skip(\"guix\")\n" match)))
3508 #t)))))
44d10b1f
RW
3509 (propagated-inputs
3510 `(("python-click" ,python-click)
3511 ("python-attrs" ,python-attrs)
3512 ("python-appdirs" ,python-appdirs)
5f603fab
RW
3513 ("python-pathspec" ,python-pathspec)
3514 ("python-regex" ,python-regex)
3515 ("python-toml" ,python-toml)
3516 ("python-typed-ast" ,python-typed-ast)))
3517 (native-inputs
3518 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
3519 (home-page "https://github.com/ambv/black")
3520 (synopsis "The uncompromising code formatter")
3521 (description "Black is the uncompromising Python code formatter.")
3522 (license license:expat)))
3523
3524(define-public python-blinker
3525 (package
3526 (name "python-blinker")
3527 (version "1.4")
3528 (source
3529 (origin
3530 (method url-fetch)
3531 (uri (pypi-uri "blinker" version))
3532 (sha256
3533 (base32
3534 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3535 (build-system python-build-system)
d46646d9 3536 (home-page "https://pythonhosted.org/blinker/")
44d10b1f
RW
3537 (synopsis "Fast, simple object-to-object and broadcast signaling")
3538 (description
3539 "Blinker provides a fast dispatching system that allows any number of
3540interested parties to subscribe to events, or \"signals\".")
3541 (license license:expat)))
3542
3543(define-public python2-blinker
3544 (package-with-python2 python-blinker))
3545
3546(define-public pelican
3547 (package
3548 (name "pelican")
fa9e3b5e 3549 (version "4.2.0")
44d10b1f
RW
3550 (source
3551 (origin
3552 (method url-fetch)
3553 (uri (pypi-uri "pelican" version))
3554 (sha256
3555 (base32
fa9e3b5e 3556 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
44d10b1f
RW
3557 (build-system python-build-system)
3558 (propagated-inputs
fa9e3b5e
VC
3559 `(("python-blinker" ,python-blinker)
3560 ("python-dateutil" ,python-dateutil)
3561 ("python-docutils" ,python-docutils)
3562 ("python-feedgenerator" ,python-feedgenerator)
44d10b1f 3563 ("python-jinja2" ,python-jinja2)
fa9e3b5e 3564 ("python-markdown" ,python-markdown)
44d10b1f 3565 ("python-pygments" ,python-pygments)
44d10b1f 3566 ("python-pytz" ,python-pytz)
44d10b1f 3567 ("python-six" ,python-six)
fa9e3b5e 3568 ("python-unidecode" ,python-unidecode)))
44d10b1f
RW
3569 (home-page "https://getpelican.com/")
3570 (arguments
3571 `(;; XXX Requires a lot more packages to do unit tests :P
fa9e3b5e 3572 #:tests? #f))
44d10b1f
RW
3573 (synopsis "Python-based static site publishing system")
3574 (description
3575 "Pelican is a tool to generate a static blog from reStructuredText,
3576Markdown input files, and more. Pelican uses Jinja2 for templating
3577and is very extensible.")
3578 (license license:agpl3+)))
3579
8c141421
JH
3580(define-public mallard-ducktype
3581 (package
3582 (name "mallard-ducktype")
12cc3da5 3583 (version "1.0.2")
8c141421
JH
3584 (source
3585 (origin
3586 (method git-fetch)
12cc3da5
JH
3587 ;; git-reference because tests are not included in pypi source tarball
3588 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3589 (uri (git-reference
3590 (url "https://github.com/projectmallard/mallard-ducktype.git")
3591 (commit version)))
3592 (file-name (git-file-name name version))
3593 (sha256
3594 (base32
12cc3da5 3595 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3596 (build-system python-build-system)
5246655f
EF
3597 (arguments
3598 '(#:phases
3599 (modify-phases %standard-phases
3600 (replace 'check
3601 (lambda _
3602 (with-directory-excursion "tests"
3603 (invoke "sh" "runtests")))))))
8c141421
JH
3604 (home-page "http://projectmallard.org")
3605 (synopsis "Convert Ducktype to Mallard documentation markup")
3606 (description
3607 "Ducktype is a lightweight syntax that can represent all the semantics
3608of the Mallard XML documentation system. Ducktype files can be converted to
3609Mallard using the @command{ducktype} tool. The yelp-tools package
3610provides additional functionality on the produced Mallard documents.")
3611 (license license:expat)))
3612
44d10b1f
RW
3613(define-public python-cython
3614 (package
3615 (name "python-cython")
3220e44f 3616 (version "0.29.15")
44d10b1f
RW
3617 (source
3618 (origin
3619 (method url-fetch)
3620 (uri (pypi-uri "Cython" version))
3621 (sha256
6fd27a71 3622 (base32
3220e44f 3623 "0c5cjyxfvba6c0vih1fvhywp8bpz30vwvbjqdm1q1k55xzhmkn30"))))
44d10b1f
RW
3624 (build-system python-build-system)
3625 ;; we need the full python package and not just the python-wrapper
3626 ;; because we need libpython3.3m.so
3627 (inputs
3628 `(("python" ,python)))
3629 (arguments
3630 `(#:phases
3631 (modify-phases %standard-phases
3632 (add-before 'check 'set-HOME
3633 ;; some tests require access to "$HOME/.cython"
3634 (lambda _ (setenv "HOME" "/tmp") #t))
44d10b1f
RW
3635 (replace 'check
3636 (lambda _
e9194eb0
MB
3637 ;; Disable compiler optimizations to greatly reduce the running
3638 ;; time of the test suite.
3639 (setenv "CFLAGS" "-O0")
3640
3641 (invoke "python" "runtests.py" "-vv"
3642 "-j" (number->string (parallel-job-count))))))))
f319409b 3643 (home-page "https://cython.org/")
44d10b1f
RW
3644 (synopsis "C extensions for Python")
3645 (description "Cython is an optimising static compiler for both the Python
3646programming language and the extended Cython programming language. It makes
3647writing C extensions for Python as easy as Python itself.")
3648 (license license:asl2.0)
3649 (properties `((python2-variant . ,(delay python2-cython))))))
3650
3651(define-public python2-cython
da460865
MB
3652 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3653 (package
3654 (inherit base)
3655 (name "python2-cython")
3656 (inputs
3657 `(("python-2" ,python-2))) ;this is not automatically changed
3658 (arguments
3659 (substitute-keyword-arguments (package-arguments base)
3660 ((#:phases phases)
3661 `(modify-phases ,phases
baab9eef
MB
3662 ;; XXX: On i686-linux, running the parallel tests fails on many-core
3663 ;; systems, see <https://github.com/cython/cython/issues/2807>.
3664 ;; TODO: Move this logic to the regular check phase in a future
3665 ;; rebuild cycle.
3666 ,@(if (string-prefix? "i686" (%current-system))
3667 '((replace 'check
3668 (lambda _
3669 (setenv "CFLAGS" "-O0")
3670 (invoke "python" "runtests.py" "-vv"
3671 "-j" (number->string (parallel-job-count))
3672 "-x" "run.parallel"))))
3673 '())
da460865
MB
3674 (add-before 'check 'adjust-test_embed
3675 (lambda _
3676 (substitute* "runtests.py"
3677 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3678 ;; so it can give the right -L flag to GCC when embedding static
3679 ;; builds of Python. It is unaware that the Python "config"
3680 ;; directory (where the static library lives) was renamed in
3681 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3682 ;; which works fine, because that is where the shared library is.
3683 ;;
3684 ;; It also appears to be unaware that the Makefile in Demos/embed
3685 ;; already unconditionally pass the static library location to GCC,
3686 ;; after checking sysconfig.get_config_var('LIBPL).
3687 ;;
3688 ;; The effect is that the linker is unable to resolve libexpat
3689 ;; symbols when building for Python 2, because neither the Python 2
3690 ;; shared library nor Expat is available. To fix it, we can either
3691 ;; add Expat as an input and make it visible to the linker, or just
3692 ;; prevent it from overriding the Python shared library location.
3693 ;; The end result is identical, so we take the easy route.
3694 ((" or libname not in os\\.listdir\\(libdir\\)")
3695 ""))
3696 #t)))))))))
44d10b1f
RW
3697
3698;; The RPython toolchain currently does not support Python 3.
3699(define-public python2-rpython
3700 (package
3701 (name "python2-rpython")
3702 (version "0.2.1")
3703 (source
3704 (origin
3705 (method url-fetch)
3706 (uri (pypi-uri "rpython" version))
3707 (sha256
3708 (base32
3709 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3710 (build-system python-build-system)
3711 (arguments `(#:python ,python-2))
3712 (native-inputs
3713 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3714 (home-page "https://rpython.readthedocs.org")
3715 (synopsis "Framework for implementing interpreters and virtual machines")
3716 (description "RPython is a translation and support framework for
3717producing implementations of dynamic languages, emphasizing a clean separation
3718between language specification and implementation aspects.")
3719 (license license:expat)))
3720
3721;; NOTE: when upgrading numpy please make sure that python-pandas and
3722;; python-scipy still build, as these three packages are often used together.
3723(define-public python-numpy
3724 (package
3725 (name "python-numpy")
8e5fbd5d 3726 (version "1.17.3")
44d10b1f
RW
3727 (source
3728 (origin
3729 (method url-fetch)
3730 (uri (string-append
3731 "https://github.com/numpy/numpy/releases/download/v"
3732 version "/numpy-" version ".tar.gz"))
3733 (sha256
3734 (base32
8e5fbd5d 3735 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3736 (build-system python-build-system)
3737 (inputs
3738 `(("openblas" ,openblas)
3739 ("lapack" ,lapack)))
3740 (native-inputs
3741 `(("python-cython" ,python-cython)
3742 ("python-pytest" ,python-pytest)
3743 ("gfortran" ,gfortran)))
3744 (arguments
3745 `(#:phases
3746 (modify-phases %standard-phases
3747 (add-before 'build 'configure-blas-lapack
3748 (lambda* (#:key inputs #:allow-other-keys)
3749 (call-with-output-file "site.cfg"
3750 (lambda (port)
3751 (format port
3752 "[openblas]
3753libraries = openblas
3754library_dirs = ~a/lib
3755include_dirs = ~a/include
3756
3757# backslash-n to make emacs happy
3758\n[lapack]
3759lapack_libs = lapack
3760library_dirs = ~a/lib
3761include_dirs = ~a/include
3762"
3763 (assoc-ref inputs "openblas")
3764 (assoc-ref inputs "openblas")
3765 (assoc-ref inputs "lapack")
3766 (assoc-ref inputs "lapack"))))
3767 #t))
3768 (add-before 'build 'fix-executable-paths
3769 (lambda* (#:key inputs #:allow-other-keys)
3770 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3771 ;; instead of /bin/sh.
3772 (substitute* "numpy/distutils/exec_command.py"
3773 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3774 (string-append match-start (assoc-ref inputs "bash") match-end)))
3775 ;; Use "gcc" executable, not "cc".
3776 (substitute* "numpy/distutils/system_info.py"
3777 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3778 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3779 #t))
3780 ;; Tests can only be run after the library has been installed and not
3781 ;; within the source directory.
3782 (delete 'check)
3783 (add-after 'install 'check
3784 (lambda* (#:key outputs inputs #:allow-other-keys)
3785 ;; Make installed package available for running the tests
3786 (add-installed-pythonpath inputs outputs)
3787 ;; Make sure "f2py" etc is found.
3788 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3789 ":" (getenv "PATH")))
3790 (with-directory-excursion "/tmp"
3791 (invoke "python" "-c"
3792 "import numpy; numpy.test(verbose=2)")))))))
28191bdc 3793 (home-page "https://numpy.org")
44d10b1f
RW
3794 (synopsis "Fundamental package for scientific computing with Python")
3795 (description "NumPy is the fundamental package for scientific computing
3796with Python. It contains among other things: a powerful N-dimensional array
3797object, sophisticated (broadcasting) functions, tools for integrating C/C++
3798and Fortran code, useful linear algebra, Fourier transform, and random number
3799capabilities.")
adb396ea 3800 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3801 (license license:bsd-3)))
3802
adb396ea 3803;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3804(define-public python2-numpy
adb396ea
MB
3805 (let ((numpy (package-with-python2
3806 (strip-python2-variant python-numpy))))
3807 (package/inherit
3808 numpy
3809 (version "1.16.5")
3810 (source (origin
3811 (method url-fetch)
3812 (uri (string-append
3813 "https://github.com/numpy/numpy/releases/download/v"
3814 version "/numpy-" version ".tar.gz"))
3815 (sha256
3816 (base32
3817 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3818
3819;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3820;; interest only for legacy code going back to NumPy's predecessor
3821;; Numeric.
3822(define-public python2-numpy-1.8
3823 (package (inherit python2-numpy)
3824 (version "1.8.2")
3825 (source
3826 (origin
6b61fc47
EF
3827 (method git-fetch)
3828 (uri (git-reference
3829 (url "https://github.com/numpy/numpy")
3830 (commit (string-append "v" version))))
3831 (file-name (git-file-name "numpy" version))
44d10b1f
RW
3832 (sha256
3833 (base32
6b61fc47 3834 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
44d10b1f
RW
3835 (arguments
3836 (substitute-keyword-arguments (package-arguments python2-numpy)
3837 ((#:phases phases)
3838 `(modify-phases ,phases
3839 (replace 'configure-blas-lapack
3840 (lambda* (#:key inputs #:allow-other-keys)
3841 (call-with-output-file "site.cfg"
3842 (lambda (port)
3843 (format port
3844 "[openblas]
3845libraries = openblas,lapack
3846library_dirs = ~a/lib:~a/lib
3847include_dirs = ~a/include:~a/include
3848"
3849 (assoc-ref inputs "openblas")
3850 (assoc-ref inputs "lapack")
3851 (assoc-ref inputs "openblas")
3852 (assoc-ref inputs "lapack"))))
3853 #t))))))
3854 (native-inputs
3855 `(("python2-nose" ,python2-nose)))
3856 (description "NumPy is the fundamental package for scientific computing
3857with Python. It contains among other things: a powerful N-dimensional array
3858object, sophisticated (broadcasting) functions, tools for integrating C/C++
3859and Fortran code, useful linear algebra, Fourier transform, and random number
3860capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3861that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3862Numeric.")
3863 (license license:bsd-3)))
3864
3865(define-public python-munch
3866 (package
3867 (name "python-munch")
3868 (version "2.0.4")
3869 (source
3870 (origin
3871 (method url-fetch)
3872 (uri (pypi-uri "munch" version))
3873 (sha256
3874 (base32
3875 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3876 (build-system python-build-system)
3877 (home-page "https://github.com/Infinidat/munch")
3878 (synopsis "Dot-accessible dictionary")
3879 (description "Munch is a dot-accessible dictionary similar to JavaScript
3880objects.")
3881 (license license:expat)))
3882
3883(define-public python2-munch
3884 (package-with-python2 python-munch))
3885
3886(define-public python-colormath
3887 (package
3888 (name "python-colormath")
3889 (version "3.0.0")
3890 (source
3891 (origin
3892 (method url-fetch)
3893 (uri (pypi-uri "colormath" version))
3894 (sha256
3895 (base32
3896 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3897 (build-system python-build-system)
3898 (propagated-inputs
3899 `(("python-networkx" ,python-networkx)
3900 ("python-numpy" ,python-numpy)))
3901 (home-page "https://github.com/gtaylor/python-colormath")
3902 (synopsis "Color math and conversion library")
3903 (description
3904 "This is a Python library for color math and conversions.")
3905 (license license:bsd-3)))
3906
3907(define-public python2-colormath
3908 (package-with-python2 python-colormath))
3909
3910(define-public python-spectra
3911 (package
3912 (name "python-spectra")
3913 (version "0.0.11")
3914 (source
3915 (origin
3916 (method url-fetch)
3917 (uri (pypi-uri "spectra" version))
3918 (sha256
3919 (base32
3920 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3921 (build-system python-build-system)
3922 (arguments
3923 `(#:phases
3924 (modify-phases %standard-phases
3925 (replace 'check
38ec0f6a 3926 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3927 (propagated-inputs
3928 `(("python-colormath" ,python-colormath)))
3929 (native-inputs
3930 `(("python-nose" ,python-nose)))
3931 (home-page "https://github.com/jsvine/spectra")
3932 (synopsis "Color scales and color conversion")
3933 (description
3934 "This package provides a Python library intended to make color math,
3935color scales, and color space conversion easy. It has support for:
3936
3937@enumerate
3938@item Color scales
3939@item Color ranges
3940@item Color blending
3941@item Brightening/darkening colors
3942@item Saturating/desaturating colors
3943@item Conversion to/from multiple color spaces.
3944@end enumerate\n")
3945 (license license:expat)))
3946
3947(define-public python2-spectra
3948 (package-with-python2 python-spectra))
3949
3950(define-public python-numpy-documentation
3951 (package
3952 (name "python-numpy-documentation")
3953 (version (package-version python-numpy))
3954 (source (package-source python-numpy))
3955 (build-system python-build-system)
3956 (native-inputs
3957 `(("python-matplotlib" ,python-matplotlib)
3958 ("python-numpy" ,python-numpy)
3959 ("pkg-config" ,pkg-config)
3960 ("python-sphinx" ,python-sphinx)
3961 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3962 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3963 texlive-fonts-ec
3964 texlive-generic-ifxetex
3965 texlive-generic-pdftex
f75aa97f 3966 texlive-amsfonts
44d10b1f
RW
3967 texlive-latex-capt-of
3968 texlive-latex-cmap
3969 texlive-latex-environ
3970 texlive-latex-eqparbox
3971 texlive-latex-etoolbox
3972 texlive-latex-expdlist
3973 texlive-latex-fancyhdr
3974 texlive-latex-fancyvrb
3975 texlive-latex-fncychap
3976 texlive-latex-float
3977 texlive-latex-framed
3978 texlive-latex-geometry
3979 texlive-latex-graphics
3980 texlive-latex-hyperref
3981 texlive-latex-mdwtools
3982 texlive-latex-multirow
3983 texlive-latex-needspace
3984 texlive-latex-oberdiek
3985 texlive-latex-parskip
3986 texlive-latex-preview
3987 texlive-latex-tabulary
3988 texlive-latex-threeparttable
3989 texlive-latex-titlesec
3990 texlive-latex-trimspaces
3991 texlive-latex-ucs
3992 texlive-latex-upquote
3993 texlive-latex-url
3994 texlive-latex-varwidth
3995 texlive-latex-wrapfig)))
3996 ("texinfo" ,texinfo)
3997 ("perl" ,perl)
3998 ("scipy-sphinx-theme"
3999 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4000 (method git-fetch)
4001 (uri (git-reference
4002 (url "https://github.com/scipy/scipy-sphinx-theme.git")
4003 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4004 (sha256
4005 (base32
4006 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4007 ,@(package-native-inputs python-numpy)))
4008 (arguments
4009 `(#:tests? #f ; we're only generating the documentation
4010 #:phases
4011 (modify-phases %standard-phases
4012 (delete 'build)
4013 (replace 'install
4014 (lambda* (#:key inputs outputs #:allow-other-keys)
4015 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4016 (doc (string-append
4017 data "/doc/" ,name "-"
4018 ,(package-version python-numpy)))
4019 (info-reader (string-append data "/info"))
4020 (html (string-append doc "/html"))
4021 (scipy-sphinx-theme "scipy-sphinx-theme")
4022 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4023 (pyver ,(string-append "PYVER=")))
4024
4025 ;; FIXME: this is needed to for texlive-union to generate
4026 ;; fonts, which are not found.
4027 (setenv "HOME" "/tmp")
4028
4029 (with-directory-excursion "doc"
4030 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4031 (mkdir-p html)
4fc898da
RW
4032 (invoke "make" "html" pyver)
4033 (invoke "make" "latex" "PAPER=a4" pyver)
4034 (invoke "make" "-C" "build/latex"
44d10b1f
RW
4035 "all-pdf" "PAPER=a4" pyver)
4036 ;; FIXME: Generation of the info file fails.
4fc898da 4037 ;; (invoke "make" "info" pyver)
44d10b1f
RW
4038 ;; (mkdir-p info)
4039 ;; (copy-file "build/texinfo/numpy.info"
4040 ;; (string-append info "/numpy.info"))
4041 (for-each (lambda (file)
4042 (copy-file (string-append "build/latex" file)
4043 (string-append doc file)))
4044 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4045 (with-directory-excursion "build/html"
4046 (for-each (lambda (file)
4047 (let* ((dir (dirname file))
4048 (tgt-dir (string-append html "/" dir)))
4049 (unless (equal? "." dir)
4050 (mkdir-p tgt-dir))
4051 (install-file file html)))
4052 (find-files "." ".*")))))
4053 #t)))))
4054 (home-page (package-home-page python-numpy))
4055 (synopsis "Documentation for the python-numpy package")
4056 (description (package-description python-numpy))
4057 (license (package-license python-numpy))))
4058
4059(define-public python2-numpy-documentation
4060 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4061 (package
4062 (inherit numpy-documentation)
4063 (native-inputs `(("python2-functools32" ,python2-functools32)
4064 ,@(package-native-inputs numpy-documentation))))))
4065
4066(define-public python-pygit2
4067 (package
4068 (name "python-pygit2")
7154f5ef 4069 (version "1.1.0")
44d10b1f
RW
4070 (source
4071 (origin
4072 (method url-fetch)
4073 (uri (pypi-uri "pygit2" version))
4074 (sha256
7154f5ef 4075 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
44d10b1f
RW
4076 (build-system python-build-system)
4077 (arguments
c3ecab0d 4078 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f 4079 (propagated-inputs
7154f5ef 4080 `(("python-cached-property" ,python-cached-property)
44d10b1f 4081 ("python-cffi" ,python-cffi)
7154f5ef 4082 ("libgit2" ,libgit2)))
44d10b1f
RW
4083 (native-inputs
4084 `(("python-pytest" ,python-pytest)))
4085 (home-page "https://github.com/libgit2/pygit2")
4086 (synopsis "Python bindings for libgit2")
4087 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4088library, libgit2 implements Git plumbing.")
4089 ;; GPL2.0 only, with linking exception.
4090 (license license:gpl2)))
4091
44d10b1f
RW
4092(define-public python-pyparsing
4093 (package
4094 (name "python-pyparsing")
6d3cff5a 4095 (version "2.3.1")
44d10b1f
RW
4096 (source
4097 (origin
4098 (method url-fetch)
4099 (uri (pypi-uri "pyparsing" version))
4100 (sha256
6d3cff5a 4101 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
4102 (build-system python-build-system)
4103 (outputs '("out" "doc"))
4104 (arguments
4105 `(#:tests? #f ; no test target
4106 #:phases
4107 (modify-phases %standard-phases
4108 (add-after 'install 'install-doc
4109 (lambda* (#:key outputs #:allow-other-keys)
4110 (let* ((doc (string-append (assoc-ref outputs "doc")
4111 "/share/doc/" ,name "-" ,version))
4112 (html-doc (string-append doc "/html"))
4113 (examples (string-append doc "/examples")))
4114 (mkdir-p html-doc)
4115 (mkdir-p examples)
4116 (for-each
4117 (lambda (dir tgt)
4118 (map (lambda (file)
4119 (install-file file tgt))
4120 (find-files dir ".*")))
4121 (list "docs" "htmldoc" "examples")
4122 (list doc html-doc examples))
4123 #t))))))
4124 (home-page "https://github.com/pyparsing/pyparsing")
4125 (synopsis "Python parsing class library")
4126 (description
4127 "The pyparsing module is an alternative approach to creating and
4128executing simple grammars, vs. the traditional lex/yacc approach, or the use
4129of regular expressions. The pyparsing module provides a library of classes
4130that client code uses to construct the grammar directly in Python code.")
4131 (license license:expat)))
4132
4133(define-public python2-pyparsing
4134 (package-with-python2 python-pyparsing))
4135
4136(define-public python-numpydoc
4137 (package
4138 (name "python-numpydoc")
4139 (version "0.8.0")
4140 (source
4141 (origin
4142 (method url-fetch)
4143 (uri (pypi-uri "numpydoc" version))
4144 (sha256
4145 (base32
4146 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4147 (build-system python-build-system)
4148 (propagated-inputs
4149 `(("python-sphinx" ,python-sphinx)))
4150 (native-inputs
4151 `(("python-nose" ,python-nose)))
e85af137 4152 (home-page "https://pypi.org/project/numpydoc/")
44d10b1f
RW
4153 (synopsis
4154 "Numpy's Sphinx extensions")
4155 (description
4156 "Sphinx extension to support docstrings in Numpy format.")
4157 (license license:bsd-2)))
4158
4159(define-public python2-numpydoc
4160 (package-with-python2 python-numpydoc))
4161
4162(define-public python-numexpr
4163 (package
4164 (name "python-numexpr")
4165 (version "2.6.5")
4166 (source
4167 (origin
4168 (method url-fetch)
4169 (uri (pypi-uri "numexpr" version))
4170 (sha256
4171 (base32
4172 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4173 (build-system python-build-system)
4174 (arguments `(#:tests? #f)) ; no tests included
4175 (propagated-inputs
4176 `(("python-numpy" ,python-numpy)))
4177 (home-page "https://github.com/pydata/numexpr")
4178 (synopsis "Fast numerical expression evaluator for NumPy")
4179 (description
4180 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4181expressions that operate on arrays are accelerated and use less memory than
4182doing the same calculation in Python. In addition, its multi-threaded
4183capabilities can make use of all your cores, which may accelerate
4184computations, most specially if they are not memory-bounded (e.g. those using
4185transcendental functions).")
4186 (license license:expat)))
4187
4188(define-public python2-numexpr
4189 (package-with-python2 python-numexpr))
4190
4191(define-public python-cycler
4192 (package
4193 (name "python-cycler")
4194 (version "0.10.0")
4195 (source (origin
4196 (method url-fetch)
4197 (uri (pypi-uri "cycler" version))
4198 (sha256
4199 (base32
4200 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4201 (build-system python-build-system)
4202 (arguments
4203 ;; XXX: The current version requires 'coveralls' which we don't have.
4204 ;; Enable this for the next release which uses 'python-pytest'.
4205 '(#:tests? #f))
4206 (propagated-inputs
4207 `(("python-six" ,python-six)))
4208 (home-page "http://matplotlib.org/cycler/")
4209 (synopsis "Composable keyword argument iterator")
4210 (description
4211 "When using @code{matplotlib} and plotting more than one line, it is
4212common to want to be able to want to be able to cycle over one or more artist
4213styles; but the plotting logic can quickly become involved.
4214To address this and enable easy cycling over arbitrary @code{kwargs}, the
4215@code{Cycler} class was developed.")
4216 (license license:bsd-3)))
4217
4218(define-public python2-cycler
4219 (package-with-python2 python-cycler))
4220
4221(define-public python-colorspacious
4222 (package
4223 (name "python-colorspacious")
53a3ebed 4224 (version "1.1.2")
44d10b1f 4225 (source
dee92e65
TGR
4226 (origin
4227 (method git-fetch)
4228 (uri (git-reference
4229 (url "https://github.com/njsmith/colorspacious.git")
4230 (commit (string-append "v" version))))
4231 (file-name (git-file-name name version))
4232 (sha256
53a3ebed 4233 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
4234 (build-system python-build-system)
4235 (propagated-inputs
4236 `(("python-numpy" ,python-numpy)))
4237 (native-inputs
4238 `(("python-nose" ,python-nose)))
4239 (arguments
4240 `(#:phases
4241 (modify-phases %standard-phases
4242 (replace 'check
4243 (lambda _
c988afda 4244 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
4245 (home-page "https://github.com/njsmith/colorspacious")
4246 (synopsis "Python library for colorspace conversions")
4247 (description "@code{colorspacious} is a Python library that lets you
4248convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4249 (license license:expat)))
4250
4251(define-public python2-colorspacious
4252 (package-with-python2 python-colorspacious))
4253
4254(define-public python-matplotlib
4255 (package
4256 (name "python-matplotlib")
9e7cb2f1 4257 (version "3.1.2")
44d10b1f
RW
4258 (source
4259 (origin
4260 (method url-fetch)
4261 (uri (pypi-uri "matplotlib" version))
4262 (sha256
4263 (base32
9e7cb2f1 4264 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
4265 (build-system python-build-system)
4266 (propagated-inputs ; the following packages are all needed at run time
4267 `(("python-cycler" ,python-cycler)
4268 ("python-kiwisolver" ,python-kiwisolver)
4269 ("python-pyparsing" ,python-pyparsing)
4270 ("python-pygobject" ,python-pygobject)
4271 ("gobject-introspection" ,gobject-introspection)
4272 ("python-tkinter" ,python "tk")
4273 ("python-dateutil" ,python-dateutil)
4274 ("python-numpy" ,python-numpy)
4275 ("python-pillow" ,python-pillow)
4276 ("python-pytz" ,python-pytz)
4277 ("python-six" ,python-six)
44d10b1f
RW
4278 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4279 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4280 ;; object. For this reason we need to import both libraries.
5ea654cf 4281 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 4282 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
4283 ("python-cairocffi" ,python-cairocffi)))
4284 (inputs
4285 `(("libpng" ,libpng)
4286 ("imagemagick" ,imagemagick)
4287 ("freetype" ,freetype)
4288 ("cairo" ,cairo)
4289 ("glib" ,glib)
4290 ;; FIXME: Add backends when available.
4291 ;("python-wxpython" ,python-wxpython)
4292 ("tcl" ,tcl)
4293 ("tk" ,tk)))
4294 (native-inputs
4295 `(("pkg-config" ,pkg-config)
5ea654cf
RW
4296 ("python-pytest" ,python-pytest)
4297 ("python-mock" ,python-mock)
4298 ("unzip" ,unzip)
4299 ("jquery-ui"
4300 ,(origin
4301 (method url-fetch)
4302 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4303 (sha256
4304 (base32
4305 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
4306 (arguments
4307 `(#:phases
4308 (modify-phases %standard-phases
5ea654cf
RW
4309 ;; XXX We disable all image comparison tests because we're using a
4310 ;; newer version of FreeType than matplotlib expects. This leads to
4311 ;; minor differences throughout the tests.
4312 (add-after 'unpack 'fix-and-disable-failing-tests
4313 (lambda _
4314 (substitute* (append (find-files "lib/matplotlib/tests/"
4315 "test_.*\\.py$")
4316 (find-files "lib/mpl_toolkits/tests"
4317 "test_.*\\.py$"))
4318 (("^from matplotlib" match)
4319 (string-append "import pytest\n" match))
4320 (("( *)@image_comparison" match indent)
4321 (string-append indent
4322 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4323 match)))
4324 (substitute* "lib/matplotlib/tests/test_animation.py"
4325 (("/bin/sh") (which "sh")))
4326 (for-each delete-file
4327 ;; test_normal_axes, test_get_tightbbox_polar
4328 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
4329 ;; We don't use the webagg backend and this test forces it.
4330 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
4331 ;; test_outward_ticks
4332 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
4333 ;; test_hidden_axes fails with minor extent
4334 ;; differences, possibly due to the use of a
4335 ;; different version of FreeType.
4336 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
4337 ;; Fontconfig returns no fonts.
4338 "lib/matplotlib/tests/test_font_manager.py"))
4339 #t))
4340 (add-before 'install 'install-jquery-ui
4341 (lambda* (#:key outputs inputs #:allow-other-keys)
4342 (let ((dir (string-append (assoc-ref outputs "out")
4343 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4344 (mkdir-p dir)
4345 (invoke "unzip"
4346 (assoc-ref inputs "jquery-ui")
4347 "-d" dir))
4348 #t))
c09f598d 4349 (replace 'check
5ea654cf
RW
4350 (lambda* (#:key outputs inputs #:allow-other-keys)
4351 (add-installed-pythonpath inputs outputs)
4352 (invoke "python" "tests.py" "-v"
9e7cb2f1 4353 "-m" "not network and not webagg")))
44d10b1f
RW
4354 (add-before 'build 'configure-environment
4355 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
4356 (let ((cairo (assoc-ref inputs "cairo")))
4357 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 4358 ;; has not effect.
34c2a16b 4359 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
4360 (setenv "HOME" (getcwd))
4361 (call-with-output-file "setup.cfg"
4362 (lambda (port)
4363 (format port "[directories]~%
4364basedirlist = ~a,~a~%
5ea654cf
RW
4365[packages]~%
4366tests = True~%"
44d10b1f
RW
4367 (assoc-ref inputs "tcl")
4368 (assoc-ref inputs "tk")))))
4369 #t)))))
339b5828 4370 (home-page "https://matplotlib.org/")
44d10b1f
RW
4371 (synopsis "2D plotting library for Python")
4372 (description
4373 "Matplotlib is a Python 2D plotting library which produces publication
4374quality figures in a variety of hardcopy formats and interactive environments
4375across platforms. Matplotlib can be used in Python scripts, the python and
4376ipython shell, web application servers, and six graphical user interface
4377toolkits.")
4378 (license license:psfl)
4379 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4380
4381(define-public python2-matplotlib
4382 (let ((matplotlib (package-with-python2
4383 (strip-python2-variant python-matplotlib))))
4384 (package (inherit matplotlib)
7380df73 4385 (version "2.2.4")
5ea654cf
RW
4386 (source
4387 (origin
4388 (method url-fetch)
4389 (uri (pypi-uri "matplotlib" version))
4390 (sha256
4391 (base32
7380df73 4392 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4393 (arguments
4394 (substitute-keyword-arguments (package-arguments matplotlib)
4395 ((#:phases phases)
4396 `(modify-phases ,phases
66a3c2db
EF
4397 (replace 'install-jquery-ui
4398 (lambda* (#:key outputs inputs #:allow-other-keys)
4399 (let ((dir (string-append (assoc-ref outputs "out")
4400 "/lib/python2.7/site-packages/"
4401 "matplotlib/backends/web_backend/")))
4402 (mkdir-p dir)
4403 (invoke "unzip"
4404 (assoc-ref inputs "jquery-ui")
4405 "-d" dir))
4406 #t))
38a404d5 4407 (delete 'fix-and-disable-failing-tests)
5d484f42 4408 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4409 ;; Make sure to use special packages for Python 2 instead
4410 ;; of those automatically rewritten by package-with-python2.
4411 (propagated-inputs
4412 `(("python2-pycairo" ,python2-pycairo)
4413 ("python2-backports-functools-lru-cache"
4414 ,python2-backports-functools-lru-cache)
4415 ("python2-functools32" ,python2-functools32)
4416 ("python2-pygobject-2" ,python2-pygobject-2)
4417 ("python2-subprocess32" ,python2-subprocess32)
4418 ("python2-tkinter" ,python-2 "tk")
4419 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4420 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4421
4422(define-public python-matplotlib-documentation
4423 (package
4424 (name "python-matplotlib-documentation")
4425 (version (package-version python-matplotlib))
4426 (source (package-source python-matplotlib))
4427 (build-system python-build-system)
4428 (native-inputs
4429 `(("python-matplotlib" ,python-matplotlib)
4430 ("python-colorspacious" ,python-colorspacious)
4431 ("python-sphinx" ,python-sphinx)
5ad0a452 4432 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4433 ("python-sphinx-gallery" ,python-sphinx-gallery)
4434 ("python-numpydoc" ,python-numpydoc)
4435 ("python-ipython" ,python-ipython)
e7a53914 4436 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4437 ("python-mock" ,python-mock)
4438 ("graphviz" ,graphviz)
f75aa97f 4439 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4440 texlive-latex-amsmath
4441 texlive-latex-enumitem
4442 texlive-latex-expdlist
4443 texlive-latex-geometry
4444 texlive-latex-preview
4445 texlive-latex-type1cm
4446 texlive-latex-ucs
4447
4448 texlive-generic-pdftex
4449
e7a53914
RW
4450 texlive-fonts-ec
4451 texlive-fonts-adobe-times
4452 texlive-fonts-txfonts)))
44d10b1f
RW
4453 ("texinfo" ,texinfo)
4454 ,@(package-native-inputs python-matplotlib)))
4455 (arguments
4456 `(#:tests? #f ; we're only generating documentation
4457 #:phases
4458 (modify-phases %standard-phases
5ea654cf
RW
4459 ;; The tests in python-matplotlib are run after the install phase, so
4460 ;; we need to delete the extra phase here.
4461 (delete 'check)
44d10b1f
RW
4462 (replace 'build
4463 (lambda _
4464 (chdir "doc")
e7a53914
RW
4465 (setenv "PYTHONPATH"
4466 (string-append (getenv "PYTHONPATH")
4467 ":" (getcwd) "/../examples/units"))
44d10b1f 4468 (substitute* "conf.py"
e7a53914
RW
4469 ;; Don't use git.
4470 (("^SHA = check_output.*")
4471 (string-append "SHA = \"" ,version "\"\n"))
4472 ;; Don't fetch intersphinx files from the Internet
4473 (("^explicit_order_folders" m)
4474 (string-append "intersphinx_mapping = {}\n" m))
4475 (("'sphinx.ext.intersphinx',") "")
4476 ;; Disable URL embedding which requires internet access.
4477 (("'https://docs.scipy.org/doc/numpy'") "None")
4478 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4479 (invoke "make"
4480 "SPHINXBUILD=sphinx-build"
4481 "SPHINXOPTS=" ; don't abort on warnings
4482 "html" "texinfo")))
44d10b1f
RW
4483 (replace 'install
4484 (lambda* (#:key inputs outputs #:allow-other-keys)
4485 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4486 (doc (string-append data "/doc/python-matplotlib-" ,version))
4487 (info (string-append data "/info"))
4488 (html (string-append doc "/html")))
4489 (mkdir-p html)
4490 (mkdir-p info)
4491 (copy-recursively "build/html" html)
4492 (symlink (string-append html "/_images")
4493 (string-append info "/matplotlib-figures"))
4494 (with-directory-excursion "build/texinfo"
4495 (substitute* "matplotlib.texi"
4496 (("@image\\{([^,]*)" all file)
4497 (string-append "@image{matplotlib-figures/" file)))
4498 (symlink (string-append html "/_images")
4499 "./matplotlib-figures")
e7a53914
RW
4500 (invoke "makeinfo" "--no-split"
4501 "-o" "matplotlib.info" "matplotlib.texi"))
4502 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4503 #t)))))
4504 (home-page (package-home-page python-matplotlib))
4505 (synopsis "Documentation for the python-matplotlib package")
4506 (description (package-description python-matplotlib))
4507 (license (package-license python-matplotlib))))
4508
4509(define-public python2-matplotlib-documentation
5ad0a452
RW
4510 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4511 (package
4512 (inherit parent)
4513 (native-inputs
4514 (alist-delete "python-sphinx-copybutton"
4515 (package-native-inputs parent))))))
44d10b1f 4516
55dae98f
RW
4517(define-public python-matplotlib-venn
4518 (package
4519 (name "python-matplotlib-venn")
4520 (version "0.11.5")
4521 (source
4522 (origin
4523 (method url-fetch)
4524 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4525 (sha256
4526 (base32
4527 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4528 (build-system python-build-system)
4529 (arguments '(#:tests? #f)) ; tests are not included
4530 (propagated-inputs
4531 `(("python-matplotlib" ,python-matplotlib)
4532 ("python-numpy" ,python-numpy)
4533 ("python-scipy" ,python-scipy)))
4534 (native-inputs
4535 `(("unzip" ,unzip)))
4536 (home-page "https://github.com/konstantint/matplotlib-venn")
4537 (synopsis "Plot area-proportional Venn diagrams")
4538 (description
4539 "This package provides tools for plotting area-proportional two- and
4540three-way Venn diagrams in @code{matplotlib}.")
4541 (license license:expat)))
4542
44d10b1f
RW
4543(define-public python2-pysnptools
4544 (package
4545 (name "python2-pysnptools")
5d1ade85 4546 (version "0.3.13")
44d10b1f
RW
4547 (source
4548 (origin
4549 (method url-fetch)
5d1ade85 4550 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4551 (sha256
4552 (base32
5d1ade85 4553 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4554 (build-system python-build-system)
4555 (arguments
5d1ade85
RW
4556 `(#:python ,python-2 ; only Python 2.7 is supported
4557 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4558 (propagated-inputs
4559 `(("python2-numpy" ,python2-numpy)
4560 ("python2-scipy" ,python2-scipy)
4561 ("python2-pandas" ,python2-pandas)))
44d10b1f 4562 (native-inputs
5d1ade85 4563 `(("python2-cython" ,python2-cython)))
1b66989b 4564 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4565 (synopsis "Library for reading and manipulating genetic data")
4566 (description
4567 "PySnpTools is a library for reading and manipulating genetic data. It
4568can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4569those files. It can also efficiently manipulate ranges of integers using set
4570operators such as union, intersection, and difference.")
4571 (license license:asl2.0)))
4572
44d10b1f
RW
4573(define-public python-socksipy-branch
4574 (package
4575 (name "python-socksipy-branch")
4576 (version "1.01")
4577 (source
4578 (origin
4579 (method url-fetch)
4580 (uri (pypi-uri "SocksiPy-branch" version))
4581 (sha256
4582 (base32
4583 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4584 (build-system python-build-system)
4585 (arguments
4586 `(#:tests? #f)) ; There are no tests
4587 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4588 (synopsis "Python SOCKS module")
4589 (description
4590 "SocksiPy - A Python SOCKS client module. It provides a
4591socket-like interface that supports connections to any TCP
4592service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4593The original version was developed by Dan Haim, this is a
4594branch created by Mario Vilas to address some open issues,
4595as the original project seems to have been abandoned circa 2007.")
4596 (license license:bsd-3)))
4597
4598(define-public python2-socksipy-branch
4599 (package-with-python2 python-socksipy-branch))
4600
6fcceb23
AG
4601(define-public python-socksipychain
4602 (package
4603 (name "python-socksipychain")
d97cdff1 4604 (version "2.1.0")
6fcceb23
AG
4605 (source
4606 (origin
4607 (method git-fetch)
4608 (uri (git-reference
4609 (url "https://github.com/pagekite/PySocksipyChain.git")
4610 (commit (string-append "v" version))))
4611 (file-name (git-file-name name version))
4612 (sha256
4613 (base32
d97cdff1 4614 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
6fcceb23
AG
4615 (build-system python-build-system)
4616 (arguments
4617 `(#:tests? #f)) ; Tests try to access the network.
4618 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4619 (synopsis "Python SOCKS module with chained proxies support")
4620 (description
4621 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4622adds support for arbitrary chaining of proxy servers and various modes of
4623TLS/SSL encryption. It was developed for use in PageKite, and also includes
4624a simple netcat replacement with chaining support.")
4625 (license license:bsd-3)))
4626
44d10b1f
RW
4627(define-public python-pycodestyle
4628 (package
4629 (name "python-pycodestyle")
d16ef28b 4630 (version "2.5.0")
44d10b1f 4631 (source
ba88eea2
RW
4632 (origin
4633 (method url-fetch)
4634 (uri (pypi-uri "pycodestyle" version))
4635 (sha256
4636 (base32
d16ef28b 4637 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4638 (build-system python-build-system)
4639 (home-page "https://pycodestyle.readthedocs.io/")
4640 (synopsis "Python style guide checker")
4641 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4642Python code against some of the style conventions in
4643@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4644 (license license:expat)))
4645
4646(define-public python2-pycodestyle
4647 (package-with-python2 python-pycodestyle))
4648
4649(define-public python-multidict
4650 (package
4651 (name "python-multidict")
1ed3b845 4652 (version "4.7.5")
44d10b1f
RW
4653 (source
4654 (origin
4655 (method url-fetch)
4656 (uri (pypi-uri "multidict" version))
4657 (sha256
4658 (base32
1ed3b845 4659 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
44d10b1f 4660 (build-system python-build-system)
1ed3b845
MB
4661 (arguments
4662 '(#:modules ((ice-9 ftw)
4663 (srfi srfi-1)
4664 (srfi srfi-26)
4665 (guix build utils)
4666 (guix build python-build-system))
4667 #:phases (modify-phases %standard-phases
4668 (replace 'check
4669 (lambda* (#:key tests? #:allow-other-keys)
4670 (if tests?
4671 (begin
4672 (let ((libdir (find (cut string-prefix? "lib." <>)
4673 (scandir "build"))))
4674 (setenv "PYTHONPATH"
4675 (string-append "./build/" libdir ":"
4676 (getenv "PYTHONPATH")))
4677 (invoke "pytest" "-vv")))
4678 (format #t "test suite not run~%"))
4679 #t)))))
44d10b1f
RW
4680 (native-inputs
4681 `(("python-pytest" ,python-pytest)
1ed3b845 4682 ("python-pytest-cov" ,python-pytest-cov)))
44d10b1f
RW
4683 (home-page "https://github.com/aio-libs/multidict/")
4684 (synopsis "Multidict implementation")
4685 (description "Multidict is dict-like collection of key-value pairs
4686where key might be occurred more than once in the container.")
4687 (license license:asl2.0)))
4688
4689(define-public python-orderedmultidict
4690 (package
4691 (name "python-orderedmultidict")
4692 (version "0.7.11")
4693 (source
4694 (origin
4695 (method url-fetch)
4696 (uri (pypi-uri "orderedmultidict" version))
4697 (sha256
4698 (base32
4699 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4700 (build-system python-build-system)
4701 (arguments
4702 `(#:phases
4703 (modify-phases %standard-phases
4704 (add-after 'unpack 'fix-tests
4705 (lambda _
4706 ;; The package uses nosetest for running the tests.
4707 ;; Adding this initfile allows to run the test suite
4708 ;; without requiring nosetest.
d1c4f329
RW
4709 (with-output-to-file "tests/__init__.py" newline)
4710 #t)))))
44d10b1f
RW
4711 (propagated-inputs
4712 `(("python-six" ,python-six)))
4713 (native-inputs
4714 `(("python-pycodestyle" ,python-pycodestyle)))
4715 (home-page "https://github.com/gruns/orderedmultidict")
4716 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4717 (description "This package contains a library for ordered multivalue
4718dictionaries. A multivalue dictionary is a dictionary that can store
4719multiple values for the same key. An ordered multivalue dictionary is a
4720multivalue dictionary that retains the order of insertions and deletions.")
4721 (license license:unlicense)))
4722
4723(define-public python2-orderedmultidict
4724 (package-with-python2 python-orderedmultidict))
4725
4726(define-public python-autopep8
4727 (package
4728 (name "python-autopep8")
4729 (version "1.3.5")
4730 (source
4731 (origin
4732 (method url-fetch)
4733 (uri (pypi-uri "autopep8" version))
4734 (sha256
4735 (base32
4736 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4737 (build-system python-build-system)
4738 (propagated-inputs
4739 `(("python-pycodestyle" ,python-pycodestyle)))
4740 (home-page "https://github.com/hhatto/autopep8")
4741 (synopsis "Format Python code according to the PEP 8 style guide")
4742 (description
4743 "@code{autopep8} automatically formats Python code to conform to
4744the PEP 8 style guide. It uses the pycodestyle utility to determine
4745what parts of the code needs to be formatted. @code{autopep8} is
4746capable of fixing most of the formatting issues that can be reported
4747by pycodestyle.")
4748 (license (license:non-copyleft
4749 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4750
4751(define-public python2-autopep8
4752 (package-with-python2 python-autopep8))
4753
f2a64830
JK
4754(define-public python-distlib
4755 (package
4756 (name "python-distlib")
4757 (version "0.3.0")
4758 (source
4759 (origin
4760 (method url-fetch)
4761 (uri (pypi-uri "distlib" version ".zip"))
4762 (sha256
4763 (base32
4764 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
4765 (build-system python-build-system)
4766 (arguments
4767 `(#:phases
4768 (modify-phases %standard-phases
4769 (add-before 'build 'no-/bin/sh
4770 (lambda _
4771 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
4772 (("/bin/sh") (which "sh")))
4773 #t))
4774 (add-before 'check 'prepare-test-env
4775 (lambda _
4776 (setenv "HOME" "/tmp")
4777 ;; NOTE: Any value works, the variable just has to be present.
4778 (setenv "SKIP_ONLINE" "1")
4779 #t)))))
4780 (native-inputs `(("unzip" ,unzip)))
4781 (home-page "https://bitbucket.org/pypa/distlib")
4782 (synopsis "Distribution utilities")
4783 (description "Distlib is a library which implements low-level functions that
4784relate to packaging and distribution of Python software. It is intended to be
4785used as the basis for third-party packaging tools.")
4786 (license license:psfl)))
4787
44d10b1f
RW
4788(define-public python-distutils-extra
4789 (package
4790 (name "python-distutils-extra")
4791 (version "2.38")
4792 (source
4793 (origin
4794 (method url-fetch)
4795 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4796 version "/+download/python-distutils-extra-"
4797 version ".tar.gz"))
4798 (sha256
4799 (base32
4800 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4801 (build-system python-build-system)
4802 (home-page "https://launchpad.net/python-distutils-extra/")
4803 (synopsis "Enhancements to Python's distutils")
4804 (description
4805 "The python-distutils-extra module enables you to easily integrate
4806gettext support, themed icons, and scrollkeeper-based documentation into
4807Python's distutils.")
4808 (license license:gpl2)))
4809
4810(define-public python2-distutils-extra
4811 (package-with-python2 python-distutils-extra))
4812
4813(define-public python2-elib.intl
4814 (package
4815 (name "python2-elib.intl")
4816 (version "0.0.3")
4817 (source
4818 (origin
4819 ;; This project doesn't tag releases or publish tarballs, so we take
4820 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4821 (method git-fetch)
4822 (uri (git-reference
4823 (url "https://github.com/dieterv/elib.intl.git")
4824 (commit "d09997cfef")))
4825 (file-name (string-append name "-" version "-checkout"))
4826 (sha256
4827 (base32
4828 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4829 (build-system python-build-system)
4830 (arguments
4831 ;; incompatible with Python 3 (exception syntax)
4832 `(#:python ,python-2
4833 #:tests? #f))
4834 (home-page "https://github.com/dieterv/elib.intl")
4835 (synopsis "Enhanced internationalization for Python")
4836 (description
4837 "The elib.intl module provides enhanced internationalization (I18N)
4838services for your Python modules and applications.")
4839 (license license:lgpl3+)))
4840
4841(define-public python-olefile
4842 (package
4843 (name "python-olefile")
5bef0f10 4844 (version "0.46")
44d10b1f
RW
4845 (source
4846 (origin
4847 (method url-fetch)
5bef0f10
MB
4848 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4849 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4850 (file-name (string-append name "-" version ".tar.gz"))
4851 (sha256
4852 (base32
5bef0f10 4853 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4854 (build-system python-build-system)
5bef0f10 4855 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4856 (synopsis "Read and write Microsoft OLE2 files.")
4857 (description
4858 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4859Storage or Compound Document, Microsoft Office). It is an improved version of
4860the OleFileIO module from PIL, the Python Image Library.")
4861 (license license:bsd-3)))
4862
4863(define-public python2-olefile
4864 (package-with-python2 python-olefile))
4865
4866(define-public python-pillow
4867 (package
4868 (name "python-pillow")
5fbdd917 4869 (version "6.2.1")
44d10b1f
RW
4870 (source
4871 (origin
4872 (method url-fetch)
4873 (uri (pypi-uri "Pillow" version))
4874 (sha256
4875 (base32
5fbdd917 4876 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
44d10b1f
RW
4877 (build-system python-build-system)
4878 (native-inputs
4879 `(("python-pytest" ,python-pytest)))
4880 (inputs
4881 `(("freetype" ,freetype)
4882 ("lcms" ,lcms)
44d10b1f 4883 ("libjpeg" ,libjpeg)
44d10b1f 4884 ("libtiff" ,libtiff)
0c4e1c5f
EF
4885 ("libwebp" ,libwebp)
4886 ("openjpeg" ,openjpeg)
4887 ("zlib" ,zlib)))
44d10b1f
RW
4888 (propagated-inputs
4889 `(("python-olefile" ,python-olefile)))
4890 (arguments
4891 `(#:phases
4892 (modify-phases %standard-phases
4893 (add-after 'unpack 'patch-ldconfig
4894 (lambda _
4895 (substitute* "setup.py"
4896 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
61b77ff3 4897 (replace 'check
979d8464
EF
4898 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4899 (if tests?
4900 (begin
4901 (setenv "HOME" (getcwd))
4902 ;; Make installed package available for running the tests.
4903 (add-installed-pythonpath inputs outputs)
4904 (invoke "python" "selftest.py" "--installed")
4905 (invoke "python" "-m" "pytest" "-vv"))
4906 #t))))))
44d10b1f
RW
4907 (home-page "https://python-pillow.org")
4908 (synopsis "Fork of the Python Imaging Library")
4909 (description
4910 "The Python Imaging Library adds image processing capabilities to your
4911Python interpreter. This library provides extensive file format support, an
4912efficient internal representation, and fairly powerful image processing
4913capabilities. The core image library is designed for fast access to data
4914stored in a few basic pixel formats. It should provide a solid foundation for
4915a general image processing tool.")
4916 (license (license:x11-style
4917 "http://www.pythonware.com/products/pil/license.htm"
4918 "The PIL Software License"))))
4919
4920(define-public python2-pillow
4921 (package-with-python2 python-pillow))
4922
4923(define-public python-pycparser
4924 (package
4925 (name "python-pycparser")
c6c0940e 4926 (version "2.19")
44d10b1f
RW
4927 (source
4928 (origin
4929 (method url-fetch)
4930 (uri (pypi-uri "pycparser" version))
4931 (sha256
4932 (base32
c6c0940e 4933 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4934 (outputs '("out" "doc"))
4935 (build-system python-build-system)
4936 (native-inputs
4937 `(("pkg-config" ,pkg-config)))
4938 (arguments
4939 `(#:phases
4940 (modify-phases %standard-phases
4941 (replace 'check
4942 (lambda _
4943 (with-directory-excursion "tests"
acb75c03
RW
4944 (invoke "python" "all_tests.py"))
4945 #t))
44d10b1f
RW
4946 (add-after 'install 'install-doc
4947 (lambda* (#:key outputs #:allow-other-keys)
4948 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4949 (doc (string-append data "/doc/" ,name "-" ,version))
4950 (examples (string-append doc "/examples")))
4951 (mkdir-p examples)
4952 (for-each (lambda (file)
4953 (copy-file (string-append "." file)
4954 (string-append doc file)))
4955 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4956 (copy-recursively "examples" examples)
4957 #t))))))
44d10b1f
RW
4958 (home-page "https://github.com/eliben/pycparser")
4959 (synopsis "C parser in Python")
4960 (description
4961 "Pycparser is a complete parser of the C language, written in pure Python
4962using the PLY parsing library. It parses C code into an AST and can serve as
4963a front-end for C compilers or analysis tools.")
4964 (license license:bsd-3)))
4965
4966(define-public python2-pycparser
4967 (package-with-python2 python-pycparser))
4968
4969(define-public python-pywavelets
4970 (package
4971 (name "python-pywavelets")
4972 (version "1.0.1")
4973 (home-page "https://github.com/PyWavelets/pywt")
4974 (source (origin
4975 (method url-fetch)
4976 (uri (pypi-uri "PyWavelets" version))
4977 (sha256
4978 (base32
4979 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4980 (build-system python-build-system)
4981 (arguments
4982 '(#:modules ((ice-9 ftw)
4983 (srfi srfi-1)
4984 (srfi srfi-26)
4985 (guix build utils)
4986 (guix build python-build-system))
4987 #:phases (modify-phases %standard-phases
4988 (replace 'check
4989 (lambda _
4990 (let ((cwd (getcwd))
4991 (libdir (find (cut string-prefix? "lib." <>)
4992 (scandir "build"))))
4993 (with-directory-excursion (string-append cwd "/build/" libdir)
4994 (invoke "nosetests" "-v" "."))))))))
4995 (native-inputs
4996 `(("python-matplotlib" ,python-matplotlib) ;for tests
4997 ("python-nose" ,python-nose)))
4998 (propagated-inputs
4999 `(("python-numpy" ,python-numpy)))
5000 (synopsis "Wavelet transforms in Python")
5001 (description
5002 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5003mathematical basis functions that are localized in both time and frequency.
5004Wavelet transforms are time-frequency transforms employing wavelets. They are
5005similar to Fourier transforms, the difference being that Fourier transforms are
5006localized only in frequency instead of in time and frequency.")
5007 (license license:expat)))
5008
5009(define-public python2-pywavelets
5010 (package-with-python2 python-pywavelets))
5011
5012(define-public python-xcffib
5013 (package
5014 (name "python-xcffib")
5015 (version "0.6.0")
5016 (source
5017 (origin
5018 (method url-fetch)
5019 (uri (pypi-uri "xcffib" version))
5020 (sha256
5021 (base32
5022 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5023 (build-system python-build-system)
5024 (inputs
5025 `(("libxcb" ,libxcb)))
5026 (propagated-inputs
5027 `(("python-cffi" ,python-cffi) ; used at run time
5028 ("python-six" ,python-six)))
5029 (arguments
5030 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5031 #:tests? #f
5032 #:phases
5033 (modify-phases %standard-phases
5034 (add-after 'unpack 'fix-libxcb-path
5035 (lambda* (#:key inputs #:allow-other-keys)
5036 (let ((libxcb (assoc-ref inputs "libxcb")))
5037 (substitute* '("xcffib/__init__.py")
5038 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5039 #t)))
5040 (add-after 'install 'install-doc
5041 (lambda* (#:key outputs #:allow-other-keys)
5042 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5043 "/doc/" ,name "-" ,version)))
5044 (mkdir-p doc)
5045 (copy-file "README.md"
5046 (string-append doc "/README.md"))
5047 #t))))))
5048 (home-page "https://github.com/tych0/xcffib")
5049 (synopsis "XCB Python bindings")
5050 (description
5051 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5052support for Python 3 and PyPy. It is based on cffi.")
5053 (license license:expat)))
5054
5055(define-public python2-xcffib
5056 (package-with-python2 python-xcffib))
5057
5058(define-public python-cairocffi
5059 (package
5060 (name "python-cairocffi")
5061 (version "0.9.0")
5062 (source
5063 (origin
5064 (method url-fetch)
5065 (uri (pypi-uri "cairocffi" version))
5066 (sha256
5067 (base32
5068 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5069 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5070 (build-system python-build-system)
5071 (outputs '("out" "doc"))
5072 (inputs
5073 `(("glib" ,glib)
5074 ("gtk+" ,gtk+)
5075 ("gdk-pixbuf" ,gdk-pixbuf)
5076 ("cairo" ,cairo)
5077 ("pango" ,pango)))
5078 (native-inputs
5079 `(("pkg-config" ,pkg-config)
5080 ("python-pytest" ,python-pytest)
5081 ("python-pytest-cov" ,python-pytest-cov)
5082 ("python-pytest-runner" ,python-pytest-runner)
5083 ("python-sphinx" ,python-sphinx)
5084 ("python-docutils" ,python-docutils)))
5085 (propagated-inputs
5086 `(("python-xcffib" ,python-xcffib))) ; used at run time
5087 (arguments
5088 `(#:phases
5089 (modify-phases %standard-phases
5090 (add-after 'unpack 'patch-paths
5091 (lambda* (#:key inputs outputs #:allow-other-keys)
5092 (substitute* (find-files "." "\\.py$")
5093 (("dlopen\\(ffi, 'cairo'")
5094 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
5095 "/lib/libcairo.so.2'"))
5096 (("dlopen\\(ffi, 'gdk-3'")
5097 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
5098 "/lib/libgtk-3.so.0'"))
5099 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
5100 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
5101 "/lib/libgdk_pixbuf-2.0.so.0'"))
5102 (("dlopen\\(ffi, 'glib-2.0'")
5103 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5104 "/lib/libglib-2.0.so.0'"))
5105 (("dlopen\\(ffi, 'gobject-2.0'")
5106 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5107 "/lib/libgobject-2.0.so.0'"))
5108 (("dlopen\\(ffi, 'pangocairo-1.0'")
5109 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5110 "/lib/libpangocairo-1.0.so.0'"))
5111 (("dlopen\\(ffi, 'pango-1.0'")
5112 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5113 "/lib/libpango-1.0.so.0'")))
5114 #t))
5115 (add-after 'install 'install-doc
5116 (lambda* (#:key inputs outputs #:allow-other-keys)
5117 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5118 (doc (string-append data "/doc/" ,name "-" ,version))
5119 (html (string-append doc "/html")))
5120 (setenv "LD_LIBRARY_PATH"
5121 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5122 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5123 (setenv "LANG" "en_US.UTF-8")
5124 (mkdir-p html)
5125 (for-each (lambda (file)
5126 (copy-file (string-append "." file)
5127 (string-append doc file)))
5128 '("/README.rst" "/CHANGES" "/LICENSE"))
5129 (system* "python" "setup.py" "build_sphinx")
5130 (copy-recursively "docs/_build/html" html)
5131 #t))))))
5132 (home-page "https://github.com/Kozea/cairocffi")
5133 (synopsis "Python bindings and object-oriented API for Cairo")
5134 (description
5135 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5136Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5137graphics library with support for multiple backends including image buffers,
5138PNG, PostScript, PDF, and SVG file output.")
5139 (license license:bsd-3)))
5140
5141(define-public python2-cairocffi
5142 (package-with-python2 python-cairocffi))
5143
5144(define-public python-decorator
5145 (package
5146 (name "python-decorator")
5147 (version "4.3.0")
5148 (source
5149 (origin
5150 (method url-fetch)
5151 (uri (pypi-uri "decorator" version))
5152 (sha256
5153 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
5154 (build-system python-build-system)
e85af137 5155 (home-page "https://pypi.org/project/decorator/")
44d10b1f
RW
5156 (synopsis "Python module to simplify usage of decorators")
5157 (description
5158 "The aim of the decorator module is to simplify the usage of decorators
5159for the average programmer, and to popularize decorators usage giving examples
5160of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5161etc. The core of this module is a decorator factory.")
5162 (license license:expat)))
5163
5164(define-public python2-decorator
5165 (package-with-python2 python-decorator))
5166
5167(define-public python-drmaa
5168 (package
5169 (name "python-drmaa")
5170 (version "0.7.7")
5171 (source
5172 (origin
5173 (method url-fetch)
5174 (uri (pypi-uri "drmaa" version))
5175 (sha256
5176 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5177 (build-system python-build-system)
5178 ;; The test suite requires libdrmaa which is provided by the cluster
5179 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5180 ;; should be set to the path of the libdrmaa library.
5181 (arguments '(#:tests? #f))
5182 (native-inputs
5183 `(("python-nose" ,python-nose)))
e85af137 5184 (home-page "https://pypi.org/project/drmaa/")
44d10b1f
RW
5185 (synopsis "Python bindings for the DRMAA library")
5186 (description
5187 "A Python package for Distributed Resource Management (DRM) job
5188submission and control. This package is an implementation of the DRMAA 1.0
5189Python language binding specification.")
5190 (license license:bsd-3)))
5191
5192(define-public python2-drmaa
5193 (package-with-python2 python-drmaa))
5194
5195(define-public python-grako
5196 (package
5197 (name "python-grako")
5198 (version "3.99.9")
5199 (source
5200 (origin
5201 (method url-fetch)
5202 (uri
5203 (pypi-uri "grako" version ".zip"))
5204 (sha256
5205 (base32
5206 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5207 (build-system python-build-system)
5208 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5209 (native-inputs
5210 `(("unzip" ,unzip)
5211 ("python-pytest" ,python-pytest)
5212 ("python-pytest-runner" ,python-pytest-runner)))
5213 (home-page "https://bitbucket.org/neogeny/grako")
5214 (synopsis "EBNF parser generator")
5215 (description
5216 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5217memoizing PEG/Packrat parser in Python.")
5218 (license license:bsd-3)))
5219
5220(define-public python2-grako
5221 (package-with-python2 python-grako))
5222
5223(define-public python-gridmap
5224 (package
5225 (name "python-gridmap")
5226 (version "0.13.0")
5227 (source
5228 (origin
768fea0f
TGR
5229 (method git-fetch)
5230 (uri (git-reference
5231 (url "https://github.com/pygridtools/gridmap.git")
5232 (commit (string-append "v" version))))
5233 (file-name (git-file-name name version))
44d10b1f 5234 (sha256
768fea0f 5235 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
5236 (build-system python-build-system)
5237 (arguments
5238 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5239 (propagated-inputs
5240 `(("python-psutil" ,python-psutil)
5241 ("python-drmaa" ,python-drmaa)
5242 ("python-pyzmq" ,python-pyzmq)))
5243 (home-page "https://github.com/pygridtools/gridmap")
5244 (synopsis "Create jobs on a cluster directly from Python")
5245 (description
5246 "Gridmap is a Python package to allow you to easily create jobs on the
5247cluster directly from Python. You can directly map Python functions onto the
5248cluster without needing to write any wrapper code yourself.")
5249 (license license:gpl3+)))
5250
5251(define-public python2-gridmap
5252 (package-with-python2 python-gridmap))
5253
5254(define-public python-honcho
5255 (package
5256 (name "python-honcho")
5257 (version "1.0.1")
5258 (source
5259 (origin
8524d130
TGR
5260 (method git-fetch)
5261 (uri (git-reference
5262 (url "https://github.com/nickstenning/honcho.git")
5263 (commit (string-append "v" version))))
5264 (file-name (git-file-name name version))
44d10b1f 5265 (sha256
8524d130 5266 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
5267 (build-system python-build-system)
5268 (native-inputs
5269 `(("python-pytest" ,python-pytest)
5270 ("python-mock" ,python-mock)
5271 ("python-tox" ,python-tox)
5272 ("which" ,which))) ;for tests
5273 (propagated-inputs
5274 `(("python-jinja2" ,python-jinja2)))
5275 (arguments
5276 `(#:phases
5277 (modify-phases %standard-phases
5278 (delete 'check)
5279 (add-after 'install 'check
5280 (lambda* (#:key outputs inputs #:allow-other-keys)
5281 ;; fix honcho path in testsuite
5282 (substitute* "tests/conftest.py"
5283 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5284 "/bin/honcho" "'")))
5285 ;; It's easier to run tests after install.
5286 ;; Make installed package available for running the tests
5287 (add-installed-pythonpath inputs outputs)
95b707fb 5288 (invoke "py.test" "-v"))))))
44d10b1f
RW
5289 (home-page "https://github.com/nickstenning/honcho")
5290 (synopsis "Manage Procfile-based applications")
5291 (description
5292 "A Procfile is a file which describes how to run an application
50fceab0 5293consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
5294The output of all running processes is collected by honcho and
5295displayed.")
5296 (license license:expat)))
5297
5298(define-public python2-honcho
5299 (package-with-python2 python-honcho))
5300
5301(define-public python-pexpect
5302 (package
5303 (name "python-pexpect")
5304 (version "4.6.0")
5305 (source
5306 (origin
5307 (method url-fetch)
5308 (uri (pypi-uri "pexpect" version))
5309 (sha256
5310 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5311 (build-system python-build-system)
5312 (arguments
5313 `(#:phases
5314 (modify-phases %standard-phases
5315 (add-before 'check 'prepare-tests
5316 (lambda _
5317 (substitute* (find-files "tests")
5318 (("/bin/ls") (which "ls"))
5319 (("/bin/echo") (which "echo"))
5320 (("/bin/which") (which "which"))
5321 ;; Many tests try to use the /bin directory which
5322 ;; is not present in the build environment.
5323 ;; Use one that's non-empty and unlikely to change.
5324 (("/bin'") "/dev'"))
5325 ;; XXX: Socket connection test gets "Connection reset by peer".
5326 ;; Why does it not work? Delete for now.
5327 (delete-file "tests/test_socket.py")
5328 #t))
5329 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5330 (native-inputs
5331 `(("python-nose" ,python-nose)
5332 ("python-pytest" ,python-pytest)
5333 ("man-db" ,man-db)
5334 ("which" ,which)
5335 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5336 (propagated-inputs
5337 `(("python-ptyprocess" ,python-ptyprocess)))
5338 (home-page "http://pexpect.readthedocs.org/")
5339 (synopsis "Controlling interactive console applications")
5340 (description
5341 "Pexpect is a pure Python module for spawning child applications;
5342controlling them; and responding to expected patterns in their output.
5343Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5344child application and control it as if a human were typing commands.")
5345 (license license:isc)))
5346
5347(define-public python2-pexpect
5348 (package-with-python2 python-pexpect))
5349
5350(define-public python-setuptools-scm
5351 (package
5352 (name "python-setuptools-scm")
85092643 5353 (version "3.2.0")
44d10b1f
RW
5354 (source (origin
5355 (method url-fetch)
5356 (uri (pypi-uri "setuptools_scm" version))
5357 (sha256
5358 (base32
85092643 5359 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
5360 (build-system python-build-system)
5361 (home-page "https://github.com/pypa/setuptools_scm/")
5362 (synopsis "Manage Python package versions in SCM metadata")
5363 (description
5364 "Setuptools_scm handles managing your Python package versions in
5365@dfn{software configuration management} (SCM) metadata instead of declaring
5366them as the version argument or in a SCM managed file.")
5367 (license license:expat)))
5368
a0b2accf
MO
5369;; Needed by python-lazy-object-proxy, remove on next update cycle.
5370(define-public python-setuptools-scm-3.3
5371 (package
5372 (inherit python-setuptools-scm)
5373 (version "3.3.3")
5374 (source (origin
5375 (method url-fetch)
5376 (uri (pypi-uri "setuptools_scm" version))
5377 (sha256
5378 (base32
5379 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5380
44d10b1f
RW
5381(define-public python2-setuptools-scm
5382 (package-with-python2 python-setuptools-scm))
5383
bb74ea09
RW
5384(define-public python-pathlib2
5385 (package
5386 (name "python-pathlib2")
5387 (version "2.3.3")
5388 (source
5389 (origin
5390 (method url-fetch)
5391 (uri (pypi-uri "pathlib2" version))
5392 (sha256
5393 (base32
5394 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5395 (build-system python-build-system)
5396 (propagated-inputs
5397 `(("python-scandir" ,python-scandir)
5398 ("python-six" ,python-six)))
e85af137 5399 (home-page "https://pypi.org/project/pathlib2/")
746d3384 5400 (synopsis "Object-oriented file system paths")
bb74ea09
RW
5401 (description "The goal of pathlib2 is to provide a backport of the
5402standard @code{pathlib} module which tracks the standard library module, so
5403all the newest features of the standard @code{pathlib} can be used also on
5404older Python versions.")
5405 (license license:expat)))
5406
fd5c264a
MB
5407(define-public python2-importlib-resources
5408 (package
5409 (name "python2-importlib-resources")
5410 (version "1.0.2")
5411 (source (origin
5412 (method url-fetch)
5413 (uri (pypi-uri "importlib_resources" version))
5414 (sha256
5415 (base32
5416 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5417 (build-system python-build-system)
5418 (arguments
5419 `(#:python ,python-2))
5420 (native-inputs
5421 `(("python-wheel" ,python2-wheel)))
5422 (propagated-inputs
5423 `(("python-pathlib2" ,python2-pathlib2)
5424 ("python-typing" ,python2-typing)))
5425 (home-page "https://gitlab.com/python-devs/importlib_resources")
5426 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5427 (description
5428 "This package provides an implementation of @code{importlib.resources}
5429for older versions of Python.")
5430 (license license:asl2.0)))
5431
15b65617
RW
5432(define-public python-importlib-metadata
5433 (package
5434 (name "python-importlib-metadata")
4dc04d11 5435 (version "1.4.0")
15b65617
RW
5436 (source
5437 (origin
5438 (method url-fetch)
5439 (uri (pypi-uri "importlib_metadata" version))
5440 (sha256
4dc04d11 5441 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
15b65617
RW
5442 (build-system python-build-system)
5443 (propagated-inputs
4dc04d11 5444 `(("python-zipp" ,python-zipp)))
15b65617
RW
5445 (native-inputs
5446 `(("python-setuptools-scm" ,python-setuptools-scm)
4dc04d11 5447 ("python-packaging" ,python-packaging)))
15b65617
RW
5448 (home-page "https://importlib-metadata.readthedocs.io/")
5449 (synopsis "Read metadata from Python packages")
5450 (description
5451 "@code{importlib_metadata} is a library which provides an API for
5452accessing an installed Python package's metadata, such as its entry points or
5453its top-level name. This functionality intends to replace most uses of
5454@code{pkg_resources} entry point API and metadata API. Along with
5455@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5456need to use the older and less efficient @code{pkg_resources} package.")
3dfb3d44 5457 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
15b65617
RW
5458 (license license:asl2.0)))
5459
5efa04dd
MB
5460(define-public python2-importlib-metadata
5461 (let ((base (package-with-python2 (strip-python2-variant
5462 python-importlib-metadata))))
5463 (package/inherit
5464 base
5465 (name "python2-importlib-metadata")
5466 (propagated-inputs
5467 `(("python-configparser" ,python2-configparser)
5468 ("python-contextlib2" ,python2-contextlib2)
5469 ("python-importlib-resources" ,python2-importlib-resources)
5470 ("python-pathlib2" ,python2-pathlib2)
5471 ,@(package-propagated-inputs base))))))
5472
37c173d1
RW
5473(define-public python-jaraco-packaging
5474 (package
5475 (name "python-jaraco-packaging")
5476 (version "6.1")
5477 (source
5478 (origin
5479 (method url-fetch)
5480 (uri (pypi-uri "jaraco.packaging" version))
5481 (sha256
5482 (base32
5483 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5484 (build-system python-build-system)
5485 (propagated-inputs
5486 `(("python-pytest" ,python-pytest)
5487 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5488 ("python-pytest-flake8" ,python-pytest-flake8)
5489 ("python-rst.linker" ,python-rst.linker)
5490 ("python-setuptools" ,python-setuptools)
5491 ("python-setuptools-scm" ,python-setuptools-scm)
5492 ("python-six" ,python-six)
5493 ("python-sphinx" ,python-sphinx)))
5494 (home-page "https://github.com/jaraco/jaraco.packaging")
5495 (synopsis "Tools to supplement packaging Python releases")
5496 (description
5497 "This package provides various tools to supplement packaging Python
5498releases.")
5499 (license license:expat)))
5500
44d10b1f
RW
5501(define-public python-pathpy
5502 (package
5503 (name "python-pathpy")
a3dd8871 5504 (version "11.5.1")
44d10b1f
RW
5505 (source
5506 (origin
5507 (method url-fetch)
5508 (uri (pypi-uri "path.py" version))
5509 (sha256
a3dd8871 5510 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5511 (outputs '("out" "doc"))
44d10b1f
RW
5512 (build-system python-build-system)
5513 (propagated-inputs
01a53e0b
MC
5514 `(("python-appdirs" ,python-appdirs)
5515 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5516 (native-inputs
5517 `(("python-setuptools-scm" ,python-setuptools-scm)
5518 ("python-sphinx" ,python-sphinx)
5519 ("python-rst.linker" ,python-rst.linker)
5520 ("python-pytest" ,python-pytest)
49ad11e9
RW
5521 ("python-pytest-runner" ,python-pytest-runner)
5522 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5523 (arguments
49ad11e9
RW
5524 `(#:phases
5525 (modify-phases %standard-phases
5526 (add-after 'build 'build-doc
5527 (lambda _
5528 (setenv "LANG" "en_US.UTF-8")
5529 (invoke "python" "setup.py" "build_sphinx")))
5530 (add-after 'install 'install-doc
5531 (lambda* (#:key outputs #:allow-other-keys)
5532 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5533 (doc (string-append data "/doc/" ,name "-" ,version))
5534 (html (string-append doc "/html")))
5535 (mkdir-p html)
5536 (for-each (lambda (file)
5537 (copy-file file (string-append doc "/" file)))
5538 '("README.rst" "CHANGES.rst"))
5539 (copy-recursively "build/sphinx/html" html)
5540 #t)))
5541 (replace 'check
5542 (lambda _
5543 ;; The import time test aborts if an import takes longer than
5544 ;; 100ms. It may very well take a little longer than that.
5545 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5546 (home-page "https://github.com/jaraco/path.py")
5547 (synopsis "Python module wrapper for built-in os.path")
5548 (description
5549 "@code{path.py} implements path objects as first-class entities, allowing
5550common operations on files to be invoked on those path objects directly.")
5551 (license license:expat)))
5552
5553(define-public python2-pathpy
5554 (package-with-python2 python-pathpy))
5555
5556(define-public python-simplegeneric
5557 (package
5558 (name "python-simplegeneric")
5559 (version "0.8.1")
5560 (source
5561 (origin
5562 (method url-fetch)
6c8c3980 5563 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5564 (sha256
5565 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5566 (build-system python-build-system)
5567 (native-inputs
5568 `(("unzip" ,unzip)))
5569 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5570 (synopsis "Python module for simple generic functions")
5571 (description
5572 "The simplegeneric module lets you define simple single-dispatch generic
5573functions, akin to Python’s built-in generic functions like @code{len()},
5574@code{iter()} and so on. However, instead of using specially-named methods,
5575these generic functions use simple lookup tables, akin to those used by
5576e.g. @code{pickle.dump()} and other generic functions found in the Python
5577standard library.")
5578 (license license:zpl2.1)))
5579
5580(define-public python2-simplegeneric
5581 (package-with-python2 python-simplegeneric))
5582
5583(define-public python-ipython-genutils
5584 ;; TODO: This package is retired, check if can be removed, see description.
5585 (package
5586 (name "python-ipython-genutils")
5587 (version "0.1.0")
5588 (source
5589 (origin
5590 (method url-fetch)
c9671d4b 5591 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5592 (sha256
5593 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5594 (build-system python-build-system)
5595 (arguments `(#:tests? #f)) ; no tests
5596 (home-page "https://ipython.org")
5597 (synopsis "Vestigial utilities from IPython")
5598 (description
5599 "This package provides retired utilities from IPython. No packages
5600outside IPython/Jupyter should depend on it.
5601
5602This package shouldn't exist. It contains some common utilities shared by
5603Jupyter and IPython projects during The Big Split. As soon as possible, those
5604packages will remove their dependency on this, and this package will go
5605away.")
5606 (license license:bsd-3)))
5607
5608(define-public python2-ipython-genutils
5609 (package-with-python2 python-ipython-genutils))
5610
5611(define-public python-traitlets
5612 (package
5613 (name "python-traitlets")
ac5e205a 5614 (version "4.3.3")
44d10b1f
RW
5615 (source
5616 (origin
5617 (method url-fetch)
5618 (uri (pypi-uri "traitlets" version))
5619 (sha256
5620 (base32
ac5e205a 5621 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5622 (build-system python-build-system)
5623 (arguments
5624 `(#:phases
5625 (modify-phases %standard-phases
5626 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5627 (propagated-inputs
5628 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5629 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5630 (native-inputs
5631 `(("python-pytest" ,python-pytest)))
5632 (properties `((python2-variant . ,(delay python2-traitlets))))
5633 (home-page "https://ipython.org")
5634 (synopsis "Configuration system for Python applications")
5635 (description
5636 "Traitlets is a framework that lets Python classes have attributes with
5637type checking, dynamically calculated default values, and ‘on change’
5638callbacks. The package also includes a mechanism to use traitlets for
5639configuration, loading values from files or from command line arguments. This
5640is a distinct layer on top of traitlets, so you can use traitlets in your code
5641without using the configuration machinery.")
5642 (license license:bsd-3)))
5643
5644(define-public python2-traitlets
5645 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5646 (package
5647 (inherit traitlets)
5648 (propagated-inputs
5649 `(("python2-enum34" ,python2-enum34)
5650 ,@(package-propagated-inputs traitlets))))))
5651
5652(define-public python-jupyter-core
5653 (package
5654 (name "python-jupyter-core")
5655 (version "4.4.0")
5656 (source
5657 (origin
5658 (method url-fetch)
5659 (uri (string-append (pypi-uri "jupyter_core" version)))
5660 (sha256
5661 (base32
5662 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5663 (build-system python-build-system)
5664 ;; FIXME: not sure how to run the tests
5665 (arguments `(#:tests? #f))
5666 (propagated-inputs
5667 `(("python-traitlets" ,python-traitlets)))
5668 (home-page "http://jupyter.org/")
5669 (synopsis "Jupyter base package")
5670 (description
5671 "Jupyter core is the base package on which Jupyter projects rely.")
5672 (license license:bsd-3)))
5673
5674(define-public python2-jupyter-core
5675 (package-with-python2 python-jupyter-core))
5676
5677(define-public python-jupyter-client
5678 (package
5679 (name "python-jupyter-client")
5680 (version "5.2.4")
5681 (source
5682 (origin
5683 (method url-fetch)
5684 (uri (pypi-uri "jupyter_client" version))
5685 (sha256
5686 (base32
5687 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5688 (build-system python-build-system)
5689 ;; Tests fail because of missing native python kernel which I assume is
5690 ;; provided by the ipython package, which we cannot use because it would
5691 ;; cause a dependency cycle.
ddc586ea
LC
5692 (arguments
5693 `(#:tests? #f
5694
5695 #:phases (modify-phases %standard-phases
5696 (add-after 'unpack 'set-tool-file-names
5697 (lambda* (#:key inputs #:allow-other-keys)
5698 (let ((iproute (assoc-ref inputs "iproute")))
5699 (substitute* "jupyter_client/localinterfaces.py"
5700 (("'ip'")
5701 (string-append "'" iproute "/sbin/ip'")))
5702 #t))))))
5703 (inputs
5704 `(("iproute" ,iproute)))
44d10b1f
RW
5705 (propagated-inputs
5706 `(("python-pyzmq" ,python-pyzmq)
5707 ("python-traitlets" ,python-traitlets)
5708 ("python-jupyter-core" ,python-jupyter-core)))
5709 (home-page "http://jupyter.org/")
5710 (synopsis "Jupyter protocol implementation and client libraries")
5711 (description
5712 "The @code{jupyter_client} package contains the reference implementation
5713of the Jupyter protocol. It also provides client and kernel management APIs
5714for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5715installing @code{kernelspec}s for use with Jupyter frontends.")
5716 (license license:bsd-3)))
5717
5718(define-public python2-jupyter-client
5719 (package-with-python2 python-jupyter-client))
5720
5721(define-public python-ipykernel
5722 (package
5723 (name "python-ipykernel")
08d0a355 5724 (version "5.1.3")
44d10b1f
RW
5725 (source
5726 (origin
5727 (method url-fetch)
5728 (uri (pypi-uri "ipykernel" version))
5729 (sha256
08d0a355 5730 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5731 (build-system python-build-system)
5732 (arguments
5733 `(#:phases
5734 (modify-phases %standard-phases
5735 (replace 'check
5736 (lambda _
5737 (setenv "HOME" "/tmp")
5738 (invoke "pytest" "-v")
aa856d02
LC
5739 #t))
5740 (add-after 'install 'set-python-file-name
5741 (lambda* (#:key outputs #:allow-other-keys)
5742 ;; Record the absolute file name of the 'python' executable in
5743 ;; 'kernel.json'.
5744 (let ((out (assoc-ref outputs "out")))
5745 (substitute* (string-append out "/share/jupyter"
5746 "/kernels/python3/kernel.json")
5747 (("\"python\"")
5748 (string-append "\"" (which "python") "\"")))
5749 #t))))))
44d10b1f
RW
5750 (propagated-inputs
5751 `(("python-ipython" ,python-ipython)
5752 ;; imported at runtime during connect
5753 ("python-jupyter-client" ,python-jupyter-client)))
5754 (native-inputs
08d0a355
TGR
5755 `(("python-flaky" ,python-flaky)
5756 ("python-nose" ,python-nose)
5757 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5758 (home-page "https://ipython.org")
5759 (synopsis "IPython Kernel for Jupyter")
5760 (description
5761 "This package provides the IPython kernel for Jupyter.")
578e4cf4 5762 (properties `((python2-variant . ,(delay python2-ipykernel))))
44d10b1f
RW
5763 (license license:bsd-3)))
5764
578e4cf4 5765;; Version 5.x and above no longer support Python 2.
44d10b1f 5766(define-public python2-ipykernel
0f378947
RW
5767 (package
5768 (name "python2-ipykernel")
578e4cf4 5769 (version "4.10.1")
0f378947
RW
5770 (source
5771 (origin
5772 (method url-fetch)
5773 (uri (pypi-uri "ipykernel" version))
5774 (sha256
578e4cf4 5775 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
0f378947
RW
5776 (build-system python-build-system)
5777 (arguments
578e4cf4 5778 `(#:python ,python-2))
0f378947
RW
5779 (propagated-inputs
5780 `(("python2-ipython" ,python2-ipython)
5781 ;; imported at runtime during connect
578e4cf4
EF
5782 ("python2-jupyter-client" ,python2-jupyter-client)
5783 ("python2-tornado" ,python2-tornado)
5784 ("python2-traitlets" ,python2-traitlets)))
0f378947 5785 (native-inputs
578e4cf4
EF
5786 `(("python2-mock" ,python2-mock)
5787 ("python2-nose" ,python2-nose)
5788 ("python2-pytest" ,python2-pytest)
5789 ("python2-pytest-cov" ,python2-pytest-cov)))
0f378947
RW
5790 (home-page "https://ipython.org")
5791 (synopsis "IPython Kernel for Jupyter")
5792 (description
5793 "This package provides the IPython kernel for Jupyter.")
5794 (license license:bsd-3)))
44d10b1f 5795
966aa714
AE
5796(define-public python-pari-jupyter
5797 (package
5798 (name "python-pari-jupyter")
5799 (version "1.3.2")
5800 (source
5801 (origin
5802 (method url-fetch)
5803 (uri (pypi-uri "pari_jupyter" version))
5804 (sha256
5805 (base32
5806 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5807 (build-system python-build-system)
5808 (propagated-inputs
5809 `(("python-ipykernel" ,python-ipykernel)))
5810 (inputs
5811 `(("pari-gp" ,pari-gp)
5812 ("readline" ,readline)))
5813 (arguments
5814 `(#:tests? #f)) ; no test suite
5815 (home-page
5816 "https://github.com/jdemeyer/pari_jupyter")
5817 (synopsis "A Jupyter kernel for PARI/GP")
5818 (description "The package provides a PARI/GP kernel for Jupyter.")
5819 (license license:gpl3+)))
5820
dede052a
RW
5821(define-public python-backcall
5822 (package
5823 (name "python-backcall")
5824 (version "0.1.0")
5825 (source
5826 (origin
5827 (method url-fetch)
5828 (uri (pypi-uri "backcall" version))
5829 (sha256
5830 (base32
5831 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5832 (build-system python-build-system)
5833 (home-page "https://github.com/takluyver/backcall/")
5834 (synopsis "Specifications for callback functions passed in to an API")
5835 (description
5836 "If your code lets other people supply callback functions, it's important
5837to specify the function signature you expect, and check that functions support
5838that. Adding extra parameters later would break other peoples code unless
5839you're careful. The @code{backcall} package provides a way of specifying the
5840callback signature using a prototype function.")
5841 (license license:bsd-3)))
5842
8b5f756c
RW
5843(define-public python-ipython
5844 (package
5845 (name "python-ipython")
ee515773 5846 (version "7.9.0")
8b5f756c
RW
5847 (source
5848 (origin
5849 (method url-fetch)
5850 (uri (pypi-uri "ipython" version ".tar.gz"))
5851 (sha256
ee515773 5852 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5853 (build-system python-build-system)
5854 (propagated-inputs
5855 `(("python-backcall" ,python-backcall)
5856 ("python-pyzmq" ,python-pyzmq)
5857 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5858 ("python-terminado" ,python-terminado)
5859 ("python-matplotlib" ,python-matplotlib)
5860 ("python-numpy" ,python-numpy)
5861 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5862 ("python-jedi" ,python-jedi)
44d10b1f
RW
5863 ("python-jinja2" ,python-jinja2)
5864 ("python-mistune" ,python-mistune)
5865 ("python-pexpect" ,python-pexpect)
5866 ("python-pickleshare" ,python-pickleshare)
5867 ("python-simplegeneric" ,python-simplegeneric)
5868 ("python-jsonschema" ,python-jsonschema)
5869 ("python-traitlets" ,python-traitlets)
5870 ("python-nbformat" ,python-nbformat)
5871 ("python-pygments" ,python-pygments)))
5872 (inputs
5873 `(("readline" ,readline)
5874 ("which" ,which)))
5875 (native-inputs
5876 `(("graphviz" ,graphviz)
5877 ("pkg-config" ,pkg-config)
5878 ("python-requests" ,python-requests) ;; for tests
5879 ("python-testpath" ,python-testpath)
8b5f756c 5880 ("python-nose" ,python-nose)))
44d10b1f
RW
5881 (arguments
5882 `(#:phases
5883 (modify-phases %standard-phases
0f272518
RW
5884 (add-after 'unpack 'make-docs-reproducible
5885 (lambda _
5886 (substitute* "IPython/sphinxext/ipython_directive.py"
5887 ((".*import datetime") "")
5888 ((".*datetime.datetime.now\\(\\)") "")
5889 (("%timeit") "# %timeit"))
5890 #t))
44d10b1f
RW
5891 ;; Tests can only be run after the library has been installed and not
5892 ;; within the source directory.
5893 (delete 'check)
5894 (add-after 'install 'check
5895 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5896 (if tests?
5897 (begin
5898 ;; Make installed package available for running the tests
5899 (add-installed-pythonpath inputs outputs)
5900 (setenv "HOME" "/tmp/") ;; required by a test
5901 ;; We only test the core because one of the other tests
5902 ;; tries to import ipykernel.
5903 (invoke "python" "IPython/testing/iptest.py"
5904 "-v" "IPython/core/tests"))
5905 #t)))
5906 (add-before 'check 'fix-tests
5907 (lambda* (#:key inputs #:allow-other-keys)
5908 (substitute* "./IPython/utils/_process_posix.py"
5909 (("/usr/bin/env', 'which") (which "which")))
5910 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5911 (("#!/usr/bin/env python")
5912 (string-append "#!" (which "python"))))
44d10b1f
RW
5913 ;; This test introduces a circular dependency on ipykernel
5914 ;; (which depends on ipython).
5915 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5916 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5917 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5918 #t)))))
5919 (home-page "https://ipython.org")
5920 (synopsis "IPython is a tool for interactive computing in Python")
5921 (description
5922 "IPython provides a rich architecture for interactive computing with:
5923Powerful interactive shells, a browser-based notebook, support for interactive
5924data visualization, embeddable interpreters and tools for parallel
2bc5d5d5
EF
5925computing.")
5926 (properties `((python2-variant . ,(delay python2-ipython))))
5927 (license license:bsd-3)))
5928
5929;; This is the latest release of the LTS version of ipython with support for
5930;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5931;; dropped support for Python 2.7.
5932(define-public python2-ipython
5933 (package
5934 (name "python2-ipython")
5935 (version "5.8.0")
5936 (source
5937 (origin
5938 (method url-fetch)
5939 (uri (pypi-uri "ipython" version ".tar.gz"))
5940 (sha256
5941 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5942 (build-system python-build-system)
5943 (propagated-inputs
5944 `(("python2-backports-shutil-get-terminal-size"
5945 ,python2-backports-shutil-get-terminal-size)
5946 ("python2-pathlib2" ,python2-pathlib2)
5947 ("python2-pyzmq" ,python2-pyzmq)
5948 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5949 ("python2-terminado" ,python2-terminado)
5950 ("python2-matplotlib" ,python2-matplotlib)
5951 ("python2-numpy" ,python2-numpy)
5952 ("python2-numpydoc" ,python2-numpydoc)
5953 ("python2-jinja2" ,python2-jinja2)
5954 ("python2-mistune" ,python2-mistune)
5955 ("python2-pexpect" ,python2-pexpect)
5956 ("python2-pickleshare" ,python2-pickleshare)
5957 ("python2-simplegeneric" ,python2-simplegeneric)
5958 ("python2-jsonschema" ,python2-jsonschema)
5959 ("python2-traitlets" ,python2-traitlets)
5960 ("python2-nbformat" ,python2-nbformat)
5961 ("python2-pygments" ,python2-pygments)))
5962 (inputs
5963 `(("readline" ,readline)
5964 ("which" ,which)))
5965 (native-inputs
5966 `(("graphviz" ,graphviz)
5967 ("pkg-config" ,pkg-config)
5968 ("python2-requests" ,python2-requests) ;; for tests
5969 ("python2-testpath" ,python2-testpath)
5970 ("python2-mock" ,python2-mock)
5971 ("python2-nose" ,python2-nose)))
5972 (arguments
5973 `(#:python ,python-2
5974 #:phases
5975 (modify-phases %standard-phases
5976 (add-before 'check 'delete-broken-tests
5977 (lambda* (#:key inputs #:allow-other-keys)
5978 ;; These tests throw errors for unknown reasons.
d8ba1135
EF
5979 (delete-file "IPython/core/tests/test_displayhook.py")
5980 (delete-file "IPython/core/tests/test_magic_terminal.py")
2bc5d5d5 5981 (delete-file "IPython/core/tests/test_profile.py")
2bc5d5d5
EF
5982 #t)))))
5983 (home-page "https://ipython.org")
5984 (synopsis "IPython is a tool for interactive computing in Python")
5985 (description
5986 "IPython provides a rich architecture for interactive computing with:
5987Powerful interactive shells, a browser-based notebook, support for interactive
5988data visualization, embeddable interpreters and tools for parallel
44d10b1f 5989computing.")
8b5f756c 5990 (license license:bsd-3)))
44d10b1f 5991
8b5f756c
RW
5992(define-public python-ipython-documentation
5993 (package
5994 (inherit python-ipython)
5995 (name "python-ipython-documentation")
5996 (version (package-version python-ipython))
5997 (arguments
5998 `(#:phases
5999 (modify-phases %standard-phases
6000 (delete 'build)
6001 (delete 'check)
6002 (replace 'install
6003 (lambda* (#:key outputs #:allow-other-keys)
6004 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
6005 (doc (string-append data "/doc/" ,name "-" ,version))
6006 (html (string-append doc "/html"))
6007 (man1 (string-append data "/man/man1"))
6008 (info (string-append data "/info"))
6009 (examples (string-append doc "/examples"))
6010 (python-arg (string-append "PYTHON=" (which "python"))))
6011 (setenv "LANG" "en_US.utf8")
6012 (with-directory-excursion "docs"
6013 ;; FIXME: pdf fails to build
6014 ;;(system* "make" "pdf" "PAPER=a4")
6015 (system* "make" python-arg "html")
6016 ;; FIXME: the generated texi file contains ^@^@, which trips
6017 ;; up the parser.
6018 ;; (system* "make" python-arg "info")
6019 )
6020 (copy-recursively "docs/man" man1)
6021 (copy-recursively "examples" examples)
6022 (copy-recursively "docs/build/html" html)
6023 ;; (copy-file "docs/build/latex/ipython.pdf"
6024 ;; (string-append doc "/ipython.pdf"))
6025 (mkdir-p info)
6026 ;; (copy-file "docs/build/texinfo/ipython.info"
6027 ;; (string-append info "/ipython.info"))
6028 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
6029 #t)))))
6030 (inputs
6031 `(("python-ipython" ,python-ipython)
6032 ("python-ipykernel" ,python-ipykernel)))
6033 (native-inputs
6034 `(("python-sphinx" ,python-sphinx)
6035 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
6036 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 6037 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
6038 texlive-fonts-ec
6039 texlive-generic-ifxetex
6040 texlive-generic-pdftex
8b5f756c
RW
6041 texlive-latex-capt-of
6042 texlive-latex-cmap
6043 texlive-latex-environ
6044 texlive-latex-eqparbox
6045 texlive-latex-etoolbox
6046 texlive-latex-expdlist
6047 texlive-latex-fancyhdr
6048 texlive-latex-fancyvrb
6049 texlive-latex-fncychap
6050 texlive-latex-float
6051 texlive-latex-framed
6052 texlive-latex-geometry
6053 texlive-latex-graphics
6054 texlive-latex-hyperref
6055 texlive-latex-mdwtools
6056 texlive-latex-multirow
6057 texlive-latex-needspace
6058 texlive-latex-oberdiek
6059 texlive-latex-parskip
6060 texlive-latex-preview
6061 texlive-latex-tabulary
6062 texlive-latex-threeparttable
6063 texlive-latex-titlesec
6064 texlive-latex-trimspaces
6065 texlive-latex-ucs
6066 texlive-latex-upquote
6067 texlive-latex-url
6068 texlive-latex-varwidth
6069 texlive-latex-wrapfig)))
6070 ("texinfo" ,texinfo)))))
44d10b1f
RW
6071
6072(define-public python-urwid
6073 (package
6074 (name "python-urwid")
6075 (version "2.0.1")
6076 (source
6077 (origin
6078 (method url-fetch)
6079 (uri (pypi-uri "urwid" version))
6080 (sha256
6081 (base32
6082 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
6083 (build-system python-build-system)
6084 (home-page "http://urwid.org")
6085 (synopsis "Console user interface library for Python")
6086 (description
6087 "Urwid is a curses-based UI/widget library for Python. It includes many
6088features useful for text console applications.")
6089 (license license:lgpl2.1+)))
6090
6091(define-public python2-urwid
6092 (package-with-python2 python-urwid))
6093
6094(define-public python-urwidtrees
6095 (package
6096 (name "python-urwidtrees")
6097 (version "1.0.2")
6098 (source
6099 (origin
c8364072 6100 (method git-fetch)
44d10b1f
RW
6101 ;; package author intends on distributing via github rather than pypi:
6102 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
c8364072
EF
6103 (uri (git-reference
6104 (url "https://github.com/pazz/urwidtrees")
6105 (commit version)))
6106 (file-name (git-file-name name version))
44d10b1f
RW
6107 (sha256
6108 (base32
c8364072 6109 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
44d10b1f
RW
6110 (build-system python-build-system)
6111 (arguments
26bb7fc6
EF
6112 '(#:use-setuptools? #f
6113 #:tests? #f)) ; no tests
44d10b1f
RW
6114 (propagated-inputs `(("python-urwid" ,python-urwid)))
6115 (home-page "https://github.com/pazz/urwidtrees")
6116 (synopsis "Tree widgets for urwid")
6117 (description "Urwidtrees is a Widget Container API for the @code{urwid}
6118toolkit. Use it to build trees of widgets.")
6119 (license license:gpl3+)))
6120
6121(define-public python2-urwidtrees
6122 (package-with-python2 python-urwidtrees))
6123
6124(define-public python-ua-parser
6125 (package
6126 (name "python-ua-parser")
6127 (version "0.8.0")
6128 (source
6129 (origin
6130 (method url-fetch)
6131 (uri (pypi-uri "ua-parser" version))
6132 (sha256
6133 (base32
6134 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
6135 (build-system python-build-system)
6136 (arguments
6137 `(#:tests? #f)) ;no test suite in release
6138 (native-inputs
6139 `(("python-pyyaml" ,python-pyyaml)))
6140 (home-page "https://github.com/ua-parser/uap-python")
6141 (synopsis "User agent parser")
6142 (description
6143 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
6144 (license license:asl2.0)))
6145
6146(define-public python2-ua-parser
6147 (package-with-python2 python-ua-parser))
6148
6149(define-public python-user-agents
6150 (package
6151 (name "python-user-agents")
6152 (version "1.1.0")
6153 (source
6154 (origin
6155 (method url-fetch)
6156 (uri (pypi-uri "user-agents" version))
6157 (sha256
6158 (base32
6159 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
6160 (build-system python-build-system)
6161 (arguments
6162 `(#:tests? #f)) ;missing devices.json test file in release
6163 (propagated-inputs
6164 `(("python-ua-parser" ,python-ua-parser)))
6165 (home-page "https://github.com/selwin/python-user-agents")
6166 (synopsis "User Agent strings parsing library")
6167 (description
6168 "A library to identify devices (phones, tablets) and their capabilities by
6169parsing (browser/HTTP) user agent strings.")
6170 (license license:expat)))
6171
6172(define-public python2-user-agents
6173 (package-with-python2 python-user-agents))
6174
6175(define-public python-dbus
6176 (package
6177 (name "python-dbus")
ba5ef999 6178 (version "1.2.14")
44d10b1f
RW
6179 (source
6180 (origin
6181 (method url-fetch)
6182 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
6183 "dbus-python-" version ".tar.gz"))
6184 (sha256
ba5ef999 6185 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 6186 (build-system gnu-build-system)
44d10b1f
RW
6187 (native-inputs
6188 `(("pkg-config" ,pkg-config)))
6189 (inputs
6190 `(("python" ,python-wrapper)
6191 ("dbus-glib" ,dbus-glib)))
6192 (synopsis "Python bindings for D-bus")
6193 (description "python-dbus provides bindings for libdbus, the reference
6194implementation of D-Bus.")
6195 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
6196 (license license:expat)))
6197
6198(define-public python2-dbus
6199 (package (inherit python-dbus)
6200 (name "python2-dbus")
6201 (inputs `(("python" ,python-2)
6202 ,@(alist-delete "python"
6203 (package-inputs python-dbus)
ba5ef999 6204 equal?)))))
44d10b1f 6205
fb236fdd
AG
6206(define-public python-notify2
6207 (package
6208 (name "python-notify2")
6209 (version "0.3.1")
6210 (source
6211 (origin
6212 (method url-fetch)
6213 (uri (pypi-uri "notify2" version))
6214 (sha256
6215 (base32
6216 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
6217 (build-system python-build-system)
6218 (arguments `(#:tests? #f)) ; tests depend on system state
6219 (native-inputs
6220 `(("python-dbus" ,python-dbus)))
6221 (home-page "https://bitbucket.org/takluyver/pynotify2")
6222 (synopsis "Python interface to D-Bus notifications")
6223 (description
6224 "Pynotify2 provides a Python interface for sending D-Bus notifications.
6225It is a reimplementation of pynotify in pure Python, and an alternative to
6226the GObject Introspection bindings to libnotify for non-GTK applications.")
6227 (license (list license:bsd-2
6228 license:lgpl2.1+))))
6229
6230(define-public python2-notify2
6231 (package-with-python2 python-notify2))
6232
44d10b1f
RW
6233;; beautifulsoup4 has a totally different namespace than 3.x,
6234;; and pypi seems to put it under its own name, so I guess we should too
6235(define-public python-beautifulsoup4
6236 (package
6237 (name "python-beautifulsoup4")
abb53e6f 6238 (version "4.7.1")
44d10b1f
RW
6239 (source
6240 (origin
6241 (method url-fetch)
6242 (uri (pypi-uri "beautifulsoup4" version))
6243 (sha256
6244 (base32
abb53e6f 6245 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
6246 (build-system python-build-system)
6247 (arguments
6248 `(#:phases
6249 (modify-phases %standard-phases
6250 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6251 ;; must use this conversion script when building with Python 3. The
6252 ;; conversion script also runs the tests.
6253 ;; For more information, see the file 'convert-py3k' in the source
6254 ;; distribution.
6255 (replace 'check
dff0197e 6256 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 6257 (propagated-inputs
abb53e6f 6258 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
6259 (home-page
6260 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6261 (synopsis
6262 "Python screen-scraping library")
6263 (description
6264 "Beautiful Soup is a Python library designed for rapidly setting up
6265screen-scraping projects. It offers Pythonic idioms for navigating,
6266searching, and modifying a parse tree, providing a toolkit for
6267dissecting a document and extracting what you need. It automatically
6268converts incoming documents to Unicode and outgoing documents to UTF-8.")
6269 (license license:expat)
6270 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6271
6272(define-public python2-beautifulsoup4
6273 (package
6274 (inherit (package-with-python2
6275 (strip-python2-variant python-beautifulsoup4)))
6276 (arguments `(#:python ,python-2))))
6277
ad74978a
BT
6278(define-public python-soupsieve
6279 (package
6280 (name "python-soupsieve")
3367df31 6281 (version "1.9.5")
ad74978a
BT
6282 (source
6283 (origin
6284 (method url-fetch)
6285 (uri (pypi-uri "soupsieve" version))
6286 (sha256
6287 (base32
3367df31 6288 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
6289 (build-system python-build-system)
6290 (arguments `(#:tests? #f))
6291 ;;XXX: 2 tests fail currently despite claming they were to be
6292 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6293 ;;don't want to create a circular dependency.
6294 (home-page "https://github.com/facelessuser/soupsieve")
6295 (synopsis "CSS selector library")
6296 (description
6297 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6298Soup 4. It aims to provide selecting, matching, and filtering using modern
6299CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6300specifications up through the latest CSS level 4 drafts and beyond (though
6301some are not yet implemented).")
d00b83fb 6302 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
6303 (license license:expat)))
6304
6305(define-public python2-soupsieve
d00b83fb 6306 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
6307 (package
6308 (inherit base)
6309 (propagated-inputs
d00b83fb
MB
6310 `(("python2-backports-functools-lru-cache"
6311 ,python2-backports-functools-lru-cache)
6312 ,@(package-propagated-inputs base))))))
ad74978a 6313
44d10b1f
RW
6314(define-public python-netifaces
6315 (package
6316 (name "python-netifaces")
6317 (version "0.10.7")
6318 (source
6319 (origin
6320 (method url-fetch)
6321 (uri (pypi-uri "netifaces" version))
6322 (sha256
6323 (base32
6324 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6325 (build-system python-build-system)
6326 (home-page "https://github.com/al45tair/netifaces")
6327 (synopsis
6328 "Python module for portable network interface information")
6329 (description
6330 "Netifaces is a Python module providing information on network
6331interfaces in an easy and portable manner.")
6332 (license license:expat)))
6333
6334(define-public python2-netifaces
6335 (package-with-python2 python-netifaces))
6336
6337(define-public python-networkx
6338 (package
6339 (name "python-networkx")
5a9980d5 6340 (version "2.4")
44d10b1f
RW
6341 (source
6342 (origin
6343 (method url-fetch)
5a9980d5 6344 (uri (pypi-uri "networkx" version))
44d10b1f 6345 (sha256
5a9980d5 6346 (base32 "0r2wr7aqay9fwjrgk35fkjzk8lvvb4i4df7ndaqzkr4ndw5zzx7q"))))
44d10b1f 6347 (build-system python-build-system)
5a9980d5
MB
6348 (arguments
6349 '(#:phases (modify-phases %standard-phases
6350 (replace 'check
6351 (lambda* (#:key tests? #:allow-other-keys)
6352 (if tests?
6353 (invoke "pytest" "-vv" "--pyargs" "networkx")
6354 (format #t "test suite not run~%"))
6355 #t)))))
44d10b1f
RW
6356 ;; python-decorator is needed at runtime.
6357 (propagated-inputs
6358 `(("python-decorator" ,python-decorator)))
6359 (native-inputs
5a9980d5 6360 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
6361 (home-page "https://networkx.github.io/")
6362 (synopsis "Python module for creating and manipulating graphs and networks")
6363 (description
6364 "NetworkX is a Python package for the creation, manipulation, and study
6365of the structure, dynamics, and functions of complex networks.")
5a9980d5 6366 (properties `((python2-variant . ,(delay python2-networkx))))
44d10b1f
RW
6367 (license license:bsd-3)))
6368
5a9980d5 6369;; NetworkX 2.2 is the last version with support for Python 2.
44d10b1f 6370(define-public python2-networkx
5a9980d5
MB
6371 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
6372 (package
6373 (inherit base)
6374 (version "2.2")
6375 (source (origin
6376 (method url-fetch)
6377 (uri (pypi-uri "networkx" version ".zip"))
6378 (sha256
6379 (base32
6380 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6381 (arguments
6382 `(#:python ,python-2))
6383 (native-inputs
6384 `(("python-nose" ,python2-nose)
6385 ("unzip" ,unzip))))))
44d10b1f
RW
6386
6387(define-public python-datrie
6388 (package
6389 (name "python-datrie")
0b58cb42 6390 (version "0.8")
44d10b1f
RW
6391 (source
6392 (origin
6393 (method url-fetch)
6394 (uri (pypi-uri "datrie" version))
6395 (sha256
6396 (base32
0b58cb42 6397 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 6398 (build-system python-build-system)
44d10b1f
RW
6399 (native-inputs
6400 `(("python-cython" ,python-cython)
6401 ("python-hypothesis" ,python-hypothesis)
6402 ("python-pytest" ,python-pytest)
6403 ("python-pytest-runner" ,python-pytest-runner)))
6404 (home-page "https://github.com/kmike/datrie")
6405 (synopsis "Fast, efficiently stored trie for Python")
6406 (description
6407 "This package provides a fast, efficiently stored trie implementation for
6408Python.")
6409 (license license:lgpl2.1+)))
6410
6411(define-public snakemake
6412 (package
6413 (name "snakemake")
93803c6b 6414 (version "5.7.1")
44d10b1f
RW
6415 (source
6416 (origin
6417 (method url-fetch)
6418 (uri (pypi-uri "snakemake" version))
6419 (sha256
93803c6b 6420 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
6421 (build-system python-build-system)
6422 (arguments
6423 ;; TODO: Package missing test dependencies.
6424 '(#:tests? #f
6425 #:phases
6426 (modify-phases %standard-phases
6427 ;; For cluster execution Snakemake will call Python. Since there is
6428 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6429 ;; this by calling the snakemake wrapper instead.
6430 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6431 (lambda* (#:key outputs #:allow-other-keys)
6432 (substitute* "snakemake/executors.py"
6433 (("\\{sys.executable\\} -m snakemake")
6434 (string-append (assoc-ref outputs "out")
6435 "/bin/snakemake")))
6436 #t)))))
6437 (propagated-inputs
8994ae34 6438 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
6439 ("python-configargparse" ,python-configargparse)
6440 ("python-datrie" ,python-datrie)
6441 ("python-docutils" ,python-docutils)
8994ae34 6442 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
6443 ("python-jinja2" ,python-jinja2)
6444 ("python-jsonschema" ,python-jsonschema)
6445 ("python-networkx" ,python-networkx)
93803c6b 6446 ("python-psutil" ,python-psutil)
44d10b1f 6447 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
6448 ("python-ratelimiter" ,python-ratelimiter)
6449 ("python-requests" ,python-requests)
6450 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
6451 (home-page "https://snakemake.readthedocs.io")
6452 (synopsis "Python-based execution environment for make-like workflows")
6453 (description
6454 "Snakemake aims to reduce the complexity of creating workflows by
6455providing a clean and modern domain specific specification language (DSL) in
6456Python style, together with a fast and comfortable execution environment.")
6457 (license license:expat)))
6458
44d10b1f
RW
6459(define-public python-pyqrcode
6460 (package
6461 (name "python-pyqrcode")
6462 (version "1.2.1")
6463 (source
6464 (origin
6465 (method url-fetch)
6466 (uri (pypi-uri "PyQRCode" version))
6467 (sha256
6468 (base32
6469 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6470 (build-system python-build-system)
6471 (home-page
6472 "https://github.com/mnooner256/pyqrcode")
6473 (synopsis "QR code generator")
6474 (description
6475 "Pyqrcode is a QR code generator written purely in Python with
6476SVG, EPS, PNG and terminal output.")
6477 (license license:bsd-3)))
6478
6479(define-public python-seaborn
6480 (package
6481 (name "python-seaborn")
0731f943 6482 (version "0.10.0")
44d10b1f
RW
6483 (source
6484 (origin
6485 (method url-fetch)
6486 (uri (pypi-uri "seaborn" version))
6487 (sha256
0731f943 6488 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
44d10b1f
RW
6489 (build-system python-build-system)
6490 (arguments
6491 `(#:phases
6492 (modify-phases %standard-phases
6493 (add-before 'check 'start-xserver
6494 (lambda* (#:key inputs #:allow-other-keys)
6495 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6496 ;; There must be a running X server and make check doesn't
6497 ;; start one. Therefore we must do it.
6498 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6499 (setenv "DISPLAY" ":1")
6500 #t)))
6501 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6502 (propagated-inputs
6503 `(("python-pandas" ,python-pandas)
6504 ("python-matplotlib" ,python-matplotlib)
6505 ("python-numpy" ,python-numpy)
6506 ("python-scipy" ,python-scipy)))
6507 (native-inputs
6508 `(("python-pytest" ,python-pytest)
ff337525 6509 ("xorg-server" ,xorg-server-for-tests)))
d3d73bd6 6510 (home-page "https://seaborn.pydata.org/")
44d10b1f
RW
6511 (synopsis "Statistical data visualization")
6512 (description
6513 "Seaborn is a library for making attractive and informative statistical
6514graphics in Python. It is built on top of matplotlib and tightly integrated
6515with the PyData stack, including support for numpy and pandas data structures
6516and statistical routines from scipy and statsmodels.")
0731f943 6517 (properties `((python2-variant . ,(delay python2-seaborn))))
44d10b1f
RW
6518 (license license:bsd-3)))
6519
0731f943 6520;; 0.9.1 is the last release with support for Python 2.
44d10b1f 6521(define-public python2-seaborn
0731f943
MB
6522 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6523 (package
6524 (inherit base)
6525 (version "0.9.1")
6526 (source (origin
6527 (method url-fetch)
6528 (uri (pypi-uri "seaborn" version))
6529 (sha256
6530 (base32
6531 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
44d10b1f
RW
6532
6533(define-public python-mpmath
6534 (package
6535 (name "python-mpmath")
6536 (version "0.19")
6537 (source (origin
6538 (method url-fetch)
6539 (uri (string-append "http://mpmath.org/files/mpmath-"
6540 version ".tar.gz"))
6541 (sha256
6542 (base32
6543 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6544 (build-system python-build-system)
6545 (arguments
6546 '(#:phases
6547 (modify-phases %standard-phases
6548 (replace 'check
6549 (lambda _
5d7a6f1c 6550 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6551 (home-page "http://mpmath.org")
6552 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6553 (description
6554 "@code{mpmath} can be used as an arbitrary-precision substitute for
6555Python's float/complex types and math/cmath modules, but also does much
6556more advanced mathematics.")
6557 (license license:bsd-3)))
6558
6559(define-public python2-mpmath
6560 (package-with-python2 python-mpmath))
6561
6562(define-public python-bigfloat
6563 (package
6564 (name "python-bigfloat")
6565 (version "0.3.0")
6566 (source
6567 (origin
6568 (method url-fetch)
6569 (uri (pypi-uri "bigfloat" version))
6570 (sha256
6571 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6572 (build-system python-build-system)
6573 (inputs
6574 `(("mpfr" ,mpfr)))
6575 (home-page "https://github.com/mdickinson/bigfloat")
6576 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6577 (description
e36de31b 6578 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6579multiprecision arithmetic.")
6580 (license license:lgpl3+)))
6581
6582(define-public python2-bigfloat
6583 (package-with-python2 python-bigfloat))
6584
6585(define-public python-sympy
6586 (package
6587 (name "python-sympy")
6588 (version "1.1.1")
6589 (source
6590 (origin
6591 (method url-fetch)
6592 (uri (string-append
6593 "https://github.com/sympy/sympy/releases/download/sympy-"
6594 version "/sympy-" version ".tar.gz"))
6595 (sha256
6596 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6597 (build-system python-build-system)
6598 (arguments
6599 `(#:phases
6600 (modify-phases %standard-phases
6601 ;; Run the core tests after installation. By default it would run
6602 ;; *all* tests, which take a very long time to complete and are known
6603 ;; to be flaky.
6604 (delete 'check)
6605 (add-after 'install 'check
6606 (lambda* (#:key outputs #:allow-other-keys)
6607 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6608 #t)))))
6609 (propagated-inputs
6610 `(("python-mpmath" ,python-mpmath)))
2f35985c 6611 (home-page "https://www.sympy.org/")
44d10b1f
RW
6612 (synopsis "Python library for symbolic mathematics")
6613 (description
6614 "SymPy is a Python library for symbolic mathematics. It aims to become a
6615full-featured computer algebra system (CAS) while keeping the code as simple
6616as possible in order to be comprehensible and easily extensible.")
6617 (license license:bsd-3)))
6618
6619(define-public python2-sympy
6620 (package
6621 (inherit (package-with-python2 python-sympy))
6622 (arguments
6623 `(#:phases
6624 (modify-phases %standard-phases
6625 ;; Run the core tests after installation. By default it would run
6626 ;; *all* tests, which take a very long time to complete and are known
6627 ;; to be flaky.
6628 (delete 'check)
6629 (add-after 'install 'check
6630 (lambda* (#:key outputs #:allow-other-keys)
6631 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6632 #t)))))))
6633
6634(define-public python-q
6635 (package
6636 (name "python-q")
6637 (version "2.6")
6638 (source
6639 (origin
6640 (method url-fetch)
6641 (uri (pypi-uri "q" version))
6642 (sha256
6643 (base32
6644 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6645 (build-system python-build-system)
6646 (home-page "https://github.com/zestyping/q")
6647 (synopsis "Quick-and-dirty debugging output for tired programmers")
6648 (description
6649 "q is a Python module for \"print\" style of debugging Python code. It
6650provides convenient short API for print out of values, tracebacks, and
6651falling into the Python interpreter.")
6652 (license license:asl2.0)))
6653
6654(define-public python2-q
6655 (package-with-python2 python-q))
6656
6657(define-public python2-xlib
6658 (package
6659 (name "python2-xlib")
6660 (version "0.14")
6661 (source (origin
6662 (method url-fetch)
6663 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6664 "/" version "/"
6665 "python-xlib-" version ".tar.gz"))
6666 (sha256
6667 (base32
6668 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6669 (build-system python-build-system)
6670 (arguments
6671 `(#:python ,python-2 ;Python 2 only
6672 #:tests? #f)) ;no tests
6673 (home-page "http://python-xlib.sourceforge.net/")
6674 (synopsis "Python X11 client library")
6675 (description
6676 "The Python X Library is intended to be a fully functional X client
6677library for Python programs. It is useful to implement low-level X clients.
6678It is written entirely in Python.")
6679 (license license:gpl2+)))
6680
6681(define-public python-singledispatch
6682 (package
6683 (name "python-singledispatch")
6684 (version "3.4.0.3")
6685 (source
6686 (origin
6687 (method url-fetch)
6688 (uri (pypi-uri "singledispatch" version))
6689 (sha256
6690 (base32
6691 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6692 (build-system python-build-system)
6693 (native-inputs
6694 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6695 (home-page
8680eff3 6696 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
44d10b1f
RW
6697 (synopsis "Backport of singledispatch feature from Python 3.4")
6698 (description
6699 "This library brings functools.singledispatch from Python 3.4 to Python
67002.6-3.3.")
6701 (license license:expat)))
6702
6703(define-public python2-singledispatch
6704 (package-with-python2 python-singledispatch))
6705
6706;; the python- version can be removed with python-3.5
6707(define-public python-backports-abc
6708 (package
6709 (name "python-backports-abc")
6710 (version "0.5")
6711 (source
6712 (origin
6713 (method url-fetch)
6714 (uri (pypi-uri "backports_abc" version))
6715 (sha256
6716 (base32
6717 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6718 (build-system python-build-system)
6719 (home-page "https://github.com/cython/backports_abc")
6720 (synopsis "Backport of additions to the 'collections.abc' module")
6721 (description
6722 "Python-backports-abc provides a backport of additions to the
36a4366d 6723@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6724 (license license:psfl)))
6725
6726(define-public python2-backports-abc
6727 (package-with-python2 python-backports-abc))
6728
6729(define-public python-backports-csv
6730 (package
6731 (name "python-backports-csv")
6732 (version "1.0.5")
6733 (source
6734 (origin
6735 (method url-fetch)
6736 (uri (pypi-uri "backports.csv" version))
6737 (sha256
6738 (base32
6739 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6740 (build-system python-build-system)
6741 (home-page "https://github.com/ryanhiebert/backports.csv")
6742 (synopsis "Backport of Python 3's csv module for Python 2")
6743 (description
6744 "Provides a backport of Python 3's @code{csv} module for parsing
6745comma separated values. The API of the @code{csv} module in Python 2
6746is drastically different from the @code{csv} module in Python 3.
6747This is due, for the most part, to the difference between str in
6748Python 2 and Python 3.")
6749 (license license:psfl)))
6750
6751(define-public python2-backports-csv
6752 (package-with-python2 python-backports-csv))
6753
6754(define-public python2-backports-shutil-get-terminal-size
6755 (package
6756 (name "python2-backports-shutil-get-terminal-size")
6757 (version "1.0.0")
6758 (source
6759 (origin
6760 (method url-fetch)
6761 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6762 (sha256
6763 (base32
6764 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6765 (build-system python-build-system)
6766 (arguments
6767 `(#:python ,python-2
6768 #:phases
6769 (modify-phases %standard-phases
6770 (replace 'check
6771 (lambda _
4a4a7d9a 6772 (invoke "py.test" "-v"))))))
44d10b1f
RW
6773 (native-inputs
6774 `(("python2-pytest" ,python2-pytest)))
6775 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6776 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6777 (description
6778 "This package provides a backport of the @code{get_terminal_size
6779function} from Python 3.3's @code{shutil}.
6780Unlike the original version it is written in pure Python rather than C,
6781so it might be a tiny bit slower.")
6782 (license license:expat)))
6783
6784(define-public python-waf
6785 (package
6786 (name "python-waf")
6c2c11fa 6787 (version "2.0.19")
44d10b1f
RW
6788 (source (origin
6789 (method url-fetch)
6790 (uri (string-append "https://waf.io/"
6791 "waf-" version ".tar.bz2"))
6792 (sha256
6793 (base32
6c2c11fa 6794 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
44d10b1f
RW
6795 (build-system python-build-system)
6796 (arguments
6797 '(#:phases
6798 (modify-phases %standard-phases
6799 (replace 'build
6800 (lambda _
633c8b71
MO
6801 ;; XXX: Find a way to add all extra tools.
6802 (let ((tools '("gccdeps"
6803 "clang_compilation_database")))
6804 (invoke "python" "waf-light" "configure" "build"
6805 (string-append "--tools="
6806 (string-join tools ","))))))
44d10b1f
RW
6807 (replace 'check
6808 (lambda _
6809 (invoke "python" "waf" "--version")))
6810 (replace 'install
6811 (lambda* (#:key outputs #:allow-other-keys)
6812 (let ((out (assoc-ref outputs "out")))
6813 (install-file "waf" (string-append out "/bin")))
6814 #t))
6815 ;; waf breaks when it is wrapped.
6816 (delete 'wrap))))
6817 (home-page "https://waf.io/")
6818 (synopsis "Python-based build system")
6819 (description
6820 "Waf is a Python-based framework for configuring, compiling and installing
6821applications.")
6822 (license license:bsd-3)))
6823
6824(define-public python2-waf
6825 (package-with-python2 python-waf))
6826
6827(define-public python-pyzmq
6828 (package
6829 (name "python-pyzmq")
6830 (version "17.1.2")
6831 (source
6832 (origin
6833 (method url-fetch)
6834 (uri (pypi-uri "pyzmq" version))
6835 (sha256
6836 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6837 (build-system python-build-system)
6838 (arguments
6839 `(#:configure-flags
6840 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6841 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6842 ;; --inplace' for 'python setup.py test' to work.
6843 #:tests? #f))
6844 (inputs
6845 `(("zeromq" ,zeromq)))
6846 (native-inputs
6847 `(("pkg-config" ,pkg-config)
6848 ("python-nose" ,python-nose)))
6849 (home-page "https://github.com/zeromq/pyzmq")
6850 (synopsis "Python bindings for 0MQ")
6851 (description
6852 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6853 (license license:bsd-4)))
6854
6855(define-public python2-pyzmq
6856 (package-with-python2 python-pyzmq))
6857
6858(define-public python-pep8
6859 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6860 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6861 ;; some dependents' test suites, and nothing more.
6862 (package
6863 (name "python-pep8")
6864 (version "1.7.0")
6865 (source
6866 (origin
6867 (method url-fetch)
6868 (uri (pypi-uri "pep8" version))
6869 (sha256
6870 (base32
2be878d8
CB
6871 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6872 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6873 (build-system python-build-system)
6874 (home-page "https://pep8.readthedocs.org/")
6875 (synopsis "Python style guide checker")
6876 (description
6877 "This tools checks Python code against some of the style conventions in
6878PEP 8.")
6879 (license license:expat)))
6880
6881(define-public python2-pep8
6882 (package-with-python2 python-pep8))
6883
6884(define-public python-pyflakes
6885 (package
6886 (name "python-pyflakes")
d0cba11b 6887 (version "2.1.1")
44d10b1f
RW
6888 (source
6889 (origin
6890 (method url-fetch)
6891 (uri (pypi-uri "pyflakes" version))
6892 (sha256
6893 (base32
d0cba11b 6894 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6895 (build-system python-build-system)
6896 (home-page
6897 "https://github.com/pyflakes/pyflakes")
6898 (synopsis "Passive checker of Python programs")
6899 (description
6900 "Pyflakes statically checks Python source code for common errors.")
6901 (license license:expat)))
6902
6903(define-public python2-pyflakes
6904 (package-with-python2 python-pyflakes))
6905
6906(define-public python-mccabe
6907 (package
6908 (name "python-mccabe")
6909 (version "0.6.1")
6910 (source
6911 (origin
6912 (method url-fetch)
6913 (uri (pypi-uri "mccabe" version))
6914 (sha256
6915 (base32
6916 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6917 (build-system python-build-system)
6918 (native-inputs
6919 `(("python-pytest" ,python-pytest-bootstrap)
6920 ("python-pytest-runner" ,python-pytest-runner)))
6921 (home-page "https://github.com/flintwork/mccabe")
6922 (synopsis "McCabe checker, plugin for flake8")
6923 (description
6924 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6925complexity of Python source code.")
6926 (license license:expat)))
6927
6928(define-public python2-mccabe
6929 (package-with-python2 python-mccabe))
6930
6931(define-public python-mccabe-0.2.1
6932 (package (inherit python-mccabe)
6933 (version "0.2.1")
6934 (source
6935 (origin
6936 (method url-fetch)
6937 (uri (pypi-uri "mccabe" version))
6938 (sha256
6939 (base32
6940 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6941
6942(define-public python2-mccabe-0.2.1
6943 (package-with-python2 python-mccabe-0.2.1))
6944
6945;; Flake8 2.4.1 requires an older version of pep8.
6946;; This should be removed ASAP.
6947(define-public python-pep8-1.5.7
6948 (package (inherit python-pep8)
6949 (version "1.5.7")
6950 (source
f3576970
RW
6951 (origin
6952 (method url-fetch)
6953 (uri (pypi-uri "pep8" version))
6954 (sha256
6955 (base32
6956 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6957 (arguments
6958 ;; XXX Tests not compatible with Python 3.5.
6959 '(#:tests? #f))))
6960
6961(define-public python2-pep8-1.5.7
6962 (package-with-python2 python-pep8-1.5.7))
6963
6964;; Flake8 2.4.1 requires an older version of pyflakes.
6965;; This should be removed ASAP.
6966(define-public python-pyflakes-0.8.1
6967 (package (inherit python-pyflakes)
6968 (version "0.8.1")
6969 (source
8c4dffb5
RW
6970 (origin
6971 (method url-fetch)
6972 (uri (pypi-uri "pyflakes" version))
6973 (sha256
6974 (base32
6975 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6976 (arguments
6977 ;; XXX Tests not compatible with Python 3.5.
6978 '(#:tests? #f))))
6979
6980(define-public python2-pyflakes-0.8.1
6981 (package-with-python2 python-pyflakes-0.8.1))
6982
ac63cf0a 6983(define-public python-flake8
44d10b1f
RW
6984 (package
6985 (name "python-flake8")
beaff4a8 6986 (version "3.7.7")
ac63cf0a
MB
6987 (source (origin
6988 (method url-fetch)
6989 (uri (pypi-uri "flake8" version))
6990 (sha256
6991 (base32
beaff4a8 6992 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6993 (build-system python-build-system)
6994 (arguments
6995 `(#:phases
6996 (modify-phases %standard-phases
44d10b1f
RW
6997 (delete 'check)
6998 (add-after 'install 'check
6999 (lambda* (#:key inputs outputs #:allow-other-keys)
7000 (add-installed-pythonpath inputs outputs)
7001 (invoke "pytest" "-v")
7002 #t)))))
7003 (propagated-inputs
7004 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 7005 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
7006 ("python-pyflakes" ,python-pyflakes)
7007 ("python-mccabe" ,python-mccabe)))
7008 (native-inputs
7009 `(("python-mock" ,python-mock)
7010 ("python-pytest" ,python-pytest-bootstrap)
7011 ("python-pytest-runner" ,python-pytest-runner)))
7012 (home-page "https://gitlab.com/pycqa/flake8")
7013 (synopsis
7014 "The modular source code checker: pep8, pyflakes and co")
7015 (description
7016 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 7017 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
7018 (license license:expat)))
7019
ac63cf0a
MB
7020(define-public python2-flake8
7021 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
7022 (package (inherit base)
7023 (propagated-inputs
7024 `(("python2-configparser" ,python2-configparser)
7025 ("python2-enum34" ,python2-enum34)
f8205d9a 7026 ("python2-functools32" ,python2-functools32)
beaff4a8 7027 ("python2-typing" ,python2-typing)
44d10b1f
RW
7028 ,@(package-propagated-inputs base))))))
7029
44d10b1f
RW
7030;; python-hacking requires flake8 <2.6.0.
7031(define-public python-flake8-2.5
7032 (package
7033 (inherit python-flake8)
7034 (version "2.5.5")
7035 (source (origin
7036 (method url-fetch)
7037 (uri (pypi-uri "flake8" version))
7038 (sha256
7039 (base32
7040 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
7041 (propagated-inputs
7042 `(("python-pep8" ,python-pep8)
7043 ,@(package-propagated-inputs python-flake8)))
7044 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
7045
7046(define-public python2-flake8-2.5
7047 (package
7048 (inherit python2-flake8)
7049 (version (package-version python-flake8-2.5))
7050 (source (origin
7051 (inherit (package-source python-flake8-2.5))))
7052 (propagated-inputs
7053 `(("python2-pep8" ,python2-pep8)
7054 ,@(package-propagated-inputs python2-flake8)))))
7055
7056(define-public python-flake8-polyfill
7057 (package
7058 (name "python-flake8-polyfill")
7059 (version "1.0.2")
7060 (source
7061 (origin
7062 (method url-fetch)
7063 (uri (pypi-uri "flake8-polyfill" version))
7064 (sha256
7065 (base32
7066 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
7067 (build-system python-build-system)
7068 (arguments
7069 '(#:phases
7070 (modify-phases %standard-phases
7071 (replace 'check
7072 (lambda _
40a7153d
MB
7073 ;; Be compatible with Pytest 4:
7074 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
7075 (substitute* "setup.cfg"
7076 (("\\[pytest\\]")
7077 "[tool:pytest]"))
7078
44d10b1f
RW
7079 (setenv "PYTHONPATH"
7080 (string-append (getcwd) "/build/lib:"
7081 (getenv "PYTHONPATH")))
4f0a0894 7082 (invoke "py.test" "-v"))))))
44d10b1f
RW
7083 (native-inputs
7084 `(("python-flake8" ,python-flake8)
7085 ("python-mock" ,python-mock)
7086 ("python-pep8" ,python-pep8)
7087 ("python-pycodestyle" ,python-pycodestyle)
7088 ("python-pytest" ,python-pytest)))
7089 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7090 (synopsis "Polyfill package for Flake8 plugins")
7091 (description
7092 "This package that provides some compatibility helpers for Flake8
7093plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7094 (license license:expat)))
7095
7096(define-public python2-flake8-polyfill
7097 (package-with-python2 python-flake8-polyfill))
7098
7099(define-public python-mistune
7100 (package
7101 (name "python-mistune")
7102 (version "0.8.4")
7103 (source
7104 (origin
7105 (method url-fetch)
7106 (uri (pypi-uri "mistune" version))
7107 (sha256
7108 (base32
7109 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
7110 (build-system python-build-system)
7111 (native-inputs
7112 `(("python-nose" ,python-nose)
7113 ("python-cython" ,python-cython)))
7114 (home-page "https://github.com/lepture/mistune")
7115 (synopsis "Markdown parser in pure Python")
7116 (description "This package provides a fast markdown parser in pure
7117Python.")
7118 (license license:bsd-3)))
7119
7120(define-public python2-mistune
7121 (package-with-python2 python-mistune))
7122
7123(define-public python-markdown
7124 (package
7125 (name "python-markdown")
0d1d0a6e 7126 (version "3.2.1")
44d10b1f
RW
7127 (source
7128 (origin
7129 (method url-fetch)
7130 (uri (pypi-uri "Markdown" version))
7131 (sha256
7132 (base32
0d1d0a6e 7133 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
44d10b1f
RW
7134 (build-system python-build-system)
7135 (native-inputs
7136 `(("python-nose" ,python-nose)
7137 ("python-pyyaml" ,python-pyyaml)))
7138 (home-page "https://python-markdown.github.io/")
7139 (synopsis "Python implementation of Markdown")
7140 (description
7141 "This package provides a Python implementation of John Gruber's
7142Markdown. The library features international input, various Markdown
7143extensions, and several HTML output formats. A command line wrapper
7144markdown_py is also provided to convert Markdown files to HTML.")
2537ce68 7145 (properties `((python2-variant . ,(delay python2-markdown))))
44d10b1f
RW
7146 (license license:bsd-3)))
7147
2537ce68 7148;; Markdown 3.2 dropped support for Python 2.
44d10b1f 7149(define-public python2-markdown
2537ce68
MB
7150 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
7151 (package/inherit
7152 base
7153 (version "3.1.1")
7154 (source (origin
7155 (method url-fetch)
7156 (uri (pypi-uri "Markdown" version))
7157 (sha256
7158 (base32
7159 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
44d10b1f
RW
7160
7161(define-public python-ptyprocess
7162 (package
7163 (name "python-ptyprocess")
7164 (version "0.5.2")
7165 (source
7166 (origin
7167 (method url-fetch)
7168 (uri (pypi-uri "ptyprocess" version))
7169 (sha256
7170 (base32
7171 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
7172 (build-system python-build-system)
7173 (native-inputs
7174 `(("python-nose" ,python-nose)))
7175 (arguments
7176 `(#:phases
7177 (modify-phases %standard-phases
7178 (replace 'check
7904d6fa 7179 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
7180 (home-page "https://github.com/pexpect/ptyprocess")
7181 (synopsis "Run a subprocess in a pseudo terminal")
7182 (description
7183 "This package provides a Python library used to launch a subprocess in a
7184pseudo terminal (pty), and interact with both the process and its pty.")
7185 (license license:isc)))
7186
7187(define-public python2-ptyprocess
7188 (package-with-python2 python-ptyprocess))
7189
7190(define-public python-cram
7191 (package
7192 (name "python-cram")
7193 (version "0.7")
7194 (home-page "https://bitheap.org/cram/")
7195 (source (origin
7196 (method url-fetch)
7197 (uri (list (string-append home-page "cram-"
7198 version ".tar.gz")
7199 (pypi-uri "cram" version)))
7200 (sha256
7201 (base32
7202 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7203 (arguments
7204 '(#:phases
7205 (modify-phases %standard-phases
7206 (add-after 'unpack 'patch-source
7207 (lambda _
7208 (substitute* (find-files "cram" ".*\\.py$")
7209 ;; Replace default shell path.
7210 (("/bin/sh") (which "sh")))
7211 (substitute* (find-files "tests" ".*\\.t$")
7212 (("md5") "md5sum")
7213 (("/bin/bash") (which "bash"))
7214 (("/bin/sh") (which "sh")))
7215 (substitute* "cram/_test.py"
7216 ;; This hack works around a bug triggered by substituting
7217 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7218 ;; "cram -h", which breaks the output at 80 characters. This
7219 ;; causes the line showing the default shell to break into two
7220 ;; lines, but the test expects a single line...
7221 (("env\\['COLUMNS'\\] = '80'")
7222 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
7223
7224 (substitute* "Makefile"
7225 ;; Recent versions of python-coverage have caused the test
7226 ;; coverage to decrease (as of version 0.7). Allow that.
7227 (("--fail-under=100")
7228 "--fail-under=90"))
7229
44d10b1f 7230 #t))
ff1e80d7 7231 (replace 'check
44d10b1f 7232 ;; The test phase uses the built library and executable.
44d10b1f
RW
7233 (lambda* (#:key inputs outputs #:allow-other-keys)
7234 (add-installed-pythonpath inputs outputs)
7235 (setenv "PATH" (string-append (getenv "PATH") ":"
7236 (assoc-ref outputs "out") "/bin"))
2d7db192 7237 (invoke "make" "test"))))))
44d10b1f
RW
7238 (build-system python-build-system)
7239 (native-inputs
7240 `(("python-coverage" ,python-coverage)
7241 ("which" ,which)))
7242 (synopsis "Simple testing framework for command line applications")
7243 (description
7244 "Cram is a functional testing framework for command line applications.
7245Cram tests look like snippets of interactive shell sessions. Cram runs each
7246command and compares the command output in the test with the command’s actual
7247output.")
7248 (license license:gpl2+)))
7249
7250(define-public python2-cram
7251 (package-with-python2 python-cram))
7252
7253(define-public python-straight-plugin
7254 (package
7255 (name "python-straight-plugin")
7256 (version "1.4.1")
7257 (source
7258 (origin
7259 (method url-fetch)
7260 (uri (pypi-uri "straight.plugin" version))
7261 (sha256
7262 (base32
7263 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7264 (build-system python-build-system)
7265 (home-page "https://github.com/ironfroggy/straight.plugin")
7266 (synopsis "Simple namespaced plugin facility")
7267 (description "Straight Plugin provides a type of plugin you can create from
7268almost any existing Python modules, and an easy way for outside developers to
7269add functionality and customization to your projects with their own plugins.")
7270 (license license:expat)))
7271
7272(define-public python2-straight-plugin
7273 (package-with-python2 python-straight-plugin))
7274
7275(define-public python-fonttools
7276 (package
7277 (name "python-fonttools")
1a4bb420 7278 (version "3.38.0")
44d10b1f
RW
7279 (source (origin
7280 (method url-fetch)
7281 (uri (pypi-uri "fonttools" version ".zip"))
7282 (sha256
7283 (base32
1a4bb420 7284 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
7285 (build-system python-build-system)
7286 (native-inputs
7287 `(("unzip" ,unzip)
7288 ("python-pytest" ,python-pytest)
7289 ("python-pytest-runner" ,python-pytest-runner)))
9d25a454 7290 (home-page "https://github.com/fonttools/fonttools")
44d10b1f
RW
7291 (synopsis "Tools to manipulate font files")
7292 (description
7293 "FontTools/TTX is a library to manipulate font files from Python. It
7294supports reading and writing of TrueType/OpenType fonts, reading and writing
7295of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7296also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7297from an XML-based format.")
7298 (license license:expat)))
7299
7300(define-public python2-fonttools
7301 (package-with-python2 python-fonttools))
7302
7303(define-public python-ly
7304 (package
7305 (name "python-ly")
7306 (version "0.9.5")
7307 (source
7308 (origin
7309 (method url-fetch)
7310 (uri (pypi-uri name version))
7311 (sha256
7312 (base32
7313 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7314 (build-system python-build-system)
7315 (arguments
7316 ;; FIXME: Some tests need network access.
7317 '(#:tests? #f))
7318 (synopsis "Tool and library for manipulating LilyPond files")
7319 (description "This package provides a Python library to parse, manipulate
7320or create documents in LilyPond format. A command line program ly is also
7321provided that can be used to do various manipulations with LilyPond files.")
e85af137 7322 (home-page "https://pypi.org/project/python-ly/")
44d10b1f
RW
7323 (license license:gpl2+)))
7324
7325(define-public python-appdirs
7326 (package
7327 (name "python-appdirs")
7328 (version "1.4.3")
7329 (source
7330 (origin
7331 (method url-fetch)
7332 (uri (pypi-uri "appdirs" version))
7333 (sha256
7334 (base32
7335 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7336 (build-system python-build-system)
7337 (home-page "https://github.com/ActiveState/appdirs")
7338 (synopsis
7339 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7340 (description
7341 "This module provides a portable way of finding out where user data
7342should be stored on various operating systems.")
7343 (license license:expat)))
7344
7345(define-public python2-appdirs
7346 (package-with-python2 python-appdirs))
7347
7348(define-public python-llfuse
7349 (package
7350 (name "python-llfuse")
7351 (version "1.3.5")
7352 (source (origin
7353 (method url-fetch)
7354 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7355 (sha256
7356 (base32
7357 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7358 (build-system python-build-system)
7359 (inputs
7360 `(("fuse" ,fuse)
7361 ("attr" ,attr)))
7362 (native-inputs
7363 `(("pkg-config" ,pkg-config)))
7364 (synopsis "Python bindings for FUSE")
7365 (description
7366 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7367 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7368 (license license:lgpl2.0+)
7369 (properties `((python2-variant . ,(delay python2-llfuse))))))
7370
7371(define-public python2-llfuse
7372 (package (inherit (package-with-python2
7373 (strip-python2-variant python-llfuse)))
7374 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7375
7376;; For attic-0.16
7377(define-public python-llfuse-0.41
7378 (package (inherit python-llfuse)
7379 (version "0.41.1")
7380 (source (origin
7381 (method url-fetch)
7382 (uri (string-append
7383 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7384 "llfuse-" version ".tar.bz2"))
7385 (sha256
7386 (base32
7387 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7388 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7389 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7390 (license (list license:expat license:lgpl2.0+))))
7391
7392(define-public python-msgpack
7393 (package
7394 (name "python-msgpack")
7395 (version "0.5.6")
7396 (source (origin
7397 (method url-fetch)
7398 (uri (pypi-uri "msgpack" version))
7399 (sha256
7400 (base32
7401 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7402 (build-system python-build-system)
7403 (arguments
7404 `(#:modules ((guix build utils)
7405 (guix build python-build-system)
7406 (ice-9 ftw)
7407 (srfi srfi-1)
7408 (srfi srfi-26))
7409 #:phases
7410 (modify-phases %standard-phases
7411 (replace 'check
7412 (lambda _
7413 (let ((cwd (getcwd)))
7414 (setenv "PYTHONPATH"
7415 (string-append cwd "/build/"
7416 (find (cut string-prefix? "lib" <>)
7417 (scandir (string-append cwd "/build")))
7418 ":"
7419 (getenv "PYTHONPATH")))
7420 (invoke "pytest" "-v" "test")))))))
7421 (native-inputs
7422 `(("python-pytest" ,python-pytest)))
7423 (synopsis "MessagePack (de)serializer")
7424 (description "MessagePack is a fast, compact binary serialization format,
7425suitable for similar data to JSON. This package provides CPython bindings for
7426reading and writing MessagePack data.")
e85af137 7427 (home-page "https://pypi.org/project/msgpack/")
44d10b1f
RW
7428 (license license:asl2.0)))
7429
7430;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7431;; release 0.5. Some packages like borg still call it by the old name for now.
7432;; <https://bugs.gnu.org/30662>
7433(define-public python-msgpack-transitional
7434 (package
7435 (inherit python-msgpack)
7436 (name "python-msgpack-transitional")
7437 (arguments
7438 (substitute-keyword-arguments (package-arguments python-msgpack)
7439 ((#:phases phases)
7440 `(modify-phases ,phases
7441 (add-after 'unpack 'configure-transitional
7442 (lambda _
7443 ;; Keep using the old name.
7444 (substitute* "setup.py"
7445 (("TRANSITIONAL = False")
7446 "TRANSITIONAL = 1"))
7447 #t))))))))
7448
7449(define-public python2-msgpack
7450 (package-with-python2 python-msgpack))
7451
7452(define-public python-netaddr
7453 (package
7454 (name "python-netaddr")
7455 (version "0.7.19")
7456 (source
7457 (origin
7458 (method url-fetch)
7459 (uri (pypi-uri "netaddr" version))
7460 (sha256
7461 (base32
7462 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7463 (build-system python-build-system)
7464 (arguments `(#:tests? #f)) ;; No tests.
7465 (home-page "https://github.com/drkjam/netaddr/")
7466 (synopsis "Pythonic manipulation of network addresses")
7467 (description
7468 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7469and MAC network addresses.")
7470 (license license:bsd-3)))
7471
7472(define-public python2-netaddr
7473 (package-with-python2 python-netaddr))
7474
dd85eca0
AG
7475(define-public python2-pyroute2
7476 (package
7477 (name "python2-pyroute2")
7478 (version "0.5.6")
7479 (source
7480 (origin
7481 (method url-fetch)
7482 (uri (pypi-uri "pyroute2" version))
7483 (sha256
7484 (base32
7485 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7486 (build-system python-build-system)
7487 (arguments
7488 `(#:python ,python-2)) ;Python 3.x is not supported
7489 (home-page "https://github.com/svinota/pyroute2")
7490 (synopsis "Python netlink library")
7491 (description
7492 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7493Supported netlink families and protocols include:
7494@itemize
7495@item rtnl, network settings - addresses, routes, traffic controls
7496@item nfnetlink - netfilter API: ipset, nftables, ...
7497@item ipq - simplest userspace packet filtering, iptables QUEUE target
7498@item devlink - manage and monitor devlink-enabled hardware
7499@item generic - generic netlink families
7500 @itemize
7501 @item nl80211 - wireless functions API (basic support)
7502 @item taskstats - extended process statistics
7503 @item acpi_events - ACPI events monitoring
7504 @item thermal_events - thermal events monitoring
7505 @item VFS_DQUOT - disk quota events monitoring
7506 @end itemize
7507@end itemize")
7508 (license license:gpl2+)))
7509
44d10b1f
RW
7510(define-public python-wrapt
7511 (package
7512 (name "python-wrapt")
2271a1dc 7513 (version "1.11.2")
44d10b1f 7514 (source
2271a1dc
MB
7515 (origin
7516 (method url-fetch)
7517 (uri (pypi-uri "wrapt" version))
7518 (sha256
7519 (base32
7520 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7521 (build-system python-build-system)
7522 (arguments
7523 ;; Tests are not included in the tarball, they are only available in the
7524 ;; git repository.
7525 `(#:tests? #f))
7526 (home-page "https://github.com/GrahamDumpleton/wrapt")
7527 (synopsis "Module for decorators, wrappers and monkey patching")
7528 (description
2271a1dc 7529 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7530 Python, which can be used as the basis for the construction of function
7531 wrappers and decorator functions.")
7532 (license license:bsd-2)))
7533
7534(define-public python2-wrapt
7535 (package-with-python2 python-wrapt))
7536
7537(define-public python-xlrd
7538 (package
7539 (name "python-xlrd")
3a2b1a3c 7540 (version "1.2.0")
44d10b1f
RW
7541 (source (origin
7542 (method url-fetch)
7543 (uri (pypi-uri "xlrd" version))
7544 (sha256
7545 (base32
3a2b1a3c 7546 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7547 (build-system python-build-system)
7548 (arguments
7549 `(#:phases
7550 (modify-phases %standard-phases
3ccdd3a5
MO
7551 ;; Some tests depend on writing a temporary file to the user's home
7552 ;; directory.
3a2b1a3c
GL
7553 (add-after 'unpack 'fix-tests
7554 (lambda _
7555 (delete-file "tests/test_open_workbook.py")
7556 #t)))))
44d10b1f
RW
7557 (home-page "http://www.python-excel.org/")
7558 (synopsis "Library for extracting data from Excel files")
a0909286 7559 (description "This package provides a library to extract data from
44d10b1f
RW
7560spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7561@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7562Unicode-aware. It is not intended as an end-user tool.")
7563 (license license:bsd-3)))
7564
7565(define-public python2-xlrd
7566 (package-with-python2 python-xlrd))
7567
7568(define-public python-prettytable
7569 (package
7570 (name "python-prettytable")
7571 (version "0.7.2")
7572 (source
7573 (origin
7574 (method url-fetch)
337c3a1e 7575 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7576 (sha256
7577 (base32
7578 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7579 (build-system python-build-system)
8be58b48 7580 (home-page "https://code.google.com/archive/p/prettytable/")
44d10b1f
RW
7581 (synopsis "Display tabular data in an ASCII table format")
7582 (description
7583 "A library designed to represent tabular data in visually appealing ASCII
7584tables. PrettyTable allows for selection of which columns are to be printed,
7585independent alignment of columns (left or right justified or centred) and
7586printing of sub-tables by specifying a row range.")
7587 (license license:bsd-3)))
7588
7589(define-public python2-prettytable
7590 (package-with-python2 python-prettytable))
7591
7592(define-public python-tables
7593 (package
7594 (name "python-tables")
7595 (version "3.4.4")
7596 (source
7597 (origin
7598 (method url-fetch)
7599 (uri (pypi-uri "tables" version))
7600 (sha256
7601 (base32
7602 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7603 (modules '((guix build utils)))
7604 (snippet
7605 '(begin
7606 ;; Remove pre-compiled .pyc files from source.
7607 (for-each delete-file-recursively
7608 (find-files "." "__pycache__" #:directories? #t))
7609 (for-each delete-file (find-files "." "\\.pyc$"))
7610 #t))))
7611 (build-system python-build-system)
7612 (arguments
7613 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7614 ;; or "check", so we must override the build and check phases.
7615 #:phases
7616 (modify-phases %standard-phases
7617 (add-after 'unpack 'use-gcc
7618 (lambda _
7619 (substitute* "setup.py"
7620 (("compiler = new_compiler\\(\\)" line)
7621 (string-append line
7622 "\ncompiler.set_executables(compiler='gcc',"
7623 "compiler_so='gcc',"
7624 "linker_exe='gcc',"
7625 "linker_so='gcc -shared')")))
7626 #t))
70b74663
RW
7627 (add-after 'unpack 'disable-tuning
7628 (lambda _
7629 (substitute* "setup.py"
7630 (("cpu_flags = .*")
7631 "cpu_flags = ['sse2']\n"))
7632 #t))
44d10b1f
RW
7633 (replace 'build
7634 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7635 (invoke "python" "setup.py" "build"
7636 (string-append "--hdf5="
7637 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7638 (replace 'check
7639 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7640 (invoke "python" "setup.py" "check"
7641 (string-append "--hdf5="
7642 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7643 (propagated-inputs
7644 `(("python-numexpr" ,python-numexpr)
7645 ("python-numpy" ,python-numpy)))
7646 (native-inputs
7647 `(("python-cython" ,python-cython)
7648 ("pkg-config" ,pkg-config)))
7649 (inputs
538c1a02 7650 `(("hdf5" ,hdf5-1.10)
44d10b1f
RW
7651 ("bzip2" ,bzip2)
7652 ("zlib" ,zlib)))
7653 (home-page "http://www.pytables.org/")
7654 (synopsis "Hierarchical datasets for Python")
7655 (description "PyTables is a package for managing hierarchical datasets and
7656designed to efficiently cope with extremely large amounts of data.")
7657 (license license:bsd-3)))
7658
7659(define-public python2-tables
7660 (package-with-python2 python-tables))
7661
cc2c2850
RW
7662(define-public python-pytest-black
7663 (package
7664 (name "python-pytest-black")
7665 (version "0.3.8")
7666 (source
7667 (origin
7668 (method url-fetch)
7669 (uri (pypi-uri "pytest-black" version))
7670 (sha256
7671 (base32
7672 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
7673 (build-system python-build-system)
7674 (propagated-inputs
7675 `(("python-pytest" ,python-pytest)
7676 ("python-black" ,python-black)
7677 ("python-toml" ,python-toml)))
7678 (native-inputs
7679 `(("python-setuptools-scm" ,python-setuptools-scm)))
7680 (home-page "https://github.com/shopkeep/pytest-black")
7681 (synopsis "Pytest plugin to enable format checking with black")
7682 (description
7683 "This package provides a pytest plugin to enable format checking with the
7684Python code formatter \"black\".")
7685 (license license:expat)))
7686
2ceff35f
RW
7687(define-public python-get-version
7688 (package
7689 (name "python-get-version")
7690 (version "2.1")
7691 (source
7692 (origin
7693 (method url-fetch)
7694 (uri (pypi-uri "get_version" version))
7695 (sha256
7696 (base32
7697 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
7698 (build-system python-build-system)
7699 (propagated-inputs
7700 `(("python-pygments" ,python-pygments)
7701 ("python-pytest" ,python-pytest)
7702 ("python-pytest-black" ,python-pytest-black)
7703 ("python-pytest-cov" ,python-pytest-cov)
7704 ("python-setuptools" ,python-setuptools)
7705 ("python-testpath" ,python-testpath)))
7706 (home-page "https://github.com/flying-sheep/get_version")
7707 (synopsis "Version helper in the spirit of versioneer")
7708 (description
7709 "This package provides a version helper that lets you automatically use
7710the latest @code{vX.X.X} Git tag as the version in your Python package. It
7711also supports getting the version from Python source distributions or, once
7712your package is installed, via @code{pkg_resources} (part of
7713@code{setuptools}).")
7714 (license license:gpl3+)))
7715
053ab825
RW
7716(define-public python-legacy-api-wrap
7717 (package
7718 (name "python-legacy-api-wrap")
7719 (version "1.2")
7720 (source
7721 (origin
7722 (method url-fetch)
7723 (uri (pypi-uri "legacy-api-wrap" version))
7724 (sha256
7725 (base32
7726 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
7727 (build-system python-build-system)
7728 (propagated-inputs
7729 `(("python-get-version" ,python-get-version)
7730 ("python-pytest" ,python-pytest)
7731 ("python-pytest-black" ,python-pytest-black)
7732 ("python-pytest-cov" ,python-pytest-cov)
7733 ("python-setuptools" ,python-setuptools)))
7734 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
7735 (synopsis "Legacy API wrapper")
7736 (description "This module defines a decorator to wrap legacy APIs. The
7737primary use case is APIs defined before keyword-only parameters existed.")
7738 (license license:gpl3+)))
7739
44d10b1f
RW
7740(define-public python-pyasn1
7741 (package
7742 (name "python-pyasn1")
7743 (version "0.4.3")
7744 (source
7745 (origin
7746 (method url-fetch)
7747 (uri (pypi-uri "pyasn1" version))
7748 (sha256
7749 (base32
7750 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7751 (build-system python-build-system)
7752 (home-page "http://pyasn1.sourceforge.net/")
7753 (synopsis "ASN.1 types and codecs")
7754 (description
7755 "This is an implementation of ASN.1 types and codecs in Python. It is
7756suitable for a wide range of protocols based on the ASN.1 specification.")
7757 (license license:bsd-2)))
7758
7759(define-public python2-pyasn1
7760 (package-with-python2 python-pyasn1))
7761
7762(define-public python-pyasn1-modules
7763 (package
7764 (name "python-pyasn1-modules")
7765 (version "0.2.2")
7766 (source
7767 (origin
7768 (method url-fetch)
7769 (uri (pypi-uri "pyasn1-modules" version))
7770 (sha256
7771 (base32
7772 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7773 (build-system python-build-system)
7774 (propagated-inputs
7775 `(("python-pyasn1" ,python-pyasn1)))
7776 (home-page "https://sourceforge.net/projects/pyasn1/")
7777 (synopsis "ASN.1 codec implementations")
7778 (description
7779 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7780implementations of ASN.1-based codecs and protocols.")
7781 (license license:bsd-3)))
7782
7783(define-public python2-pyasn1-modules
7784 (package-with-python2 python-pyasn1-modules))
7785
7786(define-public python-ipaddress
7787 (package
7788 (name "python-ipaddress")
7789 (version "1.0.22")
7790 (source (origin
7791 (method url-fetch)
7792 (uri (pypi-uri "ipaddress" version))
7793 (sha256
7794 (base32
7795 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7796 (build-system python-build-system)
7797 (home-page "https://github.com/phihag/ipaddress")
7798 (synopsis "IP address manipulation library")
7799 (description
7800 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7801 in Python. This library is used to create, poke at, and manipulate IPv4 and
7802 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7803 module to older versions of Python.")
7804 (license license:psfl)))
7805
7806(define-public python2-ipaddress
7807 (package-with-python2 python-ipaddress))
7808
7809(define-public python2-ipaddr
7810 (package
7811 (name "python2-ipaddr")
7812 (version "2.1.11")
7813 (source
7814 (origin
7815 (method url-fetch)
7816 (uri (pypi-uri "ipaddr" version))
7817 (sha256
7818 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7819 (build-system python-build-system)
7820 (arguments
7821 `(#:python ,python-2 ;version 2 only
7822 #:phases
7823 (modify-phases %standard-phases
7824 (replace 'check
40b8c4e3 7825 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7826 (home-page "https://github.com/google/ipaddr-py")
7827 (synopsis "IP address manipulation library")
7828 (description
7829 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7830IPv6 addresses and networks.
7831
7832For new implementations you may prefer to use the standard module
7833@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7834versions of Python.")
7835 (license license:asl2.0)))
7836
7837(define-public python-idna
7838 (package
7839 (name "python-idna")
e95c9837 7840 (version "2.8")
44d10b1f
RW
7841 (source
7842 (origin
7843 (method url-fetch)
7844 (uri (pypi-uri "idna" version))
7845 (sha256
7846 (base32
e95c9837 7847 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7848 (build-system python-build-system)
7849 (home-page "https://github.com/kjd/idna")
7850 (synopsis "Internationalized domain names in applications")
7851 (description
7852 "This is a library to support the Internationalised Domain Names in
7853Applications (IDNA) protocol as specified in RFC 5891. This version of the
7854protocol is often referred to as “IDNA2008” and can produce different results
7855from the earlier standard from 2003. The library is also intended to act as a
7856suitable drop-in replacement for the “encodings.idna” module that comes with
7857the Python standard library but currently only supports the older 2003
7858specification.")
7859 (license license:bsd-4)))
7860
a76e6a69
JM
7861(define-public python-idna-2.7
7862 (package (inherit python-idna)
7863 (version "2.7")
7864 (source (origin
7865 (method url-fetch)
7866 (uri (pypi-uri "idna" version))
7867 (sha256
7868 (base32
7869 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7870
7871
44d10b1f
RW
7872(define-public python2-idna
7873 (package-with-python2 python-idna))
7874
7875(define-public python-idna-ssl
7876 (package
7877 (name "python-idna-ssl")
7878 (version "1.0.1")
7879 (source
7880 (origin
7881 (method url-fetch)
7882 (uri (pypi-uri "idna-ssl" version))
7883 (sha256
7884 (base32
7885 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7886 (build-system python-build-system)
7887 (arguments
7888 `(#:tests? #f)) ;circular dependency with python-aiohttp
7889 (home-page "https://github.com/aio-libs/idna-ssl")
7890 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7891 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7892domains support.")
7893 (license license:expat)))
7894
7895(define-public python-pretend
7896 (package
7897 (name "python-pretend")
7898 (version "1.0.9")
7899 (source
7900 (origin
7901 (method url-fetch)
9f1f22ee 7902 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7903 (sha256
7904 (base32
7905 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7906 (build-system python-build-system)
7907 (home-page "https://github.com/alex/pretend")
7908 (synopsis "Library for stubbing in Python")
7909 (description
7910 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7911technique for writing tests. You may hear the term mixed up with mocks,
7912fakes, or doubles. Basically, a stub is an object that returns pre-canned
7913responses, rather than doing any computation.")
7914 (license license:bsd-3)))
7915
7916(define-public python2-pretend
7917 (package-with-python2 python-pretend))
7918
7919(define-public python-pip
7920 (package
7921 (name "python-pip")
0a193d32 7922 (version "20.0.2")
44d10b1f
RW
7923 (source
7924 (origin
7925 (method url-fetch)
7926 (uri (pypi-uri "pip" version))
7927 (sha256
7928 (base32
0a193d32 7929 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
44d10b1f
RW
7930 (build-system python-build-system)
7931 (arguments
7932 '(#:tests? #f)) ; there are no tests in the pypi archive.
7933 (home-page "https://pip.pypa.io/")
7934 (synopsis "Package manager for Python software")
7935 (description
7936 "Pip is a package manager for Python software, that finds packages on the
7937Python Package Index (PyPI).")
7938 (license license:expat)))
7939
7940(define-public python2-pip
7941 (package-with-python2 python-pip))
7942
7943(define-public python-tlsh
7944 (package
7945 (name "python-tlsh")
7946 (version "3.4.5")
7947 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7948 (source
7949 (origin
7950 (method git-fetch)
7951 (uri (git-reference
7952 (url "https://github.com/trendmicro/tlsh.git")
7953 (commit (string-append "v" version))))
7954 (file-name (git-file-name name version))
7955 (sha256
7956 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7957 (build-system cmake-build-system)
7958 (arguments
7959 '(#:out-of-source? #f
7960 #:phases (modify-phases %standard-phases
7961 (replace
7962 'install
7963 (lambda* (#:key outputs #:allow-other-keys)
7964 ;; Build and install the Python bindings. The underlying
7965 ;; C++ library is apparently not meant to be installed.
7966 (let ((out (assoc-ref outputs "out")))
7967 (with-directory-excursion "py_ext"
7968 (and (system* "python" "setup.py" "build")
7969 (system* "python" "setup.py" "install"
7970 (string-append "--prefix=" out))))))))))
7971 (inputs `(("python" ,python-wrapper))) ;for the bindings
7972 (synopsis "Fuzzy matching library for Python")
7973 (description
7974 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7975Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7976value which can be used for similarity comparisons. Similar objects have
7977similar hash values, which allows for the detection of similar objects by
7978comparing their hash values. The byte stream should have a sufficient amount
7979of complexity; for example, a byte stream of identical bytes will not generate
7980a hash value.")
7981 (license license:asl2.0)))
7982
7983(define-public python2-tlsh
7984 (package
7985 (inherit python-tlsh)
7986 (name "python2-tlsh")
7987 (inputs `(("python" ,python-2)))))
7988
7989(define-public python-termcolor
7990 (package
7991 (name "python-termcolor")
7992 (version "1.1.0")
7993 (source
7994 (origin
7995 (method url-fetch)
7996 (uri (pypi-uri "termcolor" version))
7997 (sha256
7998 (base32
7999 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8000 (build-system python-build-system)
8001 (arguments
8002 ;; There are no tests.
8003 `(#:tests? #f))
e85af137 8004 (home-page "https://pypi.org/project/termcolor/")
44d10b1f
RW
8005 (synopsis "ANSII Color formatting for terminal output")
8006 (description
8007 "This package provides ANSII Color formatting for output in terminals.")
8008 (license license:expat)))
8009
8010(define-public python2-termcolor
8011 (package-with-python2 python-termcolor))
8012
8013(define-public python-libarchive-c
8014 (package
8015 (name "python-libarchive-c")
f2774824 8016 (version "2.9")
44d10b1f
RW
8017 (source (origin
8018 (method url-fetch)
8019 (uri (pypi-uri "libarchive-c" version))
8020 (sha256
8021 (base32
f2774824 8022 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
44d10b1f
RW
8023 (build-system python-build-system)
8024 (arguments
8025 '(#:phases (modify-phases %standard-phases
8026 (add-before
8027 'build 'reference-libarchive
8028 (lambda* (#:key inputs #:allow-other-keys)
8029 ;; Retain the absolute file name of libarchive.so.
8030 (let ((libarchive (assoc-ref inputs "libarchive")))
8031 (substitute* "libarchive/ffi.py"
8032 (("find_library\\('archive'\\)")
8033 (string-append "'" libarchive
8034 "/lib/libarchive.so'"))))))
8035 (replace 'check
8036 (lambda _ (invoke "pytest" "-vv"))))))
8037 (native-inputs
8038 `(("python-mock" ,python-mock)
8039 ("python-pytest" ,python-pytest)))
8040 (inputs
8041 `(("libarchive" ,libarchive)))
8042 (home-page "https://github.com/Changaco/python-libarchive-c")
8043 (synopsis "Python interface to libarchive")
8044 (description
8045 "This package provides Python bindings to libarchive, a C library to
8046access possibly compressed archives in many different formats. It uses
8047Python's @code{ctypes} foreign function interface (FFI).")
8048 (license license:lgpl2.0+)))
8049
8050(define-public python2-libarchive-c
8051 (package-with-python2 python-libarchive-c))
8052
8053(define-public python-file
8054 (package
8055 (inherit file)
8056 (name "python-file")
8057 (build-system python-build-system)
8058 (arguments
8059 '(#:tests? #f ;no tests
8060 #:configure-flags '("--single-version-externally-managed" "--root=/")
8061 #:phases (modify-phases %standard-phases
8062 (add-before 'build 'change-directory
8063 (lambda _
8064 (chdir "python")
8065 #t))
8066 (add-before 'build 'set-library-file-name
8067 (lambda* (#:key inputs #:allow-other-keys)
8068 (let ((file (assoc-ref inputs "file")))
8069 (substitute* "magic.py"
8070 (("find_library\\('magic'\\)")
8071 (string-append "'" file "/lib/libmagic.so'")))
8072 #t))))))
8073 (inputs `(("file" ,file)))
528ea990
LC
8074 (native-inputs (if (%current-target-system)
8075 `(("self" ,this-package))
8076 '()))
44d10b1f
RW
8077 (synopsis "Python bindings to the libmagic file type guesser. Note that
8078this module and the python-magic module both provide a \"magic.py\" file;
8079these two modules, which are different and were developed separately, both
8080serve the same purpose: provide Python bindings for libmagic.")))
8081
8082(define-public python2-file
8083 (package-with-python2 python-file))
8084
8085(define-public python-debian
8086 (package
8087 (name "python-debian")
8088 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 8089 (version "0.1.36")
44d10b1f
RW
8090 (source
8091 (origin
9f74bd31
VC
8092 ;; Use git-fetch, as pypi doesn't include test suite.
8093 (method git-fetch)
8094 (uri (git-reference
8095 (url home-page)
8096 (commit version)))
8097 (file-name (git-file-name name version))
44d10b1f
RW
8098 (sha256
8099 (base32
9f74bd31 8100 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 8101 (build-system python-build-system)
9f74bd31
VC
8102 (arguments
8103 `(#:phases (modify-phases %standard-phases
8104 (add-after 'unpack 'remove-debian-specific-tests
8105 ;; python-apt, apt and dpkg are not yet available in guix,
8106 ;; and these tests heavily depend on them.
8107 (lambda _
8108 (delete-file "lib/debian/tests/test_deb822.py")
8109 (delete-file "lib/debian/tests/test_debfile.py")
8110 #t)))))
44d10b1f 8111 (propagated-inputs
9f74bd31
VC
8112 `(("python-six" ,python-six)
8113 ("python-chardet" ,python-chardet)))
44d10b1f
RW
8114 (synopsis "Debian package related modules")
8115 (description
8116 ;; XXX: Use @enumerate instead of @itemize to work around
8117 ;; <http://bugs.gnu.org/21772>.
8118 "This package provides Python modules that abstract many formats of
8119Debian-related files, such as:
8120
8121@enumerate
8122@item Debtags information;
8123@item @file{debian/changelog} files;
8124@item packages files, pdiffs;
8125@item control files of single or multiple RFC822-style paragraphs---e.g.
8126 @file{debian/control}, @file{.changes}, @file{.dsc};
8127@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8128 contained files and meta-information.
8129@end enumerate\n")
8130
8131 ;; Modules are either GPLv2+ or GPLv3+.
8132 (license license:gpl3+)))
8133
44d10b1f
RW
8134(define-public python-nbformat
8135 (package
8136 (name "python-nbformat")
8137 (version "4.4.0")
8138 (source
8139 (origin
8140 (method url-fetch)
8141 (uri (pypi-uri "nbformat" version))
8142 (sha256
8143 (base32
8144 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
8145 (build-system python-build-system)
8146 (arguments `(#:tests? #f)) ; no test target
8147 (propagated-inputs
8148 `(("python-ipython-genutils" ,python-ipython-genutils)
8149 ("python-jsonschema" ,python-jsonschema)
8150 ("python-jupyter-core" ,python-jupyter-core)
8151 ("python-traitlets" ,python-traitlets)))
8152 (home-page "http://jupyter.org")
8153 (synopsis "Jupyter Notebook format")
8154 (description "This package provides the reference implementation of the
8155Jupyter Notebook format and Python APIs for working with notebooks.")
8156 (license license:bsd-3)))
8157
8158(define-public python2-nbformat
8159 (package-with-python2 python-nbformat))
8160
8161(define-public python-bleach
8162 (package
8163 (name "python-bleach")
e6daf515 8164 (version "3.1.1")
44d10b1f
RW
8165 (source
8166 (origin
8167 (method url-fetch)
8168 (uri (pypi-uri "bleach" version))
8169 (sha256
8170 (base32
e6daf515 8171 "0j4xlnw99m1xy0s7wxz9fk5f3c1n8r296fh75jn5p5j61w6qg2xa"))))
44d10b1f
RW
8172 (build-system python-build-system)
8173 (propagated-inputs
ff0efc8f 8174 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
8175 ("python-six" ,python-six)))
8176 (native-inputs
ff0efc8f
MB
8177 `(("python-pytest" ,python-pytest)
8178 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
8179 (home-page "https://github.com/jsocol/bleach")
8180 (synopsis "Whitelist-based HTML-sanitizing tool")
8181 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8182 (license license:asl2.0)))
8183
8184(define-public python2-bleach
8185 (package-with-python2 python-bleach))
8186
8187(define-public python-entrypoints
8188 (package
8189 (name "python-entrypoints")
a7f1b718 8190 (version "0.3")
44d10b1f
RW
8191 (source
8192 (origin
8193 (method url-fetch)
a7f1b718 8194 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
8195 (sha256
8196 (base32
a7f1b718 8197 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
8198 (build-system python-build-system)
8199 ;; The package does not come with a setup.py file, so we have to generate
8200 ;; one ourselves.
8201 (arguments
8202 `(#:tests? #f
8203 #:phases
8204 (modify-phases %standard-phases
8205 (add-after 'unpack 'create-setup.py
8206 (lambda _
8207 (call-with-output-file "setup.py"
8208 (lambda (port)
8209 (format port "\
8210from setuptools import setup
8211setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8212" ,version))))))))
8213 (home-page "https://github.com/takluyver/entrypoints")
8214 (synopsis "Discover and load entry points from installed Python packages")
8215 (description "Entry points are a way for Python packages to advertise
8216objects with some common interface. The most common examples are
8217@code{console_scripts} entry points, which define shell commands by
8218identifying a Python function to run. The @code{entrypoints} module contains
8219functions to find and load entry points.")
8220 (license license:expat)))
8221
8222(define-public python2-entrypoints
8223 (package-with-python2 python-entrypoints))
8224
8225(define-public python-nbconvert
8226 (package
8227 (name "python-nbconvert")
8228 (version "5.0.0b1")
8229 (source
8230 (origin
8231 (method url-fetch)
8232 (uri (pypi-uri "nbconvert" version))
8233 (sha256
8234 (base32
8235 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8236 (build-system python-build-system)
8237 (arguments
8238 `(;; The "bdist_egg" target is disabled by default, causing the installation
8239 ;; to fail.
8240 #:configure-flags (list "bdist_egg")
8241 ;; FIXME: 5 failures, 40 errors.
8242 #:tests? #f))
8243 ;; #:phases
8244 ;; (modify-phases %standard-phases
8245 ;; (replace 'check
8246 ;; (lambda _
8247 ;; (zero? (system* "py.test" "-v")))))
8248 (native-inputs
8249 `(("python-pytest" ,python-pytest)))
8250 (propagated-inputs
8251 `(("python-bleach" ,python-bleach)
8252 ("python-entrypoints" ,python-entrypoints)
8253 ("python-jinja2" ,python-jinja2)
8254 ("python-jupyter-core" ,python-jupyter-core)
8255 ("python-mistune" ,python-mistune)
8256 ("python-nbformat" ,python-nbformat)
8257 ("python-pygments" ,python-pygments)
8258 ("python-traitlets" ,python-traitlets)))
8259 (home-page "http://jupyter.org")
8260 (synopsis "Converting Jupyter Notebooks")
8261 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8262notebooks to various other formats via Jinja templates. It allows you to
8263convert an @code{.ipynb} notebook file into various static formats including:
8264
8265@enumerate
8266@item HTML
8267@item LaTeX
8268@item PDF
8269@item Reveal JS
8270@item Markdown (md)
8271@item ReStructured Text (rst)
8272@item executable script
8273@end enumerate\n")
8274 (license license:bsd-3)))
8275
8276(define-public python2-nbconvert
8277 (package-with-python2 python-nbconvert))
8278
44d10b1f
RW
8279(define-public python-notebook
8280 (package
8281 (name "python-notebook")
8282 (version "5.7.4")
8283 (source (origin
8284 (method url-fetch)
8285 (uri (pypi-uri "notebook" version))
8286 (sha256
8287 (base32
8288 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
8289 (build-system python-build-system)
8290 (arguments
8291 `(#:phases
8292 (modify-phases %standard-phases
8293 (replace 'check
8294 (lambda _
8295 ;; These tests require a browser
8296 (delete-file-recursively "notebook/tests/selenium")
8297 ;; Some tests need HOME
8298 (setenv "HOME" "/tmp")
8299 ;; This file contains "warningfilters", which are not supported
8300 ;; by this version of nose.
8301 (delete-file "setup.cfg")
8302 (with-directory-excursion "/tmp"
8303 (invoke "nosetests" "-v"))
8304 #t)))))
8305 (propagated-inputs
8306 `(("python-jupyter-core" ,python-jupyter-core)
8307 ("python-nbformat" ,python-nbformat)
8308 ("python-nbconvert" ,python-nbconvert)
8309 ("python-prometheus-client" ,python-prometheus-client)
8310 ("python-send2trash" ,python-send2trash)
8311 ("python-terminado" ,python-terminado)))
8312 (native-inputs
8313 `(("python-nose" ,python-nose)
8314 ("python-sphinx" ,python-sphinx)
8315 ("python-requests" ,python-requests)))
8316 (home-page "http://jupyter.org/")
8317 (synopsis "Web-based notebook environment for interactive computing")
8318 (description
8319 "The Jupyter HTML notebook is a web-based notebook environment for
8320interactive computing.")
8321 (properties `((python2-variant . ,(delay python2-notebook))))
8322 (license license:bsd-3)))
8323
8324(define-public python2-notebook
8325 (let ((base (package-with-python2
8326 (strip-python2-variant python-notebook))))
8327 (package (inherit base)
8328 (native-inputs
8329 `(("python2-mock" ,python2-mock)
8330 ,@(package-native-inputs base)))
8331 (arguments
8332 (substitute-keyword-arguments (package-arguments base)
8333 ((#:phases phases)
8334 `(modify-phases ,phases
8335 (add-before 'check 'disable-test-case
8336 ;; The test requires network access to localhost. Curiously it
8337 ;; fails with Python 2 only. Simply make the test-case return
8338 ;; immediately.
8339 (lambda _
8340 (substitute*
8341 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8342 (("formats = self.nbconvert_api") "return #")))))))))))
8343
8344(define-public python-widgetsnbextension
8345 (package
8346 (name "python-widgetsnbextension")
8347 (version "3.4.2")
8348 (source
8349 (origin
8350 (method url-fetch)
8351 (uri (pypi-uri "widgetsnbextension" version))
8352 (sha256
8353 (base32
8354 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
8355 (build-system python-build-system)
8356 (propagated-inputs
8357 `(("python-ipykernel" ,python-ipykernel)
8358 ("python-notebook" ,python-notebook)))
8359 (native-inputs
8360 `(("python-certifi" ,python-certifi)
8361 ("python-nose" ,python-nose)))
8362 (home-page "https://ipython.org")
8363 (synopsis "IPython HTML widgets for Jupyter")
8364 (description "This package provides interactive HTML widgets for Jupyter
8365notebooks.")
8366 (license license:bsd-3)))
8367
8368(define-public python2-widgetsnbextension
8369 (package-with-python2 python-widgetsnbextension))
8370
8371(define-public python-ipywidgets
8372 (package
8373 (name "python-ipywidgets")
8374 (version "5.2.2")
8375 (source
8376 (origin
8377 (method url-fetch)
8378 (uri (pypi-uri "ipywidgets" version))
8379 (sha256
8380 (base32
8381 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8382 (build-system python-build-system)
8383 (propagated-inputs
8384 `(("python-ipython" ,python-ipython)
8385 ("python-traitlets" ,python-traitlets)
8386 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8387 (native-inputs
8388 `(("python-nose" ,python-nose)
8389 ("python-pytest" ,python-pytest)))
8390 (home-page "https://ipython.org")
8391 (synopsis "IPython HTML widgets for Jupyter")
8392 (description "Ipywidgets are interactive HTML widgets for Jupyter
8393notebooks and the IPython kernel. Notebooks come alive when interactive
8394widgets are used. Users gain control of their data and can visualize changes
8395in the data.")
8396 (license license:bsd-3)))
8397
8398(define-public python2-ipywidgets
8399 (package-with-python2 python-ipywidgets))
8400
8401(define-public python-jupyter-console
8402 (package
8403 (name "python-jupyter-console")
becb9cbf 8404 (version "6.0.0")
44d10b1f
RW
8405 (source
8406 (origin
8407 (method url-fetch)
8408 (uri (pypi-uri "jupyter_console" version))
8409 (sha256
8410 (base32
becb9cbf 8411 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 8412 (build-system python-build-system)
44d10b1f
RW
8413 (propagated-inputs
8414 `(("python-ipykernel" ,python-ipykernel)
8415 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 8416 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
8417 ("python-pygments" ,python-pygments)))
8418 (native-inputs
8419 `(("python-nose" ,python-nose)))
8420 (home-page "https://jupyter.org")
8421 (synopsis "Jupyter terminal console")
8422 (description "This package provides a terminal-based console frontend for
8423Jupyter kernels. It also allows for console-based interaction with non-Python
8424Jupyter kernels such as IJulia and IRKernel.")
e8588a78 8425 (properties `((python2-variant . ,(delay python2-jupyter-console))))
44d10b1f
RW
8426 (license license:bsd-3)))
8427
8428(define-public python2-jupyter-console
8e590c81
RW
8429 (package
8430 (name "python2-jupyter-console")
8431 (version "5.2.0")
8432 (source
8433 (origin
8434 (method url-fetch)
8435 (uri (pypi-uri "jupyter_console" version))
8436 (sha256
8437 (base32
8438 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8439 (build-system python-build-system)
b0aa58d8
EF
8440 (arguments
8441 `(#:python ,python-2
8442 #:tests? #f)) ; Tests only run in a TTY.
8e590c81
RW
8443 (propagated-inputs
8444 `(("python2-ipykernel" ,python2-ipykernel)
8445 ("python2-jupyter-client" ,python2-jupyter-client)
8446 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8447 ("python2-pygments" ,python2-pygments)))
8448 (native-inputs
8449 `(("python2-nose" ,python2-nose)))
8450 (home-page "https://jupyter.org")
8451 (synopsis "Jupyter terminal console")
8452 (description "This package provides a terminal-based console frontend for
8453Jupyter kernels. It also allows for console-based interaction with non-Python
8454Jupyter kernels such as IJulia and IRKernel.")
8455 (license license:bsd-3)))
44d10b1f
RW
8456
8457;; The python-ipython and python-jupyter-console require each other. To get
8458;; the functionality in both packages working, strip down the
8459;; python-jupyter-console package when using it as an input to python-ipython.
8460(define python-jupyter-console-minimal
8461 (package
8462 (inherit python-jupyter-console)
8463 (name "python-jupyter-console-minimal")
8464 (arguments
8465 (substitute-keyword-arguments
8466 (package-arguments python-jupyter-console)
8467 ((#:phases phases)
8468 `(modify-phases ,phases
8469 (add-after 'install 'delete-bin
8470 (lambda* (#:key outputs #:allow-other-keys)
8471 ;; Delete the bin files, to avoid conflicts in profiles
8472 ;; where python-ipython and python-jupyter-console are
8473 ;; both present.
8474 (delete-file-recursively
8475 (string-append
8476 (assoc-ref outputs "out") "/bin"))))))))
8477 ;; Remove the python-ipython propagated input, to avoid the cycle
8478 (propagated-inputs
8479 (alist-delete
8480 "python-ipython"
8481 (package-propagated-inputs python-jupyter-console)))))
8482
8483(define-public python-qtconsole
8484 (package
8485 (name "python-qtconsole")
8486 (version "4.4.3")
8487 (source
8488 (origin
8489 (method url-fetch)
8490 (uri (pypi-uri "qtconsole" version))
8491 (sha256
8492 (base32
8493 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8494 (build-system python-build-system)
8495 (arguments
8496 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8497 ;; but we only have the LTS version 5.x. This means that there might be
8498 ;; runtime errors, but since this is a dependency of the Jupyter package,
8499 ;; and Jupyter can be used without the qtconsole we can overlook this for
8500 ;; now.
8501 `(#:tests? #f
8502 #:phases
8503 (modify-phases %standard-phases
8504 (add-before 'check 'pre-check
8505 (lambda _
8506 (setenv "QT_QPA_PLATFORM" "offscreen")
8507 #t)))))
8508 (propagated-inputs
8509 `(("python-ipykernel" ,python-ipykernel)
8510 ("python-ipython" ,python-ipython)))
8511 (native-inputs
8512 `(("python-pytest" ,python-pytest)))
8513 (home-page "http://jupyter.org")
8514 (synopsis "Jupyter Qt console")
8515 (description "This package provides a Qt-based console for Jupyter with
8516support for rich media output.")
8517 (license license:bsd-3)))
8518
6ec87223
VC
8519(define-public python-jsbeautifier
8520 (package
8521 (name "python-jsbeautifier")
8522 (version "1.10.2")
8523 (home-page "https://github.com/beautify-web/js-beautify")
8524 (source (origin
8525 (method git-fetch)
8526 (uri (git-reference
8527 (url home-page)
8528 (commit (string-append "v" version))))
8529 (file-name (git-file-name name version))
8530 (sha256
8531 (base32
8532 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8533 (build-system python-build-system)
8534 (arguments
8535 `(#:phases (modify-phases %standard-phases
8536 (add-after 'unpack 'chdir
8537 (lambda _
8538 ;; The upstream Git repository contains all the code,
8539 ;; but this package only builds the python code.
8540 (chdir "python")
8541 #t))
8542 (add-after 'unpack 'patch-python-six-requirements
8543 (lambda _
8544 (substitute* "python/setup.py"
8545 (("six>=1.12.0")
8546 "six>=1.11.0"))
8547 #t)))))
8548 (propagated-inputs
8549 `(("python-editorconfig" ,python-editorconfig)
8550 ("python-six" ,python-six)))
8551 (native-inputs
8552 `(("python-pytest" ,python-pytest)))
8553 (synopsis "JavaScript unobfuscator and beautifier")
8554 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8555popular online obfuscators.")
8556 (license license:expat)))
8557
44d10b1f
RW
8558(define-public jupyter
8559 (package
8560 (name "jupyter")
8561 (version "1.0.0")
8562 (source
8563 (origin
8564 (method url-fetch)
8565 (uri (pypi-uri "jupyter" version))
8566 (sha256
8567 (base32
8568 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8569 (build-system python-build-system)
8570 (arguments '(#:tests? #f)) ; there are none.
8571 (propagated-inputs
8572 `(("python-ipykernel" ,python-ipykernel)
8573 ("python-ipywidgets" ,python-ipywidgets)
8574 ("python-jupyter-console" ,python-jupyter-console)
8575 ("python-nbconvert" ,python-nbconvert)
8576 ("python-notebook" ,python-notebook)
8577 ("python-qtconsole" ,python-qtconsole)))
8578 (native-search-paths
8579 (list (search-path-specification
8580 (variable "JUPYTER_PATH")
8581 (files '("share/jupyter")))))
8582 (home-page "https://jupyter.org")
8583 (synopsis "Web application for interactive documents")
8584 (description
8585 "The Jupyter Notebook is a web application that allows you to create and
8586share documents that contain live code, equations, visualizations and
8587explanatory text. Uses include: data cleaning and transformation, numerical
8588simulation, statistical modeling, machine learning and much more.")
8589 (license license:bsd-3)))
8590
8591(define-public python-chardet
8592 (package
8593 (name "python-chardet")
8594 (version "3.0.4")
8595 (source
8596 (origin
8597 (method url-fetch)
8598 (uri (pypi-uri "chardet" version))
8599 (sha256
8600 (base32
8601 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8602 (native-inputs
8603 `(("python-hypothesis" ,python-hypothesis)
8604 ("python-pytest" ,python-pytest)
8605 ("python-pytest-runner" ,python-pytest-runner)))
8606 (build-system python-build-system)
3d369407
MB
8607 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8608 (arguments `(#:tests? #f))
44d10b1f
RW
8609 (home-page "https://github.com/chardet/chardet")
8610 (synopsis "Universal encoding detector for Python 2 and 3")
8611 (description
8612 "This package provides @code{chardet}, a Python module that can
8613automatically detect a wide range of file encodings.")
8614 (license license:lgpl2.1+)))
8615
8616(define-public python2-chardet
8617 (package-with-python2 python-chardet))
8618
8619(define-public python-docopt
8620 (package
8621 (name "python-docopt")
8622 (version "0.6.2")
8623 (source
8624 (origin
11e46326 8625 (method git-fetch)
44d10b1f 8626 ;; The release on PyPI does not include tests.
11e46326
EF
8627 (uri (git-reference
8628 (url "https://github.com/docopt/docopt")
8629 (commit version)))
8630 (file-name (git-file-name name version))
44d10b1f
RW
8631 (sha256
8632 (base32
11e46326 8633 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
44d10b1f
RW
8634 (build-system python-build-system)
8635 (native-inputs
8636 `(("python-pytest" ,python-pytest)))
8637 (arguments
8638 `(#:phases
8639 (modify-phases %standard-phases
8640 (replace 'check
8641 (lambda _ (invoke "py.test"))))))
8642 (home-page "http://docopt.org")
8643 (synopsis "Command-line interface description language for Python")
8644 (description "This library allows the user to define a command-line
8645interface from a program's help message rather than specifying it
4ca7207b 8646programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8647@code{argparse}.")
8648 (license license:expat)))
8649
8650(define-public python2-docopt
8651 (package-with-python2 python-docopt))
8652
8653(define-public python-pythondialog
8654 (package
8655 (name "python-pythondialog")
8656 (version "3.4.0")
8657 (source
8658 (origin
8659 (method url-fetch)
8660 (uri (pypi-uri "pythondialog" version))
8661 (sha256
8662 (base32
8663 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8664 (build-system python-build-system)
8665 (arguments
8666 `(#:phases
8667 (modify-phases %standard-phases
8668 (add-after 'unpack 'patch-path
8669 (lambda* (#:key inputs #:allow-other-keys)
8670 (let* ((dialog (assoc-ref inputs "dialog")))
8671 ;; Since this library really wants to grovel the search path, we
8672 ;; must hardcode dialog's store path into it.
8673 (substitute* "dialog.py"
8674 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8675 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8676 #t))))
8677 #:tests? #f)) ; no test suite
8678 (propagated-inputs
8679 `(("dialog" ,dialog)))
8680 (home-page "http://pythondialog.sourceforge.net/")
8681 (synopsis "Python interface to the UNIX dialog utility")
8682 (description "A Python wrapper for the dialog utility. Its purpose is to
8683provide an easy to use, pythonic and comprehensive Python interface to dialog.
8684This allows one to make simple text-mode user interfaces on Unix-like systems")
8685 (license license:lgpl2.1)
8686 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8687
8688(define-public python2-pythondialog
8689 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8690 (package
8691 (inherit base)
8692 (version (package-version python-pythondialog))
8693 (source (origin
8694 (method url-fetch)
8695 (uri (pypi-uri "python2-pythondialog" version))
8696 (sha256
8697 (base32
8698 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8699
8700(define-public python-configobj
8701 (package
8702 (name "python-configobj")
8703 (version "5.0.6")
8704 (source (origin
8705 (method url-fetch)
b0758fbb 8706 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8707 (sha256
8708 (base32
8709 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8710 ;; Patch setup.py so it looks for python-setuptools, which is
8711 ;; required to parse the keyword 'install_requires' in setup.py.
8712 (patches (search-patches "python-configobj-setuptools.patch"))))
8713 (build-system python-build-system)
8714 (propagated-inputs
8715 `(("python-six" ,python-six)))
8716 (synopsis "Config file reading, writing and validation")
8717 (description "ConfigObj is a simple but powerful config file reader and
8718writer: an ini file round tripper. Its main feature is that it is very easy to
8719use, with a straightforward programmer’s interface and a simple syntax for
8720config files.")
8721 (home-page "https://github.com/DiffSK/configobj")
8722 (license license:bsd-3)))
8723
8724(define-public python2-configobj
8725 (package-with-python2 python-configobj))
8726
8727(define-public python-configargparse
8728 (package
8729 (name "python-configargparse")
86ae491f 8730 (version "0.14.0")
44d10b1f
RW
8731 (source (origin
8732 (method url-fetch)
8733 (uri (pypi-uri "ConfigArgParse" version))
8734 (sha256
8735 (base32
86ae491f 8736 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8737 (build-system python-build-system)
8738 (native-inputs
8739 `(("python-pyyaml" ,python-pyyaml)))
8740 (arguments
8741 `(#:phases
8742 (modify-phases %standard-phases
8743 (replace 'check
8744 (lambda _
8745 ;; Bypass setuptools-shim because one test relies on "setup.py"
8746 ;; being the first argument passed to the python call.
8747 ;;
8748 ;; NOTE: Many tests do not run because they rely on Python's
8749 ;; built-in test.test_argparse, but we remove the unit tests from
8750 ;; our Python installation.
8751 (invoke "python" "setup.py" "test"))))))
8752 (synopsis "Replacement for argparse")
8753 (description "A drop-in replacement for argparse that allows options to also
8754be set via config files and/or environment variables.")
8755 (home-page "https://github.com/bw2/ConfigArgParse")
8756 (license license:expat)))
8757
8758(define-public python2-configargparse
8759 (package-with-python2 python-configargparse))
8760
8761(define-public python-argparse-manpage
8762 (package
8763 (name "python-argparse-manpage")
8764 (version "1.1")
8765 (source
8766 (origin
8767 (method url-fetch)
8768 (uri (pypi-uri "argparse-manpage" version))
8769 (sha256
8770 (base32
8771 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8772 (build-system python-build-system)
8773 (home-page "https://github.com/praiskup/argparse-manpage")
8774 (synopsis "Build manual page from Python's ArgumentParser object")
8775 (description
8776 "This package provides tools to build manual pages from Python's
8777@code{ArgumentParser} object.")
8778 (license license:asl2.0)))
8779
3e8f76d8
RW
8780(define-public python-contextlib2
8781 (package
8782 (name "python-contextlib2")
ebd4c251 8783 (version "0.6.0.post1")
3e8f76d8
RW
8784 (source
8785 (origin
8786 (method url-fetch)
8787 (uri (pypi-uri "contextlib2" version))
8788 (sha256
8789 (base32
ebd4c251 8790 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
3e8f76d8 8791 (build-system python-build-system)
a0fdade2 8792 (home-page "https://contextlib2.readthedocs.org/")
3e8f76d8
RW
8793 (synopsis "Tools for decorators and context managers")
8794 (description "This module is primarily a backport of the Python
87953.2 contextlib to earlier Python versions. Like contextlib, it
8796provides utilities for common tasks involving decorators and context
8797managers. It also contains additional features that are not part of
8798the standard library.")
1e158ba1 8799 (properties `((python2-variant . ,(delay python2-contextlib2))))
3e8f76d8
RW
8800 (license license:psfl)))
8801
44d10b1f 8802(define-public python2-contextlib2
1e158ba1
EF
8803 (let ((base (package-with-python2
8804 (strip-python2-variant python-contextlib2))))
8805 (package
8806 (inherit base)
8807 (arguments
8808 (substitute-keyword-arguments (package-arguments base)
8809 ((#:phases phases)
8810 `(modify-phases ,phases
8811 (replace 'check
8812 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8813 (native-inputs
8814 `(("python2-unittest2" ,python2-unittest2))))))
44d10b1f
RW
8815
8816(define-public python-texttable
8817 (package
8818 (name "python-texttable")
02422b3b 8819 (version "1.6.2")
44d10b1f
RW
8820 (source
8821 (origin
8822 (method url-fetch)
8823 (uri (pypi-uri "texttable" version))
8824 (sha256
8825 (base32
02422b3b 8826 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
44d10b1f 8827 (build-system python-build-system)
02422b3b
RW
8828 (arguments
8829 `(#:phases
8830 (modify-phases %standard-phases
8831 (replace 'check
8832 (lambda _ (invoke "pytest" "tests.py"))))))
8833 (native-inputs
8834 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
8835 (home-page "https://github.com/foutaise/texttable/")
8836 (synopsis "Python module for creating simple ASCII tables")
8837 (description "Texttable is a Python module for creating simple ASCII
8838tables.")
02422b3b 8839 (license license:expat)))
44d10b1f
RW
8840
8841(define-public python2-texttable
8842 (package-with-python2 python-texttable))
8843
8844(define-public python-atomicwrites
8845 (package
8846 (name "python-atomicwrites")
14f10479 8847 (version "1.3.0")
44d10b1f
RW
8848 (source (origin
8849 (method url-fetch)
8850 (uri (pypi-uri "atomicwrites" version))
8851 (sha256
8852 (base32
14f10479 8853 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8854 (build-system python-build-system)
8855 (synopsis "Atomic file writes in Python")
8856 (description "Library for atomic file writes using platform dependent tools
8857for atomic file system operations.")
8858 (home-page "https://github.com/untitaker/python-atomicwrites")
8859 (license license:expat)))
8860
8861(define-public python2-atomicwrites
8862 (package-with-python2 python-atomicwrites))
8863
8864(define-public python-click-threading
8865 (package
8866 (name "python-click-threading")
8867 (version "0.4.4")
8868 (source (origin
8869 (method url-fetch)
8870 (uri (pypi-uri "click-threading" version))
8871 (sha256
8872 (base32
8873 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8874 (build-system python-build-system)
8875 (propagated-inputs
8876 `(("python-click" ,python-click)))
8877 (synopsis "Utilities for multithreading in Click")
8878 (description "This package provides utilities for multithreading in Click
8879applications.")
8880 (home-page "https://github.com/click-contrib/click-threading")
8881 (license license:expat)))
8882
8883(define-public python-click-log
8884 (package
8885 (name "python-click-log")
8886 (version "0.3.2")
8887 (source (origin
8888 (method url-fetch)
8889 (uri (pypi-uri "click-log" version))
8890 (sha256
8891 (base32
8892 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8893 (build-system python-build-system)
8894 (propagated-inputs
8895 `(("python-click" ,python-click)))
8896 (synopsis "Logging for click applications")
8897 (description "This package provides a Python library for logging Click
8898applications.")
8899 (home-page "https://github.com/click-contrib/click-log")
8900 (license license:expat)))
8901
8902(define-public python-apipkg
8903 (package
8904 (name "python-apipkg")
8905 (version "1.4")
8906 (source (origin
8907 (method url-fetch)
8908 (uri (pypi-uri "apipkg" version))
8909 (sha256
8910 (base32
8911 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8912 (build-system python-build-system)
8913 (native-inputs
8914 `(("python-pytest" ,python-pytest)))
8915 (synopsis "Namespace control and lazy-import mechanism")
8916 (description "With apipkg you can control the exported namespace of a Python
8917package and greatly reduce the number of imports for your users. It is a small
8918pure Python module that works on virtually all Python versions.")
8919 (home-page "https://github.com/pytest-dev/apipkg")
8920 (license license:expat)))
8921
8922(define-public python2-apipkg
8923 (package-with-python2 python-apipkg))
8924
8925(define-public python-execnet
8926 (package
8927 (name "python-execnet")
8928 (version "1.4.1")
8929 (source (origin
8930 (method url-fetch)
8931 (uri (pypi-uri "execnet" version))
8932 (sha256
8933 (base32
8934 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8935 (build-system python-build-system)
8936 (arguments
8937 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8938 ;; The two test failures are caused by the lack of an `ssh` executable.
8939 ;; The test suite can be run with pytest after the 'install' phase.
8940 #:tests? #f))
8941 (native-inputs
8942 `(("python-pytest" ,python-pytest)
8943 ("python-setuptools-scm" ,python-setuptools-scm)))
8944 (propagated-inputs
8945 `(("python-apipkg" ,python-apipkg)))
8946 (synopsis "Rapid multi-Python deployment")
8947 (description "Execnet provides a share-nothing model with
8948channel-send/receive communication for distributing execution across many
8949Python interpreters across version, platform and network barriers. It has a
8950minimal and fast API targeting the following uses:
8951@enumerate
8952@item distribute tasks to (many) local or remote CPUs
8953@item write and deploy hybrid multi-process applications
8954@item write scripts to administer multiple environments
8955@end enumerate")
14a5146f 8956 (home-page "https://codespeak.net/execnet/")
44d10b1f
RW
8957 (license license:expat)))
8958
8959(define-public python2-execnet
8960 (package-with-python2 python-execnet))
8961
8962(define-public python-icalendar
8963 (package
8964 (name "python-icalendar")
43ae8f79 8965 (version "4.0.4")
44d10b1f
RW
8966 (source (origin
8967 (method url-fetch)
8968 (uri (pypi-uri "icalendar" version))
8969 (sha256
8970 (base32
43ae8f79 8971 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
44d10b1f
RW
8972 (build-system python-build-system)
8973 (propagated-inputs
8974 `(("python-dateutil" ,python-dateutil)
8975 ("python-pytz" ,python-pytz)))
8976 (synopsis "Python library for parsing iCalendar files")
8977 (description "The icalendar package is a parser/generator of iCalendar
8978files for use with Python.")
8979 (home-page "https://github.com/collective/icalendar")
8980 (license license:bsd-2)))
8981
44d10b1f
RW
8982(define-public python-args
8983 (package
8984 (name "python-args")
8985 (version "0.1.0")
8986 (source (origin
8987 (method url-fetch)
8988 (uri (pypi-uri "args" version))
8989 (sha256
8990 (base32
8991 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8992 (build-system python-build-system)
8993 (home-page "https://github.com/kennethreitz/args")
8994 (synopsis "Command-line argument parser")
8995 (description
8996 "This library provides a Python module to parse command-line arguments.")
8997 (license license:bsd-3)))
8998
8999(define-public python2-args
9000 (package-with-python2 python-args))
9001
9002(define-public python-clint
9003 (package
9004 (name "python-clint")
9005 (version "0.5.1")
9006 (source (origin
9007 (method url-fetch)
9008 (uri (pypi-uri "clint" version))
9009 (sha256
9010 (base32
9011 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9012 (build-system python-build-system)
9013 (arguments
9014 '(#:phases
9015 (modify-phases %standard-phases
9016 (replace 'check
9017 (lambda _ (invoke "py.test" "-v"))))))
9018 (native-inputs
9019 `(("python-pytest" ,python-pytest)))
9020 (propagated-inputs
9021 `(("python-args" ,python-args)))
9022 (home-page "https://github.com/kennethreitz/clint")
9023 (synopsis "Command-line interface tools")
9024 (description
9025 "Clint is a Python module filled with a set of tools for developing
9026command-line applications, including tools for colored and indented
9027output, progress bar display, and pipes.")
9028 (license license:isc)))
9029
9030(define-public python2-clint
9031 (package-with-python2 python-clint))
9032
44d10b1f
RW
9033(define-public python-rply
9034 (package
9035 (name "python-rply")
9036 (version "0.7.5")
9037 (source (origin
9038 (method url-fetch)
9039 (uri (pypi-uri "rply" version))
9040 (sha256
9041 (base32
9042 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
9043 (build-system python-build-system)
9044 (propagated-inputs
9045 `(("python-appdirs" ,python-appdirs)))
9046 (home-page "https://github.com/alex/rply")
9047 (synopsis "Parser generator for Python")
9048 (description
9049 "This package provides a pure Python based parser generator, that also
9050works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9051with a new public API, and RPython support.")
9052 (license license:bsd-3)))
9053
9054(define-public python2-rply
9055 (package-with-python2 python-rply))
9056
9057(define-public python-hy
9058 (package
9059 (name "python-hy")
c215051d 9060 (version "0.17.0")
44d10b1f
RW
9061 (source (origin
9062 (method url-fetch)
9063 (uri (pypi-uri "hy" version))
9064 (sha256
9065 (base32
c215051d 9066 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
44d10b1f
RW
9067 (build-system python-build-system)
9068 (arguments
9069 '(#:phases
9070 (modify-phases %standard-phases
6ba6a1c1
JG
9071 (add-before 'install 'set-HOME
9072 (lambda _
9073 (setenv "HOME" "/tmp")))
44d10b1f
RW
9074 (replace 'check
9075 (lambda _
9076 ;; Tests require write access to HOME.
9077 (setenv "HOME" "/tmp")
9078 (invoke "nosetests"))))))
9079 (native-inputs
9080 `(("python-coverage" ,python-coverage)
9081 ("python-nose" ,python-nose)))
9082 (propagated-inputs
9083 `(("python-astor" ,python-astor)
9084 ("python-clint" ,python-clint)
c215051d
JG
9085 ("python-rply" ,python-rply)
9086 ("python-fastentrypoints"
9087 ,python-fastentrypoints)
9088 ("python-funcparserlib"
9089 ,python-funcparserlib)))
44d10b1f
RW
9090 (home-page "http://hylang.org/")
9091 (synopsis "Lisp frontend to Python")
9092 (description
9093 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9094its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9095Python at your fingertips, in Lisp form.")
9096 (license license:expat)))
9097
9098(define-public python2-hy
9099 (package-with-python2 python-hy))
9100
9101(define-public python2-functools32
9102 (package
9103 (name "python2-functools32")
9104 (version "3.2.3-2")
9105 (source
9106 (origin
9107 (method url-fetch)
9108 (uri (pypi-uri "functools32" version))
9109 (sha256
9110 (base32
9111 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9112 (build-system python-build-system)
9113 (arguments
9114 `(#:python ,python-2
9115 #:tests? #f)) ; no test target
9116 (home-page "https://github.com/MiCHiLU/python-functools32")
9117 (synopsis
9118 "Backport of the functools module from Python 3.2.3")
9119 (description
9120 "This package is a backport of the @code{functools} module from Python
91213.2.3 for use with older versions of Python and PyPy.")
9122 (license license:expat)))
9123
9124(define-public python2-subprocess32
9125 (package
9126 (name "python2-subprocess32")
9127 (version "3.2.7")
9128 (source (origin
9129 (method url-fetch)
9130 (uri (pypi-uri "subprocess32" version))
9131 (sha256
9132 (base32
9133 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9134 (patches
9135 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9136 (build-system python-build-system)
9137 (arguments
9138 `(#:python ,python-2
9139 ;; The test suite fails with Python > 2.7.13:
9140 ;; import test.support
9141 ;; ImportError: No module named support
9142 #:tests? #f
9143 #:phases
9144 (modify-phases %standard-phases
9145 (add-after 'unpack 'patch-/bin/sh
9146 (lambda _
9147 (substitute* '("subprocess32.py"
9148 "test_subprocess32.py")
9149 (("/bin/sh") (which "sh")))
9150 #t)))))
9151 (home-page "https://github.com/google/python-subprocess32")
9152 (synopsis "Backport of the subprocess module from Python 3.2")
9153 (description
9154 "This is a backport of the @code{subprocess} standard library module
9155from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9156new features. On POSIX systems it is guaranteed to be reliable when used
9157in threaded applications. It includes timeout support from Python 3.3 but
9158otherwise matches 3.2’s API.")
9159 (license license:psfl)))
9160
9161(define-public python2-futures
9162 (package
9163 (name "python2-futures")
9164 (version "3.2.0")
9165 (source
9166 (origin
9167 (method url-fetch)
9168 (uri (pypi-uri "futures" version))
9169 (sha256
9170 (base32
9171 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
9172 (build-system python-build-system)
ba88eea2
RW
9173 (arguments
9174 `(#:python ,python-2
9175 #:phases
9176 (modify-phases %standard-phases
9177 (replace 'check
9178 (lambda _
9179 (invoke "python" "test_futures.py")
9180 #t)))))
44d10b1f
RW
9181 (home-page "https://github.com/agronholm/pythonfutures")
9182 (synopsis
9183 "Backport of the concurrent.futures package from Python 3.2")
9184 (description
9185 "The concurrent.futures module provides a high-level interface for
9186asynchronously executing callables. This package backports the
9187concurrent.futures package from Python 3.2")
9188 (license license:bsd-3)))
9189
9190(define-public python-promise
9191 (package
9192 (name "python-promise")
9193 (version "0.4.2")
9194 (source
9195 (origin
9196 (method url-fetch)
9197 (uri (pypi-uri "promise" version))
9198 (sha256
9199 (base32
9200 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9201 (build-system python-build-system)
9202 ;; Tests wants python-futures, which is a python2 only program, and
9203 ;; can't be found by python-promise at test time.
9204 (arguments `(#:tests? #f))
9205 (home-page "https://github.com/syrusakbary/promise")
9206 (synopsis "Promises/A+ implementation for Python")
9207 (description
9208 "Promises/A+ implementation for Python")
9209 (properties `((python2-variant . ,(delay python2-promise))))
9210 (license license:expat)))
9211
9212(define-public python2-promise
9213 (let ((promise (package-with-python2
9214 (strip-python2-variant python-promise))))
9215 (package (inherit promise)
9216 (arguments (substitute-keyword-arguments (package-arguments promise)
9217 ((#:tests? _) #t)))
9218 (native-inputs
9219 `(("python2-futures" ,python2-futures)
9220 ("python2-pytest" ,python2-pytest)
9221 ,@(package-native-inputs promise))))))
9222
d71d85cd
RW
9223(define-public python-progressbar33
9224 (package
9225 (name "python-progressbar33")
9226 (version "2.4")
9227 (source
9228 (origin
9229 (method url-fetch)
9230 (uri (pypi-uri "progressbar33" version))
9231 (sha256
9232 (base32
9233 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
9234 (build-system python-build-system)
9235 (home-page "http://github.com/germangh/python-progressbar")
9236 (synopsis "Text progress bar library for Python")
9237 (description
9238 "This package provides a text progress bar library for Python. This
9239version only differs from the original @code{progressbar} package in that it
9240uses relative package imports instead of absolute imports, which is necessary
9241for the module to work under Python 3.3.")
9242 ;; Either or both of these licenses may be selected.
9243 (license (list license:lgpl2.1+ license:bsd-3))))
9244
44d10b1f
RW
9245(define-public python-colorama
9246 (package
9247 (name "python-colorama")
bd137055 9248 (version "0.4.3")
44d10b1f
RW
9249 (source
9250 (origin
9251 (method url-fetch)
9252 (uri (pypi-uri "colorama" version))
9253 (sha256
9254 (base32
bd137055 9255 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
44d10b1f
RW
9256 (build-system python-build-system)
9257 (synopsis "Colored terminal text rendering for Python")
9258 (description "Colorama is a Python library for rendering colored terminal
9259text.")
e85af137 9260 (home-page "https://pypi.org/project/colorama/")
44d10b1f
RW
9261 (license license:bsd-3)))
9262
9263(define-public python2-colorama
9264 (package-with-python2 python-colorama))
9265
9266(define-public python-rsa
9267 (package
9268 (name "python-rsa")
9269 (version "3.4.2")
9270 (source
9271 (origin
9272 (method url-fetch)
9273 (uri (pypi-uri "rsa" version))
9274 (sha256
9275 (base32
9276 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9277 (build-system python-build-system)
9278 (propagated-inputs
9279 `(("python-pyasn1" ,python-pyasn1)))
9280 (synopsis "Pure-Python RSA implementation")
9281 (description "Python-RSA is a pure-Python RSA implementation. It supports
9282encryption and decryption, signing and verifying signatures, and key
9283generation according to PKCS#1 version 1.5. It can be used as a Python
9284library as well as on the command line.")
9285 (home-page "https://stuvel.eu/rsa")
9286 (license license:asl2.0)))
9287
9288(define-public python2-rsa
9289 (package-with-python2 python-rsa))
9290
9291(define-public python-pluggy
9292 (package
9293 (name "python-pluggy")
e5731c03 9294 (version "0.11.0")
44d10b1f
RW
9295 (source
9296 (origin
9297 (method url-fetch)
9298 (uri (pypi-uri "pluggy" version))
9299 (sha256
9300 (base32
e5731c03 9301 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
9302 (build-system python-build-system)
9303 (native-inputs
9304 `(("python-setuptools-scm" ,python-setuptools-scm)))
9305 (synopsis "Plugin and hook calling mechanism for Python")
9306 (description "Pluggy is an extraction of the plugin manager as used by
9307Pytest but stripped of Pytest specific details.")
e85af137 9308 (home-page "https://pypi.org/project/pluggy/")
44d10b1f
RW
9309 (license license:expat)))
9310
9311(define-public python2-pluggy
9312 (package-with-python2 python-pluggy))
9313
9314(define-public python-tox
9315 (package
9316 (name "python-tox")
9317 (version "2.8.1")
9318 (source
9319 (origin
9320 (method url-fetch)
9321 (uri (pypi-uri "tox" version))
9322 (sha256
9323 (base32
9324 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
9325 (build-system python-build-system)
9326 (arguments
9327 ;; FIXME: Tests require pytest-timeout, which itself requires
9328 ;; pytest>=2.8.0 for installation.
9329 '(#:tests? #f))
9330 (propagated-inputs
9331 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9332 ("python-py" ,python-py)
9333 ("python-virtualenv" ,python-virtualenv)))
9334 (native-inputs
9335 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9336 ("python-pytest" ,python-pytest) ; >= 2.3.5
9337 ("python-setuptools-scm" ,python-setuptools-scm)))
d81fb2ae 9338 (home-page "https://tox.readthedocs.io")
44d10b1f
RW
9339 (synopsis "Virtualenv-based automation of test activities")
9340 (description "Tox is a generic virtualenv management and test command line
9341tool. It can be used to check that a package installs correctly with
9342different Python versions and interpreters, or run tests in each type of
9343supported environment, or act as a frontend to continuous integration
9344servers.")
9345 (license license:expat)))
9346
9347(define-public python2-tox
9348 (package-with-python2 python-tox))
9349
9350(define-public python-jmespath
9351 (package
9352 (name "python-jmespath")
27fb781f 9353 (version "0.9.4")
44d10b1f
RW
9354 (source
9355 (origin
9356 (method url-fetch)
9357 (uri (pypi-uri "jmespath" version))
9358 (sha256
9359 (base32
27fb781f 9360 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
9361 (build-system python-build-system)
9362 (native-inputs
9363 `(("python-nose" ,python-nose)))
9364 (synopsis "JSON Matching Expressions")
9365 (description "JMESPath (pronounced “james path”) is a Python library that
9366allows one to declaratively specify how to extract elements from a JSON
9367document.")
9368 (home-page "https://github.com/jmespath/jmespath.py")
9369 (license license:expat)))
9370
9371(define-public python2-jmespath
9372 (package-with-python2 python-jmespath))
9373
9374(define-public python-botocore
9375 (package
7bcf827c
RW
9376 (name "python-botocore")
9377 (version "1.12.149")
9378 (source
9379 (origin
9380 (method url-fetch)
9381 (uri (pypi-uri "botocore" version))
9382 (sha256
9383 (base32
9384 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
9385 (build-system python-build-system)
9386 (arguments
9387 ;; FIXME: Many tests are failing.
9388 '(#:tests? #f))
9389 (propagated-inputs
9390 `(("python-dateutil" ,python-dateutil)
9391 ("python-docutils" ,python-docutils)
9392 ("python-jmespath" ,python-jmespath)))
9393 (native-inputs
9394 `(("python-mock" ,python-mock)
9395 ("python-nose" ,python-nose)
9396 ("behave" ,behave)
9397 ("python-tox" ,python-tox)
9398 ("python-urllib3" ,python-urllib3)
9399 ("python-wheel" ,python-wheel)))
9400 (home-page "https://github.com/boto/botocore")
9401 (synopsis "Low-level interface to AWS")
9402 (description "Botocore is a Python library that provides a low-level
44d10b1f 9403interface to the Amazon Web Services (AWS) API.")
7bcf827c 9404 (license license:asl2.0)))
44d10b1f
RW
9405
9406(define-public python2-botocore
9407 (package-with-python2 python-botocore))
9408
9409(define-public python-xdo
9410 (package
9411 (name "python-xdo")
9412 (version "0.3")
9413 (source (origin
9414 (method url-fetch)
9415 (uri (string-append
9416 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9417 "python-xdo_" version ".orig.tar.gz"))
9418 (sha256
9419 (base32
9420 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9421 (build-system python-build-system)
9422 (arguments
9423 '(#:phases
9424 (modify-phases %standard-phases
9425 (add-before 'install 'patch-libxdo-path
9426 ;; Hardcode the path of dynamically loaded libxdo library.
9427 (lambda* (#:key inputs #:allow-other-keys)
9428 (let ((libxdo (string-append
9429 (assoc-ref inputs "xdotool")
9430 "/lib/libxdo.so")))
9431 (substitute* "xdo/_xdo.py"
9432 (("find_library\\(\"xdo\"\\)")
9433 (simple-format #f "\"~a\"" libxdo)))
9434 #t))))
9435 #:tests? #f)) ; no tests provided
9436 (propagated-inputs
9437 `(("python-six" ,python-six)))
9438 (inputs
9439 `(("xdotool" ,xdotool)
9440 ("libX11" ,libx11)))
9441 (home-page "https://tracker.debian.org/pkg/python-xdo")
9442 (synopsis "Python library for simulating X11 keyboard/mouse input")
9443 (description "Provides bindings to libxdo for manipulating X11 via simulated
9444input. (Note that this is mostly a legacy library; you may wish to look at
9445python-xdo for newer bindings.)")
9446 (license license:bsd-3)))
9447
9448(define-public python2-xdo
9449 (package-with-python2 python-xdo))
9450
9451(define-public python-mako
9452 (package
9453 (name "python-mako")
4d3c2cb7 9454 (version "1.1.1")
44d10b1f
RW
9455 (source
9456 (origin
9457 (method url-fetch)
9458 (uri (pypi-uri "Mako" version))
9459 (sha256
9460 (base32
4d3c2cb7 9461 "193mds7lv91pphnvn6c1n55rhjkgq94asdzgrsb2fiqx7rrsd119"))))
44d10b1f 9462 (build-system python-build-system)
6bf53ad5
MB
9463 (arguments
9464 `(#:phases (modify-phases %standard-phases
9465 (replace 'check
9466 (lambda _
9467 (invoke "pytest" "-vv"))))))
44d10b1f
RW
9468 (propagated-inputs
9469 `(("python-markupsafe" ,python-markupsafe)))
9470 (native-inputs
9471 `(("python-mock" ,python-mock)
44d10b1f 9472 ("python-pytest" ,python-pytest)))
7016e620 9473 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
9474 (synopsis "Templating language for Python")
9475 (description "Mako is a templating language for Python that compiles
9476templates into Python modules.")
9477 (license license:expat)))
9478
9479(define-public python2-mako
9480 (package-with-python2 python-mako))
9481
9482(define-public python-waitress
9483 (package
9484 (name "python-waitress")
9485 (version "1.1.0")
9486 (source
9487 (origin
9488 (method url-fetch)
9489 (uri (pypi-uri "waitress" version))
9490 (patches (search-patches "python-waitress-fix-tests.patch"))
9491 (sha256
9492 (base32
9493 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9494 (build-system python-build-system)
9495 (home-page "https://github.com/Pylons/waitress")
9496 (synopsis "Waitress WSGI server")
9497 (description "Waitress is meant to be a production-quality pure-Python WSGI
9498server with very acceptable performance.")
9499 (license license:zpl2.1)))
9500
9501(define-public python2-waitress
9502 (package-with-python2 python-waitress))
9503
b2b23d12
TLC
9504(define-public python-whichcraft
9505 (package
9506 (name "python-whichcraft")
9507 (version "0.6.1")
9508 (source
9509 (origin
9510 (method url-fetch)
9511 (uri (pypi-uri "whichcraft" version))
9512 (sha256
9513 (base32
9514 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9515 (build-system python-build-system)
9516 (native-inputs
9517 `(("python-pytest" ,python-pytest)))
9518 (home-page "https://github.com/pydanny/whichcraft")
9519 (synopsis "Cross-platform cross-python shutil.which functionality")
9520 (description
9521 "This package provides a shim of the shutil.which function that's
9522designed to work across multiple versions of Python.")
9523 (license license:bsd-3)))
9524
1133ca44
TLC
9525(define-public python-cookiecutter
9526 (package
9527 (name "python-cookiecutter")
9528 (version "1.6.0")
9529 (source
9530 (origin
9531 (method url-fetch)
9532 (uri (pypi-uri "cookiecutter" version))
9533 (sha256
9534 (base32
9535 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9536 (build-system python-build-system)
9537 (native-inputs
9538 `(("python-freezegun" ,python-freezegun)
9539 ("python-pytest" ,python-pytest)
9540 ("python-pytest-catchlog" ,python-pytest-catchlog)
9541 ("python-pytest-cov" ,python-pytest-cov)
9542 ("python-pytest-mock" ,python-pytest-mock)))
9543 (propagated-inputs
9544 `(("python-binaryornot" ,python-binaryornot)
9545 ("python-click" ,python-click)
9546 ("python-future" ,python-future)
9547 ("python-jinja2" ,python-jinja2)
9548 ("python-jinja2-time" ,python-jinja2-time)
9549 ("python-poyo" ,python-poyo)
9550 ("python-requests" ,python-requests)
9551 ("python-whichcraft" ,python-whichcraft)))
9552 (home-page "https://github.com/audreyr/cookiecutter")
9553 (synopsis
9554 "Command-line utility that creates projects from project templates")
9555 (description
9556 "This package provides a command-line utility that creates projects from
9557project templates, e.g. creating a Python package project from a Python package
9558project template.")
9559 (license license:bsd-3)))
9560
44d10b1f
RW
9561(define-public python-pyquery
9562 (package
9563 (name "python-pyquery")
9564 (version "1.2.17")
9565 (source
9566 (origin
9567 (method url-fetch)
9568 (uri (pypi-uri "pyquery" version))
9569 (sha256
9570 (base32
9571 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9572 (build-system python-build-system)
9573 (native-inputs
9574 `(("python-webob" ,python-webob)
9575 ("python-webtest" ,python-webtest)))
9576 (propagated-inputs
9577 `(("python-lxml" ,python-lxml)
9578 ("python-cssselect" ,python-cssselect)))
9579 (home-page "https://github.com/gawel/pyquery")
9580 (synopsis "Make jQuery-like queries on xml documents")
9581 (description "pyquery allows you to make jQuery queries on xml documents.
9582The API is as much as possible the similar to jQuery. pyquery uses lxml for
9583fast xml and html manipulation.")
9584 (license license:bsd-3)))
9585
44d10b1f
RW
9586(define-public python-anyjson
9587 (package
9588 (name "python-anyjson")
9589 (version "0.3.3")
9590 (source
9591 (origin
9592 (method url-fetch)
9593 (uri (pypi-uri "anyjson" version))
9594 (sha256
9595 (base32
9596 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9597 (build-system python-build-system)
9598 (arguments
9599 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9600 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9601 ;; whatever) so this transformation needs to be done before the tests
9602 ;; can be run. Maybe we could add a build step to transform beforehand
9603 ;; but it could be annoying/difficult.
9604 ;; We can enable tests for the Python 2 version, though, and do below.
9605 #:tests? #f))
9606 (home-page "https://bitbucket.org/runeh/anyjson/")
9607 (synopsis
9608 "Wraps best available JSON implementation in a common interface")
9609 (description
9610 "Anyjson loads whichever is the fastest JSON module installed
9611and provides a uniform API regardless of which JSON implementation is used.")
9612 (license license:bsd-3)
9613 (properties `((python2-variant . ,(delay python2-anyjson))))))
9614
9615(define-public python2-anyjson
9616 (let ((anyjson (package-with-python2
9617 (strip-python2-variant python-anyjson))))
9618 (package
9619 (inherit anyjson)
9620 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9621 #:tests? #t
9622 ,@(package-arguments anyjson)))
9623 (native-inputs `(("python2-nose" ,python2-nose))))))
9624
9625(define-public python-amqp
9626 (package
9627 (name "python-amqp")
9628 (version "2.3.2")
9629 (source
9630 (origin
9631 (method url-fetch)
9632 (uri (pypi-uri "amqp" version))
9633 (sha256
9634 (base32
9635 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9636 (build-system python-build-system)
9637 (native-inputs
9638 `(("python-case" ,python-case)
9639 ("python-pytest-sugar" ,python-pytest-sugar)
9640 ("python-mock" ,python-mock)))
9641 (propagated-inputs
9642 `(("python-vine" ,python-vine)))
9643 (home-page "https://github.com/celery/py-amqp")
9644 (synopsis
9645 "Low-level AMQP client for Python (fork of amqplib)")
9646 (description
9647 "This is a fork of amqplib which was originally written by Barry Pederson.
9648It is maintained by the Celery project, and used by kombu as a pure python
9649alternative when librabbitmq is not available.")
9650 (license license:lgpl2.1+)
9651 (properties `((python2-variant . ,(delay python2-amqp))))))
9652
9653(define-public python2-amqp
9654 (let ((amqp (package-with-python2
9655 (strip-python2-variant python-amqp))))
9656 (package
9657 (inherit amqp)
9658 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9659 ;; unmaintained. Weirdly, does not do this on the python 3
9660 ;; version?
9661 #:tests? #f
9662 ,@(package-arguments amqp))))))
9663
9664(define-public python-txamqp
9665 (package
9666 (name "python-txamqp")
9667 (version "0.8.2")
9668 (source
9669 (origin
9670 (method url-fetch)
9671 (uri (pypi-uri "txAMQP" version))
9672 (sha256
9673 (base32
9674 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9675 (build-system python-build-system)
9676 (propagated-inputs
9677 `(("python-six" ,python-six)
9678 ("python-twisted" ,python-twisted)))
9679 (home-page "https://github.com/txamqp/txamqp")
9680 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9681 (description
9682 "This package provides a Python library for communicating with AMQP peers
9683and brokers using the asynchronous networking framework Twisted. It contains
9684all the necessary code to connect, send and receive messages to/from an
9685AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9686also includes support for using Thrift RPC over AMQP in Twisted
9687applications.")
9688 (license license:asl2.0)))
9689
9690(define-public python2-txamqp
9691 (package-with-python2 python-txamqp))
9692
9693(define-public python-kombu
9694 (package
9695 (name "python-kombu")
9696 (version "4.2.2")
9697 (source
9698 (origin
9699 (method url-fetch)
9700 (uri (pypi-uri "kombu" version))
9701 (sha256
9702 (base32
9703 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9704 (build-system python-build-system)
9705 (native-inputs
9706 `(("python-mock" ,python-mock)
9707 ("python-case" ,python-case)
9708 ("python-pyro4" ,python-pyro4)
9709 ("python-pytest-sugar" ,python-pytest-sugar)
9710 ("python-pytz" ,python-pytz)))
9711 (propagated-inputs
9712 `(("python-anyjson" ,python-anyjson)
9713 ("python-amqp" ,python-amqp)
9714 ("python-redis" ,python-redis)))
9715 (home-page "https://kombu.readthedocs.io")
9716 (synopsis "Message passing library for Python")
9717 (description "The aim of Kombu is to make messaging in Python as easy as
9718possible by providing an idiomatic high-level interface for the AMQ protocol,
9719and also provide proven and tested solutions to common messaging problems.
9720AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9721message orientation, queuing, routing, reliability and security, for which the
9722RabbitMQ messaging server is the most popular implementation.")
9723 (license license:bsd-3)
9724 (properties `((python2-variant . ,(delay python2-kombu))))))
9725
9726(define-public python2-kombu
9727 (let ((kombu (package-with-python2
9728 (strip-python2-variant python-kombu))))
9729 (package
9730 (inherit kombu)
9731 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9732 ;; It works fine on the python3 variant.
9733 #:tests? #f
9734 ,@(package-arguments kombu)))
9735 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9736 ,@(package-native-inputs kombu))))))
9737
9738(define-public python-billiard
9739 (package
9740 (name "python-billiard")
9741 (version "3.5.0.5")
9742 (source
9743 (origin
9744 (method url-fetch)
9745 (uri (pypi-uri "billiard" version))
9746 (sha256
9747 (base32
9748 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9749 (build-system python-build-system)
9750 (native-inputs
9751 `(("python-case" ,python-case)
9752 ("python-pytest" ,python-pytest)))
9753 (home-page "https://github.com/celery/billiard")
9754 (synopsis
9755 "Python multiprocessing fork with improvements and bugfixes")
9756 (description
9757 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9758multiprocessing package itself is a renamed and updated version of R Oudkerk's
9759pyprocessing package. This standalone variant is intended to be compatible with
9760Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9761 (license license:bsd-3)
9762 (properties `((python2-variant . ,(delay python2-billiard))))))
9763
9764(define-public python2-billiard
9765 (let ((billiard (package-with-python2
9766 (strip-python2-variant python-billiard))))
9767 (package
9768 (inherit billiard)
9769 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9770 ("python2-mock" ,python2-mock)
9771 ,@(package-native-inputs billiard))))))
9772
9773(define-public python-celery
9774 (package
9775 (name "python-celery")
9776 (version "4.2.1")
9777 (source
9778 (origin
9779 (method url-fetch)
9780 (uri (pypi-uri "celery" version))
9781 (sha256
9782 (base32
9783 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9784 (build-system python-build-system)
9785 (arguments
9786 '(;; TODO The tests fail with Python 3.7
9787 ;; https://github.com/celery/celery/issues/4849
9788 #:tests? #f
9789 #:phases
9790 (modify-phases %standard-phases
9791 (add-after 'unpack 'patch-requirements
9792 (lambda _
9793 (substitute* "requirements/test.txt"
9794 (("pytest>=3\\.0,<3\\.3")
9795 "pytest>=3.0"))
9796 #t)))))
9797 (native-inputs
9798 `(("python-case" ,python-case)
9799 ("python-pytest" ,python-pytest)))
9800 (propagated-inputs
9801 `(("python-pytz" ,python-pytz)
9802 ("python-billiard" ,python-billiard)
9803 ("python-kombu" ,python-kombu)))
9804 (home-page "https://celeryproject.org")
9805 (synopsis "Distributed Task Queue")
9806 (description "Celery is an asynchronous task queue/job queue based on
9807distributed message passing. It is focused on real-time operation, but
9808supports scheduling as well. The execution units, called tasks, are executed
9809concurrently on a single or more worker servers using multiprocessing,
9810Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9811synchronously (wait until ready).")
9812 (license license:bsd-3)
9813 (properties `((python2-variant . ,(delay python2-celery))))))
9814
9815(define-public python2-celery
9816 (let ((celery (package-with-python2
9817 (strip-python2-variant python-celery))))
9818 (package
9819 (inherit celery)
9820 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9821 ("python2-mock" ,python2-mock)
9822 ,@(package-native-inputs celery))))))
9823
9824(define-public python-translitcodec
9825 (package
9826 (name "python-translitcodec")
9827 (version "0.4.0")
9828 (source
9829 (origin
9830 (method url-fetch)
9831 (uri (pypi-uri "translitcodec" version))
9832 (sha256
9833 (base32
9834 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9835 (build-system python-build-system)
9836 (arguments
9837 `(#:tests? #f)) ; no tests provided
9838 (home-page
9839 "https://github.com/claudep/translitcodec")
9840 (synopsis
9841 "Unicode to 8-bit charset transliteration codec")
9842 (description
9843 "This package contains codecs for transliterating ISO 10646 texts into
9844best-effort representations using smaller coded character sets (ASCII,
9845ISO 8859, etc.).")
9846 (license license:expat)))
9847
9848(define-public python2-translitcodec
9849 (package-with-python2 python-translitcodec))
9850
9851(define-public python-editor
9852 (package
9853 (name "python-editor")
baea210c 9854 (version "1.0.4")
44d10b1f
RW
9855 (source
9856 (origin
9857 (method url-fetch)
9858 (uri (pypi-uri "python-editor" version))
9859 (sha256
9860 (base32
baea210c 9861 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
44d10b1f 9862 (build-system python-build-system)
baea210c
MB
9863 (arguments
9864 '(#:tests? #f)) ;XXX: needs a TTY and an editor
9865 (home-page "https://github.com/fmoo/python-editor")
9866 (synopsis "Programmatically open an editor, capture the result")
44d10b1f
RW
9867 (description
9868 "python-editor is a library that provides the editor module for
9869programmatically interfacing with your system's $EDITOR.")
9870 (license license:asl2.0)))
9871
9872(define-public python2-editor
9873 (package-with-python2 python-editor))
9874
44d10b1f
RW
9875(define-public python-vobject
9876 (package
9877 (name "python-vobject")
9878 (version "0.9.5")
9879 (source (origin
9880 (method url-fetch)
9881 (uri (pypi-uri "vobject" version))
9882 (sha256
9883 (base32
9884 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9885 (build-system python-build-system)
9886 (arguments
9887 '(;; The test suite relies on some non-portable Windows interfaces.
9888 #:tests? #f))
9889 (propagated-inputs
9890 `(("python-dateutil" ,python-dateutil)
9891 ("python-pyicu" ,python-pyicu)))
9892 (synopsis "Parse and generate vCard and vCalendar files")
9893 (description "Vobject is intended to be a full featured Python package for
9894parsing and generating vCard and vCalendar files. Currently, iCalendar files
9895are supported and well tested. vCard 3.0 files are supported, and all data
9896should be imported, but only a few components are understood in a sophisticated
9897way.")
5d6e7106 9898 (home-page "https://eventable.github.io/vobject/")
44d10b1f
RW
9899 (license license:asl2.0)))
9900
9901(define-public python2-vobject
9902 (package-with-python2 python-vobject))
9903
9904(define-public python-munkres
9905 (package
9906 (name "python-munkres")
9907 (version "1.0.8")
9908 (source (origin
9909 (method url-fetch)
9910 (uri (pypi-uri "munkres" version))
9911 (sha256
9912 (base32
9913 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9914 (build-system python-build-system)
9915 (arguments
9916 '(#:tests? #f)) ; no test suite
78f8780e 9917 (home-page "https://software.clapper.org/munkres/")
44d10b1f
RW
9918 (synopsis "Implementation of the Munkres algorithm")
9919 (description "The Munkres module provides an implementation of the Munkres
9920algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9921useful for solving the Assignment Problem.")
9922 (license license:bsd-3)))
9923
9924(define-public python2-munkres
9925 (package-with-python2 python-munkres))
9926
9927(define-public python-whoosh
9928 (package
9929 (name "python-whoosh")
9930 (version "2.7.4")
9931 (source
9932 (origin
9933 (method url-fetch)
9934 (uri (pypi-uri "Whoosh" version))
9935 (sha256
9936 (base32
9937 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9938 (build-system python-build-system)
2679d9a4 9939 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
9940 (native-inputs
9941 `(("python-pytest" ,python-pytest)))
9942 (home-page "https://bitbucket.org/mchaput/whoosh")
9943 (synopsis "Full text indexing, search, and spell checking library")
9944 (description
9945 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9946checking library.")
9947 (license license:bsd-2)))
9948
9949(define-public python2-whoosh
9950 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9951 (package (inherit whoosh)
9952 (propagated-inputs
9953 `(("python2-backport-ssl-match-hostname"
9954 ,python2-backport-ssl-match-hostname)
9955 ,@(package-propagated-inputs whoosh))))))
9956
9957(define-public python-pathlib
9958 (package
9959 (name "python-pathlib")
9960 (version "1.0.1")
9961 (source (origin
9962 (method url-fetch)
9963 (uri (pypi-uri "pathlib" version))
9964 (sha256
9965 (base32
9966 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9967 (build-system python-build-system)
9968 ;; The tests depend on the internal "test" module, which does not provide
9969 ;; a stable interface.
9970 (arguments `(#:tests? #f))
9971 (home-page "https://pathlib.readthedocs.org/")
9972 (synopsis "Object-oriented file system paths")
9973 (description "Pathlib offers a set of classes to handle file system paths.
9974It offers the following advantages over using string objects:
9975
9976@enumerate
9977@item No more cumbersome use of os and os.path functions. Everything can
9978be done easily through operators, attribute accesses, and method calls.
9979@item Embodies the semantics of different path types. For example,
9980comparing Windows paths ignores casing.
9981@item Well-defined semantics, eliminating any inconsistencies or
9982ambiguities (forward vs. backward slashes, etc.).
9983@end enumerate
9984
9985Note: In Python 3.4, pathlib is now part of the standard library. For other
9986Python versions please consider python-pathlib2 instead, which tracks the
9987standard library module. This module (python-pathlib) isn't maintained
9988anymore.")
9989 (license license:expat)))
9990
9991(define-public python2-pathlib
9992 (package-with-python2 python-pathlib))
9993
9994(define-public python2-pathlib2
9995 (package
9996 (name "python2-pathlib2")
54da6f9f 9997 (version "2.3.3")
44d10b1f
RW
9998 (source (origin
9999 (method url-fetch)
10000 (uri (pypi-uri "pathlib2" version))
10001 (sha256
10002 (base32
54da6f9f 10003 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
10004 (build-system python-build-system)
10005 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10006 ;; version is 3.4 which already includes this package as part of the
10007 ;; standard library.
10008 (arguments
10009 `(#:python ,python-2))
10010 (propagated-inputs
10011 `(("python2-scandir" ,python2-scandir)
10012 ("python2-six" ,python2-six)))
e85af137 10013 (home-page "https://pypi.org/project/pathlib2/")
44d10b1f
RW
10014 (synopsis "Object-oriented file system paths - backport of standard
10015pathlib module")
10016 (description "The goal of pathlib2 is to provide a backport of standard
10017pathlib module which tracks the standard library module, so all the newest
10018features of the standard pathlib can be used also on older Python versions.
10019
10020Pathlib offers a set of classes to handle file system paths. It offers the
10021following advantages over using string objects:
10022
10023@enumerate
10024@item No more cumbersome use of os and os.path functions. Everything can
10025be done easily through operators, attribute accesses, and method calls.
10026@item Embodies the semantics of different path types. For example,
10027comparing Windows paths ignores casing.
10028@item Well-defined semantics, eliminating any inconsistencies or
10029ambiguities (forward vs. backward slashes, etc.).
10030@end enumerate")
10031 (license license:expat)))
10032
10033(define-public python2-pathlib2-bootstrap
10034 (hidden-package
10035 (package
10036 (inherit python2-pathlib2)
10037 (name "python2-pathlib2-bootstrap")
10038 (propagated-inputs
10039 `(("python2-scandir" ,python2-scandir)
10040 ("python2-six" ,python2-six-bootstrap))))))
10041
10042(define-public python-jellyfish
10043 (package
10044 (name "python-jellyfish")
10045 (version "0.5.6")
10046 (source (origin
10047 (method url-fetch)
10048 (uri (pypi-uri "jellyfish" version))
10049 (sha256
10050 (base32
10051 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10052 (build-system python-build-system)
10053 (native-inputs
10054 `(("python-pytest" ,python-pytest)))
10055 (home-page "https://github.com/jamesturk/jellyfish")
10056 (synopsis "Approximate and phonetic matching of strings")
10057 (description "Jellyfish uses a variety of string comparison and phonetic
10058encoding algorithms to do fuzzy string matching.")
10059 (license license:bsd-2)
10060 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10061
10062(define-public python2-jellyfish
10063 (let ((jellyfish (package-with-python2
10064 (strip-python2-variant python-jellyfish))))
10065 (package (inherit jellyfish)
10066 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10067 ,@(package-native-inputs jellyfish))))))
10068
10069(define-public python2-unicodecsv
10070 (package
10071 (name "python2-unicodecsv")
10072 (version "0.14.1")
10073 (source (origin
f711b71b 10074 (method git-fetch)
44d10b1f
RW
10075 ;; The test suite is not included in the PyPi release.
10076 ;; https://github.com/jdunck/python-unicodecsv/issues/19
f711b71b
EF
10077 (uri (git-reference
10078 (url "https://github.com/jdunck/python-unicodecsv")
10079 (commit version)))
10080 (file-name (git-file-name name version))
44d10b1f
RW
10081 (sha256
10082 (base32
f711b71b 10083 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
44d10b1f
RW
10084 (build-system python-build-system)
10085 (arguments
10086 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10087 #:python ,python-2))
10088 (native-inputs
10089 `(("python2-unittest2" ,python2-unittest2)))
10090 (home-page "https://github.com/jdunck/python-unicodecsv")
10091 (synopsis "Unicode CSV module for Python 2")
10092 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10093module, adding support for Unicode strings.")
10094 (license license:bsd-2)))
10095
10096(define-public python-rarfile
10097 (package
10098 (name "python-rarfile")
10099 (version "2.8")
10100 (source (origin
10101 (method url-fetch)
10102 (uri (pypi-uri "rarfile" version))
10103 (sha256
10104 (base32
10105 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10106 (build-system python-build-system)
10107 (arguments
10108 '(#:phases
10109 (modify-phases %standard-phases
10110 (replace 'check
10111 ;; Many tests fail, but the installation proceeds.
e59dd341 10112 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
10113 (native-inputs
10114 `(("which" ,which))) ; required for tests
10115 (propagated-inputs
10116 `(("libarchive" ,libarchive)))
10117 (home-page "https://github.com/markokr/rarfile")
10118 (synopsis "RAR archive reader for Python")
10119 (description "This is Python module for RAR archive reading. The interface
10120is made as zipfile like as possible.")
10121 (license license:isc)))
10122
10123(define-public python2-rarfile
10124 (package-with-python2 python-rarfile))
10125
10126(define-public python-magic
10127 (package
10128 (name "python-magic")
10129 (version "0.4.15")
10130 (source
10131 (origin
10132 (method url-fetch)
10133 (uri (pypi-uri "python-magic" version))
10134 (sha256
10135 (base32
10136 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
10137 (file-name (string-append name "-" version "-checkout"))))
10138 (build-system python-build-system)
10139 (arguments
10140 ;; The tests are unreliable, so don't run them. The tests fail
10141 ;; under Python3 because they were written for Python2 and
10142 ;; contain import statements that do not work in Python3. One of
10143 ;; the tests fails under Python2 because its assertions are
10144 ;; overly stringent; it relies on comparing output strings which
10145 ;; are brittle and can change depending on the version of
10146 ;; libmagic being used and the system on which the test is
10147 ;; running. In my case, under GuixSD 0.10.0, only one test
10148 ;; failed, and it seems to have failed only because the version
10149 ;; of libmagic that is packaged in Guix outputs a slightly
10150 ;; different (but not wrong) string than the one that the test
10151 ;; expected.
10152 '(#:tests? #f
10153 #:phases (modify-phases %standard-phases
10154 ;; Replace a specific method call with a hard-coded
10155 ;; path to the necessary libmagic.so file in the
10156 ;; store. If we don't do this, then the method call
10157 ;; will fail to find the libmagic.so file, which in
10158 ;; turn will cause any application using
10159 ;; python-magic to fail.
10160 (add-before 'build 'hard-code-path-to-libmagic
10161 (lambda* (#:key inputs #:allow-other-keys)
10162 (let ((file (assoc-ref inputs "file")))
10163 (substitute* "magic.py"
10164 (("ctypes.util.find_library\\('magic'\\)")
10165 (string-append "'" file "/lib/libmagic.so'")))
10166 #t)))
10167 (add-before 'install 'disable-egg-compression
10168 (lambda _
10169 (let ((port (open-file "setup.cfg" "a")))
10170 (display "\n[easy_install]\nzip_ok = 0\n"
10171 port)
10172 (close-port port)
10173 #t))))))
10174 (inputs
10175 ;; python-magic needs to be able to find libmagic.so.
10176 `(("file" ,file)))
10177 (home-page
10178 "https://github.com/ahupp/python-magic")
10179 (synopsis
10180 "File type identification using libmagic")
10181 (description
10182 "This module uses ctypes to access the libmagic file type
10183identification library. It makes use of the local magic database and
10184supports both textual and MIME-type output. Note that this module and
10185the python-file module both provide a \"magic.py\" file; these two
10186modules, which are different and were developed separately, both serve
10187the same purpose: to provide Python bindings for libmagic.")
10188 (license license:expat)))
10189
10190(define-public python2-magic
10191 (package-with-python2 python-magic))
10192
10193(define-public python2-s3cmd
10194 (package
10195 (name "python2-s3cmd")
10196 (version "1.6.1")
10197 (source
10198 (origin
10199 (method url-fetch)
10200 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10201 "s3cmd-" version ".tar.gz"))
10202 (sha256
10203 (base32
10204 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10205 (build-system python-build-system)
10206 (arguments
10207 ;; s3cmd is written for python2 only and contains no tests.
10208 `(#:python ,python-2
10209 #:tests? #f))
10210 (propagated-inputs
10211 `(("python2-dateutil" ,python2-dateutil)
10212 ;; The python-file package also provides a magic.py module.
10213 ;; This is an unfortunate state of affairs; however, s3cmd
10214 ;; fails to install if it cannot find specifically the
10215 ;; python-magic package. Thus we include it, instead of using
10216 ;; python-file. Ironically, s3cmd sometimes works better
10217 ;; without libmagic bindings at all:
10218 ;; https://github.com/s3tools/s3cmd/issues/198
10219 ("python2-magic" ,python2-magic)))
10220 (home-page "http://s3tools.org/s3cmd")
10221 (synopsis "Command line tool for S3-compatible storage services")
10222 (description
10223 "S3cmd is a command line tool for uploading, retrieving and managing data
10224in storage services that are compatible with the Amazon Simple Storage
10225Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10226GnuPG encryption, and more. It also supports management of Amazon's
10227CloudFront content delivery network.")
10228 (license license:gpl2+)))
10229
10230(define-public python-pkgconfig
10231 (package
10232 (name "python-pkgconfig")
10233 (version "1.3.1")
10234 (source
10235 (origin
10236 (method url-fetch)
10237 (uri (pypi-uri "pkgconfig" version))
10238 (sha256
10239 (base32
10240 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
10241 (build-system python-build-system)
10242 (native-inputs
10243 `(("python-nose" ,python-nose)))
10244 (inputs
10245 `(("pkg-config" ,pkg-config)))
10246 (arguments
10247 `(#:phases
10248 (modify-phases %standard-phases
10249 (add-before 'build 'patch
10250 ;; Hard-code the path to pkg-config.
10251 (lambda _
10252 (substitute* "pkgconfig/pkgconfig.py"
10253 (("cmd = 'pkg-config")
10254 (string-append "cmd = '" (which "pkg-config"))))
10255 #t))
10256 (replace 'check
10257 (lambda _
10258 (invoke "nosetests" "test.py"))))))
10259 (home-page "https://github.com/matze/pkgconfig")
10260 (synopsis "Python interface for pkg-config")
10261 (description "This module provides a Python interface to pkg-config. It
10262can be used to find all pkg-config packages, check if a package exists,
10263check if a package meets certain version requirements, query CFLAGS and
10264LDFLAGS and parse the output to build extensions with setup.py.")
10265 (license license:expat)))
10266
10267(define-public python2-pkgconfig
10268 (package-with-python2 python-pkgconfig))
10269
10270(define-public python-bz2file
10271 (package
10272 (name "python-bz2file")
10273 (version "0.98")
10274 (source
10275 (origin
10276 (method url-fetch)
10277 (uri (pypi-uri "bz2file" version))
10278 (sha256
10279 (base32
10280 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10281 (build-system python-build-system)
10282 (arguments
10283 `(#:tests? #f)) ; Tests use deprecated python modules.
10284 (home-page "https://github.com/nvawda/bz2file")
10285 (synopsis "Read and write bzip2-compressed files")
10286 (description
10287 "Bz2file is a Python library for reading and writing bzip2-compressed
10288files. It contains a drop-in replacement for the I/O interface in the
10289standard library's @code{bz2} module, including features from the latest
10290development version of CPython that are not available in older releases.")
10291 (license license:asl2.0)))
10292
10293(define-public python2-bz2file
10294 (package-with-python2 python-bz2file))
10295
10296(define-public python-future
10297 (package
10298 (name "python-future")
d5d54030 10299 (version "0.17.1")
44d10b1f
RW
10300 (source
10301 (origin
10302 (method url-fetch)
10303 (uri (pypi-uri "future" version))
10304 (sha256
10305 (base32
d5d54030 10306 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
10307 (build-system python-build-system)
10308 ;; Many tests connect to the network or are otherwise flawed.
10309 ;; https://github.com/PythonCharmers/python-future/issues/210
10310 (arguments
10311 `(#:tests? #f))
10312 (home-page "http://python-future.org")
10313 (synopsis "Single-source support for Python 3 and 2")
10314 (description
10315 "@code{python-future} is the missing compatibility layer between Python 2 and
10316Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10317to support both Python 2 and Python 3 with minimal overhead.")
10318 (license license:expat)))
10319
10320(define-public python2-future
10321 (package-with-python2 python-future))
10322
10323(define-public python-cysignals
10324 (package
10325 (name "python-cysignals")
8e3e51df 10326 (version "1.9.0")
44d10b1f
RW
10327 (source
10328 (origin
10329 (method url-fetch)
8e3e51df 10330 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
10331 (sha256
10332 (base32
8e3e51df 10333 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
10334 (build-system python-build-system)
10335 (native-inputs
10336 `(("python-cython" ,python-cython)
10337 ("python-sphinx" ,python-sphinx)))
10338 (inputs
10339 `(("pari-gp" ,pari-gp)))
10340 (arguments
10341 `(#:modules ((guix build python-build-system)
10342 ((guix build gnu-build-system) #:prefix gnu:)
10343 (guix build utils))
10344 ;; FIXME: Tests are executed after installation and currently fail
10345 ;; when not installing into standard locations; the author is working
10346 ;; on a fix.
10347 #:tests? #f
10348 #:phases
10349 (modify-phases %standard-phases
10350 (add-before
10351 'build 'configure
10352 (assoc-ref gnu:%standard-phases 'configure)))))
10353 (home-page
10354 "https://github.com/sagemath/cysignals")
10355 (synopsis
10356 "Handling of interrupts and signals for Cython")
10357 (description
10358 "The cysignals package provides mechanisms to handle interrupts (and
10359other signals and errors) in Cython code, using two related approaches,
10360for mixed Cython/Python code or external C libraries and pure Cython code,
10361respectively.")
10362 (license license:lgpl3+)))
10363
10364(define-public python2-cysignals
10365 (package-with-python2 python-cysignals))
10366
10367(define-public python2-shedskin
10368 (package
10369 (name "python2-shedskin")
10370 (version "0.9.4")
10371 (source
10372 (origin
10373 (method url-fetch)
10374 (uri (string-append "https://github.com/shedskin/shedskin/"
10375 "releases/download/v" version
10376 "/shedskin-" version ".tgz"))
10377 (sha256
10378 (base32
10379 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10380 (build-system python-build-system)
10381 (arguments
10382 `(#:python ,python-2
10383 #:phases (modify-phases %standard-phases
10384 (add-after 'unpack 'fix-resulting-include-libs
10385 (lambda* (#:key inputs #:allow-other-keys)
10386 (let ((libgc (assoc-ref inputs "libgc"))
10387 (pcre (assoc-ref inputs "pcre")))
10388 (substitute* "shedskin/makefile.py"
10389 (("variable == 'CCFLAGS':[ ]*")
10390 (string-append "variable == 'CCFLAGS':\n"
10391 " line += ' -I " pcre "/include"
10392 " -I " libgc "/include'"))
10393 (("variable == 'LFLAGS':[ ]*")
10394 (string-append "variable == 'LFLAGS':\n"
10395 " line += ' -L" pcre "/lib"
10396 " -L " libgc "/lib'")))
10397 #t))))))
10398 (inputs `(("pcre" ,pcre)
10399 ("libgc" ,libgc)))
10400 (home-page "https://shedskin.github.io/")
10401 (synopsis "Experimental Python-2 to C++ Compiler")
10402 (description (string-append "This is an experimental compiler for a subset of
10403Python. It generates C++ code and a Makefile."))
10404 (license (list license:gpl3 license:bsd-3 license:expat))))
10405
10406(define-public python2-rope
10407 (package
10408 (name "python2-rope")
a9ba0a31 10409 (version "0.11.0")
44d10b1f
RW
10410 (source
10411 (origin
10412 (method url-fetch)
10413 (uri (pypi-uri "rope" version))
10414 (sha256
10415 (base32
a9ba0a31 10416 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 10417 (arguments
afb29715 10418 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
10419 `(#:python ,python-2))
10420 (build-system python-build-system)
10421 (native-inputs
10422 `(("python2-unittest2" ,python2-unittest2)))
10423 (home-page "https://github.com/python-rope/rope")
10424 (synopsis "Refactoring library for Python")
10425 (description "Rope is a refactoring library for Python. It facilitates
10426the renaming, moving and extracting of attributes, functions, modules, fields
10427and parameters in Python 2 source code. These refactorings can also be applied
10428to occurrences in strings and comments.")
10429 (license license:gpl2)))
10430
2c880ef4
LC
10431(define-public python-rope
10432 (package
10433 (inherit python2-rope)
10434 (name "python-rope")
10435 (arguments `(#:python ,python-wrapper
10436 ;; XXX: Only partial python3 support, results in some failing
10437 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10438 #:tests? #f))
10439 (properties `((python2-variant . ,(delay python2-rope))))))
10440
44d10b1f
RW
10441(define-public python-py3status
10442 (package
10443 (name "python-py3status")
ef68b35d 10444 (version "3.21")
44d10b1f
RW
10445 (source
10446 (origin
10447 (method url-fetch)
10448 (uri (pypi-uri "py3status" version))
10449 (sha256
ef68b35d 10450 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
10451 (build-system python-build-system)
10452 (inputs
10453 `(("file" ,file)))
10454 (arguments
10455 '(#:phases
10456 (modify-phases %standard-phases
10457 ;; 'file' is used for detection of configuration file encoding
10458 ;; let's make link the dependency to particular input
10459 (add-before 'build 'patch-file-path
10460 (lambda* (#:key inputs #:allow-other-keys)
10461 (let ((file-path (assoc-ref inputs "file")))
10462 (substitute* "py3status/parse_config.py"
6a6b8a3f 10463 (("\\[\"file\", \"-b\"")
44d10b1f
RW
10464 (string-append "['" file-path "/bin/file', '-b'")))
10465 #t))))
10466 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10467 (home-page "https://github.com/ultrabug/py3status")
10468 (synopsis "Extensible i3status wrapper written in Python")
10469 (description "py3status is an i3status wrapper which extends i3status
10470functionality in a modular way, allowing you to extend your panel with your
10471own code, responding to click events and updating clock every second.")
10472 (license license:bsd-3)))
10473
10474(define-public python-tblib
10475 (package
10476 (name "python-tblib")
4fc26c65 10477 (version "1.6.0")
44d10b1f
RW
10478 (source (origin
10479 (method url-fetch)
10480 (uri (pypi-uri "tblib" version))
4fc26c65
MB
10481 (sha256
10482 (base32
10483 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
44d10b1f
RW
10484 (build-system python-build-system)
10485 (arguments
10486 `(#:phases
10487 (modify-phases %standard-phases
44d10b1f
RW
10488 (replace 'check
10489 (lambda _
10490 ;; Upstream runs tests after installation and the package itself
10491 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10492 ;; found.
10493 (setenv "PYTHONPATH"
10494 (string-append (getcwd) "/build/lib:"
10495 (getenv "PYTHONPATH")))
10496 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10497 (native-inputs
10498 `(("python-pytest" ,python-pytest)
10499 ("python-six" ,python-six)))
10500 (home-page "https://github.com/ionelmc/python-tblib")
10501 (synopsis "Traceback serialization library")
10502 (description
10503 "Traceback serialization allows you to:
10504
10505@enumerate
10506@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10507different processes. This allows better error handling when running code over
10508multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10509
10510@item Parse traceback strings and raise with the parsed tracebacks.
10511@end enumerate\n")
10512 (license license:bsd-3)))
10513
10514(define-public python2-tblib
10515 (package-with-python2 python-tblib))
10516
10517(define-public python-greenlet
10518 (package
10519 (name "python-greenlet")
10520 (version "0.4.15")
10521 (source (origin
10522 (method url-fetch)
10523 (uri (pypi-uri "greenlet" version))
10524 (sha256
10525 (base32
10526 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10527 (build-system python-build-system)
10528 (home-page "https://greenlet.readthedocs.io/")
10529 (synopsis "Lightweight in-process concurrent programming")
10530 (description
10531 "Greenlet package is a spin-off of Stackless, a version of CPython
10532that supports micro-threads called \"tasklets\". Tasklets run
10533pseudo-concurrently (typically in a single or a few OS-level threads) and
10534are synchronized with data exchanges on \"channels\".")
10535 (license (list license:psfl license:expat))))
10536
10537(define-public python2-greenlet
10538 (package-with-python2 python-greenlet))
10539
10540(define-public python-objgraph
10541 (package
10542 (name "python-objgraph")
eebc03bb 10543 (version "3.4.1")
44d10b1f
RW
10544 (source
10545 (origin
10546 (method url-fetch)
10547 (uri (pypi-uri "objgraph" version))
10548 (sha256
10549 (base32
eebc03bb 10550 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
44d10b1f
RW
10551 (build-system python-build-system)
10552 (propagated-inputs
10553 `(("python-graphviz" ,python-graphviz)))
10554 (native-inputs
10555 `(("python-mock" ,python-mock)
10556 ("graphviz" ,graphviz)))
10557 (home-page "https://mg.pov.lt/objgraph/")
10558 (synopsis "Draw Python object reference graphs with graphviz")
10559 (description
10560 "This package provides tools to draw Python object reference graphs with
10561graphviz.")
10562 (license license:expat)))
10563
ffe58d1d
MB
10564(define-public python2-objgraph
10565 (package-with-python2 python-objgraph))
10566
44d10b1f
RW
10567(define-public python-gevent
10568 (package
10569 (name "python-gevent")
f11b5556 10570 (version "1.4.0")
44d10b1f
RW
10571 (source (origin
10572 (method url-fetch)
10573 (uri (pypi-uri "gevent" version))
10574 (sha256
10575 (base32
f11b5556 10576 "1lchr4akw2jkm5v4kz7bdm4wv3knkfhbfn9vkkz4s5yrkcxzmdqy"))
44d10b1f
RW
10577 (modules '((guix build utils)))
10578 (snippet
10579 '(begin
10580 ;; unbunding libev and c-ares
10581 (delete-file-recursively "deps")
10582 #t))))
10583 (build-system python-build-system)
10584 (arguments
10585 `(#:modules ((ice-9 ftw)
10586 (ice-9 match)
10587 (srfi srfi-26)
10588 (guix build utils)
10589 (guix build python-build-system))
10590 #:phases (modify-phases %standard-phases
44d10b1f
RW
10591 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10592 (lambda _
10593 (substitute* "src/gevent/subprocess.py"
10594 (("/bin/sh") (which "sh")))
10595 (for-each (lambda (file)
10596 (substitute* file
10597 (("/bin/sh") (which "sh"))
10598 (("/bin/true") (which "true"))))
10599 (find-files "src/greentest" "\\.py$"))
10600 #t))
10601 (add-before 'build 'do-not-use-bundled-sources
10602 (lambda* (#:key inputs #:allow-other-keys)
f11b5556 10603 (setenv "GEVENTSETUP_EMBED" "0")
44d10b1f 10604
b5b56b7f
MB
10605 ;; Prevent building bundled libev.
10606 (substitute* "setup.py"
10607 (("run_make=_BUILDING")
10608 "run_make=False"))
10609
44d10b1f
RW
10610 (let ((greenlet (string-append
10611 (assoc-ref inputs "python-greenlet")
10612 "/include")))
10613 (match (scandir greenlet
10614 (lambda (item)
10615 (string-prefix? "python" item)))
10616 ((python)
b5b56b7f 10617 (setenv "C_INCLUDE_PATH"
f11b5556
MB
10618 (string-append greenlet "/" python ":"
10619 (or (getenv "C_INCLUDE_PATH")
10620 ""))))))
44d10b1f 10621 #t))
f11b5556 10622 (add-before 'check 'pretend-to-be-CI
44d10b1f 10623 (lambda _
f11b5556
MB
10624 ;; A few tests are skipped due to network constraints or
10625 ;; get longer timeouts when running in a CI environment.
10626 ;; Piggy-back on that, as we need the same adjustments.
10627 (setenv "TRAVIS" "1")
10628 (setenv "APPVEYOR" "1")
44d10b1f 10629 #t))
f11b5556
MB
10630 (add-before 'check 'adjust-tests
10631 (lambda _
10632 (let ((disabled-tests
10633 '(;; These tests rely on networking which is not
10634 ;; available in the build container.
10635 "test_urllib2net.py"
10636 "test__server.py"
10637 "test__server_pywsgi.py"
10638 "test_socket.py"
10639 "test__socket.py"
10640 "test__socket_ssl.py"
10641 "test__socket_dns.py"
10642 "test__socket_dns6.py"
10643 "test___example_servers.py"
10644 "test__getaddrinfo_import.py"
10645 "test__examples.py"
10646 "test_httplib.py"
10647 "test_https.py"
10648 "test_urllib2_localnet.py"
10649 "test_ssl.py"
10650 "test__ssl.py"
10651 ;; XXX: These tests borrow functionality from the
10652 ;; Python builtin 'test' module, but it is not
10653 ;; installed with the Guix Python distribution.
10654 "test_smtpd.py"
10655 "test_wsgiref.py"
10656 "test_urllib2.py"
10657 "test_thread.py"
10658 "test_threading.py"
10659 "test__threading_2.py"
10660 ;; FIXME: test_patch_twice_warning_events fails for
10661 ;; no apparent reason. Needs more investigation!
10662 "test__monkey.py"
10663 ;; These tests rely on KeyboardInterrupts which do not
10664 ;; work inside the build container for some reason
10665 ;; (lack of controlling terminal?).
10666 "test_subprocess.py"
10667 "test__issues461_471.py"
10668 ;; TODO: Patch out the tests that use getprotobyname, etc
10669 ;; instead of disabling all the tests from these files.
10670 "test__all__.py"
10671 "test___config.py"
10672 "test__execmodules.py")))
10673 (call-with-output-file "skipped_tests.txt"
10674 (lambda (port)
10675 (display (string-join disabled-tests "\n") port)))
10676 #t)))
44d10b1f
RW
10677 (replace 'check
10678 (lambda _
10679 ;; Make sure the build directory is on PYTHONPATH.
10680 (setenv "PYTHONPATH"
10681 (string-append
10682 (getenv "PYTHONPATH") ":"
10683 (getcwd) "/build/"
10684 (car (scandir "build" (cut string-prefix? "lib." <>)))))
f11b5556
MB
10685
10686 ;; Use the build daemons configured number of workers.
10687 (setenv "NWORKERS" (number->string (parallel-job-count)))
10688
10689 (invoke "python" "-m" "gevent.tests" "--config"
10690 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
44d10b1f
RW
10691 (propagated-inputs
10692 `(("python-greenlet" ,python-greenlet)
10693 ("python-objgraph" ,python-objgraph)))
10694 (native-inputs
f11b5556
MB
10695 `(("python-six" ,python-six)
10696
10697 ;; For tests.
10698 ("python-dnspython" ,python-dnspython)
10699 ("python-psutil" ,python-psutil)
10700 ("python-zope.event" ,python-zope-event)
10701 ("python-zope.interface" ,python-zope-interface)))
44d10b1f
RW
10702 (inputs
10703 `(("c-ares" ,c-ares)
10704 ("libev" ,libev)))
10705 (home-page "http://www.gevent.org/")
10706 (synopsis "Coroutine-based network library")
10707 (description
10708 "gevent is a coroutine-based Python networking library that uses greenlet
10709to provide a high-level synchronous API on top of the libev event loop.")
10710 (license license:expat)
10711 (properties `((python2-variant . ,(delay python2-gevent))))))
10712
10713(define-public python2-gevent
10714 (let ((base (package-with-python2
10715 (strip-python2-variant python-gevent))))
10716 (package
10717 (inherit base)
f11b5556 10718 (native-inputs `(,@(package-native-inputs base)
44d10b1f
RW
10719 ("python-mock" ,python2-mock))))))
10720
10721(define-public python-fastimport
10722 (package
10723 (name "python-fastimport")
10724 (version "0.9.6")
10725 (source
10726 (origin
10727 (method url-fetch)
10728 (uri (pypi-uri "fastimport" version))
10729 (sha256
10730 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10731 (build-system python-build-system)
10732 (home-page "https://github.com/jelmer/python-fastimport")
10733 (synopsis "VCS fastimport parser and generator in Python")
10734 (description "This package provides a parser for and generator of the Git
10735@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10736format.")
10737 (license license:gpl2+)))
10738
10739(define-public python2-fastimport
10740 (package-with-python2 python-fastimport))
10741
10742(define-public python-twisted
10743 (package
10744 (name "python-twisted")
fdfad2fc 10745 (version "19.7.0")
44d10b1f
RW
10746 (source (origin
10747 (method url-fetch)
10748 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10749 (sha256
10750 (base32
fdfad2fc 10751 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10752 (build-system python-build-system)
10753 (arguments
0107c9b8 10754 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10755 (propagated-inputs
10756 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10757 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10758 ("python-incremental" ,python-incremental)
e5ba2fe3 10759 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10760 ("python-constantly" ,python-constantly)
10761 ("python-automat" ,python-automat)))
10762 (home-page "https://twistedmatrix.com/")
10763 (synopsis "Asynchronous networking framework written in Python")
10764 (description
10765 "Twisted is an extensible framework for Python programming, with special
10766focus on event-based network programming and multiprotocol integration.")
10767 (license license:expat)))
10768
10769(define-public python2-twisted
10770 (package-with-python2 python-twisted))
10771
10772(define-public python-pika
10773 (package
10774 (name "python-pika")
10775 (version "0.12.0")
10776 (source
10777 (origin
10778 (method url-fetch)
10779 (uri (pypi-uri "pika" version))
10780 (sha256
10781 (base32
10782 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10783 (build-system python-build-system)
10784 (native-inputs
10785 `(("python-pyev" ,python-pyev)
10786 ("python-tornado" ,python-tornado)
10787 ("python-twisted" ,python-twisted)))
10788 (home-page "https://pika.readthedocs.org")
10789 (synopsis "Pure Python AMQP Client Library")
10790 (description
10791 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10792Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10793network support library.")
10794 (license license:bsd-3)))
10795
10796(define-public python2-pika
10797 (package-with-python2 python-pika))
10798
10799(define-public python-ply
10800 (package
10801 (name "python-ply")
10802 (version "3.10")
10803 (source
10804 (origin
10805 (method url-fetch)
10806 (uri (pypi-uri "ply" version))
10807 (sha256
10808 (base32
10809 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10810 (build-system python-build-system)
10811 (home-page "http://www.dabeaz.com/ply/")
10812 (synopsis "Python Lex & Yacc")
10813 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10814It uses LR parsing and does extensive error checking.")
10815 (license license:bsd-3)))
10816
10817(define-public python2-ply
10818 (package-with-python2 python-ply))
10819
10820(define-public python-tabulate
10821 (package
10822 (name "python-tabulate")
10823 (version "0.7.7")
10824 (source (origin
10825 (method url-fetch)
10826 (uri (pypi-uri "tabulate" version))
10827 (sha256
10828 (base32
10829 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10830 (build-system python-build-system)
10831 (arguments
10832 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10833 ;; and the latest release is not tagged in the upstream repository.
10834 '(#:tests? #f))
10835 (home-page "https://bitbucket.org/astanin/python-tabulate")
10836 (synopsis "Pretty-print tabular data")
10837 (description
10838 "Tabulate is a library and command-line utility to pretty-print tabular
10839data in Python.")
10840 (license license:expat)))
10841
10842(define-public python2-tabulate
10843 (package-with-python2 python-tabulate))
10844
10845(define-public python-kazoo
10846 (package
10847 (name "python-kazoo")
10848 (version "2.4.0")
10849 (source
10850 (origin
10851 (method url-fetch)
10852 (uri (pypi-uri "kazoo" version))
10853 (sha256
10854 (base32
10855 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10856 (build-system python-build-system)
10857 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10858 (propagated-inputs
10859 `(("python-six" ,python-six)))
10860 (home-page "https://kazoo.readthedocs.org")
10861 (synopsis "High-level Zookeeper client library")
10862 (description
10863 "Kazoo is a Python client library for the Apache Zookeeper distributed
10864application service. It is designed to be easy to use and to avoid common
10865programming errors.")
10866 (license license:asl2.0)))
10867
10868(define-public python2-kazoo
10869 (package-with-python2 python-kazoo))
10870
10871(define-public python-pykafka
10872 (package
10873 (name "python-pykafka")
10874 (version "2.4.0")
10875 (source (origin
10876 (method url-fetch)
0ca1d040 10877 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10878 (sha256
10879 (base32
10880 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10881 (build-system python-build-system)
10882 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10883 (propagated-inputs
10884 `(("python-gevent" ,python-gevent)
10885 ("python-kazoo" ,python-kazoo)
10886 ("python-tabulate" ,python-tabulate)))
10887 (inputs
10888 `(("librdkafka" ,librdkafka)))
10889 (home-page "https://pykafka.readthedocs.io/")
10890 (synopsis "Apache Kafka client for Python")
10891 (description
10892 "PyKafka is a client for the Apache Kafka distributed messaging system.
10893It includes Python implementations of Kafka producers and consumers, which
10894are optionally backed by a C extension built on librdkafka.")
10895 (license license:asl2.0)))
10896
10897(define-public python2-pykafka
10898 (package-with-python2 python-pykafka))
10899
10900(define-public python-wcwidth
28ac442b
MB
10901 (package
10902 (name "python-wcwidth")
574a71a7 10903 (version "0.1.8")
28ac442b
MB
10904 (source (origin
10905 (method url-fetch)
10906 (uri (pypi-uri "wcwidth" version))
10907 (sha256
10908 (base32
574a71a7 10909 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
28ac442b
MB
10910 (build-system python-build-system)
10911 (home-page "https://github.com/jquast/wcwidth")
10912 (synopsis "Measure number of terminal column cells of wide-character codes")
10913 (description "Wcwidth measures the number of terminal column cells of
44d10b1f
RW
10914wide-character codes. It is useful for those implementing a terminal emulator,
10915or programs that carefully produce output to be interpreted by one. It is a
10916Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10917specified in POSIX.1-2001 and POSIX.1-2008.")
28ac442b 10918 (license license:expat)))
44d10b1f
RW
10919
10920(define-public python2-wcwidth
10921 (package-with-python2 python-wcwidth))
10922
10923(define-public python2-jsonrpclib
10924 (package
10925 (name "python2-jsonrpclib")
10926 (version "0.1.7")
10927 (source (origin
10928 (method url-fetch)
6571bba0 10929 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10930 (sha256
10931 (base32
10932 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10933 (build-system python-build-system)
10934 (arguments
10935 `(#:tests? #f
10936 #:python ,python-2))
10937 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10938 (synopsis "Implementation of JSON-RPC specification for Python")
10939 (description
10940 "This library is an implementation of the JSON-RPC specification.
10941It supports both the original 1.0 specification, as well as the
10942new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10943etc.")
10944 (license license:asl2.0)))
10945
10946(define-public python-chai
10947 (package
10948 (name "python-chai")
10949 (version "1.1.2")
10950 (source (origin
10951 (method url-fetch)
10952 (uri (pypi-uri "chai" version))
10953 (sha256
10954 (base32
10955 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10956 (build-system python-build-system)
10957 (home-page "https://github.com/agoragames/chai")
10958 (synopsis "Mocking framework for Python")
10959 (description
10960 "Chai provides an api for mocking, stubbing and spying your python
10961objects, patterned after the Mocha library for Ruby.")
10962 (license license:bsd-3)))
10963
10964(define-public python2-chai
10965 (package-with-python2 python-chai))
10966
10967(define-public python-inflection
10968 (package
10969 (name "python-inflection")
10970 (version "0.3.1")
10971 (source
10972 (origin (method url-fetch)
10973 (uri (pypi-uri "inflection" version))
10974 (sha256
10975 (base32
10976 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10977 (build-system python-build-system)
10978 (native-inputs
10979 `(("python-pytest" ,python-pytest)))
10980 (home-page "https://github.com/jpvanhal/inflection")
10981 (synopsis "Python string transformation library")
10982 (description
10983 "Inflection is a string transformation library. It singularizes
10984and pluralizes English words, and transforms strings from CamelCase to
10985underscored string.")
10986 (license license:expat)))
10987
10988(define-public python2-inflection
10989 (package-with-python2 python-inflection))
10990
10991(define-public python-pylev
10992 (package
10993 (name "python-pylev")
10994 (version "1.3.0")
10995 (source (origin
10996 (method url-fetch)
10997 (uri (pypi-uri "pylev" version))
10998 (sha256
10999 (base32
11000 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11001 (build-system python-build-system)
11002 (home-page "https://github.com/toastdriven/pylev")
11003 (synopsis "Levenshtein distance implementation in Python")
11004 (description "Pure Python Levenshtein implementation, based off the
11005Wikipedia code samples at
11006@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11007 (license license:bsd-3)))
11008
11009(define-public python2-pylev
11010 (package-with-python2 python-pylev))
11011
11012(define-public python-cleo
11013 (package
11014 (name "python-cleo")
0c101a04 11015 (version "0.7.6")
44d10b1f
RW
11016 (source (origin
11017 (method url-fetch)
11018 (uri (pypi-uri "cleo" version))
11019 (sha256
11020 (base32
0c101a04 11021 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
44d10b1f
RW
11022 (build-system python-build-system)
11023 (native-inputs
af2d3713 11024 `( ;; For testing
44d10b1f
RW
11025 ("python-mock" ,python-mock)
11026 ("python-pytest-mock" ,python-pytest-mock)
11027 ("python-pytest" ,python-pytest)))
11028 (propagated-inputs
11029 `(("python-backpack" ,python-backpack)
0c101a04 11030 ("python-clikit" ,python-clikit)
44d10b1f
RW
11031 ("python-pastel" ,python-pastel)
11032 ("python-pylev" ,python-pylev)))
11033 (home-page "https://github.com/sdispater/cleo")
11034 (synopsis "Command-line arguments library for Python")
11035 (description
11036 "Cleo allows you to create command-line commands with signature in
11037docstring and colored output.")
11038 (license license:expat)))
11039
11040(define-public python2-cleo
11041 (package-with-python2 python-cleo))
11042
2be85c45
TLC
11043(define-public python-tomlkit
11044 (package
11045 (name "python-tomlkit")
f4b6ce21 11046 (version "0.5.11")
2be85c45
TLC
11047 (source
11048 (origin
11049 (method url-fetch)
11050 (uri (pypi-uri "tomlkit" version))
11051 (sha256
f4b6ce21 11052 (base32 "1kq1663iqxgwrmb883n55ypi5axnixla2hrby9g2x227asifsi7h"))))
2be85c45
TLC
11053 (build-system python-build-system)
11054 (native-inputs
11055 `(("python-pytest" ,python-pytest)))
2d3da186
TGR
11056 (home-page "https://github.com/sdispater/tomlkit")
11057 (synopsis "Style-preserving TOML library")
2be85c45
TLC
11058 (description
11059 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
11060preserves all comments, indentations, whitespace and internal element ordering,
11061and makes them accessible and editable via an intuitive API. It can also
11062create new TOML documents from scratch using the provided helpers. Part of the
2d3da186 11063implementation has been adapted, improved, and fixed from Molten.")
2be85c45
TLC
11064 (license license:expat)))
11065
0bb32201
TLC
11066(define-public python-shellingham
11067 (package
11068 (name "python-shellingham")
11069 (version "1.3.1")
11070 (source
11071 (origin
11072 (method url-fetch)
11073 (uri (pypi-uri "shellingham" version))
11074 (sha256
11075 (base32
11076 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
11077 (build-system python-build-system)
11078 (home-page
11079 "https://github.com/sarugaku/shellingham")
11080 (synopsis "Tool to detect surrounding shell")
11081 (description
11082 "Shellingham detects what shell the current Python executable is
11083running in.")
11084 (license license:isc)))
11085
aee92957
TLC
11086(define-public python-memcached
11087 (package
11088 (name "python-memcached")
11089 (version "1.59")
11090 (source
11091 (origin
11092 (method url-fetch)
11093 (uri (pypi-uri "python-memcached" version))
11094 (sha256
11095 (base32
11096 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
11097 (build-system python-build-system)
11098 (propagated-inputs `(("python-six" ,python-six)))
11099 (home-page
11100 "https://github.com/linsomniac/python-memcached")
11101 (synopsis "Pure python memcached client")
11102 (description
11103 "This software is a pure Python interface to the memcached memory cache
11104daemon. It is the client side software which allows storing values in one or
11105more, possibly remote, memcached servers.")
11106 (license license:psfl)))
11107
b2ac2508
TLC
11108(define-public python-clikit
11109 (package
11110 (name "python-clikit")
4573b94d 11111 (version "0.4.1")
b2ac2508
TLC
11112 (source
11113 (origin
11114 (method url-fetch)
11115 (uri (pypi-uri "clikit" version))
11116 (sha256
11117 (base32
4573b94d 11118 "10gab65pq0jdf589n33sj2513pxal2lisl4xwf1ijysdjxmpdr4a"))))
b2ac2508
TLC
11119 (build-system python-build-system)
11120 (propagated-inputs
11121 `(("python-pastel" ,python-pastel)
11122 ("python-pylev" ,python-pylev)))
11123 (home-page "https://github.com/sdispater/clikit")
11124 (synopsis "Group of utilities to build command line interfaces")
11125 (description
11126 "CliKit is a group of utilities to build testable command line
11127interfaces.")
11128 (license license:expat)))
11129
c6f008d6
TLC
11130(define-public python-msgpack-python
11131 (package
11132 (name "python-msgpack-python")
11133 (version "0.5.6")
11134 (source
11135 (origin
11136 (method url-fetch)
11137 (uri (pypi-uri "msgpack-python" version))
11138 (sha256
11139 (base32
11140 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
11141 (build-system python-build-system)
11142 (home-page "http://msgpack.org/")
11143 (synopsis "Package to deserialize messages in MessagePack binary format")
11144 (description
11145 "MessagePack is an efficient binary serialization format. It lets you
11146exchange data among multiple languages like JSON. But it's faster and
11147smaller. Small integers are encoded into a single byte, and typical short
11148strings require only one extra byte in addition to the strings themselves.")
11149 (license license:asl2.0)))
11150
badc1c63
TLC
11151(define-public python-cachy
11152 (package
11153 (name "python-cachy")
11154 (version "0.2.0")
11155 (source
11156 (origin
11157 (method url-fetch)
11158 (uri (pypi-uri "cachy" version))
11159 (sha256
11160 (base32
11161 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
11162 (build-system python-build-system)
11163 (native-inputs
11164 `(("python-fakeredis" ,python-fakeredis)
11165 ("python-flexmock" ,python-flexmock)
11166 ("python-pytest" ,python-pytest)))
11167 (propagated-inputs
11168 `(("python-memcached" ,python-memcached)
11169 ("python-msgpack-python" ,python-msgpack-python)
11170 ("python-redis" ,python-redis)))
11171 (home-page "https://github.com/sdispater/cachy")
11172 (synopsis "Simple yet effective caching library")
11173 (description
11174 "Cachy provides a simple yet effective caching library. A simple but
11175powerful API: thread-safety; decorator syntax; support for memcached, redis,
11176database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
11177 (license license:expat)))
11178
617bb67b
TLC
11179(define-public poetry
11180 (package
11181 (name "poetry")
11182 (version "0.12.17")
11183 ;; Poetry can only be built from source with poetry.
11184 (source
11185 (origin
11186 (method url-fetch)
11187 (uri (pypi-uri "poetry" version))
11188 (sha256
11189 (base32
11190 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
11191 (build-system python-build-system)
11192 (arguments
11193 `(#:tests? #f ;; Pypi does not have tests.
11194 #:phases
11195 (modify-phases %standard-phases
11196 (replace 'build
11197 (lambda _
11198 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
11199 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
11200 "setup.py")
11201 #t)))))
11202 (propagated-inputs
11203 `(("python-cachecontrol" ,python-cachecontrol)
11204 ("python-cachy" ,python-cachy)
11205 ("python-cleo" ,python-cleo)
11206 ("python-glob2" ,python-glob2)
11207 ("python-html5lib" ,python-html5lib)
11208 ("python-jsonschema" ,python-jsonschema)
11209 ("python-msgpack" ,python-msgpack)
617bb67b
TLC
11210 ("python-pkginfo" ,python-pkginfo)
11211 ("python-pyparsing" ,python-pyparsing)
11212 ("python-pyrsistent" ,python-pyrsistent)
11213 ("python-requests" ,python-requests)
11214 ("python-requests-toolbelt" ,python-requests-toolbelt)
11215 ("python-shellingham" ,python-shellingham)
11216 ("python-tomlkit" ,python-tomlkit)
11217 ("python-virtualenv" ,python-virtualenv)))
11218 (home-page "https://poetry.eustace.io/")
11219 (synopsis "Python dependency management and packaging made easy")
11220 (description "Poetry is a tool for dependency management and packaging
11221in Python. It allows you to declare the libraries your project depends on and
11222it will manage (install/update) them for you.")
11223 (license license:expat)))
11224
44d10b1f
RW
11225(define-public python-lazy-object-proxy
11226 (package
11227 (name "python-lazy-object-proxy")
7454078a 11228 (version "1.4.3")
44d10b1f
RW
11229 (source (origin
11230 (method url-fetch)
11231 (uri (pypi-uri "lazy-object-proxy" version))
11232 (sha256
11233 (base32
7454078a 11234 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
11235 (native-inputs
11236 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
11237 (build-system python-build-system)
11238 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11239 (synopsis "Lazy object proxy for python")
11240 (description
11241 "Lazy object proxy is an object that wraps a callable but defers the call
11242until the object is actually required, and caches the result of said call.")
11243 (license license:bsd-2)))
11244
11245(define-public python2-lazy-object-proxy
11246 (package-with-python2 python-lazy-object-proxy))
11247
11248(define-public python-dnspython
11249 (package
11250 (name "python-dnspython")
11251 (version "1.15.0")
11252 (source (origin
11253 (method url-fetch)
11254 (uri (string-append "http://www.dnspython.org/kits/"
11255 version "/dnspython-" version ".tar.gz"))
11256 (sha256
11257 (base32
11258 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11259 (build-system python-build-system)
11260 (arguments '(#:tests? #f)) ; XXX: requires internet access
11261 (home-page "http://www.dnspython.org")
11262 (synopsis "DNS toolkit for Python")
11263 (description
11264 "dnspython is a DNS toolkit for Python. It supports almost all record
11265types. It can be used for queries, zone transfers, and dynamic updates.
11266It supports TSIG authenticated messages and EDNS0.")
11267 (license license:expat)))
11268
11269(define-public python2-dnspython
11270 (package-with-python2 python-dnspython))
11271
11272(define-public python-email-validator
11273 (package
11274 (name "python-email-validator")
11275 (version "1.0.2")
11276 (source
11277 (origin (method url-fetch)
11278 (uri (pypi-uri "email_validator" version))
11279 (sha256
11280 (base32
11281 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11282 (build-system python-build-system)
11283 (arguments
11284 '(#:phases
11285 (modify-phases %standard-phases
11286 (add-before 'build 'use-dnspython
11287 (lambda _
11288 (substitute* "setup.py"
11289 (("dnspython3") "dnspython"))
11290 #t)))))
11291 (propagated-inputs
11292 `(("python-dnspython" ,python-dnspython)
11293 ("python-idna" ,python-idna)))
11294 (home-page "https://github.com/JoshData/python-email-validator")
11295 (synopsis "Email address validation library for Python")
11296 (description
11297 "This library validates email address syntax and deliverability.")
11298 (license license:cc0)))
11299
11300(define-public python2-email-validator
11301 (package-with-python2 python-email-validator))
11302
11303(define-public python-ukpostcodeparser
11304 (package
11305 (name "python-ukpostcodeparser")
11306 (version "1.0.3")
11307 (source (origin
11308 (method url-fetch)
11309 (uri (pypi-uri "UkPostcodeParser" version))
11310 (sha256
11311 (base32
11312 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11313 (build-system python-build-system)
11314 (home-page "https://github.com/hamstah/ukpostcodeparser")
11315 (synopsis "UK Postcode parser for Python")
11316 (description
11317 "This library provides the @code{parse_uk_postcode} function for
11318parsing UK postcodes.")
11319 (license license:expat)))
11320
11321(define-public python2-ukpostcodeparser
11322 (package-with-python2 python-ukpostcodeparser))
11323
11324(define-public python-faker
11325 (package
11326 (name "python-faker")
11327 (version "0.7.9")
11328 (source (origin
11329 (method url-fetch)
11330 (uri (pypi-uri "Faker" version))
11331 (sha256
11332 (base32
11333 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11334 (patches
11335 (search-patches "python-faker-fix-build-32bit.patch"))
11336 (modules '((guix build utils)))
11337 (snippet
11338 '(begin
11339 (for-each delete-file (find-files "." "\\.pyc$"))
11340 #t))))
11341 (build-system python-build-system)
11342 (arguments
11343 '(#:phases
11344 (modify-phases %standard-phases
11345 (replace 'check
49ff8827 11346 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
11347 (native-inputs
11348 `(;; For testing
11349 ("python-email-validator" ,python-email-validator)
11350 ("python-mock" ,python-mock)
11351 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11352 (propagated-inputs
11353 `(("python-dateutil" ,python-dateutil)
11354 ("python-six" ,python-six)))
11355 (home-page "https://github.com/joke2k/faker")
11356 (synopsis "Python package that generates fake data")
11357 (description
11358 "Faker is a Python package that generates fake data such as names,
11359addresses, and phone numbers.")
11360 (license license:expat)
11361 (properties `((python2-variant . ,(delay python2-faker))))))
11362
11363(define-public python2-faker
11364 (let ((base (package-with-python2 (strip-python2-variant
11365 python-faker))))
11366 (package
11367 (inherit base)
11368 (propagated-inputs
11369 `(("python2-ipaddress" ,python2-ipaddress)
11370 ,@(package-propagated-inputs base))))))
11371
11372(define-public python-pyaml
11373 (package
11374 (name "python-pyaml")
11375 (version "18.11.0")
11376 (source (origin
11377 (method url-fetch)
11378 (uri (pypi-uri "pyaml" version))
11379 (sha256
11380 (base32
11381 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
11382 (build-system python-build-system)
11383 (native-inputs
11384 `(("python-unidecode" ,python-unidecode)))
11385 (propagated-inputs
11386 `(("python-pyyaml" ,python-pyyaml)))
11387 (home-page "https://github.com/mk-fg/pretty-yaml")
11388 (synopsis "YAML pretty-print library for Python")
11389 (description
11390 "pyaml is a PyYAML based python module to produce pretty and readable
11391YAML-serialized data.")
492e3a7a 11392 (license license:wtfpl2)))
44d10b1f
RW
11393
11394(define-public python2-pyaml
11395 (package-with-python2 python-pyaml))
11396
11397(define-public python-backpack
11398 (package
11399 (name "python-backpack")
11400 (version "0.1")
11401 (source
11402 (origin
11403 (method url-fetch)
11404 (uri (pypi-uri "backpack" version))
11405 (sha256
11406 (base32
11407 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
11408 (build-system python-build-system)
11409 (native-inputs
11410 `(("python-pytest" ,python-pytest)
11411 ("python-nose" ,python-nose)))
11412 (propagated-inputs
11413 `(("python-simplejson" ,python-simplejson)))
11414 (home-page "https://github.com/sdispater/backpack")
11415 (synopsis "Utilities for working with Python collections")
11416 (description "Backpack provides some useful utilities for working with
11417collections of data.")
11418 (license license:expat)))
11419
11420(define-public python2-backpack
11421 (package-with-python2 python-backpack))
11422
11423(define-public python-prompt-toolkit
11424 (package
11425 (name "python-prompt-toolkit")
11426 (version "2.0.7")
11427 (source
11428 (origin
11429 (method url-fetch)
11430 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11431 (sha256
11432 (base32
11433 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
11434 (build-system python-build-system)
11435 (arguments
11436 `(#:phases
11437 (modify-phases %standard-phases
11438 (delete 'check)
11439 (add-after 'install 'post-install-check
11440 (lambda* (#:key inputs outputs #:allow-other-keys)
11441 ;; HOME is needed for the test
11442 ;; "test_pathcompleter_can_expanduser".
11443 (setenv "HOME" "/tmp")
11444 (add-installed-pythonpath inputs outputs)
11445 (invoke "py.test"))))))
11446 (propagated-inputs
11447 `(("python-wcwidth" ,python-wcwidth)
11448 ("python-six" ,python-six)
11449 ("python-pygments" ,python-pygments)))
11450 (native-inputs
11451 `(("python-pytest" ,python-pytest)))
11452 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11453 (synopsis "Library for building command line interfaces in Python")
11454 (description
11455 "Prompt-Toolkit is a library for building interactive command line
11456interfaces in Python. It's like GNU Readline but it also features syntax
11457highlighting while typing, out-of-the-box multi-line input editing, advanced
11458code completion, incremental search, support for Chinese double-width
11459characters, mouse support, and auto suggestions.")
11460 (license license:bsd-3)))
11461
11462(define-public python2-prompt-toolkit
11463 (package-with-python2 python-prompt-toolkit))
11464
11465(define-public python-prompt-toolkit-1
11466 (package (inherit python-prompt-toolkit)
11467 (version "1.0.15")
11468 (source
11469 (origin
11470 (method url-fetch)
11471 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11472 (sha256
11473 (base32
11474 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
11475
11476(define-public python2-prompt-toolkit-1
11477 (package-with-python2 python-prompt-toolkit-1))
11478
11479(define-public python-jedi
11480 (package
11481 (name "python-jedi")
745041b5 11482 (version "0.16.0")
44d10b1f
RW
11483 (source
11484 (origin
11485 (method url-fetch)
11486 (uri (pypi-uri "jedi" version))
745041b5 11487 (patches (search-patches "python-jedi-deleted-variables.patch"))
44d10b1f
RW
11488 (sha256
11489 (base32
745041b5 11490 "1mb5kmrk9bkc3kwzx02j62cdan1jqd92q1z7h7wi9d30jg5p3j6m"))))
44d10b1f
RW
11491 (build-system python-build-system)
11492 (arguments
296e1aea 11493 `(#:phases
44d10b1f
RW
11494 (modify-phases %standard-phases
11495 (replace 'check
296e1aea
MC
11496 (lambda _
11497 (setenv "HOME" "/tmp")
11498 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
11499 (native-inputs
11500 `(("python-pytest" ,python-pytest)
11501 ("python-docopt" ,python-docopt)))
11502 (propagated-inputs
11503 `(("python-parso" ,python-parso)))
11504 (home-page "https://github.com/davidhalter/jedi")
11505 (synopsis "Autocompletion and static analysis library for Python")
11506 (description
11507 "Jedi is a static analysis tool for Python that can be used in Integrated
11508Development Environments (@dfn{IDE}s) and text editors. It understands Python
11509on a deeper level than many other static analysis frameworks for Python.
11510
11511Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11512well.")
11513 (license license:expat)))
11514
11515(define-public python2-jedi
296e1aea 11516 (package-with-python2 python-jedi))
44d10b1f
RW
11517
11518(define-public ptpython
11519 (package
11520 (name "ptpython")
11521 (version "0.34")
11522 (source (origin
11523 (method url-fetch)
11524 (uri (pypi-uri "ptpython" version))
11525 (sha256
11526 (base32
11527 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11528 (build-system python-build-system)
11529 (arguments
11530 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11531 (propagated-inputs
11532 `(("python-docopt" ,python-docopt)
11533 ("python-jedi" ,python-jedi)
11534 ("python-prompt-toolkit" ,python-prompt-toolkit)
11535 ("python-pygments" ,python-pygments)))
11536 (home-page "https://github.com/jonathanslenders/ptpython")
11537 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11538 (description
11539 "ptpython is a Python read-eval-print loop with IDE-like features.
11540It supports syntax highlighting, multiline editing, autocompletion, mouse,
11541color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11542etc.")
11543 (license license:bsd-3)
11544 (properties `((python2-variant . ,(delay ptpython-2))))))
11545
11546(define-public ptpython-2
11547 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11548 (package
11549 (inherit base)
11550 (name "ptpython2"))))
11551
11552(define-public python-stem
11553 (package
11554 (name "python-stem")
a1dc5898 11555 (version "1.8.0")
44d10b1f
RW
11556 (source
11557 (origin
11558 (method url-fetch)
11559 (uri (pypi-uri "stem" version))
11560 (sha256
11561 (base32
a1dc5898 11562 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
44d10b1f
RW
11563 (build-system python-build-system)
11564 (arguments
11565 `(#:phases
11566 (modify-phases %standard-phases
11567 (replace 'check
11568 (lambda _
11569 (invoke "./run_tests.py" "--unit")
11570 #t)))))
11571 (native-inputs
11572 `(("python-mock" ,python-mock)
11573 ("python-pycodestyle" ,python-pycodestyle)
11574 ("python-pyflakes" ,python-pyflakes)))
11575 (home-page "https://stem.torproject.org/")
11576 (synopsis
11577 "Python controller library that allows applications to interact with Tor")
11578 (description
11579 "Stem is a Python controller library for Tor. With it you can use Tor's
11580control protocol to script against the Tor process and read descriptor data
11581relays publish about themselves.")
11582 (license license:lgpl3)))
11583
11584(define-public python2-stem
11585 (package-with-python2 python-stem))
11586
11587(define-public python-pyserial
11588 (package
11589 (name "python-pyserial")
00d81f98 11590 (version "3.4")
44d10b1f
RW
11591 (source
11592 (origin
11593 (method url-fetch)
11594 (uri (pypi-uri "pyserial" version))
11595 (sha256
11596 (base32
00d81f98 11597 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
44d10b1f
RW
11598 (build-system python-build-system)
11599 (arguments
11600 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11601 ;; #:phases
11602 ;; (modify-phases %standard-phases
11603 ;; (replace 'check
11604 ;; (lambda _
11605 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11606 (home-page
11607 "https://github.com/pyserial/pyserial")
11608 (synopsis "Python Serial Port Bindings")
11609 (description "@code{pyserial} provide serial port bindings for Python. It
11610supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11611and/or Xon/Xoff. The port is accessed in RAW mode.")
11612 (license license:bsd-3)))
11613
11614(define-public python2-pyserial
11615 (package-with-python2 python-pyserial))
11616
11617(define-public python-kivy
11618 (package
11619 (name "python-kivy")
11620 (version "1.10.1")
11621 (source
11622 (origin
11623 (method url-fetch)
11624 (uri (pypi-uri "Kivy" version))
11625 (file-name (string-append name "-" version ".tar.gz"))
11626 (sha256
11627 (base32
11628 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11629 (build-system python-build-system)
11630 (arguments
11631 `(#:tests? #f ; Tests require many optional packages
11632 #:phases
11633 (modify-phases %standard-phases
11634 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11635 (lambda* (#:key inputs #:allow-other-keys)
11636 (setenv "KIVY_SDL2_PATH"
11637 (string-append (assoc-ref inputs "sdl-union")
11638 "/include/SDL2"))
11639 #t)))))
11640 (native-inputs
aa0e4413 11641 `(("pkg-config" ,pkg-config)
44d10b1f
RW
11642 ("python-cython" ,python-cython)))
11643 (inputs
11644 `(("gstreamer" ,gstreamer)
11645 ("mesa" ,mesa)
11646 ("sdl-union"
11647 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11648 (home-page "http://kivy.org")
11649 (synopsis
11650 "Multitouch application framework")
11651 (description
11652 "A software library for rapid development of
11653hardware-accelerated multitouch applications.")
11654 (license license:expat)))
11655
11656(define-public python2-kivy
11657 (package-with-python2 python-kivy))
11658
11659(define-public python-kivy-next
11660 (deprecated-package "python-kivy-next" python-kivy))
11661
11662(define-public python2-kivy-next
11663 (deprecated-package "python2-kivy-next" python2-kivy))
11664
11665(define-public python-binaryornot
11666 (package
11667 (name "python-binaryornot")
11668 (version "0.4.4")
11669 (source (origin
11670 (method url-fetch)
11671 (uri (pypi-uri "binaryornot" version))
11672 (sha256
11673 (base32
11674 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11675 (build-system python-build-system)
86723f98
DM
11676 (arguments
11677 `(#:phases
11678 (modify-phases %standard-phases
ee623903 11679 (add-after 'unpack 'patch-tests
86723f98
DM
11680 (lambda _
11681 ;; TypeError: binary() got an unexpected keyword argument
11682 ;; 'average_size'.
11683 (substitute* "tests/test_check.py"
11684 (("average_size=512") ""))
11685 #t)))))
44d10b1f
RW
11686 (propagated-inputs
11687 `(("python-chardet" ,python-chardet)
11688 ("python-hypothesis" ,python-hypothesis)))
11689 (home-page "https://github.com/audreyr/binaryornot")
11690 (synopsis "Package to check if a file is binary or text")
11691 (description "Ultra-lightweight pure Python package to check if a file is
11692binary or text.")
11693 (license license:bsd-3)
11694 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11695
11696(define-public python2-binaryornot
11697 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11698 (package (inherit base)
11699 (propagated-inputs
11700 `(("python2-enum34" ,python2-enum34)
11701 ,@(package-propagated-inputs base))))))
11702
f315673d 11703(define-public python-binwalk
9b9ab657
JK
11704 (package
11705 (name "python-binwalk")
11706 (version "2.2.0")
11707 (source
11708 (origin
11709 (method git-fetch)
11710 (uri (git-reference
11711 (url "https://github.com/ReFirmLabs/binwalk")
11712 (commit (string-append "v" version))))
11713 (file-name (git-file-name name version))
11714 (sha256
11715 (base32
11716 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
11717 (build-system python-build-system)
11718 (arguments
11719 `(#:phases
11720 (modify-phases %standard-phases
11721 (add-before 'check 'set-pythonpath
11722 (lambda _
11723 (setenv "PYTHONPATH"
11724 (string-append
11725 (getcwd) "/src/"
11726 ":" (getenv "PYTHONPATH")))
11727 (setenv "HOME" "")
11728 #t)))))
11729 (native-inputs
11730 `(("python-coverage" ,python-coverage)
11731 ("python-nose" ,python-nose)))
11732 (home-page "https://github.com/ReFirmLabs/binwalk")
11733 (synopsis "Firmware analysis tool")
11734 (description "Binwalk is a tool for analyzing, reverse engineering, and
11735extracting firmware images")
11736 (license license:expat)))
f315673d 11737
44d10b1f
RW
11738(define-public python-nltk
11739 (package
11740 (name "python-nltk")
11741 (version "3.2.1")
11742 (source (origin
11743 (method url-fetch)
11744 (uri (pypi-uri "nltk" version))
11745 (sha256
11746 (base32
11747 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11748 (build-system python-build-system)
11749 (arguments
11750 '(;; The tests require some extra resources to be downloaded.
11751 ;; TODO Try packaging these resources.
11752 #:tests? #f))
11753 (home-page "http://nltk.org/")
11754 (synopsis "Natural Language Toolkit")
11755 (description "It provides interfaces to over 50 corpora and lexical
11756resources such as WordNet, along with a suite of text processing libraries
11757for classification, tokenization, stemming, tagging, parsing, and semantic
11758reasoning, wrappers for natural language processing libraries.")
11759 (license license:asl2.0)))
11760
11761(define-public python2-nltk
11762 (package-with-python2 python-nltk))
11763
11764(define-public python-pymongo
11765 (package
11766 (name "python-pymongo")
11767 (version "3.7.2")
11768 (source (origin
11769 (method url-fetch)
11770 (uri (pypi-uri "pymongo" version))
11771 (sha256
11772 (base32
11773 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11774 (build-system python-build-system)
11775 (propagated-inputs
11776 `(("python-certifi" ,python-certifi)))
11777 (home-page "https://github.com/mongodb/mongo-python-driver")
11778 (synopsis "Python driver for MongoDB")
11779 (description "Python driver for MongoDB.")
11780 (license license:asl2.0)))
11781
11782(define-public python2-pymongo
11783 (package-with-python2 python-pymongo))
11784
44d10b1f
RW
11785(define-public python-consul
11786 (package
11787 (name "python-consul")
11788 (version "0.6.1")
11789 (source
11790 (origin
11791 (method url-fetch)
11792 (uri (pypi-uri "python-consul" version))
11793 (sha256
11794 (base32
11795 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11796 (build-system python-build-system)
11797 (arguments
11798 '(#:tests? #f)) ; The tests are not distributed
11799 (propagated-inputs
11800 `(("python-requests" ,python-requests)
11801 ("python-six" ,python-six)))
11802 (home-page "https://github.com/cablehead/python-consul")
11803 (synopsis "Python client for Consul")
11804 (description
11805 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11806discovery, monitoring and configuration.")
11807 (license license:expat)))
11808
11809(define-public python2-consul
11810 (package-with-python2 python-consul))
11811
11812(define-public python-schematics
11813 (package
11814 (name "python-schematics")
11815 (version "1.1.1")
11816 (source
1961d187
TGR
11817 (origin
11818 (method git-fetch)
11819 (uri (git-reference
11820 (url "https://github.com/schematics/schematics.git")
11821 (commit (string-append "v" version))))
11822 (file-name (git-file-name name version))
11823 (sha256
11824 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11825 (build-system python-build-system)
11826 (propagated-inputs
11827 `(("python-six" ,python-six)))
11828 (arguments
1961d187
TGR
11829 ;; The tests require a bunch of not very nice packages with fixed
11830 ;; version requirements (e.g. python-coveralls).
11831 `(#:tests? #f))
44d10b1f
RW
11832 (home-page "https://github.com/schematics/schematics")
11833 (synopsis "Python Data Structures for Humans")
11834 (description "Python Data Structures for Humans.")
11835 (license license:bsd-3)))
11836
11837(define-public python2-schematics
11838 (package-with-python2 python-schematics))
11839
11840(define-public python-odfpy
11841 (package
11842 (name "python-odfpy")
11843 (version "1.3.3")
11844 (source (origin
11845 (method url-fetch)
11846 (uri (pypi-uri "odfpy" version))
11847 (sha256
11848 (base32
11849 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11850 (arguments
11851 `(#:modules ((srfi srfi-1)
11852 (guix build python-build-system)
11853 (guix build utils))
11854 #:phases
11855 (modify-phases %standard-phases
11856 (replace 'check
11857 ;; The test runner invokes python2 and python3 for test*.py.
11858 ;; To avoid having both in inputs, we replicate it here.
11859 (lambda _
21ccc01d
RW
11860 (for-each (lambda (test-file) (invoke "python" test-file))
11861 (find-files "tests" "^test.*\\.py$"))
11862 #t)))))
44d10b1f
RW
11863 (build-system python-build-system)
11864 (home-page "https://github.com/eea/odfpy")
11865 (synopsis "Python API and tools to manipulate OpenDocument files")
11866 (description "Collection of libraries and utility programs written in
11867Python to manipulate OpenDocument 1.2 files.")
11868 (license
11869 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11870 ;; number of files with other licenses.
11871 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11872
11873(define-public python2-odfpy
11874 (package-with-python2 python-odfpy))
11875
11876(define-public python-natsort
11877 (package
11878 (name "python-natsort")
e3da9b2e 11879 (version "7.0.1")
44d10b1f
RW
11880 (source (origin
11881 (method url-fetch)
11882 (uri (pypi-uri "natsort" version))
11883 (sha256
11884 (base32
e3da9b2e 11885 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
44d10b1f
RW
11886 (build-system python-build-system)
11887 (arguments
11888 `(#:modules ((guix build utils)
11889 (guix build python-build-system)
11890 (srfi srfi-1)
11891 (srfi srfi-26)
11892 (ice-9 ftw))
11893 #:phases
11894 (modify-phases %standard-phases
11895 (add-before 'check 'set-cachedir
11896 ;; Tests require write access to $HOME by default
11897 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11898 (replace 'check
11899 (lambda _
11900 (let ((cwd (getcwd)))
11901 (setenv "PYTHONPATH"
11902 (string-append
11903 cwd "/build/"
11904 (find (cut string-prefix? "lib" <>)
11905 (scandir (string-append cwd "/build")))
11906 ":"
11907 (getenv "PYTHONPATH")))
11908 (invoke "pytest" "-v")))))))
11909 (native-inputs
11910 `(("python-hypothesis" ,python-hypothesis)
11911 ("python-pytest-cov" ,python-pytest-cov)
11912 ("python-pytest-mock" ,python-pytest-mock)
11913 ("python-pytest" ,python-pytest)))
11914 (propagated-inputs ; TODO: Add python-fastnumbers.
11915 `(("python-pyicu" ,python-pyicu)))
11916 (home-page "https://github.com/SethMMorton/natsort")
11917 (synopsis "Natural sorting for python and shell")
11918 (description
11919 "Natsort lets you apply natural sorting on lists instead of
11920lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11921on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11922@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11923@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11924identifies numbers and sorts them separately from strings. It can also sort
11925version numbers, real numbers, mixed types and more, and comes with a shell
11926command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11927 (license license:expat)
11928 (properties `((python2-variant . ,(delay python2-natsort))))))
11929
e3da9b2e 11930;; Natsort 6.x are the last versions with support for Python 2.
44d10b1f
RW
11931(define-public python2-natsort
11932 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11933 (package (inherit base)
e3da9b2e
MB
11934 (version "6.2.1")
11935 (source (origin
11936 (method url-fetch)
11937 (uri (pypi-uri "natsort" version))
11938 (sha256
11939 (base32
11940 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
44d10b1f
RW
11941 (native-inputs
11942 `(("python2-pathlib" ,python2-pathlib)
11943 ,@(package-native-inputs base))))))
11944
58d90274 11945(define-public glances
44d10b1f 11946 (package
58d90274 11947 (name "glances")
b8e777ef 11948 (version "3.1.4")
44d10b1f
RW
11949 (source
11950 (origin
11951 (method url-fetch)
11952 (uri (pypi-uri "Glances" version))
11953 (sha256
b8e777ef 11954 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
15b4c911
TGR
11955 (modules '((guix build utils)))
11956 (snippet
11957 '(begin
11958 ;; Glances phones PyPI for weekly update checks by default.
11959 ;; Disable these. The user can re-enable them if desired.
11960 (substitute* "glances/outdated.py"
11961 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11962 (string-append indentation
11963 "self.args.disable_check_update = True\n"
11964 line)))
11965 #t))))
44d10b1f
RW
11966 (build-system python-build-system)
11967 (propagated-inputs
9898a2d3
TGR
11968 `(("python-future" ,python-future)
11969 ("python-psutil" ,python-psutil)))
a4ac25df 11970 (home-page "https://github.com/nicolargo/glances")
bab94ffa 11971 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11972 (description
11973 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11974Glances uses the PsUtil library to get information from your system. It
11975monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11976 (license license:lgpl3+)))
11977
58d90274
TGR
11978(define-public python-glances
11979 (deprecated-package "python-glances" glances))
11980
44d10b1f
RW
11981(define-public python-graphql-core
11982 (package
11983 (name "python-graphql-core")
11984 (version "0.5.3")
11985 (source
11986 (origin
11987 (method url-fetch)
11988 (uri (pypi-uri "graphql-core" version))
11989 (sha256
11990 (base32
11991 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11992 (build-system python-build-system)
11993 (arguments
11994 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11995 #:phases
11996 (modify-phases %standard-phases
11997 (add-after 'unpack 'patch-hardcoded-version
11998 (lambda _ (substitute*
11999 "setup.py"
12000 (("'gevent==1.1rc1'") "'gevent'"))
12001 #t)))))
12002 (native-inputs
12003 `(("python-gevent" ,python-gevent)
12004 ("python-mock" ,python-mock)
12005 ("python-pytest-mock" ,python-pytest-mock)))
12006 (propagated-inputs
12007 `(("python-promise" ,python-promise)
12008 ("python-six" ,python-six)))
12009 (home-page "https://github.com/graphql-python/graphql-core")
12010 (synopsis "GraphQL implementation for Python")
12011 (description
12012 "GraphQL implementation for Python. GraphQL is a data query language and
12013runtime designed and used to request and deliver data to mobile and web apps.
12014This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12015to Python.")
12016 (license license:expat)))
12017
12018(define-public python2-graphql-core
12019 (package-with-python2 python-graphql-core))
12020
12021(define-public python-graphql-relay
12022 (package
12023 (name "python-graphql-relay")
12024 (version "0.4.5")
12025 (source
12026 (origin
12027 (method url-fetch)
12028 (uri (pypi-uri "graphql-relay" version))
12029 (sha256
12030 (base32
12031 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12032 (build-system python-build-system)
12033 (arguments
12034 '(#:tests? #f)) ; The tests are not distributed
12035 (propagated-inputs
12036 `(("python-graphql-core" ,python-graphql-core)
12037 ("python-promise" ,python-promise)
12038 ("python-six" ,python-six)))
12039 (home-page "https://github.com/graphql-python/graphql-relay-py")
12040 (synopsis "Relay implementation for Python")
12041 (description
12042 "This is a library to allow the easy creation of Relay-compliant servers
12043using the GraphQL Python reference implementation of a GraphQL server. It
12044should be noted that the code is a exact port of the original
12045@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12046from Facebook.")
12047 (license license:expat)))
12048
12049(define-public python2-graphql-relay
12050 (package-with-python2 python-graphql-relay))
12051
12052(define-public python-graphene
12053 (package
12054 (name "python-graphene")
12055 (version "0.10.2")
12056 (source
12057 (origin
12058 (method url-fetch)
12059 (uri (pypi-uri "graphene" version))
12060 (sha256
12061 (base32
12062 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12063 (build-system python-build-system)
12064 (propagated-inputs
12065 `(("python-graphql-core" ,python-graphql-core)
12066 ("python-graphql-relay" ,python-graphql-relay)
12067 ("python-iso8601" ,python-iso8601)
12068 ("python-promise" ,python-promise)
12069 ("python-six" ,python-six)))
12070 (arguments
12071 `(#:tests? #f)) ; no tests/ in the PyPI tarball
3dd74c8d 12072 (home-page "https://graphene-python.org/")
44d10b1f
RW
12073 (synopsis "GraphQL Framework for Python")
12074 (description
12075 "Graphene is a Python library for building GraphQL schemas/types.
12076A GraphQL schema describes your data model, and provides a GraphQL server
12077with an associated set of resolve methods that know how to fetch data.")
12078 (properties `((python2-variant . ,(delay python2-graphene))))
12079 (license license:expat)))
12080
12081(define-public python2-graphene
12082 (let ((base (package-with-python2
12083 (strip-python2-variant python-graphene))))
12084 (package (inherit base)
12085 (native-inputs
12086 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12087 ,@(package-native-inputs base))))))
12088
12089(define-public python-nautilus
12090 (package
12091 (name "python-nautilus")
12092 (version "0.4.9")
12093 (source
12094 (origin
12095 (method url-fetch)
12096 (uri (pypi-uri "nautilus" version))
12097 (sha256
12098 (base32
12099 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12100 (build-system python-build-system)
12101 (arguments `(#:tests? #f)) ; fails to import test modules
12102 (propagated-inputs
12103 `(("python-bcrypt" ,python-bcrypt)
12104 ("python-click" ,python-click)
12105 ("python-consul" ,python-consul)
12106 ("python-graphene" ,python-graphene)
12107 ("python-jinja2" ,python-jinja2)
12108 ("python-peewee" ,python-peewee)
12109 ("python-pika" ,python-pika)
12110 ("python-tornado" ,python-tornado)
12111 ("python-wtforms" ,python-wtforms)))
12112 (native-inputs
12113 `(("python-nose2" ,python-nose2)))
12114 (home-page "https://github.com/AlecAivazis/nautilus")
12115 (synopsis "Library for creating microservice applications")
12116 (description
12117 "Nautilus is a framework for flux based microservices that looks to
12118provide extendible implementations of common aspects of a cloud so that you can
12119focus on building massively scalable web applications.")
12120 (license license:expat)))
12121
12122(define-public python-snowballstemmer
12123 (package
12124 (name "python-snowballstemmer")
9b54d319 12125 (version "2.0.0")
44d10b1f
RW
12126 (source (origin
12127 (method url-fetch)
12128 (uri (pypi-uri "snowballstemmer" version))
12129 (sha256
12130 (base32
9b54d319 12131 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
44d10b1f
RW
12132 (build-system python-build-system)
12133 (arguments
12134 `(;; No tests exist
12135 #:tests? #f))
12136 (home-page "https://github.com/shibukawa/snowball_py")
12137 (synopsis "Snowball stemming library collection for Python")
12138 (description "This package provides 16 word stemmer algorithms generated
12139from Snowball algorithms. It includes the 15 original ones plus the Poerter
12140English stemmer.")
12141 (license license:bsd-3)))
12142
12143(define-public python2-snowballstemmer
12144 (package-with-python2 python-snowballstemmer))
12145
44d10b1f
RW
12146(define-public python-setproctitle
12147(package
12148 (name "python-setproctitle")
12149 (version "1.1.10")
12150 (source
12151 (origin
12152 (method url-fetch)
12153 (uri (pypi-uri "setproctitle" version))
12154 (sha256
12155 (base32
12156 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12157 (build-system python-build-system)
12158 (arguments
12159 '(#:phases
12160 (modify-phases %standard-phases
12161 (add-before 'check 'patch-Makefile
12162 ;; Stricly this is only required for the python2 variant.
12163 ;; But adding a phase in an inherited package seems to be
12164 ;; cumbersum. So we patch even for python3.
12165 (lambda _
12166 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12167 (when nose
12168 (substitute* "Makefile"
12169 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12170 (string-append nose "/bin/nosetests "))))
12171 #t)))
12172 (replace 'check
12173 (lambda _
12174 (setenv "PYTHON" (or (which "python3") (which "python")))
12175 (setenv "PYCONFIG" (or (which "python3-config")
12176 (which "python-config")))
12177 (setenv "CC" "gcc")
12178 ;; No need to extend PYTHONPATH to find the built package, since
12179 ;; the Makefile will build anyway
12180 (invoke "make" "check"))))))
12181 (native-inputs
12182 `(("procps" ,procps))) ; required for tests
12183 (home-page
12184 "https://github.com/dvarrazzo/py-setproctitle")
12185 (synopsis
12186 "Setproctitle implementation for Python to customize the process title")
12187 (description "The library allows a process to change its title (as displayed
12188by system tools such as ps and top).
12189
12190Changing the title is mostly useful in multi-process systems, for
12191example when a master process is forked: changing the children's title
12192allows to identify the task each process is busy with. The technique
12193is used by PostgreSQL and the OpenSSH Server for example.")
12194 (license license:bsd-3)
12195 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12196
12197(define-public python2-setproctitle
12198 (let ((base (package-with-python2
12199 (strip-python2-variant python-setproctitle))))
12200 (package
12201 (inherit base)
12202 (native-inputs `(("python2-nose" ,python2-nose)
12203 ,@(package-native-inputs base))))))
12204
12205(define-public python-validictory
12206 (package
12207 (name "python-validictory")
12208 (version "1.0.1")
12209 (source
12210 (origin
12211 (method url-fetch)
12212 (uri (pypi-uri "validictory" version))
12213 (sha256
12214 (base32
12215 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12216 (build-system python-build-system)
12217 (arguments
12218 '(#:phases
12219 (modify-phases %standard-phases
12220 (add-after 'unpack 'bootstrap
12221 ;; Move the tests out of the package directory to avoid
12222 ;; packaging them.
12223 (lambda* _
12224 (rename-file "validictory/tests" "tests")
12225 (delete-file "tests/__init__.py")))
12226 (replace 'check
12227 (lambda _
12228 ;; Extend PYTHONPATH so the built package will be found.
12229 (setenv "PYTHONPATH"
12230 (string-append (getcwd) "/build/lib:"
12231 (getenv "PYTHONPATH")))
6568bd5d 12232 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
12233 (native-inputs
12234 `(("python-pytest" ,python-pytest)))
12235 (home-page
12236 "https://github.com/jamesturk/validictory")
12237 (synopsis "General purpose Python data validator")
12238 (description "It allows validation of arbitrary Python data structures.
12239
12240The schema format is based on the JSON Schema
12241proposal (http://json-schema.org), so combined with json the library is also
12242useful as a validator for JSON data.")
12243 (license license:expat)))
12244
12245(define-public python2-validictory
12246 (package-with-python2 python-validictory))
12247
12248(define-public python-pyelftools
12249 (package
12250 (name "python-pyelftools")
12251 (version "0.25")
12252 (source
12253 (origin
12254 (method url-fetch)
12255 (uri (pypi-uri "pyelftools" version))
12256 (sha256
12257 (base32
12258 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
12259 (build-system python-build-system)
12260 (arguments
12261 `(#:phases
12262 (modify-phases %standard-phases
12263 (add-before 'check 'set-pythonpath
12264 (lambda _
12265 (setenv "PYTHONPATH"
12266 (string-append
12267 (getcwd) "/test/"
12268 ":" (getenv "PYTHONPATH")))
12269 #t)))))
12270 (home-page
12271 "https://github.com/eliben/pyelftools")
12272 (synopsis
12273 "Analyze binary and library file information")
12274 (description "This Python library provides interfaces for parsing and
12275analyzing two binary and library file formats; the Executable and Linking
12276Format (ELF), and debugging information in the Debugging With Attributed
12277Record Format (DWARF).")
12278 (license license:public-domain)))
12279
12280(define-public python-pyev
12281 (package
12282 (name "python-pyev")
12283 (version "0.9.0")
12284 (source
12285 (origin
12286 (method url-fetch)
12287 (uri (pypi-uri "pyev" version))
12288 (sha256
12289 (base32
12290 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12291 (build-system python-build-system)
12292 (arguments
12293 `(#:tests? #f ; no test suite
12294 #:phases
12295 (modify-phases %standard-phases
12296 (add-after 'unpack 'patch
12297 (lambda* (#:key inputs #:allow-other-keys)
12298 (let ((libev (string-append (assoc-ref inputs "libev")
12299 "/lib/libev.so.4")))
12300 (substitute* "setup.py"
12301 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12302 (string-append "libev_dll_name = \"" libev "\"")))))))))
12303 (inputs
12304 `(("libev" ,libev)))
12305 (home-page "http://pythonhosted.org/pyev/")
12306 (synopsis "Python libev interface")
12307 (description "Pyev provides a Python interface to libev.")
12308 (license license:gpl3)))
12309
12310(define-public python2-pyev
12311 (package-with-python2 python-pyev))
12312
12313(define-public python-imagesize
12314 (package
12315 (name "python-imagesize")
318c6a5a 12316 (version "1.2.0")
44d10b1f
RW
12317 (source
12318 (origin
12319 (method url-fetch)
12320 (uri (pypi-uri "imagesize" version))
12321 (sha256
12322 (base32
318c6a5a 12323 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
44d10b1f
RW
12324 (build-system python-build-system)
12325 (home-page "https://github.com/shibukawa/imagesize_py")
12326 (synopsis "Gets image size of files in various formats in Python")
12327 (description
12328 "This package allows determination of image size from
12329PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12330 (license license:expat)))
12331
12332(define-public python2-imagesize
12333 (package-with-python2 python-imagesize))
12334
12335(define-public python-termstyle
12336 (package
12337 (name "python-termstyle")
12338 (version "0.1.11")
12339 (source
12340 (origin
12341 (method url-fetch)
12342 (uri (pypi-uri "termstyle" version))
12343 (sha256
12344 (base32
12345 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12346 (build-system python-build-system)
12347 (arguments
12348 '(#:phases
12349 (modify-phases %standard-phases
12350 (replace 'check
12351 (lambda _
831080a6 12352 (invoke "python" "test3.py"))))))
44d10b1f
RW
12353 (home-page "https://github.com/gfxmonk/termstyle")
12354 (synopsis "Console text coloring for Python")
12355 (description "This package provides console text coloring for Python.")
12356 (license license:bsd-3)))
12357
12358(define-public python-argcomplete
12359 (package
12360 (name "python-argcomplete")
98aecd3a 12361 (version "1.10.3")
44d10b1f 12362 (source
98aecd3a
RW
12363 (origin
12364 (method url-fetch)
12365 (uri (pypi-uri "argcomplete" version))
12366 (sha256
12367 (base32
12368 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
44d10b1f 12369 (build-system python-build-system)
98aecd3a
RW
12370 (arguments
12371 `(#:phases
12372 (modify-phases %standard-phases
12373 (add-after 'unpack 'embed-tool-references
12374 (lambda _
12375 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
12376 ((" grep")
12377 (string-append " " (which "grep")))
12378 ((" egrep")
12379 (string-append " " (which "egrep")))
12380 (("elif which")
12381 (string-append "elif " (which "which")))
12382 (("\\$\\(which")
12383 (string-append "$(" (which "which"))))
12384 #t)))))
12385 (inputs
12386 `(("grep" ,grep)
12387 ("which" ,which)))
44d10b1f 12388 (native-inputs
98aecd3a
RW
12389 `(("python-coverage" ,python-coverage)
12390 ("python-flake8" ,python-flake8)
12391 ("python-pexpect" ,python-pexpect)
12392 ("python-wheel" ,python-wheel)
44d10b1f 12393 ("tcsh" ,tcsh)
98aecd3a
RW
12394 ("fish" ,fish)
12395 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
44d10b1f
RW
12396 (home-page "https://github.com/kislyuk/argcomplete")
12397 (synopsis "Shell tab completion for Python argparse")
12398 (description "argcomplete provides extensible command line tab completion
12399of arguments and options for Python scripts using @code{argparse}. It's
12400particularly useful for programs with many options or sub-parsers that can
12401dynamically suggest completions; for example, when browsing resources over the
12402network.")
12403 (license license:asl2.0)))
12404
12405(define-public python2-argcomplete
12406 (package-with-python2 python-argcomplete))
12407
12408(define-public python-xopen
12409 (package
12410 (name "python-xopen")
24d64989 12411 (version "0.5.0")
44d10b1f
RW
12412 (source
12413 (origin
12414 (method url-fetch)
12415 (uri (pypi-uri "xopen" version))
12416 (sha256
12417 (base32
24d64989 12418 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 12419 (build-system python-build-system)
24d64989
RW
12420 (propagated-inputs
12421 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
12422 (home-page "https://github.com/marcelm/xopen/")
12423 (synopsis "Open compressed files transparently")
12424 (description "This module provides an @code{xopen} function that works like
12425Python's built-in @code{open} function, but can also deal with compressed files.
12426Supported compression formats are gzip, bzip2 and, xz, and are automatically
12427recognized by their file extensions. The focus is on being as efficient as
12428possible on all supported Python versions.")
12429 (license license:expat)))
12430
12431(define-public python2-xopen
12432 (let ((base (package-with-python2
12433 (strip-python2-variant python-xopen))))
12434 (package
12435 (inherit base)
12436 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
12437 ,@(package-propagated-inputs base))))))
12438
12439(define-public python-cheetah
12440 (package
12441 (name "python-cheetah")
12442 (version "3.1.0")
12443 (source
12444 (origin
12445 (method url-fetch)
12446 (uri (pypi-uri "Cheetah3" version))
12447 (sha256
12448 (base32
12449 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
12450 (build-system python-build-system)
12451 (arguments
12452 `(#:modules ((guix build utils)
12453 (guix build python-build-system)
12454 (ice-9 ftw)
12455 (srfi srfi-1)
12456 (srfi srfi-26))
12457 #:phases (modify-phases %standard-phases
12458 (add-after 'unpack 'use-absolute-python
12459 (lambda _
12460 (substitute* "Cheetah/CheetahWrapper.py"
12461 (("#!/usr/bin/env python")
12462 (string-append "#!" (which "python"))))
12463 #t))
12464 (replace 'check
12465 (lambda _
12466 (let ((cwd (getcwd)))
12467 (setenv "PYTHONPATH"
12468 (string-append
12469 cwd "/build/"
12470 (find (cut string-prefix? "lib" <>)
12471 (scandir (string-append cwd "/build")))
12472 ":" (getenv "PYTHONPATH")))
12473 (setenv "PATH"
12474 (string-append (getenv "PATH")
12475 ":" cwd "/bin"))
12476 (setenv "TMPDIR" "/tmp")
12477
12478 (substitute* "Cheetah/Tests/Test.py"
12479 (("unittest.TextTestRunner\\(\\)")
12480 "unittest.TextTestRunner(verbosity=2)"))
12481
12482 (invoke "python" "Cheetah/Tests/Test.py")))))))
12483 (propagated-inputs
12484 `(("python-markdown" ,python-markdown))) ;optional
12485 (home-page "http://cheetahtemplate.org/")
12486 (synopsis "Template engine")
12487 (description "Cheetah is a text-based template engine and Python code
12488generator.
12489
12490Cheetah can be used as a standalone templating utility or referenced as
12491a library from other Python applications. It has many potential uses,
12492but web developers looking for a viable alternative to ASP, JSP, PHP and
12493PSP are expected to be its principle user group.
12494
12495Features:
12496@enumerate
12497@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12498 text-based format.
12499@item Cleanly separates content, graphic design, and program code.
12500@item Blends the power and flexibility of Python with a simple template language
12501 that non-programmers can understand.
12502@item Gives template writers full access to any Python data structure, module,
12503 function, object, or method in their templates.
12504@item Makes code reuse easy by providing an object-orientated interface to
12505 templates that is accessible from Python code or other Cheetah templates.
12506 One template can subclass another and selectively reimplement sections of it.
12507@item Provides a simple, yet powerful, caching mechanism that can dramatically
12508 improve the performance of a dynamic website.
12509@item Compiles templates into optimized, yet readable, Python code.
12510@end enumerate")
12511 (license (license:x11-style "file://LICENSE"))))
12512
12513(define-public python2-cheetah
12514 (package-with-python2 python-cheetah))
12515
12516(define-public python-dulwich
12517 (package
12518 (name "python-dulwich")
12519 (version "0.18.6")
12520 (source
12521 (origin
12522 (method url-fetch)
12523 (uri (list (string-append "https://www.dulwich.io/releases/"
12524 "dulwich-" version ".tar.gz")
12525 (pypi-uri "dulwich" version)))
12526 (sha256
12527 (base32
12528 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12529 (build-system python-build-system)
12530 (arguments
12531 `(#:phases
12532 (modify-phases %standard-phases
12533 (add-before 'check 'fix-tests
12534 (lambda* (#:key inputs #:allow-other-keys)
12535 ;; The tests use Popen with a custom environment which doesn't
12536 ;; include PATH.
12537 (substitute* "dulwich/tests/compat/utils.py"
12538 (("'git'") (string-append "'"
12539 (which "git")
12540 "'")))
12541 (substitute* '("dulwich/tests/test_repository.py"
12542 "dulwich/tests/test_hooks.py")
12543 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12544 (setenv "TEST_RUNNER" "unittest")
12545 (setenv "PYTHONHASHSEED" "random")
12546 #t)))))
12547 (propagated-inputs
12548 `(("python-fastimport" ,python-fastimport)))
12549 (native-inputs
12550 `(("python-mock" ,python-mock)
12551 ("python-geventhttpclient" ,python-geventhttpclient)
12552 ("git" ,git)))
12553 (home-page "https://www.dulwich.io/")
12554 (synopsis "Git implementation in Python")
12555 (description "Dulwich is an implementation of the Git file formats and
12556protocols written in pure Python.")
12557 ;; Can be used with either license.
12558 (license (list license:asl2.0 license:gpl2+))))
12559
12560(define-public python2-dulwich
12561 (package-with-python2 python-dulwich))
12562
12563(define-public python-pbkdf2
12564 (package
12565 (name "python-pbkdf2")
12566 (version "1.3")
12567 (source
12568 (origin
12569 (method url-fetch)
12570 (uri (pypi-uri "pbkdf2" version))
12571 (sha256
12572 (base32
12573 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12574 (build-system python-build-system)
12575 (arguments
12576 '(#:phases
12577 (modify-phases %standard-phases
12578 (replace 'check
12579 (lambda _
12580 (setenv "PYTHONPATH"
12581 (string-append (getcwd) "/build/lib:"
12582 (getenv "PYTHONPATH")))
ee2bb944 12583 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
12584 (propagated-inputs
12585 `(("python-pycrypto" ,python-pycrypto))) ; optional
12586 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12587 (synopsis "Password-based key derivation")
12588 (description "This module implements the password-based key derivation
12589function, PBKDF2, specified in RSA PKCS#5 v2.0.
12590
12591PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12592is part of the RSA Public Key Cryptography Standards series. The provided
12593implementation takes a password or a passphrase and a salt value (and
12594optionally a iteration count, a digest module, and a MAC module) and provides
12595a file-like object from which an arbitrarly-sized key can be read.")
12596 (license license:expat)))
12597
12598(define-public python2-pbkdf2
12599 (package-with-python2 python-pbkdf2))
12600
12601(define-public python-qrcode
12602 (package
12603 (name "python-qrcode")
217ea1a1 12604 (version "6.1")
44d10b1f
RW
12605 (source
12606 (origin
12607 (method url-fetch)
12608 (uri (pypi-uri "qrcode" version))
12609 (sha256
217ea1a1 12610 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12611 (build-system python-build-system)
12612 (arguments
12613 ;; FIXME: Tests require packaging 'pymaging'.
12614 '(#:tests? #f))
12615 (propagated-inputs
12616 `(("python-lxml" ,python-lxml) ; for SVG output
12617 ("python-pillow" ,python-pillow) ; for PNG output
12618 ("python-six" ,python-six)))
44d10b1f
RW
12619 (home-page "https://github.com/lincolnloop/python-qrcode")
12620 (synopsis "QR Code image generator")
12621 (description "This package provides a pure Python QR Code generator
12622module. It uses the Python Imaging Library (PIL) to allow for the generation
12623of QR Codes.
12624
12625In addition this package provides a command line tool to generate QR codes and
12626either write these QR codes to a file or do the output as ascii art at the
12627console.")
12628 (license license:bsd-3)))
12629
12630(define-public python2-qrcode
12631 (package-with-python2 python-qrcode))
12632
12633(define-public python-rst2ansi
12634 (package
12635 (name "python-rst2ansi")
12636 (version "0.1.5")
12637 (source
12638 (origin
12639 (method url-fetch)
12640 (uri (pypi-uri "rst2ansi" version))
12641 (sha256
12642 (base32
12643 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12644 (build-system python-build-system)
12645 (propagated-inputs
12646 `(("python-docutils" ,python-docutils)))
12647 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12648 (synopsis "Convert RST to ANSI-decorated console output")
12649 (description
12650 "Python module dedicated to rendering RST (reStructuredText) documents
12651to ansi-escaped strings suitable for display in a terminal.")
12652 (license license:expat)))
12653
12654(define-public python-ansi2html
12655 (package
12656 (name "python-ansi2html")
12657 (version "1.2.0")
12658 (source
12659 (origin
12660 (method url-fetch)
12661 (uri (pypi-uri "ansi2html" version))
12662 (sha256
12663 (base32
12664 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12665 (build-system python-build-system)
12666 (native-inputs
12667 `(("python-mock" ,python-mock)
12668 ("python-nose" ,python-nose)))
12669 (propagated-inputs
12670 `(("python-six" ,python-six)))
12671 (home-page "https://github.com/ralphbean/ansi2html")
12672 (synopsis "Convert ANSI-decorated console output to HTML")
12673 (description
12674 "@command{ansi2html} is a Python library and command line utility for
12675convering text with ANSI color codes to HTML or LaTeX.")
12676 (license license:gpl3+)))
12677
12678(define-public python2-ansi2html
12679 (package-with-python2 python-ansi2html))
12680
12681(define-public python-ddt
12682 (package
12683 (name "python-ddt")
12684 (version "1.1.3")
12685 (source
12686 (origin
12687 (method url-fetch)
12688 (uri (pypi-uri "ddt" version))
12689 (sha256
12690 (base32
12691 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12692 (build-system python-build-system)
12693 (native-inputs
12694 `(("python-mock" ,python-mock)
12695 ("python-nose" ,python-nose)))
12696 (propagated-inputs
12697 `(("python-six" ,python-six)
12698 ("python-pyyaml" ,python-pyyaml)))
12699 (home-page "https://github.com/txels/ddt")
12700 (synopsis "Data-Driven Tests")
12701 (description
12702 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12703running it with different test data, and make it appear as multiple test
12704cases.")
12705 (license license:expat)))
12706
12707(define-public python2-ddt
12708 (package-with-python2 python-ddt))
12709
12710(define-public python-pycountry
12711 (package
12712 (name "python-pycountry")
12713 (version "18.5.26")
12714 (source
12715 (origin
12716 (method url-fetch)
12717 (uri (pypi-uri "pycountry" version))
12718 (sha256
12719 (base32
12720 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12721 (build-system python-build-system)
12722 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12723 (synopsis "ISO databases for languages, countries, currencies, etc.")
12724 (description
12725 "@code{pycountry} provides the ISO databases for the standards:
12726@enumerate
12727@item 639-3 (Languages)
12728@item 3166 (Countries)
12729@item 3166-3 (Deleted Countries)
12730@item 3166-2 (Subdivisions of countries)
12731@item 4217 (Currencies)
12732@item 15924 (Scripts)
12733@end enumerate
12734It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12735through a Python API.")
12736 (license license:lgpl2.1+)))
12737
12738(define-public python2-pycountry
12739 (package-with-python2 python-pycountry))
12740
12741(define-public python-pycosat
12742 (package
12743 (name "python-pycosat")
12744 (version "0.6.1")
12745 (source
12746 (origin
12747 (method url-fetch)
12748 (uri (pypi-uri "pycosat" version))
12749 (sha256
12750 (base32
12751 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12752 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12753 (build-system python-build-system)
12754 (home-page "https://github.com/ContinuumIO/pycosat")
12755 (synopsis "Bindings to picosat (a SAT solver)")
12756 (description
12757 "This package provides efficient Python bindings to @code{picosat} on
12758the C level. When importing pycosat, the @code{picosat} solver becomes part
12759of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12760Problem} (SAT) solver.")
12761 (license license:expat)))
12762
12763(define-public python2-pycosat
12764 (package-with-python2 python-pycosat))
12765
12766(define-public python2-ruamel.ordereddict
12767 (package
12768 (name "python2-ruamel.ordereddict")
12769 (version "0.4.9")
12770 (source
12771 (origin
12772 (method url-fetch)
12773 (uri (pypi-uri "ruamel.ordereddict" version))
12774 (sha256
12775 (base32
12776 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12777 (build-system python-build-system)
12778 (arguments
12779 `(#:python ,python-2
12780 #:phases
12781 (modify-phases %standard-phases
12782 (delete 'check)
12783 (add-after 'install 'check
12784 (lambda* (#:key inputs outputs #:allow-other-keys)
12785 (add-installed-pythonpath inputs outputs)
f987ac30 12786 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12787 (home-page "https://bitbucket.org/ruamel/ordereddict")
12788 (synopsis "Version of dict that keeps keys in insertion order")
12789 (description
12790 "This is an implementation of an ordered dictionary with @dfn{Key
12791Insertion Order} (KIO: updates of values do not affect the position of the
12792key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12793removed and put at the back). The standard library module @code{OrderedDict},
12794implemented later, implements a subset of @code{ordereddict} functionality.
12795Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12796Order} (KSO, no sorting function can be specified, but a transform can be
12797specified to apply on the key before comparison (e.g. @code{string.lower})).")
12798 (license license:expat)))
12799
12800(define-public python-pypeg2
12801 (package
12802 (name "python-pypeg2")
12803 (version "2.15.2")
12804 (source
12805 (origin
12806 (method url-fetch)
12807 (uri (pypi-uri "pyPEG2" version))
12808 (sha256
12809 (base32
12810 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12811 (build-system python-build-system)
12812 (propagated-inputs `(("python-lxml" ,python-lxml)))
12813 (arguments
12814 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12815 '(#:tests? #f))
12816 (home-page "https://fdik.org/pyPEG/")
12817 (synopsis "Parsering Expression Grammars in Python")
12818 (description "PyPEG is an intrinsic parser interpreter framework for
12819Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12820parse many formal languages.")
12821 (license license:gpl2)))
12822
12823(define-public python-incremental
12824 (package
12825 (name "python-incremental")
12826 (version "17.5.0")
12827 (source
12828 (origin
12829 (method url-fetch)
12830 (uri (pypi-uri "incremental" version))
12831 (sha256
12832 (base32
12833 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12834 (build-system python-build-system)
12835 (home-page "https://github.com/hawkowl/incremental")
12836 (synopsis "Library for versioning Python projects")
12837 (description "Incremental is a small library that versions your Python
12838projects.")
12839 (license license:expat)))
12840
12841(define-public python2-incremental
12842 (package-with-python2 python-incremental))
12843
12844(define-public python-invoke
12845 (package
12846 (name "python-invoke")
b5544cb4 12847 (home-page "https://www.pyinvoke.org/")
a5662319 12848 (version "1.3.0")
44d10b1f
RW
12849 (source (origin
12850 (method url-fetch)
12851 (uri (pypi-uri "invoke" version))
12852 (sha256
12853 (base32
a5662319 12854 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
12855 (build-system python-build-system)
12856 (arguments
12857 ;; XXX: Requires many dependencies that are not yet in Guix.
12858 `(#:tests? #f))
12859 (synopsis "Pythonic task execution")
12860 (description
12861 "Invoke is a Python task execution tool and library, drawing inspiration
12862from various sources to arrive at a powerful and clean feature set. It is
12863evolved from the Fabric project, but focuses on local and abstract concerns
12864instead of servers and network commands.")
12865 (license license:bsd-3)))
12866
12867(define-public python2-invoke
12868 (package-with-python2 python-invoke))
12869
12870(define-public python-automat
12871 (package
12872 (name "python-automat")
919d80a0 12873 (version "0.7.0")
44d10b1f
RW
12874 (source (origin
12875 (method url-fetch)
12876 (uri (pypi-uri "Automat" version))
12877 (sha256
12878 (base32
919d80a0 12879 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12880 (build-system python-build-system)
12881 ;; We disable the tests because they require python-twisted, while
12882 ;; python-twisted depends on python-automat. Twisted is optional, but the
12883 ;; tests fail if it is not available. Also see
12884 ;; <https://github.com/glyph/automat/issues/71>.
12885 (arguments '(#:tests? #f))
12886 (native-inputs
12887 `(("python-m2r" ,python-m2r)
12888 ("python-setuptools-scm" ,python-setuptools-scm)
12889 ("python-graphviz" ,python-graphviz)))
12890 (propagated-inputs
12891 `(("python-six" ,python-six)
12892 ("python-attrs" ,python-attrs)))
12893 (home-page "https://github.com/glyph/Automat")
12894 (synopsis "Self-service finite-state machines")
12895 (description "Automat is a library for concise, idiomatic Python
12896expression of finite-state automata (particularly deterministic finite-state
12897transducers).")
12898 (license license:expat)))
12899
12900(define-public python2-automat
12901 (package-with-python2 python-automat))
12902
12903(define-public python-m2r
12904 (package
12905 (name "python-m2r")
bcfb8fac 12906 (version "0.2.1")
44d10b1f
RW
12907 (source (origin
12908 (method url-fetch)
12909 (uri (pypi-uri "m2r" version))
12910 (sha256
12911 (base32
bcfb8fac 12912 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12913 (build-system python-build-system)
12914 (propagated-inputs
12915 `(("python-docutils" ,python-docutils)
12916 ("python-mistune" ,python-mistune)))
12917 (native-inputs
12918 `(("python-pygments" ,python-pygments)
12919 ("python-mock" ,python-mock)))
12920 (home-page "https://github.com/miyakogi/m2r")
12921 (synopsis "Markdown to reStructuredText converter")
12922 (description "M2R converts a markdown file including reST markups to valid
12923reST format.")
12924 (license license:expat)))
12925
12926(define-public python2-m2r
12927 (package-with-python2 python-m2r))
12928
12929(define-public python-constantly
12930 (package
12931 (name "python-constantly")
12932 (version "15.1.0")
12933 (source (origin
12934 (method url-fetch)
12935 (uri (pypi-uri "constantly" version))
12936 (sha256
12937 (base32
12938 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12939 (build-system python-build-system)
12940 (home-page "https://github.com/twisted/constantly")
12941 (synopsis "Symbolic constants in Python")
12942 (description "Constantly is a Python library that provides symbolic
12943constant support. It includes collections and constants with text, numeric,
12944and bit flag values.")
12945 (license license:expat)))
12946
12947(define-public python2-constantly
12948 (package-with-python2 python-constantly))
12949
12950(define-public python-attrs
12951 (package
12952 (name "python-attrs")
c41d5144 12953 (version "19.1.0")
44d10b1f
RW
12954 (source (origin
12955 (method url-fetch)
12956 (uri (pypi-uri "attrs" version))
12957 (sha256
12958 (base32
c41d5144 12959 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12960 (build-system python-build-system)
12961 (arguments
12962 `(#:modules ((guix build utils)
12963 (guix build python-build-system)
12964 (ice-9 ftw)
12965 (srfi srfi-1)
12966 (srfi srfi-26))
12967 #:phases (modify-phases %standard-phases
12968 (replace 'check
12969 (lambda _
12970 (let ((cwd (getcwd)))
12971 (setenv "PYTHONPATH"
12972 (string-append
12973 cwd "/build/"
12974 (find (cut string-prefix? "lib" <>)
12975 (scandir (string-append cwd "/build")))
12976 ":"
12977 (getenv "PYTHONPATH")))
12978 (invoke "python" "-m" "pytest")))))))
12979 (native-inputs
12980 `(("python-coverage" ,python-coverage)
12981 ("python-hypothesis" ,python-hypothesis)
12982 ("python-pympler" ,python-pympler)
12983 ("python-pytest" ,python-pytest)
12984 ("python-six" ,python-six)
12985 ("python-sphinx" ,python-sphinx)
12986 ("python-zope-interface" ,python-zope-interface)))
12987 (home-page "https://github.com/python-attrs/attrs/")
12988 (synopsis "Attributes without boilerplate")
12989 (description "@code{attrs} is a Python package with class decorators that
12990ease the chores of implementing the most common attribute-related object
12991protocols.")
12992 (license license:expat)))
12993
12994(define-public python2-attrs
12995 (package-with-python2 python-attrs))
12996
12997(define-public python-attrs-bootstrap
12998 (package
12999 (inherit python-attrs)
13000 (name "python-attrs-bootstrap")
44d10b1f
RW
13001 (native-inputs `())
13002 (arguments `(#:tests? #f))))
13003
13004(define-public python2-attrs-bootstrap
13005 (package-with-python2 python-attrs-bootstrap))
13006
13007(define-public python2-cliapp
13008 (package
13009 (name "python2-cliapp")
9064b84e 13010 (version "1.20180812.1")
44d10b1f
RW
13011 (source
13012 (origin
13013 (method url-fetch)
13014 (uri (string-append
13015 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13016 version ".tar.gz"))
13017 (sha256
13018 (base32
9064b84e 13019 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
13020 (build-system python-build-system)
13021 (arguments
13022 `(#:python ,python-2
13023 #:phases
13024 (modify-phases %standard-phases
13025 ;; check phase needs to be run before the build phase. If not,
13026 ;; coverage-test-runner looks for tests for the built source files,
13027 ;; and fails.
13028 (delete 'check)
13029 (add-before 'build 'check
13030 (lambda _
13031 ;; Disable python3 tests
13032 (substitute* "check"
13033 (("python3") "# python3"))
6c826d32 13034 (invoke "./check"))))))
44d10b1f
RW
13035 (native-inputs
13036 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13037 ("python2-pep8" ,python2-pep8)))
13038 (propagated-inputs
13039 `(("python2-pyaml" ,python2-pyaml)))
13040 (home-page "https://liw.fi/cliapp/")
13041 (synopsis "Python framework for command line programs")
13042 (description "@code{python2-cliapp} is a python framework for
13043command line programs. It contains the typical stuff such programs
13044need to do, such as parsing the command line for options, and
13045iterating over input files.")
13046 (license license:gpl2+)))
13047
13048(define-public python2-ttystatus
13049 (package
13050 (name "python2-ttystatus")
e516a9c2 13051 (version "0.36")
44d10b1f
RW
13052 (source
13053 (origin
13054 (method url-fetch)
13055 (uri (string-append
13056 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13057 version ".tar.gz"))
13058 (sha256
13059 (base32
e516a9c2 13060 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
13061 (build-system python-build-system)
13062 (native-inputs
13063 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13064 ("python2-pep8" ,python2-pep8)))
13065 (arguments
13066 `(#:python ,python-2
13067 #:phases
13068 (modify-phases %standard-phases
13069 ;; check phase needs to be run before the build phase. If not,
13070 ;; coverage-test-runner looks for tests for the built source files,
13071 ;; and fails.
13072 (delete 'check)
13073 (add-before 'build 'check
cbeee881 13074 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
13075 (home-page "https://liw.fi/ttystatus/")
13076 (synopsis "Python library for showing progress reporting and
13077status updates on terminals")
13078 (description "@code{python2-ttystatus} is a python library for
13079showing progress reporting and status updates on terminals, for
13080command line programs. Output is automatically adapted to the width
13081of the terminal: truncated if it does not fit, and resized if the
13082terminal size changes.")
13083 (license license:gpl3+)))
13084
13085(define-public python2-tracing
13086 (package
13087 (name "python2-tracing")
13088 (version "0.10")
13089 (source
13090 (origin
13091 (method url-fetch)
13092 (uri (string-append
13093 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13094 version ".tar.gz"))
13095 (sha256
13096 (base32
13097 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13098 (build-system python-build-system)
13099 (arguments
13100 `(#:python ,python-2))
13101 (home-page "https://liw.fi/tracing/")
13102 (synopsis "Python debug logging helper")
13103 (description "@code{python2-tracing} is a python library for
13104logging debug messages. It provides a way to turn debugging messages
13105on and off, based on the filename they occur in. It is much faster
13106than using @code{logging.Filter} to accomplish the same thing, which
13107matters when code is run in production mode. The actual logging still
13108happens using the @code{logging} library.")
13109 (license license:gpl3+)))
13110
13111(define-public python2-larch
13112 (package
13113 (name "python2-larch")
13114 (version "1.20151025")
13115 (source
13116 (origin
13117 (method url-fetch)
13118 (uri (string-append
13119 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13120 version ".tar.gz"))
13121 (patches (search-patches
13122 "python2-larch-coverage-4.0a6-compatibility.patch"))
13123 (sha256
13124 (base32
13125 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13126 (build-system python-build-system)
13127 (arguments
13128 `(#:python ,python-2
13129 #:phases
13130 (modify-phases %standard-phases
13131 ;; check phase needs to be run before the build phase. If not,
13132 ;; coverage-test-runner looks for tests for the built source files,
13133 ;; and fails.
13134 (delete 'check)
13135 (add-before 'build 'check
204ad455 13136 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
13137 (native-inputs
13138 `(("cmdtest" ,cmdtest)
13139 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
13140 (propagated-inputs
13141 `(("python2-tracing" ,python2-tracing)))
13142 (home-page "https://liw.fi/larch/")
13143 (synopsis "Python copy-on-write B-tree library")
13144 (description "@code{python2-larch} is an implementation of
13145particular kind of B-tree, based on research by Ohad Rodeh. See
13146@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13147on the data structure.
13148
13149The distinctive feature of this B-tree is that a node is never
13150(conceptually) modified. Instead, all updates are done by
13151copy-on-write. This makes it easy to clone a tree, and modify only the
13152clone, while other processes access the original tree.")
13153 (license license:gpl3+)))
13154
13155(define-public python-astroid
13156 (package
13157 (name "python-astroid")
1c43c698 13158 (version "2.3.3")
44d10b1f
RW
13159 (source
13160 (origin
13161 (method url-fetch)
13162 (uri (pypi-uri "astroid" version))
13163 (sha256
1c43c698 13164 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
13165 (build-system python-build-system)
13166 (propagated-inputs
13167 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13168 ("python-six" ,python-six)
f0935460 13169 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
13170 ("python-wrapt" ,python-wrapt)))
13171 (native-inputs
13172 `(("python-dateutil" ,python-dateutil)
13173 ("python-nose" ,python-nose)
13174 ("python-pytest" ,python-pytest)
13175 ("python-pytest-runner" ,python-pytest-runner)))
13176 (arguments
13177 `(#:phases
13178 (modify-phases %standard-phases
13179 (add-after 'unpack 'remove-spurious-test
13180 (lambda _
13181 ;; This can be removed after upgrading from python-3.7
13182 ;; https://github.com/PyCQA/astroid/issues/593
13183 ;; https://bugs.python.org/issue34056
13184 (delete-file "astroid/tests/unittest_modutils.py")
13185 #t))
13186 (replace 'check
13187 (lambda _
13188 (invoke "pytest" "astroid"))))))
13189 (home-page "https://github.com/PyCQA/astroid")
13190 (synopsis "Common base representation of python source code for pylint and
13191other projects")
13192 (description "@code{python-astroid} provides a common base representation
13193of python source code for projects such as pychecker, pyreverse, pylint, etc.
13194
13195It provides a compatible representation which comes from the _ast module. It
13196rebuilds the tree generated by the builtin _ast module by recursively walking
13197down the AST and building an extended ast. The new node classes have
13198additional methods and attributes for different usages. They include some
13199support for static inference and local name scopes. Furthermore, astroid
13200builds partial trees by inspecting living objects.")
13201 (license license:lgpl2.1+)
13202 (properties `((python2-variant . ,(delay python2-astroid))))))
13203
13204(define-public python2-astroid
13205 (let ((base (package-with-python2
13206 (strip-python2-variant python-astroid))))
13207 (package (inherit base)
13208 ;; Version 2.x removes python2 support.
13209 (version "1.6.5")
13210 (source
13211 (origin
13212 (method url-fetch)
13213 (uri (pypi-uri "astroid" version))
13214 (sha256
13215 (base32
13216 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
13217 (arguments
13218 (substitute-keyword-arguments (package-arguments base)
13219 ((#:phases phases)
13220 `(modify-phases ,phases
13221 (add-after 'unpack 'remove-spurious-test
13222 (lambda _
13223 ;; https://github.com/PyCQA/astroid/issues/276
13224 (delete-file "astroid/tests/unittest_brain.py")
13225 #t))
13226 (replace 'check
13227 (lambda _
13228 (invoke"python" "-m" "unittest" "discover"
13229 "-p" "unittest*.py")))))))
13230 (native-inputs `())
13231 (propagated-inputs
13232 `(("python2-backports-functools-lru-cache"
13233 ,python2-backports-functools-lru-cache)
13234 ("python2-enum34" ,python2-enum34)
13235 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
13236 ,@(alist-delete "python-typed-ast"
13237 (package-propagated-inputs base)))))))
44d10b1f
RW
13238
13239(define-public python-isort
13240 (package
13241 (name "python-isort")
e2227b6a 13242 (version "4.3.4")
44d10b1f
RW
13243 (source
13244 (origin
e2227b6a
EF
13245 (method git-fetch)
13246 (uri (git-reference
13247 ;; Tests pass only from the Github sources
13248 (url "https://github.com/timothycrosley/isort")
13249 (commit version)))
13250 (file-name (git-file-name name version))
44d10b1f
RW
13251 (sha256
13252 (base32
e2227b6a 13253 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
13254 (build-system python-build-system)
13255 (native-inputs
13256 `(("python-mock" ,python-mock)
13257 ("python-pytest" ,python-pytest)))
13258 (home-page "https://github.com/timothycrosley/isort")
13259 (synopsis "Python utility/library to sort python imports")
13260 (description "@code{python-isort} is a python utility/library to sort
13261imports alphabetically, and automatically separated into sections. It
13262provides a command line utility, a python library and plugins for various
13263editors.")
e2227b6a
EF
13264 (license license:expat)
13265 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
13266
13267(define-public python2-isort
e2227b6a
EF
13268 (let ((base (package-with-python2
13269 (strip-python2-variant python-isort))))
13270 (package (inherit base)
13271 (native-inputs
13272 `(("python2-futures" ,python2-futures)
13273 ,@(package-native-inputs base))))))
44d10b1f
RW
13274
13275(define-public python2-backports-functools-lru-cache
13276 (package
13277 (name "python2-backports-functools-lru-cache")
13278 (version "1.5")
13279 (source
13280 (origin
13281 (method url-fetch)
13282 ;; only the pypi tarballs contain the necessary metadata
13283 (uri (pypi-uri "backports.functools_lru_cache" version))
13284 (sha256
13285 (base32
13286 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
13287 (build-system python-build-system)
13288 (native-inputs
13289 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13290 (arguments
13291 `(#:python ,python-2))
13292 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13293 (synopsis "Backport of functools.lru_cache from Python 3.3")
13294 (description "@code{python2-backports-functools-lru-cache} is a backport
13295of @code{functools.lru_cache} from python 3.3.")
13296 (license license:expat)))
13297
13298(define-public python-configparser
13299 (package
13300 (name "python-configparser")
84127f8c 13301 (version "3.7.1")
44d10b1f
RW
13302 (source
13303 (origin
13304 (method url-fetch)
84127f8c 13305 (uri (pypi-uri "configparser" version))
44d10b1f
RW
13306 (sha256
13307 (base32
84127f8c 13308 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 13309 (build-system python-build-system)
809f003f 13310 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
13311 (synopsis "Backport of configparser from python 3.5")
13312 (description "@code{python-configparser} is a backport of
13313@code{configparser} from Python 3.5 so that it can be used directly
13314in other versions.")
13315 (license license:expat)))
13316
13317(define-public python2-configparser
13318 (package-with-python2 python-configparser))
13319
13320(define-public python-mando
13321 (package
13322 (name "python-mando")
13323 (version "0.6.4")
13324 (source (origin
13325 (method url-fetch)
13326 (uri (pypi-uri "mando" version))
13327 (sha256
13328 (base32
13329 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
13330 (build-system python-build-system)
13331 (propagated-inputs
13332 `(("python-rst2ansi" ,python-rst2ansi)
13333 ("python-six" ,python-six)))
13334 (native-inputs
13335 `(("python-pytest" ,python-pytest)))
13336 (home-page "https://mando.readthedocs.org/")
13337 (synopsis
13338 "Wrapper around argparse, allowing creation of complete CLI applications")
13339 (description
13340 "This package is a wrapper around argparse, allowing you to write complete CLI
13341applications in seconds while maintaining all the flexibility.")
13342 (license license:expat)))
13343
13344(define-public python2-mando
13345 (package-with-python2 python-mando))
13346
70daf82f
RW
13347(define-public python2-argparse
13348 (package
13349 (name "python2-argparse")
13350 (version "1.4.0")
13351 (source
13352 (origin
13353 (method url-fetch)
13354 (uri (pypi-uri "argparse" version))
13355 (sha256
13356 (base32
13357 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
13358 (build-system python-build-system)
13359 (arguments
13360 `(#:python ,python-2))
13361 (home-page "https://github.com/ThomasWaldmann/argparse/")
13362 (synopsis "Python command-line parsing library")
13363 (description
13364 "This package is mostly for people who want to have @code{argparse} on
13365older Pythons because it was not part of the standard library back then.")
13366 (license license:psfl)))
13367
44d10b1f
RW
13368(define-public python-fudge
13369 (package
13370 (name "python-fudge")
13371 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
13372 ;; package, which is currently the only use of this package.
13373 (version "0.9.6")
13374 (source
13375 (origin
13376 (method url-fetch)
13377 (uri (pypi-uri "fudge" version))
13378 (sha256
13379 (base32
13380 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
13381 (build-system python-build-system)
13382 (arguments
13383 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
13384 (home-page "https://github.com/fudge-py/fudge")
13385 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
13386 (description
13387 "Fudge is a Python module for using fake objects (mocks and stubs) to
13388test real ones.
13389
13390In readable Python code, you declare the methods available on your fake object
13391and how they should be called. Then you inject that into your application and
13392start testing. This declarative approach means you don’t have to record and
13393playback actions and you don’t have to inspect your fakes after running code.
13394If the fake object was used incorrectly then you’ll see an informative
13395exception message with a traceback that points to the culprit.")
13396 (license license:expat)))
13397
13398(define-public python2-fudge
13399 (package-with-python2 python-fudge))
13400
13401(define-public python-mwclient
13402 (package
13403 (name "python-mwclient")
957c6833 13404 (version "0.10.0")
44d10b1f
RW
13405 (source
13406 (origin
957c6833 13407 (method git-fetch)
44d10b1f 13408 ;; The PyPI version wouldn't contain tests.
957c6833
EF
13409 (uri (git-reference
13410 (url "https://github.com/mwclient/mwclient")
13411 (commit (string-append "v" version))))
13412 (file-name (git-file-name name version))
44d10b1f
RW
13413 (sha256
13414 (base32
957c6833 13415 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
44d10b1f
RW
13416 (build-system python-build-system)
13417 (propagated-inputs
957c6833 13418 `(("python-requests-oauthlib" ,python-requests-oauthlib)
44d10b1f
RW
13419 ("python-six" ,python-six)))
13420 (native-inputs
13421 `(("python-mock" ,python-mock)
13422 ("python-pytest" ,python-pytest)
44d10b1f 13423 ("python-pytest-cov" ,python-pytest-cov)
957c6833 13424 ("python-pytest-runner" ,python-pytest-runner)
44d10b1f
RW
13425 ("python-responses" ,python-responses)))
13426 (home-page "https://github.com/btongminh/mwclient")
13427 (synopsis "MediaWiki API client")
13428 (description "This package provides a MediaWiki API client.")
13429 (license license:expat)))
13430
13431(define-public python2-mwclient
13432 (package-with-python2 python-mwclient))
13433
13434(define-public python-utils
13435 (package
13436 (name "python-utils")
13437 (version "2.1.0")
13438 (source (origin
13439 (method url-fetch)
13440 (uri (pypi-uri "python-utils" version))
13441 (sha256
13442 (base32
13443 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
13444 (build-system python-build-system)
13445 (native-inputs
13446 `(("pytest-runner" ,python-pytest-runner)
13447 ("pytest" ,python-pytest)
13448 ("six" ,python-six)))
13449 (home-page "https://github.com/WoLpH/python-utils")
13450 (synopsis "Convenient utilities not included with the standard Python install")
13451 (description
13452 "Python Utils is a collection of small Python functions and classes which
13453make common patterns shorter and easier.")
13454 (license license:bsd-2)))
13455
13456(define-public python2-utils
13457 (package-with-python2 python-utils))
13458
44d10b1f
RW
13459(define-public python-diff-match-patch
13460 (package
13461 (name "python-diff-match-patch")
13462 (version "20121119")
13463 (source
13464 (origin
13465 (method url-fetch)
13466 (uri (pypi-uri "diff-match-patch" version))
13467 (sha256
13468 (base32
13469 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
13470 (build-system python-build-system)
13471 (home-page "https://code.google.com/p/google-diff-match-patch")
13472 (synopsis "Synchronize plain text")
13473 (description "Diff Match and Patch libraries offer robust algorithms to
13474perform the operations required for synchronizing plain text.")
13475 (license license:asl2.0)))
13476
13477(define-public python2-diff-match-patch
13478 (package-with-python2 python-diff-match-patch))
13479
13480(define-public python-dirsync
13481 (package
13482 (name "python-dirsync")
13483 (version "2.2.3")
13484 (source
13485 (origin
13486 (method url-fetch)
13487 (uri (pypi-uri "dirsync" version))
13488 (sha256
13489 (base32
13490 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
13491 (build-system python-build-system)
13492 (propagated-inputs
13493 `(("six" ,python-six)))
13494 (home-page "https://bitbucket.org/tkhyn/dirsync")
13495 (synopsis "Advanced directory tree synchronisation tool")
13496 (description "Advanced directory tree synchronisation tool.")
13497 (license license:expat)))
13498
13499(define-public python2-dirsync
13500 (package-with-python2 python-dirsync))
13501
13502(define-public python-levenshtein
13503 (package
13504 (name "python-levenshtein")
13505 (version "0.12.0")
13506 (source
13507 (origin
13508 (method url-fetch)
13509 (uri (pypi-uri "python-Levenshtein" version))
13510 (sha256
13511 (base32
13512 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13513 (build-system python-build-system)
13514 (home-page "https://github.com/ztane/python-Levenshtein")
13515 (synopsis "Fast computation of Levenshtein distance and string similarity")
13516 (description
13517 "The Levenshtein Python C extension module contains functions for fast computation of
13518@enumerate
13519@item Levenshtein (edit) distance, and edit operations
13520@item string similarity
13521@item approximate median strings, and generally string averaging
13522@item string sequence and set similarity
13523@end enumerate
13524It supports both normal and Unicode strings.")
13525 (license license:gpl2+)))
13526
13527(define-public python2-levenshtein
13528 (package-with-python2 python-levenshtein))
13529
13530(define-public python-scandir
13531 (package
13532 (name "python-scandir")
13533 (version "1.9.0")
13534 (source
13535 (origin
13536 (method url-fetch)
13537 (uri (pypi-uri "scandir" version))
13538 (sha256
13539 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13540 (build-system python-build-system)
13541 (arguments
13542 `(#:phases (modify-phases %standard-phases
13543 (replace 'check
13544 (lambda _
13545 (invoke "python" "test/run_tests.py"))))))
13546 (home-page "https://github.com/benhoyt/scandir")
13547 (synopsis "Directory iteration function")
13548 (description
13549 "Directory iteration function like os.listdir(), except that instead of
13550returning a list of bare filenames, it yields DirEntry objects that include
13551file type and stat information along with the name. Using scandir() increases
13552the speed of os.walk() by 2-20 times (depending on the platform and file
13553system) by avoiding unnecessary calls to os.stat() in most cases.
13554
13555This package is part of the Python standard library since version 3.5.")
13556 (license license:bsd-3)))
13557
13558(define-public python2-scandir
13559 (package-with-python2 python-scandir))
13560
13561(define-public python2-stemming
13562 (package
13563 (name "python2-stemming")
13564 (version "1.0.1")
13565 (source
13566 (origin
13567 (method url-fetch)
13568 (uri (pypi-uri "stemming" version))
13569 (sha256
13570 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13571 (build-system python-build-system)
13572 (arguments
13573 `(#:python ,python-2))
13574 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13575 (synopsis "Python implementations of various stemming algorithms")
13576 (description
13577 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13578stemming algorithms for English. These implementations are straightforward and
13579efficient, unlike some Python versions of the same algorithms available on the
13580Web. This package is an extraction of the stemming code included in the Whoosh
13581search engine.")
13582 (license license:public-domain)))
13583
13584(define-public python-factory-boy
13585 (package
13586 (name "python-factory-boy")
13587 (version "2.8.1")
13588 (source
13589 (origin
13590 (method url-fetch)
13591 (uri (pypi-uri "factory_boy" version))
13592 (sha256
13593 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13594 (build-system python-build-system)
13595 (arguments
13596 ;; Tests are not included in the tarball.
13597 `(#:tests? #f))
13598 (propagated-inputs
13599 `(("faker" ,python-faker)))
13600 (home-page "https://github.com/benhoyt/scandir")
13601 (synopsis "Versatile test fixtures replacement")
13602 (description
13603 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13604
13605As a fixtures replacement tool, it aims to replace static, hard to maintain
13606fixtures with easy-to-use factories for complex object.
13607
13608Instead of building an exhaustive test setup with every possible combination
13609of corner cases, factory_boy allows you to use objects customized for the
13610current test, while only declaring the test-specific fields")
13611 (license license:expat)))
13612
13613(define-public python2-factory-boy
13614 (package-with-python2 python-factory-boy))
13615
13616(define-public python-translate-toolkit
13617 (package
13618 (name "python-translate-toolkit")
13619 (version "2.1.0")
13620 (source
13621 (origin
13622 (method url-fetch)
13623 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13624 (sha256
13625 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13626 (build-system python-build-system)
13627 (native-inputs
13628 `(("python-pytest" ,python-pytest)
13629 ("python-sphinx" ,python-sphinx)))
13630 (propagated-inputs
13631 `(("python-babel" ,python-babel)
13632 ("python-beautifulsoup4" ,python-beautifulsoup4)
13633 ("python-chardet" ,python-chardet)
13634 ("python-diff-match-patch" ,python-diff-match-patch)
13635 ("python-levenshtein" ,python-levenshtein)
13636 ("python-lxml" ,python-lxml)
13637 ("python-six" ,python-six)
13638 ("python-vobject" ,python-vobject)
13639 ("python-pyyaml" ,python-pyyaml)))
13640 (arguments
13641 ;; TODO: tests are not run, because they end with
13642 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13643 ;; 'parse_funcs'
13644 ;; during test setup.
13645 `(#:tests? #f))
18919cf9 13646 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13647 (synopsis "Tools and API for translation and localization engineering")
13648 (description
13649 "Tools and API for translation and localization engineering. It contains
13650several utilities, as well as an API for building localization tools.")
13651 (license license:gpl2+)))
13652
13653(define-public python2-translate-toolkit
13654 (package-with-python2 python-translate-toolkit))
13655
13656(define-public python-packaging
13657 (package
13658 (name "python-packaging")
a72a1892 13659 (version "20.0")
44d10b1f
RW
13660 (source
13661 (origin
13662 (method url-fetch)
13663 (uri (pypi-uri "packaging" version))
20bf58bf
MB
13664 ;; XXX: The URL in the patch file is wrong, it should be
13665 ;; <https://github.com/pypa/packaging/pull/256>.
fdd0c369 13666 (patches (search-patches "python-packaging-test-arch.patch"))
44d10b1f
RW
13667 (sha256
13668 (base32
a72a1892 13669 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
44d10b1f
RW
13670 (build-system python-build-system)
13671 (arguments
13672 `(#:phases (modify-phases %standard-phases
13673 (replace 'check
13674 (lambda _ (invoke "py.test" "-vv"))))))
13675 (native-inputs
13676 `(("python-pretend" ,python-pretend)
13677 ("python-pytest" ,python-pytest)))
13678 (propagated-inputs
13679 `(("python-pyparsing" ,python-pyparsing)
13680 ("python-six" ,python-six)))
13681 (home-page "https://github.com/pypa/packaging")
13682 (synopsis "Core utilities for Python packages")
13683 (description "Packaging is a Python module for dealing with Python packages.
13684It offers an interface for working with package versions, names, and dependency
13685information.")
13686 ;; From 'LICENSE': This software is made available under the terms of
13687 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13688 ;; Contributions to this software is made under the terms of *both* these
13689 ;; licenses.
13690 (license (list license:asl2.0 license:bsd-2))))
13691
13692(define-public python2-packaging
13693 (package-with-python2 python-packaging))
13694
13695(define-public python-relatorio
13696 (package
13697 (name "python-relatorio")
13698 (version "0.8.0")
13699 (source
13700 (origin
13701 (method url-fetch)
13702 (uri (pypi-uri "relatorio" version))
13703 (sha256
13704 (base32
13705 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13706 (build-system python-build-system)
13707 (propagated-inputs
13708 `(("python-lxml" ,python-lxml)
13709 ("python-genshi" ,python-genshi)))
13710 (native-inputs
13711 `(("python-magic" ,python-magic)))
13712 (home-page "https://relatorio.tryton.org/")
13713 (synopsis "Templating library able to output ODT and PDF files")
13714 (description "Relatorio is a templating library which provides a way to
13715easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13716for more filetypes can be easily added by creating plugins for them.")
13717 (license license:gpl3+)))
13718
13719(define-public python2-relatorio
13720 (package-with-python2 python-relatorio))
13721
13722(define-public python-radon
13723 (package
13724 (name "python-radon")
f675ab4f 13725 (version "4.1.0")
44d10b1f
RW
13726 (source
13727 (origin
13728 (method url-fetch)
13729 (uri (pypi-uri "radon" version))
13730 (sha256
13731 (base32
f675ab4f 13732 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
44d10b1f
RW
13733 (build-system python-build-system)
13734 (arguments
13735 `(#:phases (modify-phases %standard-phases
13736 (replace 'check
13737 (lambda _
13738 (invoke "python" "radon/tests/run.py"))))))
13739 (propagated-inputs
13740 `(("python-colorama" ,python-colorama)
13741 ("python-flake8-polyfill" ,python-flake8-polyfill)
13742 ("python-mando" ,python-mando)))
13743 (native-inputs
13744 `(("python-pytest" ,python-pytest)
13745 ("python-pytest-mock" ,python-pytest-mock)))
13746 (home-page "https://radon.readthedocs.org/")
13747 (synopsis "Code Metrics in Python")
13748 (description "Radon is a Python tool which computes various code metrics.
13749Supported metrics are:
13750@itemize @bullet
13751@item raw metrics: SLOC, comment lines, blank lines, &c.
13752@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13753@item Halstead metrics (all of them)
13754@item the Maintainability Index (a Visual Studio metric)
13755@end itemize")
6bd7d4cb 13756 (properties `((python2-variant . ,(delay python2-radon))))
44d10b1f
RW
13757 (license license:expat)))
13758
13759(define-public python2-radon
6bd7d4cb
MB
13760 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
13761 (package
13762 (inherit base)
13763 (propagated-inputs
13764 `(("python-configparser" ,python2-configparser)
13765 ("python-future" ,python2-future)
13766 ,@(package-propagated-inputs base))))))
44d10b1f
RW
13767
13768(define-public python-sure
13769 (package
13770 (name "python-sure")
13771 (version "1.4.11")
13772 (source
13773 (origin
13774 (method url-fetch)
13775 (uri (pypi-uri "sure" version))
13776 (sha256
13777 (base32
13778 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13779 (build-system python-build-system)
13780 (propagated-inputs
13781 `(("python-mock" ,python-mock)
13782 ("python-six" ,python-six)))
13783 (native-inputs
13784 `(("python-nose" ,python-nose)))
13785 (home-page "https://github.com/gabrielfalcao/sure")
13786 (synopsis "Automated testing library in python for python")
13787 (description
13788 "Sure is a python library that leverages a DSL for writing assertions.
13789Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13790 (license license:gpl3+)))
13791
13792(define-public python2-sure
13793 (package-with-python2 python-sure))
13794
13795(define-public python2-couleur
13796 ;; This package does not seem to support python3 at all, hence,
13797 ;; only the python2 variant definition is provided.
13798 (package
13799 (name "python2-couleur")
13800 (version "0.6.2")
13801 (source
13802 (origin
13803 (method url-fetch)
13804 (uri (pypi-uri "couleur" version))
13805 (sha256
13806 (base32
13807 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13808 (build-system python-build-system)
13809 (arguments
13810 `(#:python ,python-2))
13811 (home-page "https://github.com/gabrielfalcao/couleur")
13812 (synopsis
13813 "ANSI terminal tool for python, colored shell and other handy fancy features")
13814 (description
13815 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13816terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13817 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13818 ;; https://github.com/gabrielfalcao/couleur/issues/11
13819 (license license:lgpl3+)))
13820
13821(define-public python-misaka
13822 (package
13823 (name "python-misaka")
0dcb3412 13824 (version "2.1.1")
44d10b1f
RW
13825 (source
13826 (origin
13827 (method url-fetch)
13828 (uri (pypi-uri "misaka" version))
13829 (sha256
13830 (base32
0dcb3412 13831 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13832 (build-system python-build-system)
13833 (arguments
13834 `(;; Line 37 of setup.py calls self.run_command('develop')
13835 ;; in the 'check' phase. This command seems to be trying
13836 ;; to write to
13837 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13838 ;; for which it does not have the permission to write.
13839 #:tests? #f))
13840 (propagated-inputs
13841 `(("python-cffi" ,python-cffi)))
13842 (home-page "https://github.com/FSX/misaka")
13843 (synopsis "Python binding for Hoedown")
13844 (description
13845 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13846library written in C. It features a fast HTML renderer and functionality to make custom
13847renderers (e.g. man pages or LaTeX).")
13848 (license license:expat)))
13849
13850(define-public python2-misaka
13851 (package-with-python2 python-misaka))
13852
13853(define-public python2-steadymark
13854 ;; This is forced into being a python2 only variant
13855 ;; due to its dependence on couleur that has no support
13856 ;; for python3
13857 (package
13858 (name "python2-steadymark")
13859 (version "0.7.3")
13860 (source
13861 (origin
13862 (method url-fetch)
13863 (uri (pypi-uri "steadymark" version))
13864 (sha256
13865 (base32
13866 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13867 (build-system python-build-system)
13868 (native-inputs
13869 `(("python-couleur" ,python2-couleur)
13870 ("python-sure" ,python2-sure)
13871 ("python-misaka" ,python2-misaka)))
13872 (arguments
13873 `(#:python ,python-2
13874 #:phases
13875 (modify-phases %standard-phases
13876 (add-before 'build 'patch-setup-py
13877 (lambda _
13878 ;; Update requirements from dependency==version
13879 ;; to dependency>=version
13880 (substitute* "setup.py"
13881 (("==") ">="))
13882 #t)))))
13883 (home-page "https://github.com/gabrielfalcao/steadymark")
13884 (synopsis "Markdown-based test runner for python")
13885 (description
13886 "@code{Steadymark} allows documentation to be written in github-flavoured
13887markdown. The documentation may contain snippets of code surrounded by python
13888code blocks and @code{Steadymark} will find these snippets and run them, making
13889sure that there are no old malfunctional examples in the documentation examples.")
13890 (license license:expat)))
13891
13892(define-public python-jsonpointer
13893 (package
13894 (name "python-jsonpointer")
13895 (version "1.10")
13896 (source
13897 (origin
13898 (method url-fetch)
13899 (uri (pypi-uri "jsonpointer" version))
13900 (sha256
13901 (base32
13902 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13903 (build-system python-build-system)
13904 (home-page "https://github.com/stefankoegl/python-json-pointer")
13905 (synopsis "Identify specific nodes in a JSON document")
13906 (description "@code{jsonpointer} allows you to access specific nodes
13907by path in a JSON document (see RFC 6901).")
13908 (license license:bsd-3)))
13909
13910(define-public python2-jsonpointer
13911 (package-with-python2 python-jsonpointer))
13912
13913(define-public python-jsonpatch
13914 (package
13915 (name "python-jsonpatch")
13916 (version "1.16")
13917 (source
13918 (origin
854c5c95 13919 (method git-fetch)
44d10b1f 13920 ;; pypi version lacks tests.js
854c5c95
EF
13921 (uri (git-reference
13922 (url "https://github.com/stefankoegl/python-json-patch")
13923 (commit (string-append "v" version))))
13924 (file-name (git-file-name name version))
44d10b1f
RW
13925 (sha256
13926 (base32
854c5c95 13927 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
44d10b1f
RW
13928 (build-system python-build-system)
13929 (native-inputs
13930 `(("python-jsonpointer" ,python-jsonpointer)))
13931 (home-page "https://github.com/stefankoegl/python-json-patch")
13932 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13933 (description "@code{jsonpatch} is a library and program that allows
13934applying JSON Patches according to RFC 6902.")
13935 (license license:bsd-3)))
13936
13937(define-public python2-jsonpatch
13938 (package-with-python2 python-jsonpatch))
13939
13940(define-public python-jsonpatch-0.4
13941 (package (inherit python-jsonpatch)
13942 (name "python-jsonpatch")
13943 (version "0.4")
13944 (source
13945 (origin
a9722d0d
EF
13946 (method git-fetch)
13947 (uri (git-reference
13948 (url "https://github.com/stefankoegl/python-json-patch")
13949 (commit (string-append "v" version))))
13950 (file-name (git-file-name name version))
44d10b1f
RW
13951 (sha256
13952 (base32
a9722d0d 13953 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
44d10b1f
RW
13954
13955(define-public python2-jsonpatch-0.4
13956 (package-with-python2 python-jsonpatch-0.4))
13957
13958(define-public python-rfc3986
13959 (package
13960 (name "python-rfc3986")
13961 (version "1.1.0")
13962 (source (origin
13963 (method url-fetch)
13964 (uri (pypi-uri "rfc3986" version))
13965 (sha256
13966 (base32
13967 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13968 (build-system python-build-system)
13969 (arguments
13970 `(#:modules ((guix build utils)
13971 (guix build python-build-system)
13972 (ice-9 ftw)
13973 (srfi srfi-1)
13974 (srfi srfi-26))
13975 #:phases
13976 (modify-phases %standard-phases
13977 (replace 'check
13978 (lambda _
13979 (let ((cwd (getcwd)))
13980 (setenv "PYTHONPATH"
13981 (string-append cwd "/build/"
13982 (find (cut string-prefix? "lib" <>)
13983 (scandir (string-append cwd "/build")))
13984 ":"
13985 (getenv "PYTHONPATH")))
13986 (invoke "pytest" "-v")))))))
13987 (native-inputs
13988 `(("python-pytest" ,python-pytest)))
13989 (home-page "https://rfc3986.readthedocs.io/")
13990 (synopsis "Parse and validate URI references")
13991 (description
13992 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13993validation and authority parsing. This module also supports RFC@tie{}6874
13994which adds support for zone identifiers to IPv6 addresses.")
13995 (license license:asl2.0)))
13996
13997(define-public python2-rfc3986
13998 (package-with-python2 python-rfc3986))
13999
14000(define-public python-rfc3987
14001 (package
14002 (name "python-rfc3987")
14003 (version "1.3.7")
14004 (source
14005 (origin
14006 (method url-fetch)
14007 (uri (pypi-uri "rfc3987" version))
14008 (sha256
14009 (base32
14010 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
14011 (build-system python-build-system)
e85af137 14012 (home-page "https://pypi.org/project/rfc3987/")
44d10b1f
RW
14013 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
14014 (description "@code{rfc3987} provides routines for parsing and
14015validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
14016 (license license:gpl3+)))
14017
14018(define-public python2-rfc3987
14019 (package-with-python2 python-rfc3987))
14020
14021(define-public python-validate-email
14022 (package
14023 (name "python-validate-email")
14024 (version "1.3")
14025 (source
14026 (origin
14027 (method url-fetch)
14028 (uri (pypi-uri "validate_email" version))
14029 (sha256
14030 (base32
14031 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
14032 (build-system python-build-system)
14033 (home-page "https://github.com/syrusakbary/validate_email")
14034 (synopsis "Verifies if an email address is valid and really exists")
14035 (description "@code{validate_email} can be used to verify if an email
14036address is valid and really exists.")
14037 (license license:lgpl3+)))
14038
14039(define-public python2-validate-email
14040 (package-with-python2 python-validate-email))
14041
14042(define-public python-flex
14043 (package
14044 (name "python-flex")
14045 (version "6.10.0")
14046 (source
14047 (origin
14048 (method url-fetch)
14049 (uri (pypi-uri "flex" version))
14050 (sha256
14051 (base32
14052 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
14053 (build-system python-build-system)
14054 (propagated-inputs
14055 `(("python-click" ,python-click)
14056 ("python-iso8601" ,python-iso8601)
14057 ("python-jsonpointer" ,python-jsonpointer)
14058 ("python-pyyaml" ,python-pyyaml)
14059 ("python-requests" ,python-requests)
14060 ("python-rfc3987" ,python-rfc3987)
14061 ("python-six" ,python-six)
14062 ("python-validate-email" ,python-validate-email)))
14063 (home-page "https://github.com/pipermerriam/flex")
14064 (synopsis "Validates Swagger schemata")
14065 (description "@code{flex} can be used to validate Swagger schemata.")
14066 (license license:bsd-3)))
14067
14068(define-public python2-flex
14069 (package-with-python2 python-flex))
14070
14071(define-public python-marshmallow
14072 (package
14073 (name "python-marshmallow")
14074 (version "3.0.0b14")
14075 (source
14076 (origin
14077 (method url-fetch)
14078 (uri (pypi-uri "marshmallow" version))
14079 (sha256
14080 (base32
14081 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
14082 (build-system python-build-system)
14083 (propagated-inputs
14084 `(("python-dateutil" ,python-dateutil)
14085 ("python-simplejson" ,python-simplejson)))
14086 (native-inputs
14087 `(("python-pytest" ,python-pytest)
14088 ("python-pytz" ,python-pytz)))
14089 (home-page "https://github.com/marshmallow-code/marshmallow")
14090 (synopsis "Convert complex datatypes to and from native
14091Python datatypes.")
14092 (description "@code{marshmallow} provides a library for converting
14093complex datatypes to and from native Python datatypes.")
14094 (license license:expat)))
14095
14096(define-public python2-marshmallow
14097 (package-with-python2 python-marshmallow))
14098
14099(define-public python-apispec
14100 (package
14101 (name "python-apispec")
14102 (version "0.25.3")
14103 (source
14104 (origin
14105 (method url-fetch)
14106 (uri (pypi-uri "apispec" version))
14107 (sha256
14108 (base32
14109 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
14110 (build-system python-build-system)
14111 (propagated-inputs
14112 `(("python-pyyaml" ,python-pyyaml)))
14113 (native-inputs
14114 `(("python-pytest" ,python-pytest)
14115 ("python-flask" ,python-flask)
14116 ("python-marshmallow" ,python-marshmallow)
14117 ("python-tornado" ,python-tornado)
14118 ("python-bottle" ,python-bottle)
14119 ("python-mock" ,python-mock)))
14120 (home-page "https://github.com/marshmallow-code/apispec")
14121 (synopsis "Swagger 2.0 API specification generator")
14122 (description "@code{python-apispec} is a pluggable API specification
14123generator. Currently supports the OpenAPI specification (f.k.a.
14124Swagger 2.0).")
14125 (license license:expat)))
14126
14127(define-public python2-apispec
14128 (package-with-python2 python-apispec))
14129
14130(define-public python-flasgger
14131 (package
14132 (name "python-flasgger")
14133 (version "0.6.3")
14134 (source
14135 (origin
1a04d421
TGR
14136 (method git-fetch)
14137 (uri (git-reference
14138 (url "https://github.com/rochacbruno/flasgger.git")
14139 (commit version)))
14140 (file-name (git-file-name name version))
44d10b1f 14141 (sha256
1a04d421 14142 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
14143 (build-system python-build-system)
14144 (arguments
14145 `(#:phases
14146 (modify-phases %standard-phases
14147 (replace 'check
14148 (lambda* (#:key inputs outputs #:allow-other-keys)
14149 (substitute* "Makefile"
14150 (("flake8 flasgger --ignore=F403")
14151 "flake8 flasgger --ignore=E731,F403"))
14152 (setenv "PYTHONPATH" (string-append (getcwd)
14153 ":"
14154 (getenv "PYTHONPATH")))
ac599a09 14155 (invoke "py.test"))))))
44d10b1f
RW
14156 (propagated-inputs
14157 `(("python-flask" ,python-flask)
14158 ("python-pyyaml" ,python-pyyaml)
14159 ("python-jsonschema" ,python-jsonschema)
14160 ("python-mistune" ,python-mistune)
14161 ("python-six" ,python-six)))
14162 (native-inputs
14163 `(("python-decorator" ,python-decorator)
14164 ("python-flake8" ,python-flake8)
14165 ("python-flask-restful" ,python-flask-restful)
14166 ("python-flex" ,python-flex)
14167 ("python-pytest" ,python-pytest)
14168 ("python-pytest-cov" ,python-pytest-cov)
14169 ("python-marshmallow" ,python-marshmallow)
14170 ("python-apispec" ,python-apispec)))
14171 (home-page "https://github.com/rochacbruno/flasgger/")
14172 (synopsis "Extract Swagger specs from your Flask project")
14173 (description "@code{python-flasgger} allows extracting Swagger specs
14174from your Flask project. It is a fork of Flask-Swagger.")
14175 (license license:expat)))
14176
14177(define-public python2-flasgger
14178 (package-with-python2 python-flasgger))
14179
14180(define-public python-swagger-spec-validator
14181 (package
14182 (name "python-swagger-spec-validator")
fe9c5b1d 14183 (version "2.4.3")
44d10b1f
RW
14184 (source
14185 (origin
14186 (method url-fetch)
14187 (uri (pypi-uri "swagger-spec-validator" version))
14188 (sha256
14189 (base32
fe9c5b1d 14190 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
14191 (build-system python-build-system)
14192 (propagated-inputs
14193 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 14194 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
14195 ("python-six" ,python-six)))
14196 (home-page
14197 "https://github.com/Yelp/swagger_spec_validator")
14198 (synopsis "Validation of Swagger specifications")
14199 (description "@code{swagger_spec_validator} provides a library for
14200validating Swagger API specifications.")
14201 (license license:asl2.0)))
14202
14203(define-public python2-swagger-spec-validator
14204 (package-with-python2 python-swagger-spec-validator))
14205
14206(define-public python-apache-libcloud
14207 (package
14208 (name "python-apache-libcloud")
14209 (version "2.4.0")
14210 (source
14211 (origin
14212 (method url-fetch)
14213 (uri (pypi-uri "apache-libcloud" version))
14214 (sha256
14215 (base32
14216 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
14217 (build-system python-build-system)
14218 (arguments
14219 `(#:phases
14220 (modify-phases %standard-phases
14221 (add-after 'unpack 'patch-ssh
14222 (lambda* (#:key inputs #:allow-other-keys)
14223 (substitute* "libcloud/compute/ssh.py"
14224 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
14225 "/bin/ssh" "'")))
14226 #t))
14227 (add-after 'unpack 'patch-tests
14228 (lambda _
14229 (substitute* "./libcloud/test/test_file_fixtures.py"
14230 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
14231 (("def _ascii") "def _raw_data(self, method, url, body, headers):
14232 return (httplib.OK,
14233 \"1234abcd\",
14234 {\"test\": \"value\"},
14235 httplib.responses[httplib.OK])
14236 def _ascii"))
14237 (substitute* "libcloud/test/compute/test_ssh_client.py"
14238 (("class ShellOutSSHClientTests")
14239 "@unittest.skip(\"Guix container doesn't have ssh service\")
14240class ShellOutSSHClientTests")
14241 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
14242 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
14243 (("'.xF0', '.x90', '.x8D', '.x88'")
14244 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
14245 #t))
14246 (add-before 'check 'copy-secret
14247 (lambda _
14248 (copy-file "libcloud/test/secrets.py-dist"
14249 "libcloud/test/secrets.py")
14250 #t)))))
14251 (inputs
14252 `(("openssh" ,openssh)))
14253 (propagated-inputs
14254 `(("python-paramiko" ,python-paramiko)
14255 ("python-requests" ,python-requests)))
14256 (native-inputs
14257 `(("python-lockfile" ,python-lockfile)
14258 ("python-mock" ,python-mock)
14259 ("python-pytest" ,python-pytest)
14260 ("python-pytest-runner" ,python-pytest-runner)
14261 ("python-requests-mock" ,python-requests-mock)))
14262 (home-page "https://libcloud.apache.org/")
14263 (synopsis "Unified Cloud API")
14264 (description "@code{libcloud} is a Python library for interacting with
14265many of the popular cloud service providers using a unified API.")
14266 (license license:asl2.0)))
14267
14268(define-public python2-apache-libcloud
14269 (package-with-python2 python-apache-libcloud))
14270
1639e0b7 14271(define-public python-smmap
44d10b1f 14272 (package
1639e0b7
MC
14273 (name "python-smmap")
14274 (version "3.0.1")
44d10b1f
RW
14275 (source
14276 (origin
14277 (method url-fetch)
1639e0b7 14278 (uri (pypi-uri "smmap" version))
44d10b1f 14279 (sha256
1639e0b7 14280 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
44d10b1f
RW
14281 (build-system python-build-system)
14282 (native-inputs
14283 `(("python-nosexcover" ,python-nosexcover)))
14284 (home-page "https://github.com/Byron/smmap")
14285 (synopsis "Python sliding window memory map manager")
1639e0b7 14286 (description "@code{smmap} is a pure Python implementation of a sliding
44d10b1f
RW
14287window memory map manager.")
14288 (license license:bsd-3)))
14289
1639e0b7
MC
14290(define-public python-smmap2
14291 (deprecated-package "python-smmap2" python-smmap))
14292
14293(define-public python2-smmap
14294 (package-with-python2 python-smmap))
14295
44d10b1f 14296(define-public python2-smmap2
1639e0b7 14297 (deprecated-package "python2-smmap2" python2-smmap))
44d10b1f
RW
14298
14299(define-public python-regex
14300 (package
14301 (name "python-regex")
c187c9d7 14302 (version "2019.04.14")
44d10b1f
RW
14303 (source (origin
14304 (method url-fetch)
14305 (uri (pypi-uri "regex" version))
14306 (sha256
14307 (base32
c187c9d7
BT
14308 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
14309 ;; TODO: Fix and enable regex_test.py tests that complain about the
14310 ;; test.support module not existing.
44d10b1f
RW
14311 (build-system python-build-system)
14312 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
14313 (synopsis "Alternative regular expression module")
14314 (description "This regular expression implementation is backwards-
14315compatible with the standard @code{re} module, but offers additional
14316functionality like full case-folding for case-insensitive matches in Unicode.")
14317 (license license:psfl)))
14318
14319(define-public python2-regex
14320 (package-with-python2 python-regex))
14321
14322(define-public python2-pyopengl
14323 (package
14324 (name "python2-pyopengl")
14325 (version "3.1.0")
14326 (source
14327 (origin
14328 (method url-fetch)
14329 (uri (pypi-uri "PyOpenGL" version))
14330 (sha256
14331 (base32
14332 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
14333 (arguments
14334 `(#:python ,python-2))
14335 (build-system python-build-system)
14336 (home-page "http://pyopengl.sourceforge.net")
14337 (synopsis "Standard OpenGL bindings for Python")
14338 (description
14339 "PyOpenGL is the most common cross platform Python binding to OpenGL and
14340related APIs. The binding is created using the standard @code{ctypes}
14341library.")
14342 (license license:bsd-3)))
14343
14344(define-public python2-pyopengl-accelerate
14345 (package
14346 (inherit python2-pyopengl)
14347 (name "python2-pyopengl-accelerate")
14348 (version "3.1.0")
14349 (source
14350 (origin
14351 (method url-fetch)
14352 (uri (pypi-uri "PyOpenGL-accelerate" version))
14353 (sha256
14354 (base32
14355 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
14356 (synopsis "Acceleration code for PyOpenGL")
14357 (description
14358 "This is the Cython-coded accelerator module for PyOpenGL.")))
14359
14360(define-public python-rencode
14361 (package
14362 (name "python-rencode")
14363 (version "1.0.5")
14364 (source
14365 (origin
14366 (method url-fetch)
14367 (uri (pypi-uri "rencode" version))
14368 (sha256
14369 (base32
14370 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
14371 (build-system python-build-system)
14372 (arguments
14373 `(#:phases
14374 (modify-phases %standard-phases
14375 (add-before 'check 'delete-bogus-test
14376 ;; This test requires /home/aresch/Downloads, which is not provided by
14377 ;; the build environment.
14378 (lambda _
14379 (delete-file "rencode/t.py")
14380 #t)))))
14381 (native-inputs `(("pkg-config" ,pkg-config)
14382 ("python-cython" ,python-cython)))
14383 (home-page "https://github.com/aresch/rencode")
14384 (synopsis "Serialization of heterogeneous data structures")
14385 (description
14386 "The @code{rencode} module is a data structure serialization library,
14387similar to @code{bencode} from the BitTorrent project. For complex,
14388heterogeneous data structures with many small elements, r-encoding stake up
14389significantly less space than b-encodings. This version of rencode is a
14390complete rewrite in Cython to attempt to increase the performance over the
14391pure Python module.")
14392 (license license:bsd-3)))
14393
14394(define-public python2-rencode
14395 (package-with-python2 python-rencode))
14396
14397(define-public python-xenon
14398 (package
14399 (name "python-xenon")
8c06d6d8 14400 (version "0.7.0")
44d10b1f
RW
14401 (source
14402 (origin
14403 (method url-fetch)
14404 (uri (pypi-uri "xenon" version))
14405 (sha256
14406 (base32
8c06d6d8 14407 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
44d10b1f
RW
14408 (build-system python-build-system)
14409 (native-inputs
14410 `(("python-pyyaml" ,python-pyyaml)
14411 ("python-radon" ,python-radon)
14412 ("python-requests" ,python-requests)
14413 ("python-flake8" ,python-flake8)
14414 ("python-tox" ,python-tox)))
14415 (arguments
8c06d6d8
MC
14416 `(#:tests? #f ;test suite not shipped with the PyPI archive
14417 #:phases
44d10b1f
RW
14418 (modify-phases %standard-phases
14419 (add-before 'build 'patch-test-requirements
14420 (lambda _
14421 ;; Remove httpretty dependency for tests.
14422 (substitute* "setup.py"
14423 (("httpretty") ""))
14424 #t)))))
14425 (home-page "https://xenon.readthedocs.org/")
14426 (synopsis "Monitor code metrics for Python on your CI server")
14427 (description
14428 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
14429Ideally, @code{xenon} is run every time code is committed. Through command
14430line options, various thresholds can be set for the complexity of code. It
14431will fail (i.e. it will exit with a non-zero exit code) when any of these
14432requirements is not met.")
14433 (license license:expat)))
14434
14435(define-public python2-xenon
14436 (package-with-python2 python-xenon))
14437
14438(define-public python-pysocks
14439 (package
14440 (name "python-pysocks")
b8725cdf 14441 (version "1.7.0")
44d10b1f
RW
14442 (source
14443 (origin
14444 (method url-fetch)
14445 (uri (pypi-uri "PySocks" version))
14446 (sha256
14447 (base32
b8725cdf 14448 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
14449 (build-system python-build-system)
14450 (arguments `(#:tests? #f))
14451 (home-page "https://github.com/Anorov/PySocks")
14452 (synopsis "SOCKS client module")
14453 (description "@code{pysocks} is an updated and semi-actively maintained
14454version of @code{SocksiPy} with bug fixes and extra features.")
14455 (license license:bsd-3)))
14456
14457(define-public python2-pysocks
14458 (package-with-python2 python-pysocks))
14459
14460(define-public python-pydiff
14461 (package
14462 (name "python-pydiff")
14463 (version "0.2")
14464 (source
14465 (origin
14466 (method url-fetch)
14467 (uri (pypi-uri "pydiff" version))
14468 (sha256
14469 (base32
14470 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
14471 (build-system python-build-system)
14472 (home-page "https://github.com/myint/pydiff")
14473 (synopsis "Library to diff two Python files at the bytecode level")
14474 (description
14475 "@code{pydiff} makes it easy to look for actual code changes while
14476ignoring formatting changes.")
14477 (license license:expat)))
14478
14479(define-public python2-pydiff
14480 (package-with-python2 python-pydiff))
14481
14482(define-public python-tqdm
14483 (package
14484 (name "python-tqdm")
8317c89a 14485 (version "4.43.0")
44d10b1f
RW
14486 (source
14487 (origin
14488 (method url-fetch)
14489 (uri (pypi-uri "tqdm" version))
14490 (sha256
14491 (base32
8317c89a 14492 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
44d10b1f 14493 (build-system python-build-system)
8317c89a
MB
14494 (arguments
14495 '(#:phases (modify-phases %standard-phases
14496 (replace 'check
14497 (lambda* (#:key inputs outputs #:allow-other-keys)
14498 (add-installed-pythonpath inputs outputs)
14499 ;; This invokation is taken from tox.ini.
14500 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
14501 "-d" "-v" "tqdm/"))))))
44d10b1f 14502 (native-inputs
8317c89a 14503 `(("python-nose" ,python-nose)))
44d10b1f
RW
14504 (home-page "https://github.com/tqdm/tqdm")
14505 (synopsis "Fast, extensible progress meter")
14506 (description
14507 "Make loops show a progress bar on the console by just wrapping any
14508iterable with @code{|tqdm(iterable)|}. Offers many options to define
14509design and layout.")
8317c89a 14510 (license (list license:mpl2.0 license:expat))))
44d10b1f
RW
14511
14512(define-public python2-tqdm
8317c89a 14513 (package-with-python2 python-tqdm))
44d10b1f
RW
14514
14515(define-public python-pkginfo
14516 (package
14517 (name "python-pkginfo")
14518 (version "1.4.2")
14519 (source
14520 (origin
14521 (method url-fetch)
14522 (uri (pypi-uri "pkginfo" version))
14523 (sha256
14524 (base32
14525 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14526 (build-system python-build-system)
14527 (arguments
14528 ;; The tests are broken upstream.
14529 '(#:tests? #f))
14530 (home-page
14531 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14532 (synopsis
14533 "Query metadatdata from sdists, bdists, and installed packages")
14534 (description
14535 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14536source distriubtion (an sdist) or a binary distribution (e.g., created by
14537running bdist_egg). It can also query the EGG-INFO directory of an installed
14538distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14539created by running @code{python setup.py develop}).")
14540 (license license:expat)))
14541
14542(define-public python2-pkginfo
14543 (package-with-python2 python-pkginfo))
14544
14545(define-public python-twine
14546 (package
14547 (name "python-twine")
14548 (version "1.9.1")
14549 (source
14550 (origin
14551 (method url-fetch)
14552 (uri (pypi-uri "twine" version))
14553 (sha256
14554 (base32
14555 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14556 (build-system python-build-system)
14557 (propagated-inputs
14558 `(("python-tqdm" ,python-tqdm)
14559 ("python-pkginfo" ,python-pkginfo)
14560 ("python-requests" ,python-requests)
14561 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14562 (home-page "https://github.com/pypa/twine")
14563 (synopsis "Collection of utilities for interacting with PyPI")
14564 (description
14565 "@code{twine} currently supports registering projects and uploading
14566distributions. It authenticates the user over HTTPS, allows them to pre-sign
14567their files and supports any packaging format (including wheels).")
14568 (license license:asl2.0)))
14569
14570(define-public python2-twine
14571 (package-with-python2 python-twine))
14572
14573(define-public python-linecache2
14574 (package
14575 (name "python-linecache2")
14576 (version "1.0.0")
14577 (source
14578 (origin
14579 (method url-fetch)
14580 (uri (pypi-uri "linecache2" version))
14581 (sha256
14582 (base32
14583 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14584 (build-system python-build-system)
14585 (arguments
14586 `(;; The tests depend on unittest2, and our version is a bit too old.
14587 #:tests? #f))
14588 (native-inputs
14589 `(("python-pbr" ,python-pbr-minimal)))
14590 (home-page
14591 "https://github.com/testing-cabal/linecache2")
14592 (synopsis "Backports of the linecache module")
14593 (description
14594 "The linecache module allows one to get any line from any file, while
14595attempting to optimize internally, using a cache, the common case where many
14596lines are read from a single file.")
14597 (license license:psfl)))
14598
14599(define-public python2-linecache2
14600 (package-with-python2 python-linecache2))
14601
14602(define-public python-traceback2
14603 (package
14604 (name "python-traceback2")
14605 (version "1.4.0")
14606 (source
14607 (origin
14608 (method url-fetch)
14609 (uri (pypi-uri "traceback2" version))
14610 (sha256
14611 (base32
14612 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14613 (build-system python-build-system)
14614 (arguments
14615 `(;; python-traceback2 and python-unittest2 depend on one another.
14616 #:tests? #f))
14617 (native-inputs
14618 `(("python-pbr" ,python-pbr-minimal)))
14619 (propagated-inputs
14620 `(("python-linecache2" ,python-linecache2)))
14621 (home-page
14622 "https://github.com/testing-cabal/traceback2")
14623 (synopsis "Backports of the traceback module")
14624 (description
14625 "This module provides a standard interface to extract, format and print
14626stack traces of Python programs. It exactly mimics the behavior of the Python
14627interpreter when it prints a stack trace.")
14628 (license license:psfl)))
14629
14630(define-public python2-traceback2
14631 (package-with-python2 python-traceback2))
14632
14633(define-public python-ratelimiter
14634 (package
14635 (name "python-ratelimiter")
14636 (version "1.2.0")
14637 (source
14638 (origin
14639 (method url-fetch)
14640 (uri (pypi-uri "ratelimiter" version))
14641 (sha256
14642 (base32
14643 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14644 (build-system python-build-system)
14645 (arguments
14646 '(#:tests? #f)) ; There are no tests in the pypi archive.
14647 (home-page "https://github.com/RazerM/ratelimiter")
14648 (synopsis "Simple rate limiting object")
14649 (description
14650 "The @code{ratelimiter} module ensures that an operation will not be
14651executed more than a given number of times during a given period.")
14652 (license license:asl2.0)))
14653
14654(define-public python2-ratelimiter
14655 (package-with-python2 python-ratelimiter))
14656
14657(define-public python-dukpy
14658 (package
14659 (name "python-dukpy")
14660 (version "0.3")
14661 (source
14662 (origin
5b77ebe1
TGR
14663 (method git-fetch)
14664 (uri (git-reference
14665 (url "https://github.com/kovidgoyal/dukpy.git")
14666 (commit (string-append "v" version))))
14667 (file-name (git-file-name name version))
44d10b1f 14668 (sha256
5b77ebe1 14669 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14670 (build-system python-build-system)
14671 (home-page "https://github.com/kovidgoyal/dukpy")
14672 (synopsis "Run JavaScript in python")
14673 (description
14674 "dukpy is a JavaScript runtime environment for Python using the duktape
14675embeddable JavaScript engine.")
14676 ;; Dukpy is licensed under MIT like the embedded duktape library,
14677 ;; with 'errors.c' as GPL3.
14678 (license (list license:expat license:gpl3))))
14679
14680(define-public python2-dukpy
14681 (package-with-python2 python-dukpy))
14682
14683(define-public python-jsonrpclib-pelix
14684 (package
14685 (name "python-jsonrpclib-pelix")
14686 (version "0.3.2")
14687 (source
14688 (origin
14689 (method url-fetch)
14690 (uri (pypi-uri "jsonrpclib-pelix" version))
14691 (sha256
14692 (base32
14693 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14694 (build-system python-build-system)
14695 (arguments
14696 `(#:tests? #f)) ; no tests in PyPI tarball
14697 (home-page "https://github.com/tcalmant/jsonrpclib/")
14698 (synopsis "JSON-RPC 2.0 client library for Python")
14699 (description
14700 "This library implements the JSON-RPC v2.0
14701specification (backwards-compatible) as a client library for Python. This
14702version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14703services.")
14704 (license license:asl2.0)))
14705
14706(define-public python2-jsonrpclib-pelix
14707 (package-with-python2 python-jsonrpclib-pelix))
14708
14709(define-public python-setuptools-scm-git-archive
14710 (package
14711 (name "python-setuptools-scm-git-archive")
14712 (version "1.0")
14713 (source
14714 (origin
14715 (method url-fetch)
14716 (uri (pypi-uri "setuptools_scm_git_archive" version))
14717 (sha256
14718 (base32
14719 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14720 (build-system python-build-system)
14721 (native-inputs
14722 `(("python-pytest" ,python-pytest)))
14723 (propagated-inputs
14724 `(("python-setuptools-scm" ,python-setuptools-scm)))
14725 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14726 (synopsis "Setuptools_scm plugin for git archives")
14727 (description
14728 "The setuptools_scm_git_archive package is a plugin to
14729setuptools_scm, which supports obtaining versions from git archives that
14730belong to tagged versions.")
14731 (license license:expat)))
14732
14733(define-public python2-setuptools-scm-git-archive
14734 (package-with-python2 python-setuptools-scm-git-archive))
14735
724a350c
RW
14736(define-public python-setuptools-git
14737 (package
14738 (name "python-setuptools-git")
14739 (version "1.2")
14740 (source
14741 (origin
14742 (method url-fetch)
14743 (uri (pypi-uri "setuptools-git" version))
14744 (sha256
14745 (base32
14746 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14747 (build-system python-build-system)
14748 (arguments
14749 `(#:phases
14750 (modify-phases %standard-phases
14751 ;; This is needed for tests.
14752 (add-after 'unpack 'configure-git
14753 (lambda _
14754 (setenv "HOME" "/tmp")
14755 (invoke "git" "config" "--global" "user.email" "guix")
14756 (invoke "git" "config" "--global" "user.name" "guix")
14757 #t)))))
14758 (native-inputs
14759 `(("git" ,git-minimal)))
14760 (home-page "https://github.com/msabramo/setuptools-git")
14761 (synopsis "Setuptools revision control system plugin for Git")
14762 (description
14763 "This package provides a plugin for Setuptools for revision control with
14764Git.")
14765 (license license:bsd-3)))
14766
44d10b1f
RW
14767(define-public python-pyclipper
14768 (package
14769 (name "python-pyclipper")
ff3d1b99 14770 (version "1.1.0.post3")
44d10b1f
RW
14771 (source
14772 (origin
14773 (method url-fetch)
14774 (uri (pypi-uri "pyclipper" version ".zip"))
14775 (sha256
ff3d1b99 14776 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14777 (modules '((guix build utils)))
14778 (snippet
14779 '(begin
14780 ;; This file is generated by Cython.
14781 (delete-file "pyclipper/pyclipper.cpp") #t))))
14782 (build-system python-build-system)
14783 (arguments
14784 `(#:phases
14785 (modify-phases %standard-phases
14786 (add-before 'build 'cythonize-sources
14787 (lambda _
14788 (with-directory-excursion "pyclipper"
14789 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14790 (propagated-inputs
14791 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14792 (native-inputs
14793 `(("python-cython" ,python-cython)
14794 ("python-pytest" ,python-pytest)
14795 ("python-pytest-runner" ,python-pytest-runner)
14796 ("python-unittest2" ,python-unittest2)
14797 ("unzip" ,unzip)))
14798 (home-page "https://github.com/greginvm/pyclipper")
14799 (synopsis "Wrapper for Angus Johnson's Clipper library")
14800 (description
14801 "Pyclipper is a Cython wrapper for the C++ translation of the
14802Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14803 (license license:expat)))
14804
14805(define-public python2-pyclipper
14806 (package-with-python2 python-pyclipper))
14807
14808(define-public python2-booleanoperations
14809 (package
14810 (name "python2-booleanoperations")
14811 (version "0.7.1")
14812 (source
14813 (origin
14814 (method url-fetch)
14815 (uri (pypi-uri "booleanOperations" version ".zip"))
14816 (sha256
14817 (base32
14818 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14819 (build-system python-build-system)
14820 (arguments
14821 `(#:python ,python-2))
14822 (native-inputs
14823 `(("unzip" ,unzip)
14824 ("python2-pytest" ,python2-pytest)
14825 ("python2-pytest-runner" ,python2-pytest-runner)))
14826 (propagated-inputs
14827 `(("python-fonttools" ,python2-fonttools)
14828 ("python-pyclipper" ,python2-pyclipper)
14829 ("python-ufolib" ,python2-ufolib)))
14830 (home-page "https://github.com/typemytype/booleanOperations")
14831 (synopsis "Boolean operations on paths")
14832 (description
14833 "BooleanOperations provides a Python library that enables
14834boolean operations on paths.")
14835 (license license:expat)))
14836
14837(define-public python-tempdir
14838 (package
14839 (name "python-tempdir")
14840 (version "0.7.1")
14841 (source
14842 (origin
14843 (method url-fetch)
14844 (uri (pypi-uri "tempdir" version))
14845 (sha256
14846 (base32
14847 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14848 (build-system python-build-system)
14849 (home-page "https://pypi.org/project/tempdir/")
14850 (arguments
14851 ;; the package has no tests
14852 '(#:tests? #f))
14853 (synopsis "Python library for managing temporary directories")
14854 (description
14855 "This library manages temporary directories that are automatically
14856deleted with all their contents when they are no longer needed. It is
14857particularly convenient for use in tests.")
14858 (license license:expat)))
14859
14860(define-public python2-tempdir
14861 (package-with-python2 python-tempdir))
14862
14863(define-public python-activepapers
14864 (package
14865 (name "python-activepapers")
14866 (version "0.2.2")
14867 (source
14868 (origin
14869 (method url-fetch)
14870 (uri (pypi-uri "ActivePapers.Py" version))
14871 (sha256
14872 (base32
14873 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14874 (build-system python-build-system)
14875 (arguments
14876 `(#:modules ((ice-9 ftw)
14877 (srfi srfi-1)
14878 (guix build utils)
14879 (guix build python-build-system))
14880
14881 #:phases
14882 (modify-phases %standard-phases
14883 (add-after 'unpack 'delete-python2-code
14884 (lambda _
14885 (for-each delete-file
14886 '("lib/activepapers/builtins2.py"
14887 "lib/activepapers/standardlib2.py"
14888 "lib/activepapers/utility2.py"))))
14889 (replace 'check
14890 (lambda _
14891 ;; Deactivate the test cases that download files
14892 (setenv "NO_NETWORK_ACCESS" "1")
14893 ;; For some strange reason, some tests fail if nosetests runs all
14894 ;; test modules in a single execution. They pass if each test
14895 ;; module is run individually.
14896 (for-each (lambda (filename)
14897 (invoke "nosetests"
14898 (string-append "tests/" filename)))
14899 (scandir "tests"
14900 (lambda (filename)
14901 (string-suffix? ".py" filename)))))))))
14902 (native-inputs
14903 `(("python-tempdir" ,python-tempdir)
14904 ("python-nose" ,python-nose)))
14905 (propagated-inputs
14906 `(("python-h5py" ,python-h5py)))
26827dfe 14907 (home-page "https://www.activepapers.org/")
44d10b1f
RW
14908 (synopsis "Executable papers for scientific computing")
14909 (description
14910 "ActivePapers is a tool for working with executable papers, which
14911combine data, code, and documentation in single-file packages,
14912suitable for publication as supplementary material or on repositories
14913such as figshare or Zenodo.")
14914 (properties `((python2-variant . ,(delay python2-activepapers))))
14915 (license license:bsd-3)))
14916
14917(define-public python2-activepapers
14918 (let ((base (package-with-python2
14919 (strip-python2-variant python-activepapers))))
14920 (package
14921 (inherit base)
14922 (arguments
14923 (substitute-keyword-arguments (package-arguments base)
14924 ((#:phases phases)
14925 `(modify-phases ,phases
14926 (delete 'delete-python2-code)
14927 (add-after 'unpack 'delete-python3-code
14928 (lambda _
14929 (for-each delete-file
14930 '("lib/activepapers/builtins3.py"
14931 "lib/activepapers/standardlib3.py"
14932 "lib/activepapers/utility3.py")))))))))))
14933
14934(define-public python-semver
14935 (package
14936 (name "python-semver")
594280b1 14937 (version "2.9.0")
44d10b1f 14938 (source
2ecbba24
BG
14939 (origin
14940 (method url-fetch)
14941 (uri (pypi-uri "semver" version))
14942 (sha256
14943 (base32
14944 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
44d10b1f 14945 (build-system python-build-system)
44d10b1f 14946 (native-inputs
b4e1ca06
RJ
14947 `(("python-appdirs" ,python-appdirs)
14948 ("python-distlib" ,python-distlib)
14949 ("python-importlib-metadata" ,python-importlib-metadata)
14950 ("python-filelock" ,python-filelock)
14951 ("python-six" ,python-six)
14952 ("python-tox" ,python-tox)
44d10b1f
RW
14953 ("python-virtualenv" ,python-virtualenv)))
14954 (home-page "https://github.com/k-bx/python-semver")
14955 (synopsis "Python helper for Semantic Versioning")
14956 (description "This package provides a Python library for
14957@url{Semantic Versioning, http://semver.org/}.")
14958 (license license:bsd-3)))
14959
14960(define-public python2-semver
14961 (package-with-python2 python-semver))
14962
14963(define-public python-pyro4
14964 (package
14965 (name "python-pyro4")
3ce91d44 14966 (version "4.77")
44d10b1f
RW
14967 (source
14968 (origin
14969 (method url-fetch)
14970 (uri (pypi-uri "Pyro4" version))
14971 (sha256
3ce91d44 14972 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 14973 (build-system python-build-system)
3ce91d44
GL
14974 (arguments
14975 '(#:tests? #f)) ;FIXME: Some tests require network access.
14976 (native-inputs
14977 `(("python-cloudpickle" ,python-cloudpickle)
14978 ("python-dill" ,python-dill)
14979 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
14980 (propagated-inputs
14981 `(("python-serpent" ,python-serpent)))
14982 (home-page "https://pyro4.readthedocs.io")
14983 (synopsis "Distributed object middleware for Python")
14984 (description
14985 "Pyro enables you to build applications in which objects can talk to each
14986other over the network. You can just use normal Python method calls to call
14987objects on other machines, also known as remote procedure calls (RPC).")
14988 (license license:expat)))
14989
14990(define-public python2-pyro
14991 (package
14992 (name "python2-pyro")
14993 (version "3.16")
14994 (source
14995 (origin
14996 (method url-fetch)
14997 (uri (pypi-uri "Pyro" version))
14998 (file-name (string-append "Pyro-" version ".tar.gz"))
14999 (sha256
15000 (base32
15001 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
15002 (build-system python-build-system)
15003 (arguments
15004 ;; Pyro is not compatible with Python 3
15005 `(#:python ,python-2
15006 ;; Pyro has no test cases for automatic execution
15007 #:tests? #f))
15008 (home-page "http://pythonhosted.org/Pyro/")
15009 (synopsis "Distributed object manager for Python")
15010 (description "Pyro is a Distributed Object Technology system
15011written in Python that is designed to be easy to use. It resembles
15012Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
15013which is a system and language independent Distributed Object Technology
15014and has much more to offer than Pyro or RMI. Pyro 3.x is no
15015longer maintained. New projects should use Pyro4 instead, which
15016is the new Pyro version that is actively developed.")
15017 (license license:expat)))
15018
15019(define-public python2-scientific
15020 (package
15021 (name "python2-scientific")
15022 (version "2.9.4")
15023 (source
15024 (origin
c695f011
KH
15025 (method git-fetch)
15026 (uri (git-reference
15027 (url "https://github.com/khinsen/ScientificPython")
15028 (commit (string-append "rel" version))))
15029 (file-name (git-file-name name version))
44d10b1f
RW
15030 (sha256
15031 (base32
c695f011 15032 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
15033 (build-system python-build-system)
15034 (inputs
15035 `(("netcdf" ,netcdf)))
15036 (propagated-inputs
15037 `(("python-numpy" ,python2-numpy-1.8)
15038 ("python-pyro" ,python2-pyro)))
15039 (arguments
15040 ;; ScientificPython is not compatible with Python 3
15041 `(#:python ,python-2
15042 #:tests? #f ; No test suite
15043 #:phases
15044 (modify-phases %standard-phases
15045 (replace 'build
15046 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
15047 (invoke "python" "setup.py" "build"
15048 (string-append "--netcdf_prefix="
15049 (assoc-ref inputs "netcdf"))))))))
c695f011 15050 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
15051 (synopsis "Python modules for scientific computing")
15052 (description "ScientificPython is a collection of Python modules that are
15053useful for scientific computing. Most modules are rather general (Geometry,
15054physical units, automatic derivatives, ...) whereas others are more
15055domain-specific (e.g. netCDF and PDB support). The library is currently
15056not actively maintained and works only with Python 2 and NumPy < 1.9.")
15057 (license license:cecill-c)))
15058
15059(define-public python2-mmtk
15060 (package
15061 (name "python2-mmtk")
fe9b72c5 15062 (version "2.7.12")
44d10b1f
RW
15063 (source
15064 (origin
fe9b72c5
KH
15065 (method git-fetch)
15066 (uri (git-reference
15067 (url "https://github.com/khinsen/MMTK")
15068 (commit (string-append "rel" version))))
15069 (file-name (git-file-name name version))
44d10b1f
RW
15070 (sha256
15071 (base32
fe9b72c5 15072 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
15073 (build-system python-build-system)
15074 (native-inputs
15075 `(("netcdf" ,netcdf)))
15076 (propagated-inputs
15077 `(("python-scientific" ,python2-scientific)
15078 ("python-tkinter" ,python-2 "tk")))
15079 (arguments
15080 `(#:python ,python-2
15081 #:tests? #f
15082 #:phases
15083 (modify-phases %standard-phases
15084 (add-before 'build 'includes-from-scientific
15085 (lambda* (#:key inputs #:allow-other-keys)
15086 (mkdir-p "Include/Scientific")
15087 (copy-recursively
15088 (string-append
15089 (assoc-ref inputs "python-scientific")
15090 "/include/python2.7/Scientific")
15091 "Include/Scientific"))))))
15092 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
15093 (synopsis "Python library for molecular simulation")
15094 (description "MMTK is a library for molecular simulations with an emphasis
15095on biomolecules. It provides widely used methods such as Molecular Dynamics
15096and normal mode analysis, but also basic routines for implementing new methods
15097for simulation and analysis. The library is currently not actively maintained
15098and works only with Python 2 and NumPy < 1.9.")
15099 (license license:cecill-c)))
15100
15101(define-public python-phonenumbers
15102 (package
15103 (name "python-phonenumbers")
15104 (version "8.9.1")
15105 (source
15106 (origin
15107 (method url-fetch)
15108 (uri (pypi-uri "phonenumbers" version))
15109 (sha256
15110 (base32
15111 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
15112 (build-system python-build-system)
15113 (home-page
15114 "https://github.com/daviddrysdale/python-phonenumbers")
15115 (synopsis
15116 "Python library for dealing with international phone numbers")
15117 (description
15118 "This package provides a Python port of Google's libphonenumber library.")
15119 (license license:asl2.0)))
15120
15121(define-public python2-phonenumbers
15122 (package-with-python2 python-phonenumbers))
15123
15124(define-public python-send2trash
15125 (package
15126 (name "python-send2trash")
d9b0216b 15127 (version "1.5.0")
44d10b1f 15128 (source
d9b0216b 15129 (origin (method git-fetch)
44d10b1f 15130 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
15131 (uri (git-reference
15132 (url "https://github.com/hsoft/send2trash.git")
15133 (commit version)))
15134 (file-name (git-file-name name version))
44d10b1f
RW
15135 (sha256
15136 (base32
d9b0216b 15137 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
15138 (build-system python-build-system)
15139 (arguments
15140 '(#:phases
15141 (modify-phases %standard-phases
15142 (add-before 'check 'pre-check
15143 (lambda _
15144 (mkdir-p "/tmp/foo")
15145 (setenv "HOME" "/tmp/foo")
15146 #t)))))
15147 (home-page "https://github.com/hsoft/send2trash")
15148 (synopsis "Send files to the user's @file{~/Trash} directory")
15149 (description "This package provides a Python library to send files to the
15150user's @file{~/Trash} directory.")
20b3fde7 15151 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
15152 (license license:bsd-3)))
15153
15154(define-public python2-send2trash
15155 (package
f32164ab 15156 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
15157 (arguments
15158 (substitute-keyword-arguments (package-arguments python-send2trash)
15159 ((#:phases phases)
15160 `(modify-phases ,phases
15161 (add-before 'check 'setenv
15162 (lambda _
15163 (setenv "PYTHONPATH"
15164 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 15165 #t))))))))
44d10b1f
RW
15166
15167(define-public python-yapf
15168 (package
15169 (name "python-yapf")
19ba75dc 15170 (version "0.29.0")
44d10b1f
RW
15171 (source
15172 (origin
15173 (method url-fetch)
15174 (uri (pypi-uri "yapf" version))
15175 (sha256
15176 (base32
19ba75dc 15177 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
44d10b1f
RW
15178 (build-system python-build-system)
15179 (home-page "https://github.com/google/yapf")
15180 (synopsis "Formatter for Python code")
15181 (description "YAPF is a formatter for Python code. It's based off of
15182@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
15183takes the code and reformats it to the best formatting that conforms to the
15184style guide, even if the original code didn't violate the style guide.")
15185 (license license:asl2.0)))
15186
15187(define-public python2-yapf
15188 (package-with-python2 python-yapf))
15189
15190(define-public python-gyp
15191 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
15192 (revision "0"))
15193 (package
15194 (name "python-gyp")
15195 ;; Google does not release versions,
15196 ;; based on second most recent commit date.
15197 (version (git-version "0.0.0" revision commit))
15198 (source
15199 (origin
15200 ;; Google does not release tarballs,
15201 ;; git checkout is needed.
15202 (method git-fetch)
15203 (uri (git-reference
15204 (url "https://chromium.googlesource.com/external/gyp")
15205 (commit commit)))
15206 (file-name (git-file-name name version))
15207 (sha256
15208 (base32
15209 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
15210 (build-system python-build-system)
15211 (home-page "https://gyp.gsrc.io/")
15212 (synopsis "GYP is a Meta-Build system")
15213 (description
15214 "GYP builds build systems for large, cross platform applications.
15215It can be used to generate XCode projects, Visual Studio projects, Ninja build
15216files, and Makefiles.")
15217 (license license:bsd-3))))
15218
15219(define-public python2-gyp
15220 (package-with-python2 python-gyp))
15221
15222(define-public python-whatever
15223 (package
15224 (name "python-whatever")
97610a66 15225 (version "0.6")
44d10b1f
RW
15226 (source
15227 (origin
ac0ea38c
EF
15228 (method git-fetch)
15229 (uri (git-reference
15230 (url "https://github.com/Suor/whatever")
15231 (commit version)))
15232 (file-name (git-file-name name version))
44d10b1f 15233 (sha256
ac0ea38c 15234 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
44d10b1f
RW
15235 (build-system python-build-system)
15236 (arguments
15237 `(#:phases
15238 (modify-phases %standard-phases
15239 (replace 'check
15240 (lambda _
15241 (invoke "py.test"))))))
15242 (native-inputs
15243 `(("python-pytest" ,python-pytest)))
15244 (home-page "http://github.com/Suor/whatever")
15245 (synopsis "Make anonymous functions by partial application of operators")
15246 (description "@code{whatever} provides an easy way to make anonymous
15247functions by partial application of operators.")
15248 (license license:bsd-3)))
15249
15250(define-public python2-whatever
15251 (package-with-python2 python-whatever))
15252
15253(define-public python-funcy
15254 (package
15255 (name "python-funcy")
9e396ab8 15256 (version "1.11")
44d10b1f
RW
15257 (source
15258 (origin
a85c6027
TGR
15259 (method git-fetch)
15260 (uri (git-reference
15261 (url "https://github.com/Suor/funcy.git")
15262 (commit version)))
44d10b1f 15263 (sha256
a85c6027
TGR
15264 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
15265 (file-name (git-file-name name version))))
44d10b1f
RW
15266 (build-system python-build-system)
15267 (arguments
15268 `(#:phases
15269 (modify-phases %standard-phases
15270 (replace 'check
15271 (lambda _
15272 (invoke "py.test"))))))
15273 (native-inputs
15274 `(("python-pytest" ,python-pytest)
15275 ("python-whatever" ,python-whatever)))
15276 (home-page "http://github.com/Suor/funcy")
15277 (synopsis "Functional tools")
15278 (description "@code{funcy} is a library that provides functional tools.
15279Examples are:
15280@enumerate
15281@item merge - Merges collections of the same type
15282@item walk - Type-preserving map
15283@item select - Selects a part of a collection
15284@item take - Takes the first n items of a collection
15285@item first - Takes the first item of a collection
15286@item remove - Predicated-removes items of a collection
15287@item concat - Concatenates two collections
15288@item flatten - Flattens a collection with subcollections
15289@item distinct - Returns only distinct items
15290@item split - Predicated-splits a collection
15291@item split_at - Splits a collection at a given item
15292@item group_by - Groups items by group
15293@item pairwise - Pairs off adjacent items
15294@item partial - Partially-applies a function
15295@item curry - Curries a function
15296@item compose - Composes functions
15297@item complement - Complements a predicate
15298@item all_fn - \"all\" with predicate
15299@end enumerate")
15300 (license license:bsd-3)))
15301
15302(define-public python2-funcy
15303 (package-with-python2 python-funcy))
15304
15305(define-public python-isoweek
15306 (package
15307 (name "python-isoweek")
15308 (version "1.3.3")
15309 (source
15310 (origin
15311 (method url-fetch)
15312 (uri (pypi-uri "isoweek" version))
15313 (sha256
15314 (base32
15315 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
15316 (build-system python-build-system)
15317 (home-page "https://github.com/gisle/isoweek")
15318 (synopsis "Objects representing a week")
15319 (description "The @code{isoweek} module provide the class Week that
15320implements the week definition of ISO 8601. This standard also defines
15321a notation for identifying weeks; yyyyWww (where the W is a literal).
15322Week instances stringify to this form.")
15323 (license license:bsd-3)))
15324
15325(define-public python2-isoweek
15326 (package-with-python2 python-isoweek))
15327
15328(define-public python-tokenize-rt
15329 (package
15330 (name "python-tokenize-rt")
15331 (version "2.0.1")
15332 (source
15333 (origin
15334 (method url-fetch)
15335 (uri (pypi-uri "tokenize-rt" version))
15336 (sha256
15337 (base32
15338 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
15339 (build-system python-build-system)
15340 (home-page "https://github.com/asottile/tokenize-rt")
15341 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
15342 (description
15343 "This Python library is a wrapper around @code{tokenize} from the Python
15344standard library. It provides two additional tokens @code{ESCAPED_NL} and
15345@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
15346and @code{tokens_to_src} to roundtrip.")
15347 (license license:expat)))
15348
15349(define-public python-future-fstrings
15350 (package
15351 (name "python-future-fstrings")
15352 (version "0.4.1")
15353 (source
15354 (origin
15355 (method url-fetch)
15356 (uri (pypi-uri "future_fstrings" version))
15357 (sha256
15358 (base32
15359 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
15360 (build-system python-build-system)
15361 (propagated-inputs
15362 `(("python-tokenize-rt" ,python-tokenize-rt)))
15363 (home-page "https://github.com/asottile/future-fstrings")
15364 (synopsis "Backport of fstrings to Python < 3.6")
15365 (description
15366 "This package provides a UTF-8 compatible encoding
15367@code{future_fstrings}, which performs source manipulation. It decodes the
15368source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
15369@code{f} strings.")
15370 (license license:expat)))
15371
dae2eb1c
MC
15372(define-public python-typed-ast
15373 (package
15374 (name "python-typed-ast")
bae89583 15375 (version "1.4.0")
dae2eb1c
MC
15376 (source
15377 (origin
bae89583
MO
15378 (method git-fetch)
15379 (uri (git-reference
15380 (url "https://github.com/python/typed_ast.git")
15381 (commit version)))
dae2eb1c 15382 (sha256
bae89583
MO
15383 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
15384 (file-name (git-file-name name version))))
dae2eb1c
MC
15385 (build-system python-build-system)
15386 (arguments
15387 `(#:modules ((guix build utils)
15388 (guix build python-build-system)
15389 (ice-9 ftw)
15390 (srfi srfi-1)
15391 (srfi srfi-26))
15392 #:phases
15393 (modify-phases %standard-phases
15394 (replace 'check
15395 (lambda _
15396 (let ((cwd (getcwd)))
15397 (setenv "PYTHONPATH"
15398 (string-append cwd "/build/"
15399 (find (cut string-prefix? "lib" <>)
15400 (scandir (string-append cwd "/build")))
15401 ":"
15402 (getenv "PYTHONPATH"))))
15403 (invoke "pytest")
15404 #t)))))
15405 (native-inputs `(("python-pytest" ,python-pytest)))
15406 (home-page "https://github.com/python/typed_ast")
15407 (synopsis "Fork of Python @code{ast} modules with type comment support")
15408 (description "This package provides a parser similar to the standard
15409@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
15410include PEP 484 type comments and are independent of the version of Python
15411under which they are run. The @code{typed_ast} parsers produce the standard
15412Python AST (plus type comments), and are both fast and correct, as they are
15413based on the CPython 2.7 and 3.7 parsers.")
15414 ;; See the file "LICENSE" for the details.
15415 (license (list license:psfl
15416 license:asl2.0
15417 license:expat)))) ;ast27/Parser/spark.py
15418
44d10b1f
RW
15419(define-public python-typing
15420 (package
15421 (name "python-typing")
15422 (version "3.6.6")
15423 (source
15424 (origin
15425 (method url-fetch)
15426 (uri (pypi-uri "typing" version))
15427 (sha256
15428 (base32
15429 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
15430 (build-system python-build-system)
15431 (home-page "https://docs.python.org/3/library/typing.html")
15432 (synopsis "Type hints for Python")
15433 (description "This is a backport of the standard library @code{typing}
15434module to Python versions older than 3.5. Typing defines a standard notation
15435for Python function and variable type annotations. The notation can be used
15436for documenting code in a concise, standard format, and it has been designed
15437to also be used by static and runtime type checkers, static analyzers, IDEs
15438and other tools.")
15439 (license license:psfl)))
15440
15441(define-public python2-typing
15442 (package-with-python2 python-typing))
15443
f89d443b
VC
15444(define-public python-typing-extensions
15445 (package
15446 (name "python-typing-extensions")
15447 (version "3.7.2")
15448 (source
15449 (origin
15450 (method url-fetch)
15451 (uri (pypi-uri "typing_extensions" version))
15452 (sha256
15453 (base32
15454 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
15455 (build-system python-build-system)
15456 (home-page
15457 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
15458 (synopsis "Experimental type hints for Python")
15459 (description
15460 "The typing_extensions module contains additional @code{typing} hints not
15461yet present in the of the @code{typing} standard library.
15462Included are implementations of:
15463@enumerate
15464@item ClassVar
15465@item ContextManager
15466@item Counter
15467@item DefaultDict
15468@item Deque
15469@item NewType
15470@item NoReturn
15471@item overload
15472@item Protocol
15473@item runtime
15474@item Text
15475@item Type
15476@item TYPE_CHECKING
15477@item AsyncGenerator
15478@end enumerate\n")
15479 (license license:psfl)))
15480
44d10b1f
RW
15481(define-public bpython
15482 (package
15483 (name "bpython")
4de93b2f 15484 (version "0.18")
44d10b1f
RW
15485 (source
15486 (origin
15487 (method url-fetch)
15488 (uri (pypi-uri "bpython" version))
15489 (sha256
4de93b2f 15490 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
15491 (build-system python-build-system)
15492 (arguments
15493 `(#:phases
15494 (modify-phases %standard-phases
15495 (add-after 'unpack 'remove-failing-test
15496 (lambda _
15497 ;; Remove failing test. FIXME: make it pass
15498 (delete-file "bpython/test/test_args.py")
15499 #t))
15500 (add-after 'wrap 'add-aliases
15501 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15502 (lambda* (#:key outputs #:allow-other-keys)
15503 (let ((out (assoc-ref outputs "out")))
15504 (for-each
15505 (lambda (old new)
15506 (symlink old (string-append out "/bin/" new)))
15507 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
15508 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
15509 #t)))))
15510 (propagated-inputs
15511 `(("python-pygments" ,python-pygments)
15512 ("python-requests" ,python-requests)
4de93b2f 15513 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
15514 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
15515 ("python-greenlet" ,python-greenlet)
4de93b2f 15516 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
15517 ("python-six" ,python-six)))
15518 (native-inputs
15519 `(("python-sphinx" ,python-sphinx)
15520 ("python-mock" ,python-mock)))
15521 (home-page "https://bpython-interpreter.org/")
15522 (synopsis "Fancy interface to the Python interpreter")
15523 (description "Bpython is a fancy interface to the Python
15524interpreter. bpython's main features are
15525
15526@enumerate
15527@item in-line syntax highlighting,
15528@item readline-like autocomplete with suggestions displayed as you type,
15529@item expected parameter list for any Python function,
15530@item \"rewind\" function to pop the last line of code from memory and
15531 re-evaluate,
15532@item send the code you've entered off to a pastebin,
15533@item save the code you've entered to a file, and
15534@item auto-indentation.
15535@end enumerate")
15536 (license license:expat)))
15537
15538(define-public bpython2
15539 (let ((base (package-with-python2
15540 (strip-python2-variant bpython))))
15541 (package (inherit base)
15542 (name "bpython2")
15543 (arguments
15544 `(#:python ,python-2
15545 #:phases
15546 (modify-phases %standard-phases
15547 (add-after 'unpack 'remove-failing-test
15548 (lambda _
15549 ;; Remove failing test. FIXME: make it pass
15550 (delete-file "bpython/test/test_args.py")
15551 ;; Disable failing test-cases (renaming inhibits they are
15552 ;; discovered)
15553 (substitute* "bpython/test/test_curtsies_repl.py"
15554 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15555 (string-append a "xxx_off_" b))
15556 (("^(\\s*def )(test_complex\\W)" _ a b)
15557 (string-append a "xxx_off_" b)))
15558 #t))
15559 (add-before 'build 'rename-scripts
15560 ;; rename the scripts to bypthon2, bpdb2, etc.
15561 (lambda _
15562 (substitute* "setup.py"
15563 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15564 (string-append name "2" rest "\n"))
15565 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15566 (string-append name "2" (or sub "") rest "\n")))
15567 #t))))))))
15568
15569(define-public python-pyinotify
15570 (package
15571 (name "python-pyinotify")
15572 (version "0.9.6")
15573 (source (origin
15574 (method url-fetch)
15575 (uri (pypi-uri "pyinotify" version))
15576 (sha256
15577 (base32
15578 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15579 (build-system python-build-system)
15580 (arguments `(#:tests? #f)) ;no tests
15581 (home-page "https://github.com/seb-m/pyinotify")
15582 (synopsis "Python library for monitoring inotify events")
15583 (description
15584 "@code{pyinotify} provides a Python interface for monitoring
15585file system events on Linux.")
15586 (license license:expat)))
15587
15588(define-public python2-pyinotify
15589 (package-with-python2 python-pyinotify))
15590
15591;; Ada parser uses this version.
15592(define-public python2-quex-0.67.3
15593 (package
15594 (name "python2-quex")
15595 (version "0.67.3")
15596 (source
15597 (origin
15598 (method url-fetch)
15599 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15600 (version-major+minor version)
15601 "/quex-" version ".zip"))
15602 (sha256
15603 (base32
15604 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15605 (build-system python-build-system)
15606 (native-inputs
15607 `(("unzip" ,unzip)))
15608 (arguments
15609 `(#:python ,python-2
15610 #:tests? #f
15611 #:phases
15612 (modify-phases %standard-phases
15613 (delete 'configure)
15614 (delete 'build)
15615 (replace 'install
15616 (lambda* (#:key outputs #:allow-other-keys)
15617 (let* ((out (assoc-ref outputs "out"))
15618 (share/quex (string-append out "/share/quex"))
15619 (bin (string-append out "/bin")))
15620 (copy-recursively "." share/quex)
15621 (mkdir-p bin)
15622 (symlink (string-append share/quex "/quex-exe.py")
15623 (string-append bin "/quex"))
15624 #t))))))
15625 (native-search-paths
15626 (list (search-path-specification
15627 (variable "QUEX_PATH")
15628 (files '("share/quex")))))
15629 (home-page "http://quex.sourceforge.net/")
15630 (synopsis "Lexical analyzer generator in Python")
15631 (description "@code{quex} is a lexical analyzer generator in Python.")
15632 (license license:lgpl2.1+))) ; Non-military
15633
15634(define-public python2-quex
15635 (package (inherit python2-quex-0.67.3)
15636 (name "python2-quex")
15637 (version "0.68.1")
15638 (source
15639 (origin
15640 (method url-fetch)
15641 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15642 (sha256
15643 (base32
15644 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15645 (file-name (string-append name "-" version ".tar.gz"))))))
15646
15647(define-public python-more-itertools
15648 (package
15649 (name "python-more-itertools")
1b066827 15650 (version "7.1.0")
44d10b1f
RW
15651 (source
15652 (origin
15653 (method url-fetch)
15654 (uri (pypi-uri "more-itertools" version))
15655 (sha256
15656 (base32
1b066827 15657 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15658 (build-system python-build-system)
44d10b1f
RW
15659 (home-page "https://github.com/erikrose/more-itertools")
15660 (synopsis "More routines for operating on iterables, beyond itertools")
15661 (description "Python's built-in @code{itertools} module implements a
15662number of iterator building blocks inspired by constructs from APL, Haskell,
15663and SML. @code{more-itertools} includes additional building blocks for
15664working with iterables.")
47f66348 15665 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15666 (license license:expat)))
15667
47f66348 15668;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15669(define-public python2-more-itertools
47f66348
MB
15670 (package
15671 (inherit python-more-itertools)
15672 (name "python2-more-itertools")
15673 (version "5.0.0")
15674 (source (origin
15675 (method url-fetch)
15676 (uri (pypi-uri "more-itertools" version))
15677 (sha256
15678 (base32
15679 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15680 (arguments
15681 `(#:python ,python2-minimal))
15682 (propagated-inputs
15683 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15684
15685(define-public python-latexcodec
15686 (package
15687 (name "python-latexcodec")
f3415ba5 15688 (version "1.0.7")
44d10b1f
RW
15689 (source
15690 (origin
15691 (method url-fetch)
15692 (uri (pypi-uri "latexcodec" version))
15693 (sha256
f3415ba5 15694 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15695 (build-system python-build-system)
15696 (inputs
15697 `(("python-six" ,python-six)))
15698 (home-page "https://readthedocs.org/projects/latexcodec/")
15699 (synopsis "Work with LaTeX code in Python")
15700 (description "Lexer and codec to work with LaTeX code in Python.")
15701 (license license:expat)))
15702
15703(define-public python-pybtex
15704 (package
15705 (name "python-pybtex")
9441a9c1 15706 (version "0.22.2")
44d10b1f
RW
15707 (source
15708 (origin
15709 (method url-fetch)
15710 (uri (pypi-uri "pybtex" version))
15711 (sha256
9441a9c1 15712 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15713 (build-system python-build-system)
15714 (native-inputs
15715 `(("python-nose" ,python-nose)))
15716 (inputs
15717 `(("python-latexcodec" ,python-latexcodec)
15718 ("python-pyyaml" ,python-pyyaml)
15719 ("python-six" ,python-six)))
15720 (arguments
15721 `(#:test-target "nosetests"))
15722 (home-page "https://pybtex.org/")
15723 (synopsis "BibTeX-compatible bibliography processor")
15724 (description "Pybtex is a BibTeX-compatible bibliography processor written
15725in Python. You can simply type pybtex instead of bibtex.")
15726 (license license:expat)))
15727
15728(define-public python-onetimepass
15729 (package
15730 (name "python-onetimepass")
15731 (version "1.0.1")
15732 (source
15733 (origin
15734 (method url-fetch)
15735 (uri (pypi-uri "onetimepass" version))
15736 (sha256
15737 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15738 (build-system python-build-system)
15739 (propagated-inputs `(("python-six" ,python-six)))
15740 (home-page "https://github.com/tadeck/onetimepass/")
15741 (synopsis "One-time password library")
15742 (description "Python one-time password library for HMAC-based (HOTP) and
15743time-based (TOTP) passwords.")
15744 (license license:expat)))
15745
15746(define-public python-parso
15747 (package
15748 (name "python-parso")
a4abed71 15749 (version "0.6.2")
44d10b1f
RW
15750 (source
15751 (origin
15752 (method url-fetch)
15753 (uri (pypi-uri "parso" version))
15754 (sha256
15755 (base32
a4abed71 15756 "0mr1j4ijqnrihz1yap34g6i8vjldg5lz814sz4v0d8pbqvh5jmhc"))))
44d10b1f
RW
15757 (native-inputs
15758 `(("python-pytest" ,python-pytest)))
15759 (build-system python-build-system)
4eb97c25
MC
15760 (arguments
15761 `(#:phases (modify-phases %standard-phases
15762 (replace 'check
15763 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15764 (home-page "https://github.com/davidhalter/parso")
15765 (synopsis "Python Parser")
15766 (description "Parso is a Python parser that supports error recovery and
15767round-trip parsing for different Python versions (in multiple Python versions).
15768Parso is also able to list multiple syntax errors in your Python file.")
15769 (license license:expat)))
15770
15771(define-public python2-parso
15772 (package-with-python2 python-parso))
15773
15774(define-public python-async-generator
15775 (package
15776 (name "python-async-generator")
94fcbf8d 15777 (version "1.10")
44d10b1f
RW
15778 (source
15779 (origin
15780 (method url-fetch)
15781 (uri (pypi-uri "async_generator" version))
15782 (sha256
15783 (base32
94fcbf8d 15784 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15785 (build-system python-build-system)
15786 (native-inputs
15787 `(("python-pytest" ,python-pytest)))
15788 (home-page "https://github.com/python-trio/async_generator")
15789 (synopsis "Async generators and context managers for Python 3.5+")
15790 (description "@code{async_generator} back-ports Python 3.6's native async
15791generators and Python 3.7's context managers into Python 3.5.")
15792 ;; Dual licensed.
15793 (license (list license:expat license:asl2.0))))
15794
15795(define-public python-async-timeout
15796 (package
15797 (name "python-async-timeout")
15798 (version "3.0.1")
15799 (source
15800 (origin
15801 (method url-fetch)
15802 (uri (pypi-uri "async-timeout" version))
15803 (sha256
15804 (base32
15805 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15806 (build-system python-build-system)
15807 (home-page "https://github.com/aio-libs/async_timeout/")
15808 (synopsis "Timeout context manager for asyncio programs")
15809 (description "@code{async-timeout} provides a timeout timeout context
15810manager compatible with @code{asyncio}.")
15811 (license license:asl2.0)))
15812
15813(define-public python-glob2
15814 (package
15815 (name "python-glob2")
4df49d19 15816 (version "0.7")
8fa2bcc7
TGR
15817 (source
15818 (origin
15819 (method git-fetch)
15820 (uri (git-reference
15821 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15822 (commit (string-append "v" version))))
8fa2bcc7
TGR
15823 (file-name (git-file-name name version))
15824 (sha256
4df49d19 15825 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15826 (build-system python-build-system)
15827 (home-page "https://github.com/miracle2k/python-glob2/")
15828 (synopsis "Extended Version of the python buildin glob module")
15829 (description "This is an extended version of the Python
15830@url{http://docs.python.org/library/glob.html, built-in glob module} which
15831adds:
15832
15833@itemize
15834@item The ability to capture the text matched by glob patterns, and return
15835those matches alongside the file names.
15836@item A recursive @code{**} globbing syntax, akin for example to the
15837@code{globstar} option of Bash.
15838@item The ability to replace the file system functions used, in order to glob
15839on virtual file systems.
15840@item Compatible with Python 2 and Python 3 (tested with 3.3).
15841@end itemize
15842
15843Glob2 currently based on the glob code from Python 3.3.1.")
15844 (license license:bsd-2)))
15845
15846(define-public python2-glob2
15847 (package-with-python2 python-glob2))
15848
15849(define-public python-gipc
15850 (package
15851 (name "python-gipc")
15852 (version "0.6.0")
15853 (source
15854 (origin
15855 (method url-fetch)
15856 (uri (pypi-uri "gipc" version ".zip"))
15857 (sha256
15858 (base32
15859 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15860 (build-system python-build-system)
15861 (native-inputs
15862 `(("unzip" ,unzip)))
15863 (propagated-inputs
15864 `(("python-gevent" ,python-gevent)))
fd3ae040 15865 (home-page "https://gehrcke.de/gipc/")
44d10b1f
RW
15866 (synopsis "Child process management in the context of gevent")
15867 (description "Usage of Python's multiprocessing package in a
15868gevent-powered application may raise problems. With @code{gipc},
15869process-based child processes can safely be created anywhere within a
15870gevent-powered application.")
15871 (license license:expat)))
15872
15873(define-public python2-gipc
15874 (package-with-python2 python-gipc))
15875
15876(define-public python-fusepy
15877 (package
15878 (name "python-fusepy")
15879 (version "2.0.4")
15880 (source
15881 (origin
15882 (method url-fetch)
15883 (uri (pypi-uri "fusepy" version))
15884 (sha256
15885 (base32
15886 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15887 (build-system python-build-system)
15888 (arguments
15889 `(#:phases
15890 (modify-phases %standard-phases
15891 (add-before 'build 'set-library-file-name
15892 (lambda* (#:key inputs #:allow-other-keys)
15893 (let ((fuse (assoc-ref inputs "fuse")))
15894 (substitute* "fuse.py"
15895 (("find_library\\('fuse'\\)")
15896 (string-append "'" fuse "/lib/libfuse.so'")))
15897 #t))))))
15898 (propagated-inputs
15899 `(("fuse" ,fuse)))
15900 (home-page "https://github.com/fusepy/fusepy")
15901 (synopsis "Simple ctypes bindings for FUSE")
15902 (description "Python module that provides a simple interface to FUSE and
15903MacFUSE. The binding is created using the standard @code{ctypes} library.")
15904 (license license:isc)))
15905
15906(define-public python2-fusepy
15907 (package-with-python2 python-fusepy))
15908
15909(define-public python2-gdrivefs
15910 (package
15911 (name "python2-gdrivefs")
15912 (version "0.14.9")
15913 (source
15914 (origin
15915 (method url-fetch)
15916 (uri (pypi-uri "gdrivefs" version))
15917 (sha256
15918 (base32
15919 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15920 (build-system python-build-system)
15921 (arguments
15922 `(#:python ,python-2
15923 #:phases
15924 (modify-phases %standard-phases
15925 (add-before 'build 'patch-setup-py
15926 (lambda _
15927 ;; Update requirements from dependency==version
15928 ;; to dependency>=version
15929 (substitute* "gdrivefs/resources/requirements.txt"
15930 (("==") ">="))
15931 #t)))))
15932 (native-inputs
15933 `(("python2-gipc" ,python2-gipc)
15934 ("python2-gevent" ,python2-gevent)
15935 ("python2-greenlet" ,python2-greenlet)
15936 ("python2-httplib2" ,python2-httplib2)
15937 ("python2-uritemplate" ,python2-uritemplate)
15938 ("python2-oauth2client" ,python2-oauth2client)
15939 ("python2-six" ,python2-six)))
15940 (propagated-inputs
15941 `(("python2-dateutil" ,python2-dateutil)
15942 ("python2-fusepy" ,python2-fusepy)
15943 ("python2-google-api-client" ,python2-google-api-client)))
15944 (home-page "https://github.com/dsoprea/GDriveFS")
15945 (synopsis "Mount Google Drive as a local file system")
15946 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15947under Python 2.7.")
15948 (license license:gpl2)))
15949
15950(define-public pybind11
15951 (package
15952 (name "pybind11")
0690f324 15953 (version "2.4.3")
44d10b1f
RW
15954 (source (origin
15955 (method git-fetch)
15956 (uri (git-reference
15957 (url "https://github.com/pybind/pybind11.git")
15958 (commit (string-append "v" version))))
15959 (sha256
15960 (base32
0690f324 15961 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
44d10b1f
RW
15962 (file-name (git-file-name name version))))
15963 (build-system cmake-build-system)
15964 (native-inputs
3cf579e9 15965 `(("python" ,python-wrapper)
ae8db9ce
LC
15966
15967 ;; The following dependencies are used for tests.
15968 ("python-pytest" ,python-pytest)
15969 ("catch" ,catch-framework2-1)
15970 ("eigen" ,eigen)))
44d10b1f 15971 (arguments
ae8db9ce
LC
15972 `(#:configure-flags
15973 (list (string-append "-DCATCH_INCLUDE_DIR="
15974 (assoc-ref %build-inputs "catch")
15975 "/include/catch"))
15976
3cf579e9
LC
15977 #:phases (modify-phases %standard-phases
15978 (add-after 'install 'install-python
15979 (lambda* (#:key outputs #:allow-other-keys)
15980 (let ((out (assoc-ref outputs "out")))
15981 (with-directory-excursion "../source"
15982 (setenv "PYBIND11_USE_CMAKE" "yes")
15983 (invoke "python" "setup.py" "install"
15984 "--single-version-externally-managed"
15985 "--root=/"
15986 (string-append "--prefix=" out)))))))
15987
ae8db9ce 15988 #:test-target "check"))
44d10b1f
RW
15989 (home-page "https://github.com/pybind/pybind11/")
15990 (synopsis "Seamless operability between C++11 and Python")
ab17297a
LC
15991 (description
15992 "@code{pybind11} is a lightweight header-only library that exposes C++
15993types in Python and vice versa, mainly to create Python bindings of existing
15994C++ code. Its goals and syntax are similar to the @code{Boost.Python}
15995library: to minimize boilerplate code in traditional extension modules by
15996inferring type information using compile-time introspection.")
65eada58 15997 (license license:bsd-3)))
44d10b1f
RW
15998
15999(define-public python-fasteners
16000 (package
16001 (name "python-fasteners")
16002 (version "0.14.1")
16003 (source
16004 (origin
16005 (method url-fetch)
16006 (uri (pypi-uri "fasteners" version))
16007 (sha256
16008 (base32
16009 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
16010 (build-system python-build-system)
16011 (propagated-inputs
16012 `(("python-monotonic" ,python-monotonic)
16013 ("python-six" ,python-six)
16014 ("python-testtools" ,python-testtools)))
16015 (home-page "https://github.com/harlowja/fasteners")
16016 (synopsis "Python package that provides useful locks")
16017 (description
16018 "This package provides a Python program that provides following locks:
16019
16020@itemize
16021@item Locking decorator
16022@item Reader-writer locks
16023@item Inter-process locks
16024@item Generic helpers
16025@end itemize\n")
16026 (properties `((python2-variant . ,(delay python2-fasteners))))
16027 (license license:asl2.0)))
16028
16029(define-public python2-fasteners
16030 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
16031 (package
16032 (inherit base)
16033 (propagated-inputs
16034 `(("python2-futures" ,python2-futures)
16035 ,@(package-propagated-inputs base))))))
16036
16037(define-public python-requests-file
16038 (package
16039 (name "python-requests-file")
16040 (version "1.4.3")
16041 (source
16042 (origin
16043 (method url-fetch)
16044 (uri (pypi-uri "requests-file" version))
16045 (sha256
16046 (base32
16047 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
16048 (build-system python-build-system)
16049 (propagated-inputs
16050 `(("python-requests" ,python-requests)
16051 ("python-six" ,python-six)))
16052 (home-page
16053 "https://github.com/dashea/requests-file")
16054 (synopsis "File transport adapter for Requests")
16055 (description
16056 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 16057library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
16058 (license license:asl2.0)))
16059
16060(define-public python2-requests-file
16061 (package-with-python2 python-requests-file))
16062
16063(define-public python-tldextract
16064 (package
16065 (name "python-tldextract")
16066 (version "2.2.0")
16067 (source
16068 (origin
16069 (method url-fetch)
16070 (uri (pypi-uri "tldextract" version))
16071 (sha256
16072 (base32
16073 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
16074 (build-system python-build-system)
16075 (native-inputs
16076 `(("python-pytest" ,python-pytest)
16077 ("python-responses" ,python-responses)))
16078 (propagated-inputs
16079 `(("python-idna" ,python-idna)
16080 ("python-requests" ,python-requests)
16081 ("python-requests-file" ,python-requests-file)))
16082 (home-page
16083 "https://github.com/john-kurkowski/tldextract")
16084 (synopsis
16085 "Separate the TLD from the registered domain and subdomains of a URL")
16086 (description
16087 "TLDExtract accurately separates the TLD from the registered domain and
16088subdomains of a URL, using the Public Suffix List. By default, this includes
16089the public ICANN TLDs and their exceptions. It can optionally support the
16090Public Suffix List's private domains as well.")
16091 (license license:bsd-3)))
16092
16093(define-public python2-tldextract
16094 (package-with-python2 python-tldextract))
16095
16096(define-public python-pynamecheap
16097 (package
16098 (name "python-pynamecheap")
16099 (version "0.0.3")
16100 (source
16101 (origin
16102 (method url-fetch)
16103 (uri (pypi-uri "PyNamecheap" version))
16104 (sha256
16105 (base32
16106 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
16107 (build-system python-build-system)
16108 (propagated-inputs
16109 `(("python-requests" ,python-requests)))
16110 (home-page
16111 "https://github.com/Bemmu/PyNamecheap")
16112 (synopsis
16113 "Namecheap API client in Python")
16114 (description
16115 "PyNamecheap is a Namecheap API client in Python.")
16116 (license license:expat)))
16117
16118(define-public python2-pynamecheap
16119 (package-with-python2 python-pynamecheap))
16120
16121(define-public python-dns-lexicon
16122 (package
16123 (name "python-dns-lexicon")
16124 (version "2.4.0")
16125 (source
16126 (origin
16127 (method url-fetch)
16128 (uri (pypi-uri "dns-lexicon" version))
16129 (sha256
16130 (base32
16131 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
16132 (build-system python-build-system)
16133 (arguments
16134 `(#:tests? #f)) ;requires internet access
16135 (propagated-inputs
16136 `(("python-future" ,python-future)
16137 ("python-pynamecheap" ,python-pynamecheap)
16138 ("python-requests" ,python-requests)
16139 ("python-tldextract" ,python-tldextract)
16140 ("python-urllib3" ,python-urllib3)))
16141 (home-page "https://github.com/AnalogJ/lexicon")
16142 (synopsis
16143 "Manipulate DNS records on various DNS providers")
16144 (description
16145 "Lexicon provides a way to manipulate DNS records on multiple DNS
16146providers in a standardized way. It has a CLI but it can also be used as a
16147Python library. It was designed to be used in automation, specifically with
16148Let's Encrypt.")
16149 (license license:expat)))
16150
16151(define-public python2-dns-lexicon
16152 (package-with-python2 python-dns-lexicon))
16153
16154(define-public python-commandlines
16155 (package
16156 (name "python-commandlines")
16157 (version "0.4.1")
16158 (source
16159 (origin
16160 (method url-fetch)
16161 (uri (pypi-uri "commandlines" version))
16162 (sha256
16163 (base32
16164 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
16165 (build-system python-build-system)
16166 (home-page "https://github.com/chrissimpkins/commandlines")
16167 (synopsis "Command line argument to object parsing library")
16168 (description
16169 "@code{Commandlines} is a Python library for command line application
16170development that supports command line argument parsing, command string
16171validation testing and application logic.")
16172 (license license:expat)))
16173
16174;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
16175;; python-numba. They have a very unflexible relationship.
16176(define-public python-numba
16177 (package
16178 (name "python-numba")
65f84096 16179 (version "0.46.0")
44d10b1f
RW
16180 (source
16181 (origin
16182 (method url-fetch)
16183 (uri (pypi-uri "numba" version))
16184 (sha256
16185 (base32
65f84096 16186 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
44d10b1f
RW
16187 (build-system python-build-system)
16188 (arguments
16189 `(#:modules ((guix build utils)
16190 (guix build python-build-system)
16191 (ice-9 ftw)
16192 (srfi srfi-1)
16193 (srfi srfi-26))
16194 #:phases
16195 (modify-phases %standard-phases
16196 (add-after 'unpack 'disable-proprietary-features
16197 (lambda _
16198 (setenv "NUMBA_DISABLE_HSA" "1")
16199 (setenv "NUMBA_DISABLE_CUDA" "1")
16200 #t))
16201 (add-after 'unpack 'remove-failing-tests
16202 (lambda _
65f84096 16203 ;; FIXME: These tests fail for unknown reasons:
44d10b1f
RW
16204 ;; test_non_writable_pycache, test_non_creatable_pycache, and
16205 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
16206 (substitute* "numba/tests/test_dispatcher.py"
16207 (("def test(_non_writable_pycache)" _ m)
16208 (string-append "def guix_skip" m))
16209 (("def test(_non_creatable_pycache)" _ m)
16210 (string-append "def guix_skip" m))
16211 (("def test(_frozen)" _ m)
16212 (string-append "def guix_skip" m)))
16213
16214 ;; These tests fail because we don't run the tests from the build
16215 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
65f84096 16216 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
44d10b1f
RW
16217 (substitute* "numba/tests/test_pycc.py"
16218 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
16219 (string-append "def guix_skip" m)))
65f84096
BG
16220
16221 ;; These tests fail because our version of Python does not have
16222 ;; a recognizable front-end for the Numba distribution to use
16223 ;; to check against.
16224 (substitute* "numba/tests/test_entrypoints.py"
16225 (("def test(_init_entrypoint)" _ m)
16226 (string-append "def guix_skip" m)))
16227 (substitute* "numba/tests/test_jitclasses.py"
16228 (("def test(_jitclass_longlabel_not_truncated)" _ m)
16229 (string-append "def guix_skip" m)))
44d10b1f
RW
16230 #t))
16231 (replace 'check
16232 (lambda _
16233 (let ((cwd (getcwd)))
16234 (setenv "PYTHONPATH"
16235 (string-append cwd "/build/"
16236 (find (cut string-prefix? "lib" <>)
16237 (scandir (string-append cwd "/build")))
16238 ":"
16239 (getenv "PYTHONPATH")))
16240 ;; Something is wrong with the PYTHONPATH when running the
16241 ;; tests from the build directory, as it complains about not being
16242 ;; able to import certain modules.
16243 (with-directory-excursion "/tmp"
16244 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
16245 #t)))))
16246 (propagated-inputs
16247 `(("python-llvmlite" ,python-llvmlite)
16248 ("python-numpy" ,python-numpy)
16249 ("python-singledispatch" ,python-singledispatch)))
16250 ;; Needed for tests.
16251 (inputs
16252 `(("python-jinja2" ,python-jinja2)
16253 ("python-pygments" ,python-pygments)))
16254 (home-page "https://numba.pydata.org")
16255 (synopsis "Compile Python code using LLVM")
16256 (description "Numba gives you the power to speed up your applications with
16257high performance functions written directly in Python. With a few
16258annotations, array-oriented and math-heavy Python code can be just-in-time
16259compiled to native machine instructions, similar in performance to C, C++ and
16260Fortran, without having to switch languages or Python interpreters.
16261
16262Numba works by generating optimized machine code using the LLVM compiler
16263infrastructure at import time, runtime, or statically (using the included pycc
16264tool).")
16265 (license license:bsd-3)))
16266
241409cd
RW
16267(define-public python-numcodecs
16268 (package
16269 (name "python-numcodecs")
16270 (version "0.6.4")
16271 (source
16272 (origin
16273 (method url-fetch)
16274 (uri (pypi-uri "numcodecs" version))
16275 (sha256
16276 (base32
16277 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
16278 (build-system python-build-system)
16279 (propagated-inputs
16280 `(("python-numpy" ,python-numpy)
16281 ("python-msgpack" ,python-msgpack)))
16282 (native-inputs
16283 `(("python-pytest" ,python-pytest)
16284 ("python-setuptools-scm" ,python-setuptools-scm)))
16285 (home-page "https://github.com/zarr-developers/numcodecs")
16286 (synopsis "Buffer compression and transformation codecs")
16287 (description
16288 "This Python package provides buffer compression and transformation
16289codecs for use in data storage and communication applications.")
16290 (license license:expat)))
16291
8e04b233
RW
16292(define-public python-asciitree
16293 (package
16294 (name "python-asciitree")
16295 (version "0.3.3")
16296 (source
16297 (origin
16298 (method url-fetch)
16299 (uri (pypi-uri "asciitree" version))
16300 (sha256
16301 (base32
16302 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
16303 (build-system python-build-system)
16304 (home-page "https://github.com/mbr/asciitree")
16305 (synopsis "Draws ASCII trees")
16306 (description "This package draws tree structures using characters.")
16307 (license license:expat)))
16308
7032c1cc
RW
16309(define-public python-zarr
16310 (package
16311 (name "python-zarr")
16312 (version "2.4.0")
16313 (source
16314 (origin
16315 (method url-fetch)
16316 (uri (pypi-uri "zarr" version))
16317 (sha256
16318 (base32
16319 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
16320 (build-system python-build-system)
16321 (arguments
16322 `(#:phases
16323 (modify-phases %standard-phases
16324 (add-after 'unpack 'disable-service-tests
16325 (lambda _
16326 (setenv "ZARR_TEST_ABS" "0")
16327 (setenv "ZARR_TEST_MONGO" "0")
16328 (setenv "ZARR_TEST_REDIS" "0")
16329 #t))
16330 (replace 'check
16331 (lambda _
16332 (invoke "pytest" "-vv" "-k" "not lmdb")
16333 #t)))))
16334 (propagated-inputs
16335 `(("python-asciitree" ,python-asciitree)
16336 ("python-fasteners" ,python-fasteners)
16337 ("python-numcodecs" ,python-numcodecs)
16338 ("python-numpy" ,python-numpy)))
16339 (native-inputs
16340 `(("python-pytest" ,python-pytest)
16341 ("python-setuptools-scm" ,python-setuptools-scm)))
16342 (home-page "https://github.com/zarr-developers/zarr-python")
16343 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
16344 (description
16345 "This package provides an implementation of chunked, compressed,
16346N-dimensional arrays for Python.")
16347 (license license:expat)))
16348
44d10b1f
RW
16349(define-public python-anndata
16350 (package
16351 (name "python-anndata")
a098b349 16352 (version "0.7.1")
44d10b1f
RW
16353 (source
16354 (origin
16355 (method url-fetch)
16356 (uri (pypi-uri "anndata" version))
16357 (sha256
16358 (base32
a098b349 16359 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
44d10b1f 16360 (build-system python-build-system)
a098b349
RW
16361 (arguments
16362 `(#:phases
16363 (modify-phases %standard-phases
16364 (add-after 'unpack 'delete-inconvenient-tests
16365 (lambda _
16366 ;; This test depends on python-scikit-learn.
16367 (delete-file "anndata/tests/test_inplace_subset.py")
16368 #t))
16369 (delete 'check)
16370 (add-after 'install 'check
16371 (lambda* (#:key inputs outputs #:allow-other-keys)
16372 (add-installed-pythonpath inputs outputs)
16373 (invoke "pytest" "-vv"))))))
44d10b1f
RW
16374 (propagated-inputs
16375 `(("python-h5py" ,python-h5py)
a098b349 16376 ("python-importlib-metadata" ,python-importlib-metadata)
44d10b1f 16377 ("python-natsort" ,python-natsort)
a098b349
RW
16378 ("python-numcodecs" ,python-numcodecs)
16379 ("python-packaging" ,python-packaging)
44d10b1f 16380 ("python-pandas" ,python-pandas)
a098b349
RW
16381 ("python-scipy" ,python-scipy)
16382 ("python-zarr" ,python-zarr)))
16383 (native-inputs
16384 `(("python-joblib" ,python-joblib)
16385 ("python-pytest" ,python-pytest)
16386 ("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
16387 (home-page "https://github.com/theislab/anndata")
16388 (synopsis "Annotated data for data analysis pipelines")
16389 (description "Anndata is a package for simple (functional) high-level APIs
16390for data analysis pipelines. In this context, it provides an efficient,
16391scalable way of keeping track of data together with learned annotations and
16392reduces the code overhead typically encountered when using a mostly
16393object-oriented library such as @code{scikit-learn}.")
16394 (license license:bsd-3)))
16395
16396(define-public python-dill
16397 (package
16398 (name "python-dill")
32be3577 16399 (version "0.3.1.1")
44d10b1f
RW
16400 (source
16401 (origin
16402 (method url-fetch)
16403 (uri (pypi-uri "dill" version))
16404 (sha256
32be3577 16405 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
44d10b1f 16406 (build-system python-build-system)
32be3577
MIP
16407 (arguments
16408 `(#:phases
16409 (modify-phases %standard-phases
16410 (replace 'check
16411 (lambda _
16412 (with-directory-excursion "/tmp"
16413 (invoke "nosetests" "-v"))
16414 #t)))))
16415 (native-inputs
16416 `(("python-nose" ,python-nose)))
16417 (home-page "https://pypi.org/project/dill/")
44d10b1f
RW
16418 (synopsis "Serialize all of Python")
16419 (description "Dill extends Python's @code{pickle} module for serializing
16420and de-serializing Python objects to the majority of the built-in Python
16421types. Dill provides the user the same interface as the @code{pickle} module,
16422and also includes some additional features. In addition to pickling Python
16423objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 16424session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
16425interpreter session, close the interpreter, ship the pickled file to another
16426computer, open a new interpreter, unpickle the session and thus continue from
16427the saved state of the original interpreter session.")
16428 (license license:bsd-3)))
16429
16430(define-public python-multiprocess
16431 (package
16432 (name "python-multiprocess")
fcc4e9e7 16433 (version "0.70.9")
44d10b1f
RW
16434 (source
16435 (origin
16436 (method url-fetch)
16437 (uri (pypi-uri "multiprocess" version))
16438 (sha256
16439 (base32
fcc4e9e7 16440 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
44d10b1f 16441 (build-system python-build-system)
fcc4e9e7
MIP
16442 (arguments
16443 `(#:phases
16444 (modify-phases %standard-phases
16445 (add-after 'unpack 'disable-broken-tests
16446 (lambda _
16447 ;; This test is broken as there is no keyboard interrupt.
16448 (substitute* "py3.7/multiprocess/tests/__init__.py"
16449 (("^(.*)def test_wait_result"
16450 line indent)
16451 (string-append indent
16452 "@unittest.skip(\"Disabled by Guix\")\n"
16453 line)))
16454 #t))
16455 ;; Tests must be run after installation.
16456 (delete 'check)
16457 (add-after 'install 'check
16458 (lambda* (#:key inputs outputs #:allow-other-keys)
16459 (add-installed-pythonpath inputs outputs)
16460 (invoke "python" "-m" "multiprocess.tests")
16461 #t)))))
44d10b1f
RW
16462 (propagated-inputs
16463 `(("python-dill" ,python-dill)))
fcc4e9e7 16464 (home-page "https://pypi.org/project/multiprocess/")
44d10b1f
RW
16465 (synopsis "Multiprocessing and multithreading in Python")
16466 (description
16467 "This package is a fork of the multiprocessing Python package, a package
16468which supports the spawning of processes using the API of the standard
16469library's @code{threading} module.")
16470 (license license:bsd-3)))
16471
16472(define-public python-toolz
16473 (package
16474 (name "python-toolz")
16475 (version "0.9.0")
16476 (source
16477 (origin
16478 (method url-fetch)
16479 (uri (pypi-uri "toolz" version))
16480 (sha256
16481 (base32
16482 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
16483 (build-system python-build-system)
16484 ;; FIXME: tests cannot be computed: "Can't perform this operation for
16485 ;; unregistered loader type"
16486 (arguments '(#:tests? #f))
16487 (home-page "https://github.com/pytoolz/toolz/")
16488 (synopsis "List processing tools and functional utilities")
16489 (description
16490 "This package provides a set of utility functions for iterators,
16491functions, and dictionaries.")
16492 (license license:bsd-3)))
16493
16494(define-public python2-toolz
16495 (package-with-python2 python-toolz))
16496
16497(define-public python-cytoolz
16498 (package
16499 (name "python-cytoolz")
16500 (version "0.9.0.1")
16501 (source
16502 (origin
16503 (method url-fetch)
16504 (uri (pypi-uri "cytoolz" version))
16505 (sha256
16506 (base32
16507 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
16508 (build-system python-build-system)
16509 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
16510 ;; 'exceptions'"
16511 (arguments '(#:tests? #f))
16512 (propagated-inputs
16513 `(("python-toolz" ,python-toolz)))
16514 (native-inputs
16515 `(("python-cython" ,python-cython)))
16516 (home-page "https://github.com/pytoolz/cytoolz")
16517 (synopsis "High performance functional utilities")
16518 (description
16519 "The cytoolz package implements the same API as provided by toolz. The
16520main differences are that @code{cytoolz} is faster and cytoolz offers a C API
16521that is accessible to other projects developed in Cython.")
16522 (license license:bsd-3)))
16523
16524(define-public python-sortedcontainers
16525 (package
16526 (name "python-sortedcontainers")
b244f166 16527 (version "2.1.0")
44d10b1f
RW
16528 (source
16529 (origin
16530 (method url-fetch)
16531 (uri (pypi-uri "sortedcontainers" version))
16532 (sha256
16533 (base32
b244f166 16534 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
44d10b1f
RW
16535 (build-system python-build-system)
16536 (native-inputs
16537 `(("python-tox" ,python-tox)))
16538 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
16539 (synopsis "Sorted List, Sorted Dict, Sorted Set")
16540 (description
16541 "This package provides a sorted collections library, written in
16542pure-Python.")
16543 (license license:asl2.0)))
16544
16545(define-public python-cloudpickle
16546 (package
16547 (name "python-cloudpickle")
16548 (version "0.6.1")
16549 (source
16550 (origin
16551 (method url-fetch)
16552 (uri (pypi-uri "cloudpickle" version))
16553 (sha256
16554 (base32
16555 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
16556 (build-system python-build-system)
16557 ;; FIXME: there are 5 errors in 122 tests:
16558 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
16559 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
16560 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16561 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16562 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
16563 ;; TypeError: cannot serialize '_io.BufferedRandom' object
16564 (arguments '(#:tests? #f))
16565 (native-inputs
16566 `(("python-pytest" ,python-pytest)
16567 ("python-mock" ,python-mock)
16568 ("python-tornado" ,python-tornado)))
16569 (home-page "https://github.com/cloudpipe/cloudpickle")
16570 (synopsis "Extended pickling support for Python objects")
16571 (description
16572 "Cloudpickle makes it possible to serialize Python constructs not
16573supported by the default pickle module from the Python standard library. It
16574is especially useful for cluster computing where Python expressions are
16575shipped over the network to execute on remote hosts, possibly close to the
16576data.")
16577 (license license:bsd-3)))
16578
16579(define-public python2-cloudpickle
16580 (package-with-python2 python-cloudpickle))
16581
16582(define-public python-locket
16583 (package
16584 (name "python-locket")
16585 (version "0.2.0")
16586 (source
16587 (origin
16588 (method url-fetch)
16589 (uri (pypi-uri "locket" version))
16590 (sha256
16591 (base32
16592 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
16593 (build-system python-build-system)
16594 (home-page "https://github.com/mwilliamson/locket.py")
16595 (synopsis "File-based locks for Python")
16596 (description
16597 "Locket implements a lock that can be used by multiple processes provided
16598they use the same path.")
16599 (license license:bsd-2)))
16600
16601(define-public python2-locket
16602 (package-with-python2 python-locket))
16603
16604(define-public python-blosc
16605 (package
16606 (name "python-blosc")
16607 (version "1.5.1")
16608 (source
16609 (origin
16610 (method url-fetch)
16611 (uri (pypi-uri "blosc" version))
16612 (sha256
16613 (base32
16614 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
16615 (build-system python-build-system)
16616 ;; FIXME: all tests pass, but then this error is printed:
16617 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
16618 (arguments '(#:tests? #f))
16619 (propagated-inputs
16620 `(("python-numpy" ,python-numpy)))
16621 (home-page "https://github.com/blosc/python-blosc")
16622 (synopsis "Python wrapper for the Blosc data compressor library")
16623 (description "Blosc is a high performance compressor optimized for binary
16624data. It has been designed to transmit data to the processor cache faster
16625than the traditional, non-compressed, direct memory fetch approach via a
16626@code{memcpy()} system call.
16627
16628Blosc works well for compressing numerical arrays that contains data with
16629relatively low entropy, like sparse data, time series, grids with
16630regular-spaced values, etc.
16631
16632This Python package wraps the Blosc library.")
16633 (license license:bsd-3)))
16634
16635(define-public python2-blosc
16636 (package-with-python2 python-blosc))
16637
16638(define-public python-partd
16639 (package
16640 (name "python-partd")
16641 (version "0.3.9")
16642 (source
16643 (origin
16644 (method url-fetch)
16645 (uri (pypi-uri "partd" version))
16646 (sha256
16647 (base32
16648 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16649 (build-system python-build-system)
16650 (propagated-inputs
16651 `(("python-blosc" ,python-blosc)
16652 ("python-locket" ,python-locket)
16653 ("python-numpy" ,python-numpy)
16654 ("python-pandas" ,python-pandas)
16655 ("python-pyzmq" ,python-pyzmq)
16656 ("python-toolz" ,python-toolz)))
16657 (home-page "https://github.com/dask/partd/")
16658 (synopsis "Appendable key-value storage")
16659 (description "Partd stores key-value pairs. Values are raw bytes. We
16660append on old values. Partd excels at shuffling operations.")
16661 (license license:bsd-3)))
16662
16663(define-public python2-partd
16664 (package-with-python2 python-partd))
16665
c70a0191
RW
16666(define-public python-fsspec
16667 (package
16668 (name "python-fsspec")
16669 (version "0.6.1")
16670 (source
16671 (origin
16672 (method url-fetch)
16673 (uri (pypi-uri "fsspec" version))
16674 (sha256
16675 (base32
16676 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16677 (build-system python-build-system)
16678 (arguments '(#:tests? #f)) ; there are none
16679 (home-page "https://github.com/intake/filesystem_spec")
16680 (synopsis "File-system specification")
16681 (description "The purpose of this package is to produce a template or
16682specification for a file-system interface, that specific implementations
16683should follow, so that applications making use of them can rely on a common
16684behavior and not have to worry about the specific internal implementation
16685decisions with any given backend.")
16686 (license license:bsd-3)))
16687
44d10b1f
RW
16688(define-public python-dask
16689 (package
16690 (name "python-dask")
86c7ca07 16691 (version "2.9.0")
44d10b1f
RW
16692 (source
16693 (origin
16694 (method url-fetch)
16695 (uri (pypi-uri "dask" version))
16696 (sha256
86c7ca07 16697 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
44d10b1f 16698 (build-system python-build-system)
44d10b1f
RW
16699 (arguments
16700 `(#:phases
16701 (modify-phases %standard-phases
86c7ca07 16702 (add-after 'unpack 'disable-broken-tests
44d10b1f 16703 (lambda _
86c7ca07 16704 ;; This test is marked as xfail when pytest-xdist is used.
44d10b1f
RW
16705 (substitute* "dask/tests/test_threaded.py"
16706 (("def test_interrupt\\(\\)" m)
16707 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16708 m)))
86c7ca07
RW
16709 ;; This one fails with a type error:
16710 ;; TypeError: Already tz-aware, use tz_convert to convert.
16711 (substitute* "dask/dataframe/tests/test_shuffle.py"
16712 (("def test_set_index_timestamp\\(\\)" m)
16713 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16714 m)))
44d10b1f
RW
16715 #t))
16716 (replace 'check
16717 (lambda _ (invoke "pytest" "-vv"))))))
16718 (propagated-inputs
16719 `(("python-cloudpickle" ,python-cloudpickle)
86c7ca07 16720 ("python-fsspec" ,python-fsspec)
44d10b1f 16721 ("python-numpy" ,python-numpy)
86c7ca07 16722 ("python-packaging" ,python-packaging)
44d10b1f
RW
16723 ("python-pandas" ,python-pandas)
16724 ("python-partd" ,python-partd)
16725 ("python-toolz" ,python-toolz)
16726 ("python-pyyaml" ,python-pyyaml)))
16727 (native-inputs
16728 `(("python-pytest" ,python-pytest)
16729 ("python-pytest-runner" ,python-pytest-runner)))
16730 (home-page "https://github.com/dask/dask/")
16731 (synopsis "Parallel computing with task scheduling")
16732 (description
16733 "Dask is a flexible parallel computing library for analytics. It
16734consists of two components: dynamic task scheduling optimized for computation,
16735and large data collections like parallel arrays, dataframes, and lists that
16736extend common interfaces like NumPy, Pandas, or Python iterators to
16737larger-than-memory or distributed environments. These parallel collections
16738run on top of the dynamic task schedulers. ")
16739 (license license:bsd-3)))
16740
44d10b1f
RW
16741(define-public python-ilinkedlist
16742 (package
16743 (name "python-ilinkedlist")
16744 (version "0.4.0")
16745 (source
16746 (origin
16747 (method url-fetch)
16748 (uri (pypi-uri "ilinkedlist" version))
16749 (sha256
16750 (base32
16751 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16752 (build-system python-build-system)
16753 (native-inputs `(("python-pytest" ,python-pytest)))
16754 (inputs `(("python" ,python)))
16755 (home-page "https://github.com/luther9/ilinkedlist-py")
16756 (synopsis "Immutable linked list library")
16757 (description
16758 "This is a implementation of immutable linked lists for Python. It
16759contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16760Since a linked list is treated as immutable, it is hashable, and its length
16761can be retrieved in constant time. Some of the terminology is inspired by
16762LISP. It is possible to create an improper list by creating a @code{Pair}
16763with a non-list @code{cdr}.")
16764 (license license:gpl3+)))
16765
16766(define-public python-readlike
16767 (package
16768 (name "python-readlike")
16769 (version "0.1.3")
16770 (source
16771 (origin
16772 (method url-fetch)
16773 (uri (pypi-uri "readlike" version))
16774 (sha256
16775 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16776 (build-system python-build-system)
16777 (home-page "https://github.com/jangler/readlike")
16778 (synopsis "GNU Readline-like line editing module")
16779 (description
16780 "This Python module provides line editing functions similar to the default
16781Emacs-style ones of GNU Readline. Unlike the Python standard library's
16782@code{readline} package, this one allows access to those capabilties in settings
16783outside of a standard command-line interface. It is especially well-suited to
16784interfacing with Urwid, due to a shared syntax for describing key inputs.
16785
16786Currently, all stateless Readline commands are implemented. Yanking and history
16787are not supported.")
16788 (license license:expat)))
16789
16790(define-public python2-readlike
16791 (package-with-python2 python-readlike))
16792
16793(define-public python-reparser
16794 (package
16795 (name "python-reparser")
16796 (version "1.4.3")
16797 (source
16798 (origin
16799 (method url-fetch)
16800 (uri (pypi-uri "ReParser" version))
16801 (sha256
16802 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16803 (build-system python-build-system)
16804 (home-page "https://github.com/xmikos/reparser")
16805 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16806 (description
16807 "This Python library provides a simple lexer/parser for inline markup based
16808on regular expressions.")
16809 (license license:expat)))
16810
16811(define-public python2-reparser
16812 (let ((reparser (package-with-python2
16813 (strip-python2-variant python-reparser))))
16814 (package (inherit reparser)
16815 (propagated-inputs
16816 `(("python2-enum34" ,python2-enum34)
16817 ,@(package-propagated-inputs reparser))))))
16818
16819(define-public python-precis-i18n
16820 (package
16821 (name "python-precis-i18n")
16822 (version "1.0.0")
16823 (source
16824 (origin
16825 (method url-fetch)
16826 (uri (pypi-uri "precis_i18n" version))
16827 (sha256
16828 (base32
16829 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16830 (build-system python-build-system)
16831 (home-page "https://github.com/byllyfish/precis_i18n")
16832 (synopsis "Implementation of the PRECIS framework")
16833 (description
16834 "This module implements the PRECIS Framework as described in RFC 8264,
16835RFC 8265 and RFC 8266.")
16836 (license license:expat)))
16837
d0446c4b
RW
16838(define-public python-absl-py
16839 (package
16840 (name "python-absl-py")
16841 (version "0.6.1")
16842 (source
16843 (origin
16844 (method url-fetch)
16845 (uri (pypi-uri "absl-py" version))
16846 (sha256
16847 (base32
16848 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16849 (build-system python-build-system)
16850 (propagated-inputs
16851 `(("python-six" ,python-six)))
16852 (home-page "https://github.com/abseil/abseil-py")
16853 (synopsis "Abseil Python common libraries")
16854 (description
16855 "This package provides the Abseil Python Common Libraries, a collection
16856of Python libraries for building Python applications.")
16857 (license license:asl2.0)))
16858
81bed4e9
RW
16859(define-public python-astor
16860 (package
16861 (name "python-astor")
16862 (version "0.7.1")
16863 (source
16864 (origin
16865 (method url-fetch)
16866 (uri (pypi-uri "astor" version))
16867 (sha256
16868 (base32
16869 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16870 (build-system python-build-system)
16871 ;; FIXME: There are two errors and two test failures.
16872 (arguments `(#:tests? #f))
16873 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16874 (synopsis "Read and write Python ASTs")
81bed4e9 16875 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16876source via the Abstract Syntax Tree.")
81bed4e9
RW
16877 (license license:bsd-3)))
16878
39ee82ff
RW
16879(define-public python2-astor
16880 (package-with-python2 python-astor))
16881
22e623ae
RW
16882(define-public python-grpcio
16883 (package
16884 (name "python-grpcio")
16885 (version "1.17.1")
16886 (source
16887 (origin
16888 (method url-fetch)
16889 (uri (pypi-uri "grpcio" version))
16890 (sha256
16891 (base32
16892 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16893 (build-system python-build-system)
16894 (propagated-inputs
16895 `(("python-six" ,python-six)))
16896 (home-page "https://grpc.io")
16897 (synopsis "HTTP/2-based RPC framework")
16898 (description "This package provides a Python library for communicating
16899with the HTTP/2-based RPC framework gRPC.")
16900 (license license:asl2.0)))
16901
79869f80
RW
16902(define-public python-astunparse
16903 (package
16904 (name "python-astunparse")
47d79541 16905 (version "1.6.2")
79869f80
RW
16906 (source
16907 (origin
16908 (method url-fetch)
16909 (uri (pypi-uri "astunparse" version))
16910 (sha256
47d79541 16911 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 16912 (build-system python-build-system)
47d79541 16913 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
16914 (propagated-inputs
16915 `(("python-six" ,python-six)
16916 ("python-wheel" ,python-wheel)))
16917 (home-page "https://github.com/simonpercivall/astunparse")
16918 (synopsis "AST unparser for Python")
16919 (description "This package provides an AST unparser for Python. It is a
16920factored out version of @code{unparse} found in the Python source
16921distribution.")
16922 (license license:bsd-3)))
16923
2884aac0
RW
16924(define-public python-gast
16925 (package
16926 (name "python-gast")
bd300261 16927 (version "0.2.2")
2884aac0
RW
16928 (source
16929 (origin
16930 (method url-fetch)
16931 (uri (pypi-uri "gast" version))
16932 (sha256
bd300261 16933 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
16934 (build-system python-build-system)
16935 (propagated-inputs
16936 `(("python-astunparse" ,python-astunparse)))
16937 (home-page "https://pypi.org/project/gast/")
16938 (synopsis "Generic Python AST that abstracts the underlying Python version")
16939 (description
16940 "GAST provides a compatibility layer between the AST of various Python
16941versions, as produced by @code{ast.parse} from the standard @code{ast}
16942module.")
16943 (license license:bsd-3)))
16944
44d10b1f
RW
16945(define-public python-wikidata
16946 (package
16947 (name "python-wikidata")
16948 (version "0.6.1")
16949 (source
16950 (origin
16951 (method url-fetch)
16952 (uri (pypi-uri "Wikidata" version))
16953 (sha256
16954 (base32
16955 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16956 (build-system python-build-system)
16957 (propagated-inputs
16958 `(("python-babel" ,python-babel)))
16959 (home-page "https://github.com/dahlia/wikidata")
16960 (synopsis "Wikidata client library")
16961 (description
16962 "This package provides a Python interface to
16963@url{https://www.wikidata.org/, Wikidata}.")
16964 (properties '((upstream-name . "Wikidata")))
16965 (license license:gpl3+)))
16966
16967(define-public python-doctest-ignore-unicode
16968 (package
16969 (name "python-doctest-ignore-unicode")
16970 (version "0.1.2")
16971 (source
16972 (origin
16973 (method url-fetch)
16974 (uri (pypi-uri "doctest-ignore-unicode" version))
16975 (sha256
16976 (base32
16977 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16978 (build-system python-build-system)
16979 (native-inputs
16980 `(("python-nose" ,python-nose)))
16981 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16982 (synopsis "Ignore Unicode literal prefixes in doctests")
16983 (description
16984 "This package adds support for a flag to ignore Unicode literal prefixes
16985in doctests.")
16986 (license license:asl2.0)))
16987
16988(define-public python-attr
16989 (package
16990 (name "python-attr")
16991 (version "0.3.1")
16992 (source
16993 (origin
16994 (method url-fetch)
16995 (uri (pypi-uri "attr" version))
16996 (sha256
16997 (base32
16998 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16999 (build-system python-build-system)
17000 (home-page "https://github.com/denis-ryzhkov/attr")
17001 (synopsis "Decorator for attributes of target function or class")
17002 (description "Simple decorator to set attributes of target function or
17003class in a @acronym{DRY, Don't Repeat Yourself} way.")
17004 (license license:expat)))
f98232a3
VC
17005
17006(define-public python-construct
17007 (package
17008 (name "python-construct")
d854ab15 17009 (version "2.10.56")
f98232a3
VC
17010 (source
17011 (origin
17012 (method url-fetch)
17013 (uri (pypi-uri "construct" version))
17014 (sha256
17015 (base32
d854ab15 17016 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
f98232a3
VC
17017 (build-system python-build-system)
17018 (arguments
17019 `(#:tests? #f)) ; No tests exist.
17020 (propagated-inputs
17021 `(("python-extras" ,python-extras)
17022 ("python-arrow" ,python-arrow)
17023 ("python-numpy" ,python-numpy)
17024 ("python-ruamel.yaml" ,python-ruamel.yaml)))
aabc8954 17025 (home-page "https://construct.readthedocs.io")
f98232a3
VC
17026 (synopsis "Declarative and symmetrical parser and builder for binary data")
17027 (description
17028 "This package provides both simple, atomic constructs (such as
17029integers of various sizes), as well as composite ones which allow you
17030form hierarchical and sequential structures of increasing complexity.
17031It features bit and byte granularity, easy debugging and testing, an
17032easy-to-extend subclass system, and lots of primitive constructs to
17033make your work easier.")
17034 (license license:expat)))
b742c006
LF
17035
17036(define-public python-humanize
17037 (package
17038 (name "python-humanize")
17039 (version "0.5.1")
17040 (source
17041 (origin
17042 (method url-fetch)
17043 (uri (pypi-uri "humanize" version))
17044 (sha256
17045 (base32
17046 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
17047 (arguments
17048 '(#:tests? #f)) ; tests not in pypi archive
17049 (build-system python-build-system)
17050 (home-page "https://github.com/jmoiron/humanize")
17051 (synopsis "Print numerical information in a human-readable form")
17052 (description "This package provides a Python module that displays numbers
17053and dates in \"human readable\" forms. For example, it would display
17054\"12345591313\" as \"12.3 billion\".")
17055 (license license:expat)))
d5bbf66d
LF
17056
17057(define-public python-txaio
17058 (package
17059 (name "python-txaio")
17060 (version "18.8.1")
17061 (source
17062 (origin
17063 (method url-fetch)
17064 (uri (pypi-uri "txaio" version))
17065 (sha256
17066 (base32
17067 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
17068 (build-system python-build-system)
17069 (propagated-inputs
17070 `(("python-twisted" ,python-twisted)
17071 ("python-six" ,python-six)))
17072 (home-page "https://github.com/crossbario/txaio")
17073 (synopsis "Compatibility layer between Python asyncio and Twisted")
17074 (description "Txaio provides a compatibility layer between the Python
17075@code{asyncio} module and @code{Twisted}.")
17076 (license license:expat)))
963dfd3a
RW
17077
17078(define-public python-toolshed
17079 (package
17080 (name "python-toolshed")
17081 (version "0.4.6")
17082 (source
17083 (origin
17084 (method url-fetch)
17085 (uri (pypi-uri "toolshed" version))
17086 (sha256
17087 (base32
17088 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
17089 (build-system python-build-system)
17090 (native-inputs
17091 `(("python-nose" ,python-nose)))
17092 (home-page "https://github.com/brentp/toolshed/")
17093 (synopsis "Collection of modules and functions for working with data")
17094 (description "This is a collection of well-tested, simple modules and
17095functions that aim to reduce boilerplate when working with data.")
17096 (license license:bsd-2)))
c91ecf2d
RW
17097
17098(define-public python-annoy
17099 (package
17100 (name "python-annoy")
17101 (version "1.15.1")
17102 (source
17103 (origin
17104 (method url-fetch)
17105 (uri (pypi-uri "annoy" version))
17106 (sha256
17107 (base32
17108 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
17109 (build-system python-build-system)
17110 (native-inputs
17111 `(("python-nose" ,python-nose)))
17112 (home-page "https://github.com/spotify/annoy/")
17113 (synopsis "Approximate nearest neighbors library")
17114 (description
17115 "Annoy is a C++ library with Python bindings to search for points in
17116space that are close to a given query point. It also creates large read-only
17117file-based data structures that are @code{mmap}ped into memory so that many
17118processes may share the same data.")
17119 (license license:asl2.0)))
412342d1 17120
79bfa422 17121(define-public python-pylzma
412342d1 17122 (package
79bfa422
DM
17123 (name "python-pylzma")
17124 (version "0.5.0")
17125 (source
17126 (origin
17127 (method url-fetch)
17128 (uri (pypi-uri "pylzma" version))
17129 (sha256
17130 (base32
17131 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 17132 (build-system python-build-system)
79bfa422
DM
17133 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
17134 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
17135 (description "This package provides Python bindings for the LZMA library
17136by Igor Pavlov.")
17137 (license license:lgpl2.1+)))
17138
17139(define-public python2-pylzma
17140 (package-with-python2 python-pylzma))
f825e605 17141
6609ebe7
AG
17142(define-public python2-zeroconf
17143 (package
17144 (name "python2-zeroconf")
17145
17146 ;; This is the last version that supports Python 2.x.
17147 (version "0.19.1")
17148 (source
17149 (origin
17150 (method url-fetch)
17151 (uri (pypi-uri "zeroconf" version))
17152 (sha256
17153 (base32
17154 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
17155 (build-system python-build-system)
17156 (arguments
17157 `(#:python ,python-2
17158 #:phases
17159 (modify-phases %standard-phases
17160 (add-after 'unpack 'patch-requires
17161 (lambda* (#:key inputs #:allow-other-keys)
17162 (substitute* "setup.py"
17163 (("enum-compat")
17164 "enum34"))
17165 #t)))))
17166 (native-inputs
17167 `(("python2-six" ,python2-six)
17168 ("python2-enum32" ,python2-enum34)
17169 ("python2-netifaces" ,python2-netifaces)
17170 ("python2-typing" ,python2-typing)))
17171 (home-page "https://github.com/jstasiak/python-zeroconf")
17172 (synopsis "Pure Python mDNS service discovery")
17173 (description
17174 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
17175compatible).")
17176 (license license:lgpl2.1+)))
17177
f825e605
GLV
17178(define-public python-bsddb3
17179 (package
17180 (name "python-bsddb3")
17181 (version "6.2.6")
17182 (source
17183 (origin
17184 (method url-fetch)
17185 (uri (pypi-uri "bsddb3" version))
17186 (sha256
17187 (base32
17188 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
17189 (build-system python-build-system)
17190 (inputs
17191 `(("bdb" ,bdb)))
17192 (arguments
17193 '(#:phases
17194 (modify-phases %standard-phases
17195 (add-after 'unpack 'configure-locations
17196 (lambda* (#:key inputs #:allow-other-keys)
17197 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
17198 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
17199 #t))
17200 (replace 'check
17201 (lambda _
17202 (invoke "python3" "test3.py" "-v"))))))
17203 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
17204 (synopsis "Python bindings for Oracle Berkeley DB")
17205 (description
17206 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
17207C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
17208Transaction objects, and each of these is exposed as a Python type in the
17209bsddb3.db module. The database objects can use various access methods: btree,
17210hash, recno, and queue. Complete support of Berkeley DB distributed
17211transactions. Complete support for Berkeley DB Replication Manager.
17212Complete support for Berkeley DB Base Replication. Support for RPC.")
17213 (license license:bsd-3)))
edeb04bf
PL
17214
17215(define-public python-dbfread
17216 (package
17217 (name "python-dbfread")
17218 (version "2.0.7")
17219 (source (origin
17220 (method url-fetch)
17221 (uri (pypi-uri "dbfread" version))
17222 (sha256
17223 (base32
17224 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
17225 (build-system python-build-system)
17226 (native-inputs
17227 `(("python-pytest" ,python-pytest)))
17228 (home-page "https://dbfread.readthedocs.io")
17229 (synopsis "Read DBF Files with Python")
17230 (description
17231 "This library reads DBF files and returns the data as native Python data
17232types for further processing. It is primarily intended for batch jobs and
17233one-off scripts.")
17234 (license license:expat)))
e308b4f0
JM
17235
17236(define-public python-cached-property
17237 (package
17238 (name "python-cached-property")
17239 (version "1.5.1")
17240 (source
17241 (origin
17242 (method url-fetch)
17243 (uri (pypi-uri "cached-property" version))
17244 (sha256
17245 (base32
17246 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
17247 (build-system python-build-system)
17248 (arguments
17249 `(#:phases
17250 (modify-phases %standard-phases
17251 ;; https://github.com/pydanny/cached-property/issues/131
17252 ;; recent versions of freezegun break one test
17253 (add-after 'unpack 'disable-broken-test
17254 (lambda _
17255 (substitute* "tests/test_cached_property.py"
17256 (("def test_threads_ttl_expiry\\(self\\)" m)
17257 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
17258 " " m)))
17259 #t)))))
17260 (native-inputs
17261 `(("python-freezegun" ,python-freezegun)))
17262 (home-page
17263 "https://github.com/pydanny/cached-property")
17264 (synopsis
17265 "Decorator for caching properties in classes")
17266 (description
17267 "This package provides a decorator which makes caching
17268time-or-computationally-expensive properties quick and easy and works in Python
172692 or 3.")
17270 (license license:bsd-3)))
dfe8a704
NG
17271
17272(define-public python-folium
17273 (package
17274 (name "python-folium")
d3bc1ea9 17275 (version "0.10.1")
dfe8a704
NG
17276 (source
17277 (origin
17278 (method url-fetch)
17279 (uri (pypi-uri "folium" version))
17280 (sha256
17281 (base32
d3bc1ea9 17282 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
dfe8a704
NG
17283 (build-system python-build-system)
17284 (propagated-inputs
17285 `(("python-branca" ,python-branca)
17286 ("python-jinja2" ,python-jinja2)
17287 ("python-numpy" ,python-numpy)
17288 ("python-requests" ,python-requests)))
17289 (native-inputs
17290 `(("python-pytest" ,python-pytest)))
17291 (home-page "https://github.com/python-visualization/folium")
17292 (synopsis "Make beautiful maps with Leaflet.js & Python")
17293 (description "@code{folium} makes it easy to visualize data that’s been
17294manipulated in Python on an interactive leaflet map. It enables both the
17295binding of data to a map for @code{choropleth} visualizations as well as
17296passing rich vector/raster/HTML visualizations as markers on the map.
17297
17298The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
17299Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
17300supports Image, Video, GeoJSON and TopoJSON overlays.")
17301 (license license:expat)))
9dd5f475
LC
17302
17303(define-public jube
17304 (package
17305 ;; This is a command-line tool, so no "python-" prefix.
17306 (name "jube")
17307 (version "2.2.2")
17308 (source (origin
17309 (method url-fetch)
17310 (uri (string-append
17311 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
17312 version))
17313 (sha256
17314 (base32
17315 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
17316 (file-name (string-append "jube-" version ".tar.gz"))))
17317 (build-system python-build-system)
17318 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
17319 (synopsis "Benchmarking environment")
17320 (description
17321 "JUBE helps perform and analyze benchmarks in a systematic way. For each
17322benchmarked application, benchmark data is stored in a format that allows JUBE
17323to deduct the desired information. This data can be parsed by automatic pre-
17324and post-processing scripts that draw information and store it more densely
17325for manual interpretation.")
a9f33960 17326 (license license:gpl3+)))
66436424
NG
17327
17328(define-public python-pyroutelib3
17329 (package
17330 (name "python-pyroutelib3")
17331 (version "1.3.post1")
17332 (source
17333 (origin
17334 (method url-fetch)
17335 (uri (pypi-uri "pyroutelib3" version))
17336 (sha256
17337 (base32
17338 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
17339 (build-system python-build-system)
17340 (propagated-inputs
17341 `(("python-dateutil" ,python-dateutil)))
17342 (home-page "https://github.com/MKuranowski/pyroutelib3")
17343 (synopsis "Library for simple routing on OSM data")
17344 (description "Library for simple routing on OSM data")
17345 (license license:gpl3+)))
30e7c03a 17346
c1bbef69
17347(define-public python-bibtexparser
17348 (package
17349 (name "python-bibtexparser")
17350 (version "1.1.0")
17351 (source
17352 (origin
17353 (method url-fetch)
17354 (uri (pypi-uri "bibtexparser" version))
17355 (sha256
17356 (base32
17357 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
17358 (build-system python-build-system)
17359 (propagated-inputs
17360 `(("python-pyparsing" ,python-pyparsing)))
17361 (native-inputs
17362 `(("python-future" ,python-future)))
17363 (home-page "https://github.com/sciunto-org/python-bibtexparser")
17364 (synopsis "Python library to parse BibTeX files")
17365 (description "BibtexParser is a Python library to parse BibTeX files.")
17366 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
17367
17368(define-public python-distro
17369 (package
17370 (name "python-distro")
17371 (version "1.4.0")
17372 (source
17373 (origin
17374 (method url-fetch)
17375 (uri (pypi-uri "distro" version))
17376 (sha256
17377 (base32
17378 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
17379 (build-system python-build-system)
17380 (native-inputs
17381 `(("python-pytest" ,python-pytest)))
17382 (home-page "https://github.com/nir0s/distro")
17383 (synopsis
17384 "OS platform information API")
17385 (description
17386 "@code{distro} provides information about the OS distribution it runs on,
17387such as a reliable machine-readable ID, or version information.
17388
17389It is the recommended replacement for Python's original
17390`platform.linux_distribution` function (which will be removed in Python 3.8).
17391@code{distro} also provides a command-line interface to output the platform
17392information in various formats.")
17393 (license license:asl2.0)))
f2f41e1a
HG
17394
17395(define-public python-cairosvg
17396 (package
17397 (name "python-cairosvg")
17398 (version "2.4.2")
17399 (source
17400 (origin
17401 (method url-fetch)
17402 (uri (pypi-uri "CairoSVG" version))
17403 (sha256
17404 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
17405 (build-system python-build-system)
17406 (arguments
17407 `(#:phases
17408 (modify-phases %standard-phases
17409 (replace 'check
17410 (lambda _ (invoke "pytest"))))))
17411 (propagated-inputs
17412 `(("python-cairocffi" ,python-cairocffi)
17413 ("python-cssselect2" ,python-cssselect2)
17414 ("python-defusedxml" ,python-defusedxml)
17415 ("python-pillow" ,python-pillow)
17416 ("python-tinycss2" ,python-tinycss2)))
17417 (native-inputs
17418 `(("python-pytest-flake8" ,python-pytest-flake8)
17419 ("python-pytest-isort" ,python-pytest-isort)
17420 ("python-pytest-runner" ,python-pytest-runner)))
17421 (home-page "https://cairosvg.org/")
17422 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
17423 (description "CairoSVG is a SVG converter based on Cairo. It can export
17424SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
17425SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
17426parsed, the result is drawn to a Cairo surface that can be exported to
17427qvarious formats: PDF, PostScript, PNG and even SVG.")
17428 (license license:lgpl3+)))
ea1801e0
HG
17429
17430(define-public python-pyphen
17431 (package
17432 (name "python-pyphen")
17433 (version "0.9.5")
17434 (source
17435 (origin
17436 (method url-fetch)
17437 (uri (pypi-uri "Pyphen" version))
17438 (sha256
17439 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
17440 (build-system python-build-system)
17441 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
17442 ;; embedded set provided by upstream - like Debian does.
17443 (home-page "https://github.com/Kozea/Pyphen")
17444 (synopsis "Pure Python module to hyphenate text")
17445 (description "Pyphen is a pure Python module to hyphenate text using
17446existing Hunspell hyphenation dictionaries.")
17447 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
17448
17449(define-public python-intelhex
17450 (package
17451 (name "python-intelhex")
17452 (version "2.2.1")
17453 (source
17454 (origin
17455 (method url-fetch)
17456 (uri (pypi-uri "intelhex" version))
17457 (sha256
17458 (base32
17459 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
17460 (build-system python-build-system)
17461 (arguments '(#:tests? #f)) ;issue with version
17462 (home-page "https://pypi.org/project/IntelHex/")
17463 (synopsis "Python library for Intel HEX files manipulations")
17464 (description "The Intel HEX file format is widely used in microprocessors
17465and microcontrollers area (embedded systems etc.) as the de facto standard for
17466representation of code to be programmed into microelectronic devices. This
17467package provides an intelhex Python library to read, write, create from
17468scratch and manipulate data from Intel HEX file format. It also includes
17469several convenience Python scripts, including \"classic\" hex2bin and bin2hex
17470converters and more, those based on the library itself.")
17471 (license license:bsd-3)))
34bf6869
CL
17472
17473(define-public python-pykwalify
17474 (package
17475 (name "python-pykwalify")
17476 (version "1.7.0")
17477 (source
17478 (origin
17479 (method url-fetch)
17480 (uri (pypi-uri "pykwalify" version))
17481 (sha256
17482 (base32
17483 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
17484 (build-system python-build-system)
17485 (arguments '(#:tests? #f)) ;missing dependencies
17486 (propagated-inputs
17487 `(("python-dateutil" ,python-dateutil)
17488 ("python-docopt" ,python-docopt)
17489 ("python-pyyaml" ,python-pyyaml)))
17490 (home-page "https://github.com/grokzen/pykwalify")
17491 (synopsis
17492 "Python lib/cli for JSON/YAML schema validation")
17493 (description
17494 "This package provides a parser, schema validator, and data binding tool
17495for YAML and JSON.")
17496 (license license:expat)))
e2ebbbcc
KK
17497
17498(define-public python-dbusmock
17499 (package
022b0d5f
BG
17500 (name "python-dbusmock")
17501 (version "0.18.3")
17502 (source
17503 (origin
17504 (method url-fetch)
17505 (uri (pypi-uri "python-dbusmock" version))
17506 (sha256
e2ebbbcc 17507 (base32
022b0d5f
BG
17508 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
17509 (build-system python-build-system)
17510 (arguments
17511 '(#:phases
17512 (modify-phases %standard-phases
17513 (add-after 'unpack 'patch-shell-path
17514 (lambda _
17515 (substitute* "tests/test_code.py"
17516 (("/bin/bash") (which "bash")))
17517 #t)))))
17518 (native-inputs
17519 `(;; For tests.
17520 ("dbus" ,dbus) ; for dbus-daemon
17521 ("python-nose" ,python-nose)
17522 ("which" ,which)))
17523 (propagated-inputs
17524 `(("python-dbus" ,python-dbus)
17525 ("python-pygobject" ,python-pygobject)))
17526 (home-page "https://github.com/martinpitt/python-dbusmock")
17527 (synopsis "Python library for mock D-Bus objects")
17528 (description "python-dbusmock allows for the easy creation of mock objects on
e2ebbbcc
KK
17529D-Bus. This is useful for writing tests for software which talks to D-Bus
17530services such as upower, systemd, logind, gnome-session or others, and it is
17531hard (or impossible without root privileges) to set the state of the real
17532services to what you expect in your tests.")
022b0d5f 17533 (license license:lgpl3+)))
b657b23f
BG
17534
17535(define-public python-ujson
17536 (package
17537 (name "python-ujson")
17538 (version "1.35")
17539 (source
17540 (origin
17541 (method url-fetch)
17542 (uri (pypi-uri "ujson" version))
17543 (sha256
17544 (base32
17545 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
17546 (build-system python-build-system)
17547 (home-page "http://www.esn.me")
17548 (synopsis
17549 "Ultra fast JSON encoder and decoder for Python")
17550 (description
17551 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
17552 bindings for Python 2.5+ and 3.")
17553 (license license:bsd-3)))
17554
17555(define-public python2-ujson
17556 (package-with-python2 python-ujson))
dbcef44a
MIP
17557
17558(define-public python-iocapture
17559 ;; The latest release is more than a year older than this commit.
17560 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
17561 (revision "1"))
17562 (package
17563 (name "python-iocapture")
17564 (version "0.1.2")
17565 (source
17566 (origin
17567 (method git-fetch)
17568 (uri (git-reference
17569 (url "https://github.com/oinume/iocapture.git")
17570 (commit commit)))
17571 (file-name (git-file-name name version))
17572 (sha256
17573 (base32
17574 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
17575 (build-system python-build-system)
17576 (arguments
17577 `(#:phases
17578 (modify-phases %standard-phases
17579 (delete 'check)
17580 (add-after 'install 'check
17581 (lambda* (#:key inputs outputs #:allow-other-keys)
17582 (add-installed-pythonpath inputs outputs)
17583 (invoke "py.test" "-v" "tests")
17584 #t)))))
17585 (propagated-inputs
17586 `(("python-flexmock" ,python-flexmock)
17587 ("python-pytest" ,python-pytest)
17588 ("python-pytest-cov" ,python-pytest-cov)
17589 ("python-six" ,python-six)))
17590 (home-page "https://github.com/oinume/iocapture")
17591 (synopsis "Python capturing tool for stdout and stderr")
17592 (description
17593 "This package helps you to capture the standard out (stdout) and the
17594standard error channel (stderr) in your program.")
17595 (license license:expat))))
db6bd842
MIP
17596
17597(define-public python-argh
17598 ;; There are 21 commits since the latest release containing important
17599 ;; improvements.
17600 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
17601 (revision "1"))
17602 (package
17603 (name "python-argh")
17604 (version (git-version "0.26.2" revision commit))
17605 (source
17606 (origin
17607 (method git-fetch)
17608 (uri (git-reference
17609 (url "https://github.com/neithere/argh.git")
17610 (commit commit)))
17611 (file-name (git-file-name name version))
17612 (sha256
17613 (base32
17614 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
17615 (build-system python-build-system)
17616 (propagated-inputs
17617 `(("python-iocapture" ,python-iocapture)
17618 ("python-mock" ,python-mock)
17619 ("python-pytest" ,python-pytest)
17620 ("python-pytest-cov" ,python-pytest-cov)
17621 ("python-pytest-xdist" ,python-pytest-xdist)
17622 ("python-tox" ,python-tox)))
17623 (home-page "https://github.com/neithere/argh/")
17624 (synopsis "Argparse wrapper with natural syntax")
17625 (description
17626 "python-argh is a small library that provides several layers of
17627abstraction on top of @code{python-argparse}. The layers can be mixed. It is
17628always possible to declare a command with the highest possible (and least
17629flexible) layer and then tune the behaviour with any of the lower layers
17630including the native API of @code{python-argparse}.")
17631 (license license:lgpl3+))))
073723fa
MIP
17632
17633(define-public python-ppft
17634 (package
17635 (name "python-ppft")
17636 (version "1.6.6.1")
17637 (source
17638 (origin
17639 (method url-fetch)
17640 (uri (pypi-uri "ppft" version))
17641 (sha256
17642 (base32
17643 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
17644 (build-system python-build-system)
17645 (arguments '(#:tests? #f)) ; there are none
17646 (propagated-inputs
17647 `(("python-six" ,python-six)))
17648 (home-page "https://pypi.org/project/ppft/")
17649 (synopsis "Fork of Parallel Python")
17650 (description
17651 "This package is a fork of Parallel Python. The Parallel Python
17652module (@code{pp}) provides an easy and efficient way to create
17653parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
17654computers and clusters. It features cross-platform portability and dynamic
17655load balancing.")
17656 (license license:bsd-3)))
8451ea19
MIP
17657
17658(define-public python-pox
17659 (package
17660 (name "python-pox")
17661 (version "0.2.7")
17662 (source
17663 (origin
17664 (method url-fetch)
17665 (uri (pypi-uri "pox" version))
17666 (sha256
17667 (base32
17668 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17669 (build-system python-build-system)
17670 (arguments
17671 `(#:phases
17672 (modify-phases %standard-phases
17673 (replace 'check
17674 (lambda _
17675 (mkdir-p "/tmp/guix")
17676 (setenv "SHELL" "bash")
17677 (setenv "USERNAME" "guix")
17678 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17679 (invoke "py.test" "-vv")
17680 #t)))))
17681 (native-inputs
17682 `(("python-pytest" ,python-pytest)
17683 ("which" ,which)))
17684 (home-page "https://pypi.org/project/pox/")
17685 (synopsis "Python utilities for filesystem exploration and automated builds")
17686 (description
17687 "Pox provides a collection of utilities for navigating and manipulating
17688filesystems. This module is designed to facilitate some of the low level
17689operating system interactions that are useful when exploring a filesystem on a
17690remote host. Pox provides Python equivalents of several shell commands such
17691as @command{which} and @command{find}. These commands allow automated
17692discovery of what has been installed on an operating system, and where the
17693essential tools are located.")
17694 (license license:bsd-3)))
7e476ae8
MIP
17695
17696(define-public python-pathos
17697 (package
17698 (name "python-pathos")
17699 (version "0.2.5")
17700 (source
17701 (origin
17702 (method url-fetch)
17703 (uri (pypi-uri "pathos" version))
17704 (sha256
17705 (base32
17706 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17707 (build-system python-build-system)
8f82e7e3
EF
17708 (arguments
17709 '(#:phases
17710 (modify-phases %standard-phases
17711 (replace 'check
17712 (lambda _
17713 (setenv "PYTHONPATH"
17714 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17715 (invoke "python" "./tests/__main__.py"))))))
7e476ae8
MIP
17716 (propagated-inputs
17717 `(("python-dill" ,python-dill)
17718 ("python-multiprocess" ,python-multiprocess)
17719 ("python-pox" ,python-pox)
17720 ("python-ppft" ,python-ppft)))
8f82e7e3
EF
17721 (native-inputs
17722 `(("python-pytest" ,python-pytest)))
7e476ae8
MIP
17723 (home-page "https://pypi.org/project/pathos/")
17724 (synopsis
17725 "Parallel graph management and execution in heterogeneous computing")
17726 (description
17727 "Python-pathos is a framework for heterogenous computing. It provides a
17728consistent high-level interface for configuring and launching parallel
17729computations across heterogenous resources. Python-pathos provides configurable
17730launchers for parallel and distributed computing, where each launcher contains
17731the syntactic logic to configure and launch jobs in an execution environment.")
17732 (license license:bsd-3)))
54e5ee5a
BG
17733
17734(define-public python-flit
17735 (package
17736 (name "python-flit")
17737 (version "2.1.0")
17738 (source
17739 (origin
17740 (method url-fetch)
17741 (uri (pypi-uri "flit" version))
17742 (sha256
17743 (base32
17744 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17745 (build-system python-build-system)
17746 (arguments
17747 `(#:tests? #f)) ; XXX: Check requires network access.
17748 (home-page "https://flit.readthedocs.io/")
17749 (synopsis
17750 "Simple packaging tool for simple packages")
17751 (description
17752 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17753packages a single importable module or package at a time, using the import
17754name as the name on PyPI. All subpackages and data files within a package
17755are included automatically.")
17756 (license license:bsd-3)))
02139b42
BG
17757
17758(define-public python-pathtools
17759 (package
17760 (name "python-pathtools")
17761 (version "0.1.2")
17762 (source
17763 (origin
17764 (method url-fetch)
17765 (uri (pypi-uri "pathtools" version))
17766 (sha256
17767 (base32
17768 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17769 (build-system python-build-system)
17770 (home-page
17771 "https://github.com/gorakhargosh/pathtools")
17772 (synopsis "Path utilities for Python")
17773 (description "Pattern matching and various utilities for file systems
17774paths.")
17775 (license license:expat)))
6b520177
JG
17776
17777(define-public python-fastentrypoints
17778 (package
17779 (name "python-fastentrypoints")
17780 (version "0.12")
17781 (source
17782 (origin
17783 (method url-fetch)
17784 (uri (pypi-uri "fastentrypoints" version))
17785 (sha256
17786 (base32
17787 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17788 (build-system python-build-system)
17789 (home-page
17790 "https://github.com/ninjaaron/fast-entry_points")
17791 (synopsis
17792 "Makes entry_points specified in setup.py load more quickly")
17793 (description
17794 "Using entry_points in your setup.py makes scripts that start really
17795slowly because it imports pkg_resources. This package allows such setup
17796scripts to load entry points more quickly.")
17797 (license license:bsd-3)))
c5eb8cf8
JG
17798
17799(define-public python-funcparserlib
17800 (package
17801 (name "python-funcparserlib")
17802 (version "0.3.6")
17803 (source
17804 (origin
17805 (method url-fetch)
17806 (uri (pypi-uri "funcparserlib" version))
17807 (sha256
17808 (base32
17809 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17810 (native-inputs
17811 `(("python-tox" ,python-tox)))
17812 (arguments
17813 `(#:phases
17814 (modify-phases %standard-phases
17815 (replace 'check
17816 (lambda _
17817 (invoke "tox"))))))
17818 (build-system python-build-system)
17819 (home-page
17820 "https://github.com/vlasovskikh/funcparserlib")
17821 (synopsis
17822 "Recursive descent parsing library based on functional combinators")
17823 (description
11140cf1 17824 "This package is a recursive descent parsing library for Python based on
c5eb8cf8
JG
17825functional combinators. Parser combinators are just higher-order functions
17826that take parsers as their arguments and return them as result values.")
17827 (license license:expat)))
602f3b67
NG
17828
17829(define-public python-speg
17830 (package
17831 (name "python-speg")
17832 (version "0.3")
17833 (source
17834 (origin
17835 (method url-fetch)
17836 (uri (pypi-uri "speg" version ".zip"))
17837 (sha256
17838 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17839 (arguments
17840 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17841 (native-inputs
17842 `(("unzip" ,unzip)))
17843 (build-system python-build-system)
17844 (home-page "https://github.com/avakar/speg")
17845 (synopsis "PEG-based parser interpreter with memoization")
17846 (description "This package is a PEG-based parser and interpreter with
17847memoization.")
17848 (license license:expat)))
07c8177b
NG
17849
17850(define-public python-cson
17851 (package
17852 (name "python-cson")
17853 (version "0.8")
17854 (source
17855 (origin
17856 (method url-fetch)
17857 (uri (pypi-uri "cson" version))
17858 (sha256
17859 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17860 (build-system python-build-system)
17861 (propagated-inputs
17862 `(("python-speg" ,python-speg)))
17863 (home-page "https://github.com/avakar/pycson")
17864 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17865 (description "This package is a parser for Coffeescript Object
17866Notation (CSON).")
17867 (license license:expat)))
e24c672e
LDB
17868
17869(define-public python-asynctest
17870 (package
17871 (name "python-asynctest")
17872 (version "0.13.0")
17873 (source
17874 (origin
17875 (method url-fetch)
17876 (uri (pypi-uri "asynctest" version))
17877 (sha256
17878 (base32
17879 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17880 (build-system python-build-system)
17881 (arguments
17882 '(#:phases
17883 (modify-phases %standard-phases
17884 (replace 'check
17885 (lambda _
17886 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17887 (add-after 'unpack 'disable-tests
17888 (lambda* _
17889 (substitute* "test/test_selector.py"
17890 ;; XXX: This test fails for unknown reason inside the build
17891 ;; environment.
17892 (("def test_events_watched_outside_test_are_ignored")
17893 "@unittest.skip('disabled by guix')
17894 def test_events_watched_outside_test_are_ignored")))))))
17895 (home-page "https://github.com/Martiusweb/asynctest")
17896 (synopsis "Extension of unittest for testing asyncio libraries")
17897 (description
17898 "The package asynctest is built on top of the standard unittest module
17899and cuts down boilerplate code when testing libraries for asyncio.")
17900 (license license:asl2.0)))
1cc9c38e
LDB
17901
17902(define-public python-aionotify
17903 (package
17904 (name "python-aionotify")
17905 (version "0.2.0")
17906 (source
17907 (origin
17908 ;; Source tarball on PyPi lacks tests
17909 (method git-fetch)
17910 (uri (git-reference
17911 (url "https://github.com/rbarrois/aionotify")
17912 (commit (string-append "v" version))))
17913 (file-name (git-file-name name version))
17914 (sha256
17915 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17916 (build-system python-build-system)
17917 (native-inputs `(("python-asynctest" ,python-asynctest)))
17918 (home-page "https://github.com/rbarrois/aionotify")
17919 (synopsis "Asyncio-powered inotify library")
17920 (description
17921 "@code{aionotify} is a simple, asyncio-based inotify library.")
17922 (license license:bsd-3)))
84efaa3b
LDB
17923
17924(define-public python-forbiddenfruit
17925 (package
17926 (name "python-forbiddenfruit")
17927 (version "0.1.3")
17928 (source
17929 (origin
17930 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17931 (method git-fetch)
17932 (uri (git-reference
17933 (url "https://github.com/clarete/forbiddenfruit")
17934 (commit version)))
17935 (file-name (git-file-name name version))
17936 (sha256
17937 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17938 (build-system python-build-system)
17939 (arguments
17940 '(#:phases
17941 (modify-phases %standard-phases
17942 (replace 'check
17943 (lambda _
17944 (invoke "make" "SKIP_DEPS=1"))))))
17945 (native-inputs
17946 `(("python-nose" ,python-nose)
17947 ("python-coverage" ,python-coverage)))
17948 (home-page "https://github.com/clarete/forbiddenfruit")
17949 (synopsis "Patch python built-in objects")
17950 (description "This project allows Python code to extend built-in types.")
17951 (license (list license:gpl3+ license:expat))))
9786258b
LDB
17952
17953(define-public python-shouldbe
17954 (package
17955 (name "python-shouldbe")
17956 (version "0.1.2")
17957 (source
17958 (origin
17959 (method url-fetch)
17960 (uri (pypi-uri "shouldbe" version))
17961 (sha256
17962 (base32
17963 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17964 (build-system python-build-system)
17965 (propagated-inputs
17966 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17967 (native-inputs
17968 `(("python-nose" ,python-nose)))
17969 (home-page "https://github.com/directxman12/should_be")
17970 (synopsis "Python Assertion Helpers inspired by Shouldly")
17971 (description
17972 "Python Assertion Helpers inspired by Shouldly.")
17973 (license license:isc)))
72c2478a
LDB
17974
17975(define-public python-k5test
17976 (package
17977 (name "python-k5test")
17978 (version "0.9.2")
17979 (source
17980 (origin
17981 (method url-fetch)
17982 (uri (pypi-uri "k5test" version))
17983 (sha256
17984 (base32
17985 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17986 (build-system python-build-system)
17987 (propagated-inputs
17988 `(("python-six" ,python-six)
17989 ;; `which`, `kadmin.local` binaries called inside library
17990 ("which" ,which)
17991 ("mit-krb5" ,mit-krb5)))
17992 (native-inputs `(("mit-krb5" ,mit-krb5)))
17993 (arguments
17994 '(#:phases
17995 (modify-phases %standard-phases
17996 (add-after 'unpack 'patch-paths
17997 (lambda* _
17998 (substitute* "k5test/realm.py"
17999 (("'kadmin_local'") "'kadmin.local'")))))))
18000 (home-page "https://github.com/pythongssapi/k5test")
18001 (synopsis "Library for setting up self-contained Kerberos 5 environments")
18002 (description
18003 "@code{k5test} is a library for setting up self-contained Kerberos 5
18004environments, and running Python unit tests inside those environments. It is
18005based on the file of the same name found alongside the MIT Kerberos 5 unit
18006tests.")
18007 (license license:isc)))
a8ef4978
LDB
18008
18009(define-public python-gssapi
18010 (package
18011 (name "python-gssapi")
18012 (version "1.6.1")
18013 (source
18014 (origin
18015 (method url-fetch)
18016 (uri (pypi-uri "gssapi" version))
18017 (sha256
18018 (base32
18019 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
18020 (build-system python-build-system)
18021 (propagated-inputs
18022 `(("python-decorator" ,python-decorator)
18023 ("python-six" ,python-six)))
18024 (inputs
18025 `(("mit-krb5" ,mit-krb5)))
18026 ;; for tests
18027 (native-inputs
18028 `(("python-shouldbe" ,python-shouldbe)
18029 ("python-parameterized" ,python-parameterized)
18030 ("python-k5test" ,python-k5test)
18031 ("python-nose" ,python-nose)))
18032 (home-page "https://github.com/pythongssapi/python-gssapi")
18033 (synopsis "Python GSSAPI Wrapper")
18034 (description
18035 "Python-GSSAPI provides both low-level and high level wrappers around the
18036GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
18037also be useable with other GSSAPI mechanisms.")
18038 (license license:isc)))
7261bdca
JL
18039
18040(define-public python-check-manifest
18041 (package
18042 (name "python-check-manifest")
18043 (version "0.37")
18044 (source
18045 (origin
18046 (method url-fetch)
18047 (uri (pypi-uri "check-manifest" version))
18048 (sha256
18049 (base32
18050 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
18051 (build-system python-build-system)
18052 (native-inputs
18053 `(("python-mock" ,python-mock)
18054 ("git" ,git)))
18055 (home-page "https://github.com/mgedmin/check-manifest")
18056 (synopsis "Check MANIFEST.in in a Python source package for completeness")
18057 (description "Python package can include a MANIFEST.in file to help with
18058sending package files to the Python Package Index. This package checks that
18059file to ensure it completely and accurately describes your project.")
18060 (license license:expat)))
b487b7b5
JL
18061
18062(define-public python-android-stringslib
18063 (package
18064 (name "python-android-stringslib")
18065 (version "0.1.2")
18066 (source
18067 (origin
18068 (method git-fetch)
18069 (uri (git-reference
18070 (url "https://framagit.org/tyreunom/python-android-strings-lib")
18071 (commit (string-append "v" version))))
18072 (file-name (git-file-name name version))
18073 (sha256
18074 (base32
18075 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
18076 (build-system python-build-system)
18077 (arguments
18078 `(#:tests? #f))
18079 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
18080 (synopsis "Android strings.xml support")
18081 (description "Android Strings Lib provides support for android's strings.xml
18082files. These files are used to translate strings in android apps.")
18083 (license license:expat)))
87435943 18084
7dec888f
JL
18085(define-public python-watchdog
18086 (package
18087 (name "python-watchdog")
18088 (version "0.9.0")
18089 (source
18090 (origin
18091 (method url-fetch)
18092 (uri (pypi-uri "watchdog" version))
18093 (sha256
18094 (base32
18095 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
18096 (build-system python-build-system)
18097 (arguments
18098 `(#:phases
18099 (modify-phases %standard-phases
18100 (add-before 'check 'remove-failing
18101 (lambda _
18102 (delete-file "tests/test_inotify_buffer.py")
18103 (delete-file "tests/test_snapshot_diff.py")
18104 #t)))))
18105 (propagated-inputs
18106 `(("python-argh" ,python-argh)
18107 ("python-pathtools" ,python-pathtools)
18108 ("python-pyyaml" ,python-pyyaml)))
18109 (native-inputs
18110 `(("python-pytest-cov" ,python-pytest-cov)
18111 ("python-pytest-timeout" ,python-pytest-timeout)))
18112 (home-page "https://github.com/gorakhargosh/watchdog")
18113 (synopsis "Filesystem events monitoring")
18114 (description "This package provides a way to monitor filesystem events
18115such as a file modification and trigger an action. This is similar to inotify,
18116but portable.")
18117 (license license:asl2.0)))
2cbede59 18118
9c9704a9
MC
18119(define-public python-wget
18120 (package
18121 (name "python-wget")
18122 (version "3.2")
18123 (source
18124 (origin
18125 (method url-fetch)
18126 (uri (pypi-uri "wget" version ".zip"))
18127 (sha256
18128 (base32
18129 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
18130 (build-system python-build-system)
18131 (native-inputs `(("unzip" ,unzip)))
18132 (home-page "https://bitbucket.org/techtonik/python-wget/")
18133 (synopsis "Pure Python download utility")
18134 (description "The python-wget library provides an API to download files
18135with features similar to the @command{wget} utility.")
18136 (license license:unlicense)))
18137
2cbede59
JL
18138(define-public offlate
18139 (package
18140 (name "offlate")
18141 (version "0.5")
18142 (source
18143 (origin
18144 (method git-fetch)
18145 (uri (git-reference
18146 (url "https://framagit.org/tyreunom/offlate")
18147 (commit version)))
18148 (file-name (git-file-name name version))
18149 (sha256
18150 (base32
18151 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
18152 (build-system python-build-system)
18153 (arguments
18154 ;; No tests
18155 `(#:tests? #f))
18156 (propagated-inputs
18157 `(("python-android-stringslib" ,python-android-stringslib)
18158 ("python-dateutil" ,python-dateutil)
18159 ("python-gitlab" ,python-gitlab)
18160 ("python-lxml" ,python-lxml)
18161 ("python-polib" ,python-polib)
18162 ("python-pyenchant" ,python-pyenchant)
18163 ("python-pygit2" ,python-pygit2)
18164 ("python-pygithub" ,python-pygithub)
18165 ("python-pyqt" ,python-pyqt)
18166 ("python-requests" ,python-requests)
18167 ("python-ruamel.yaml" ,python-ruamel.yaml)
18168 ("python-translation-finder" ,python-translation-finder)
18169 ("python-watchdog" ,python-watchdog)))
18170 (native-inputs
18171 `(("qttools" ,qttools)))
18172 (home-page "https://framagit.org/tyreunom/offlate")
18173 (synopsis "Offline translation interface for online translation tools")
18174 (description "Offlate offers a unified interface for different translation
18175file formats, as well as many different online translation platforms. You can
18176use it to get work from online platforms, specialized such as the Translation
18177Project, or not such a gitlab instance when your upstream doesn't use any
18178dedicated platform. The tool proposes a unified interface for any format and
18179an upload option to send your work back to the platform.")
18180 (license license:gpl3+)))
479f4013
JK
18181
18182(define-public python-pypng
18183 (package
18184 (name "python-pypng")
18185 (version "0.0.20")
18186 (source
18187 (origin
18188 (method url-fetch)
18189 (uri (pypi-uri "pypng" version))
18190 (sha256
18191 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
18192 (build-system python-build-system)
18193 (home-page "https://github.com/drj11/pypng")
18194 (synopsis "Pure Python PNG image encoder/decoder")
18195 (description
18196 "The PyPNG module implements support for PNG images. It reads and writes
18197PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
18198pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
18199LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
18200images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
18201A number of optional chunks can be specified (when writing) and
18202understood (when reading): tRNS, bKGD, gAMA.
18203
18204PyPNG is not a high level toolkit for image processing (like PIL) and does not
18205aim at being a replacement or competitor. Its strength lies in fine-grained
18206extensive support of PNG features. It can also read and write Netpbm PAM
18207files, with a focus on its use as an intermediate format for implementing
18208custom PNG processing.")
18209 (license license:expat)))
da8ca4c3 18210
18211(define-public python-fuzzywuzzy
18212 (package
18213 (name "python-fuzzywuzzy")
18214 (version "0.18.0")
18215 (source
18216 (origin
18217 (method url-fetch)
18218 (uri (pypi-uri "fuzzywuzzy" version))
18219 (sha256
18220 (base32
18221 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
18222 (build-system python-build-system)
18223 (native-inputs
18224 `(("python-hypothesis" ,python-hypothesis)
18225 ("python-pycodestyle" ,python-pycodestyle)
18226 ("python-pytest" ,python-pytest)))
18227 (propagated-inputs
18228 `(("python-levenshtein" ,python-levenshtein)))
18229 (home-page "https://github.com/seatgeek/fuzzywuzzy")
7d9f8db2 18230 (synopsis "Fuzzy string matching in Python")
da8ca4c3 18231 (description "Approximate string matching using
18232@emph{Levenshtein Distance} to calculate the differences between
18233sequences.")
18234 (license license:gpl2)))
18235
18236(define-public python2-fuzzywuzzy
18237 (package-with-python2 python-fuzzywuzzy))