gnu: Remove more packages deprecated for over almost a year.
[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>
efcb0508 62;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
27d8b9d9 63;;; Copyright © 2019, 2020 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>
97b1366d 68;;; Copyright © 2019, 2020 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>
591faabd 73;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
b14c234c 74;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
9b0c95cc 75;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
01d5f2c5 76;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
44d10b1f
RW
77;;;
78;;; This file is part of GNU Guix.
79;;;
80;;; GNU Guix is free software; you can redistribute it and/or modify it
81;;; under the terms of the GNU General Public License as published by
82;;; the Free Software Foundation; either version 3 of the License, or (at
83;;; your option) any later version.
84;;;
85;;; GNU Guix is distributed in the hope that it will be useful, but
86;;; WITHOUT ANY WARRANTY; without even the implied warranty of
87;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
88;;; GNU General Public License for more details.
89;;;
90;;; You should have received a copy of the GNU General Public License
91;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
92
93(define-module (gnu packages python-xyz)
94 #:use-module ((guix licenses) #:prefix license:)
95 #:use-module (gnu packages)
96 #:use-module (gnu packages algebra)
97 #:use-module (gnu packages adns)
98 #:use-module (gnu packages attr)
99 #:use-module (gnu packages backup)
100 #:use-module (gnu packages bash)
101 #:use-module (gnu packages check)
102 #:use-module (gnu packages compression)
103 #:use-module (gnu packages crypto)
104 #:use-module (gnu packages databases)
f825e605 105 #:use-module (gnu packages dbm)
2cbede59 106 #:use-module (gnu packages enchant)
44d10b1f
RW
107 #:use-module (gnu packages file)
108 #:use-module (gnu packages fontutils)
109 #:use-module (gnu packages gcc)
110 #:use-module (gnu packages geo)
111 #:use-module (gnu packages ghostscript)
112 #:use-module (gnu packages gl)
113 #:use-module (gnu packages glib)
e2ebbbcc 114 #:use-module (gnu packages gnome)
44d10b1f
RW
115 #:use-module (gnu packages graphviz)
116 #:use-module (gnu packages graphics)
9b0c95cc 117 #:use-module (gnu packages gsasl)
44d10b1f
RW
118 #:use-module (gnu packages gstreamer)
119 #:use-module (gnu packages gtk)
120 #:use-module (gnu packages icu4c)
121 #:use-module (gnu packages image)
122 #:use-module (gnu packages imagemagick)
72c2478a 123 #:use-module (gnu packages kerberos)
44d10b1f
RW
124 #:use-module (gnu packages libevent)
125 #:use-module (gnu packages libffi)
126 #:use-module (gnu packages linux)
127 #:use-module (gnu packages llvm)
128 #:use-module (gnu packages man)
129 #:use-module (gnu packages maths)
42f0b0c2 130 #:use-module (gnu packages monitoring)
44d10b1f
RW
131 #:use-module (gnu packages multiprecision)
132 #:use-module (gnu packages networking)
133 #:use-module (gnu packages ncurses)
134 #:use-module (gnu packages openstack)
135 #:use-module (gnu packages pcre)
136 #:use-module (gnu packages perl)
a5e76112 137 #:use-module (gnu packages photo)
44d10b1f
RW
138 #:use-module (gnu packages pkg-config)
139 #:use-module (gnu packages python)
d362b11d 140 #:use-module (gnu packages python-check)
15b65617 141 #:use-module (gnu packages python-compression)
44d10b1f 142 #:use-module (gnu packages python-crypto)
ca7c3653 143 #:use-module (gnu packages python-science)
44d10b1f
RW
144 #:use-module (gnu packages python-web)
145 #:use-module (gnu packages qt)
146 #:use-module (gnu packages readline)
147 #:use-module (gnu packages sdl)
148 #:use-module (gnu packages search)
149 #:use-module (gnu packages shells)
9d0c291e 150 #:use-module (gnu packages sphinx)
44d10b1f
RW
151 #:use-module (gnu packages ssh)
152 #:use-module (gnu packages terminals)
153 #:use-module (gnu packages tex)
154 #:use-module (gnu packages texinfo)
155 #:use-module (gnu packages time)
156 #:use-module (gnu packages tls)
157 #:use-module (gnu packages version-control)
158 #:use-module (gnu packages video)
159 #:use-module (gnu packages web)
160 #:use-module (gnu packages base)
161 #:use-module (gnu packages xml)
162 #:use-module (gnu packages xorg)
163 #:use-module (gnu packages xdisorg)
164 #:use-module (gnu packages tcl)
165 #:use-module (gnu packages bdw-gc)
f98232a3 166 #:use-module (gnu packages serialization)
44d10b1f
RW
167 #:use-module (guix packages)
168 #:use-module (guix download)
169 #:use-module (guix git-download)
a042d348 170 #:use-module (guix hg-download)
44d10b1f
RW
171 #:use-module (guix utils)
172 #:use-module (guix build-system gnu)
173 #:use-module (guix build-system cmake)
174 #:use-module (guix build-system python)
175 #:use-module (guix build-system trivial)
176 #:use-module (srfi srfi-1)
177 #:use-module (srfi srfi-26))
178
2f12e660
SS
179(define-public python-tenacity
180 (package
181 (name "python-tenacity")
182 (version "6.1.0")
183 (source (origin
184 (method url-fetch)
185 (uri (pypi-uri "tenacity" version))
186 (sha256
187 (base32
188 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
189 (build-system python-build-system)
190 (native-inputs
191 `(("python-setuptools-scm" ,python-setuptools-scm)
192 ("python-sphinx" ,python-sphinx)
193 ("python-tornado" ,python-tornado)
194 ("python-pytest" ,python-pytest)))
195 (propagated-inputs
196 `(("python-six" ,python-six)))
197 (arguments
198 `(#:phases (modify-phases %standard-phases
199 (replace 'check
200 (lambda _
201 (invoke "pytest")
202 #t)))))
203 (home-page "https://github.com/jd/tenacity")
204 (synopsis "Retrying library for python")
205 (description "Tenacity is a general-purpose python library to simplify the
206task of adding retry behavior to just about anything.")
207 (license license:asl2.0)))
208
dcf95329
SS
209(define-public python-colorlog
210 (package
211 (name "python-colorlog")
212 (version "4.1.0")
213 (source (origin
214 (method url-fetch)
215 (uri (pypi-uri "colorlog" version))
216 (sha256
217 (base32
218 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
219 (build-system python-build-system)
220 (native-inputs
221 `(("python-pytest" ,python-pytest)))
222 (arguments
223 `(#:phases (modify-phases %standard-phases
224 (replace 'check
225 (lambda _
226 ;; Extend PYTHONPATH so the built package will be found.
227 (setenv "PYTHONPATH"
228 (string-append (getcwd) "/build/lib:"
229 (getenv "PYTHONPATH")))
230 (invoke "pytest" "-p" "no:logging")
231 #t)))))
232 (home-page "https://github.com/borntyping/python-colorlog")
233 (synopsis "Log formatting with colors for python")
234 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
235with Python's logging module that outputs records using terminal colors.")
236 (license license:expat)))
237
23fde56b
SS
238(define-public python-pyprind
239 (package
240 (name "python-pyprind")
241 (version "2.11.2")
242 (source (origin
243 (method url-fetch)
244 (uri (pypi-uri "PyPrind" version))
245 (sha256
246 (base32
247 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
248 (build-system python-build-system)
249 (propagated-inputs
250 `(("python-psutil" ,python-psutil)))
251 (home-page "https://github.com/rasbt/pyprind")
252 (synopsis "Python Progress Bar and Percent Indicator Utility")
253 (description "The PyPrind (Python Progress Indicator) module provides a
254progress bar and a percentage indicator object that let you track the progress
255of a loop structure or other iterative computation.")
256 (license license:bsd-3)))
257
f3465dee
SS
258(define-public python-gphoto2
259 (package
260 (name "python-gphoto2")
261 (version "2.2.1")
262 (source (origin
263 (method url-fetch)
264 (uri (pypi-uri "gphoto2" version))
265 (sha256
266 (base32
267 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
268 (build-system python-build-system)
269 (native-inputs
270 `(("pkg-config" ,pkg-config)))
271 (inputs
272 `(("libgphoto2" ,libgphoto2)))
273 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
274 (synopsis "Python interface to libgphoto2")
275 (description "@code{python-gphoto2} is a comprehensive Python interface
276(or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
277automatically generate the interface code.")
278 (license license:gpl3+)))
279
2763f0de
SS
280(define-public python-colour
281 (package
282 (name "python-colour")
283 (version "0.1.5")
284 (source (origin
285 (method url-fetch)
286 (uri (pypi-uri "colour" version))
287 (sha256
288 (base32
289 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
290 (build-system python-build-system)
291 (native-inputs
292 `(("python-d2to1" ,python-d2to1)))
293 (home-page "https://github.com/vaab/colour")
294 (synopsis "Convert and manipulate various color representations")
295 (description "Pythonic way to manipulate color representations (HSL, RVB,
296web, X11, ...).")
297 (license license:expat)))
298
5164a92e
SS
299(define-public python-d2to1
300 (package
301 (name "python-d2to1")
302 (version "0.2.12.post1")
303 (source (origin
304 (method url-fetch)
305 (uri (pypi-uri "d2to1" version))
306 (sha256
307 (base32
308 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
309 (build-system python-build-system)
310 (native-inputs
311 `(("python-nose" ,python-nose)))
312 (home-page "https://github.com/embray/d2to1")
313 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
314in python")
315 (description "The python package d2to1 (the d is for distutils) allows
316using distutils2-like setup.cfg files for a package's metadata with a
317distribute/setuptools setup.py script.")
318 (license license:bsd-2)))
319
a5e76112
SS
320(define-public python-rawkit
321 (package
322 (name "python-rawkit")
323 (version "0.6.0")
324 (source (origin
325 (method url-fetch)
326 (uri (pypi-uri "rawkit" version))
327 (sha256
328 (base32
329 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
330 (build-system python-build-system)
331 (native-inputs
332 `(("python-pytest" ,python-pytest)
333 ("python-mock" ,python-mock)))
334 (inputs
335 `(("libraw" ,libraw)))
336 (home-page "https://rawkit.readthedocs.io")
337 (synopsis "Ctypes-based LibRaw binding for Python")
338 (description "The rawkit package provides two modules: rawkit and libraw.
339The rawkit module provides a high-level Pythonic interface for developing raw
340photos, while the libraw module provides a CTypes based interface for
341interacting with the low-level LibRaw C APIs.")
342 (license license:expat)))
343
1b9c1fdb
SS
344(define-public python-easygui
345 (package
346 (name "python-easygui")
347 (version "0.98.1")
348 (source (origin
349 (method url-fetch)
350 (uri (pypi-uri "easygui" version))
351 (sha256
352 (base32
353 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
354 (build-system python-build-system)
355 (propagated-inputs
356 `(("python-tkinter" ,python "tk")))
357 (home-page "https://github.com/robertlugg/easygui")
358 (synopsis "GUI programming module for Python")
359 (description "EasyGUI is a module for very simple, very easy GUI
360programming in Python. EasyGUI is different from other GUI generators in that
361EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
362simple function calls.")
363 (license license:bsd-3)))
364
244a527d
SS
365(define-public python-pymediainfo
366 (package
367 (name "python-pymediainfo")
368 (version "4.1")
369 (source
370 (origin
371 (method url-fetch)
372 (uri (pypi-uri "pymediainfo" version))
373 (sha256
374 (base32
375 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
376 (build-system python-build-system)
377 (native-inputs
378 `(("python-setuptools-scm" ,python-setuptools-scm)
379 ("python-pytest" ,python-pytest)))
380 (inputs
381 `(("libmediainfo" ,libmediainfo)))
382 (arguments
383 `(#:phases
384 (modify-phases %standard-phases
385 (add-after 'unpack 'patch-libmediainfo
386 (lambda _
387 (substitute* "pymediainfo/__init__.py"
388 (("libmediainfo.so.0")
389 (string-append (assoc-ref %build-inputs "libmediainfo")
390 "/lib/libmediainfo.so.0")))
391 #t))
392 (replace 'check
393 (lambda _
394 ;; Extend PYTHONPATH so the built package will be found.
395 (setenv "PYTHONPATH"
396 (string-append (getcwd) "/build/lib:"
397 (getenv "PYTHONPATH")))
398 ;; Skip the only failing test "test_parse_url"
399 (invoke "pytest" "-vv" "-k" "not test_parse_url")
400 #t)))))
401 (home-page
402 "https://github.com/sbraz/pymediainfo")
403 (synopsis
404 "Python wrapper for the mediainfo library")
405 (description
406 "Python wrapper for the mediainfo library to access the technical and tag
407data for video and audio files.")
408 (license license:expat)))
409
44d10b1f
RW
410(define-public python-psutil
411 (package
412 (name "python-psutil")
e9119ac1 413 (version "5.6.5")
44d10b1f
RW
414 (source
415 (origin
416 (method url-fetch)
417 (uri (pypi-uri "psutil" version))
418 (sha256
e9119ac1 419 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
44d10b1f
RW
420 (build-system python-build-system)
421 (arguments
422 ;; FIXME: some tests does not return and times out.
423 '(#:tests? #f))
424 (home-page "https://www.github.com/giampaolo/psutil")
425 (synopsis "Library for retrieving information on running processes")
426 (description
427 "psutil (Python system and process utilities) is a library for retrieving
428information on running processes and system utilization (CPU, memory, disks,
429network) in Python. It is useful mainly for system monitoring, profiling and
430limiting process resources and management of running processes. It implements
431many functionalities offered by command line tools such as: ps, top, lsof,
432netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
433pidof, tty, taskset, pmap.")
434 (properties `((python2-variant . ,(delay python2-psutil))))
435 (license license:bsd-3)))
436
437(define-public python2-psutil
438 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
439 (package
440 (inherit base)
441 (propagated-inputs
442 `(("python2-enum34" ,python2-enum34) ;optional
443 ,@(package-propagated-inputs base))))))
444
445(define-public python-shapely
446 (package
447 (name "python-shapely")
6d94465b 448 (version "1.6.4.post2")
44d10b1f
RW
449 (source
450 (origin
451 (method url-fetch)
452 (uri (pypi-uri "Shapely" version))
453 (sha256
454 (base32
6d94465b 455 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
456 (build-system python-build-system)
457 (native-inputs
458 `(("python-cython" ,python-cython)
459 ("python-matplotlib" ,python-matplotlib)
460 ("python-pytest" ,python-pytest)
461 ("python-pytest-cov" ,python-pytest-cov)))
462 (inputs
463 `(("geos" ,geos)))
464 (propagated-inputs
465 `(("python-numpy" ,python-numpy)))
466 (arguments
467 `(#:phases
468 (modify-phases %standard-phases
469 (add-after 'unpack 'patch-geos-path
470 (lambda* (#:key inputs #:allow-other-keys)
471 (let ((geos (assoc-ref inputs "geos"))
472 (glibc (assoc-ref inputs ,(if (%current-target-system)
473 "cross-libc" "libc"))))
474 (substitute* "shapely/geos.py"
475 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
476 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
477 geos "/lib/libgeos_c.so'])"))
478 (("free = load_dll\\('c'\\)\\.free")
479 (string-append "free = load_dll('c', fallbacks=['"
480 glibc "/lib/libc.so.6']).free"))))
481 #t)))))
482 (home-page "https://github.com/Toblerity/Shapely")
483 (synopsis "Library for the manipulation and analysis of geometric objects")
484 (description "Shapely is a Python package for manipulation and analysis of
485planar geometric objects. It is based on the @code{GEOS} library.")
486 (license license:bsd-3)))
487
a91f4eba
S
488(define-public python-shortuuid
489 (package
490 (name "python-shortuuid")
491 (version "0.5.0")
492 (source
493 (origin
494 (method url-fetch)
495 (uri (pypi-uri "shortuuid" version))
496 (sha256
497 (base32
498 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
499 (build-system python-build-system)
500 (native-inputs
501 `(("python-pep8" ,python-pep8)))
502 (home-page "https://github.com/skorokithakis/shortuuid")
503 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
504 (description
505 "@code{shortuuid} is a Python library for generating concise, unambiguous
506and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
507module and then similar looking characters are removed.")
508 (license license:bsd-3)))
509
44d10b1f
RW
510(define-public python-logwrap
511 (package
512 (name "python-logwrap")
513 (version "3.2.1")
514 (source
515 (origin
516 (method url-fetch)
517 (uri (pypi-uri "logwrap" version ".zip"))
518 (sha256
519 (base32
520 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
521 (build-system python-build-system)
522 (propagated-inputs
523 `(("python-six" ,python-six)
524 ("python-typing" ,python-typing)))
525 (native-inputs
526 `(("unzip" ,unzip)
527 ("python-cython" ,python-cython)
528 ("python-pytest" ,python-pytest)
529 ("python-pytest-cov" ,python-pytest-cov)
530 ("python-pytest-runner" ,python-pytest-runner)))
531 (home-page "https://github.com/penguinolog/logwrap")
532 (synopsis "Decorator for logging function arguments")
533 (description "This package provides a decorator to log function arguments
534and function call return values in a human-readable way.")
535 (license license:asl2.0)))
536
537(define-public python2-shapely
538 (package-with-python2 python-shapely))
539
540(define-public python-clyent
541 (package
542 (name "python-clyent")
543 (version "1.2.1")
544 (source
545 (origin
546 (method url-fetch)
547 (uri (pypi-uri "clyent" version))
548 (sha256
549 (base32
550 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
551 (build-system python-build-system)
552 (native-inputs
553 `(("python-mock" ,python-mock)))
554 (home-page "https://github.com/binstar/clyent")
555 (synopsis "Command line client library")
556 (description "Clyent is a Python command line utiliy library. It is used
557by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
558 (license license:bsd-3)))
559
560(define-public python2-clyent
561 (package-with-python2 python-clyent))
562
563(define-public python-babel
564 (package
565 (name "python-babel")
dab3c841 566 (version "2.8.0")
44d10b1f
RW
567 (source
568 (origin
569 (method url-fetch)
570 (uri (pypi-uri "Babel" version))
571 (sha256
572 (base32
dab3c841 573 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
44d10b1f
RW
574 (build-system python-build-system)
575 (native-inputs
576 `(("python-freezegun" ,python-freezegun)
577 ("python-pytest" ,python-pytest)))
578 (propagated-inputs
579 `(("python-pytz" ,python-pytz)))
580 (arguments
581 `(#:phases (modify-phases %standard-phases
582 (replace 'check
8acd1e90
MB
583 (lambda _
584 (invoke "pytest" "-vv" "-k"
585 (string-append
586 ;; XXX: These tests fail when using Pytest 4.x and
587 ;; Babel 2.6.0. Try removing this for later versions.
588 "not test_no_inherit_metazone_marker_never_in_output"
589 " and not test_smoke_dates"
590 " and not test_smoke_numbers")))))))
44d10b1f
RW
591 (home-page "http://babel.pocoo.org/")
592 (synopsis
593 "Tools for internationalizing Python applications")
594 (description
595 "Babel is composed of two major parts:
596- tools to build and work with gettext message catalogs
597- a Python interface to the CLDR (Common Locale Data Repository), providing
598access to various locale display names, localized number and date formatting,
599etc. ")
600 (license license:bsd-3)))
601
602(define-public python2-babel
603 (package-with-python2 python-babel))
604
93253411
MB
605;; Sphinx < 2.0 requires this version. Remove once no longer needed.
606(define-public python2-babel-2.6
607 (package
608 (inherit python2-babel)
609 (version "2.6.0")
610 (source (origin
611 (method url-fetch)
612 (uri (pypi-uri "Babel" version))
613 (sha256
614 (base32
615 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
616
44d10b1f
RW
617(define-public python2-backport-ssl-match-hostname
618 (package
619 (name "python2-backport-ssl-match-hostname")
620 (version "3.5.0.1")
621 (source
622 (origin
623 (method url-fetch)
2c1f0d09 624 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
625 (sha256
626 (base32
627 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
628 (build-system python-build-system)
629 (arguments
630 `(#:python ,python-2
631 #:tests? #f)) ; no test target
632 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
633 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
634 (description
635 "This backport brings the ssl.match_hostname() function to users of
636earlier versions of Python. The function checks the hostname in the
637certificate returned by the server to which a connection has been established,
638and verifies that it matches the intended target hostname.")
639 (license license:psfl)))
640
dc827867
TGR
641(define-public python-boolean.py
642 (package
643 (name "python-boolean.py")
644 (version "3.6")
645 (source
646 (origin
647 ;; There's no source tarball on PyPI.
648 (method git-fetch)
649 (uri (git-reference
650 (url "https://github.com/bastikr/boolean.py")
651 (commit (string-append "v" version))))
652 (file-name (git-file-name name version))
653 (sha256
654 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
655 (build-system python-build-system)
656 (home-page "https://github.com/bastikr/boolean.py")
657 (synopsis "Boolean algebra in one Python module")
658 (description
659 "This is a small Python library that implements boolean algebra.
660It defines two base elements, @code{TRUE} and @code{FALSE}, and a
661@code{Symbol} class that can take on one of these two values. Calculations
662are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
663compositions like @code{XOR} and @code{NAND} are emulated on top of them.
664Expressions are constructed from parsed strings or directly in Python.")
665 (license license:bsd-2)))
666
44d10b1f
RW
667(define-public python-hdf4
668 (package
669 (name "python-hdf4")
670 (version "0.9")
671 (source
672 (origin
673 (method url-fetch)
674 (uri (pypi-uri name version))
675 (sha256
676 (base32
677 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
678 (build-system python-build-system)
679 (native-inputs `(("nose" ,python-nose)))
680 (propagated-inputs `(("numpy" ,python-numpy)))
681 (inputs
682 `(("hdf4" ,hdf4)
683 ("libjpeg" ,libjpeg)
684 ("zlib" ,zlib)))
685 (arguments
686 `(#:phases
687 (modify-phases %standard-phases
688 (replace 'check
689 (lambda _
690 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
691 ;; on to import numpy. Somehow this works on their CI system.
692 ;; Let's just manage PYTHONPATH here instead.
693 (substitute* "runexamples.sh"
694 (("export PYTHONPATH=.*") ""))
695 (setenv "PYTHONPATH"
696 (string-append (getcwd) ":"
697 (getenv "PYTHONPATH")))
698 (invoke "./runexamples.sh")
699 (invoke "nosetests" "-v"))))))
700 (home-page "https://github.com/fhs/python-hdf4")
701 (synopsis "Python interface to the NCSA HDF4 library")
702 (description
703 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
704which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
705NetCDF files can also be read and modified. Python-HDF4 is a fork of
706@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
707 (license license:expat)))
708
709(define-public python2-hdf4
710 (package-with-python2 python-hdf4))
711
712(define-public python-h5py
713 (package
714 (name "python-h5py")
24ce6421 715 (version "2.10.0")
44d10b1f
RW
716 (source
717 (origin
718 (method url-fetch)
719 (uri (pypi-uri "h5py" version))
720 (sha256
721 (base32
24ce6421 722 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
44d10b1f
RW
723 (build-system python-build-system)
724 (arguments
725 `(#:tests? #f ; no test target
726 #:phases
727 (modify-phases %standard-phases
728 (add-after 'unpack 'fix-hdf5-paths
729 (lambda* (#:key inputs #:allow-other-keys)
730 (let ((prefix (assoc-ref inputs "hdf5")))
731 (substitute* "setup_build.py"
732 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
733 (string-append "['" prefix "/lib" "']"))
734 (("'/opt/local/include', '/usr/local/include'")
735 (string-append "'" prefix "/include" "'")))
736 (substitute* "setup_configure.py"
737 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
738 (string-append "['" prefix "/lib" "']")))
739 #t))))))
740 (propagated-inputs
741 `(("python-six" ,python-six)
742 ("python-numpy" ,python-numpy)))
743 (inputs
24ce6421 744 `(("hdf5" ,hdf5-1.10)))
44d10b1f
RW
745 (native-inputs
746 `(("python-cython" ,python-cython)
24ce6421
RW
747 ("python-pkgconfig" ,python-pkgconfig)
748 ("pkg-config" ,pkg-config)))
efc0a587 749 (home-page "https://www.h5py.org/")
44d10b1f
RW
750 (synopsis "Read and write HDF5 files from Python")
751 (description
752 "The h5py package provides both a high- and low-level interface to the
753HDF5 library from Python. The low-level interface is intended to be a
754complete wrapping of the HDF5 API, while the high-level component supports
755access to HDF5 files, datasets and groups using established Python and NumPy
756concepts.")
757 (license license:bsd-3)))
758
759(define-public python2-h5py
760 (package-with-python2 python-h5py))
761
8b89dedc
RW
762(define-public python-sh
763 (package
764 (name "python-sh")
765 (version "1.12.14")
766 (source
767 (origin
768 (method url-fetch)
769 (uri (pypi-uri "sh" version))
770 (sha256
771 (base32
772 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
773 (build-system python-build-system)
fd3638d8
EF
774 (arguments
775 '(#:phases
776 (modify-phases %standard-phases
777 (replace 'check
778 (lambda _
ca983a2f
NG
779 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
780 (setenv "HOME" "/tmp")
fd3638d8
EF
781 (invoke "python" "sh.py" "test"))))))
782 (native-inputs
783 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
784 (home-page "https://github.com/amoffat/sh")
785 (synopsis "Python subprocess replacement")
786 (description "This package provides a replacement for Python's
787@code{subprocess} feature.")
788 (license license:expat)))
789
3869effd
RW
790(define-public python2-sh
791 (package-with-python2 python-sh))
792
d362b11d
RW
793(define-public python-cftime
794 (package
795 (name "python-cftime")
da107cf5 796 (version "1.0.4.2")
d362b11d
RW
797 (source
798 (origin
799 (method url-fetch)
800 (uri (pypi-uri "cftime" version))
801 (sha256
da107cf5 802 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
d362b11d
RW
803 (build-system python-build-system)
804 (propagated-inputs
805 `(("python-numpy" ,python-numpy)))
806 (native-inputs
807 `(("python-coveralls" ,python-coveralls)
808 ("python-cython" ,python-cython)
809 ("python-pytest-cov" ,python-pytest-cov)))
810 (home-page "https://github.com/Unidata/cftime")
811 (synopsis "Library for time handling")
812 (description
813 "This package provides time-handling functionality that used to be part
814of the netcdf4 package before.")
815 ;; This package claims to include code under the GPLv3 but is released
816 ;; under ISC.
817 (license (list license:isc license:gpl3+))))
818
44d10b1f
RW
819(define-public python-netcdf4
820 (package
821 (name "python-netcdf4")
93e7b209 822 (version "1.4.2")
44d10b1f
RW
823 (source
824 (origin
825 (method url-fetch)
826 (uri (pypi-uri "netCDF4" version))
827 (sha256
828 (base32
93e7b209 829 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 830 (build-system python-build-system)
93e7b209
RW
831 (arguments
832 '(#:phases
833 (modify-phases %standard-phases
834 (add-after 'unpack 'configure-locations
835 (lambda* (#:key inputs #:allow-other-keys)
836 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
837 #t)))))
44d10b1f
RW
838 (native-inputs
839 `(("python-cython" ,python-cython)))
840 (propagated-inputs
93e7b209
RW
841 `(("python-numpy" ,python-numpy)
842 ("python-cftime" ,python-cftime)))
44d10b1f
RW
843 (inputs
844 `(("netcdf" ,netcdf)
845 ("hdf4" ,hdf4)
846 ("hdf5" ,hdf5)))
93e7b209 847 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
848 (synopsis "Python/numpy interface to the netCDF library")
849 (description "Netcdf4-python is a Python interface to the netCDF C
850library. netCDF version 4 has many features not found in earlier
851versions of the library and is implemented on top of HDF5. This module
852can read and write files in both the new netCDF 4 and the old netCDF 3
853format, and can create files that are readable by HDF5 clients. The
854API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
855to users of that module.")
856 ;; The software is mainly ISC, but includes some files covered
857 ;; by the Expat license.
858 (license (list license:isc license:expat))))
859
860(define-public python2-netcdf4
861 (package-with-python2 python-netcdf4))
862
d6803445
TGR
863(define-public python-license-expression
864 (package
865 (name "python-license-expression")
866 (version "0.999")
867 (source
868 (origin
869 (method url-fetch)
870 (uri (pypi-uri "license-expression" version))
871 (sha256
872 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
873 (build-system python-build-system)
874 (propagated-inputs
875 `(("python-boolean.py" ,python-boolean.py)))
876 (home-page "https://github.com/nexB/license-expression")
877 (synopsis "Apply boolean logic to license expressions")
878 (description
879 "This Python module defines a tiny language to evaluate and compare
880license expressions using boolean logic. Logical combinations of licenses can
881be tested for equality, containment, and equivalence. They can be normalised
882and simplified. It supports SPDX license expressions as well as other naming
883conventions and aliases in the same expression.")
884 (license license:gpl2+)))
885
44d10b1f
RW
886(define-public python-lockfile
887 (package
888 (name "python-lockfile")
889 (version "0.12.2")
890 (source
891 (origin
892 (method url-fetch)
8318bf07 893 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
894 (sha256
895 (base32
896 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
897 (build-system python-build-system)
898 (arguments '(#:test-target "check"))
899 (native-inputs
900 `(("python-pbr" ,python-pbr)))
901 (home-page "https://launchpad.net/pylockfile")
902 (synopsis "Platform-independent file locking module")
903 (description
904 "The lockfile package exports a LockFile class which provides a simple
905API for locking files.")
906 (license license:expat)))
907
908(define-public python2-lockfile
909 (package-with-python2 python-lockfile))
910
6e792089
JK
911(define-public python-filelock
912 (package
913 (name "python-filelock")
914 (version "3.0.12")
915 (source
916 (origin
917 (method url-fetch)
918 (uri (pypi-uri "filelock" version))
919 (sha256
920 (base32
921 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
922 (build-system python-build-system)
923 (home-page
924 "https://github.com/benediktschmitt/py-filelock")
925 (synopsis "Platform independent file lock")
926 (description "@code{filelock} contains a single module implementing
927a platform independent file lock in Python, which provides a simple way of
928inter-process communication.")
929 (license license:unlicense)))
930
44d10b1f
RW
931(define-public python-semantic-version
932 (package
933 (name "python-semantic-version")
934 (version "2.6.0")
935 (source
936 (origin
937 (method url-fetch)
938 (uri (pypi-uri "semantic_version" version))
939 (sha256
940 (base32
941 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
942 (build-system python-build-system)
943 (arguments
944 `(#:tests? #f)) ; PyPI tarball lacks tests
945 (home-page "https://github.com/rbarrois/python-semanticversion")
946 (synopsis "Semantic versioning module for Python")
947 (description
948 "The @code{semantic_version} class is a small library for handling
949@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
950
951It can compare versions, generate a new version that represents a bump in one of
952the version levels, and check whether any given string is a proper semantic
953version identifier.")
954 (license license:bsd-3)))
955
956(define-public python2-semantic-version
957 (package-with-python2 python-semantic-version))
958
959(define-public python-serpent
960 (package
961 (name "python-serpent")
fa9d14ac 962 (version "1.28")
44d10b1f
RW
963 (source
964 (origin
965 (method url-fetch)
966 (uri (pypi-uri "serpent" version))
967 (sha256
fa9d14ac 968 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 969 (build-system python-build-system)
fa9d14ac
TGR
970 (native-inputs
971 `(("python-attrs" ,python-attrs)
972 ("python-pytz" ,python-pytz)))
44d10b1f
RW
973 (home-page "https://github.com/irmen/Serpent")
974 (synopsis "Serializer for literal Python expressions")
975 (description
1d3c7803
TGR
976 "Serpent provides @code{ast.literal_eval()}-compatible object tree
977serialization. It serializes an object tree into bytes (an utf-8 encoded
978string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
979to rebuild the original object tree.
980
981Because only safe literals are encoded, it is safe to send serpent data to
982other machines, such as over the network.")
44d10b1f
RW
983 (license license:expat)))
984
985(define-public python-setuptools
986 (package
987 (name "python-setuptools")
e39d4933 988 (version "41.0.1")
44d10b1f
RW
989 (source
990 (origin
991 (method url-fetch)
992 (uri (pypi-uri "setuptools" version ".zip"))
993 (sha256
994 (base32
e39d4933 995 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
996 (modules '((guix build utils)))
997 (snippet
998 '(begin
999 ;; Remove included binaries which are used to build self-extracting
1000 ;; installers for Windows.
1001 ;; TODO: Find some way to build them ourself so we can include them.
1002 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1003 #t))))
1004 (build-system python-build-system)
1005 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1006 ;; One could bootstrap with an internal untested setuptools.
1007 (arguments
1008 `(#:tests? #f))
e85af137 1009 (home-page "https://pypi.org/project/setuptools/")
44d10b1f
RW
1010 (synopsis
1011 "Library designed to facilitate packaging Python projects")
1012 (description
1013 "Setuptools is a fully-featured, stable library designed to facilitate
1014packaging Python projects, where packaging includes:
1015Python package and module definitions,
1016distribution package metadata,
1017test hooks,
1018project installation,
1019platform-specific details,
1020Python 3 support.")
1021 ;; TODO: setuptools now bundles the following libraries:
1022 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1023 (license (list license:psfl ; setuptools itself
1024 license:expat ; six, appdirs, pyparsing
1025 license:asl2.0 ; packaging is dual ASL2/BSD-2
1026 license:bsd-2))))
1027
1028(define-public python2-setuptools
1029 (package-with-python2 python-setuptools))
1030
0fdec2a3
MB
1031;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1032(define-public python-setuptools-for-tensorflow
1033 (hidden-package
1034 (package
1035 (inherit python-setuptools)
1036 (version "39.1.0")
1037 (source (origin
1038 (inherit (package-source python-setuptools))
1039 (uri (pypi-uri "setuptools" version ".zip"))
1040 (sha256
1041 (base32
1042 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1043
44d10b1f
RW
1044(define-public python-uniseg
1045 (package
1046 (name "python-uniseg")
1047 (version "0.7.1")
1048 (source
1049 (origin
1050 (method url-fetch)
1051 (uri (pypi-uri "uniseg" version ".zip"))
1052 (sha256
1053 (base32
1054 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1055 (build-system python-build-system)
1056 (arguments
1057 '(#:tests? #f)) ; The test suite requires network access.
1058 (native-inputs
1059 `(("unzip" ,unzip)))
1060 (home-page
1061 "https://bitbucket.org/emptypage/uniseg-python")
1062 (synopsis
1063 "Python library to determine Unicode text segmentations")
1064 (description
1065 "Uniseg is a Python package used to determine Unicode text segmentations.
1066Supported segmentations include:
1067@enumerate
1068@item @dfn{Code point} (any value in the Unicode codespace)
1069@item @dfn{Grapheme cluster} (user-perceived character made of a single or
1070multiple Unicode code points, e.g. \"G\" + acute-accent)
1071@item Word break
1072@item Sentence break
1073@item Line break
1074@end enumerate")
1075 (license license:expat)))
1076
1077(define-public python2-uniseg
1078 (package-with-python2 python-uniseg))
1079
1080(define-public python-humanfriendly
1081 (package
1082 (name "python-humanfriendly")
1083 (version "4.4.1")
1084 (source
1085 (origin
1086 (method url-fetch)
1087 (uri (pypi-uri "humanfriendly" version))
1088 (sha256
1089 (base32
1090 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
1091 (build-system python-build-system)
1092 (arguments
1093 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1094 #:tests? #f))
1095 (propagated-inputs
1096 `(("python-monotonic" ,python-monotonic)))
1097 (home-page "https://humanfriendly.readthedocs.io")
1098 (synopsis "Human-friendly input and output in Python")
1099 (description
1100 "The functions and classes in @code{humanfriendly} can be used to make
1101text interfaces more user-friendly. It includes tools to parse and format
1102numbers, file sizes, and timespans, timers for long-running operations, menus
1103to allow the user to choose from a list of options, and terminal interaction
1104helpers.")
1105 (license license:expat)))
1106
1107(define-public python2-humanfriendly
1108 (package-with-python2 python-humanfriendly))
1109
1110(define-public python-capturer
1111 (package
1112 (name "python-capturer")
1113 (version "2.4")
1114 (source
1115 (origin
1116 (method url-fetch)
1117 (uri (pypi-uri "capturer" version))
1118 (sha256
1119 (base32
1120 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1121 (build-system python-build-system)
1122 (arguments
1123 `(#:tests? #f))
1124 (propagated-inputs
1125 `(("python-humanfriendly" ,python-humanfriendly)))
1126 (home-page "https://capturer.readthedocs.io")
1127 (synopsis "Capture stdout and stderr streams of the current process")
1128 (description
1129 "The capturer package makes it easy to capture the stdout and stderr
1130streams of the current process and subprocesses. Output can be relayed
1131to the terminal in real time but is also available to the Python program
1132for additional processing.")
1133 (license license:expat)))
1134
1135(define-public python2-capturer
1136 (package-with-python2 python-capturer))
1137
1138(define-public python-case
1139 (package
1140 (name "python-case")
1141 (version "1.5.3")
1142 (source
1143 (origin
1144 (method url-fetch)
1145 (uri (pypi-uri "case" version))
1146 (sha256
1147 (base32
1148 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1149 (build-system python-build-system)
1150 (propagated-inputs
1151 `(("python-mock" ,python-mock)
1152 ("python-nose" ,python-nose)
1153 ("python-six" ,python-six)
1154 ("python-unittest2" ,python-unittest2)))
1155 (native-inputs
1156 `(("python-coverage" ,python-coverage)))
1157 (home-page "https://github.com/celery/case")
1158 (synopsis "Unittest utilities and convenience methods")
1159 (description
1160 "The @code{case} package provides utilities on top of unittest, including
1161some helpful Python 2 compatibility convenience methods.")
1162 (license license:bsd-3)))
1163
1164(define-public python-verboselogs
1165 (package
1166 (name "python-verboselogs")
1167 (version "1.7")
1168 (source
1169 (origin
1170 (method url-fetch)
1171 (uri (pypi-uri "verboselogs" version))
1172 (sha256
1173 (base32
1174 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1175 (build-system python-build-system)
1760c970
MO
1176 (arguments
1177 `(#:phases
1178 (modify-phases %standard-phases
1179 (replace 'check
1180 (lambda _
1181 ;; Do not run pylint plugin test, as astroid is an old
1182 ;; unsupported version.
1183 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1184 "verboselogs/tests.py"))))))
44d10b1f
RW
1185 (native-inputs
1186 `(("python-mock" ,python-mock)
1760c970 1187 ("python-pytest" ,python-pytest)))
44d10b1f
RW
1188 (home-page "https://verboselogs.readthedocs.io")
1189 (synopsis "Verbose logging level for Python's logging module")
1190 (description
1191 "The @code{verboselogs} package extends Python's @code{logging} module to
1192add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1193 (license license:expat)))
1194
1195(define-public python2-verboselogs
1196 (package-with-python2 python-verboselogs))
1197
1198(define-public python-coloredlogs
1199 (package
1200 (name "python-coloredlogs")
b2b8a39c 1201 (version "10.0")
44d10b1f
RW
1202 (source
1203 (origin
1204 (method url-fetch)
1205 (uri (pypi-uri "coloredlogs" version))
1206 (sha256
1207 (base32
b2b8a39c 1208 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
44d10b1f
RW
1209 (build-system python-build-system)
1210 (arguments
1211 `(;Tests require some updated modules
1212 #:tests? #f))
1213 (propagated-inputs
1214 `(("python-capturer" ,python-capturer)))
1215 (home-page "https://coloredlogs.readthedocs.io")
1216 (synopsis "Colored stream handler for Python's logging module")
1217 (description
1218 "The @code{coloredlogs} package enables colored terminal output for
1219Python's logging module. The @code{ColoredFormatter} class inherits from
1220@code{logging.Formatter} and uses ANSI escape sequences to render your logging
1221messages in color.")
1222 (license license:expat)))
1223
1224(define-public python2-coloredlogs
1225 (package-with-python2 python-coloredlogs))
1226
af760990
VC
1227(define-public python-editorconfig
1228 (package
1229 (name "python-editorconfig")
1230 (version "0.12.2")
1231 (source
1232 (origin
1233 (method url-fetch)
1234 (uri (pypi-uri "EditorConfig" version))
1235 (sha256
1236 (base32
1237 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1238 (build-system python-build-system)
1239 (home-page "https://editorconfig.org/")
1240 (synopsis "EditorConfig bindings for python")
1241 (description "The EditorConfig project consists of a file format for
1242defining coding styles and a collection of text editor plugins that enable
1243editors to read the file format and adhere to defined styles. EditorConfig
1244files are easily readable and they work nicely with version control systems.")
1245 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1246 (license (list license:bsd-2 license:psfl))))
1247
4caf37b0
MC
1248(define-public python-et-xmlfile
1249 (package
1250 (name "python-et-xmlfile")
1251 (version "1.0.1")
1252 (source
1253 (origin
1254 (method url-fetch)
1255 (uri (pypi-uri "et_xmlfile" version))
1256 (sha256
1257 (base32
1258 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1259 (build-system python-build-system)
1260 (arguments
1261 `(#:phases (modify-phases %standard-phases
1262 (replace 'check
1263 (lambda _
1264 (invoke "pytest"))))))
1265 (native-inputs
1266 `(("python-pytest" ,python-pytest)
1267 ("python-lxml" ,python-lxml))) ;used for the tests
1268 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1269 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1270 (description "This Python library is based upon the @code{xmlfile} module
1271from @code{lxml}. It aims to provide a low memory, compatible implementation
1272of @code{xmlfile}.")
1273 (license license:expat)))
1274
1275(define-public python2-et-xmlfile
1276 (package-with-python2 python-et-xmlfile))
1277
a042d348
MC
1278(define-public python-openpyxl
1279 (package
1280 (name "python-openpyxl")
441e6d93 1281 (version "2.6.2")
a042d348
MC
1282 (source
1283 (origin
1284 ;; We use the upstream repository, as the tests are not included in the
1285 ;; PyPI releases.
1286 (method hg-fetch)
1287 (uri (hg-reference
1288 (url "https://bitbucket.org/openpyxl/openpyxl")
1289 (changeset version)))
1290 (file-name (string-append name "-" version "-checkout"))
1291 (sha256
441e6d93 1292 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1293 (build-system python-build-system)
1294 (arguments
1295 `(#:phases (modify-phases %standard-phases
1296 (replace 'check
1297 (lambda _
1298 (invoke "pytest"))))))
1299 (native-inputs
1300 ;; For the test suite.
1301 `(("python-lxml" ,python-lxml)
1302 ("python-pillow" ,python-pillow)
1303 ("python-pytest" ,python-pytest)))
1304 (propagated-inputs
1305 `(("python-et-xmlfile" ,python-et-xmlfile)
1306 ("python-jdcal" ,python-jdcal)))
1307 (home-page "https://openpyxl.readthedocs.io")
1308 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1309 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1310XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1311standard.")
1312 (license license:expat)))
1313
44d10b1f
RW
1314(define-public python-eventlet
1315 (package
1316 (name "python-eventlet")
c9876c9b 1317 (version "0.25.1")
44d10b1f
RW
1318 (source
1319 (origin
1320 (method url-fetch)
1321 (uri (pypi-uri "eventlet" version))
1322 (sha256
1323 (base32
c9876c9b 1324 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
44d10b1f
RW
1325 (build-system python-build-system)
1326 (propagated-inputs
1327 `(("python-greenlet" ,python-greenlet)))
1328 (arguments
1329 ;; TODO: Requires unpackaged 'enum-compat'.
1330 '(#:tests? #f))
bff36617 1331 (home-page "https://eventlet.net")
44d10b1f
RW
1332 (synopsis "Concurrent networking library for Python")
1333 (description
1334 "Eventlet is a concurrent networking library for Python that
1335allows you to change how you run your code, not how you write it.
1336It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1337Coroutines ensure that the developer uses a blocking style of programming
1338that is similar to threading, but provide the benefits of non-blocking I/O.
1339The event dispatch is implicit, which means you can easily use @code{Eventlet}
1340from the Python interpreter, or as a small part of a larger application.")
1341 (license license:expat)))
1342
1343(define-public python2-eventlet
1344 (let ((base (package-with-python2
1345 (strip-python2-variant python-eventlet))))
1346 (package (inherit base)
1347 (propagated-inputs
1348 `(("python2-enum34" ,python2-enum34)
1349 ,@(package-propagated-inputs base))))))
1350
1351(define-public python-six
1352 (package
1353 (name "python-six")
6c58a06e 1354 (version "1.12.0")
44d10b1f
RW
1355 (source
1356 (origin
1357 (method url-fetch)
1358 (uri (pypi-uri "six" version))
1359 (sha256
1360 (base32
6c58a06e 1361 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1362 (build-system python-build-system)
1363 (arguments
1364 `(#:phases
1365 (modify-phases %standard-phases
1366 (replace 'check
1367 (lambda _
1368 (invoke "py.test" "-v"))))))
1369 (native-inputs
1370 `(("python-py" ,python-py)
1371 ("python-pytest" ,python-pytest-bootstrap)))
e85af137 1372 (home-page "https://pypi.org/project/six/")
44d10b1f
RW
1373 (synopsis "Python 2 and 3 compatibility utilities")
1374 (description
1375 "Six is a Python 2 and 3 compatibility library. It provides utility
1376functions for smoothing over the differences between the Python versions with
1377the goal of writing Python code that is compatible on both Python versions.
1378Six supports every Python version since 2.5. It is contained in only one
1379Python file, so it can be easily copied into your project.")
1380 (license license:x11)))
1381
1382(define-public python2-six
1383 (package-with-python2 python-six))
1384
1385(define-public python-six-bootstrap
1386 (package
1387 (inherit python-six)
1388 (name "python-six-bootstrap")
1389 (native-inputs `())
1390 (arguments `(#:tests? #f))))
1391
1392(define-public python2-six-bootstrap
1393 (package-with-python2 python-six-bootstrap))
1394
1395(define-public python-schedule
1396 (package
1397 (name "python-schedule")
1398 (version "0.4.3")
1399 (source
1400 (origin
1401 (method url-fetch)
1402 (uri (pypi-uri "schedule" version))
1403 (sha256
1404 (base32
1405 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1406 (build-system python-build-system)
1407 (native-inputs
1408 `(("python-pytest" ,python-pytest)
1409 ("python-mock" ,python-mock)))
1410 (home-page "https://github.com/dbader/schedule")
1411 (synopsis "Schedule periodic function calls in Python")
1412 (description
1413 "Schedule is an in-process scheduler for periodic jobs that uses the
1414builder pattern for configuration. Schedule lets you run Python functions (or
1415any other callable) periodically at pre-determined intervals using a simple,
1416human-friendly syntax.")
1417 (license license:expat)))
1418
1419(define-public python2-schedule
1420 (package-with-python2 python-schedule))
1421
44d10b1f
RW
1422(define-public python2-mechanize
1423 (package
1424 (name "python2-mechanize")
1425 (version "0.2.5")
1426 (source
1427 (origin
1428 (method url-fetch)
1cc184e6 1429 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1430 (sha256
1431 (base32
1432 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1433 (build-system python-build-system)
1434 (arguments
1435 `(#:python ,python-2 ; apparently incompatible with Python 3
1436 #:tests? #f))
1437 ;; test fails with message
1438 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1439 ;; (python-3.3.2) or
1440 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1441 ;; (python-2.7.5).
1442 ;; The source code is from March 2011 and probably not up-to-date
1443 ;; with respect to python unit tests.
1444 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1445 (synopsis
1446 "Stateful programmatic web browsing in Python")
1447 (description
1448 "Mechanize implements stateful programmatic web browsing in Python,
1449after Andy Lester’s Perl module WWW::Mechanize.")
1450 (license (license:non-copyleft
1451 "file://COPYING"
1452 "See COPYING in the distribution."))))
1453
1454
1455(define-public python-simplejson
1456 (package
1457 (name "python-simplejson")
1458 (version "3.14.0")
1459 (source
1460 (origin
1461 (method url-fetch)
1462 (uri (pypi-uri "simplejson" version))
1463 (sha256
1464 (base32
1465 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1466 (build-system python-build-system)
1467 (home-page "http://simplejson.readthedocs.org/en/latest/")
1468 (synopsis
1469 "Json library for Python")
1470 (description
1471 "JSON (JavaScript Object Notation) is a subset of JavaScript
1472syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1473format.
1474
1475Simplejson exposes an API familiar to users of the standard library marshal
1476and pickle modules. It is the externally maintained version of the json
1477library contained in Python 2.6, but maintains compatibility with Python 2.5
1478and (currently) has significant performance advantages, even without using
1479the optional C extension for speedups. Simplejson is also supported on
1480Python 3.3+.")
1481 (license license:x11)))
1482
1483(define-public python2-simplejson
1484 (package-with-python2 python-simplejson))
1485
1486
1487(define-public python-pyicu
1488 (package
1489 (name "python-pyicu")
dc23bb45 1490 (version "2.3.1")
44d10b1f
RW
1491 (source
1492 (origin
1493 (method url-fetch)
1494 (uri (pypi-uri "PyICU" version))
1495 (sha256
1496 (base32
dc23bb45 1497 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1498 (build-system python-build-system)
1499 (inputs
1500 `(("icu4c" ,icu4c)))
1501 (native-inputs
1502 `(("python-pytest" ,python-pytest)
1503 ("python-six" ,python-six)))
1504 (home-page "https://github.com/ovalhub/pyicu")
1505 (synopsis "Python extension wrapping the ICU C++ API")
1506 (description
1507 "PyICU is a python extension wrapping the ICU C++ API.")
1508 (properties `((python2-variant . ,(delay python2-pyicu))))
1509 (license license:x11)))
1510
1511(define-public python2-pyicu
1512 (let ((base (package-with-python2
1513 (strip-python2-variant python-pyicu))))
1514 (package
1515 (inherit base)
1516 (arguments
1517 `(,@(package-arguments base)
1518 #:phases
1519 (modify-phases %standard-phases
1520 (add-before 'check 'delete-failing-test
1521 (λ _
1522 ;; XXX: This fails due to Unicode issues unique to Python 2,
1523 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1524 (delete-file "test/test_Script.py")
1525 #t))))))))
1526
1527(define-public python2-dogtail
1528 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1529 ;; spaces in indentation" with Python 3.
1530 (package
1531 (name "python2-dogtail")
1532 (version "0.9.9")
1533 (source (origin
1534 (method url-fetch)
1535 (uri (pypi-uri "dogtail" version))
1536 (sha256
1537 (base32
1538 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1539 (build-system python-build-system)
1540 (arguments `(#:python ,python-2
1541 #:tests? #f)) ; invalid command "test"
1542 ;; Currently no offical homepage.
e85af137 1543 (home-page "https://pypi.org/project/dogtail/")
44d10b1f
RW
1544 (synopsis "GUI test tool and automation framework written in Python")
1545 (description
1546 "Dogtail is a GUI test tool and automation framework written in Python.
1547It uses Accessibility (a11y) technologies to communicate with desktop
1548applications. dogtail scripts are written in Python and executed like any
1549other Python program.")
1550 (license license:gpl2+)))
1551
1552(define-public python-empy
1553 (package
1554 (name "python-empy")
0f6d5115 1555 (version "3.3.3")
44d10b1f
RW
1556 (source (origin
1557 (method url-fetch)
1558 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1559 version ".tar.gz"))
1560 (sha256
1561 (base32
0f6d5115 1562 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1563 (build-system python-build-system)
1564 (arguments
0f6d5115 1565 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1566 (home-page "http://www.alcyone.com/software/empy/")
1567 (synopsis "Templating system for Python")
1568 (description
1569 "EmPy is a system for embedding Python expressions and statements in
1570template text; it takes an EmPy source file, processes it, and produces
1571output. This is accomplished via expansions, which are special signals to the
1572EmPy system and are set off by a special prefix (by default the at sign, @@).
1573EmPy can expand arbitrary Python expressions and statements in this way, as
1574well as a variety of special forms. Textual data not explicitly delimited in
1575this way is sent unaffected to the output, allowing Python to be used in
1576effect as a markup language. Also supported are callbacks via hooks,
1577recording and playback via diversions, and dynamic, chainable filters. The
1578system is highly configurable via command line options and embedded
1579commands.")
1580 (license license:lgpl2.1+)))
1581
1582(define-public python2-empy
0f064242
TGR
1583 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1584 (package
1585 (inherit base)
1586 (arguments `(,@(package-arguments base)
1587 #:tests? #t)))))
44d10b1f
RW
1588
1589(define-public python2-element-tree
1590 (package
1591 (name "python2-element-tree")
1592 (version "1.2.6")
1593 (source (origin
1594 (method url-fetch)
1595 (uri (string-append
1596 "http://effbot.org/media/downloads/elementtree-"
1597 version "-20050316.tar.gz"))
1598 (sha256
1599 (base32
1600 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1601 (build-system python-build-system)
1602 (arguments
1603 `(#:python ,python-2 ; seems to be part of Python 3
1604 #:tests? #f)) ; no 'test' sub-command
1605 (synopsis "Toolkit for XML processing in Python")
1606 (description
1607 "ElementTree is a Python library supporting lightweight XML processing.")
8c9b6f32 1608 (home-page "https://effbot.org/zone/element-index.htm")
44d10b1f
RW
1609 (license (license:x11-style
1610 "http://docs.python.org/2/license.html"
1611 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1612
1613(define-public python2-pybugz
1614 (package
1615 (name "python2-pybugz")
1616 (version "0.6.11")
1617 (source (origin
1618 (method url-fetch)
1619 (uri (string-append
1620 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1621 version ".tar.gz"))
1622 (sha256
1623 (base32
1624 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1625 (patches (search-patches "pybugz-stty.patch"
1626 "pybugz-encode-error.patch"))))
1627 (build-system python-build-system)
1628 (arguments
1629 `(#:python ,python-2 ; SyntaxError with Python 3
1630 #:tests? #f)) ; no 'test' sub-command
1631 (propagated-inputs
1632 `(("element-tree" ,python2-element-tree)))
1633 (synopsis "Python and command-line interface to Bugzilla")
1634 (description
1635 "PyBugz is a Python library and command-line tool to query the Bugzilla
1636bug tracking system. It is meant as an aid to speed up interaction with the
1637bug tracker.")
1638 (home-page "http://www.liquidx.net/pybugz/")
1639 (license license:gpl2)))
1640
1641(define-public python2-enum
1642 (package
1643 (name "python2-enum")
1644 (version "0.4.6")
1645 (source (origin
1646 (method url-fetch)
1647 (uri (pypi-uri "enum" version))
1648 (sha256
1649 (base32
1650 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1651 (build-system python-build-system)
1652 (arguments
1653 `(#:python ,python-2))
e85af137 1654 (home-page "https://pypi.org/project/enum/")
44d10b1f
RW
1655 (synopsis "Robust enumerated type support in Python")
1656 (description
1657 "This provides a module for robust enumerations in Python. It has
1658been superseded by the Python standard library and is provided only for
1659compatibility.")
1660 ;; Choice of either license.
1661 (license (list license:gpl3+ license:psfl))))
1662
1663(define-public python-enum34
1664 (package
1665 (name "python-enum34")
1666 (version "1.1.6")
1667 (source
1668 (origin
1669 (method url-fetch)
1670 (uri (pypi-uri "enum34" version))
1671 (sha256
1672 (base32
1673 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1674 (build-system python-build-system)
e85af137 1675 (home-page "https://pypi.org/project/enum34/")
44d10b1f
RW
1676 (synopsis "Backported Python 3.4 Enum")
1677 (description
1678 "Enum34 is the new Python stdlib enum module available in Python 3.4
1679backported for previous versions of Python from 2.4 to 3.3.")
1680 (license license:bsd-3)))
1681
1682(define-public python2-enum34
1683 (package-with-python2 python-enum34))
1684
1685(define-public python-parse-type
1686 (package
1687 (name "python-parse-type")
1688 (version "0.4.2")
1689 (source
1690 (origin
1691 (method url-fetch)
1692 (uri (pypi-uri "parse_type" version))
1693 (sha256
1694 (base32
1695 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1696 (build-system python-build-system)
1697 (propagated-inputs
1698 `(("python-six" ,python-six)
1699 ("python-parse" ,python-parse)))
1700 (native-inputs
1701 `(("python-pytest" ,python-pytest)
1702 ("python-pytest-runner" ,python-pytest-runner)))
1703 (home-page "https://github.com/jenisys/parse_type")
1704 (synopsis "Extended parse module")
1705 (description
1706 "Parse_type extends the python parse module.")
1707 (properties
1708 `((python2-variant . ,(delay python2-parse-type))))
1709 (license license:bsd-3)))
1710
1711(define-public python2-parse-type
1712 (let ((base (package-with-python2
1713 (strip-python2-variant python-parse-type))))
1714 (package (inherit base)
1715 (propagated-inputs
1716 `(("python2-enum34" ,python2-enum34)
1717 ,@(package-propagated-inputs base))))))
1718
1719(define-public python-parse
1720 (package
1721 (name "python-parse")
1722 (version "1.8.4")
1723 (source
1724 (origin
1725 (method url-fetch)
1726 (uri (pypi-uri "parse" version))
1727 (sha256
1728 (base32
1729 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1730 (build-system python-build-system)
1731 (arguments
1732 `(#:phases
1733 (modify-phases %standard-phases
1734 (replace 'check
1735 (lambda _ (invoke "python" "test_parse.py"))))))
1736 (home-page "https://github.com/r1chardj0n3s/parse")
1737 (synopsis "Parse strings")
1738 (description
1739 "Parse strings using a specification based on the Python @code{format()}
1740syntax.")
1741 (license license:x11)))
1742
1743(define-public python-polib
1744 (package
1745 (name "python-polib")
1746 (version "1.0.8")
1747 (source (origin
1748 (method url-fetch)
1749 (uri (pypi-uri "polib" version))
1750 (sha256
1751 (base32
1752 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1753 (build-system python-build-system)
1754 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1755 (synopsis "Manipulate, create and modify gettext files")
1756 (description "Polib can manipulate any gettext format (po, pot and mo)
1757files. It can be used to create po files from scratch or to modify
1758existing ones.")
1759 (license license:expat)))
1760
1761(define-public python2-polib
1762 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1763 (package
1764 (inherit base)
1765 (arguments `(,@(package-arguments base)
1766 ;; Tests don't work with python2.
1767 #:tests? #f)))))
1768
6830120e
TLC
1769(define-public python-poyo
1770 (package
1771 (name "python-poyo")
1772 (version "0.5.0")
1773 (source
1774 (origin
1775 (method url-fetch)
1776 (uri (pypi-uri "poyo" version))
1777 (sha256
1778 (base32
1779 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1780 (build-system python-build-system)
1781 (home-page "https://github.com/hackebrot/poyo")
1782 (synopsis "Lightweight YAML Parser for Python")
1783 (description
1784 "This package provides a lightweight YAML Parser for Python. It supports
1785only a chosen subset of the YAML format that is required to parse cookiecutter
1786user configuration files. It does not have support for serializing into YAML
1787and is not compatible with JSON.")
1788 (license license:expat)))
1789
44d10b1f
RW
1790(define-public scons
1791 (package
1792 (name "scons")
05487ed8 1793 (version "3.0.4")
44d10b1f 1794 (source (origin
ad34338d
RW
1795 (method git-fetch)
1796 (uri (git-reference
1797 (url "https://github.com/SCons/scons.git")
1798 (commit version)))
1799 (file-name (git-file-name name version))
44d10b1f
RW
1800 (sha256
1801 (base32
05487ed8 1802 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1803 (build-system python-build-system)
1804 (arguments
1805 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1806 #:tests? #f ; no 'python setup.py test' command
1807 #:phases
1808 (modify-phases %standard-phases
1809 (add-before 'build 'bootstrap
1810 (lambda _
1811 (substitute* "src/engine/SCons/compat/__init__.py"
1812 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1813 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1814 (substitute* "src/engine/SCons/Platform/__init__.py"
1815 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1816 "mod = __import__(full_name)"))
ad34338d
RW
1817 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1818 (chdir "build/scons")
1819 #t)))))
3602de33 1820 (home-page "https://scons.org/")
44d10b1f
RW
1821 (synopsis "Software construction tool written in Python")
1822 (description
1823 "SCons is a software construction tool. Think of SCons as an improved,
1824cross-platform substitute for the classic Make utility with integrated
1825functionality similar to autoconf/automake and compiler caches such as ccache.
1826In short, SCons is an easier, more reliable and faster way to build
1827software.")
1828 (license license:x11)))
1829
1830(define-public scons-python2
1831 (package
1832 (inherit (package-with-python2 scons))
1833 (name "scons-python2")))
1834
1835(define-public python-extras
1836 (package
1837 (name "python-extras")
1838 (version "1.0.0")
1839 (source
1840 (origin
1841 (method url-fetch)
1842 (uri (pypi-uri "extras" version))
1843 (sha256
1844 (base32
1845 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1846 (build-system python-build-system)
1847 (arguments
1848 ;; FIXME: Circular dependency on testtools.
1849 '(#:tests? #f))
1850 (home-page "https://github.com/testing-cabal/extras")
1851 (synopsis "Useful extensions to the Python standard library")
1852 (description
1853 "Extras is a set of extensions to the Python standard library.")
1854 (license license:expat)))
1855
1856(define-public python2-extras
1857 (package-with-python2 python-extras))
1858
1859(define-public python-mimeparse
1860 (package
1861 (name "python-mimeparse")
1862 (version "1.6.0")
1863 (source
1864 (origin
1865 (method url-fetch)
89bf667c 1866 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1867 (sha256
1868 (base32
1869 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1870 (build-system python-build-system)
1871 (arguments
1872 '(#:phases
1873 (modify-phases %standard-phases
1874 (replace 'check
1875 (lambda _
1876 (invoke "./mimeparse_test.py"))))))
1877 (home-page
1878 "https://github.com/dbtsai/python-mimeparse")
1879 (synopsis "Python library for parsing MIME types")
1880 (description
1881 "Mimeparse provides basic functions for parsing MIME type names and
1882matching them against a list of media-ranges.")
1883 (license license:expat)))
1884
1885(define-public python2-mimeparse
1886 (package-with-python2 python-mimeparse))
1887
1888(define-public python-miniboa
1889 (package
1890 (name "python-miniboa")
1891 (version "1.0.7")
1892 (source
1893 (origin
1894 (method url-fetch)
1895 (uri (pypi-uri "miniboa" version))
1896 (sha256
1897 (base32
1898 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1899 (build-system python-build-system)
1900 (home-page "https://github.com/shmup/miniboa")
1901 (synopsis "Simple, single-threaded Telnet server")
1902 (description
1903 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1904server.")
1905 (license license:asl2.0)))
1906
1907(define-public python2-miniboa
1908 (package-with-python2 python-miniboa))
1909
1910(define-public python-pafy
1911 (package
1912 (name "python-pafy")
1913 (version "0.5.3.1")
1914 (source
1915 (origin
1916 (method url-fetch)
1917 (uri (pypi-uri "pafy" version))
1918 (sha256
1919 (base32
1920 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1921 (build-system python-build-system)
1922 (arguments
1923 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1924 (propagated-inputs
1925 ;; Youtube-dl is a python package which is imported in the file
1926 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1927 `(("youtube-dl" ,youtube-dl)))
1928 (home-page "https://np1.github.io/pafy/")
1929 (synopsis "Retrieve YouTube content and metadata")
1930 (description
1931 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1932 (license license:lgpl3+)))
1933
1934(define-public python2-funcsigs
1935 (package
1936 (name "python2-funcsigs")
1937 (version "1.0.2")
1938 (source (origin
1939 (method url-fetch)
1940 (uri (pypi-uri "funcsigs" version))
1941 (sha256
1942 (base32
1943 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1944 (build-system python-build-system)
1945 (arguments
1946 `(#:python ,python-2))
1947 (native-inputs
1948 `(("python2-unittest2" ,python2-unittest2)))
1949 (home-page "http://funcsigs.readthedocs.org")
1950 (synopsis "Python function signatures from PEP362")
1951 (description
1952 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1953 (license license:asl2.0)))
1954
1955(define-public python2-funcsigs-bootstrap
1956 (package
1957 (inherit python2-funcsigs)
1958 (name "python2-funcsigs-bootstrap")
1959 (native-inputs `())
1960 (arguments
1961 `(#:tests? #f
1962 ,@(package-arguments python2-funcsigs)))))
1963
1964(define-public python-py
1965 (package
1966 (name "python-py")
08eba545 1967 (version "1.8.0")
44d10b1f
RW
1968 (source
1969 (origin
1970 (method url-fetch)
1971 (uri (pypi-uri "py" version))
1972 (sha256
1973 (base32
08eba545 1974 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1975 (build-system python-build-system)
1976 (arguments
1977 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1978 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1979 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1980 ;; Is this module globally installed?"
1981 '(#:tests? #f))
1982 (native-inputs
1983 `(("python-setuptools-scm" ,python-setuptools-scm)))
1984 (home-page "https://github.com/pytest-dev/py")
1985 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1986 (description
1987 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1988code introspection, and logging.")
1989 (license license:expat)))
1990
1991(define-public python2-py
1992 (package-with-python2 python-py))
1993
1994;; Recent versions of python-fixtures and python-testrepository need
1995;; python-pbr for packaging, which itself needs these two packages for
1996;; testing.
1997;; To fix this circular dependency, we use a build of python-pbr, based on the
1998;; same source, just without any test dependencies and with tests disabled.
1999;; python-pbr-minmal is then used to package python-fixtures and
2000;; python-testrepository.
2001;; Strictly speaking we currently could remove the test-requirements from the
2002;; normal python-pbr package (and save this package) since test are disabled
2003;; there anyway. But this may change in future.
2004(define-public python-pbr-minimal
2005 (package
2006 (name "python-pbr-minimal")
2007 (version "3.0.1")
2008 (source
2009 (origin
2010 (method url-fetch)
2011 (uri (pypi-uri "pbr" version))
2012 (sha256
2013 (base32
2014 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2015 (build-system python-build-system)
2016 (arguments
2017 `(#:tests? #f))
58d4e949 2018 (home-page "https://docs.openstack.org/pbr/latest/")
44d10b1f
RW
2019 (synopsis "Minimal build of python-pbr used for bootstrapping")
2020 (description
2021 "Used only for bootstrapping python2-pbr, you should not need this.")
2022 (license license:asl2.0)))
2023
2024(define-public python2-pbr-minimal
2025 (package-with-python2 python-pbr-minimal))
2026
2027(define-public python-pbr
2028 (package
2029 (inherit python-pbr-minimal)
2030 (name "python-pbr")
2031 (arguments
2032 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2033 (propagated-inputs
2034 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2035 (native-inputs
2036 `(("python-fixtures" ,python-fixtures-bootstrap)
2037 ;; discover, coverage, hacking, subunit
2038 ("python-mock" ,python-mock)
2039 ("python-six" ,python-six)
2040 ("python-sphinx" ,python-sphinx)
2041 ("python-testrepository" ,python-testrepository-bootstrap)
2042 ("python-testresources" ,python-testresources-bootstrap)
2043 ("python-testscenarios" ,python-testscenarios-bootstrap)
2044 ("python-testtools" ,python-testtools-bootstrap)
2045 ("python-virtualenv" ,python-virtualenv)))
2046 (synopsis "Enhance the default behavior of Python’s setuptools")
2047 (description
2048 "Python Build Reasonableness (PBR) is a library that injects some useful
2049and sensible default behaviors into your setuptools run. It will set
2050versions, process requirements files and generate AUTHORS and ChangeLog file
2051from git information.
2052")))
2053
2054(define-public python2-pbr
2055 (package-with-python2 python-pbr))
2056
ea43f0d5
MB
2057(define-public python-pyrsistent
2058 (package
2059 (name "python-pyrsistent")
c19930dc 2060 (version "0.15.7")
ea43f0d5
MB
2061 (home-page "https://github.com/tobgu/pyrsistent")
2062 (source (origin
2063 (method url-fetch)
2064 (uri (pypi-uri "pyrsistent" version))
2065 (sha256
2066 (base32
c19930dc 2067 "103j63g6lb5dfspph96zxjdpnq9h991kazd4f09ddgkpxpivbiyd"))))
ea43f0d5
MB
2068 (build-system python-build-system)
2069 (native-inputs
2070 `(("python-hypothesis" ,python-hypothesis)
2071 ("python-pytest" ,python-pytest)
2072 ("python-pytest-runner" ,python-pytest-runner)))
2073 (propagated-inputs
2074 `(("python-six" ,python-six)))
2075 (synopsis "Persistent data structures for Python")
2076 (description
2077 "Pyrsistent is a number of persistent collections (by some referred to as
2078functional data structures). Persistent in the sense that they are immutable.
2079
2080All methods on a data structure that would normally mutate it instead return a
2081new copy of the structure containing the requested updates. The original
2082structure is left untouched.")
2083 (license license:expat)))
2084
2085(define-public python2-pyrsistent
2086 (package-with-python2 python-pyrsistent))
2087
44d10b1f
RW
2088(define-public python-exif-read
2089 (package
2090 (name "python-exif-read")
2091 (version "2.1.2")
2092 (source (origin
2093 (method url-fetch)
2094 (uri (pypi-uri "ExifRead" version))
2095 (sha256
2096 (base32
2097 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2098 (build-system python-build-system)
2099 (arguments `(#:tests? #f)) ; no tests
2100 (home-page "https://github.com/ianare/exif-py")
2101 (synopsis "Python library to extract EXIF data from image files")
2102 (description
2103 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2104files.")
2105 (license license:bsd-3)))
2106
2107(define-public python2-exif-read
2108 (package-with-python2 python-exif-read))
2109
2110(define-public python-pyld
2111 (package
2112 (name "python-pyld")
6d4ed78d 2113 (version "1.0.5")
44d10b1f
RW
2114 (source (origin
2115 (method url-fetch)
2116 (uri (pypi-uri "PyLD" version))
2117 (sha256
2118 (base32
6d4ed78d 2119 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
44d10b1f
RW
2120 (build-system python-build-system)
2121 (home-page "https://github.com/digitalbazaar/pyld")
2122 (synopsis "Python implementation of the JSON-LD specification")
2123 (description
2124 "PyLD is an implementation of the JSON-LD specification.")
2125 (license license:bsd-3)))
2126
2127(define-public python2-pyld
2128 (package-with-python2 python-pyld))
2129
2130(define-public python-click
2131 (package
2132 (name "python-click")
61984855 2133 (version "7.0")
44d10b1f
RW
2134 (source
2135 (origin
2136 (method url-fetch)
2137 (uri (pypi-uri "click" version))
2138 (sha256
2139 (base32
61984855 2140 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
2141 (build-system python-build-system)
2142 (arguments
8d7e7ca6 2143 `(#:phases
44d10b1f
RW
2144 (modify-phases %standard-phases
2145 (add-after 'unpack 'fix-paths
2146 (lambda* (#:key inputs #:allow-other-keys)
2147 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2148 "cross-libc" "libc"))))
2149 (substitute* "click/_unicodefun.py"
2150 (("'locale'")
2151 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
2152 #t))
2153 (replace 'check
2154 (lambda _
2155 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
2156 (native-inputs
2157 `(("python-pytest" ,python-pytest)))
61984855 2158 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
2159 (synopsis "Command line library for Python")
2160 (description
2161 "Click is a Python package for creating command line interfaces in a
2162composable way with as little code as necessary. Its name stands for
2163\"Command Line Interface Creation Kit\". It's highly configurable but comes
2164with sensible defaults out of the box.")
2165 (license license:bsd-3)))
2166
2167(define-public python2-click
2168 (package-with-python2 python-click))
2169
2170(define-public python-wheel
2171 (package
2172 (name "python-wheel")
8f137daf 2173 (version "0.33.6")
44d10b1f
RW
2174 (source
2175 (origin
2176 (method url-fetch)
2177 (uri (pypi-uri "wheel" version))
2178 (sha256
2179 (base32
8f137daf 2180 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
44d10b1f 2181 (build-system python-build-system)
8f137daf
MB
2182 (arguments
2183 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2184 ;; fails to find the newly-built bdist_wheel library, even though it is
2185 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2186 '(#:tests? #f))
44d10b1f
RW
2187 (home-page "https://bitbucket.org/pypa/wheel/")
2188 (synopsis "Format for built Python packages")
2189 (description
2190 "A wheel is a ZIP-format archive with a specially formatted filename and
2191the @code{.whl} extension. It is designed to contain all the files for a PEP
2192376 compatible install in a way that is very close to the on-disk format. Many
2193packages will be properly installed with only the @code{Unpack} step and the
2194unpacked archive preserves enough information to @code{Spread} (copy data and
2195scripts to their final locations) at any later time. Wheel files can be
2196installed with a newer @code{pip} or with wheel's own command line utility.")
8f137daf 2197 (license license:expat)))
44d10b1f
RW
2198
2199(define-public python2-wheel
8f137daf 2200 (package-with-python2 python-wheel))
44d10b1f
RW
2201
2202(define-public python-vcversioner
2203 (package
2204 (name "python-vcversioner")
2205 (version "2.16.0.0")
2206 (source
2207 (origin
2208 (method url-fetch)
2209 (uri (pypi-uri "vcversioner" version))
2210 (sha256
2211 (base32
2212 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2213 (build-system python-build-system)
2214 (synopsis "Python library for version number discovery")
2215 (description "Vcversioner is a Python library that inspects tagging
2216information in a variety of version control systems in order to discover
2217version numbers.")
2218 (home-page "https://github.com/habnabit/vcversioner")
2219 (license license:isc)))
2220
2221(define-public python2-vcversioner
2222 (package-with-python2 python-vcversioner))
2223
5591fc4f
MC
2224(define-public python-jdcal
2225 (package
2226 (name "python-jdcal")
2227 (version "1.4")
2228 (source
2229 (origin
2230 (method url-fetch)
2231 (uri (pypi-uri "jdcal" version))
2232 (sha256
2233 (base32
2234 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2235 (build-system python-build-system)
2236 (arguments
2237 `(#:phases (modify-phases %standard-phases
2238 (replace 'check
2239 (lambda _
2240 (invoke "pytest"))))))
2241 (native-inputs
2242 `(("python-pytest" ,python-pytest)))
2243 (home-page "https://github.com/phn/jdcal")
2244 (synopsis "Functions to convert between Julian dates Gregorian dates")
2245 (description "This Python library provides functions for converting
2246between Julian dates and Gregorian dates.")
2247 (license license:bsd-2)))
2248
2249(define-public python2-jdcal
2250 (package-with-python2 python-jdcal))
2251
06d41d8d
VC
2252(define-public python-jsondiff
2253 (package
2254 (name "python-jsondiff")
2255 (version "1.2.0")
2256 (source
2257 (origin
2258 (method url-fetch)
2259 (uri (pypi-uri "jsondiff" version))
2260 (sha256
2261 (base32
2262 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2263 (build-system python-build-system)
2264 (native-inputs
2265 `(("python-nose" ,python-nose)
2266 ("python-nose-random" ,python-nose-random)))
2267 (home-page
2268 "https://github.com/fzumstein/jsondiff")
2269 (synopsis "Compare JSON and JSON-like structures in Python")
2270 (description "@code{jsondiff} is a Python library which lets you
2271compare, diff, and patch JSON and JSON-like structures in Python.")
2272 (license license:expat)))
2273
44d10b1f
RW
2274(define-public python-jsonschema
2275 (package
2276 (name "python-jsonschema")
a356d1b6 2277 (version "3.2.0")
44d10b1f
RW
2278 (source (origin
2279 (method url-fetch)
786ccb87 2280 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
2281 (sha256
2282 (base32
a356d1b6 2283 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
44d10b1f
RW
2284 (build-system python-build-system)
2285 (arguments
2286 '(#:phases
2287 (modify-phases %standard-phases
1adde06e 2288 (replace 'check
a356d1b6
TLC
2289 (lambda* (#:key inputs outputs #:allow-other-keys)
2290 (add-installed-pythonpath inputs outputs)
1adde06e
MB
2291 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2292 (invoke "trial" "jsonschema"))))))
44d10b1f 2293 (native-inputs
1adde06e
MB
2294 `(("python-setuptools_scm" ,python-setuptools-scm)
2295 ("python-twisted" ,python-twisted)))
2296 (propagated-inputs
2297 `(("python-attrs" ,python-attrs)
a356d1b6 2298 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
1adde06e
MB
2299 ("python-pyrsistent" ,python-pyrsistent)
2300 ("python-six" ,python-six)))
44d10b1f
RW
2301 (home-page "https://github.com/Julian/jsonschema")
2302 (synopsis "Implementation of JSON Schema for Python")
2303 (description
2304 "Jsonschema is an implementation of JSON Schema for Python.")
2305 (license license:expat)
2306 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2307
2308(define-public python2-jsonschema
2309 (let ((jsonschema (package-with-python2
2310 (strip-python2-variant python-jsonschema))))
2311 (package (inherit jsonschema)
44d10b1f 2312 (propagated-inputs
1adde06e
MB
2313 `(("python2-functools32" ,python2-functools32)
2314 ,@(package-propagated-inputs jsonschema))))))
44d10b1f
RW
2315
2316(define-public python-schema
2317 (package
2318 (name "python-schema")
2319 (version "0.6.6")
2320 (source
2321 (origin
2322 (method url-fetch)
2323 (uri (pypi-uri "schema" version))
2324 (sha256
2325 (base32
2326 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2327 (build-system python-build-system)
2328 (native-inputs
2329 `(("python-pytest" ,python-pytest)))
2330 (home-page "https://github.com/keleshev/schema")
2331 (synopsis "Simple data validation library")
2332 (description
2333 "@code{python-schema} is a library for validating Python data
2334structures, such as those obtained from config-files, forms, external
2335services or command-line parsing, converted from JSON/YAML (or
2336something else) to Python data-types.")
2337 (license license:psfl)))
2338
2339(define-public python2-schema
2340 (package-with-python2 python-schema))
2341
2342(define-public python-schema-0.5
2343 (package (inherit python-schema)
2344 (version "0.5.0")
2345 (source
2346 (origin
2347 (method url-fetch)
2348 (uri (pypi-uri "schema" version))
2349 (sha256
2350 (base32
2351 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2352
2353(define-public python2-schema-0.5
2354 (package-with-python2 python-schema-0.5))
2355
2356(define-public python-kitchen
2357 (package
2358 (name "python-kitchen")
2359 (version "1.2.5")
2360 (source
2361 (origin
2362 (method url-fetch)
2363 (uri (pypi-uri "kitchen" version))
2364 (sha256
2365 (base32
2366 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2367 (build-system python-build-system)
2368 (propagated-inputs
2369 `(("python-chardet" ,python-chardet)))
2370 (home-page "https://github.com/fedora-infra/kitchen")
2371 (synopsis "Python API for snippets")
2372 (description "@code{kitchen} module provides a python API for all sorts of
2373little useful snippets of code that everybody ends up writing for their projects
2374but never seem big enough to build an independent release. Use kitchen and stop
2375cutting and pasting that code over and over.")
2376 (license (list license:lgpl2.1+
2377 ;; subprocess.py, test_subprocess.py,
2378 ;; kitchen/pycompat25/defaultdict.py:
2379 license:psfl))))
2380
2381(define-public python2-kitchen
2382 (package-with-python2 python-kitchen))
2383
2384(define-public python-unidecode
2385 (package
2386 (name "python-unidecode")
eb80a300 2387 (version "1.1.1")
44d10b1f
RW
2388 (source (origin
2389 (method url-fetch)
2390 (uri (pypi-uri "Unidecode" version))
2391 (sha256
2392 (base32
eb80a300 2393 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
44d10b1f 2394 (build-system python-build-system)
e85af137 2395 (home-page "https://pypi.org/project/Unidecode/")
44d10b1f
RW
2396 (synopsis "ASCII transliterations of Unicode text")
2397 (description
2398 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2399useful when integrating with legacy code that doesn't support Unicode, or for
2400ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2401machine identifiers from human-readable Unicode strings that should still be
2402somewhat intelligible.")
2403 (license license:gpl2+)))
2404
2405(define-public python2-unidecode
2406 (package-with-python2 python-unidecode))
2407
9f933527
MB
2408(define-public python-text-unidecode
2409 (package
2410 (name "python-text-unidecode")
2411 (version "1.3")
2412 (source (origin
2413 (method url-fetch)
2414 (uri (pypi-uri "text-unidecode" version))
2415 (sha256
2416 (base32
2417 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2418 (build-system python-build-system)
2419 (arguments
2420 '(#:phases (modify-phases %standard-phases
2421 (replace 'check
2422 (lambda _
2423 (setenv "PYTHONPATH"
2424 (string-append "./build/lib:"
2425 (getenv "PYTHONPATH")))
2426 (invoke "pytest" "-vv"))))))
2427 (native-inputs
2428 `(("python-pytest" ,python-pytest)))
2429 (home-page "https://github.com/kmike/text-unidecode/")
2430 (synopsis "Decode Unicode data")
2431 (description
2432 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2433Perl library. It can create ASCII representations of Unicode data. In general
2434users should prefer the @code{python-unidecode} package which offers better
2435memory usage and transliteration quality.")
2436 ;; The user can choose either license.
2437 (license (list license:clarified-artistic license:gpl2+))))
2438
2439(define-public python2-text-unidecode
2440 (package-with-python2 python-text-unidecode))
2441
44d10b1f
RW
2442(define-public python-pyjwt
2443 (package
2444 (name "python-pyjwt")
be6f2f56 2445 (version "1.7.1")
44d10b1f
RW
2446 (source
2447 (origin
2448 (method url-fetch)
2449 (uri (pypi-uri "PyJWT" version))
2450 (sha256
2451 (base32
be6f2f56 2452 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
44d10b1f
RW
2453 (modules '((guix build utils)))
2454 (snippet
2455 '(begin
2456 (for-each delete-file-recursively
2457 (find-files "." "\\.pyc$"))
2458 #t))))
2459 (build-system python-build-system)
2460 (native-inputs
2461 `(("python-pytest" ,python-pytest)
2462 ("python-pytest-cov" ,python-pytest-cov)
2463 ("python-pytest-runner" ,python-pytest-runner)))
2464 (home-page "https://github.com/progrium/pyjwt")
2465 (synopsis "JSON Web Token implementation in Python")
2466 (description
2467 "PyJWT is a JSON Web Token implementation written in Python.")
2468 (license license:expat)))
2469
2470(define-public python2-pyjwt
2471 (package-with-python2 python-pyjwt))
2472
2473(define-public python-pykka
2474 (package
2475 (name "python-pykka")
2476 (version "1.2.1")
2477 (source
2478 (origin
2479 (method url-fetch)
2480 (uri (pypi-uri "Pykka" version))
2481 (sha256
2482 (base32
2483 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2484 (build-system python-build-system)
2485 (native-inputs
2486 `(("python-mock" ,python-mock)
2487 ("python-nose" ,python-nose)
2488 ("python-gevent" ,python-gevent)
2489 ("python-eventlet" ,python-eventlet)))
2490 (home-page "https://www.pykka.org/")
2491 (synopsis "Pykka is a Python implementation of the actor model")
2492 (description
2493 "Pykka is a Python implementation of the actor model.
2494The actor model introduces some simple rules to control the sharing
2495of state and cooperation between execution units, which makes it
2496easier to build concurrent applications.")
2497 (license license:asl2.0)))
2498
2499(define-public python2-pykka
2500 (package-with-python2 python-pykka))
2501
8d22f7e3
VC
2502(define-public python-pymsgbox
2503 (package
2504 (name "python-pymsgbox")
2505 (version "1.0.6")
2506 (source
2507 (origin
2508 (method git-fetch)
2509 (uri (git-reference
2510 ;; LICENSE.txt is not present on pypi
2511 (url "https://github.com/asweigart/PyMsgBox")
2512 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2513 (file-name (git-file-name name version))
2514 (sha256
2515 (base32
2516 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2517 (arguments
2518 ;; Circular dependency to run tests:
2519 ;; Tests need pyautogui, which depends on pymsgbox.
2520 '(#:tests? #f))
2521 (build-system python-build-system)
2522 (home-page "https://github.com/asweigart/PyMsgBox")
2523 (synopsis "Python module for JavaScript-like message boxes")
2524 (description
2525 "PyMsgBox is a simple, cross-platform, pure Python module for
2526JavaScript-like message boxes. Types of dialog boxes include:
2527@enumerate
2528@item alert
2529@item confirm
2530@item prompt
2531@item password
2532@end enumerate
2533")
2534 (license license:bsd-3)))
2535
44d10b1f
RW
2536(define-public python-pympler
2537 (package
2538 (name "python-pympler")
2539 (home-page "https://pythonhosted.org/Pympler/")
6469af6f 2540 (version "0.8")
44d10b1f
RW
2541 (source (origin
2542 (method url-fetch)
2543 (uri (pypi-uri "Pympler" version))
2544 (sha256
2545 (base32
6469af6f 2546 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
44d10b1f
RW
2547 (build-system python-build-system)
2548 (arguments
2549 `(#:phases (modify-phases %standard-phases
2550 (delete 'check)
2551 (add-after 'install 'check
2552 (lambda* (#:key inputs outputs #:allow-other-keys)
2553 (add-installed-pythonpath inputs outputs)
2554 (invoke "python" "setup.py" "test"))))))
2555 (synopsis "Measure, monitor and analyze memory behavior")
2556 (description
2557 "Pympler is a development tool to measure, monitor and analyze
2558the memory behavior of Python objects in a running Python application.
2559
2560By pympling a Python application, detailed insight in the size and the
2561lifetime of Python objects can be obtained. Undesirable or unexpected
2562runtime behavior like memory bloat and other @samp{pymples} can easily
2563be identified.
2564
2565A web profiling frontend exposes process statistics, garbage
2566visualisation and class tracker statistics.")
2567 (license license:asl2.0)))
2568
2569(define-public python2-pympler
2570 (package-with-python2 python-pympler))
2571
2572(define-public python-itsdangerous
2573 (package
2574 (name "python-itsdangerous")
acfcf2ed 2575 (version "1.1.0")
44d10b1f
RW
2576 (source
2577 (origin
2578 (method url-fetch)
acfcf2ed 2579 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2580 (sha256
2581 (base32
acfcf2ed 2582 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2583 (build-system python-build-system)
acfcf2ed 2584 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2585 (synopsis "Python library for passing data to/from untrusted environments")
2586 (description
2587 "Itsdangerous provides various helpers to pass trusted data to untrusted
2588environments and back.")
2589 (license license:bsd-3)))
2590
2591(define-public python2-itsdangerous
2592 (package-with-python2 python-itsdangerous))
2593
2594(define-public python-pyyaml
2595 (package
2596 (name "python-pyyaml")
357af7f2 2597 (version "5.3")
44d10b1f
RW
2598 (source
2599 (origin
2600 (method url-fetch)
2601 (uri (pypi-uri "PyYAML" version))
2602 (sha256
2603 (base32
357af7f2 2604 "058nd4p8f25wwzy2aiwh18wcrdm6663cqbfdkgjp8y9cp7ampx79"))))
44d10b1f
RW
2605 (build-system python-build-system)
2606 (inputs
2607 `(("libyaml" ,libyaml)))
7509f34f 2608 (home-page "https://pyyaml.org")
44d10b1f
RW
2609 (synopsis "YAML parser and emitter for Python")
2610 (description
2611 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2612complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2613API, and sensible error messages. PyYAML supports standard YAML tags and
2614provides Python-specific tags that allow to represent an arbitrary Python
2615object.")
2616 (license license:expat)))
2617
2618(define-public python2-pyyaml
2619 (package-with-python2 python-pyyaml))
2620
2621(define-public python-vine
2622 (package
2623 (name "python-vine")
2624 (version "1.1.4")
2625 (source
2626 (origin
2627 (method url-fetch)
2628 (uri (pypi-uri "vine" version))
2629 (sha256
2630 (base32
2631 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2632 (build-system python-build-system)
2633 (native-inputs
2634 `(("python-pytest" ,python-pytest)
2635 ("python-case" ,python-case)))
2636 (home-page "https://github.com/celery/vine")
2637 (synopsis "Promises for Python")
2638 (description
2639 "@code{vine} provides a special implementation of promises in that it can
2640be used both for \"promise of a value\" and lazy evaluation. The biggest
2641upside for this is that everything in a promise can also be a promise,
2642e.g. filters, callbacks and errbacks can all be promises.")
2643 (license license:bsd-3)))
2644
2645(define-public python-virtualenv
2646 (package
2647 (name "python-virtualenv")
60067279 2648 (version "20.0.10")
44d10b1f
RW
2649 (source
2650 (origin
2651 (method url-fetch)
2652 (uri (pypi-uri "virtualenv" version))
2653 (sha256
2654 (base32
60067279 2655 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
44d10b1f 2656 (build-system python-build-system)
44d10b1f
RW
2657 (native-inputs
2658 `(("python-mock" ,python-mock)
94d57ba3
JK
2659 ("python-pytest" ,python-pytest)
2660 ;; NOTE: guix lint remarks that "python-setuptools should probably not
2661 ;; be an input at all". However, removing the input makes the build error:
2662 ;; File "setup.py", line 4, in <module>
2663 ;; raise RuntimeError("setuptools >= 41 required to build")
2664 ("python-setuptools" ,python-setuptools)
2665 ("python-setuptools-scm" ,python-setuptools-scm)))
828996bb 2666 (propagated-inputs
94d57ba3
JK
2667 `(("python-appdirs" ,python-appdirs)
2668 ("python-distlib" ,python-distlib)
2669 ("python-filelock" ,python-filelock)
2670 ("python-six" ,python-six)
2671 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
2672 (home-page "https://virtualenv.pypa.io/")
2673 (synopsis "Virtual Python environment builder")
2674 (description
2675 "Virtualenv is a tool to create isolated Python environments.")
7815afc9 2676 (properties `((python2-variant . ,(delay python2-virtualenv))))
44d10b1f
RW
2677 (license license:expat)))
2678
2679(define-public python2-virtualenv
7815afc9
MB
2680 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
2681 (package
2682 (inherit base)
2683 (arguments
2684 `(#:python ,python-2
2685 #:phases
2686 (modify-phases %standard-phases
2687 (add-after 'set-paths 'adjust-PYTHONPATH
2688 (lambda* (#:key inputs #:allow-other-keys)
2689 (let* ((python (assoc-ref inputs "python"))
2690 (python-sitedir (string-append python "/lib/python2.7"
2691 "/site-packages")))
2692 ;; XXX: 'python2' always comes first on PYTHONPATH
2693 ;; and shadows the 'setuptools' input. Move python2
2694 ;; last: this should be fixed in python-build-system
2695 ;; in a future rebuild cycle.
2696 (setenv "PYTHONPATH"
2697 (string-append (string-join (delete python-sitedir
2698 (string-split
2699 (getenv "PYTHONPATH")
2700 #\:))
2701 ":")
2702 ":" python-sitedir))
2703 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
2704 (getenv "PYTHONPATH"))
2705 #t))))))
2706 (propagated-inputs
2707 `(("python-contextlib2" ,python2-contextlib2)
2708 ,@(package-propagated-inputs base))))))
44d10b1f
RW
2709
2710(define-public python-markupsafe
2711 (package
2712 (name "python-markupsafe")
753eb411 2713 (version "1.1.1")
44d10b1f
RW
2714 (source
2715 (origin
2716 (method url-fetch)
5182927c 2717 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2718 (sha256
2719 (base32
753eb411 2720 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2721 (build-system python-build-system)
753eb411
MB
2722 (arguments
2723 `(#:modules ((ice-9 ftw)
2724 (srfi srfi-1)
2725 (srfi srfi-26)
2726 (guix build utils)
2727 (guix build python-build-system))
2728 #:phases (modify-phases %standard-phases
2729 (replace 'check
2730 (lambda _
2731 (let ((cwd (getcwd))
2732 (libdir (find (cut string-prefix? "lib." <>)
2733 (scandir "build"))))
2734 (setenv "PYTHONPATH"
2735 (string-append cwd "/build/" libdir ":"
2736 (getenv "PYTHONPATH")))
2737 (invoke "pytest" "-vv")))))))
2738 (native-inputs
2739 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2740 (home-page "https://github.com/mitsuhiko/markupsafe")
2741 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2742 (description
2743 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2744for Python.")
2745 (license license:bsd-3)))
2746
2747(define-public python2-markupsafe
2748 (package-with-python2 python-markupsafe))
2749
2750(define-public python-jinja2
2751 (package
2752 (name "python-jinja2")
3c8ad087 2753 (version "2.11.1")
44d10b1f
RW
2754 (source
2755 (origin
2756 (method url-fetch)
2757 (uri (pypi-uri "Jinja2" version))
2758 (sha256
2759 (base32
3c8ad087 2760 "0l72c11n959yzb8d3ankckb6yhjhm6x729zm7rkpk040qzxpy64k"))))
44d10b1f 2761 (build-system python-build-system)
dce9b8b5
MB
2762 (arguments
2763 '(#:phases (modify-phases %standard-phases
2764 (replace 'check
2765 (lambda* (#:key tests? #:allow-other-keys)
2766 (if tests?
2767 (begin
2768 (setenv "PYTHONPATH"
2769 (string-append "./build/lib:"
2770 (getenv "PYTHONPATH")))
2771 (invoke "pytest" "-vv"))
2772 (format #t "test suite not run~%"))
2773 #t)))))
2774 (native-inputs
2775 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2776 (propagated-inputs
2777 `(("python-markupsafe" ,python-markupsafe)))
2778 (home-page "http://jinja.pocoo.org/")
2779 (synopsis "Python template engine")
2780 (description
2781 "Jinja2 is a small but fast and easy to use stand-alone template engine
2782written in pure Python.")
2783 (license license:bsd-3)))
2784
2785(define-public python2-jinja2
2786 (package-with-python2 python-jinja2))
2787
ba42a6bf
TLC
2788(define-public python-jinja2-time
2789 (package
2790 (name "python-jinja2-time")
2791 (version "0.2.0")
2792 (source
2793 (origin
2794 (method url-fetch)
2795 (uri (pypi-uri "jinja2-time" version))
2796 (sha256
2797 (base32
2798 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2799 (build-system python-build-system)
2800 (propagated-inputs
2801 `(("python-arrow" ,python-arrow)
2802 ("python-jinja2" ,python-jinja2)))
2803 (home-page
2804 "https://github.com/hackebrot/jinja2-time")
2805 (synopsis "Jinja2 Extension for Dates and Times")
2806 (description
2807 "This package provides an extension for the template engine Jinja2. It
2808adds a 'now' tag providing a convenient access to the arrow.now() API from
2809templates. A format string can be provided to control the output.")
2810 (license license:expat)))
2811
44d10b1f
RW
2812(define-public python-pystache
2813 (package
2814 (name "python-pystache")
2815 (version "0.5.4")
2816 (source (origin
2817 (method url-fetch)
2818 (uri (pypi-uri "pystache" version))
2819 (sha256
2820 (base32
2821 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2822 (build-system python-build-system)
2823 (arguments
2824 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2825 (home-page "http://defunkt.io/pystache/")
2826 (synopsis "Python logic-less template engine")
2827 (description
2828 "Pystache is a Python implementation of the framework agnostic,
2829logic-free templating system Mustache.")
2830 (license license:expat)
2831 (properties `((python2-variant . ,(delay python2-pystache))))))
2832
2833(define-public python2-pystache
2834 (package (inherit (package-with-python2
2835 (strip-python2-variant python-pystache)))
2836 (arguments
2837 `(#:python ,python-2
2838 #:phases
2839 (modify-phases %standard-phases
2840 (replace 'check
2841 (lambda _
dfafc29b 2842 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2843
2844(define-public python-joblib
2845 (package
2846 (name "python-joblib")
23bc9a35 2847 (version "0.14.1")
44d10b1f
RW
2848 (source (origin
2849 (method url-fetch)
2850 (uri (pypi-uri "joblib" version))
2851 (sha256
2852 (base32
23bc9a35 2853 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
44d10b1f
RW
2854 (build-system python-build-system)
2855 (arguments
2856 `(#:phases
2857 (modify-phases %standard-phases
2858 (replace 'check
2859 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2860 (native-inputs
2861 `(("python-pytest" ,python-pytest)))
2862 (home-page "https://joblib.readthedocs.io/")
2863 (synopsis "Using Python functions as pipeline jobs")
2864 (description
2865 "Joblib is a set of tools to provide lightweight pipelining in Python.
2866In particular, joblib offers: transparent disk-caching of the output values
2867and lazy re-evaluation (memoize pattern), easy simple parallel computing
2868logging and tracing of the execution.")
2869 (license license:bsd-3)))
2870
2871(define-public python2-joblib
2872 (package-with-python2 python-joblib))
2873
a3363341
VC
2874(define-public python-daemon
2875 (package
2876 (name "python-daemon")
2877 (version "2.2.3")
2878 (source
2879 (origin
2880 (method url-fetch)
2881 (uri (pypi-uri "python-daemon" version))
2882 (sha256
2883 (base32
2884 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2885 (build-system python-build-system)
2886 (arguments
2887 `(#:phases
2888 (modify-phases %standard-phases
2889 (add-before 'check 'disable-tests
2890 (lambda _
2891 ;; FIXME: Determine why test fails
2892 (substitute* "test/test_daemon.py"
2893 (("test_detaches_process_context")
2894 "skip_test_detaches_process_context"))
2895 #t)))))
2896 (propagated-inputs
2897 `(("python-lockfile" ,python-lockfile)))
2898 (native-inputs
2899 `(("python-unittest2" ,python-unittest2)
2900 ("python-testtools" ,python-testtools)
2901 ("python-testscenarios" ,python-testscenarios)
2902 ("python-mock" ,python-mock)
2903 ("python-docutils" ,python-docutils)))
2904 (home-page "https://pagure.io/python-daemon/")
2905 (synopsis "Python library for making a Unix daemon process")
2906 (description "Python-daemon is a library that assists a Python program to
2907turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2908
2909This library provides a @code{DaemonContext} class that manages the following
2910important tasks for becoming a daemon process:
2911@enumerate
2912@item Detach the process into its own process group.
2913@item Set process environment appropriate for running inside a chroot.
2914@item Renounce suid and sgid privileges.
2915@item Close all open file descriptors.
2916@item Change the working directory, uid, gid, and umask.
2917@item Set appropriate signal handlers.
2918@item Open new file descriptors for stdin, stdout, and stderr.
2919@item Manage a specified PID lock file.
2920@item Register cleanup functions for at-exit processing.
2921@end enumerate")
2922 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2923 (license (list license:asl2.0 license:gpl3+))))
2924
544ea9c2
MB
2925(define-public python-anytree
2926 (package
2927 (name "python-anytree")
2928 (version "2.8.0")
2929 (source (origin
2930 (method url-fetch)
2931 (uri (pypi-uri "anytree" version))
2932 (sha256
2933 (base32
2934 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2935 (build-system python-build-system)
2936 (propagated-inputs
2937 `(("python-six" ,python-six)))
2938 (native-inputs
2939 `(;; For tests.
2940 ("graphviz" ,graphviz) ;for 'dot'
2941 ("python-nose" ,python-nose)))
2942 (home-page "https://github.com/c0fec0de/anytree")
2943 (synopsis "Lightweight tree data library")
2944 (description
2945 "@code{anytree} is a simple, lightweight, and extensible tree data
2946structure for Python.")
2947 (license license:asl2.0)))
2948
44d10b1f
RW
2949(define-public python-docutils
2950 (package
2951 (name "python-docutils")
da8e8dc6 2952 (version "0.16")
44d10b1f
RW
2953 (source
2954 (origin
2955 (method url-fetch)
2956 (uri (pypi-uri "docutils" version))
2957 (sha256
2958 (base32
da8e8dc6 2959 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
44d10b1f
RW
2960 (build-system python-build-system)
2961 (arguments
8cf5c9fa
MB
2962 '(#:phases (modify-phases %standard-phases
2963 (replace 'check
2964 (lambda* (#:key tests? #:allow-other-keys)
2965 (if tests?
2966 (invoke "python" "test/alltests.py")
2967 (format #t "test suite not run~%"))
2968 #t)))))
44d10b1f
RW
2969 (home-page "http://docutils.sourceforge.net/")
2970 (synopsis "Python Documentation Utilities")
2971 (description
2972 "Docutils is a modular system for processing documentation into useful
2973formats, such as HTML, XML, and LaTeX. For input Docutils supports
2974reStructuredText.")
2975 ;; Most of the source code is public domain, but some source files are
2976 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2977 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2978
2979(define-public python2-docutils
2980 (package-with-python2 python-docutils))
2981
4510aeb9
MB
2982;; python2-sphinx fails its test suite with newer versions.
2983(define-public python2-docutils-0.14
2984 (package
2985 (inherit python2-docutils)
2986 (version "0.14")
2987 (source (origin
2988 (method url-fetch)
2989 (uri (pypi-uri "docutils" version))
2990 (sha256
2991 (base32
2992 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
2993
44d10b1f
RW
2994(define-public python-pygments
2995 (package
2996 (name "python-pygments")
69002b21 2997 (version "2.5.2")
44d10b1f
RW
2998 (source
2999 (origin
3000 (method url-fetch)
3001 (uri (pypi-uri "Pygments" version))
3002 (sha256
3003 (base32
69002b21 3004 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
44d10b1f
RW
3005 (build-system python-build-system)
3006 (arguments
3007 ;; FIXME: Tests require sphinx, which depends on this.
3008 '(#:tests? #f))
69002b21 3009 (home-page "https://pygments.org/")
44d10b1f
RW
3010 (synopsis "Syntax highlighting")
3011 (description
3012 "Pygments is a syntax highlighting package written in Python.")
3013 (license license:bsd-2)))
3014
3015(define-public python2-pygments
3016 (package-with-python2 python-pygments))
3017
0f0a5ef9
MC
3018(define-public python-bumpversion
3019 (package
3020 (name "python-bumpversion")
3021 (version "0.5.3")
3022 (source
3023 (origin
3024 (method url-fetch)
3025 (uri (pypi-uri "bumpversion" version))
3026 (sha256
3027 (base32
3028 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3029 (build-system python-build-system)
3030 (home-page "https://github.com/peritus/bumpversion")
3031 (synopsis "Tool to bump software version")
3032 (description "This tool provides a command-line interface (CLI) to bump a
3033software version simply.")
3034 (license license:expat)))
3035
b24fd2c2
MC
3036(define-public python-deprecated
3037 (package
3038 (name "python-deprecated")
3039 (version "1.2.5")
3040 (source
3041 (origin
3042 (method git-fetch)
3043 (uri (git-reference
3044 (url "https://github.com/tantale/deprecated.git")
3045 (commit (string-append "v" version))))
3046 (file-name (git-file-name name version))
3047 (sha256
3048 (base32
3049 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3050 (build-system python-build-system)
3051 (arguments
3052 `(#:phases (modify-phases %standard-phases
3053 (replace 'check
3054 (lambda _
3055 (invoke "pytest"))))))
3056 (propagated-inputs
3057 `(("python-wrapt" ,python-wrapt)))
3058 (native-inputs
3059 `(("python-bumpversion" ,python-bumpversion)
3060 ("python-pytest" ,python-pytest)
3061 ("python-pytest-cov" ,python-pytest-cov)
3062 ("python-sphinx" ,python-sphinx)
3063 ("python-tox" ,python-tox)))
3064 (home-page "https://github.com/tantale/deprecated")
3065 (synopsis "Python decorator to deprecate classes, functions or methods")
3066 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3067to deprecate classes, functions or methods.")
3068 (license license:expat)))
3069
d5a998fa
MC
3070(define-public python-pygithub
3071 (package
3072 (name "python-pygithub")
749e38d7 3073 (version "1.43.8")
d5a998fa
MC
3074 (source
3075 ;; We fetch from the Git repo because there are no tests in the PyPI
3076 ;; archive.
3077 (origin
3078 (method git-fetch)
3079 (uri (git-reference
3080 (url "https://github.com/PyGithub/PyGithub.git")
3081 (commit (string-append "v" version))))
3082 (file-name (git-file-name name version))
3083 (sha256
749e38d7 3084 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
3085 (build-system python-build-system)
3086 (arguments
3087 `(#:phases (modify-phases %standard-phases
3088 ;; Some tests rely on the network.
3089 (add-after 'unpack 'disable-failing-tests
3090 (lambda _
3091 (substitute* "tests/Issue142.py"
3092 (("testDecodeJson") "disabled_testDecodeJson"))
3093 #t))
3094 (add-before 'check 'prepare-for-tests
3095 (lambda _
3096 (for-each (lambda (f)
3097 (chmod f #o666))
3098 (find-files "./tests"))
3099 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3100 (setenv "PYTHONPATH"
3101 (string-append "./tests:" (getenv "PYTHONPATH")))
3102 #t)))))
3103 (propagated-inputs
3104 `(("python-deprecated" ,python-deprecated)
3105 ("python-pyjwt" ,python-pyjwt)
3106 ("python-requests" ,python-requests)))
3107 (native-inputs `(("python-httpretty" ,python-httpretty)))
3108 (home-page "https://pygithub.readthedocs.io/en/latest/")
3109 (synopsis "Python library for the GitHub API")
3110 (description "This library allows managing GitHub resources such as
3111repositories, user profiles, and organizations in your Python applications,
3112using version 3 of the GitHub application programming interface (API).")
3113 (license license:lgpl3+)))
3114
c0c0bb38
MC
3115(define-public python-rellu
3116 (package
3117 (name "python-rellu")
3118 (version "0.7")
3119 (source
3120 (origin
3121 (method url-fetch)
3122 (uri (pypi-uri "rellu" version))
3123 (sha256
3124 (base32
3125 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3126 (build-system python-build-system)
3127 (propagated-inputs
3128 `(("python-invoke" ,python-invoke)
3129 ("python-pygithub" ,python-pygithub)))
3130 (home-page "https://github.com/robotframework/rellu")
3131 (synopsis "Utilities to create PyPI releases")
3132 (description "This collection of utilities contains tooling and templates
3133to assist in creating releases on GitHub and publishing them on PyPI. It is
3134designed to be used by Robot Framework and tools and libraries in its
3135ecosystem, but can naturally be used also by other projects.")
3136 (license license:asl2.0)))
3137
b9790285
MC
3138(define-public python-robotframework
3139 (package
3140 (name "python-robotframework")
1710b8f8 3141 (version "3.1.2")
b9790285
MC
3142 ;; There are no tests in the PyPI archive.
3143 (source
3144 (origin
3145 (method git-fetch)
3146 (uri (git-reference
3147 (url "https://github.com/robotframework/robotframework.git")
3148 (commit (string-append "v" version))))
3149 (file-name (git-file-name name version))
3150 (sha256
1710b8f8 3151 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
3152 (patches (search-patches
3153 "python-robotframework-honor-source-date-epoch.patch"))))
3154 (build-system python-build-system)
3155 (arguments
3156 `(#:phases (modify-phases %standard-phases
3157 (add-before 'build 'build-and-install-doc
3158 (lambda* (#:key outputs #:allow-other-keys)
3159 (let* ((doc-output (assoc-ref outputs "doc"))
3160 (doc (string-append doc-output "/share/"
3161 ,name "-" ,version "/")))
3162 (invoke "invoke" "library-docs" "all")
3163 (mkdir-p doc)
3164 (copy-recursively "doc/libraries"
3165 (string-append doc "/libraries"))
3166 #t)))
3167 (replace 'check
3168 (lambda _
3169 (invoke "python" "utest/run.py"))))))
3170 (native-inputs
3171 `(("python-invoke" ,python-invoke)
3172 ("python-rellu" ,python-rellu)
3173 ("python:tk" ,python "tk"))) ;used when building the HTML doc
3174 (outputs '("out" "doc"))
3175 (home-page "https://robotframework.org")
3176 (synopsis "Generic automation framework")
3177 (description "Robot Framework is a generic automation framework for
3178acceptance testing, acceptance test driven development (ATDD), and robotic
3179process automation (RPA).")
3180 (license license:asl2.0)))
3181
5b84c120
MC
3182(define-public python-robotframework-lint
3183 ;; There is no properly tagged release; the commit below seems to correspond
3184 ;; to the 0.9 stable release available from PyPI. The tests are not
3185 ;; included in the PyPI archive, so we fetch the sources from the upstream
3186 ;; Git repo.
3187 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
3188 (revision "1"))
3189 (package
3190 (name "python-robotframework-lint")
3191 (version (git-version "0.9.0" revision commit))
3192 (source
3193 (origin
3194 (method git-fetch)
3195 (uri (git-reference
3196 (url "https://github.com/boakley/robotframework-lint.git")
3197 (commit commit)))
3198 (file-name (git-file-name name version))
3199 (sha256
3200 (base32
3201 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
3202 (build-system python-build-system)
3203 (arguments
3204 `(#:phases
3205 (modify-phases %standard-phases
3206 (replace 'check
3207 (lambda _
3208 (invoke "python" "-m" "robot" "-A"
3209 "tests/conf/default.args" "tests"))))))
3210 (propagated-inputs
3211 `(("python-robotframework" ,python-robotframework)))
3212 (home-page "https://github.com/boakley/robotframework-lint/")
3213 (synopsis "Static analysis tool (linter) for Robot Framework")
3214 (description "This package provides the @code{rflint} command-line
3215utility, a static analysis tool (linter) for Robot Framework source files.")
3216 (license license:asl2.0))))
3217
c0c64f17
MC
3218(define-public python-robotframework-sshlibrary
3219 (package
3220 (name "python-robotframework-sshlibrary")
3221 (version "3.3.0")
3222 ;; There are no tests in the PyPI archive.
3223 (source
3224 (origin
3225 (method git-fetch)
3226 (uri (git-reference
3227 (url "https://github.com/robotframework/SSHLibrary.git")
3228 (commit (string-append "v" version))))
3229 (file-name (git-file-name name version))
3230 (sha256
3231 (base32
3232 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3233 (build-system python-build-system)
3234 (arguments
3235 `(#:phases
3236 (modify-phases %standard-phases
3237 (add-before 'build 'build-and-install-doc
3238 (lambda* (#:key outputs #:allow-other-keys)
3239 (let* ((doc-output (assoc-ref outputs "doc"))
3240 (doc (string-append doc-output "/share/"
3241 ,name "-" ,version "/")))
3242 (invoke "chmod" "-R" "+w" "docs")
3243 (invoke "invoke" "kw-docs" "project-docs")
3244 (mkdir-p doc)
3245 (for-each delete-file (find-files "docs" "\\.rst"))
3246 (copy-recursively "docs" doc)
3247 #t)))
3248 (replace 'check
3249 (lambda _
3250 ;; Some tests require an SSH server; we remove them.
3251 (delete-file "utest/test_client_api.py")
3252 (delete-file "utest/test_scp.py")
3253 (invoke "python" "utest/run.py"))))))
3254 (propagated-inputs
3255 `(("python-robotframework" ,python-robotframework)
3256 ("python-paramiko" ,python-paramiko)
3257 ("python-scp" ,python-scp)))
3258 (native-inputs
3259 `(("openssh" ,openssh)
3260 ("which" ,which)
3261 ;; To generate the documentation
3262 ("python-docutils" ,python-docutils)
3263 ("python-invoke" ,python-invoke)
3264 ("python-pygments" ,python-pygments)
3265 ("python-rellu" ,python-rellu)))
3266 (outputs '("out" "doc"))
3267 (home-page "https://github.com/robotframework/SSHLibrary")
3268 (synopsis "Robot Framework library for SSH and SFTP")
3269 (description "SSHLibrary is a Robot Framework library providing support
3270for SSH and SFTP. It has the following main usages:
3271@itemize @bullet
3272@item Executing commands on the remote machine, either blocking or non-blocking.
3273@item Writing and reading in an interactive shell.
3274@item Transferring files and directories over SFTP.
3275@item Ensuring that files and directories exist on the remote machine.
3276@end itemize")
3277 (license license:asl2.0)))
3278
b1daba94
VC
3279(define-public python-rstr
3280 (package
3281 (name "python-rstr")
3282 (version "2.2.6")
3283 (source
3284 (origin
3285 (method url-fetch)
3286 (uri (pypi-uri "rstr" version))
3287 (sha256
3288 (base32
3289 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3290 (build-system python-build-system)
3291 (home-page
3292 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3293 (synopsis "Generate random strings in Python")
3294 (description "This package provides a python module for generating
3295random strings of various types. It could be useful for fuzz testing,
3296generating dummy data, or other applications. It has no dependencies
3297outside the standard library.")
3298 (license license:bsd-3)))
3299
13d825fc
MC
3300(define-public python-scp
3301 (package
3302 (name "python-scp")
3303 (version "0.13.2")
3304 (source
3305 (origin
3306 (method url-fetch)
3307 (uri (pypi-uri "scp" version))
3308 (sha256
3309 (base32
3310 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3311 (build-system python-build-system)
3312 (arguments
3313 '(#:tests? #f)) ;tests require an SSH server
3314 (propagated-inputs
3315 `(("python-paramiko" ,python-paramiko)))
3316 (home-page "https://github.com/jbardin/scp.py")
3317 (synopsis "SCP protocol module for Python and Paramiko")
3318 (description "The scp module extends the Paramiko library to send and
3319receive files via the SCP1 protocol, as implemented by the OpenSSH
3320@command{scp} program.")
3321 (license license:gpl2+)))
3322
44d10b1f
RW
3323(define-public python-rst.linker
3324 (package
3325 (name "python-rst.linker")
d37e8e53 3326 (version "1.11")
44d10b1f
RW
3327 (source
3328 (origin
3329 (method url-fetch)
3330 (uri (pypi-uri "rst.linker" version))
3331 (sha256
d37e8e53 3332 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
3333 (build-system python-build-system)
3334 (propagated-inputs
3335 `(("python-dateutil" ,python-dateutil)
3336 ("python-six" ,python-six)))
3337 (native-inputs
3338 `(("python-setuptools-scm" ,python-setuptools-scm)))
3339 ;; Test would require path.py, which would introduce a cyclic dependence.
3340 (arguments `(#:tests? #f))
3341 ;; Note: As of version 1.7 the documentation is not worth building.
3342 (home-page "https://github.com/jaraco/rst.linker")
3343 (synopsis "Sphinx plugin to add links and timestamps")
3344 (description "rst.linker allows to automatically replace text by a
3345reStructuredText external reference or timestamps. It's primary purpose is to
3346augment the changelog, but it can be used for other documents, too.")
3347 (license license:expat)))
3348
3349(define-public python2-rst.linker
3350 (package-with-python2 python-rst.linker))
3351
3352(define-public python-feedgenerator
3353 (package
3354 (name "python-feedgenerator")
3355 (version "1.9")
3356 (source
3357 (origin
3358 (method url-fetch)
3359 (uri (pypi-uri "feedgenerator" version))
3360 (sha256
3361 (base32
3362 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3363 (modules '((guix build utils)))
3364 (snippet
3365 '(begin
3366 ;; Remove pre-compiled .pyc files from source.
3367 (for-each delete-file-recursively
3368 (find-files "." "__pycache__" #:directories? #t))
3369 (for-each delete-file (find-files "." "\\.pyc$"))
3370 #t))))
3371 (build-system python-build-system)
3372 (propagated-inputs
3373 `(("python-pytz" ,python-pytz)
3374 ("python-six" ,python-six)))
3375 (home-page "https://github.com/getpelican/feedgenerator")
3376 (synopsis
3377 "Standalone version of Django's Atom/RSS feed generator")
3378 (description
3379 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3380which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3381 (license license:bsd-3)))
3382
3383(define-public python2-feedgenerator
3384 (package-with-python2 python-feedgenerator))
3385
3386(define-public python-toml
3387 (package
3388 (name "python-toml")
3389 (version "0.9.4")
3390 (source
3391 (origin
3392 (method url-fetch)
3393 (uri (pypi-uri "toml" version))
3394 (sha256
3395 (base32
3396 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3397 (build-system python-build-system)
3398 (arguments
3399 `(#:tests? #f)) ;no tests suite in release
3400 (home-page "https://github.com/uiri/toml")
3401 (synopsis "Library for TOML")
3402 (description
3403 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3404Language (TOML) configuration files.")
3405 (license license:expat)))
3406
346c8752
BG
3407(define-public python-jsonrpc-server
3408 (package
3409 (name "python-jsonrpc-server")
d6cf4c6e 3410 (version "0.3.2")
346c8752
BG
3411 (source
3412 (origin
3413 (method url-fetch)
3414 (uri (pypi-uri "python-jsonrpc-server" version))
3415 (sha256
3416 (base32
d6cf4c6e 3417 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
346c8752
BG
3418 (build-system python-build-system)
3419 (propagated-inputs
3420 `(("python-future" ,python-future)
3421 ("python-mock" ,python-mock)
d6cf4c6e
BG
3422 ("python-pytest" ,python-pytest)
3423 ("python-ujson" ,python-ujson)))
346c8752
BG
3424 (home-page
3425 "https://github.com/palantir/python-jsonrpc-server")
3426 (synopsis "JSON RPC 2.0 server library")
3427 (description
1df5407c 3428 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3429 (license license:expat)))
3430
56f4ad47
BG
3431(define-public python-pydocstyle
3432 (package
3433 (name "python-pydocstyle")
3434 (version "3.0.0")
3435 (source
3436 (origin
3437 (method url-fetch)
3438 (uri (pypi-uri "pydocstyle" version))
3439 (sha256
3440 (base32
3441 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3442 (build-system python-build-system)
3443 (propagated-inputs
3444 `(("python-six" ,python-six)
3445 ("python-snowballstemmer" ,python-snowballstemmer)))
3446 (home-page
3447 "https://github.com/PyCQA/pydocstyle/")
3448 (synopsis "Python docstring style checker")
3449 (description
3450 "This package provides a style checker for the Python Language
3451Server (PLS).")
3452 (license license:expat)))
3453
be4d840c 3454(define-public python-language-server
808dd2d0
BL
3455 (package
3456 (name "python-language-server")
a42f1420 3457 (version "0.31.7")
808dd2d0
BL
3458 (source
3459 (origin
3460 (method url-fetch)
3461 (uri (pypi-uri "python-language-server" version))
3462 (sha256
3463 (base32
a42f1420 3464 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
808dd2d0
BL
3465 (build-system python-build-system)
3466 (propagated-inputs
3467 `(("python-pluggy" ,python-pluggy)
3468 ("python-jsonrpc-server" ,python-jsonrpc-server)
dcff9bda
MB
3469 ;; Note: Remove the special versions of Jedi and Parso when updating
3470 ;; this package.
3471 ("python-jedi" ,python-jedi-0.15)
808dd2d0
BL
3472 ("python-yapf" ,python-yapf)
3473 ("python-pyflakes" ,python-pyflakes)
3474 ("python-pydocstyle" ,python-pydocstyle)
3475 ("python-pycodestyle" ,python-pycodestyle)
3476 ("python-mccabe" ,python-mccabe)
3477 ("python-rope" ,python-rope)
3478 ("python-autopep8" ,python-autopep8)
3479 ("python-flake8" ,python-flake8)
3480 ("python-pylint" ,python-pylint)))
3481 (home-page "https://github.com/palantir/python-language-server")
3482 (synopsis "Python implementation of the Language Server Protocol")
3483 (description
3484 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3485language specification for the Language Server Protocol (LSP). This tool is
3486used in text editing environments to provide a complete and integrated
3487feature-set for programming Python effectively.")
808dd2d0 3488 (license license:expat)))
be4d840c 3489
c777ecb3
RW
3490(define-public python-pathspec
3491 (package
3492 (name "python-pathspec")
3493 (version "0.7.0")
3494 (source
3495 (origin
3496 (method url-fetch)
3497 (uri (pypi-uri "pathspec" version))
3498 (sha256
3499 (base32
3500 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
3501 (build-system python-build-system)
3502 (home-page "https://github.com/cpburnz/python-path-specification")
3503 (synopsis "Utility library for gitignore style pattern matching of file paths")
3504 (description
3505 "This package provides a utility library for gitignore style pattern
3506matching of file paths.")
3507 (license license:mpl2.0)))
3508
44d10b1f
RW
3509(define-public python-black
3510 (package
3511 (name "python-black")
5f603fab 3512 (version "19.10b0")
44d10b1f
RW
3513 (source
3514 (origin
3515 (method url-fetch)
3516 (uri (pypi-uri "black" version))
3517 (sha256
3518 (base32
5f603fab 3519 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
44d10b1f
RW
3520 (build-system python-build-system)
3521 (arguments
3522 `(#:phases
3523 (modify-phases %standard-phases
3524 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3525 (lambda _
3526 (let ((python3 (which "python3")))
3527 (substitute* '("tests/data/fmtonoff.py"
3528 "tests/data/string_prefixes.py"
5f603fab
RW
3529 "tests/data/function.py"
3530 "tests/data/python37.py")
44d10b1f
RW
3531 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3532 (string-append "#!" python3 (if (string? minor-version)
3533 minor-version
5f603fab
RW
3534 "")))))
3535 #t))
3536 (add-after 'unpack 'disable-broken-tests
3537 (lambda _
3538 ;; These tests are supposed to be skipped when the blackd
3539 ;; dependencies are missing, but this doesn't quite work.
3540 (substitute* "tests/test_black.py"
3541 (("( *)class BlackDTestCase.*" match indent)
3542 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
3543 indent "class BlackDTestCase(unittest.TestCase):\n"))
3544 (("web.Application") "False")
3545 (("@unittest_run_loop") ""))
3546
3547 ;; Patching the above file breaks the self test
3548 (substitute* "tests/test_black.py"
3549 (("( *)def test_self" match indent)
3550 (string-append indent "@unittest.skip(\"guix\")\n" match)))
3551 #t)))))
44d10b1f
RW
3552 (propagated-inputs
3553 `(("python-click" ,python-click)
3554 ("python-attrs" ,python-attrs)
3555 ("python-appdirs" ,python-appdirs)
5f603fab
RW
3556 ("python-pathspec" ,python-pathspec)
3557 ("python-regex" ,python-regex)
3558 ("python-toml" ,python-toml)
3559 ("python-typed-ast" ,python-typed-ast)))
3560 (native-inputs
3561 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
3562 (home-page "https://github.com/ambv/black")
3563 (synopsis "The uncompromising code formatter")
3564 (description "Black is the uncompromising Python code formatter.")
3565 (license license:expat)))
3566
3567(define-public python-blinker
3568 (package
3569 (name "python-blinker")
3570 (version "1.4")
3571 (source
3572 (origin
3573 (method url-fetch)
3574 (uri (pypi-uri "blinker" version))
3575 (sha256
3576 (base32
3577 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3578 (build-system python-build-system)
d46646d9 3579 (home-page "https://pythonhosted.org/blinker/")
44d10b1f
RW
3580 (synopsis "Fast, simple object-to-object and broadcast signaling")
3581 (description
3582 "Blinker provides a fast dispatching system that allows any number of
3583interested parties to subscribe to events, or \"signals\".")
3584 (license license:expat)))
3585
3586(define-public python2-blinker
3587 (package-with-python2 python-blinker))
3588
3589(define-public pelican
3590 (package
3591 (name "pelican")
fa9e3b5e 3592 (version "4.2.0")
44d10b1f
RW
3593 (source
3594 (origin
3595 (method url-fetch)
3596 (uri (pypi-uri "pelican" version))
3597 (sha256
3598 (base32
fa9e3b5e 3599 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
44d10b1f
RW
3600 (build-system python-build-system)
3601 (propagated-inputs
fa9e3b5e
VC
3602 `(("python-blinker" ,python-blinker)
3603 ("python-dateutil" ,python-dateutil)
3604 ("python-docutils" ,python-docutils)
3605 ("python-feedgenerator" ,python-feedgenerator)
44d10b1f 3606 ("python-jinja2" ,python-jinja2)
fa9e3b5e 3607 ("python-markdown" ,python-markdown)
44d10b1f 3608 ("python-pygments" ,python-pygments)
44d10b1f 3609 ("python-pytz" ,python-pytz)
44d10b1f 3610 ("python-six" ,python-six)
fa9e3b5e 3611 ("python-unidecode" ,python-unidecode)))
44d10b1f
RW
3612 (home-page "https://getpelican.com/")
3613 (arguments
3614 `(;; XXX Requires a lot more packages to do unit tests :P
fa9e3b5e 3615 #:tests? #f))
44d10b1f
RW
3616 (synopsis "Python-based static site publishing system")
3617 (description
3618 "Pelican is a tool to generate a static blog from reStructuredText,
3619Markdown input files, and more. Pelican uses Jinja2 for templating
3620and is very extensible.")
3621 (license license:agpl3+)))
3622
8c141421
JH
3623(define-public mallard-ducktype
3624 (package
3625 (name "mallard-ducktype")
12cc3da5 3626 (version "1.0.2")
8c141421
JH
3627 (source
3628 (origin
3629 (method git-fetch)
12cc3da5
JH
3630 ;; git-reference because tests are not included in pypi source tarball
3631 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3632 (uri (git-reference
3633 (url "https://github.com/projectmallard/mallard-ducktype.git")
3634 (commit version)))
3635 (file-name (git-file-name name version))
3636 (sha256
3637 (base32
12cc3da5 3638 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3639 (build-system python-build-system)
5246655f
EF
3640 (arguments
3641 '(#:phases
3642 (modify-phases %standard-phases
3643 (replace 'check
3644 (lambda _
3645 (with-directory-excursion "tests"
3646 (invoke "sh" "runtests")))))))
8c141421
JH
3647 (home-page "http://projectmallard.org")
3648 (synopsis "Convert Ducktype to Mallard documentation markup")
3649 (description
3650 "Ducktype is a lightweight syntax that can represent all the semantics
3651of the Mallard XML documentation system. Ducktype files can be converted to
3652Mallard using the @command{ducktype} tool. The yelp-tools package
3653provides additional functionality on the produced Mallard documents.")
3654 (license license:expat)))
3655
44d10b1f
RW
3656(define-public python-cython
3657 (package
3658 (name "python-cython")
3220e44f 3659 (version "0.29.15")
44d10b1f
RW
3660 (source
3661 (origin
3662 (method url-fetch)
3663 (uri (pypi-uri "Cython" version))
3664 (sha256
6fd27a71 3665 (base32
3220e44f 3666 "0c5cjyxfvba6c0vih1fvhywp8bpz30vwvbjqdm1q1k55xzhmkn30"))))
44d10b1f
RW
3667 (build-system python-build-system)
3668 ;; we need the full python package and not just the python-wrapper
3669 ;; because we need libpython3.3m.so
3670 (inputs
3671 `(("python" ,python)))
3672 (arguments
3673 `(#:phases
3674 (modify-phases %standard-phases
3675 (add-before 'check 'set-HOME
3676 ;; some tests require access to "$HOME/.cython"
3677 (lambda _ (setenv "HOME" "/tmp") #t))
44d10b1f
RW
3678 (replace 'check
3679 (lambda _
e9194eb0
MB
3680 ;; Disable compiler optimizations to greatly reduce the running
3681 ;; time of the test suite.
3682 (setenv "CFLAGS" "-O0")
3683
3684 (invoke "python" "runtests.py" "-vv"
3685 "-j" (number->string (parallel-job-count))))))))
f319409b 3686 (home-page "https://cython.org/")
44d10b1f
RW
3687 (synopsis "C extensions for Python")
3688 (description "Cython is an optimising static compiler for both the Python
3689programming language and the extended Cython programming language. It makes
3690writing C extensions for Python as easy as Python itself.")
3691 (license license:asl2.0)
3692 (properties `((python2-variant . ,(delay python2-cython))))))
3693
3694(define-public python2-cython
da460865
MB
3695 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3696 (package
3697 (inherit base)
3698 (name "python2-cython")
3699 (inputs
3700 `(("python-2" ,python-2))) ;this is not automatically changed
3701 (arguments
3702 (substitute-keyword-arguments (package-arguments base)
3703 ((#:phases phases)
3704 `(modify-phases ,phases
baab9eef
MB
3705 ;; XXX: On i686-linux, running the parallel tests fails on many-core
3706 ;; systems, see <https://github.com/cython/cython/issues/2807>.
3707 ;; TODO: Move this logic to the regular check phase in a future
3708 ;; rebuild cycle.
3709 ,@(if (string-prefix? "i686" (%current-system))
3710 '((replace 'check
3711 (lambda _
3712 (setenv "CFLAGS" "-O0")
3713 (invoke "python" "runtests.py" "-vv"
3714 "-j" (number->string (parallel-job-count))
3715 "-x" "run.parallel"))))
3716 '())
da460865
MB
3717 (add-before 'check 'adjust-test_embed
3718 (lambda _
3719 (substitute* "runtests.py"
3720 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3721 ;; so it can give the right -L flag to GCC when embedding static
3722 ;; builds of Python. It is unaware that the Python "config"
3723 ;; directory (where the static library lives) was renamed in
3724 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3725 ;; which works fine, because that is where the shared library is.
3726 ;;
3727 ;; It also appears to be unaware that the Makefile in Demos/embed
3728 ;; already unconditionally pass the static library location to GCC,
3729 ;; after checking sysconfig.get_config_var('LIBPL).
3730 ;;
3731 ;; The effect is that the linker is unable to resolve libexpat
3732 ;; symbols when building for Python 2, because neither the Python 2
3733 ;; shared library nor Expat is available. To fix it, we can either
3734 ;; add Expat as an input and make it visible to the linker, or just
3735 ;; prevent it from overriding the Python shared library location.
3736 ;; The end result is identical, so we take the easy route.
3737 ((" or libname not in os\\.listdir\\(libdir\\)")
3738 ""))
3739 #t)))))))))
44d10b1f
RW
3740
3741;; The RPython toolchain currently does not support Python 3.
3742(define-public python2-rpython
3743 (package
3744 (name "python2-rpython")
3745 (version "0.2.1")
3746 (source
3747 (origin
3748 (method url-fetch)
3749 (uri (pypi-uri "rpython" version))
3750 (sha256
3751 (base32
3752 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3753 (build-system python-build-system)
3754 (arguments `(#:python ,python-2))
3755 (native-inputs
3756 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3757 (home-page "https://rpython.readthedocs.org")
3758 (synopsis "Framework for implementing interpreters and virtual machines")
3759 (description "RPython is a translation and support framework for
3760producing implementations of dynamic languages, emphasizing a clean separation
3761between language specification and implementation aspects.")
3762 (license license:expat)))
3763
3764;; NOTE: when upgrading numpy please make sure that python-pandas and
3765;; python-scipy still build, as these three packages are often used together.
3766(define-public python-numpy
3767 (package
3768 (name "python-numpy")
8e5fbd5d 3769 (version "1.17.3")
44d10b1f
RW
3770 (source
3771 (origin
3772 (method url-fetch)
3773 (uri (string-append
3774 "https://github.com/numpy/numpy/releases/download/v"
3775 version "/numpy-" version ".tar.gz"))
3776 (sha256
3777 (base32
8e5fbd5d 3778 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3779 (build-system python-build-system)
3780 (inputs
3781 `(("openblas" ,openblas)
3782 ("lapack" ,lapack)))
3783 (native-inputs
3784 `(("python-cython" ,python-cython)
3785 ("python-pytest" ,python-pytest)
3786 ("gfortran" ,gfortran)))
3787 (arguments
3788 `(#:phases
3789 (modify-phases %standard-phases
3790 (add-before 'build 'configure-blas-lapack
3791 (lambda* (#:key inputs #:allow-other-keys)
3792 (call-with-output-file "site.cfg"
3793 (lambda (port)
3794 (format port
3795 "[openblas]
3796libraries = openblas
3797library_dirs = ~a/lib
3798include_dirs = ~a/include
3799
3800# backslash-n to make emacs happy
3801\n[lapack]
3802lapack_libs = lapack
3803library_dirs = ~a/lib
3804include_dirs = ~a/include
3805"
3806 (assoc-ref inputs "openblas")
3807 (assoc-ref inputs "openblas")
3808 (assoc-ref inputs "lapack")
3809 (assoc-ref inputs "lapack"))))
3810 #t))
3811 (add-before 'build 'fix-executable-paths
3812 (lambda* (#:key inputs #:allow-other-keys)
3813 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3814 ;; instead of /bin/sh.
3815 (substitute* "numpy/distutils/exec_command.py"
3816 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3817 (string-append match-start (assoc-ref inputs "bash") match-end)))
3818 ;; Use "gcc" executable, not "cc".
3819 (substitute* "numpy/distutils/system_info.py"
3820 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3821 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3822 #t))
3823 ;; Tests can only be run after the library has been installed and not
3824 ;; within the source directory.
3825 (delete 'check)
3826 (add-after 'install 'check
3827 (lambda* (#:key outputs inputs #:allow-other-keys)
3828 ;; Make installed package available for running the tests
3829 (add-installed-pythonpath inputs outputs)
3830 ;; Make sure "f2py" etc is found.
3831 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3832 ":" (getenv "PATH")))
3833 (with-directory-excursion "/tmp"
3834 (invoke "python" "-c"
3835 "import numpy; numpy.test(verbose=2)")))))))
28191bdc 3836 (home-page "https://numpy.org")
44d10b1f
RW
3837 (synopsis "Fundamental package for scientific computing with Python")
3838 (description "NumPy is the fundamental package for scientific computing
3839with Python. It contains among other things: a powerful N-dimensional array
3840object, sophisticated (broadcasting) functions, tools for integrating C/C++
3841and Fortran code, useful linear algebra, Fourier transform, and random number
3842capabilities.")
adb396ea 3843 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3844 (license license:bsd-3)))
3845
adb396ea 3846;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3847(define-public python2-numpy
adb396ea
MB
3848 (let ((numpy (package-with-python2
3849 (strip-python2-variant python-numpy))))
3850 (package/inherit
3851 numpy
3852 (version "1.16.5")
3853 (source (origin
3854 (method url-fetch)
3855 (uri (string-append
3856 "https://github.com/numpy/numpy/releases/download/v"
3857 version "/numpy-" version ".tar.gz"))
3858 (sha256
3859 (base32
3860 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3861
3862;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3863;; interest only for legacy code going back to NumPy's predecessor
3864;; Numeric.
3865(define-public python2-numpy-1.8
3866 (package (inherit python2-numpy)
3867 (version "1.8.2")
3868 (source
3869 (origin
6b61fc47
EF
3870 (method git-fetch)
3871 (uri (git-reference
3872 (url "https://github.com/numpy/numpy")
3873 (commit (string-append "v" version))))
3874 (file-name (git-file-name "numpy" version))
44d10b1f
RW
3875 (sha256
3876 (base32
6b61fc47 3877 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
44d10b1f
RW
3878 (arguments
3879 (substitute-keyword-arguments (package-arguments python2-numpy)
3880 ((#:phases phases)
3881 `(modify-phases ,phases
3882 (replace 'configure-blas-lapack
3883 (lambda* (#:key inputs #:allow-other-keys)
3884 (call-with-output-file "site.cfg"
3885 (lambda (port)
3886 (format port
3887 "[openblas]
3888libraries = openblas,lapack
3889library_dirs = ~a/lib:~a/lib
3890include_dirs = ~a/include:~a/include
3891"
3892 (assoc-ref inputs "openblas")
3893 (assoc-ref inputs "lapack")
3894 (assoc-ref inputs "openblas")
3895 (assoc-ref inputs "lapack"))))
3896 #t))))))
3897 (native-inputs
3898 `(("python2-nose" ,python2-nose)))
3899 (description "NumPy is the fundamental package for scientific computing
3900with Python. It contains among other things: a powerful N-dimensional array
3901object, sophisticated (broadcasting) functions, tools for integrating C/C++
3902and Fortran code, useful linear algebra, Fourier transform, and random number
3903capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3904that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3905Numeric.")
3906 (license license:bsd-3)))
3907
3908(define-public python-munch
3909 (package
3910 (name "python-munch")
3911 (version "2.0.4")
3912 (source
3913 (origin
3914 (method url-fetch)
3915 (uri (pypi-uri "munch" version))
3916 (sha256
3917 (base32
3918 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3919 (build-system python-build-system)
3920 (home-page "https://github.com/Infinidat/munch")
3921 (synopsis "Dot-accessible dictionary")
3922 (description "Munch is a dot-accessible dictionary similar to JavaScript
3923objects.")
3924 (license license:expat)))
3925
3926(define-public python2-munch
3927 (package-with-python2 python-munch))
3928
3929(define-public python-colormath
3930 (package
3931 (name "python-colormath")
3932 (version "3.0.0")
3933 (source
3934 (origin
3935 (method url-fetch)
3936 (uri (pypi-uri "colormath" version))
3937 (sha256
3938 (base32
3939 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3940 (build-system python-build-system)
3941 (propagated-inputs
3942 `(("python-networkx" ,python-networkx)
3943 ("python-numpy" ,python-numpy)))
3944 (home-page "https://github.com/gtaylor/python-colormath")
3945 (synopsis "Color math and conversion library")
3946 (description
3947 "This is a Python library for color math and conversions.")
3948 (license license:bsd-3)))
3949
3950(define-public python2-colormath
3951 (package-with-python2 python-colormath))
3952
3953(define-public python-spectra
3954 (package
3955 (name "python-spectra")
3956 (version "0.0.11")
3957 (source
3958 (origin
3959 (method url-fetch)
3960 (uri (pypi-uri "spectra" version))
3961 (sha256
3962 (base32
3963 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3964 (build-system python-build-system)
3965 (arguments
3966 `(#:phases
3967 (modify-phases %standard-phases
3968 (replace 'check
38ec0f6a 3969 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3970 (propagated-inputs
3971 `(("python-colormath" ,python-colormath)))
3972 (native-inputs
3973 `(("python-nose" ,python-nose)))
3974 (home-page "https://github.com/jsvine/spectra")
3975 (synopsis "Color scales and color conversion")
3976 (description
3977 "This package provides a Python library intended to make color math,
3978color scales, and color space conversion easy. It has support for:
3979
3980@enumerate
3981@item Color scales
3982@item Color ranges
3983@item Color blending
3984@item Brightening/darkening colors
3985@item Saturating/desaturating colors
3986@item Conversion to/from multiple color spaces.
3987@end enumerate\n")
3988 (license license:expat)))
3989
3990(define-public python2-spectra
3991 (package-with-python2 python-spectra))
3992
3993(define-public python-numpy-documentation
3994 (package
3995 (name "python-numpy-documentation")
3996 (version (package-version python-numpy))
3997 (source (package-source python-numpy))
3998 (build-system python-build-system)
3999 (native-inputs
4000 `(("python-matplotlib" ,python-matplotlib)
4001 ("python-numpy" ,python-numpy)
4002 ("pkg-config" ,pkg-config)
4003 ("python-sphinx" ,python-sphinx)
4004 ("python-numpydoc" ,python-numpydoc)
f75aa97f 4005 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
4006 texlive-fonts-ec
4007 texlive-generic-ifxetex
4008 texlive-generic-pdftex
f75aa97f 4009 texlive-amsfonts
44d10b1f
RW
4010 texlive-latex-capt-of
4011 texlive-latex-cmap
4012 texlive-latex-environ
4013 texlive-latex-eqparbox
4014 texlive-latex-etoolbox
4015 texlive-latex-expdlist
4016 texlive-latex-fancyhdr
4017 texlive-latex-fancyvrb
4018 texlive-latex-fncychap
4019 texlive-latex-float
4020 texlive-latex-framed
4021 texlive-latex-geometry
4022 texlive-latex-graphics
4023 texlive-latex-hyperref
4024 texlive-latex-mdwtools
4025 texlive-latex-multirow
4026 texlive-latex-needspace
4027 texlive-latex-oberdiek
4028 texlive-latex-parskip
4029 texlive-latex-preview
4030 texlive-latex-tabulary
4031 texlive-latex-threeparttable
4032 texlive-latex-titlesec
4033 texlive-latex-trimspaces
4034 texlive-latex-ucs
4035 texlive-latex-upquote
4036 texlive-latex-url
4037 texlive-latex-varwidth
4038 texlive-latex-wrapfig)))
4039 ("texinfo" ,texinfo)
4040 ("perl" ,perl)
4041 ("scipy-sphinx-theme"
4042 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4043 (method git-fetch)
4044 (uri (git-reference
4045 (url "https://github.com/scipy/scipy-sphinx-theme.git")
4046 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4047 (sha256
4048 (base32
4049 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4050 ,@(package-native-inputs python-numpy)))
4051 (arguments
4052 `(#:tests? #f ; we're only generating the documentation
4053 #:phases
4054 (modify-phases %standard-phases
4055 (delete 'build)
4056 (replace 'install
4057 (lambda* (#:key inputs outputs #:allow-other-keys)
4058 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4059 (doc (string-append
4060 data "/doc/" ,name "-"
4061 ,(package-version python-numpy)))
4062 (info-reader (string-append data "/info"))
4063 (html (string-append doc "/html"))
4064 (scipy-sphinx-theme "scipy-sphinx-theme")
4065 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4066 (pyver ,(string-append "PYVER=")))
4067
4068 ;; FIXME: this is needed to for texlive-union to generate
4069 ;; fonts, which are not found.
4070 (setenv "HOME" "/tmp")
4071
4072 (with-directory-excursion "doc"
4073 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4074 (mkdir-p html)
4fc898da
RW
4075 (invoke "make" "html" pyver)
4076 (invoke "make" "latex" "PAPER=a4" pyver)
4077 (invoke "make" "-C" "build/latex"
44d10b1f
RW
4078 "all-pdf" "PAPER=a4" pyver)
4079 ;; FIXME: Generation of the info file fails.
4fc898da 4080 ;; (invoke "make" "info" pyver)
44d10b1f
RW
4081 ;; (mkdir-p info)
4082 ;; (copy-file "build/texinfo/numpy.info"
4083 ;; (string-append info "/numpy.info"))
4084 (for-each (lambda (file)
4085 (copy-file (string-append "build/latex" file)
4086 (string-append doc file)))
4087 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4088 (with-directory-excursion "build/html"
4089 (for-each (lambda (file)
4090 (let* ((dir (dirname file))
4091 (tgt-dir (string-append html "/" dir)))
4092 (unless (equal? "." dir)
4093 (mkdir-p tgt-dir))
4094 (install-file file html)))
4095 (find-files "." ".*")))))
4096 #t)))))
4097 (home-page (package-home-page python-numpy))
4098 (synopsis "Documentation for the python-numpy package")
4099 (description (package-description python-numpy))
4100 (license (package-license python-numpy))))
4101
4102(define-public python2-numpy-documentation
4103 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4104 (package
4105 (inherit numpy-documentation)
4106 (native-inputs `(("python2-functools32" ,python2-functools32)
4107 ,@(package-native-inputs numpy-documentation))))))
4108
4109(define-public python-pygit2
4110 (package
4111 (name "python-pygit2")
7154f5ef 4112 (version "1.1.0")
44d10b1f
RW
4113 (source
4114 (origin
4115 (method url-fetch)
4116 (uri (pypi-uri "pygit2" version))
4117 (sha256
7154f5ef 4118 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
44d10b1f
RW
4119 (build-system python-build-system)
4120 (arguments
c3ecab0d 4121 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f 4122 (propagated-inputs
7154f5ef 4123 `(("python-cached-property" ,python-cached-property)
44d10b1f 4124 ("python-cffi" ,python-cffi)
7154f5ef 4125 ("libgit2" ,libgit2)))
44d10b1f
RW
4126 (native-inputs
4127 `(("python-pytest" ,python-pytest)))
4128 (home-page "https://github.com/libgit2/pygit2")
4129 (synopsis "Python bindings for libgit2")
4130 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4131library, libgit2 implements Git plumbing.")
4132 ;; GPL2.0 only, with linking exception.
4133 (license license:gpl2)))
4134
44d10b1f
RW
4135(define-public python-pyparsing
4136 (package
4137 (name "python-pyparsing")
6d3cff5a 4138 (version "2.3.1")
44d10b1f
RW
4139 (source
4140 (origin
4141 (method url-fetch)
4142 (uri (pypi-uri "pyparsing" version))
4143 (sha256
6d3cff5a 4144 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
4145 (build-system python-build-system)
4146 (outputs '("out" "doc"))
4147 (arguments
4148 `(#:tests? #f ; no test target
4149 #:phases
4150 (modify-phases %standard-phases
4151 (add-after 'install 'install-doc
4152 (lambda* (#:key outputs #:allow-other-keys)
4153 (let* ((doc (string-append (assoc-ref outputs "doc")
4154 "/share/doc/" ,name "-" ,version))
4155 (html-doc (string-append doc "/html"))
4156 (examples (string-append doc "/examples")))
4157 (mkdir-p html-doc)
4158 (mkdir-p examples)
4159 (for-each
4160 (lambda (dir tgt)
4161 (map (lambda (file)
4162 (install-file file tgt))
4163 (find-files dir ".*")))
4164 (list "docs" "htmldoc" "examples")
4165 (list doc html-doc examples))
4166 #t))))))
4167 (home-page "https://github.com/pyparsing/pyparsing")
4168 (synopsis "Python parsing class library")
4169 (description
4170 "The pyparsing module is an alternative approach to creating and
4171executing simple grammars, vs. the traditional lex/yacc approach, or the use
4172of regular expressions. The pyparsing module provides a library of classes
4173that client code uses to construct the grammar directly in Python code.")
4174 (license license:expat)))
4175
4176(define-public python2-pyparsing
4177 (package-with-python2 python-pyparsing))
4178
4179(define-public python-numpydoc
4180 (package
4181 (name "python-numpydoc")
4182 (version "0.8.0")
4183 (source
4184 (origin
4185 (method url-fetch)
4186 (uri (pypi-uri "numpydoc" version))
4187 (sha256
4188 (base32
4189 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4190 (build-system python-build-system)
4191 (propagated-inputs
4192 `(("python-sphinx" ,python-sphinx)))
4193 (native-inputs
4194 `(("python-nose" ,python-nose)))
e85af137 4195 (home-page "https://pypi.org/project/numpydoc/")
44d10b1f
RW
4196 (synopsis
4197 "Numpy's Sphinx extensions")
4198 (description
4199 "Sphinx extension to support docstrings in Numpy format.")
4200 (license license:bsd-2)))
4201
4202(define-public python2-numpydoc
4203 (package-with-python2 python-numpydoc))
4204
4205(define-public python-numexpr
4206 (package
4207 (name "python-numexpr")
4208 (version "2.6.5")
4209 (source
4210 (origin
4211 (method url-fetch)
4212 (uri (pypi-uri "numexpr" version))
4213 (sha256
4214 (base32
4215 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4216 (build-system python-build-system)
4217 (arguments `(#:tests? #f)) ; no tests included
4218 (propagated-inputs
4219 `(("python-numpy" ,python-numpy)))
4220 (home-page "https://github.com/pydata/numexpr")
4221 (synopsis "Fast numerical expression evaluator for NumPy")
4222 (description
4223 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4224expressions that operate on arrays are accelerated and use less memory than
4225doing the same calculation in Python. In addition, its multi-threaded
4226capabilities can make use of all your cores, which may accelerate
4227computations, most specially if they are not memory-bounded (e.g. those using
4228transcendental functions).")
4229 (license license:expat)))
4230
4231(define-public python2-numexpr
4232 (package-with-python2 python-numexpr))
4233
4234(define-public python-cycler
4235 (package
4236 (name "python-cycler")
4237 (version "0.10.0")
4238 (source (origin
4239 (method url-fetch)
4240 (uri (pypi-uri "cycler" version))
4241 (sha256
4242 (base32
4243 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4244 (build-system python-build-system)
4245 (arguments
4246 ;; XXX: The current version requires 'coveralls' which we don't have.
4247 ;; Enable this for the next release which uses 'python-pytest'.
4248 '(#:tests? #f))
4249 (propagated-inputs
4250 `(("python-six" ,python-six)))
4251 (home-page "http://matplotlib.org/cycler/")
4252 (synopsis "Composable keyword argument iterator")
4253 (description
4254 "When using @code{matplotlib} and plotting more than one line, it is
4255common to want to be able to want to be able to cycle over one or more artist
4256styles; but the plotting logic can quickly become involved.
4257To address this and enable easy cycling over arbitrary @code{kwargs}, the
4258@code{Cycler} class was developed.")
4259 (license license:bsd-3)))
4260
4261(define-public python2-cycler
4262 (package-with-python2 python-cycler))
4263
4264(define-public python-colorspacious
4265 (package
4266 (name "python-colorspacious")
53a3ebed 4267 (version "1.1.2")
44d10b1f 4268 (source
dee92e65
TGR
4269 (origin
4270 (method git-fetch)
4271 (uri (git-reference
4272 (url "https://github.com/njsmith/colorspacious.git")
4273 (commit (string-append "v" version))))
4274 (file-name (git-file-name name version))
4275 (sha256
53a3ebed 4276 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
4277 (build-system python-build-system)
4278 (propagated-inputs
4279 `(("python-numpy" ,python-numpy)))
4280 (native-inputs
4281 `(("python-nose" ,python-nose)))
4282 (arguments
4283 `(#:phases
4284 (modify-phases %standard-phases
4285 (replace 'check
4286 (lambda _
c988afda 4287 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
4288 (home-page "https://github.com/njsmith/colorspacious")
4289 (synopsis "Python library for colorspace conversions")
4290 (description "@code{colorspacious} is a Python library that lets you
4291convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4292 (license license:expat)))
4293
4294(define-public python2-colorspacious
4295 (package-with-python2 python-colorspacious))
4296
4297(define-public python-matplotlib
4298 (package
4299 (name "python-matplotlib")
9e7cb2f1 4300 (version "3.1.2")
44d10b1f
RW
4301 (source
4302 (origin
4303 (method url-fetch)
4304 (uri (pypi-uri "matplotlib" version))
4305 (sha256
4306 (base32
9e7cb2f1 4307 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
4308 (build-system python-build-system)
4309 (propagated-inputs ; the following packages are all needed at run time
4310 `(("python-cycler" ,python-cycler)
4311 ("python-kiwisolver" ,python-kiwisolver)
4312 ("python-pyparsing" ,python-pyparsing)
4313 ("python-pygobject" ,python-pygobject)
4314 ("gobject-introspection" ,gobject-introspection)
4315 ("python-tkinter" ,python "tk")
4316 ("python-dateutil" ,python-dateutil)
4317 ("python-numpy" ,python-numpy)
4318 ("python-pillow" ,python-pillow)
4319 ("python-pytz" ,python-pytz)
4320 ("python-six" ,python-six)
44d10b1f
RW
4321 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4322 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4323 ;; object. For this reason we need to import both libraries.
5ea654cf 4324 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 4325 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
4326 ("python-cairocffi" ,python-cairocffi)))
4327 (inputs
4328 `(("libpng" ,libpng)
4329 ("imagemagick" ,imagemagick)
4330 ("freetype" ,freetype)
4331 ("cairo" ,cairo)
4332 ("glib" ,glib)
4333 ;; FIXME: Add backends when available.
4334 ;("python-wxpython" ,python-wxpython)
4335 ("tcl" ,tcl)
4336 ("tk" ,tk)))
4337 (native-inputs
4338 `(("pkg-config" ,pkg-config)
5ea654cf
RW
4339 ("python-pytest" ,python-pytest)
4340 ("python-mock" ,python-mock)
4341 ("unzip" ,unzip)
4342 ("jquery-ui"
4343 ,(origin
4344 (method url-fetch)
4345 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4346 (sha256
4347 (base32
4348 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
4349 (arguments
4350 `(#:phases
4351 (modify-phases %standard-phases
5ea654cf
RW
4352 ;; XXX We disable all image comparison tests because we're using a
4353 ;; newer version of FreeType than matplotlib expects. This leads to
4354 ;; minor differences throughout the tests.
4355 (add-after 'unpack 'fix-and-disable-failing-tests
4356 (lambda _
4357 (substitute* (append (find-files "lib/matplotlib/tests/"
4358 "test_.*\\.py$")
4359 (find-files "lib/mpl_toolkits/tests"
4360 "test_.*\\.py$"))
4361 (("^from matplotlib" match)
4362 (string-append "import pytest\n" match))
4363 (("( *)@image_comparison" match indent)
4364 (string-append indent
4365 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4366 match)))
4367 (substitute* "lib/matplotlib/tests/test_animation.py"
4368 (("/bin/sh") (which "sh")))
4369 (for-each delete-file
4370 ;; test_normal_axes, test_get_tightbbox_polar
4371 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
4372 ;; We don't use the webagg backend and this test forces it.
4373 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
4374 ;; test_outward_ticks
4375 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
4376 ;; test_hidden_axes fails with minor extent
4377 ;; differences, possibly due to the use of a
4378 ;; different version of FreeType.
4379 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
4380 ;; Fontconfig returns no fonts.
4381 "lib/matplotlib/tests/test_font_manager.py"))
4382 #t))
4383 (add-before 'install 'install-jquery-ui
4384 (lambda* (#:key outputs inputs #:allow-other-keys)
4385 (let ((dir (string-append (assoc-ref outputs "out")
4386 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4387 (mkdir-p dir)
4388 (invoke "unzip"
4389 (assoc-ref inputs "jquery-ui")
4390 "-d" dir))
4391 #t))
c09f598d 4392 (replace 'check
5ea654cf
RW
4393 (lambda* (#:key outputs inputs #:allow-other-keys)
4394 (add-installed-pythonpath inputs outputs)
4395 (invoke "python" "tests.py" "-v"
9e7cb2f1 4396 "-m" "not network and not webagg")))
44d10b1f
RW
4397 (add-before 'build 'configure-environment
4398 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
4399 (let ((cairo (assoc-ref inputs "cairo")))
4400 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 4401 ;; has not effect.
34c2a16b 4402 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
4403 (setenv "HOME" (getcwd))
4404 (call-with-output-file "setup.cfg"
4405 (lambda (port)
4406 (format port "[directories]~%
4407basedirlist = ~a,~a~%
5ea654cf
RW
4408[packages]~%
4409tests = True~%"
44d10b1f
RW
4410 (assoc-ref inputs "tcl")
4411 (assoc-ref inputs "tk")))))
4412 #t)))))
339b5828 4413 (home-page "https://matplotlib.org/")
44d10b1f
RW
4414 (synopsis "2D plotting library for Python")
4415 (description
4416 "Matplotlib is a Python 2D plotting library which produces publication
4417quality figures in a variety of hardcopy formats and interactive environments
4418across platforms. Matplotlib can be used in Python scripts, the python and
4419ipython shell, web application servers, and six graphical user interface
4420toolkits.")
4421 (license license:psfl)
4422 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4423
4424(define-public python2-matplotlib
4425 (let ((matplotlib (package-with-python2
4426 (strip-python2-variant python-matplotlib))))
4427 (package (inherit matplotlib)
7380df73 4428 (version "2.2.4")
5ea654cf
RW
4429 (source
4430 (origin
4431 (method url-fetch)
4432 (uri (pypi-uri "matplotlib" version))
4433 (sha256
4434 (base32
7380df73 4435 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4436 (arguments
4437 (substitute-keyword-arguments (package-arguments matplotlib)
4438 ((#:phases phases)
4439 `(modify-phases ,phases
66a3c2db
EF
4440 (replace 'install-jquery-ui
4441 (lambda* (#:key outputs inputs #:allow-other-keys)
4442 (let ((dir (string-append (assoc-ref outputs "out")
4443 "/lib/python2.7/site-packages/"
4444 "matplotlib/backends/web_backend/")))
4445 (mkdir-p dir)
4446 (invoke "unzip"
4447 (assoc-ref inputs "jquery-ui")
4448 "-d" dir))
4449 #t))
38a404d5 4450 (delete 'fix-and-disable-failing-tests)
5d484f42 4451 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4452 ;; Make sure to use special packages for Python 2 instead
4453 ;; of those automatically rewritten by package-with-python2.
4454 (propagated-inputs
4455 `(("python2-pycairo" ,python2-pycairo)
4456 ("python2-backports-functools-lru-cache"
4457 ,python2-backports-functools-lru-cache)
4458 ("python2-functools32" ,python2-functools32)
4459 ("python2-pygobject-2" ,python2-pygobject-2)
4460 ("python2-subprocess32" ,python2-subprocess32)
4461 ("python2-tkinter" ,python-2 "tk")
4462 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4463 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4464
4465(define-public python-matplotlib-documentation
4466 (package
4467 (name "python-matplotlib-documentation")
4468 (version (package-version python-matplotlib))
4469 (source (package-source python-matplotlib))
4470 (build-system python-build-system)
4471 (native-inputs
4472 `(("python-matplotlib" ,python-matplotlib)
4473 ("python-colorspacious" ,python-colorspacious)
4474 ("python-sphinx" ,python-sphinx)
5ad0a452 4475 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4476 ("python-sphinx-gallery" ,python-sphinx-gallery)
4477 ("python-numpydoc" ,python-numpydoc)
4478 ("python-ipython" ,python-ipython)
e7a53914 4479 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4480 ("python-mock" ,python-mock)
4481 ("graphviz" ,graphviz)
f75aa97f 4482 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4483 texlive-latex-amsmath
4484 texlive-latex-enumitem
4485 texlive-latex-expdlist
4486 texlive-latex-geometry
4487 texlive-latex-preview
4488 texlive-latex-type1cm
4489 texlive-latex-ucs
4490
4491 texlive-generic-pdftex
4492
e7a53914
RW
4493 texlive-fonts-ec
4494 texlive-fonts-adobe-times
4495 texlive-fonts-txfonts)))
44d10b1f
RW
4496 ("texinfo" ,texinfo)
4497 ,@(package-native-inputs python-matplotlib)))
4498 (arguments
4499 `(#:tests? #f ; we're only generating documentation
4500 #:phases
4501 (modify-phases %standard-phases
5ea654cf
RW
4502 ;; The tests in python-matplotlib are run after the install phase, so
4503 ;; we need to delete the extra phase here.
4504 (delete 'check)
44d10b1f
RW
4505 (replace 'build
4506 (lambda _
4507 (chdir "doc")
e7a53914
RW
4508 (setenv "PYTHONPATH"
4509 (string-append (getenv "PYTHONPATH")
4510 ":" (getcwd) "/../examples/units"))
44d10b1f 4511 (substitute* "conf.py"
e7a53914
RW
4512 ;; Don't use git.
4513 (("^SHA = check_output.*")
4514 (string-append "SHA = \"" ,version "\"\n"))
4515 ;; Don't fetch intersphinx files from the Internet
4516 (("^explicit_order_folders" m)
4517 (string-append "intersphinx_mapping = {}\n" m))
4518 (("'sphinx.ext.intersphinx',") "")
4519 ;; Disable URL embedding which requires internet access.
4520 (("'https://docs.scipy.org/doc/numpy'") "None")
4521 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4522 (invoke "make"
4523 "SPHINXBUILD=sphinx-build"
4524 "SPHINXOPTS=" ; don't abort on warnings
4525 "html" "texinfo")))
44d10b1f
RW
4526 (replace 'install
4527 (lambda* (#:key inputs outputs #:allow-other-keys)
4528 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4529 (doc (string-append data "/doc/python-matplotlib-" ,version))
4530 (info (string-append data "/info"))
4531 (html (string-append doc "/html")))
4532 (mkdir-p html)
4533 (mkdir-p info)
4534 (copy-recursively "build/html" html)
4535 (symlink (string-append html "/_images")
4536 (string-append info "/matplotlib-figures"))
4537 (with-directory-excursion "build/texinfo"
4538 (substitute* "matplotlib.texi"
4539 (("@image\\{([^,]*)" all file)
4540 (string-append "@image{matplotlib-figures/" file)))
4541 (symlink (string-append html "/_images")
4542 "./matplotlib-figures")
e7a53914
RW
4543 (invoke "makeinfo" "--no-split"
4544 "-o" "matplotlib.info" "matplotlib.texi"))
4545 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4546 #t)))))
4547 (home-page (package-home-page python-matplotlib))
4548 (synopsis "Documentation for the python-matplotlib package")
4549 (description (package-description python-matplotlib))
4550 (license (package-license python-matplotlib))))
4551
4552(define-public python2-matplotlib-documentation
5ad0a452
RW
4553 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4554 (package
4555 (inherit parent)
4556 (native-inputs
4557 (alist-delete "python-sphinx-copybutton"
4558 (package-native-inputs parent))))))
44d10b1f 4559
55dae98f
RW
4560(define-public python-matplotlib-venn
4561 (package
4562 (name "python-matplotlib-venn")
4563 (version "0.11.5")
4564 (source
4565 (origin
4566 (method url-fetch)
4567 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4568 (sha256
4569 (base32
4570 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4571 (build-system python-build-system)
4572 (arguments '(#:tests? #f)) ; tests are not included
4573 (propagated-inputs
4574 `(("python-matplotlib" ,python-matplotlib)
4575 ("python-numpy" ,python-numpy)
4576 ("python-scipy" ,python-scipy)))
4577 (native-inputs
4578 `(("unzip" ,unzip)))
4579 (home-page "https://github.com/konstantint/matplotlib-venn")
4580 (synopsis "Plot area-proportional Venn diagrams")
4581 (description
4582 "This package provides tools for plotting area-proportional two- and
4583three-way Venn diagrams in @code{matplotlib}.")
4584 (license license:expat)))
4585
44d10b1f
RW
4586(define-public python2-pysnptools
4587 (package
4588 (name "python2-pysnptools")
5d1ade85 4589 (version "0.3.13")
44d10b1f
RW
4590 (source
4591 (origin
4592 (method url-fetch)
5d1ade85 4593 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4594 (sha256
4595 (base32
5d1ade85 4596 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4597 (build-system python-build-system)
4598 (arguments
5d1ade85
RW
4599 `(#:python ,python-2 ; only Python 2.7 is supported
4600 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4601 (propagated-inputs
4602 `(("python2-numpy" ,python2-numpy)
4603 ("python2-scipy" ,python2-scipy)
4604 ("python2-pandas" ,python2-pandas)))
44d10b1f 4605 (native-inputs
5d1ade85 4606 `(("python2-cython" ,python2-cython)))
1b66989b 4607 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4608 (synopsis "Library for reading and manipulating genetic data")
4609 (description
4610 "PySnpTools is a library for reading and manipulating genetic data. It
4611can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4612those files. It can also efficiently manipulate ranges of integers using set
4613operators such as union, intersection, and difference.")
4614 (license license:asl2.0)))
4615
44d10b1f
RW
4616(define-public python-socksipy-branch
4617 (package
4618 (name "python-socksipy-branch")
4619 (version "1.01")
4620 (source
4621 (origin
4622 (method url-fetch)
4623 (uri (pypi-uri "SocksiPy-branch" version))
4624 (sha256
4625 (base32
4626 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4627 (build-system python-build-system)
4628 (arguments
4629 `(#:tests? #f)) ; There are no tests
4630 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4631 (synopsis "Python SOCKS module")
4632 (description
4633 "SocksiPy - A Python SOCKS client module. It provides a
4634socket-like interface that supports connections to any TCP
4635service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4636The original version was developed by Dan Haim, this is a
4637branch created by Mario Vilas to address some open issues,
4638as the original project seems to have been abandoned circa 2007.")
4639 (license license:bsd-3)))
4640
4641(define-public python2-socksipy-branch
4642 (package-with-python2 python-socksipy-branch))
4643
6fcceb23 4644(define-public python-socksipychain
27d8b9d9
AG
4645 (let ((commit "eb5ee8741ce006ac0c5c3e2e83204062c348c155")
4646 (revision "1")
4647 (version "2.1.1"))
4648 (package
4649 (name "python-socksipychain")
4650 (version (git-version version revision commit))
4651 (source
4652 (origin
4653 (method git-fetch)
4654 (uri (git-reference
4655 (url "https://github.com/pagekite/PySocksipyChain.git")
4656 (commit commit)))
4657 (file-name (git-file-name name version))
4658 (sha256
4659 (base32
4660 "0fpphn6xnpm7qk8a914s4abycsbq9w6qkci07my632v0fylnm5n7"))))
4661 (build-system python-build-system)
4662 (arguments
4663 `(#:tests? #f)) ; Tests try to access the network.
4664 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4665 (synopsis "Python SOCKS module with chained proxies support")
4666 (description
4667 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
6fcceb23
AG
4668adds support for arbitrary chaining of proxy servers and various modes of
4669TLS/SSL encryption. It was developed for use in PageKite, and also includes
4670a simple netcat replacement with chaining support.")
27d8b9d9 4671 (license license:bsd-3))))
6fcceb23 4672
44d10b1f
RW
4673(define-public python-pycodestyle
4674 (package
4675 (name "python-pycodestyle")
d16ef28b 4676 (version "2.5.0")
44d10b1f 4677 (source
ba88eea2
RW
4678 (origin
4679 (method url-fetch)
4680 (uri (pypi-uri "pycodestyle" version))
4681 (sha256
4682 (base32
d16ef28b 4683 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4684 (build-system python-build-system)
4685 (home-page "https://pycodestyle.readthedocs.io/")
4686 (synopsis "Python style guide checker")
4687 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4688Python code against some of the style conventions in
4689@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4690 (license license:expat)))
4691
4692(define-public python2-pycodestyle
4693 (package-with-python2 python-pycodestyle))
4694
4695(define-public python-multidict
4696 (package
4697 (name "python-multidict")
1ed3b845 4698 (version "4.7.5")
44d10b1f
RW
4699 (source
4700 (origin
4701 (method url-fetch)
4702 (uri (pypi-uri "multidict" version))
4703 (sha256
4704 (base32
1ed3b845 4705 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
44d10b1f 4706 (build-system python-build-system)
1ed3b845
MB
4707 (arguments
4708 '(#:modules ((ice-9 ftw)
4709 (srfi srfi-1)
4710 (srfi srfi-26)
4711 (guix build utils)
4712 (guix build python-build-system))
4713 #:phases (modify-phases %standard-phases
4714 (replace 'check
4715 (lambda* (#:key tests? #:allow-other-keys)
4716 (if tests?
4717 (begin
4718 (let ((libdir (find (cut string-prefix? "lib." <>)
4719 (scandir "build"))))
4720 (setenv "PYTHONPATH"
4721 (string-append "./build/" libdir ":"
4722 (getenv "PYTHONPATH")))
4723 (invoke "pytest" "-vv")))
4724 (format #t "test suite not run~%"))
4725 #t)))))
44d10b1f
RW
4726 (native-inputs
4727 `(("python-pytest" ,python-pytest)
1ed3b845 4728 ("python-pytest-cov" ,python-pytest-cov)))
44d10b1f
RW
4729 (home-page "https://github.com/aio-libs/multidict/")
4730 (synopsis "Multidict implementation")
4731 (description "Multidict is dict-like collection of key-value pairs
4732where key might be occurred more than once in the container.")
4733 (license license:asl2.0)))
4734
4735(define-public python-orderedmultidict
4736 (package
4737 (name "python-orderedmultidict")
4738 (version "0.7.11")
4739 (source
4740 (origin
4741 (method url-fetch)
4742 (uri (pypi-uri "orderedmultidict" version))
4743 (sha256
4744 (base32
4745 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4746 (build-system python-build-system)
4747 (arguments
4748 `(#:phases
4749 (modify-phases %standard-phases
4750 (add-after 'unpack 'fix-tests
4751 (lambda _
4752 ;; The package uses nosetest for running the tests.
4753 ;; Adding this initfile allows to run the test suite
4754 ;; without requiring nosetest.
d1c4f329
RW
4755 (with-output-to-file "tests/__init__.py" newline)
4756 #t)))))
44d10b1f
RW
4757 (propagated-inputs
4758 `(("python-six" ,python-six)))
4759 (native-inputs
4760 `(("python-pycodestyle" ,python-pycodestyle)))
4761 (home-page "https://github.com/gruns/orderedmultidict")
4762 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4763 (description "This package contains a library for ordered multivalue
4764dictionaries. A multivalue dictionary is a dictionary that can store
4765multiple values for the same key. An ordered multivalue dictionary is a
4766multivalue dictionary that retains the order of insertions and deletions.")
4767 (license license:unlicense)))
4768
4769(define-public python2-orderedmultidict
4770 (package-with-python2 python-orderedmultidict))
4771
4772(define-public python-autopep8
4773 (package
4774 (name "python-autopep8")
4775 (version "1.3.5")
4776 (source
4777 (origin
4778 (method url-fetch)
4779 (uri (pypi-uri "autopep8" version))
4780 (sha256
4781 (base32
4782 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4783 (build-system python-build-system)
4784 (propagated-inputs
4785 `(("python-pycodestyle" ,python-pycodestyle)))
4786 (home-page "https://github.com/hhatto/autopep8")
4787 (synopsis "Format Python code according to the PEP 8 style guide")
4788 (description
4789 "@code{autopep8} automatically formats Python code to conform to
4790the PEP 8 style guide. It uses the pycodestyle utility to determine
4791what parts of the code needs to be formatted. @code{autopep8} is
4792capable of fixing most of the formatting issues that can be reported
4793by pycodestyle.")
4794 (license (license:non-copyleft
4795 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4796
4797(define-public python2-autopep8
4798 (package-with-python2 python-autopep8))
4799
f2a64830
JK
4800(define-public python-distlib
4801 (package
4802 (name "python-distlib")
4803 (version "0.3.0")
4804 (source
4805 (origin
4806 (method url-fetch)
4807 (uri (pypi-uri "distlib" version ".zip"))
4808 (sha256
4809 (base32
4810 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
4811 (build-system python-build-system)
4812 (arguments
4813 `(#:phases
4814 (modify-phases %standard-phases
4815 (add-before 'build 'no-/bin/sh
4816 (lambda _
4817 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
4818 (("/bin/sh") (which "sh")))
4819 #t))
4820 (add-before 'check 'prepare-test-env
4821 (lambda _
4822 (setenv "HOME" "/tmp")
4823 ;; NOTE: Any value works, the variable just has to be present.
4824 (setenv "SKIP_ONLINE" "1")
4825 #t)))))
4826 (native-inputs `(("unzip" ,unzip)))
4827 (home-page "https://bitbucket.org/pypa/distlib")
4828 (synopsis "Distribution utilities")
4829 (description "Distlib is a library which implements low-level functions that
4830relate to packaging and distribution of Python software. It is intended to be
4831used as the basis for third-party packaging tools.")
4832 (license license:psfl)))
4833
44d10b1f
RW
4834(define-public python-distutils-extra
4835 (package
4836 (name "python-distutils-extra")
4837 (version "2.38")
4838 (source
4839 (origin
4840 (method url-fetch)
4841 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4842 version "/+download/python-distutils-extra-"
4843 version ".tar.gz"))
4844 (sha256
4845 (base32
4846 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4847 (build-system python-build-system)
4848 (home-page "https://launchpad.net/python-distutils-extra/")
4849 (synopsis "Enhancements to Python's distutils")
4850 (description
4851 "The python-distutils-extra module enables you to easily integrate
4852gettext support, themed icons, and scrollkeeper-based documentation into
4853Python's distutils.")
4854 (license license:gpl2)))
4855
4856(define-public python2-distutils-extra
4857 (package-with-python2 python-distutils-extra))
4858
4859(define-public python2-elib.intl
4860 (package
4861 (name "python2-elib.intl")
4862 (version "0.0.3")
4863 (source
4864 (origin
4865 ;; This project doesn't tag releases or publish tarballs, so we take
4866 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4867 (method git-fetch)
4868 (uri (git-reference
4869 (url "https://github.com/dieterv/elib.intl.git")
4870 (commit "d09997cfef")))
4871 (file-name (string-append name "-" version "-checkout"))
4872 (sha256
4873 (base32
4874 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4875 (build-system python-build-system)
4876 (arguments
4877 ;; incompatible with Python 3 (exception syntax)
4878 `(#:python ,python-2
4879 #:tests? #f))
4880 (home-page "https://github.com/dieterv/elib.intl")
4881 (synopsis "Enhanced internationalization for Python")
4882 (description
4883 "The elib.intl module provides enhanced internationalization (I18N)
4884services for your Python modules and applications.")
4885 (license license:lgpl3+)))
4886
4887(define-public python-olefile
4888 (package
4889 (name "python-olefile")
5bef0f10 4890 (version "0.46")
44d10b1f
RW
4891 (source
4892 (origin
4893 (method url-fetch)
5bef0f10
MB
4894 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4895 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4896 (file-name (string-append name "-" version ".tar.gz"))
4897 (sha256
4898 (base32
5bef0f10 4899 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4900 (build-system python-build-system)
5bef0f10 4901 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4902 (synopsis "Read and write Microsoft OLE2 files.")
4903 (description
4904 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4905Storage or Compound Document, Microsoft Office). It is an improved version of
4906the OleFileIO module from PIL, the Python Image Library.")
4907 (license license:bsd-3)))
4908
4909(define-public python2-olefile
4910 (package-with-python2 python-olefile))
4911
4912(define-public python-pillow
4913 (package
4914 (name "python-pillow")
5fbdd917 4915 (version "6.2.1")
44d10b1f
RW
4916 (source
4917 (origin
4918 (method url-fetch)
4919 (uri (pypi-uri "Pillow" version))
4920 (sha256
4921 (base32
5fbdd917 4922 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
44d10b1f
RW
4923 (build-system python-build-system)
4924 (native-inputs
4925 `(("python-pytest" ,python-pytest)))
4926 (inputs
4927 `(("freetype" ,freetype)
4928 ("lcms" ,lcms)
44d10b1f 4929 ("libjpeg" ,libjpeg)
44d10b1f 4930 ("libtiff" ,libtiff)
0c4e1c5f
EF
4931 ("libwebp" ,libwebp)
4932 ("openjpeg" ,openjpeg)
4933 ("zlib" ,zlib)))
44d10b1f
RW
4934 (propagated-inputs
4935 `(("python-olefile" ,python-olefile)))
4936 (arguments
4937 `(#:phases
4938 (modify-phases %standard-phases
4939 (add-after 'unpack 'patch-ldconfig
4940 (lambda _
4941 (substitute* "setup.py"
4942 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
61b77ff3 4943 (replace 'check
979d8464
EF
4944 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4945 (if tests?
4946 (begin
4947 (setenv "HOME" (getcwd))
4948 ;; Make installed package available for running the tests.
4949 (add-installed-pythonpath inputs outputs)
4950 (invoke "python" "selftest.py" "--installed")
4951 (invoke "python" "-m" "pytest" "-vv"))
4952 #t))))))
44d10b1f
RW
4953 (home-page "https://python-pillow.org")
4954 (synopsis "Fork of the Python Imaging Library")
4955 (description
4956 "The Python Imaging Library adds image processing capabilities to your
4957Python interpreter. This library provides extensive file format support, an
4958efficient internal representation, and fairly powerful image processing
4959capabilities. The core image library is designed for fast access to data
4960stored in a few basic pixel formats. It should provide a solid foundation for
4961a general image processing tool.")
4962 (license (license:x11-style
4963 "http://www.pythonware.com/products/pil/license.htm"
4964 "The PIL Software License"))))
4965
4966(define-public python2-pillow
4967 (package-with-python2 python-pillow))
4968
4969(define-public python-pycparser
4970 (package
4971 (name "python-pycparser")
c6c0940e 4972 (version "2.19")
44d10b1f
RW
4973 (source
4974 (origin
4975 (method url-fetch)
4976 (uri (pypi-uri "pycparser" version))
4977 (sha256
4978 (base32
c6c0940e 4979 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4980 (outputs '("out" "doc"))
4981 (build-system python-build-system)
4982 (native-inputs
4983 `(("pkg-config" ,pkg-config)))
4984 (arguments
4985 `(#:phases
4986 (modify-phases %standard-phases
4987 (replace 'check
4988 (lambda _
4989 (with-directory-excursion "tests"
acb75c03
RW
4990 (invoke "python" "all_tests.py"))
4991 #t))
44d10b1f
RW
4992 (add-after 'install 'install-doc
4993 (lambda* (#:key outputs #:allow-other-keys)
4994 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4995 (doc (string-append data "/doc/" ,name "-" ,version))
4996 (examples (string-append doc "/examples")))
4997 (mkdir-p examples)
4998 (for-each (lambda (file)
4999 (copy-file (string-append "." file)
5000 (string-append doc file)))
5001 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
5002 (copy-recursively "examples" examples)
5003 #t))))))
44d10b1f
RW
5004 (home-page "https://github.com/eliben/pycparser")
5005 (synopsis "C parser in Python")
5006 (description
5007 "Pycparser is a complete parser of the C language, written in pure Python
5008using the PLY parsing library. It parses C code into an AST and can serve as
5009a front-end for C compilers or analysis tools.")
5010 (license license:bsd-3)))
5011
5012(define-public python2-pycparser
5013 (package-with-python2 python-pycparser))
5014
5015(define-public python-pywavelets
5016 (package
5017 (name "python-pywavelets")
5018 (version "1.0.1")
5019 (home-page "https://github.com/PyWavelets/pywt")
5020 (source (origin
5021 (method url-fetch)
5022 (uri (pypi-uri "PyWavelets" version))
5023 (sha256
5024 (base32
5025 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
5026 (build-system python-build-system)
5027 (arguments
5028 '(#:modules ((ice-9 ftw)
5029 (srfi srfi-1)
5030 (srfi srfi-26)
5031 (guix build utils)
5032 (guix build python-build-system))
5033 #:phases (modify-phases %standard-phases
5034 (replace 'check
5035 (lambda _
5036 (let ((cwd (getcwd))
5037 (libdir (find (cut string-prefix? "lib." <>)
5038 (scandir "build"))))
5039 (with-directory-excursion (string-append cwd "/build/" libdir)
5040 (invoke "nosetests" "-v" "."))))))))
5041 (native-inputs
5042 `(("python-matplotlib" ,python-matplotlib) ;for tests
5043 ("python-nose" ,python-nose)))
5044 (propagated-inputs
5045 `(("python-numpy" ,python-numpy)))
5046 (synopsis "Wavelet transforms in Python")
5047 (description
5048 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5049mathematical basis functions that are localized in both time and frequency.
5050Wavelet transforms are time-frequency transforms employing wavelets. They are
5051similar to Fourier transforms, the difference being that Fourier transforms are
5052localized only in frequency instead of in time and frequency.")
5053 (license license:expat)))
5054
5055(define-public python2-pywavelets
5056 (package-with-python2 python-pywavelets))
5057
9b0c95cc
AT
5058(define-public python-pywinrm
5059 (package
5060 (name "python-pywinrm")
5061 (version "0.4.1")
5062 (source
5063 (origin
5064 (method url-fetch)
5065 (uri (pypi-uri "pywinrm" version))
5066 (sha256
5067 (base32
5068 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
5069 (build-system python-build-system)
5070 (propagated-inputs
5071 `(("python-six" ,python-six)
5072 ("python-requests_ntlm" ,python-requests_ntlm)
5073 ("python-xmltodict" ,python-xmltodict)
5074 ("python-kerberos" ,python-kerberos)))
5075 (native-inputs
5076 `(("python-mock" ,python-mock)
5077 ("python-pytest" ,python-pytest)))
5078 (home-page "https://github.com/diyan/pywinrm/")
5079 (synopsis
5080 "Python library for Windows Remote Management (WinRM)")
5081 (description
5082 "pywinrm is a Python client for the Windows Remote Management (WinRM)
5083service. It allows you to invoke commands on target Windows machines from
5084any machine that can run Python.")
5085 (license license:expat)))
5086
44d10b1f
RW
5087(define-public python-xcffib
5088 (package
5089 (name "python-xcffib")
5090 (version "0.6.0")
5091 (source
5092 (origin
5093 (method url-fetch)
5094 (uri (pypi-uri "xcffib" version))
5095 (sha256
5096 (base32
5097 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5098 (build-system python-build-system)
5099 (inputs
5100 `(("libxcb" ,libxcb)))
5101 (propagated-inputs
5102 `(("python-cffi" ,python-cffi) ; used at run time
5103 ("python-six" ,python-six)))
5104 (arguments
5105 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5106 #:tests? #f
5107 #:phases
5108 (modify-phases %standard-phases
5109 (add-after 'unpack 'fix-libxcb-path
5110 (lambda* (#:key inputs #:allow-other-keys)
5111 (let ((libxcb (assoc-ref inputs "libxcb")))
5112 (substitute* '("xcffib/__init__.py")
5113 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5114 #t)))
5115 (add-after 'install 'install-doc
5116 (lambda* (#:key outputs #:allow-other-keys)
5117 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5118 "/doc/" ,name "-" ,version)))
5119 (mkdir-p doc)
5120 (copy-file "README.md"
5121 (string-append doc "/README.md"))
5122 #t))))))
5123 (home-page "https://github.com/tych0/xcffib")
5124 (synopsis "XCB Python bindings")
5125 (description
5126 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5127support for Python 3 and PyPy. It is based on cffi.")
5128 (license license:expat)))
5129
5130(define-public python2-xcffib
5131 (package-with-python2 python-xcffib))
5132
5133(define-public python-cairocffi
5134 (package
5135 (name "python-cairocffi")
5136 (version "0.9.0")
5137 (source
5138 (origin
5139 (method url-fetch)
5140 (uri (pypi-uri "cairocffi" version))
5141 (sha256
5142 (base32
5143 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5144 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5145 (build-system python-build-system)
5146 (outputs '("out" "doc"))
5147 (inputs
5148 `(("glib" ,glib)
5149 ("gtk+" ,gtk+)
5150 ("gdk-pixbuf" ,gdk-pixbuf)
5151 ("cairo" ,cairo)
5152 ("pango" ,pango)))
5153 (native-inputs
5154 `(("pkg-config" ,pkg-config)
5155 ("python-pytest" ,python-pytest)
5156 ("python-pytest-cov" ,python-pytest-cov)
5157 ("python-pytest-runner" ,python-pytest-runner)
5158 ("python-sphinx" ,python-sphinx)
5159 ("python-docutils" ,python-docutils)))
5160 (propagated-inputs
5161 `(("python-xcffib" ,python-xcffib))) ; used at run time
5162 (arguments
5163 `(#:phases
5164 (modify-phases %standard-phases
5165 (add-after 'unpack 'patch-paths
5166 (lambda* (#:key inputs outputs #:allow-other-keys)
5167 (substitute* (find-files "." "\\.py$")
5168 (("dlopen\\(ffi, 'cairo'")
5169 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
5170 "/lib/libcairo.so.2'"))
5171 (("dlopen\\(ffi, 'gdk-3'")
5172 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
5173 "/lib/libgtk-3.so.0'"))
5174 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
5175 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
5176 "/lib/libgdk_pixbuf-2.0.so.0'"))
5177 (("dlopen\\(ffi, 'glib-2.0'")
5178 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5179 "/lib/libglib-2.0.so.0'"))
5180 (("dlopen\\(ffi, 'gobject-2.0'")
5181 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5182 "/lib/libgobject-2.0.so.0'"))
5183 (("dlopen\\(ffi, 'pangocairo-1.0'")
5184 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5185 "/lib/libpangocairo-1.0.so.0'"))
5186 (("dlopen\\(ffi, 'pango-1.0'")
5187 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5188 "/lib/libpango-1.0.so.0'")))
5189 #t))
5190 (add-after 'install 'install-doc
5191 (lambda* (#:key inputs outputs #:allow-other-keys)
5192 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5193 (doc (string-append data "/doc/" ,name "-" ,version))
5194 (html (string-append doc "/html")))
5195 (setenv "LD_LIBRARY_PATH"
5196 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5197 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5198 (setenv "LANG" "en_US.UTF-8")
5199 (mkdir-p html)
5200 (for-each (lambda (file)
5201 (copy-file (string-append "." file)
5202 (string-append doc file)))
5203 '("/README.rst" "/CHANGES" "/LICENSE"))
5204 (system* "python" "setup.py" "build_sphinx")
5205 (copy-recursively "docs/_build/html" html)
5206 #t))))))
5207 (home-page "https://github.com/Kozea/cairocffi")
5208 (synopsis "Python bindings and object-oriented API for Cairo")
5209 (description
5210 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5211Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5212graphics library with support for multiple backends including image buffers,
5213PNG, PostScript, PDF, and SVG file output.")
5214 (license license:bsd-3)))
5215
5216(define-public python2-cairocffi
5217 (package-with-python2 python-cairocffi))
5218
5219(define-public python-decorator
5220 (package
5221 (name "python-decorator")
5222 (version "4.3.0")
5223 (source
5224 (origin
5225 (method url-fetch)
5226 (uri (pypi-uri "decorator" version))
5227 (sha256
5228 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
5229 (build-system python-build-system)
e85af137 5230 (home-page "https://pypi.org/project/decorator/")
44d10b1f
RW
5231 (synopsis "Python module to simplify usage of decorators")
5232 (description
5233 "The aim of the decorator module is to simplify the usage of decorators
5234for the average programmer, and to popularize decorators usage giving examples
5235of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5236etc. The core of this module is a decorator factory.")
5237 (license license:expat)))
5238
5239(define-public python2-decorator
5240 (package-with-python2 python-decorator))
5241
5242(define-public python-drmaa
5243 (package
5244 (name "python-drmaa")
5245 (version "0.7.7")
5246 (source
5247 (origin
5248 (method url-fetch)
5249 (uri (pypi-uri "drmaa" version))
5250 (sha256
5251 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5252 (build-system python-build-system)
5253 ;; The test suite requires libdrmaa which is provided by the cluster
5254 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5255 ;; should be set to the path of the libdrmaa library.
5256 (arguments '(#:tests? #f))
5257 (native-inputs
5258 `(("python-nose" ,python-nose)))
e85af137 5259 (home-page "https://pypi.org/project/drmaa/")
44d10b1f
RW
5260 (synopsis "Python bindings for the DRMAA library")
5261 (description
5262 "A Python package for Distributed Resource Management (DRM) job
5263submission and control. This package is an implementation of the DRMAA 1.0
5264Python language binding specification.")
5265 (license license:bsd-3)))
5266
5267(define-public python2-drmaa
5268 (package-with-python2 python-drmaa))
5269
5270(define-public python-grako
5271 (package
5272 (name "python-grako")
5273 (version "3.99.9")
5274 (source
5275 (origin
5276 (method url-fetch)
5277 (uri
5278 (pypi-uri "grako" version ".zip"))
5279 (sha256
5280 (base32
5281 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5282 (build-system python-build-system)
5283 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5284 (native-inputs
5285 `(("unzip" ,unzip)
5286 ("python-pytest" ,python-pytest)
5287 ("python-pytest-runner" ,python-pytest-runner)))
5288 (home-page "https://bitbucket.org/neogeny/grako")
5289 (synopsis "EBNF parser generator")
5290 (description
5291 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5292memoizing PEG/Packrat parser in Python.")
5293 (license license:bsd-3)))
5294
5295(define-public python2-grako
5296 (package-with-python2 python-grako))
5297
5298(define-public python-gridmap
5299 (package
5300 (name "python-gridmap")
5301 (version "0.13.0")
5302 (source
5303 (origin
768fea0f
TGR
5304 (method git-fetch)
5305 (uri (git-reference
5306 (url "https://github.com/pygridtools/gridmap.git")
5307 (commit (string-append "v" version))))
5308 (file-name (git-file-name name version))
44d10b1f 5309 (sha256
768fea0f 5310 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
5311 (build-system python-build-system)
5312 (arguments
5313 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5314 (propagated-inputs
5315 `(("python-psutil" ,python-psutil)
5316 ("python-drmaa" ,python-drmaa)
5317 ("python-pyzmq" ,python-pyzmq)))
5318 (home-page "https://github.com/pygridtools/gridmap")
5319 (synopsis "Create jobs on a cluster directly from Python")
5320 (description
5321 "Gridmap is a Python package to allow you to easily create jobs on the
5322cluster directly from Python. You can directly map Python functions onto the
5323cluster without needing to write any wrapper code yourself.")
5324 (license license:gpl3+)))
5325
5326(define-public python2-gridmap
5327 (package-with-python2 python-gridmap))
5328
5329(define-public python-honcho
5330 (package
5331 (name "python-honcho")
5332 (version "1.0.1")
5333 (source
5334 (origin
8524d130
TGR
5335 (method git-fetch)
5336 (uri (git-reference
5337 (url "https://github.com/nickstenning/honcho.git")
5338 (commit (string-append "v" version))))
5339 (file-name (git-file-name name version))
44d10b1f 5340 (sha256
8524d130 5341 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
5342 (build-system python-build-system)
5343 (native-inputs
5344 `(("python-pytest" ,python-pytest)
5345 ("python-mock" ,python-mock)
5346 ("python-tox" ,python-tox)
5347 ("which" ,which))) ;for tests
5348 (propagated-inputs
5349 `(("python-jinja2" ,python-jinja2)))
5350 (arguments
5351 `(#:phases
5352 (modify-phases %standard-phases
5353 (delete 'check)
5354 (add-after 'install 'check
5355 (lambda* (#:key outputs inputs #:allow-other-keys)
5356 ;; fix honcho path in testsuite
5357 (substitute* "tests/conftest.py"
5358 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5359 "/bin/honcho" "'")))
5360 ;; It's easier to run tests after install.
5361 ;; Make installed package available for running the tests
5362 (add-installed-pythonpath inputs outputs)
95b707fb 5363 (invoke "py.test" "-v"))))))
44d10b1f
RW
5364 (home-page "https://github.com/nickstenning/honcho")
5365 (synopsis "Manage Procfile-based applications")
5366 (description
5367 "A Procfile is a file which describes how to run an application
50fceab0 5368consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
5369The output of all running processes is collected by honcho and
5370displayed.")
5371 (license license:expat)))
5372
5373(define-public python2-honcho
5374 (package-with-python2 python-honcho))
5375
5376(define-public python-pexpect
5377 (package
5378 (name "python-pexpect")
2c15cb58 5379 (version "4.8.0")
44d10b1f
RW
5380 (source
5381 (origin
5382 (method url-fetch)
5383 (uri (pypi-uri "pexpect" version))
5384 (sha256
2c15cb58 5385 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
44d10b1f
RW
5386 (build-system python-build-system)
5387 (arguments
5388 `(#:phases
5389 (modify-phases %standard-phases
5390 (add-before 'check 'prepare-tests
5391 (lambda _
5392 (substitute* (find-files "tests")
5393 (("/bin/ls") (which "ls"))
5394 (("/bin/echo") (which "echo"))
5395 (("/bin/which") (which "which"))
5396 ;; Many tests try to use the /bin directory which
5397 ;; is not present in the build environment.
5398 ;; Use one that's non-empty and unlikely to change.
2c15cb58
TLC
5399 (("/bin'") "/dev'")
5400 ;; Disable failing test. See upstream bug report
5401 ;; https://github.com/pexpect/pexpect/issues/568
5402 (("def test_bash") "def _test_bash"))
44d10b1f
RW
5403 ;; XXX: Socket connection test gets "Connection reset by peer".
5404 ;; Why does it not work? Delete for now.
5405 (delete-file "tests/test_socket.py")
5406 #t))
5407 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5408 (native-inputs
5409 `(("python-nose" ,python-nose)
5410 ("python-pytest" ,python-pytest)
5411 ("man-db" ,man-db)
5412 ("which" ,which)
5413 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5414 (propagated-inputs
5415 `(("python-ptyprocess" ,python-ptyprocess)))
5416 (home-page "http://pexpect.readthedocs.org/")
5417 (synopsis "Controlling interactive console applications")
5418 (description
5419 "Pexpect is a pure Python module for spawning child applications;
5420controlling them; and responding to expected patterns in their output.
5421Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5422child application and control it as if a human were typing commands.")
5423 (license license:isc)))
5424
5425(define-public python2-pexpect
5426 (package-with-python2 python-pexpect))
5427
5428(define-public python-setuptools-scm
5429 (package
5430 (name "python-setuptools-scm")
85092643 5431 (version "3.2.0")
44d10b1f
RW
5432 (source (origin
5433 (method url-fetch)
5434 (uri (pypi-uri "setuptools_scm" version))
5435 (sha256
5436 (base32
85092643 5437 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
5438 (build-system python-build-system)
5439 (home-page "https://github.com/pypa/setuptools_scm/")
5440 (synopsis "Manage Python package versions in SCM metadata")
5441 (description
5442 "Setuptools_scm handles managing your Python package versions in
5443@dfn{software configuration management} (SCM) metadata instead of declaring
5444them as the version argument or in a SCM managed file.")
5445 (license license:expat)))
5446
a0b2accf
MO
5447;; Needed by python-lazy-object-proxy, remove on next update cycle.
5448(define-public python-setuptools-scm-3.3
5449 (package
5450 (inherit python-setuptools-scm)
5451 (version "3.3.3")
5452 (source (origin
5453 (method url-fetch)
5454 (uri (pypi-uri "setuptools_scm" version))
5455 (sha256
5456 (base32
5457 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5458
44d10b1f
RW
5459(define-public python2-setuptools-scm
5460 (package-with-python2 python-setuptools-scm))
5461
bb74ea09
RW
5462(define-public python-pathlib2
5463 (package
5464 (name "python-pathlib2")
5465 (version "2.3.3")
5466 (source
5467 (origin
5468 (method url-fetch)
5469 (uri (pypi-uri "pathlib2" version))
5470 (sha256
5471 (base32
5472 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5473 (build-system python-build-system)
5474 (propagated-inputs
5475 `(("python-scandir" ,python-scandir)
5476 ("python-six" ,python-six)))
e85af137 5477 (home-page "https://pypi.org/project/pathlib2/")
746d3384 5478 (synopsis "Object-oriented file system paths")
bb74ea09
RW
5479 (description "The goal of pathlib2 is to provide a backport of the
5480standard @code{pathlib} module which tracks the standard library module, so
5481all the newest features of the standard @code{pathlib} can be used also on
5482older Python versions.")
5483 (license license:expat)))
5484
fd5c264a
MB
5485(define-public python2-importlib-resources
5486 (package
5487 (name "python2-importlib-resources")
5488 (version "1.0.2")
5489 (source (origin
5490 (method url-fetch)
5491 (uri (pypi-uri "importlib_resources" version))
5492 (sha256
5493 (base32
5494 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5495 (build-system python-build-system)
5496 (arguments
5497 `(#:python ,python-2))
5498 (native-inputs
5499 `(("python-wheel" ,python2-wheel)))
5500 (propagated-inputs
5501 `(("python-pathlib2" ,python2-pathlib2)
5502 ("python-typing" ,python2-typing)))
5503 (home-page "https://gitlab.com/python-devs/importlib_resources")
5504 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5505 (description
5506 "This package provides an implementation of @code{importlib.resources}
5507for older versions of Python.")
5508 (license license:asl2.0)))
5509
15b65617
RW
5510(define-public python-importlib-metadata
5511 (package
5512 (name "python-importlib-metadata")
4dc04d11 5513 (version "1.4.0")
15b65617
RW
5514 (source
5515 (origin
5516 (method url-fetch)
5517 (uri (pypi-uri "importlib_metadata" version))
5518 (sha256
4dc04d11 5519 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
15b65617
RW
5520 (build-system python-build-system)
5521 (propagated-inputs
4dc04d11 5522 `(("python-zipp" ,python-zipp)))
15b65617
RW
5523 (native-inputs
5524 `(("python-setuptools-scm" ,python-setuptools-scm)
4dc04d11 5525 ("python-packaging" ,python-packaging)))
15b65617
RW
5526 (home-page "https://importlib-metadata.readthedocs.io/")
5527 (synopsis "Read metadata from Python packages")
5528 (description
5529 "@code{importlib_metadata} is a library which provides an API for
5530accessing an installed Python package's metadata, such as its entry points or
5531its top-level name. This functionality intends to replace most uses of
5532@code{pkg_resources} entry point API and metadata API. Along with
5533@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5534need to use the older and less efficient @code{pkg_resources} package.")
3dfb3d44 5535 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
15b65617
RW
5536 (license license:asl2.0)))
5537
5efa04dd
MB
5538(define-public python2-importlib-metadata
5539 (let ((base (package-with-python2 (strip-python2-variant
5540 python-importlib-metadata))))
5541 (package/inherit
5542 base
5543 (name "python2-importlib-metadata")
5544 (propagated-inputs
5545 `(("python-configparser" ,python2-configparser)
5546 ("python-contextlib2" ,python2-contextlib2)
5547 ("python-importlib-resources" ,python2-importlib-resources)
5548 ("python-pathlib2" ,python2-pathlib2)
5549 ,@(package-propagated-inputs base))))))
5550
37c173d1
RW
5551(define-public python-jaraco-packaging
5552 (package
5553 (name "python-jaraco-packaging")
5554 (version "6.1")
5555 (source
5556 (origin
5557 (method url-fetch)
5558 (uri (pypi-uri "jaraco.packaging" version))
5559 (sha256
5560 (base32
5561 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5562 (build-system python-build-system)
5563 (propagated-inputs
5564 `(("python-pytest" ,python-pytest)
5565 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5566 ("python-pytest-flake8" ,python-pytest-flake8)
5567 ("python-rst.linker" ,python-rst.linker)
5568 ("python-setuptools" ,python-setuptools)
5569 ("python-setuptools-scm" ,python-setuptools-scm)
5570 ("python-six" ,python-six)
5571 ("python-sphinx" ,python-sphinx)))
5572 (home-page "https://github.com/jaraco/jaraco.packaging")
5573 (synopsis "Tools to supplement packaging Python releases")
5574 (description
5575 "This package provides various tools to supplement packaging Python
5576releases.")
5577 (license license:expat)))
5578
44d10b1f
RW
5579(define-public python-pathpy
5580 (package
5581 (name "python-pathpy")
a3dd8871 5582 (version "11.5.1")
44d10b1f
RW
5583 (source
5584 (origin
5585 (method url-fetch)
5586 (uri (pypi-uri "path.py" version))
5587 (sha256
a3dd8871 5588 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5589 (outputs '("out" "doc"))
44d10b1f
RW
5590 (build-system python-build-system)
5591 (propagated-inputs
01a53e0b
MC
5592 `(("python-appdirs" ,python-appdirs)
5593 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5594 (native-inputs
5595 `(("python-setuptools-scm" ,python-setuptools-scm)
5596 ("python-sphinx" ,python-sphinx)
5597 ("python-rst.linker" ,python-rst.linker)
5598 ("python-pytest" ,python-pytest)
49ad11e9
RW
5599 ("python-pytest-runner" ,python-pytest-runner)
5600 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5601 (arguments
49ad11e9
RW
5602 `(#:phases
5603 (modify-phases %standard-phases
5604 (add-after 'build 'build-doc
5605 (lambda _
5606 (setenv "LANG" "en_US.UTF-8")
5607 (invoke "python" "setup.py" "build_sphinx")))
5608 (add-after 'install 'install-doc
5609 (lambda* (#:key outputs #:allow-other-keys)
5610 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5611 (doc (string-append data "/doc/" ,name "-" ,version))
5612 (html (string-append doc "/html")))
5613 (mkdir-p html)
5614 (for-each (lambda (file)
5615 (copy-file file (string-append doc "/" file)))
5616 '("README.rst" "CHANGES.rst"))
5617 (copy-recursively "build/sphinx/html" html)
5618 #t)))
5619 (replace 'check
5620 (lambda _
5621 ;; The import time test aborts if an import takes longer than
5622 ;; 100ms. It may very well take a little longer than that.
5623 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5624 (home-page "https://github.com/jaraco/path.py")
5625 (synopsis "Python module wrapper for built-in os.path")
5626 (description
5627 "@code{path.py} implements path objects as first-class entities, allowing
5628common operations on files to be invoked on those path objects directly.")
5629 (license license:expat)))
5630
5631(define-public python2-pathpy
5632 (package-with-python2 python-pathpy))
5633
5634(define-public python-simplegeneric
5635 (package
5636 (name "python-simplegeneric")
5637 (version "0.8.1")
5638 (source
5639 (origin
5640 (method url-fetch)
6c8c3980 5641 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5642 (sha256
5643 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5644 (build-system python-build-system)
5645 (native-inputs
5646 `(("unzip" ,unzip)))
5647 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5648 (synopsis "Python module for simple generic functions")
5649 (description
5650 "The simplegeneric module lets you define simple single-dispatch generic
5651functions, akin to Python’s built-in generic functions like @code{len()},
5652@code{iter()} and so on. However, instead of using specially-named methods,
5653these generic functions use simple lookup tables, akin to those used by
5654e.g. @code{pickle.dump()} and other generic functions found in the Python
5655standard library.")
5656 (license license:zpl2.1)))
5657
5658(define-public python2-simplegeneric
5659 (package-with-python2 python-simplegeneric))
5660
5661(define-public python-ipython-genutils
5662 ;; TODO: This package is retired, check if can be removed, see description.
5663 (package
5664 (name "python-ipython-genutils")
5665 (version "0.1.0")
5666 (source
5667 (origin
5668 (method url-fetch)
c9671d4b 5669 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5670 (sha256
5671 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5672 (build-system python-build-system)
5673 (arguments `(#:tests? #f)) ; no tests
5674 (home-page "https://ipython.org")
5675 (synopsis "Vestigial utilities from IPython")
5676 (description
5677 "This package provides retired utilities from IPython. No packages
5678outside IPython/Jupyter should depend on it.
5679
5680This package shouldn't exist. It contains some common utilities shared by
5681Jupyter and IPython projects during The Big Split. As soon as possible, those
5682packages will remove their dependency on this, and this package will go
5683away.")
5684 (license license:bsd-3)))
5685
5686(define-public python2-ipython-genutils
5687 (package-with-python2 python-ipython-genutils))
5688
5689(define-public python-traitlets
5690 (package
5691 (name "python-traitlets")
ac5e205a 5692 (version "4.3.3")
44d10b1f
RW
5693 (source
5694 (origin
5695 (method url-fetch)
5696 (uri (pypi-uri "traitlets" version))
5697 (sha256
5698 (base32
ac5e205a 5699 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5700 (build-system python-build-system)
5701 (arguments
5702 `(#:phases
5703 (modify-phases %standard-phases
5704 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5705 (propagated-inputs
5706 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5707 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5708 (native-inputs
5709 `(("python-pytest" ,python-pytest)))
5710 (properties `((python2-variant . ,(delay python2-traitlets))))
5711 (home-page "https://ipython.org")
5712 (synopsis "Configuration system for Python applications")
5713 (description
5714 "Traitlets is a framework that lets Python classes have attributes with
5715type checking, dynamically calculated default values, and ‘on change’
5716callbacks. The package also includes a mechanism to use traitlets for
5717configuration, loading values from files or from command line arguments. This
5718is a distinct layer on top of traitlets, so you can use traitlets in your code
5719without using the configuration machinery.")
5720 (license license:bsd-3)))
5721
5722(define-public python2-traitlets
5723 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5724 (package
5725 (inherit traitlets)
5726 (propagated-inputs
5727 `(("python2-enum34" ,python2-enum34)
5728 ,@(package-propagated-inputs traitlets))))))
5729
5730(define-public python-jupyter-core
5731 (package
5732 (name "python-jupyter-core")
5733 (version "4.4.0")
5734 (source
5735 (origin
5736 (method url-fetch)
5737 (uri (string-append (pypi-uri "jupyter_core" version)))
5738 (sha256
5739 (base32
5740 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5741 (build-system python-build-system)
5742 ;; FIXME: not sure how to run the tests
5743 (arguments `(#:tests? #f))
5744 (propagated-inputs
5745 `(("python-traitlets" ,python-traitlets)))
5746 (home-page "http://jupyter.org/")
5747 (synopsis "Jupyter base package")
5748 (description
5749 "Jupyter core is the base package on which Jupyter projects rely.")
5750 (license license:bsd-3)))
5751
5752(define-public python2-jupyter-core
5753 (package-with-python2 python-jupyter-core))
5754
5755(define-public python-jupyter-client
5756 (package
5757 (name "python-jupyter-client")
5758 (version "5.2.4")
5759 (source
5760 (origin
5761 (method url-fetch)
5762 (uri (pypi-uri "jupyter_client" version))
5763 (sha256
5764 (base32
5765 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5766 (build-system python-build-system)
5767 ;; Tests fail because of missing native python kernel which I assume is
5768 ;; provided by the ipython package, which we cannot use because it would
5769 ;; cause a dependency cycle.
ddc586ea
LC
5770 (arguments
5771 `(#:tests? #f
5772
5773 #:phases (modify-phases %standard-phases
5774 (add-after 'unpack 'set-tool-file-names
5775 (lambda* (#:key inputs #:allow-other-keys)
5776 (let ((iproute (assoc-ref inputs "iproute")))
5777 (substitute* "jupyter_client/localinterfaces.py"
5778 (("'ip'")
5779 (string-append "'" iproute "/sbin/ip'")))
5780 #t))))))
5781 (inputs
5782 `(("iproute" ,iproute)))
44d10b1f
RW
5783 (propagated-inputs
5784 `(("python-pyzmq" ,python-pyzmq)
5785 ("python-traitlets" ,python-traitlets)
5786 ("python-jupyter-core" ,python-jupyter-core)))
5787 (home-page "http://jupyter.org/")
5788 (synopsis "Jupyter protocol implementation and client libraries")
5789 (description
5790 "The @code{jupyter_client} package contains the reference implementation
5791of the Jupyter protocol. It also provides client and kernel management APIs
5792for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5793installing @code{kernelspec}s for use with Jupyter frontends.")
5794 (license license:bsd-3)))
5795
5796(define-public python2-jupyter-client
5797 (package-with-python2 python-jupyter-client))
5798
5799(define-public python-ipykernel
5800 (package
5801 (name "python-ipykernel")
08d0a355 5802 (version "5.1.3")
44d10b1f
RW
5803 (source
5804 (origin
5805 (method url-fetch)
5806 (uri (pypi-uri "ipykernel" version))
5807 (sha256
08d0a355 5808 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5809 (build-system python-build-system)
5810 (arguments
5811 `(#:phases
5812 (modify-phases %standard-phases
5813 (replace 'check
5814 (lambda _
5815 (setenv "HOME" "/tmp")
5816 (invoke "pytest" "-v")
aa856d02
LC
5817 #t))
5818 (add-after 'install 'set-python-file-name
5819 (lambda* (#:key outputs #:allow-other-keys)
5820 ;; Record the absolute file name of the 'python' executable in
5821 ;; 'kernel.json'.
5822 (let ((out (assoc-ref outputs "out")))
5823 (substitute* (string-append out "/share/jupyter"
5824 "/kernels/python3/kernel.json")
5825 (("\"python\"")
5826 (string-append "\"" (which "python") "\"")))
5827 #t))))))
44d10b1f
RW
5828 (propagated-inputs
5829 `(("python-ipython" ,python-ipython)
5830 ;; imported at runtime during connect
5831 ("python-jupyter-client" ,python-jupyter-client)))
5832 (native-inputs
08d0a355
TGR
5833 `(("python-flaky" ,python-flaky)
5834 ("python-nose" ,python-nose)
5835 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5836 (home-page "https://ipython.org")
5837 (synopsis "IPython Kernel for Jupyter")
5838 (description
5839 "This package provides the IPython kernel for Jupyter.")
578e4cf4 5840 (properties `((python2-variant . ,(delay python2-ipykernel))))
44d10b1f
RW
5841 (license license:bsd-3)))
5842
578e4cf4 5843;; Version 5.x and above no longer support Python 2.
44d10b1f 5844(define-public python2-ipykernel
0f378947
RW
5845 (package
5846 (name "python2-ipykernel")
578e4cf4 5847 (version "4.10.1")
0f378947
RW
5848 (source
5849 (origin
5850 (method url-fetch)
5851 (uri (pypi-uri "ipykernel" version))
5852 (sha256
578e4cf4 5853 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
0f378947
RW
5854 (build-system python-build-system)
5855 (arguments
578e4cf4 5856 `(#:python ,python-2))
0f378947
RW
5857 (propagated-inputs
5858 `(("python2-ipython" ,python2-ipython)
5859 ;; imported at runtime during connect
578e4cf4
EF
5860 ("python2-jupyter-client" ,python2-jupyter-client)
5861 ("python2-tornado" ,python2-tornado)
5862 ("python2-traitlets" ,python2-traitlets)))
0f378947 5863 (native-inputs
578e4cf4
EF
5864 `(("python2-mock" ,python2-mock)
5865 ("python2-nose" ,python2-nose)
5866 ("python2-pytest" ,python2-pytest)
5867 ("python2-pytest-cov" ,python2-pytest-cov)))
0f378947
RW
5868 (home-page "https://ipython.org")
5869 (synopsis "IPython Kernel for Jupyter")
5870 (description
5871 "This package provides the IPython kernel for Jupyter.")
5872 (license license:bsd-3)))
44d10b1f 5873
966aa714
AE
5874(define-public python-pari-jupyter
5875 (package
5876 (name "python-pari-jupyter")
5877 (version "1.3.2")
5878 (source
5879 (origin
5880 (method url-fetch)
5881 (uri (pypi-uri "pari_jupyter" version))
5882 (sha256
5883 (base32
5884 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5885 (build-system python-build-system)
5886 (propagated-inputs
5887 `(("python-ipykernel" ,python-ipykernel)))
5888 (inputs
5889 `(("pari-gp" ,pari-gp)
5890 ("readline" ,readline)))
5891 (arguments
5892 `(#:tests? #f)) ; no test suite
5893 (home-page
5894 "https://github.com/jdemeyer/pari_jupyter")
5895 (synopsis "A Jupyter kernel for PARI/GP")
5896 (description "The package provides a PARI/GP kernel for Jupyter.")
5897 (license license:gpl3+)))
5898
dede052a
RW
5899(define-public python-backcall
5900 (package
5901 (name "python-backcall")
5902 (version "0.1.0")
5903 (source
5904 (origin
5905 (method url-fetch)
5906 (uri (pypi-uri "backcall" version))
5907 (sha256
5908 (base32
5909 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5910 (build-system python-build-system)
5911 (home-page "https://github.com/takluyver/backcall/")
5912 (synopsis "Specifications for callback functions passed in to an API")
5913 (description
5914 "If your code lets other people supply callback functions, it's important
5915to specify the function signature you expect, and check that functions support
5916that. Adding extra parameters later would break other peoples code unless
5917you're careful. The @code{backcall} package provides a way of specifying the
5918callback signature using a prototype function.")
5919 (license license:bsd-3)))
5920
8b5f756c
RW
5921(define-public python-ipython
5922 (package
5923 (name "python-ipython")
ee515773 5924 (version "7.9.0")
8b5f756c
RW
5925 (source
5926 (origin
5927 (method url-fetch)
5928 (uri (pypi-uri "ipython" version ".tar.gz"))
5929 (sha256
ee515773 5930 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5931 (build-system python-build-system)
5932 (propagated-inputs
5933 `(("python-backcall" ,python-backcall)
5934 ("python-pyzmq" ,python-pyzmq)
5935 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5936 ("python-terminado" ,python-terminado)
5937 ("python-matplotlib" ,python-matplotlib)
5938 ("python-numpy" ,python-numpy)
5939 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5940 ("python-jedi" ,python-jedi)
44d10b1f
RW
5941 ("python-jinja2" ,python-jinja2)
5942 ("python-mistune" ,python-mistune)
5943 ("python-pexpect" ,python-pexpect)
5944 ("python-pickleshare" ,python-pickleshare)
5945 ("python-simplegeneric" ,python-simplegeneric)
5946 ("python-jsonschema" ,python-jsonschema)
5947 ("python-traitlets" ,python-traitlets)
5948 ("python-nbformat" ,python-nbformat)
5949 ("python-pygments" ,python-pygments)))
5950 (inputs
5951 `(("readline" ,readline)
5952 ("which" ,which)))
5953 (native-inputs
5954 `(("graphviz" ,graphviz)
5955 ("pkg-config" ,pkg-config)
5956 ("python-requests" ,python-requests) ;; for tests
5957 ("python-testpath" ,python-testpath)
8b5f756c 5958 ("python-nose" ,python-nose)))
44d10b1f
RW
5959 (arguments
5960 `(#:phases
5961 (modify-phases %standard-phases
0f272518
RW
5962 (add-after 'unpack 'make-docs-reproducible
5963 (lambda _
5964 (substitute* "IPython/sphinxext/ipython_directive.py"
5965 ((".*import datetime") "")
5966 ((".*datetime.datetime.now\\(\\)") "")
5967 (("%timeit") "# %timeit"))
5968 #t))
44d10b1f
RW
5969 ;; Tests can only be run after the library has been installed and not
5970 ;; within the source directory.
5971 (delete 'check)
5972 (add-after 'install 'check
5973 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5974 (if tests?
5975 (begin
5976 ;; Make installed package available for running the tests
5977 (add-installed-pythonpath inputs outputs)
5978 (setenv "HOME" "/tmp/") ;; required by a test
5979 ;; We only test the core because one of the other tests
5980 ;; tries to import ipykernel.
5981 (invoke "python" "IPython/testing/iptest.py"
5982 "-v" "IPython/core/tests"))
5983 #t)))
5984 (add-before 'check 'fix-tests
5985 (lambda* (#:key inputs #:allow-other-keys)
5986 (substitute* "./IPython/utils/_process_posix.py"
5987 (("/usr/bin/env', 'which") (which "which")))
5988 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5989 (("#!/usr/bin/env python")
5990 (string-append "#!" (which "python"))))
44d10b1f
RW
5991 ;; This test introduces a circular dependency on ipykernel
5992 ;; (which depends on ipython).
5993 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5994 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5995 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5996 #t)))))
5997 (home-page "https://ipython.org")
5998 (synopsis "IPython is a tool for interactive computing in Python")
5999 (description
6000 "IPython provides a rich architecture for interactive computing with:
6001Powerful interactive shells, a browser-based notebook, support for interactive
6002data visualization, embeddable interpreters and tools for parallel
2bc5d5d5
EF
6003computing.")
6004 (properties `((python2-variant . ,(delay python2-ipython))))
6005 (license license:bsd-3)))
6006
6007;; This is the latest release of the LTS version of ipython with support for
6008;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
6009;; dropped support for Python 2.7.
6010(define-public python2-ipython
6011 (package
6012 (name "python2-ipython")
6013 (version "5.8.0")
6014 (source
6015 (origin
6016 (method url-fetch)
6017 (uri (pypi-uri "ipython" version ".tar.gz"))
6018 (sha256
6019 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
6020 (build-system python-build-system)
6021 (propagated-inputs
6022 `(("python2-backports-shutil-get-terminal-size"
6023 ,python2-backports-shutil-get-terminal-size)
6024 ("python2-pathlib2" ,python2-pathlib2)
6025 ("python2-pyzmq" ,python2-pyzmq)
6026 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
6027 ("python2-terminado" ,python2-terminado)
6028 ("python2-matplotlib" ,python2-matplotlib)
6029 ("python2-numpy" ,python2-numpy)
6030 ("python2-numpydoc" ,python2-numpydoc)
6031 ("python2-jinja2" ,python2-jinja2)
6032 ("python2-mistune" ,python2-mistune)
6033 ("python2-pexpect" ,python2-pexpect)
6034 ("python2-pickleshare" ,python2-pickleshare)
6035 ("python2-simplegeneric" ,python2-simplegeneric)
6036 ("python2-jsonschema" ,python2-jsonschema)
6037 ("python2-traitlets" ,python2-traitlets)
6038 ("python2-nbformat" ,python2-nbformat)
6039 ("python2-pygments" ,python2-pygments)))
6040 (inputs
6041 `(("readline" ,readline)
6042 ("which" ,which)))
6043 (native-inputs
6044 `(("graphviz" ,graphviz)
6045 ("pkg-config" ,pkg-config)
6046 ("python2-requests" ,python2-requests) ;; for tests
6047 ("python2-testpath" ,python2-testpath)
6048 ("python2-mock" ,python2-mock)
6049 ("python2-nose" ,python2-nose)))
6050 (arguments
6051 `(#:python ,python-2
6052 #:phases
6053 (modify-phases %standard-phases
6054 (add-before 'check 'delete-broken-tests
6055 (lambda* (#:key inputs #:allow-other-keys)
6056 ;; These tests throw errors for unknown reasons.
d8ba1135
EF
6057 (delete-file "IPython/core/tests/test_displayhook.py")
6058 (delete-file "IPython/core/tests/test_magic_terminal.py")
2bc5d5d5 6059 (delete-file "IPython/core/tests/test_profile.py")
2bc5d5d5
EF
6060 #t)))))
6061 (home-page "https://ipython.org")
6062 (synopsis "IPython is a tool for interactive computing in Python")
6063 (description
6064 "IPython provides a rich architecture for interactive computing with:
6065Powerful interactive shells, a browser-based notebook, support for interactive
6066data visualization, embeddable interpreters and tools for parallel
44d10b1f 6067computing.")
8b5f756c 6068 (license license:bsd-3)))
44d10b1f 6069
8b5f756c
RW
6070(define-public python-ipython-documentation
6071 (package
6072 (inherit python-ipython)
6073 (name "python-ipython-documentation")
6074 (version (package-version python-ipython))
6075 (arguments
6076 `(#:phases
6077 (modify-phases %standard-phases
6078 (delete 'build)
6079 (delete 'check)
6080 (replace 'install
6081 (lambda* (#:key outputs #:allow-other-keys)
6082 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
6083 (doc (string-append data "/doc/" ,name "-" ,version))
6084 (html (string-append doc "/html"))
6085 (man1 (string-append data "/man/man1"))
6086 (info (string-append data "/info"))
6087 (examples (string-append doc "/examples"))
6088 (python-arg (string-append "PYTHON=" (which "python"))))
6089 (setenv "LANG" "en_US.utf8")
6090 (with-directory-excursion "docs"
6091 ;; FIXME: pdf fails to build
6092 ;;(system* "make" "pdf" "PAPER=a4")
6093 (system* "make" python-arg "html")
6094 ;; FIXME: the generated texi file contains ^@^@, which trips
6095 ;; up the parser.
6096 ;; (system* "make" python-arg "info")
6097 )
6098 (copy-recursively "docs/man" man1)
6099 (copy-recursively "examples" examples)
6100 (copy-recursively "docs/build/html" html)
6101 ;; (copy-file "docs/build/latex/ipython.pdf"
6102 ;; (string-append doc "/ipython.pdf"))
6103 (mkdir-p info)
6104 ;; (copy-file "docs/build/texinfo/ipython.info"
6105 ;; (string-append info "/ipython.info"))
6106 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
6107 #t)))))
6108 (inputs
6109 `(("python-ipython" ,python-ipython)
6110 ("python-ipykernel" ,python-ipykernel)))
6111 (native-inputs
6112 `(("python-sphinx" ,python-sphinx)
6113 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
6114 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 6115 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
6116 texlive-fonts-ec
6117 texlive-generic-ifxetex
6118 texlive-generic-pdftex
8b5f756c
RW
6119 texlive-latex-capt-of
6120 texlive-latex-cmap
6121 texlive-latex-environ
6122 texlive-latex-eqparbox
6123 texlive-latex-etoolbox
6124 texlive-latex-expdlist
6125 texlive-latex-fancyhdr
6126 texlive-latex-fancyvrb
6127 texlive-latex-fncychap
6128 texlive-latex-float
6129 texlive-latex-framed
6130 texlive-latex-geometry
6131 texlive-latex-graphics
6132 texlive-latex-hyperref
6133 texlive-latex-mdwtools
6134 texlive-latex-multirow
6135 texlive-latex-needspace
6136 texlive-latex-oberdiek
6137 texlive-latex-parskip
6138 texlive-latex-preview
6139 texlive-latex-tabulary
6140 texlive-latex-threeparttable
6141 texlive-latex-titlesec
6142 texlive-latex-trimspaces
6143 texlive-latex-ucs
6144 texlive-latex-upquote
6145 texlive-latex-url
6146 texlive-latex-varwidth
6147 texlive-latex-wrapfig)))
6148 ("texinfo" ,texinfo)))))
44d10b1f
RW
6149
6150(define-public python-urwid
6151 (package
6152 (name "python-urwid")
6153 (version "2.0.1")
6154 (source
6155 (origin
6156 (method url-fetch)
6157 (uri (pypi-uri "urwid" version))
6158 (sha256
6159 (base32
6160 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
6161 (build-system python-build-system)
6162 (home-page "http://urwid.org")
6163 (synopsis "Console user interface library for Python")
6164 (description
6165 "Urwid is a curses-based UI/widget library for Python. It includes many
6166features useful for text console applications.")
6167 (license license:lgpl2.1+)))
6168
6169(define-public python2-urwid
6170 (package-with-python2 python-urwid))
6171
6172(define-public python-urwidtrees
6173 (package
6174 (name "python-urwidtrees")
6175 (version "1.0.2")
6176 (source
6177 (origin
c8364072 6178 (method git-fetch)
44d10b1f
RW
6179 ;; package author intends on distributing via github rather than pypi:
6180 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
c8364072
EF
6181 (uri (git-reference
6182 (url "https://github.com/pazz/urwidtrees")
6183 (commit version)))
6184 (file-name (git-file-name name version))
44d10b1f
RW
6185 (sha256
6186 (base32
c8364072 6187 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
44d10b1f
RW
6188 (build-system python-build-system)
6189 (arguments
26bb7fc6
EF
6190 '(#:use-setuptools? #f
6191 #:tests? #f)) ; no tests
44d10b1f
RW
6192 (propagated-inputs `(("python-urwid" ,python-urwid)))
6193 (home-page "https://github.com/pazz/urwidtrees")
6194 (synopsis "Tree widgets for urwid")
6195 (description "Urwidtrees is a Widget Container API for the @code{urwid}
6196toolkit. Use it to build trees of widgets.")
6197 (license license:gpl3+)))
6198
6199(define-public python2-urwidtrees
6200 (package-with-python2 python-urwidtrees))
6201
6202(define-public python-ua-parser
6203 (package
6204 (name "python-ua-parser")
6205 (version "0.8.0")
6206 (source
6207 (origin
6208 (method url-fetch)
6209 (uri (pypi-uri "ua-parser" version))
6210 (sha256
6211 (base32
6212 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
6213 (build-system python-build-system)
6214 (arguments
6215 `(#:tests? #f)) ;no test suite in release
6216 (native-inputs
6217 `(("python-pyyaml" ,python-pyyaml)))
6218 (home-page "https://github.com/ua-parser/uap-python")
6219 (synopsis "User agent parser")
6220 (description
6221 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
6222 (license license:asl2.0)))
6223
6224(define-public python2-ua-parser
6225 (package-with-python2 python-ua-parser))
6226
6227(define-public python-user-agents
6228 (package
6229 (name "python-user-agents")
6230 (version "1.1.0")
6231 (source
6232 (origin
6233 (method url-fetch)
6234 (uri (pypi-uri "user-agents" version))
6235 (sha256
6236 (base32
6237 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
6238 (build-system python-build-system)
6239 (arguments
6240 `(#:tests? #f)) ;missing devices.json test file in release
6241 (propagated-inputs
6242 `(("python-ua-parser" ,python-ua-parser)))
6243 (home-page "https://github.com/selwin/python-user-agents")
6244 (synopsis "User Agent strings parsing library")
6245 (description
6246 "A library to identify devices (phones, tablets) and their capabilities by
6247parsing (browser/HTTP) user agent strings.")
6248 (license license:expat)))
6249
6250(define-public python2-user-agents
6251 (package-with-python2 python-user-agents))
6252
6253(define-public python-dbus
6254 (package
6255 (name "python-dbus")
ba5ef999 6256 (version "1.2.14")
44d10b1f
RW
6257 (source
6258 (origin
6259 (method url-fetch)
6260 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
6261 "dbus-python-" version ".tar.gz"))
6262 (sha256
ba5ef999 6263 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 6264 (build-system gnu-build-system)
44d10b1f
RW
6265 (native-inputs
6266 `(("pkg-config" ,pkg-config)))
6267 (inputs
6268 `(("python" ,python-wrapper)
6269 ("dbus-glib" ,dbus-glib)))
6270 (synopsis "Python bindings for D-bus")
6271 (description "python-dbus provides bindings for libdbus, the reference
6272implementation of D-Bus.")
6273 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
6274 (license license:expat)))
6275
6276(define-public python2-dbus
6277 (package (inherit python-dbus)
6278 (name "python2-dbus")
6279 (inputs `(("python" ,python-2)
6280 ,@(alist-delete "python"
6281 (package-inputs python-dbus)
ba5ef999 6282 equal?)))))
44d10b1f 6283
fb236fdd
AG
6284(define-public python-notify2
6285 (package
6286 (name "python-notify2")
6287 (version "0.3.1")
6288 (source
6289 (origin
6290 (method url-fetch)
6291 (uri (pypi-uri "notify2" version))
6292 (sha256
6293 (base32
6294 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
6295 (build-system python-build-system)
6296 (arguments `(#:tests? #f)) ; tests depend on system state
6297 (native-inputs
6298 `(("python-dbus" ,python-dbus)))
6299 (home-page "https://bitbucket.org/takluyver/pynotify2")
6300 (synopsis "Python interface to D-Bus notifications")
6301 (description
6302 "Pynotify2 provides a Python interface for sending D-Bus notifications.
6303It is a reimplementation of pynotify in pure Python, and an alternative to
6304the GObject Introspection bindings to libnotify for non-GTK applications.")
6305 (license (list license:bsd-2
6306 license:lgpl2.1+))))
6307
6308(define-public python2-notify2
6309 (package-with-python2 python-notify2))
6310
44d10b1f
RW
6311;; beautifulsoup4 has a totally different namespace than 3.x,
6312;; and pypi seems to put it under its own name, so I guess we should too
6313(define-public python-beautifulsoup4
6314 (package
6315 (name "python-beautifulsoup4")
abb53e6f 6316 (version "4.7.1")
44d10b1f
RW
6317 (source
6318 (origin
6319 (method url-fetch)
6320 (uri (pypi-uri "beautifulsoup4" version))
6321 (sha256
6322 (base32
abb53e6f 6323 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
6324 (build-system python-build-system)
6325 (arguments
6326 `(#:phases
6327 (modify-phases %standard-phases
6328 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6329 ;; must use this conversion script when building with Python 3. The
6330 ;; conversion script also runs the tests.
6331 ;; For more information, see the file 'convert-py3k' in the source
6332 ;; distribution.
6333 (replace 'check
dff0197e 6334 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 6335 (propagated-inputs
abb53e6f 6336 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
6337 (home-page
6338 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6339 (synopsis
6340 "Python screen-scraping library")
6341 (description
6342 "Beautiful Soup is a Python library designed for rapidly setting up
6343screen-scraping projects. It offers Pythonic idioms for navigating,
6344searching, and modifying a parse tree, providing a toolkit for
6345dissecting a document and extracting what you need. It automatically
6346converts incoming documents to Unicode and outgoing documents to UTF-8.")
6347 (license license:expat)
6348 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6349
6350(define-public python2-beautifulsoup4
6351 (package
6352 (inherit (package-with-python2
6353 (strip-python2-variant python-beautifulsoup4)))
6354 (arguments `(#:python ,python-2))))
6355
ad74978a
BT
6356(define-public python-soupsieve
6357 (package
6358 (name "python-soupsieve")
3367df31 6359 (version "1.9.5")
ad74978a
BT
6360 (source
6361 (origin
6362 (method url-fetch)
6363 (uri (pypi-uri "soupsieve" version))
6364 (sha256
6365 (base32
3367df31 6366 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
6367 (build-system python-build-system)
6368 (arguments `(#:tests? #f))
6369 ;;XXX: 2 tests fail currently despite claming they were to be
6370 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6371 ;;don't want to create a circular dependency.
6372 (home-page "https://github.com/facelessuser/soupsieve")
6373 (synopsis "CSS selector library")
6374 (description
6375 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6376Soup 4. It aims to provide selecting, matching, and filtering using modern
6377CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6378specifications up through the latest CSS level 4 drafts and beyond (though
6379some are not yet implemented).")
d00b83fb 6380 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
6381 (license license:expat)))
6382
6383(define-public python2-soupsieve
d00b83fb 6384 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
6385 (package
6386 (inherit base)
6387 (propagated-inputs
d00b83fb
MB
6388 `(("python2-backports-functools-lru-cache"
6389 ,python2-backports-functools-lru-cache)
6390 ,@(package-propagated-inputs base))))))
ad74978a 6391
44d10b1f
RW
6392(define-public python-netifaces
6393 (package
6394 (name "python-netifaces")
6395 (version "0.10.7")
6396 (source
6397 (origin
6398 (method url-fetch)
6399 (uri (pypi-uri "netifaces" version))
6400 (sha256
6401 (base32
6402 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6403 (build-system python-build-system)
6404 (home-page "https://github.com/al45tair/netifaces")
6405 (synopsis
6406 "Python module for portable network interface information")
6407 (description
6408 "Netifaces is a Python module providing information on network
6409interfaces in an easy and portable manner.")
6410 (license license:expat)))
6411
6412(define-public python2-netifaces
6413 (package-with-python2 python-netifaces))
6414
6415(define-public python-networkx
6416 (package
6417 (name "python-networkx")
5a9980d5 6418 (version "2.4")
44d10b1f
RW
6419 (source
6420 (origin
6421 (method url-fetch)
5a9980d5 6422 (uri (pypi-uri "networkx" version))
44d10b1f 6423 (sha256
5a9980d5 6424 (base32 "0r2wr7aqay9fwjrgk35fkjzk8lvvb4i4df7ndaqzkr4ndw5zzx7q"))))
44d10b1f 6425 (build-system python-build-system)
5a9980d5
MB
6426 (arguments
6427 '(#:phases (modify-phases %standard-phases
6428 (replace 'check
6429 (lambda* (#:key tests? #:allow-other-keys)
6430 (if tests?
6431 (invoke "pytest" "-vv" "--pyargs" "networkx")
6432 (format #t "test suite not run~%"))
6433 #t)))))
44d10b1f
RW
6434 ;; python-decorator is needed at runtime.
6435 (propagated-inputs
6436 `(("python-decorator" ,python-decorator)))
6437 (native-inputs
5a9980d5 6438 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
6439 (home-page "https://networkx.github.io/")
6440 (synopsis "Python module for creating and manipulating graphs and networks")
6441 (description
6442 "NetworkX is a Python package for the creation, manipulation, and study
6443of the structure, dynamics, and functions of complex networks.")
5a9980d5 6444 (properties `((python2-variant . ,(delay python2-networkx))))
44d10b1f
RW
6445 (license license:bsd-3)))
6446
5a9980d5 6447;; NetworkX 2.2 is the last version with support for Python 2.
44d10b1f 6448(define-public python2-networkx
5a9980d5
MB
6449 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
6450 (package
6451 (inherit base)
6452 (version "2.2")
6453 (source (origin
6454 (method url-fetch)
6455 (uri (pypi-uri "networkx" version ".zip"))
6456 (sha256
6457 (base32
6458 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6459 (arguments
6460 `(#:python ,python-2))
6461 (native-inputs
6462 `(("python-nose" ,python2-nose)
6463 ("unzip" ,unzip))))))
44d10b1f
RW
6464
6465(define-public python-datrie
6466 (package
6467 (name "python-datrie")
0b58cb42 6468 (version "0.8")
44d10b1f
RW
6469 (source
6470 (origin
6471 (method url-fetch)
6472 (uri (pypi-uri "datrie" version))
6473 (sha256
6474 (base32
0b58cb42 6475 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 6476 (build-system python-build-system)
44d10b1f
RW
6477 (native-inputs
6478 `(("python-cython" ,python-cython)
6479 ("python-hypothesis" ,python-hypothesis)
6480 ("python-pytest" ,python-pytest)
6481 ("python-pytest-runner" ,python-pytest-runner)))
6482 (home-page "https://github.com/kmike/datrie")
6483 (synopsis "Fast, efficiently stored trie for Python")
6484 (description
6485 "This package provides a fast, efficiently stored trie implementation for
6486Python.")
6487 (license license:lgpl2.1+)))
6488
6489(define-public snakemake
6490 (package
6491 (name "snakemake")
93803c6b 6492 (version "5.7.1")
44d10b1f
RW
6493 (source
6494 (origin
6495 (method url-fetch)
6496 (uri (pypi-uri "snakemake" version))
6497 (sha256
93803c6b 6498 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
6499 (build-system python-build-system)
6500 (arguments
6501 ;; TODO: Package missing test dependencies.
6502 '(#:tests? #f
6503 #:phases
6504 (modify-phases %standard-phases
6505 ;; For cluster execution Snakemake will call Python. Since there is
6506 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6507 ;; this by calling the snakemake wrapper instead.
6508 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6509 (lambda* (#:key outputs #:allow-other-keys)
6510 (substitute* "snakemake/executors.py"
6511 (("\\{sys.executable\\} -m snakemake")
6512 (string-append (assoc-ref outputs "out")
6513 "/bin/snakemake")))
6514 #t)))))
6515 (propagated-inputs
8994ae34 6516 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
6517 ("python-configargparse" ,python-configargparse)
6518 ("python-datrie" ,python-datrie)
6519 ("python-docutils" ,python-docutils)
8994ae34 6520 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
6521 ("python-jinja2" ,python-jinja2)
6522 ("python-jsonschema" ,python-jsonschema)
6523 ("python-networkx" ,python-networkx)
93803c6b 6524 ("python-psutil" ,python-psutil)
44d10b1f 6525 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
6526 ("python-ratelimiter" ,python-ratelimiter)
6527 ("python-requests" ,python-requests)
6528 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
6529 (home-page "https://snakemake.readthedocs.io")
6530 (synopsis "Python-based execution environment for make-like workflows")
6531 (description
6532 "Snakemake aims to reduce the complexity of creating workflows by
6533providing a clean and modern domain specific specification language (DSL) in
6534Python style, together with a fast and comfortable execution environment.")
6535 (license license:expat)))
6536
44d10b1f
RW
6537(define-public python-pyqrcode
6538 (package
6539 (name "python-pyqrcode")
6540 (version "1.2.1")
6541 (source
6542 (origin
6543 (method url-fetch)
6544 (uri (pypi-uri "PyQRCode" version))
6545 (sha256
6546 (base32
6547 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6548 (build-system python-build-system)
6549 (home-page
6550 "https://github.com/mnooner256/pyqrcode")
6551 (synopsis "QR code generator")
6552 (description
6553 "Pyqrcode is a QR code generator written purely in Python with
6554SVG, EPS, PNG and terminal output.")
6555 (license license:bsd-3)))
6556
6557(define-public python-seaborn
6558 (package
6559 (name "python-seaborn")
0731f943 6560 (version "0.10.0")
44d10b1f
RW
6561 (source
6562 (origin
6563 (method url-fetch)
6564 (uri (pypi-uri "seaborn" version))
6565 (sha256
0731f943 6566 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
44d10b1f
RW
6567 (build-system python-build-system)
6568 (arguments
6569 `(#:phases
6570 (modify-phases %standard-phases
6571 (add-before 'check 'start-xserver
6572 (lambda* (#:key inputs #:allow-other-keys)
6573 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6574 ;; There must be a running X server and make check doesn't
6575 ;; start one. Therefore we must do it.
6576 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6577 (setenv "DISPLAY" ":1")
6578 #t)))
6579 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6580 (propagated-inputs
6581 `(("python-pandas" ,python-pandas)
6582 ("python-matplotlib" ,python-matplotlib)
6583 ("python-numpy" ,python-numpy)
6584 ("python-scipy" ,python-scipy)))
6585 (native-inputs
6586 `(("python-pytest" ,python-pytest)
ff337525 6587 ("xorg-server" ,xorg-server-for-tests)))
d3d73bd6 6588 (home-page "https://seaborn.pydata.org/")
44d10b1f
RW
6589 (synopsis "Statistical data visualization")
6590 (description
6591 "Seaborn is a library for making attractive and informative statistical
6592graphics in Python. It is built on top of matplotlib and tightly integrated
6593with the PyData stack, including support for numpy and pandas data structures
6594and statistical routines from scipy and statsmodels.")
0731f943 6595 (properties `((python2-variant . ,(delay python2-seaborn))))
44d10b1f
RW
6596 (license license:bsd-3)))
6597
0731f943 6598;; 0.9.1 is the last release with support for Python 2.
44d10b1f 6599(define-public python2-seaborn
0731f943
MB
6600 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6601 (package
6602 (inherit base)
6603 (version "0.9.1")
6604 (source (origin
6605 (method url-fetch)
6606 (uri (pypi-uri "seaborn" version))
6607 (sha256
6608 (base32
6609 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
44d10b1f
RW
6610
6611(define-public python-mpmath
6612 (package
6613 (name "python-mpmath")
6614 (version "0.19")
6615 (source (origin
6616 (method url-fetch)
6617 (uri (string-append "http://mpmath.org/files/mpmath-"
6618 version ".tar.gz"))
6619 (sha256
6620 (base32
6621 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6622 (build-system python-build-system)
6623 (arguments
6624 '(#:phases
6625 (modify-phases %standard-phases
6626 (replace 'check
6627 (lambda _
5d7a6f1c 6628 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6629 (home-page "http://mpmath.org")
6630 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6631 (description
6632 "@code{mpmath} can be used as an arbitrary-precision substitute for
6633Python's float/complex types and math/cmath modules, but also does much
6634more advanced mathematics.")
6635 (license license:bsd-3)))
6636
6637(define-public python2-mpmath
6638 (package-with-python2 python-mpmath))
6639
6640(define-public python-bigfloat
6641 (package
6642 (name "python-bigfloat")
6643 (version "0.3.0")
6644 (source
6645 (origin
6646 (method url-fetch)
6647 (uri (pypi-uri "bigfloat" version))
6648 (sha256
6649 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6650 (build-system python-build-system)
6651 (inputs
6652 `(("mpfr" ,mpfr)))
6653 (home-page "https://github.com/mdickinson/bigfloat")
6654 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6655 (description
e36de31b 6656 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6657multiprecision arithmetic.")
6658 (license license:lgpl3+)))
6659
6660(define-public python2-bigfloat
6661 (package-with-python2 python-bigfloat))
6662
6663(define-public python-sympy
6664 (package
6665 (name "python-sympy")
6666 (version "1.1.1")
6667 (source
6668 (origin
6669 (method url-fetch)
6670 (uri (string-append
6671 "https://github.com/sympy/sympy/releases/download/sympy-"
6672 version "/sympy-" version ".tar.gz"))
6673 (sha256
6674 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6675 (build-system python-build-system)
6676 (arguments
6677 `(#:phases
6678 (modify-phases %standard-phases
6679 ;; Run the core tests after installation. By default it would run
6680 ;; *all* tests, which take a very long time to complete and are known
6681 ;; to be flaky.
6682 (delete 'check)
6683 (add-after 'install 'check
6684 (lambda* (#:key outputs #:allow-other-keys)
6685 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6686 #t)))))
6687 (propagated-inputs
6688 `(("python-mpmath" ,python-mpmath)))
2f35985c 6689 (home-page "https://www.sympy.org/")
44d10b1f
RW
6690 (synopsis "Python library for symbolic mathematics")
6691 (description
6692 "SymPy is a Python library for symbolic mathematics. It aims to become a
6693full-featured computer algebra system (CAS) while keeping the code as simple
6694as possible in order to be comprehensible and easily extensible.")
6695 (license license:bsd-3)))
6696
6697(define-public python2-sympy
6698 (package
6699 (inherit (package-with-python2 python-sympy))
6700 (arguments
6701 `(#:phases
6702 (modify-phases %standard-phases
6703 ;; Run the core tests after installation. By default it would run
6704 ;; *all* tests, which take a very long time to complete and are known
6705 ;; to be flaky.
6706 (delete 'check)
6707 (add-after 'install 'check
6708 (lambda* (#:key outputs #:allow-other-keys)
6709 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6710 #t)))))))
6711
6712(define-public python-q
6713 (package
6714 (name "python-q")
6715 (version "2.6")
6716 (source
6717 (origin
6718 (method url-fetch)
6719 (uri (pypi-uri "q" version))
6720 (sha256
6721 (base32
6722 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6723 (build-system python-build-system)
6724 (home-page "https://github.com/zestyping/q")
6725 (synopsis "Quick-and-dirty debugging output for tired programmers")
6726 (description
6727 "q is a Python module for \"print\" style of debugging Python code. It
6728provides convenient short API for print out of values, tracebacks, and
6729falling into the Python interpreter.")
6730 (license license:asl2.0)))
6731
6732(define-public python2-q
6733 (package-with-python2 python-q))
6734
6735(define-public python2-xlib
6736 (package
6737 (name "python2-xlib")
6738 (version "0.14")
6739 (source (origin
6740 (method url-fetch)
6741 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6742 "/" version "/"
6743 "python-xlib-" version ".tar.gz"))
6744 (sha256
6745 (base32
6746 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6747 (build-system python-build-system)
6748 (arguments
6749 `(#:python ,python-2 ;Python 2 only
6750 #:tests? #f)) ;no tests
6751 (home-page "http://python-xlib.sourceforge.net/")
6752 (synopsis "Python X11 client library")
6753 (description
6754 "The Python X Library is intended to be a fully functional X client
6755library for Python programs. It is useful to implement low-level X clients.
6756It is written entirely in Python.")
6757 (license license:gpl2+)))
6758
6759(define-public python-singledispatch
6760 (package
6761 (name "python-singledispatch")
6762 (version "3.4.0.3")
6763 (source
6764 (origin
6765 (method url-fetch)
6766 (uri (pypi-uri "singledispatch" version))
6767 (sha256
6768 (base32
6769 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6770 (build-system python-build-system)
6771 (native-inputs
6772 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6773 (home-page
8680eff3 6774 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
44d10b1f
RW
6775 (synopsis "Backport of singledispatch feature from Python 3.4")
6776 (description
6777 "This library brings functools.singledispatch from Python 3.4 to Python
67782.6-3.3.")
6779 (license license:expat)))
6780
6781(define-public python2-singledispatch
6782 (package-with-python2 python-singledispatch))
6783
6784;; the python- version can be removed with python-3.5
6785(define-public python-backports-abc
6786 (package
6787 (name "python-backports-abc")
6788 (version "0.5")
6789 (source
6790 (origin
6791 (method url-fetch)
6792 (uri (pypi-uri "backports_abc" version))
6793 (sha256
6794 (base32
6795 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6796 (build-system python-build-system)
6797 (home-page "https://github.com/cython/backports_abc")
6798 (synopsis "Backport of additions to the 'collections.abc' module")
6799 (description
6800 "Python-backports-abc provides a backport of additions to the
36a4366d 6801@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6802 (license license:psfl)))
6803
6804(define-public python2-backports-abc
6805 (package-with-python2 python-backports-abc))
6806
6807(define-public python-backports-csv
6808 (package
6809 (name "python-backports-csv")
6810 (version "1.0.5")
6811 (source
6812 (origin
6813 (method url-fetch)
6814 (uri (pypi-uri "backports.csv" version))
6815 (sha256
6816 (base32
6817 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6818 (build-system python-build-system)
6819 (home-page "https://github.com/ryanhiebert/backports.csv")
6820 (synopsis "Backport of Python 3's csv module for Python 2")
6821 (description
6822 "Provides a backport of Python 3's @code{csv} module for parsing
6823comma separated values. The API of the @code{csv} module in Python 2
6824is drastically different from the @code{csv} module in Python 3.
6825This is due, for the most part, to the difference between str in
6826Python 2 and Python 3.")
6827 (license license:psfl)))
6828
6829(define-public python2-backports-csv
6830 (package-with-python2 python-backports-csv))
6831
6832(define-public python2-backports-shutil-get-terminal-size
6833 (package
6834 (name "python2-backports-shutil-get-terminal-size")
6835 (version "1.0.0")
6836 (source
6837 (origin
6838 (method url-fetch)
6839 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6840 (sha256
6841 (base32
6842 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6843 (build-system python-build-system)
6844 (arguments
6845 `(#:python ,python-2
6846 #:phases
6847 (modify-phases %standard-phases
6848 (replace 'check
6849 (lambda _
4a4a7d9a 6850 (invoke "py.test" "-v"))))))
44d10b1f
RW
6851 (native-inputs
6852 `(("python2-pytest" ,python2-pytest)))
6853 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6854 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6855 (description
6856 "This package provides a backport of the @code{get_terminal_size
6857function} from Python 3.3's @code{shutil}.
6858Unlike the original version it is written in pure Python rather than C,
6859so it might be a tiny bit slower.")
6860 (license license:expat)))
6861
6862(define-public python-waf
6863 (package
6864 (name "python-waf")
6c2c11fa 6865 (version "2.0.19")
44d10b1f
RW
6866 (source (origin
6867 (method url-fetch)
6868 (uri (string-append "https://waf.io/"
6869 "waf-" version ".tar.bz2"))
6870 (sha256
6871 (base32
6c2c11fa 6872 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
44d10b1f
RW
6873 (build-system python-build-system)
6874 (arguments
6875 '(#:phases
6876 (modify-phases %standard-phases
6877 (replace 'build
6878 (lambda _
633c8b71
MO
6879 ;; XXX: Find a way to add all extra tools.
6880 (let ((tools '("gccdeps"
6881 "clang_compilation_database")))
6882 (invoke "python" "waf-light" "configure" "build"
6883 (string-append "--tools="
6884 (string-join tools ","))))))
44d10b1f
RW
6885 (replace 'check
6886 (lambda _
6887 (invoke "python" "waf" "--version")))
6888 (replace 'install
6889 (lambda* (#:key outputs #:allow-other-keys)
6890 (let ((out (assoc-ref outputs "out")))
6891 (install-file "waf" (string-append out "/bin")))
6892 #t))
6893 ;; waf breaks when it is wrapped.
6894 (delete 'wrap))))
6895 (home-page "https://waf.io/")
6896 (synopsis "Python-based build system")
6897 (description
6898 "Waf is a Python-based framework for configuring, compiling and installing
6899applications.")
6900 (license license:bsd-3)))
6901
6902(define-public python2-waf
6903 (package-with-python2 python-waf))
6904
6905(define-public python-pyzmq
6906 (package
6907 (name "python-pyzmq")
6908 (version "17.1.2")
6909 (source
6910 (origin
6911 (method url-fetch)
6912 (uri (pypi-uri "pyzmq" version))
6913 (sha256
6914 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6915 (build-system python-build-system)
6916 (arguments
6917 `(#:configure-flags
6918 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6919 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6920 ;; --inplace' for 'python setup.py test' to work.
6921 #:tests? #f))
6922 (inputs
6923 `(("zeromq" ,zeromq)))
6924 (native-inputs
6925 `(("pkg-config" ,pkg-config)
6926 ("python-nose" ,python-nose)))
6927 (home-page "https://github.com/zeromq/pyzmq")
6928 (synopsis "Python bindings for 0MQ")
6929 (description
6930 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6931 (license license:bsd-4)))
6932
6933(define-public python2-pyzmq
6934 (package-with-python2 python-pyzmq))
6935
6936(define-public python-pep8
6937 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6938 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6939 ;; some dependents' test suites, and nothing more.
6940 (package
6941 (name "python-pep8")
6942 (version "1.7.0")
6943 (source
6944 (origin
6945 (method url-fetch)
6946 (uri (pypi-uri "pep8" version))
6947 (sha256
6948 (base32
2be878d8
CB
6949 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6950 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6951 (build-system python-build-system)
6952 (home-page "https://pep8.readthedocs.org/")
6953 (synopsis "Python style guide checker")
6954 (description
6955 "This tools checks Python code against some of the style conventions in
6956PEP 8.")
6957 (license license:expat)))
6958
6959(define-public python2-pep8
6960 (package-with-python2 python-pep8))
6961
6962(define-public python-pyflakes
6963 (package
6964 (name "python-pyflakes")
d0cba11b 6965 (version "2.1.1")
44d10b1f
RW
6966 (source
6967 (origin
6968 (method url-fetch)
6969 (uri (pypi-uri "pyflakes" version))
6970 (sha256
6971 (base32
d0cba11b 6972 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6973 (build-system python-build-system)
6974 (home-page
6975 "https://github.com/pyflakes/pyflakes")
6976 (synopsis "Passive checker of Python programs")
6977 (description
6978 "Pyflakes statically checks Python source code for common errors.")
6979 (license license:expat)))
6980
6981(define-public python2-pyflakes
6982 (package-with-python2 python-pyflakes))
6983
6984(define-public python-mccabe
6985 (package
6986 (name "python-mccabe")
6987 (version "0.6.1")
6988 (source
6989 (origin
6990 (method url-fetch)
6991 (uri (pypi-uri "mccabe" version))
6992 (sha256
6993 (base32
6994 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6995 (build-system python-build-system)
6996 (native-inputs
6997 `(("python-pytest" ,python-pytest-bootstrap)
6998 ("python-pytest-runner" ,python-pytest-runner)))
6999 (home-page "https://github.com/flintwork/mccabe")
7000 (synopsis "McCabe checker, plugin for flake8")
7001 (description
7002 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
7003complexity of Python source code.")
7004 (license license:expat)))
7005
7006(define-public python2-mccabe
7007 (package-with-python2 python-mccabe))
7008
7009(define-public python-mccabe-0.2.1
7010 (package (inherit python-mccabe)
7011 (version "0.2.1")
7012 (source
7013 (origin
7014 (method url-fetch)
7015 (uri (pypi-uri "mccabe" version))
7016 (sha256
7017 (base32
7018 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7019
7020(define-public python2-mccabe-0.2.1
7021 (package-with-python2 python-mccabe-0.2.1))
7022
7023;; Flake8 2.4.1 requires an older version of pep8.
7024;; This should be removed ASAP.
7025(define-public python-pep8-1.5.7
7026 (package (inherit python-pep8)
7027 (version "1.5.7")
7028 (source
f3576970
RW
7029 (origin
7030 (method url-fetch)
7031 (uri (pypi-uri "pep8" version))
7032 (sha256
7033 (base32
7034 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
7035 (arguments
7036 ;; XXX Tests not compatible with Python 3.5.
7037 '(#:tests? #f))))
7038
7039(define-public python2-pep8-1.5.7
7040 (package-with-python2 python-pep8-1.5.7))
7041
7042;; Flake8 2.4.1 requires an older version of pyflakes.
7043;; This should be removed ASAP.
7044(define-public python-pyflakes-0.8.1
7045 (package (inherit python-pyflakes)
7046 (version "0.8.1")
7047 (source
8c4dffb5
RW
7048 (origin
7049 (method url-fetch)
7050 (uri (pypi-uri "pyflakes" version))
7051 (sha256
7052 (base32
7053 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
7054 (arguments
7055 ;; XXX Tests not compatible with Python 3.5.
7056 '(#:tests? #f))))
7057
7058(define-public python2-pyflakes-0.8.1
7059 (package-with-python2 python-pyflakes-0.8.1))
7060
ac63cf0a 7061(define-public python-flake8
44d10b1f
RW
7062 (package
7063 (name "python-flake8")
beaff4a8 7064 (version "3.7.7")
ac63cf0a
MB
7065 (source (origin
7066 (method url-fetch)
7067 (uri (pypi-uri "flake8" version))
7068 (sha256
7069 (base32
beaff4a8 7070 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
7071 (build-system python-build-system)
7072 (arguments
7073 `(#:phases
7074 (modify-phases %standard-phases
44d10b1f
RW
7075 (delete 'check)
7076 (add-after 'install 'check
7077 (lambda* (#:key inputs outputs #:allow-other-keys)
7078 (add-installed-pythonpath inputs outputs)
7079 (invoke "pytest" "-v")
7080 #t)))))
7081 (propagated-inputs
7082 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 7083 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
7084 ("python-pyflakes" ,python-pyflakes)
7085 ("python-mccabe" ,python-mccabe)))
7086 (native-inputs
7087 `(("python-mock" ,python-mock)
7088 ("python-pytest" ,python-pytest-bootstrap)
7089 ("python-pytest-runner" ,python-pytest-runner)))
7090 (home-page "https://gitlab.com/pycqa/flake8")
7091 (synopsis
7092 "The modular source code checker: pep8, pyflakes and co")
7093 (description
7094 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 7095 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
7096 (license license:expat)))
7097
ac63cf0a
MB
7098(define-public python2-flake8
7099 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
7100 (package (inherit base)
7101 (propagated-inputs
7102 `(("python2-configparser" ,python2-configparser)
7103 ("python2-enum34" ,python2-enum34)
f8205d9a 7104 ("python2-functools32" ,python2-functools32)
beaff4a8 7105 ("python2-typing" ,python2-typing)
44d10b1f
RW
7106 ,@(package-propagated-inputs base))))))
7107
44d10b1f
RW
7108;; python-hacking requires flake8 <2.6.0.
7109(define-public python-flake8-2.5
7110 (package
7111 (inherit python-flake8)
7112 (version "2.5.5")
7113 (source (origin
7114 (method url-fetch)
7115 (uri (pypi-uri "flake8" version))
7116 (sha256
7117 (base32
7118 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
7119 (propagated-inputs
7120 `(("python-pep8" ,python-pep8)
7121 ,@(package-propagated-inputs python-flake8)))
7122 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
7123
7124(define-public python2-flake8-2.5
7125 (package
7126 (inherit python2-flake8)
7127 (version (package-version python-flake8-2.5))
7128 (source (origin
7129 (inherit (package-source python-flake8-2.5))))
7130 (propagated-inputs
7131 `(("python2-pep8" ,python2-pep8)
7132 ,@(package-propagated-inputs python2-flake8)))))
7133
7134(define-public python-flake8-polyfill
7135 (package
7136 (name "python-flake8-polyfill")
7137 (version "1.0.2")
7138 (source
7139 (origin
7140 (method url-fetch)
7141 (uri (pypi-uri "flake8-polyfill" version))
7142 (sha256
7143 (base32
7144 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
7145 (build-system python-build-system)
7146 (arguments
7147 '(#:phases
7148 (modify-phases %standard-phases
7149 (replace 'check
7150 (lambda _
40a7153d
MB
7151 ;; Be compatible with Pytest 4:
7152 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
7153 (substitute* "setup.cfg"
7154 (("\\[pytest\\]")
7155 "[tool:pytest]"))
7156
44d10b1f
RW
7157 (setenv "PYTHONPATH"
7158 (string-append (getcwd) "/build/lib:"
7159 (getenv "PYTHONPATH")))
4f0a0894 7160 (invoke "py.test" "-v"))))))
44d10b1f
RW
7161 (native-inputs
7162 `(("python-flake8" ,python-flake8)
7163 ("python-mock" ,python-mock)
7164 ("python-pep8" ,python-pep8)
7165 ("python-pycodestyle" ,python-pycodestyle)
7166 ("python-pytest" ,python-pytest)))
7167 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7168 (synopsis "Polyfill package for Flake8 plugins")
7169 (description
7170 "This package that provides some compatibility helpers for Flake8
7171plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7172 (license license:expat)))
7173
7174(define-public python2-flake8-polyfill
7175 (package-with-python2 python-flake8-polyfill))
7176
7177(define-public python-mistune
7178 (package
7179 (name "python-mistune")
7180 (version "0.8.4")
7181 (source
7182 (origin
7183 (method url-fetch)
7184 (uri (pypi-uri "mistune" version))
7185 (sha256
7186 (base32
7187 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
7188 (build-system python-build-system)
7189 (native-inputs
7190 `(("python-nose" ,python-nose)
7191 ("python-cython" ,python-cython)))
7192 (home-page "https://github.com/lepture/mistune")
7193 (synopsis "Markdown parser in pure Python")
7194 (description "This package provides a fast markdown parser in pure
7195Python.")
7196 (license license:bsd-3)))
7197
7198(define-public python2-mistune
7199 (package-with-python2 python-mistune))
7200
7201(define-public python-markdown
7202 (package
7203 (name "python-markdown")
0d1d0a6e 7204 (version "3.2.1")
44d10b1f
RW
7205 (source
7206 (origin
7207 (method url-fetch)
7208 (uri (pypi-uri "Markdown" version))
7209 (sha256
7210 (base32
0d1d0a6e 7211 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
44d10b1f
RW
7212 (build-system python-build-system)
7213 (native-inputs
7214 `(("python-nose" ,python-nose)
7215 ("python-pyyaml" ,python-pyyaml)))
7216 (home-page "https://python-markdown.github.io/")
7217 (synopsis "Python implementation of Markdown")
7218 (description
7219 "This package provides a Python implementation of John Gruber's
7220Markdown. The library features international input, various Markdown
7221extensions, and several HTML output formats. A command line wrapper
7222markdown_py is also provided to convert Markdown files to HTML.")
2537ce68 7223 (properties `((python2-variant . ,(delay python2-markdown))))
44d10b1f
RW
7224 (license license:bsd-3)))
7225
2537ce68 7226;; Markdown 3.2 dropped support for Python 2.
44d10b1f 7227(define-public python2-markdown
2537ce68
MB
7228 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
7229 (package/inherit
7230 base
7231 (version "3.1.1")
7232 (source (origin
7233 (method url-fetch)
7234 (uri (pypi-uri "Markdown" version))
7235 (sha256
7236 (base32
7237 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
44d10b1f
RW
7238
7239(define-public python-ptyprocess
7240 (package
7241 (name "python-ptyprocess")
7242 (version "0.5.2")
7243 (source
7244 (origin
7245 (method url-fetch)
7246 (uri (pypi-uri "ptyprocess" version))
7247 (sha256
7248 (base32
7249 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
7250 (build-system python-build-system)
7251 (native-inputs
7252 `(("python-nose" ,python-nose)))
7253 (arguments
7254 `(#:phases
7255 (modify-phases %standard-phases
7256 (replace 'check
7904d6fa 7257 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
7258 (home-page "https://github.com/pexpect/ptyprocess")
7259 (synopsis "Run a subprocess in a pseudo terminal")
7260 (description
7261 "This package provides a Python library used to launch a subprocess in a
7262pseudo terminal (pty), and interact with both the process and its pty.")
7263 (license license:isc)))
7264
7265(define-public python2-ptyprocess
7266 (package-with-python2 python-ptyprocess))
7267
7268(define-public python-cram
7269 (package
7270 (name "python-cram")
7271 (version "0.7")
7272 (home-page "https://bitheap.org/cram/")
7273 (source (origin
7274 (method url-fetch)
7275 (uri (list (string-append home-page "cram-"
7276 version ".tar.gz")
7277 (pypi-uri "cram" version)))
7278 (sha256
7279 (base32
7280 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7281 (arguments
7282 '(#:phases
7283 (modify-phases %standard-phases
7284 (add-after 'unpack 'patch-source
7285 (lambda _
7286 (substitute* (find-files "cram" ".*\\.py$")
7287 ;; Replace default shell path.
7288 (("/bin/sh") (which "sh")))
7289 (substitute* (find-files "tests" ".*\\.t$")
7290 (("md5") "md5sum")
7291 (("/bin/bash") (which "bash"))
7292 (("/bin/sh") (which "sh")))
7293 (substitute* "cram/_test.py"
7294 ;; This hack works around a bug triggered by substituting
7295 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7296 ;; "cram -h", which breaks the output at 80 characters. This
7297 ;; causes the line showing the default shell to break into two
7298 ;; lines, but the test expects a single line...
7299 (("env\\['COLUMNS'\\] = '80'")
7300 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
7301
7302 (substitute* "Makefile"
7303 ;; Recent versions of python-coverage have caused the test
7304 ;; coverage to decrease (as of version 0.7). Allow that.
7305 (("--fail-under=100")
7306 "--fail-under=90"))
7307
44d10b1f 7308 #t))
ff1e80d7 7309 (replace 'check
44d10b1f 7310 ;; The test phase uses the built library and executable.
44d10b1f
RW
7311 (lambda* (#:key inputs outputs #:allow-other-keys)
7312 (add-installed-pythonpath inputs outputs)
7313 (setenv "PATH" (string-append (getenv "PATH") ":"
7314 (assoc-ref outputs "out") "/bin"))
2d7db192 7315 (invoke "make" "test"))))))
44d10b1f
RW
7316 (build-system python-build-system)
7317 (native-inputs
7318 `(("python-coverage" ,python-coverage)
7319 ("which" ,which)))
7320 (synopsis "Simple testing framework for command line applications")
7321 (description
7322 "Cram is a functional testing framework for command line applications.
7323Cram tests look like snippets of interactive shell sessions. Cram runs each
7324command and compares the command output in the test with the command’s actual
7325output.")
7326 (license license:gpl2+)))
7327
7328(define-public python2-cram
7329 (package-with-python2 python-cram))
7330
7331(define-public python-straight-plugin
7332 (package
7333 (name "python-straight-plugin")
7334 (version "1.4.1")
7335 (source
7336 (origin
7337 (method url-fetch)
7338 (uri (pypi-uri "straight.plugin" version))
7339 (sha256
7340 (base32
7341 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7342 (build-system python-build-system)
7343 (home-page "https://github.com/ironfroggy/straight.plugin")
7344 (synopsis "Simple namespaced plugin facility")
7345 (description "Straight Plugin provides a type of plugin you can create from
7346almost any existing Python modules, and an easy way for outside developers to
7347add functionality and customization to your projects with their own plugins.")
7348 (license license:expat)))
7349
7350(define-public python2-straight-plugin
7351 (package-with-python2 python-straight-plugin))
7352
7353(define-public python-fonttools
7354 (package
7355 (name "python-fonttools")
1a4bb420 7356 (version "3.38.0")
44d10b1f
RW
7357 (source (origin
7358 (method url-fetch)
7359 (uri (pypi-uri "fonttools" version ".zip"))
7360 (sha256
7361 (base32
1a4bb420 7362 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
7363 (build-system python-build-system)
7364 (native-inputs
7365 `(("unzip" ,unzip)
7366 ("python-pytest" ,python-pytest)
7367 ("python-pytest-runner" ,python-pytest-runner)))
9d25a454 7368 (home-page "https://github.com/fonttools/fonttools")
44d10b1f
RW
7369 (synopsis "Tools to manipulate font files")
7370 (description
7371 "FontTools/TTX is a library to manipulate font files from Python. It
7372supports reading and writing of TrueType/OpenType fonts, reading and writing
7373of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7374also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7375from an XML-based format.")
7376 (license license:expat)))
7377
7378(define-public python2-fonttools
7379 (package-with-python2 python-fonttools))
7380
7381(define-public python-ly
7382 (package
7383 (name "python-ly")
7384 (version "0.9.5")
7385 (source
7386 (origin
7387 (method url-fetch)
7388 (uri (pypi-uri name version))
7389 (sha256
7390 (base32
7391 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7392 (build-system python-build-system)
7393 (arguments
7394 ;; FIXME: Some tests need network access.
7395 '(#:tests? #f))
7396 (synopsis "Tool and library for manipulating LilyPond files")
7397 (description "This package provides a Python library to parse, manipulate
7398or create documents in LilyPond format. A command line program ly is also
7399provided that can be used to do various manipulations with LilyPond files.")
e85af137 7400 (home-page "https://pypi.org/project/python-ly/")
44d10b1f
RW
7401 (license license:gpl2+)))
7402
7403(define-public python-appdirs
7404 (package
7405 (name "python-appdirs")
7406 (version "1.4.3")
7407 (source
7408 (origin
7409 (method url-fetch)
7410 (uri (pypi-uri "appdirs" version))
7411 (sha256
7412 (base32
7413 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7414 (build-system python-build-system)
7415 (home-page "https://github.com/ActiveState/appdirs")
7416 (synopsis
7417 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7418 (description
7419 "This module provides a portable way of finding out where user data
7420should be stored on various operating systems.")
7421 (license license:expat)))
7422
7423(define-public python2-appdirs
7424 (package-with-python2 python-appdirs))
7425
7426(define-public python-llfuse
7427 (package
7428 (name "python-llfuse")
7429 (version "1.3.5")
7430 (source (origin
7431 (method url-fetch)
7432 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7433 (sha256
7434 (base32
7435 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7436 (build-system python-build-system)
7437 (inputs
7438 `(("fuse" ,fuse)
7439 ("attr" ,attr)))
7440 (native-inputs
7441 `(("pkg-config" ,pkg-config)))
7442 (synopsis "Python bindings for FUSE")
7443 (description
7444 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7445 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7446 (license license:lgpl2.0+)
7447 (properties `((python2-variant . ,(delay python2-llfuse))))))
7448
7449(define-public python2-llfuse
7450 (package (inherit (package-with-python2
7451 (strip-python2-variant python-llfuse)))
7452 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7453
7454;; For attic-0.16
7455(define-public python-llfuse-0.41
7456 (package (inherit python-llfuse)
7457 (version "0.41.1")
7458 (source (origin
7459 (method url-fetch)
7460 (uri (string-append
7461 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7462 "llfuse-" version ".tar.bz2"))
7463 (sha256
7464 (base32
7465 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7466 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7467 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7468 (license (list license:expat license:lgpl2.0+))))
7469
7470(define-public python-msgpack
7471 (package
7472 (name "python-msgpack")
66ab2f5e 7473 (version "1.0.0")
44d10b1f
RW
7474 (source (origin
7475 (method url-fetch)
7476 (uri (pypi-uri "msgpack" version))
7477 (sha256
7478 (base32
66ab2f5e 7479 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
44d10b1f
RW
7480 (build-system python-build-system)
7481 (arguments
7482 `(#:modules ((guix build utils)
7483 (guix build python-build-system)
7484 (ice-9 ftw)
7485 (srfi srfi-1)
7486 (srfi srfi-26))
7487 #:phases
7488 (modify-phases %standard-phases
7489 (replace 'check
7490 (lambda _
7491 (let ((cwd (getcwd)))
7492 (setenv "PYTHONPATH"
7493 (string-append cwd "/build/"
7494 (find (cut string-prefix? "lib" <>)
7495 (scandir (string-append cwd "/build")))
7496 ":"
7497 (getenv "PYTHONPATH")))
7498 (invoke "pytest" "-v" "test")))))))
7499 (native-inputs
7500 `(("python-pytest" ,python-pytest)))
7501 (synopsis "MessagePack (de)serializer")
7502 (description "MessagePack is a fast, compact binary serialization format,
7503suitable for similar data to JSON. This package provides CPython bindings for
7504reading and writing MessagePack data.")
e85af137 7505 (home-page "https://pypi.org/project/msgpack/")
44d10b1f
RW
7506 (license license:asl2.0)))
7507
7508;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7509;; release 0.5. Some packages like borg still call it by the old name for now.
7510;; <https://bugs.gnu.org/30662>
7511(define-public python-msgpack-transitional
7512 (package
7513 (inherit python-msgpack)
7514 (name "python-msgpack-transitional")
66ab2f5e
TLC
7515 (version "0.5.6")
7516 (source (origin
7517 (method url-fetch)
7518 (uri (pypi-uri "msgpack" version))
7519 (sha256
7520 (base32
7521 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
44d10b1f
RW
7522 (arguments
7523 (substitute-keyword-arguments (package-arguments python-msgpack)
7524 ((#:phases phases)
7525 `(modify-phases ,phases
7526 (add-after 'unpack 'configure-transitional
7527 (lambda _
7528 ;; Keep using the old name.
7529 (substitute* "setup.py"
7530 (("TRANSITIONAL = False")
7531 "TRANSITIONAL = 1"))
7532 #t))))))))
7533
7534(define-public python2-msgpack
7535 (package-with-python2 python-msgpack))
7536
7537(define-public python-netaddr
7538 (package
7539 (name "python-netaddr")
7540 (version "0.7.19")
7541 (source
7542 (origin
7543 (method url-fetch)
7544 (uri (pypi-uri "netaddr" version))
7545 (sha256
7546 (base32
7547 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7548 (build-system python-build-system)
7549 (arguments `(#:tests? #f)) ;; No tests.
7550 (home-page "https://github.com/drkjam/netaddr/")
7551 (synopsis "Pythonic manipulation of network addresses")
7552 (description
7553 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7554and MAC network addresses.")
7555 (license license:bsd-3)))
7556
7557(define-public python2-netaddr
7558 (package-with-python2 python-netaddr))
7559
dd85eca0
AG
7560(define-public python2-pyroute2
7561 (package
7562 (name "python2-pyroute2")
7563 (version "0.5.6")
7564 (source
7565 (origin
7566 (method url-fetch)
7567 (uri (pypi-uri "pyroute2" version))
7568 (sha256
7569 (base32
7570 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7571 (build-system python-build-system)
7572 (arguments
7573 `(#:python ,python-2)) ;Python 3.x is not supported
7574 (home-page "https://github.com/svinota/pyroute2")
7575 (synopsis "Python netlink library")
7576 (description
7577 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7578Supported netlink families and protocols include:
7579@itemize
7580@item rtnl, network settings - addresses, routes, traffic controls
7581@item nfnetlink - netfilter API: ipset, nftables, ...
7582@item ipq - simplest userspace packet filtering, iptables QUEUE target
7583@item devlink - manage and monitor devlink-enabled hardware
7584@item generic - generic netlink families
7585 @itemize
7586 @item nl80211 - wireless functions API (basic support)
7587 @item taskstats - extended process statistics
7588 @item acpi_events - ACPI events monitoring
7589 @item thermal_events - thermal events monitoring
7590 @item VFS_DQUOT - disk quota events monitoring
7591 @end itemize
7592@end itemize")
7593 (license license:gpl2+)))
7594
44d10b1f
RW
7595(define-public python-wrapt
7596 (package
7597 (name "python-wrapt")
2271a1dc 7598 (version "1.11.2")
44d10b1f 7599 (source
2271a1dc
MB
7600 (origin
7601 (method url-fetch)
7602 (uri (pypi-uri "wrapt" version))
7603 (sha256
7604 (base32
7605 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7606 (build-system python-build-system)
7607 (arguments
7608 ;; Tests are not included in the tarball, they are only available in the
7609 ;; git repository.
7610 `(#:tests? #f))
7611 (home-page "https://github.com/GrahamDumpleton/wrapt")
7612 (synopsis "Module for decorators, wrappers and monkey patching")
7613 (description
2271a1dc 7614 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7615 Python, which can be used as the basis for the construction of function
7616 wrappers and decorator functions.")
7617 (license license:bsd-2)))
7618
7619(define-public python2-wrapt
7620 (package-with-python2 python-wrapt))
7621
7622(define-public python-xlrd
7623 (package
7624 (name "python-xlrd")
3a2b1a3c 7625 (version "1.2.0")
44d10b1f
RW
7626 (source (origin
7627 (method url-fetch)
7628 (uri (pypi-uri "xlrd" version))
7629 (sha256
7630 (base32
3a2b1a3c 7631 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7632 (build-system python-build-system)
7633 (arguments
7634 `(#:phases
7635 (modify-phases %standard-phases
3ccdd3a5
MO
7636 ;; Some tests depend on writing a temporary file to the user's home
7637 ;; directory.
3a2b1a3c
GL
7638 (add-after 'unpack 'fix-tests
7639 (lambda _
7640 (delete-file "tests/test_open_workbook.py")
7641 #t)))))
44d10b1f
RW
7642 (home-page "http://www.python-excel.org/")
7643 (synopsis "Library for extracting data from Excel files")
a0909286 7644 (description "This package provides a library to extract data from
44d10b1f
RW
7645spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7646@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7647Unicode-aware. It is not intended as an end-user tool.")
7648 (license license:bsd-3)))
7649
7650(define-public python2-xlrd
7651 (package-with-python2 python-xlrd))
7652
7653(define-public python-prettytable
7654 (package
7655 (name "python-prettytable")
7656 (version "0.7.2")
7657 (source
7658 (origin
7659 (method url-fetch)
337c3a1e 7660 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7661 (sha256
7662 (base32
7663 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7664 (build-system python-build-system)
8be58b48 7665 (home-page "https://code.google.com/archive/p/prettytable/")
44d10b1f
RW
7666 (synopsis "Display tabular data in an ASCII table format")
7667 (description
7668 "A library designed to represent tabular data in visually appealing ASCII
7669tables. PrettyTable allows for selection of which columns are to be printed,
7670independent alignment of columns (left or right justified or centred) and
7671printing of sub-tables by specifying a row range.")
7672 (license license:bsd-3)))
7673
7674(define-public python2-prettytable
7675 (package-with-python2 python-prettytable))
7676
7677(define-public python-tables
7678 (package
7679 (name "python-tables")
7680 (version "3.4.4")
7681 (source
7682 (origin
7683 (method url-fetch)
7684 (uri (pypi-uri "tables" version))
7685 (sha256
7686 (base32
7687 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7688 (modules '((guix build utils)))
7689 (snippet
7690 '(begin
7691 ;; Remove pre-compiled .pyc files from source.
7692 (for-each delete-file-recursively
7693 (find-files "." "__pycache__" #:directories? #t))
7694 (for-each delete-file (find-files "." "\\.pyc$"))
7695 #t))))
7696 (build-system python-build-system)
7697 (arguments
7698 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7699 ;; or "check", so we must override the build and check phases.
7700 #:phases
7701 (modify-phases %standard-phases
7702 (add-after 'unpack 'use-gcc
7703 (lambda _
7704 (substitute* "setup.py"
7705 (("compiler = new_compiler\\(\\)" line)
7706 (string-append line
7707 "\ncompiler.set_executables(compiler='gcc',"
7708 "compiler_so='gcc',"
7709 "linker_exe='gcc',"
7710 "linker_so='gcc -shared')")))
7711 #t))
70b74663
RW
7712 (add-after 'unpack 'disable-tuning
7713 (lambda _
7714 (substitute* "setup.py"
7715 (("cpu_flags = .*")
7716 "cpu_flags = ['sse2']\n"))
7717 #t))
44d10b1f
RW
7718 (replace 'build
7719 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7720 (invoke "python" "setup.py" "build"
7721 (string-append "--hdf5="
7722 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7723 (replace 'check
7724 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7725 (invoke "python" "setup.py" "check"
7726 (string-append "--hdf5="
7727 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7728 (propagated-inputs
7729 `(("python-numexpr" ,python-numexpr)
7730 ("python-numpy" ,python-numpy)))
7731 (native-inputs
7732 `(("python-cython" ,python-cython)
7733 ("pkg-config" ,pkg-config)))
7734 (inputs
538c1a02 7735 `(("hdf5" ,hdf5-1.10)
44d10b1f
RW
7736 ("bzip2" ,bzip2)
7737 ("zlib" ,zlib)))
d7ee58cc 7738 (home-page "https://www.pytables.org/")
44d10b1f
RW
7739 (synopsis "Hierarchical datasets for Python")
7740 (description "PyTables is a package for managing hierarchical datasets and
7741designed to efficiently cope with extremely large amounts of data.")
7742 (license license:bsd-3)))
7743
7744(define-public python2-tables
7745 (package-with-python2 python-tables))
7746
cc2c2850
RW
7747(define-public python-pytest-black
7748 (package
7749 (name "python-pytest-black")
7750 (version "0.3.8")
7751 (source
7752 (origin
7753 (method url-fetch)
7754 (uri (pypi-uri "pytest-black" version))
7755 (sha256
7756 (base32
7757 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
7758 (build-system python-build-system)
7759 (propagated-inputs
7760 `(("python-pytest" ,python-pytest)
7761 ("python-black" ,python-black)
7762 ("python-toml" ,python-toml)))
7763 (native-inputs
7764 `(("python-setuptools-scm" ,python-setuptools-scm)))
7765 (home-page "https://github.com/shopkeep/pytest-black")
7766 (synopsis "Pytest plugin to enable format checking with black")
7767 (description
7768 "This package provides a pytest plugin to enable format checking with the
7769Python code formatter \"black\".")
7770 (license license:expat)))
7771
2ceff35f
RW
7772(define-public python-get-version
7773 (package
7774 (name "python-get-version")
7775 (version "2.1")
7776 (source
7777 (origin
7778 (method url-fetch)
7779 (uri (pypi-uri "get_version" version))
7780 (sha256
7781 (base32
7782 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
7783 (build-system python-build-system)
7784 (propagated-inputs
7785 `(("python-pygments" ,python-pygments)
7786 ("python-pytest" ,python-pytest)
7787 ("python-pytest-black" ,python-pytest-black)
7788 ("python-pytest-cov" ,python-pytest-cov)
7789 ("python-setuptools" ,python-setuptools)
7790 ("python-testpath" ,python-testpath)))
7791 (home-page "https://github.com/flying-sheep/get_version")
7792 (synopsis "Version helper in the spirit of versioneer")
7793 (description
7794 "This package provides a version helper that lets you automatically use
7795the latest @code{vX.X.X} Git tag as the version in your Python package. It
7796also supports getting the version from Python source distributions or, once
7797your package is installed, via @code{pkg_resources} (part of
7798@code{setuptools}).")
7799 (license license:gpl3+)))
7800
053ab825
RW
7801(define-public python-legacy-api-wrap
7802 (package
7803 (name "python-legacy-api-wrap")
7804 (version "1.2")
7805 (source
7806 (origin
7807 (method url-fetch)
7808 (uri (pypi-uri "legacy-api-wrap" version))
7809 (sha256
7810 (base32
7811 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
7812 (build-system python-build-system)
7813 (propagated-inputs
7814 `(("python-get-version" ,python-get-version)
7815 ("python-pytest" ,python-pytest)
7816 ("python-pytest-black" ,python-pytest-black)
7817 ("python-pytest-cov" ,python-pytest-cov)
7818 ("python-setuptools" ,python-setuptools)))
7819 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
7820 (synopsis "Legacy API wrapper")
7821 (description "This module defines a decorator to wrap legacy APIs. The
7822primary use case is APIs defined before keyword-only parameters existed.")
7823 (license license:gpl3+)))
7824
44d10b1f
RW
7825(define-public python-pyasn1
7826 (package
7827 (name "python-pyasn1")
7828 (version "0.4.3")
7829 (source
7830 (origin
7831 (method url-fetch)
7832 (uri (pypi-uri "pyasn1" version))
7833 (sha256
7834 (base32
7835 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7836 (build-system python-build-system)
7837 (home-page "http://pyasn1.sourceforge.net/")
7838 (synopsis "ASN.1 types and codecs")
7839 (description
7840 "This is an implementation of ASN.1 types and codecs in Python. It is
7841suitable for a wide range of protocols based on the ASN.1 specification.")
7842 (license license:bsd-2)))
7843
7844(define-public python2-pyasn1
7845 (package-with-python2 python-pyasn1))
7846
7847(define-public python-pyasn1-modules
7848 (package
7849 (name "python-pyasn1-modules")
7850 (version "0.2.2")
7851 (source
7852 (origin
7853 (method url-fetch)
7854 (uri (pypi-uri "pyasn1-modules" version))
7855 (sha256
7856 (base32
7857 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7858 (build-system python-build-system)
7859 (propagated-inputs
7860 `(("python-pyasn1" ,python-pyasn1)))
7861 (home-page "https://sourceforge.net/projects/pyasn1/")
7862 (synopsis "ASN.1 codec implementations")
7863 (description
7864 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7865implementations of ASN.1-based codecs and protocols.")
7866 (license license:bsd-3)))
7867
7868(define-public python2-pyasn1-modules
7869 (package-with-python2 python-pyasn1-modules))
7870
7871(define-public python-ipaddress
7872 (package
7873 (name "python-ipaddress")
7874 (version "1.0.22")
7875 (source (origin
7876 (method url-fetch)
7877 (uri (pypi-uri "ipaddress" version))
7878 (sha256
7879 (base32
7880 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7881 (build-system python-build-system)
7882 (home-page "https://github.com/phihag/ipaddress")
7883 (synopsis "IP address manipulation library")
7884 (description
7885 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7886 in Python. This library is used to create, poke at, and manipulate IPv4 and
7887 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7888 module to older versions of Python.")
7889 (license license:psfl)))
7890
7891(define-public python2-ipaddress
7892 (package-with-python2 python-ipaddress))
7893
7894(define-public python2-ipaddr
7895 (package
7896 (name "python2-ipaddr")
7897 (version "2.1.11")
7898 (source
7899 (origin
7900 (method url-fetch)
7901 (uri (pypi-uri "ipaddr" version))
7902 (sha256
7903 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7904 (build-system python-build-system)
7905 (arguments
7906 `(#:python ,python-2 ;version 2 only
7907 #:phases
7908 (modify-phases %standard-phases
7909 (replace 'check
40b8c4e3 7910 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7911 (home-page "https://github.com/google/ipaddr-py")
7912 (synopsis "IP address manipulation library")
7913 (description
7914 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7915IPv6 addresses and networks.
7916
7917For new implementations you may prefer to use the standard module
7918@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7919versions of Python.")
7920 (license license:asl2.0)))
7921
7922(define-public python-idna
7923 (package
7924 (name "python-idna")
e95c9837 7925 (version "2.8")
44d10b1f
RW
7926 (source
7927 (origin
7928 (method url-fetch)
7929 (uri (pypi-uri "idna" version))
7930 (sha256
7931 (base32
e95c9837 7932 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7933 (build-system python-build-system)
7934 (home-page "https://github.com/kjd/idna")
7935 (synopsis "Internationalized domain names in applications")
7936 (description
7937 "This is a library to support the Internationalised Domain Names in
7938Applications (IDNA) protocol as specified in RFC 5891. This version of the
7939protocol is often referred to as “IDNA2008” and can produce different results
7940from the earlier standard from 2003. The library is also intended to act as a
7941suitable drop-in replacement for the “encodings.idna” module that comes with
7942the Python standard library but currently only supports the older 2003
7943specification.")
7944 (license license:bsd-4)))
7945
a76e6a69
JM
7946(define-public python-idna-2.7
7947 (package (inherit python-idna)
7948 (version "2.7")
7949 (source (origin
7950 (method url-fetch)
7951 (uri (pypi-uri "idna" version))
7952 (sha256
7953 (base32
7954 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7955
7956
44d10b1f
RW
7957(define-public python2-idna
7958 (package-with-python2 python-idna))
7959
7960(define-public python-idna-ssl
7961 (package
7962 (name "python-idna-ssl")
7963 (version "1.0.1")
7964 (source
7965 (origin
7966 (method url-fetch)
7967 (uri (pypi-uri "idna-ssl" version))
7968 (sha256
7969 (base32
7970 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7971 (build-system python-build-system)
7972 (arguments
7973 `(#:tests? #f)) ;circular dependency with python-aiohttp
7974 (home-page "https://github.com/aio-libs/idna-ssl")
7975 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7976 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7977domains support.")
7978 (license license:expat)))
7979
7980(define-public python-pretend
7981 (package
7982 (name "python-pretend")
7983 (version "1.0.9")
7984 (source
7985 (origin
7986 (method url-fetch)
9f1f22ee 7987 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7988 (sha256
7989 (base32
7990 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7991 (build-system python-build-system)
7992 (home-page "https://github.com/alex/pretend")
7993 (synopsis "Library for stubbing in Python")
7994 (description
7995 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7996technique for writing tests. You may hear the term mixed up with mocks,
7997fakes, or doubles. Basically, a stub is an object that returns pre-canned
7998responses, rather than doing any computation.")
7999 (license license:bsd-3)))
8000
8001(define-public python2-pretend
8002 (package-with-python2 python-pretend))
8003
8004(define-public python-pip
8005 (package
8006 (name "python-pip")
0a193d32 8007 (version "20.0.2")
44d10b1f
RW
8008 (source
8009 (origin
8010 (method url-fetch)
8011 (uri (pypi-uri "pip" version))
8012 (sha256
8013 (base32
0a193d32 8014 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
44d10b1f
RW
8015 (build-system python-build-system)
8016 (arguments
8017 '(#:tests? #f)) ; there are no tests in the pypi archive.
8018 (home-page "https://pip.pypa.io/")
8019 (synopsis "Package manager for Python software")
8020 (description
8021 "Pip is a package manager for Python software, that finds packages on the
8022Python Package Index (PyPI).")
8023 (license license:expat)))
8024
8025(define-public python2-pip
8026 (package-with-python2 python-pip))
8027
8028(define-public python-tlsh
8029 (package
8030 (name "python-tlsh")
8031 (version "3.4.5")
8032 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
8033 (source
8034 (origin
8035 (method git-fetch)
8036 (uri (git-reference
8037 (url "https://github.com/trendmicro/tlsh.git")
8038 (commit (string-append "v" version))))
8039 (file-name (git-file-name name version))
8040 (sha256
8041 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
8042 (build-system cmake-build-system)
8043 (arguments
8044 '(#:out-of-source? #f
8045 #:phases (modify-phases %standard-phases
8046 (replace
8047 'install
8048 (lambda* (#:key outputs #:allow-other-keys)
8049 ;; Build and install the Python bindings. The underlying
8050 ;; C++ library is apparently not meant to be installed.
8051 (let ((out (assoc-ref outputs "out")))
8052 (with-directory-excursion "py_ext"
8053 (and (system* "python" "setup.py" "build")
8054 (system* "python" "setup.py" "install"
8055 (string-append "--prefix=" out))))))))))
8056 (inputs `(("python" ,python-wrapper))) ;for the bindings
8057 (synopsis "Fuzzy matching library for Python")
8058 (description
8059 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
8060Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
8061value which can be used for similarity comparisons. Similar objects have
8062similar hash values, which allows for the detection of similar objects by
8063comparing their hash values. The byte stream should have a sufficient amount
8064of complexity; for example, a byte stream of identical bytes will not generate
8065a hash value.")
8066 (license license:asl2.0)))
8067
8068(define-public python2-tlsh
8069 (package
8070 (inherit python-tlsh)
8071 (name "python2-tlsh")
8072 (inputs `(("python" ,python-2)))))
8073
8074(define-public python-termcolor
8075 (package
8076 (name "python-termcolor")
8077 (version "1.1.0")
8078 (source
8079 (origin
8080 (method url-fetch)
8081 (uri (pypi-uri "termcolor" version))
8082 (sha256
8083 (base32
8084 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8085 (build-system python-build-system)
8086 (arguments
8087 ;; There are no tests.
8088 `(#:tests? #f))
e85af137 8089 (home-page "https://pypi.org/project/termcolor/")
44d10b1f
RW
8090 (synopsis "ANSII Color formatting for terminal output")
8091 (description
8092 "This package provides ANSII Color formatting for output in terminals.")
8093 (license license:expat)))
8094
8095(define-public python2-termcolor
8096 (package-with-python2 python-termcolor))
8097
8098(define-public python-libarchive-c
8099 (package
8100 (name "python-libarchive-c")
f2774824 8101 (version "2.9")
44d10b1f
RW
8102 (source (origin
8103 (method url-fetch)
8104 (uri (pypi-uri "libarchive-c" version))
8105 (sha256
8106 (base32
f2774824 8107 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
44d10b1f
RW
8108 (build-system python-build-system)
8109 (arguments
8110 '(#:phases (modify-phases %standard-phases
8111 (add-before
8112 'build 'reference-libarchive
8113 (lambda* (#:key inputs #:allow-other-keys)
8114 ;; Retain the absolute file name of libarchive.so.
8115 (let ((libarchive (assoc-ref inputs "libarchive")))
8116 (substitute* "libarchive/ffi.py"
8117 (("find_library\\('archive'\\)")
8118 (string-append "'" libarchive
8119 "/lib/libarchive.so'"))))))
8120 (replace 'check
8121 (lambda _ (invoke "pytest" "-vv"))))))
8122 (native-inputs
8123 `(("python-mock" ,python-mock)
8124 ("python-pytest" ,python-pytest)))
8125 (inputs
8126 `(("libarchive" ,libarchive)))
8127 (home-page "https://github.com/Changaco/python-libarchive-c")
8128 (synopsis "Python interface to libarchive")
8129 (description
8130 "This package provides Python bindings to libarchive, a C library to
8131access possibly compressed archives in many different formats. It uses
8132Python's @code{ctypes} foreign function interface (FFI).")
8133 (license license:lgpl2.0+)))
8134
8135(define-public python2-libarchive-c
8136 (package-with-python2 python-libarchive-c))
8137
8138(define-public python-file
8139 (package
8140 (inherit file)
8141 (name "python-file")
8142 (build-system python-build-system)
8143 (arguments
8144 '(#:tests? #f ;no tests
8145 #:configure-flags '("--single-version-externally-managed" "--root=/")
8146 #:phases (modify-phases %standard-phases
8147 (add-before 'build 'change-directory
8148 (lambda _
8149 (chdir "python")
8150 #t))
8151 (add-before 'build 'set-library-file-name
8152 (lambda* (#:key inputs #:allow-other-keys)
8153 (let ((file (assoc-ref inputs "file")))
8154 (substitute* "magic.py"
8155 (("find_library\\('magic'\\)")
8156 (string-append "'" file "/lib/libmagic.so'")))
8157 #t))))))
8158 (inputs `(("file" ,file)))
528ea990
LC
8159 (native-inputs (if (%current-target-system)
8160 `(("self" ,this-package))
8161 '()))
44d10b1f
RW
8162 (synopsis "Python bindings to the libmagic file type guesser. Note that
8163this module and the python-magic module both provide a \"magic.py\" file;
8164these two modules, which are different and were developed separately, both
8165serve the same purpose: provide Python bindings for libmagic.")))
8166
8167(define-public python2-file
8168 (package-with-python2 python-file))
8169
8170(define-public python-debian
8171 (package
8172 (name "python-debian")
8173 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 8174 (version "0.1.36")
44d10b1f
RW
8175 (source
8176 (origin
9f74bd31
VC
8177 ;; Use git-fetch, as pypi doesn't include test suite.
8178 (method git-fetch)
8179 (uri (git-reference
8180 (url home-page)
8181 (commit version)))
8182 (file-name (git-file-name name version))
44d10b1f
RW
8183 (sha256
8184 (base32
9f74bd31 8185 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 8186 (build-system python-build-system)
9f74bd31
VC
8187 (arguments
8188 `(#:phases (modify-phases %standard-phases
8189 (add-after 'unpack 'remove-debian-specific-tests
8190 ;; python-apt, apt and dpkg are not yet available in guix,
8191 ;; and these tests heavily depend on them.
8192 (lambda _
8193 (delete-file "lib/debian/tests/test_deb822.py")
8194 (delete-file "lib/debian/tests/test_debfile.py")
8195 #t)))))
44d10b1f 8196 (propagated-inputs
9f74bd31
VC
8197 `(("python-six" ,python-six)
8198 ("python-chardet" ,python-chardet)))
44d10b1f
RW
8199 (synopsis "Debian package related modules")
8200 (description
8201 ;; XXX: Use @enumerate instead of @itemize to work around
8202 ;; <http://bugs.gnu.org/21772>.
8203 "This package provides Python modules that abstract many formats of
8204Debian-related files, such as:
8205
8206@enumerate
8207@item Debtags information;
8208@item @file{debian/changelog} files;
8209@item packages files, pdiffs;
8210@item control files of single or multiple RFC822-style paragraphs---e.g.
8211 @file{debian/control}, @file{.changes}, @file{.dsc};
8212@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8213 contained files and meta-information.
8214@end enumerate\n")
8215
8216 ;; Modules are either GPLv2+ or GPLv3+.
8217 (license license:gpl3+)))
8218
44d10b1f
RW
8219(define-public python-nbformat
8220 (package
8221 (name "python-nbformat")
8222 (version "4.4.0")
8223 (source
8224 (origin
8225 (method url-fetch)
8226 (uri (pypi-uri "nbformat" version))
8227 (sha256
8228 (base32
8229 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
8230 (build-system python-build-system)
8231 (arguments `(#:tests? #f)) ; no test target
8232 (propagated-inputs
8233 `(("python-ipython-genutils" ,python-ipython-genutils)
8234 ("python-jsonschema" ,python-jsonschema)
8235 ("python-jupyter-core" ,python-jupyter-core)
8236 ("python-traitlets" ,python-traitlets)))
8237 (home-page "http://jupyter.org")
8238 (synopsis "Jupyter Notebook format")
8239 (description "This package provides the reference implementation of the
8240Jupyter Notebook format and Python APIs for working with notebooks.")
8241 (license license:bsd-3)))
8242
8243(define-public python2-nbformat
8244 (package-with-python2 python-nbformat))
8245
8246(define-public python-bleach
8247 (package
8248 (name "python-bleach")
e64ea843 8249 (version "3.1.3")
44d10b1f
RW
8250 (source
8251 (origin
8252 (method url-fetch)
8253 (uri (pypi-uri "bleach" version))
8254 (sha256
8255 (base32
e64ea843 8256 "0al437aw4p2xp83az5hhlrp913nsf0cg6kg4qj3fjhv4wakxipzq"))))
44d10b1f
RW
8257 (build-system python-build-system)
8258 (propagated-inputs
ff0efc8f 8259 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
8260 ("python-six" ,python-six)))
8261 (native-inputs
e64ea843
EF
8262 `(("python-datrie" ,python-datrie)
8263 ("python-genshi" ,python-genshi)
8264 ("python-lxml" ,python-lxml)
8265 ("python-pytest" ,python-pytest)))
8266 (home-page "https://github.com/mozilla/bleach")
44d10b1f
RW
8267 (synopsis "Whitelist-based HTML-sanitizing tool")
8268 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8269 (license license:asl2.0)))
8270
8271(define-public python2-bleach
8272 (package-with-python2 python-bleach))
8273
8274(define-public python-entrypoints
8275 (package
8276 (name "python-entrypoints")
a7f1b718 8277 (version "0.3")
44d10b1f
RW
8278 (source
8279 (origin
8280 (method url-fetch)
a7f1b718 8281 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
8282 (sha256
8283 (base32
a7f1b718 8284 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
8285 (build-system python-build-system)
8286 ;; The package does not come with a setup.py file, so we have to generate
8287 ;; one ourselves.
8288 (arguments
8289 `(#:tests? #f
8290 #:phases
8291 (modify-phases %standard-phases
8292 (add-after 'unpack 'create-setup.py
8293 (lambda _
8294 (call-with-output-file "setup.py"
8295 (lambda (port)
8296 (format port "\
8297from setuptools import setup
8298setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8299" ,version))))))))
8300 (home-page "https://github.com/takluyver/entrypoints")
8301 (synopsis "Discover and load entry points from installed Python packages")
8302 (description "Entry points are a way for Python packages to advertise
8303objects with some common interface. The most common examples are
8304@code{console_scripts} entry points, which define shell commands by
8305identifying a Python function to run. The @code{entrypoints} module contains
8306functions to find and load entry points.")
8307 (license license:expat)))
8308
8309(define-public python2-entrypoints
8310 (package-with-python2 python-entrypoints))
8311
8312(define-public python-nbconvert
8313 (package
8314 (name "python-nbconvert")
8315 (version "5.0.0b1")
8316 (source
8317 (origin
8318 (method url-fetch)
8319 (uri (pypi-uri "nbconvert" version))
8320 (sha256
8321 (base32
8322 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8323 (build-system python-build-system)
8324 (arguments
8325 `(;; The "bdist_egg" target is disabled by default, causing the installation
8326 ;; to fail.
8327 #:configure-flags (list "bdist_egg")
8328 ;; FIXME: 5 failures, 40 errors.
8329 #:tests? #f))
8330 ;; #:phases
8331 ;; (modify-phases %standard-phases
8332 ;; (replace 'check
8333 ;; (lambda _
8334 ;; (zero? (system* "py.test" "-v")))))
8335 (native-inputs
8336 `(("python-pytest" ,python-pytest)))
8337 (propagated-inputs
8338 `(("python-bleach" ,python-bleach)
8339 ("python-entrypoints" ,python-entrypoints)
8340 ("python-jinja2" ,python-jinja2)
8341 ("python-jupyter-core" ,python-jupyter-core)
8342 ("python-mistune" ,python-mistune)
8343 ("python-nbformat" ,python-nbformat)
8344 ("python-pygments" ,python-pygments)
8345 ("python-traitlets" ,python-traitlets)))
8346 (home-page "http://jupyter.org")
8347 (synopsis "Converting Jupyter Notebooks")
8348 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8349notebooks to various other formats via Jinja templates. It allows you to
8350convert an @code{.ipynb} notebook file into various static formats including:
8351
8352@enumerate
8353@item HTML
8354@item LaTeX
8355@item PDF
8356@item Reveal JS
8357@item Markdown (md)
8358@item ReStructured Text (rst)
8359@item executable script
8360@end enumerate\n")
8361 (license license:bsd-3)))
8362
8363(define-public python2-nbconvert
8364 (package-with-python2 python-nbconvert))
8365
44d10b1f
RW
8366(define-public python-notebook
8367 (package
8368 (name "python-notebook")
8369 (version "5.7.4")
8370 (source (origin
8371 (method url-fetch)
8372 (uri (pypi-uri "notebook" version))
8373 (sha256
8374 (base32
8375 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
8376 (build-system python-build-system)
8377 (arguments
8378 `(#:phases
8379 (modify-phases %standard-phases
8380 (replace 'check
8381 (lambda _
8382 ;; These tests require a browser
8383 (delete-file-recursively "notebook/tests/selenium")
8384 ;; Some tests need HOME
8385 (setenv "HOME" "/tmp")
8386 ;; This file contains "warningfilters", which are not supported
8387 ;; by this version of nose.
8388 (delete-file "setup.cfg")
8389 (with-directory-excursion "/tmp"
8390 (invoke "nosetests" "-v"))
8391 #t)))))
8392 (propagated-inputs
8393 `(("python-jupyter-core" ,python-jupyter-core)
8394 ("python-nbformat" ,python-nbformat)
8395 ("python-nbconvert" ,python-nbconvert)
8396 ("python-prometheus-client" ,python-prometheus-client)
8397 ("python-send2trash" ,python-send2trash)
8398 ("python-terminado" ,python-terminado)))
8399 (native-inputs
8400 `(("python-nose" ,python-nose)
8401 ("python-sphinx" ,python-sphinx)
8402 ("python-requests" ,python-requests)))
8403 (home-page "http://jupyter.org/")
8404 (synopsis "Web-based notebook environment for interactive computing")
8405 (description
8406 "The Jupyter HTML notebook is a web-based notebook environment for
8407interactive computing.")
8408 (properties `((python2-variant . ,(delay python2-notebook))))
8409 (license license:bsd-3)))
8410
8411(define-public python2-notebook
8412 (let ((base (package-with-python2
8413 (strip-python2-variant python-notebook))))
8414 (package (inherit base)
8415 (native-inputs
8416 `(("python2-mock" ,python2-mock)
8417 ,@(package-native-inputs base)))
8418 (arguments
8419 (substitute-keyword-arguments (package-arguments base)
8420 ((#:phases phases)
8421 `(modify-phases ,phases
8422 (add-before 'check 'disable-test-case
8423 ;; The test requires network access to localhost. Curiously it
8424 ;; fails with Python 2 only. Simply make the test-case return
8425 ;; immediately.
8426 (lambda _
8427 (substitute*
8428 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8429 (("formats = self.nbconvert_api") "return #")))))))))))
8430
8431(define-public python-widgetsnbextension
8432 (package
8433 (name "python-widgetsnbextension")
8434 (version "3.4.2")
8435 (source
8436 (origin
8437 (method url-fetch)
8438 (uri (pypi-uri "widgetsnbextension" version))
8439 (sha256
8440 (base32
8441 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
8442 (build-system python-build-system)
8443 (propagated-inputs
8444 `(("python-ipykernel" ,python-ipykernel)
8445 ("python-notebook" ,python-notebook)))
8446 (native-inputs
8447 `(("python-certifi" ,python-certifi)
8448 ("python-nose" ,python-nose)))
8449 (home-page "https://ipython.org")
8450 (synopsis "IPython HTML widgets for Jupyter")
8451 (description "This package provides interactive HTML widgets for Jupyter
8452notebooks.")
8453 (license license:bsd-3)))
8454
8455(define-public python2-widgetsnbextension
8456 (package-with-python2 python-widgetsnbextension))
8457
8458(define-public python-ipywidgets
8459 (package
8460 (name "python-ipywidgets")
8461 (version "5.2.2")
8462 (source
8463 (origin
8464 (method url-fetch)
8465 (uri (pypi-uri "ipywidgets" version))
8466 (sha256
8467 (base32
8468 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8469 (build-system python-build-system)
8470 (propagated-inputs
8471 `(("python-ipython" ,python-ipython)
8472 ("python-traitlets" ,python-traitlets)
8473 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8474 (native-inputs
8475 `(("python-nose" ,python-nose)
8476 ("python-pytest" ,python-pytest)))
8477 (home-page "https://ipython.org")
8478 (synopsis "IPython HTML widgets for Jupyter")
8479 (description "Ipywidgets are interactive HTML widgets for Jupyter
8480notebooks and the IPython kernel. Notebooks come alive when interactive
8481widgets are used. Users gain control of their data and can visualize changes
8482in the data.")
8483 (license license:bsd-3)))
8484
8485(define-public python2-ipywidgets
8486 (package-with-python2 python-ipywidgets))
8487
8488(define-public python-jupyter-console
8489 (package
8490 (name "python-jupyter-console")
becb9cbf 8491 (version "6.0.0")
44d10b1f
RW
8492 (source
8493 (origin
8494 (method url-fetch)
8495 (uri (pypi-uri "jupyter_console" version))
8496 (sha256
8497 (base32
becb9cbf 8498 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 8499 (build-system python-build-system)
44d10b1f
RW
8500 (propagated-inputs
8501 `(("python-ipykernel" ,python-ipykernel)
8502 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 8503 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
8504 ("python-pygments" ,python-pygments)))
8505 (native-inputs
8506 `(("python-nose" ,python-nose)))
8507 (home-page "https://jupyter.org")
8508 (synopsis "Jupyter terminal console")
8509 (description "This package provides a terminal-based console frontend for
8510Jupyter kernels. It also allows for console-based interaction with non-Python
8511Jupyter kernels such as IJulia and IRKernel.")
e8588a78 8512 (properties `((python2-variant . ,(delay python2-jupyter-console))))
44d10b1f
RW
8513 (license license:bsd-3)))
8514
8515(define-public python2-jupyter-console
8e590c81
RW
8516 (package
8517 (name "python2-jupyter-console")
8518 (version "5.2.0")
8519 (source
8520 (origin
8521 (method url-fetch)
8522 (uri (pypi-uri "jupyter_console" version))
8523 (sha256
8524 (base32
8525 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8526 (build-system python-build-system)
b0aa58d8
EF
8527 (arguments
8528 `(#:python ,python-2
8529 #:tests? #f)) ; Tests only run in a TTY.
8e590c81
RW
8530 (propagated-inputs
8531 `(("python2-ipykernel" ,python2-ipykernel)
8532 ("python2-jupyter-client" ,python2-jupyter-client)
8533 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8534 ("python2-pygments" ,python2-pygments)))
8535 (native-inputs
8536 `(("python2-nose" ,python2-nose)))
8537 (home-page "https://jupyter.org")
8538 (synopsis "Jupyter terminal console")
8539 (description "This package provides a terminal-based console frontend for
8540Jupyter kernels. It also allows for console-based interaction with non-Python
8541Jupyter kernels such as IJulia and IRKernel.")
8542 (license license:bsd-3)))
44d10b1f
RW
8543
8544;; The python-ipython and python-jupyter-console require each other. To get
8545;; the functionality in both packages working, strip down the
8546;; python-jupyter-console package when using it as an input to python-ipython.
8547(define python-jupyter-console-minimal
8548 (package
8549 (inherit python-jupyter-console)
8550 (name "python-jupyter-console-minimal")
8551 (arguments
8552 (substitute-keyword-arguments
8553 (package-arguments python-jupyter-console)
8554 ((#:phases phases)
8555 `(modify-phases ,phases
8556 (add-after 'install 'delete-bin
8557 (lambda* (#:key outputs #:allow-other-keys)
8558 ;; Delete the bin files, to avoid conflicts in profiles
8559 ;; where python-ipython and python-jupyter-console are
8560 ;; both present.
8561 (delete-file-recursively
8562 (string-append
8563 (assoc-ref outputs "out") "/bin"))))))))
8564 ;; Remove the python-ipython propagated input, to avoid the cycle
8565 (propagated-inputs
8566 (alist-delete
8567 "python-ipython"
8568 (package-propagated-inputs python-jupyter-console)))))
8569
8570(define-public python-qtconsole
8571 (package
8572 (name "python-qtconsole")
8573 (version "4.4.3")
8574 (source
8575 (origin
8576 (method url-fetch)
8577 (uri (pypi-uri "qtconsole" version))
8578 (sha256
8579 (base32
8580 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8581 (build-system python-build-system)
8582 (arguments
8583 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8584 ;; but we only have the LTS version 5.x. This means that there might be
8585 ;; runtime errors, but since this is a dependency of the Jupyter package,
8586 ;; and Jupyter can be used without the qtconsole we can overlook this for
8587 ;; now.
8588 `(#:tests? #f
8589 #:phases
8590 (modify-phases %standard-phases
8591 (add-before 'check 'pre-check
8592 (lambda _
8593 (setenv "QT_QPA_PLATFORM" "offscreen")
8594 #t)))))
8595 (propagated-inputs
8596 `(("python-ipykernel" ,python-ipykernel)
8597 ("python-ipython" ,python-ipython)))
8598 (native-inputs
8599 `(("python-pytest" ,python-pytest)))
8600 (home-page "http://jupyter.org")
8601 (synopsis "Jupyter Qt console")
8602 (description "This package provides a Qt-based console for Jupyter with
8603support for rich media output.")
8604 (license license:bsd-3)))
8605
6ec87223
VC
8606(define-public python-jsbeautifier
8607 (package
8608 (name "python-jsbeautifier")
8609 (version "1.10.2")
8610 (home-page "https://github.com/beautify-web/js-beautify")
8611 (source (origin
8612 (method git-fetch)
8613 (uri (git-reference
8614 (url home-page)
8615 (commit (string-append "v" version))))
8616 (file-name (git-file-name name version))
8617 (sha256
8618 (base32
8619 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8620 (build-system python-build-system)
8621 (arguments
8622 `(#:phases (modify-phases %standard-phases
8623 (add-after 'unpack 'chdir
8624 (lambda _
8625 ;; The upstream Git repository contains all the code,
8626 ;; but this package only builds the python code.
8627 (chdir "python")
8628 #t))
8629 (add-after 'unpack 'patch-python-six-requirements
8630 (lambda _
8631 (substitute* "python/setup.py"
8632 (("six>=1.12.0")
8633 "six>=1.11.0"))
8634 #t)))))
8635 (propagated-inputs
8636 `(("python-editorconfig" ,python-editorconfig)
8637 ("python-six" ,python-six)))
8638 (native-inputs
8639 `(("python-pytest" ,python-pytest)))
8640 (synopsis "JavaScript unobfuscator and beautifier")
8641 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8642popular online obfuscators.")
8643 (license license:expat)))
8644
44d10b1f
RW
8645(define-public jupyter
8646 (package
8647 (name "jupyter")
8648 (version "1.0.0")
8649 (source
8650 (origin
8651 (method url-fetch)
8652 (uri (pypi-uri "jupyter" version))
8653 (sha256
8654 (base32
8655 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8656 (build-system python-build-system)
8657 (arguments '(#:tests? #f)) ; there are none.
8658 (propagated-inputs
8659 `(("python-ipykernel" ,python-ipykernel)
8660 ("python-ipywidgets" ,python-ipywidgets)
8661 ("python-jupyter-console" ,python-jupyter-console)
8662 ("python-nbconvert" ,python-nbconvert)
8663 ("python-notebook" ,python-notebook)
8664 ("python-qtconsole" ,python-qtconsole)))
8665 (native-search-paths
8666 (list (search-path-specification
8667 (variable "JUPYTER_PATH")
8668 (files '("share/jupyter")))))
8669 (home-page "https://jupyter.org")
8670 (synopsis "Web application for interactive documents")
8671 (description
8672 "The Jupyter Notebook is a web application that allows you to create and
8673share documents that contain live code, equations, visualizations and
8674explanatory text. Uses include: data cleaning and transformation, numerical
8675simulation, statistical modeling, machine learning and much more.")
8676 (license license:bsd-3)))
8677
8678(define-public python-chardet
8679 (package
8680 (name "python-chardet")
8681 (version "3.0.4")
8682 (source
8683 (origin
8684 (method url-fetch)
8685 (uri (pypi-uri "chardet" version))
8686 (sha256
8687 (base32
8688 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8689 (native-inputs
8690 `(("python-hypothesis" ,python-hypothesis)
8691 ("python-pytest" ,python-pytest)
8692 ("python-pytest-runner" ,python-pytest-runner)))
8693 (build-system python-build-system)
3d369407
MB
8694 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8695 (arguments `(#:tests? #f))
44d10b1f
RW
8696 (home-page "https://github.com/chardet/chardet")
8697 (synopsis "Universal encoding detector for Python 2 and 3")
8698 (description
8699 "This package provides @code{chardet}, a Python module that can
8700automatically detect a wide range of file encodings.")
8701 (license license:lgpl2.1+)))
8702
8703(define-public python2-chardet
8704 (package-with-python2 python-chardet))
8705
8706(define-public python-docopt
8707 (package
8708 (name "python-docopt")
8709 (version "0.6.2")
8710 (source
8711 (origin
11e46326 8712 (method git-fetch)
44d10b1f 8713 ;; The release on PyPI does not include tests.
11e46326
EF
8714 (uri (git-reference
8715 (url "https://github.com/docopt/docopt")
8716 (commit version)))
8717 (file-name (git-file-name name version))
44d10b1f
RW
8718 (sha256
8719 (base32
11e46326 8720 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
44d10b1f
RW
8721 (build-system python-build-system)
8722 (native-inputs
8723 `(("python-pytest" ,python-pytest)))
8724 (arguments
8725 `(#:phases
8726 (modify-phases %standard-phases
8727 (replace 'check
8728 (lambda _ (invoke "py.test"))))))
8729 (home-page "http://docopt.org")
8730 (synopsis "Command-line interface description language for Python")
8731 (description "This library allows the user to define a command-line
8732interface from a program's help message rather than specifying it
4ca7207b 8733programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8734@code{argparse}.")
8735 (license license:expat)))
8736
8737(define-public python2-docopt
8738 (package-with-python2 python-docopt))
8739
8740(define-public python-pythondialog
8741 (package
8742 (name "python-pythondialog")
8743 (version "3.4.0")
8744 (source
8745 (origin
8746 (method url-fetch)
8747 (uri (pypi-uri "pythondialog" version))
8748 (sha256
8749 (base32
8750 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8751 (build-system python-build-system)
8752 (arguments
8753 `(#:phases
8754 (modify-phases %standard-phases
8755 (add-after 'unpack 'patch-path
8756 (lambda* (#:key inputs #:allow-other-keys)
8757 (let* ((dialog (assoc-ref inputs "dialog")))
8758 ;; Since this library really wants to grovel the search path, we
8759 ;; must hardcode dialog's store path into it.
8760 (substitute* "dialog.py"
8761 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8762 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8763 #t))))
8764 #:tests? #f)) ; no test suite
8765 (propagated-inputs
8766 `(("dialog" ,dialog)))
8767 (home-page "http://pythondialog.sourceforge.net/")
8768 (synopsis "Python interface to the UNIX dialog utility")
8769 (description "A Python wrapper for the dialog utility. Its purpose is to
8770provide an easy to use, pythonic and comprehensive Python interface to dialog.
8771This allows one to make simple text-mode user interfaces on Unix-like systems")
8772 (license license:lgpl2.1)
8773 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8774
8775(define-public python2-pythondialog
8776 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8777 (package
8778 (inherit base)
8779 (version (package-version python-pythondialog))
8780 (source (origin
8781 (method url-fetch)
8782 (uri (pypi-uri "python2-pythondialog" version))
8783 (sha256
8784 (base32
8785 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8786
8787(define-public python-configobj
8788 (package
8789 (name "python-configobj")
8790 (version "5.0.6")
8791 (source (origin
8792 (method url-fetch)
b0758fbb 8793 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8794 (sha256
8795 (base32
8796 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8797 ;; Patch setup.py so it looks for python-setuptools, which is
8798 ;; required to parse the keyword 'install_requires' in setup.py.
8799 (patches (search-patches "python-configobj-setuptools.patch"))))
8800 (build-system python-build-system)
8801 (propagated-inputs
8802 `(("python-six" ,python-six)))
8803 (synopsis "Config file reading, writing and validation")
8804 (description "ConfigObj is a simple but powerful config file reader and
8805writer: an ini file round tripper. Its main feature is that it is very easy to
8806use, with a straightforward programmer’s interface and a simple syntax for
8807config files.")
8808 (home-page "https://github.com/DiffSK/configobj")
8809 (license license:bsd-3)))
8810
8811(define-public python2-configobj
8812 (package-with-python2 python-configobj))
8813
8814(define-public python-configargparse
8815 (package
8816 (name "python-configargparse")
86ae491f 8817 (version "0.14.0")
44d10b1f
RW
8818 (source (origin
8819 (method url-fetch)
8820 (uri (pypi-uri "ConfigArgParse" version))
8821 (sha256
8822 (base32
86ae491f 8823 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8824 (build-system python-build-system)
8825 (native-inputs
8826 `(("python-pyyaml" ,python-pyyaml)))
8827 (arguments
8828 `(#:phases
8829 (modify-phases %standard-phases
8830 (replace 'check
8831 (lambda _
8832 ;; Bypass setuptools-shim because one test relies on "setup.py"
8833 ;; being the first argument passed to the python call.
8834 ;;
8835 ;; NOTE: Many tests do not run because they rely on Python's
8836 ;; built-in test.test_argparse, but we remove the unit tests from
8837 ;; our Python installation.
8838 (invoke "python" "setup.py" "test"))))))
8839 (synopsis "Replacement for argparse")
8840 (description "A drop-in replacement for argparse that allows options to also
8841be set via config files and/or environment variables.")
8842 (home-page "https://github.com/bw2/ConfigArgParse")
8843 (license license:expat)))
8844
8845(define-public python2-configargparse
8846 (package-with-python2 python-configargparse))
8847
8848(define-public python-argparse-manpage
8849 (package
8850 (name "python-argparse-manpage")
8851 (version "1.1")
8852 (source
8853 (origin
8854 (method url-fetch)
8855 (uri (pypi-uri "argparse-manpage" version))
8856 (sha256
8857 (base32
8858 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8859 (build-system python-build-system)
8860 (home-page "https://github.com/praiskup/argparse-manpage")
8861 (synopsis "Build manual page from Python's ArgumentParser object")
8862 (description
8863 "This package provides tools to build manual pages from Python's
8864@code{ArgumentParser} object.")
8865 (license license:asl2.0)))
8866
3e8f76d8
RW
8867(define-public python-contextlib2
8868 (package
8869 (name "python-contextlib2")
ebd4c251 8870 (version "0.6.0.post1")
3e8f76d8
RW
8871 (source
8872 (origin
8873 (method url-fetch)
8874 (uri (pypi-uri "contextlib2" version))
8875 (sha256
8876 (base32
ebd4c251 8877 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
3e8f76d8 8878 (build-system python-build-system)
a0fdade2 8879 (home-page "https://contextlib2.readthedocs.org/")
3e8f76d8
RW
8880 (synopsis "Tools for decorators and context managers")
8881 (description "This module is primarily a backport of the Python
88823.2 contextlib to earlier Python versions. Like contextlib, it
8883provides utilities for common tasks involving decorators and context
8884managers. It also contains additional features that are not part of
8885the standard library.")
1e158ba1 8886 (properties `((python2-variant . ,(delay python2-contextlib2))))
3e8f76d8
RW
8887 (license license:psfl)))
8888
44d10b1f 8889(define-public python2-contextlib2
1e158ba1
EF
8890 (let ((base (package-with-python2
8891 (strip-python2-variant python-contextlib2))))
8892 (package
8893 (inherit base)
8894 (arguments
8895 (substitute-keyword-arguments (package-arguments base)
8896 ((#:phases phases)
8897 `(modify-phases ,phases
8898 (replace 'check
8899 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8900 (native-inputs
8901 `(("python2-unittest2" ,python2-unittest2))))))
44d10b1f
RW
8902
8903(define-public python-texttable
8904 (package
8905 (name "python-texttable")
02422b3b 8906 (version "1.6.2")
44d10b1f
RW
8907 (source
8908 (origin
8909 (method url-fetch)
8910 (uri (pypi-uri "texttable" version))
8911 (sha256
8912 (base32
02422b3b 8913 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
44d10b1f 8914 (build-system python-build-system)
02422b3b
RW
8915 (arguments
8916 `(#:phases
8917 (modify-phases %standard-phases
8918 (replace 'check
8919 (lambda _ (invoke "pytest" "tests.py"))))))
8920 (native-inputs
8921 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
8922 (home-page "https://github.com/foutaise/texttable/")
8923 (synopsis "Python module for creating simple ASCII tables")
8924 (description "Texttable is a Python module for creating simple ASCII
8925tables.")
02422b3b 8926 (license license:expat)))
44d10b1f
RW
8927
8928(define-public python2-texttable
8929 (package-with-python2 python-texttable))
8930
8931(define-public python-atomicwrites
8932 (package
8933 (name "python-atomicwrites")
14f10479 8934 (version "1.3.0")
44d10b1f
RW
8935 (source (origin
8936 (method url-fetch)
8937 (uri (pypi-uri "atomicwrites" version))
8938 (sha256
8939 (base32
14f10479 8940 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8941 (build-system python-build-system)
8942 (synopsis "Atomic file writes in Python")
8943 (description "Library for atomic file writes using platform dependent tools
8944for atomic file system operations.")
8945 (home-page "https://github.com/untitaker/python-atomicwrites")
8946 (license license:expat)))
8947
8948(define-public python2-atomicwrites
8949 (package-with-python2 python-atomicwrites))
8950
8951(define-public python-click-threading
8952 (package
8953 (name "python-click-threading")
8954 (version "0.4.4")
8955 (source (origin
8956 (method url-fetch)
8957 (uri (pypi-uri "click-threading" version))
8958 (sha256
8959 (base32
8960 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8961 (build-system python-build-system)
8962 (propagated-inputs
8963 `(("python-click" ,python-click)))
8964 (synopsis "Utilities for multithreading in Click")
8965 (description "This package provides utilities for multithreading in Click
8966applications.")
8967 (home-page "https://github.com/click-contrib/click-threading")
8968 (license license:expat)))
8969
8970(define-public python-click-log
8971 (package
8972 (name "python-click-log")
8973 (version "0.3.2")
8974 (source (origin
8975 (method url-fetch)
8976 (uri (pypi-uri "click-log" version))
8977 (sha256
8978 (base32
8979 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8980 (build-system python-build-system)
8981 (propagated-inputs
8982 `(("python-click" ,python-click)))
8983 (synopsis "Logging for click applications")
8984 (description "This package provides a Python library for logging Click
8985applications.")
8986 (home-page "https://github.com/click-contrib/click-log")
8987 (license license:expat)))
8988
8989(define-public python-apipkg
8990 (package
8991 (name "python-apipkg")
8992 (version "1.4")
8993 (source (origin
8994 (method url-fetch)
8995 (uri (pypi-uri "apipkg" version))
8996 (sha256
8997 (base32
8998 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8999 (build-system python-build-system)
9000 (native-inputs
9001 `(("python-pytest" ,python-pytest)))
9002 (synopsis "Namespace control and lazy-import mechanism")
9003 (description "With apipkg you can control the exported namespace of a Python
9004package and greatly reduce the number of imports for your users. It is a small
9005pure Python module that works on virtually all Python versions.")
9006 (home-page "https://github.com/pytest-dev/apipkg")
9007 (license license:expat)))
9008
9009(define-public python2-apipkg
9010 (package-with-python2 python-apipkg))
9011
9012(define-public python-execnet
9013 (package
9014 (name "python-execnet")
9015 (version "1.4.1")
9016 (source (origin
9017 (method url-fetch)
9018 (uri (pypi-uri "execnet" version))
9019 (sha256
9020 (base32
9021 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
9022 (build-system python-build-system)
9023 (arguments
9024 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
9025 ;; The two test failures are caused by the lack of an `ssh` executable.
9026 ;; The test suite can be run with pytest after the 'install' phase.
9027 #:tests? #f))
9028 (native-inputs
9029 `(("python-pytest" ,python-pytest)
9030 ("python-setuptools-scm" ,python-setuptools-scm)))
9031 (propagated-inputs
9032 `(("python-apipkg" ,python-apipkg)))
9033 (synopsis "Rapid multi-Python deployment")
9034 (description "Execnet provides a share-nothing model with
9035channel-send/receive communication for distributing execution across many
9036Python interpreters across version, platform and network barriers. It has a
9037minimal and fast API targeting the following uses:
9038@enumerate
9039@item distribute tasks to (many) local or remote CPUs
9040@item write and deploy hybrid multi-process applications
9041@item write scripts to administer multiple environments
9042@end enumerate")
14a5146f 9043 (home-page "https://codespeak.net/execnet/")
44d10b1f
RW
9044 (license license:expat)))
9045
9046(define-public python2-execnet
9047 (package-with-python2 python-execnet))
9048
9049(define-public python-icalendar
9050 (package
9051 (name "python-icalendar")
43ae8f79 9052 (version "4.0.4")
44d10b1f
RW
9053 (source (origin
9054 (method url-fetch)
9055 (uri (pypi-uri "icalendar" version))
9056 (sha256
9057 (base32
43ae8f79 9058 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
44d10b1f
RW
9059 (build-system python-build-system)
9060 (propagated-inputs
9061 `(("python-dateutil" ,python-dateutil)
9062 ("python-pytz" ,python-pytz)))
9063 (synopsis "Python library for parsing iCalendar files")
9064 (description "The icalendar package is a parser/generator of iCalendar
9065files for use with Python.")
9066 (home-page "https://github.com/collective/icalendar")
9067 (license license:bsd-2)))
9068
44d10b1f
RW
9069(define-public python-args
9070 (package
9071 (name "python-args")
9072 (version "0.1.0")
9073 (source (origin
9074 (method url-fetch)
9075 (uri (pypi-uri "args" version))
9076 (sha256
9077 (base32
9078 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9079 (build-system python-build-system)
9080 (home-page "https://github.com/kennethreitz/args")
9081 (synopsis "Command-line argument parser")
9082 (description
9083 "This library provides a Python module to parse command-line arguments.")
9084 (license license:bsd-3)))
9085
9086(define-public python2-args
9087 (package-with-python2 python-args))
9088
9089(define-public python-clint
9090 (package
9091 (name "python-clint")
9092 (version "0.5.1")
9093 (source (origin
9094 (method url-fetch)
9095 (uri (pypi-uri "clint" version))
9096 (sha256
9097 (base32
9098 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9099 (build-system python-build-system)
9100 (arguments
9101 '(#:phases
9102 (modify-phases %standard-phases
9103 (replace 'check
9104 (lambda _ (invoke "py.test" "-v"))))))
9105 (native-inputs
9106 `(("python-pytest" ,python-pytest)))
9107 (propagated-inputs
9108 `(("python-args" ,python-args)))
9109 (home-page "https://github.com/kennethreitz/clint")
9110 (synopsis "Command-line interface tools")
9111 (description
9112 "Clint is a Python module filled with a set of tools for developing
9113command-line applications, including tools for colored and indented
9114output, progress bar display, and pipes.")
9115 (license license:isc)))
9116
9117(define-public python2-clint
9118 (package-with-python2 python-clint))
9119
44d10b1f
RW
9120(define-public python-rply
9121 (package
9122 (name "python-rply")
9123 (version "0.7.5")
9124 (source (origin
9125 (method url-fetch)
9126 (uri (pypi-uri "rply" version))
9127 (sha256
9128 (base32
9129 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
9130 (build-system python-build-system)
9131 (propagated-inputs
9132 `(("python-appdirs" ,python-appdirs)))
9133 (home-page "https://github.com/alex/rply")
9134 (synopsis "Parser generator for Python")
9135 (description
9136 "This package provides a pure Python based parser generator, that also
9137works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9138with a new public API, and RPython support.")
9139 (license license:bsd-3)))
9140
9141(define-public python2-rply
9142 (package-with-python2 python-rply))
9143
9144(define-public python-hy
9145 (package
9146 (name "python-hy")
c215051d 9147 (version "0.17.0")
44d10b1f
RW
9148 (source (origin
9149 (method url-fetch)
9150 (uri (pypi-uri "hy" version))
9151 (sha256
9152 (base32
c215051d 9153 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
44d10b1f
RW
9154 (build-system python-build-system)
9155 (arguments
9156 '(#:phases
9157 (modify-phases %standard-phases
6ba6a1c1
JG
9158 (add-before 'install 'set-HOME
9159 (lambda _
9160 (setenv "HOME" "/tmp")))
44d10b1f
RW
9161 (replace 'check
9162 (lambda _
9163 ;; Tests require write access to HOME.
9164 (setenv "HOME" "/tmp")
9165 (invoke "nosetests"))))))
9166 (native-inputs
9167 `(("python-coverage" ,python-coverage)
9168 ("python-nose" ,python-nose)))
9169 (propagated-inputs
9170 `(("python-astor" ,python-astor)
9171 ("python-clint" ,python-clint)
c215051d
JG
9172 ("python-rply" ,python-rply)
9173 ("python-fastentrypoints"
9174 ,python-fastentrypoints)
9175 ("python-funcparserlib"
9176 ,python-funcparserlib)))
44d10b1f
RW
9177 (home-page "http://hylang.org/")
9178 (synopsis "Lisp frontend to Python")
9179 (description
9180 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9181its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9182Python at your fingertips, in Lisp form.")
9183 (license license:expat)))
9184
9185(define-public python2-hy
9186 (package-with-python2 python-hy))
9187
9188(define-public python2-functools32
9189 (package
9190 (name "python2-functools32")
9191 (version "3.2.3-2")
9192 (source
9193 (origin
9194 (method url-fetch)
9195 (uri (pypi-uri "functools32" version))
9196 (sha256
9197 (base32
9198 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9199 (build-system python-build-system)
9200 (arguments
9201 `(#:python ,python-2
9202 #:tests? #f)) ; no test target
9203 (home-page "https://github.com/MiCHiLU/python-functools32")
9204 (synopsis
9205 "Backport of the functools module from Python 3.2.3")
9206 (description
9207 "This package is a backport of the @code{functools} module from Python
92083.2.3 for use with older versions of Python and PyPy.")
9209 (license license:expat)))
9210
9211(define-public python2-subprocess32
9212 (package
9213 (name "python2-subprocess32")
9214 (version "3.2.7")
9215 (source (origin
9216 (method url-fetch)
9217 (uri (pypi-uri "subprocess32" version))
9218 (sha256
9219 (base32
9220 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9221 (patches
9222 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9223 (build-system python-build-system)
9224 (arguments
9225 `(#:python ,python-2
9226 ;; The test suite fails with Python > 2.7.13:
9227 ;; import test.support
9228 ;; ImportError: No module named support
9229 #:tests? #f
9230 #:phases
9231 (modify-phases %standard-phases
9232 (add-after 'unpack 'patch-/bin/sh
9233 (lambda _
9234 (substitute* '("subprocess32.py"
9235 "test_subprocess32.py")
9236 (("/bin/sh") (which "sh")))
9237 #t)))))
9238 (home-page "https://github.com/google/python-subprocess32")
9239 (synopsis "Backport of the subprocess module from Python 3.2")
9240 (description
9241 "This is a backport of the @code{subprocess} standard library module
9242from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9243new features. On POSIX systems it is guaranteed to be reliable when used
9244in threaded applications. It includes timeout support from Python 3.3 but
9245otherwise matches 3.2’s API.")
9246 (license license:psfl)))
9247
9248(define-public python2-futures
9249 (package
9250 (name "python2-futures")
9251 (version "3.2.0")
9252 (source
9253 (origin
9254 (method url-fetch)
9255 (uri (pypi-uri "futures" version))
9256 (sha256
9257 (base32
9258 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
9259 (build-system python-build-system)
ba88eea2
RW
9260 (arguments
9261 `(#:python ,python-2
9262 #:phases
9263 (modify-phases %standard-phases
9264 (replace 'check
9265 (lambda _
9266 (invoke "python" "test_futures.py")
9267 #t)))))
44d10b1f
RW
9268 (home-page "https://github.com/agronholm/pythonfutures")
9269 (synopsis
9270 "Backport of the concurrent.futures package from Python 3.2")
9271 (description
9272 "The concurrent.futures module provides a high-level interface for
9273asynchronously executing callables. This package backports the
9274concurrent.futures package from Python 3.2")
9275 (license license:bsd-3)))
9276
9277(define-public python-promise
9278 (package
9279 (name "python-promise")
9280 (version "0.4.2")
9281 (source
9282 (origin
9283 (method url-fetch)
9284 (uri (pypi-uri "promise" version))
9285 (sha256
9286 (base32
9287 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9288 (build-system python-build-system)
9289 ;; Tests wants python-futures, which is a python2 only program, and
9290 ;; can't be found by python-promise at test time.
9291 (arguments `(#:tests? #f))
9292 (home-page "https://github.com/syrusakbary/promise")
9293 (synopsis "Promises/A+ implementation for Python")
9294 (description
9295 "Promises/A+ implementation for Python")
9296 (properties `((python2-variant . ,(delay python2-promise))))
9297 (license license:expat)))
9298
9299(define-public python2-promise
9300 (let ((promise (package-with-python2
9301 (strip-python2-variant python-promise))))
9302 (package (inherit promise)
9303 (arguments (substitute-keyword-arguments (package-arguments promise)
9304 ((#:tests? _) #t)))
9305 (native-inputs
9306 `(("python2-futures" ,python2-futures)
9307 ("python2-pytest" ,python2-pytest)
9308 ,@(package-native-inputs promise))))))
9309
d71d85cd
RW
9310(define-public python-progressbar33
9311 (package
9312 (name "python-progressbar33")
9313 (version "2.4")
9314 (source
9315 (origin
9316 (method url-fetch)
9317 (uri (pypi-uri "progressbar33" version))
9318 (sha256
9319 (base32
9320 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
9321 (build-system python-build-system)
9322 (home-page "http://github.com/germangh/python-progressbar")
9323 (synopsis "Text progress bar library for Python")
9324 (description
9325 "This package provides a text progress bar library for Python. This
9326version only differs from the original @code{progressbar} package in that it
9327uses relative package imports instead of absolute imports, which is necessary
9328for the module to work under Python 3.3.")
9329 ;; Either or both of these licenses may be selected.
9330 (license (list license:lgpl2.1+ license:bsd-3))))
9331
44d10b1f
RW
9332(define-public python-colorama
9333 (package
9334 (name "python-colorama")
bd137055 9335 (version "0.4.3")
44d10b1f
RW
9336 (source
9337 (origin
9338 (method url-fetch)
9339 (uri (pypi-uri "colorama" version))
9340 (sha256
9341 (base32
bd137055 9342 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
44d10b1f
RW
9343 (build-system python-build-system)
9344 (synopsis "Colored terminal text rendering for Python")
9345 (description "Colorama is a Python library for rendering colored terminal
9346text.")
e85af137 9347 (home-page "https://pypi.org/project/colorama/")
44d10b1f
RW
9348 (license license:bsd-3)))
9349
9350(define-public python2-colorama
9351 (package-with-python2 python-colorama))
9352
9353(define-public python-rsa
9354 (package
9355 (name "python-rsa")
9356 (version "3.4.2")
9357 (source
9358 (origin
9359 (method url-fetch)
9360 (uri (pypi-uri "rsa" version))
9361 (sha256
9362 (base32
9363 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9364 (build-system python-build-system)
9365 (propagated-inputs
9366 `(("python-pyasn1" ,python-pyasn1)))
9367 (synopsis "Pure-Python RSA implementation")
9368 (description "Python-RSA is a pure-Python RSA implementation. It supports
9369encryption and decryption, signing and verifying signatures, and key
9370generation according to PKCS#1 version 1.5. It can be used as a Python
9371library as well as on the command line.")
9372 (home-page "https://stuvel.eu/rsa")
9373 (license license:asl2.0)))
9374
9375(define-public python2-rsa
9376 (package-with-python2 python-rsa))
9377
9378(define-public python-pluggy
9379 (package
9380 (name "python-pluggy")
e5731c03 9381 (version "0.11.0")
44d10b1f
RW
9382 (source
9383 (origin
9384 (method url-fetch)
9385 (uri (pypi-uri "pluggy" version))
9386 (sha256
9387 (base32
e5731c03 9388 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
9389 (build-system python-build-system)
9390 (native-inputs
9391 `(("python-setuptools-scm" ,python-setuptools-scm)))
9392 (synopsis "Plugin and hook calling mechanism for Python")
9393 (description "Pluggy is an extraction of the plugin manager as used by
9394Pytest but stripped of Pytest specific details.")
e85af137 9395 (home-page "https://pypi.org/project/pluggy/")
44d10b1f
RW
9396 (license license:expat)))
9397
9398(define-public python2-pluggy
9399 (package-with-python2 python-pluggy))
9400
9401(define-public python-tox
9402 (package
9403 (name "python-tox")
9404 (version "2.8.1")
9405 (source
9406 (origin
9407 (method url-fetch)
9408 (uri (pypi-uri "tox" version))
9409 (sha256
9410 (base32
9411 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
9412 (build-system python-build-system)
9413 (arguments
9414 ;; FIXME: Tests require pytest-timeout, which itself requires
9415 ;; pytest>=2.8.0 for installation.
9416 '(#:tests? #f))
9417 (propagated-inputs
9418 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9419 ("python-py" ,python-py)
9420 ("python-virtualenv" ,python-virtualenv)))
9421 (native-inputs
9422 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9423 ("python-pytest" ,python-pytest) ; >= 2.3.5
9424 ("python-setuptools-scm" ,python-setuptools-scm)))
d81fb2ae 9425 (home-page "https://tox.readthedocs.io")
44d10b1f
RW
9426 (synopsis "Virtualenv-based automation of test activities")
9427 (description "Tox is a generic virtualenv management and test command line
9428tool. It can be used to check that a package installs correctly with
9429different Python versions and interpreters, or run tests in each type of
9430supported environment, or act as a frontend to continuous integration
9431servers.")
9432 (license license:expat)))
9433
9434(define-public python2-tox
9435 (package-with-python2 python-tox))
9436
9437(define-public python-jmespath
9438 (package
9439 (name "python-jmespath")
27fb781f 9440 (version "0.9.4")
44d10b1f
RW
9441 (source
9442 (origin
9443 (method url-fetch)
9444 (uri (pypi-uri "jmespath" version))
9445 (sha256
9446 (base32
27fb781f 9447 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
9448 (build-system python-build-system)
9449 (native-inputs
9450 `(("python-nose" ,python-nose)))
9451 (synopsis "JSON Matching Expressions")
9452 (description "JMESPath (pronounced “james path”) is a Python library that
9453allows one to declaratively specify how to extract elements from a JSON
9454document.")
9455 (home-page "https://github.com/jmespath/jmespath.py")
9456 (license license:expat)))
9457
9458(define-public python2-jmespath
9459 (package-with-python2 python-jmespath))
9460
9461(define-public python-botocore
9462 (package
7bcf827c 9463 (name "python-botocore")
6b8c390f 9464 (version "1.15.26")
7bcf827c
RW
9465 (source
9466 (origin
9467 (method url-fetch)
9468 (uri (pypi-uri "botocore" version))
9469 (sha256
9470 (base32
6b8c390f 9471 "1a87pbwkk5vlwz92hy1wizfnpiwn11bhaicr6bmji1i5ybwdhnr8"))))
7bcf827c
RW
9472 (build-system python-build-system)
9473 (arguments
9474 ;; FIXME: Many tests are failing.
9475 '(#:tests? #f))
9476 (propagated-inputs
9477 `(("python-dateutil" ,python-dateutil)
9478 ("python-docutils" ,python-docutils)
9479 ("python-jmespath" ,python-jmespath)))
9480 (native-inputs
9481 `(("python-mock" ,python-mock)
9482 ("python-nose" ,python-nose)
9483 ("behave" ,behave)
9484 ("python-tox" ,python-tox)
9485 ("python-urllib3" ,python-urllib3)
9486 ("python-wheel" ,python-wheel)))
9487 (home-page "https://github.com/boto/botocore")
9488 (synopsis "Low-level interface to AWS")
9489 (description "Botocore is a Python library that provides a low-level
44d10b1f 9490interface to the Amazon Web Services (AWS) API.")
7bcf827c 9491 (license license:asl2.0)))
44d10b1f
RW
9492
9493(define-public python2-botocore
9494 (package-with-python2 python-botocore))
9495
9496(define-public python-xdo
9497 (package
9498 (name "python-xdo")
9499 (version "0.3")
9500 (source (origin
9501 (method url-fetch)
9502 (uri (string-append
9503 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9504 "python-xdo_" version ".orig.tar.gz"))
9505 (sha256
9506 (base32
9507 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9508 (build-system python-build-system)
9509 (arguments
9510 '(#:phases
9511 (modify-phases %standard-phases
9512 (add-before 'install 'patch-libxdo-path
9513 ;; Hardcode the path of dynamically loaded libxdo library.
9514 (lambda* (#:key inputs #:allow-other-keys)
9515 (let ((libxdo (string-append
9516 (assoc-ref inputs "xdotool")
9517 "/lib/libxdo.so")))
9518 (substitute* "xdo/_xdo.py"
9519 (("find_library\\(\"xdo\"\\)")
9520 (simple-format #f "\"~a\"" libxdo)))
9521 #t))))
9522 #:tests? #f)) ; no tests provided
9523 (propagated-inputs
9524 `(("python-six" ,python-six)))
9525 (inputs
9526 `(("xdotool" ,xdotool)
9527 ("libX11" ,libx11)))
9528 (home-page "https://tracker.debian.org/pkg/python-xdo")
9529 (synopsis "Python library for simulating X11 keyboard/mouse input")
9530 (description "Provides bindings to libxdo for manipulating X11 via simulated
9531input. (Note that this is mostly a legacy library; you may wish to look at
9532python-xdo for newer bindings.)")
9533 (license license:bsd-3)))
9534
9535(define-public python2-xdo
9536 (package-with-python2 python-xdo))
9537
9538(define-public python-mako
9539 (package
9540 (name "python-mako")
4d3c2cb7 9541 (version "1.1.1")
44d10b1f
RW
9542 (source
9543 (origin
9544 (method url-fetch)
9545 (uri (pypi-uri "Mako" version))
9546 (sha256
9547 (base32
4d3c2cb7 9548 "193mds7lv91pphnvn6c1n55rhjkgq94asdzgrsb2fiqx7rrsd119"))))
44d10b1f 9549 (build-system python-build-system)
6bf53ad5
MB
9550 (arguments
9551 `(#:phases (modify-phases %standard-phases
9552 (replace 'check
9553 (lambda _
9554 (invoke "pytest" "-vv"))))))
44d10b1f
RW
9555 (propagated-inputs
9556 `(("python-markupsafe" ,python-markupsafe)))
9557 (native-inputs
9558 `(("python-mock" ,python-mock)
44d10b1f 9559 ("python-pytest" ,python-pytest)))
7016e620 9560 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
9561 (synopsis "Templating language for Python")
9562 (description "Mako is a templating language for Python that compiles
9563templates into Python modules.")
9564 (license license:expat)))
9565
9566(define-public python2-mako
9567 (package-with-python2 python-mako))
9568
9569(define-public python-waitress
9570 (package
9571 (name "python-waitress")
9572 (version "1.1.0")
9573 (source
9574 (origin
9575 (method url-fetch)
9576 (uri (pypi-uri "waitress" version))
9577 (patches (search-patches "python-waitress-fix-tests.patch"))
9578 (sha256
9579 (base32
9580 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9581 (build-system python-build-system)
9582 (home-page "https://github.com/Pylons/waitress")
9583 (synopsis "Waitress WSGI server")
9584 (description "Waitress is meant to be a production-quality pure-Python WSGI
9585server with very acceptable performance.")
9586 (license license:zpl2.1)))
9587
9588(define-public python2-waitress
9589 (package-with-python2 python-waitress))
9590
b2b23d12
TLC
9591(define-public python-whichcraft
9592 (package
9593 (name "python-whichcraft")
9594 (version "0.6.1")
9595 (source
9596 (origin
9597 (method url-fetch)
9598 (uri (pypi-uri "whichcraft" version))
9599 (sha256
9600 (base32
9601 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9602 (build-system python-build-system)
9603 (native-inputs
9604 `(("python-pytest" ,python-pytest)))
9605 (home-page "https://github.com/pydanny/whichcraft")
9606 (synopsis "Cross-platform cross-python shutil.which functionality")
9607 (description
9608 "This package provides a shim of the shutil.which function that's
9609designed to work across multiple versions of Python.")
9610 (license license:bsd-3)))
9611
1133ca44
TLC
9612(define-public python-cookiecutter
9613 (package
9614 (name "python-cookiecutter")
9615 (version "1.6.0")
9616 (source
9617 (origin
9618 (method url-fetch)
9619 (uri (pypi-uri "cookiecutter" version))
9620 (sha256
9621 (base32
9622 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9623 (build-system python-build-system)
9624 (native-inputs
9625 `(("python-freezegun" ,python-freezegun)
9626 ("python-pytest" ,python-pytest)
9627 ("python-pytest-catchlog" ,python-pytest-catchlog)
9628 ("python-pytest-cov" ,python-pytest-cov)
9629 ("python-pytest-mock" ,python-pytest-mock)))
9630 (propagated-inputs
9631 `(("python-binaryornot" ,python-binaryornot)
9632 ("python-click" ,python-click)
9633 ("python-future" ,python-future)
9634 ("python-jinja2" ,python-jinja2)
9635 ("python-jinja2-time" ,python-jinja2-time)
9636 ("python-poyo" ,python-poyo)
9637 ("python-requests" ,python-requests)
9638 ("python-whichcraft" ,python-whichcraft)))
9639 (home-page "https://github.com/audreyr/cookiecutter")
9640 (synopsis
9641 "Command-line utility that creates projects from project templates")
9642 (description
9643 "This package provides a command-line utility that creates projects from
9644project templates, e.g. creating a Python package project from a Python package
9645project template.")
9646 (license license:bsd-3)))
9647
44d10b1f
RW
9648(define-public python-pyquery
9649 (package
9650 (name "python-pyquery")
9651 (version "1.2.17")
9652 (source
9653 (origin
9654 (method url-fetch)
9655 (uri (pypi-uri "pyquery" version))
9656 (sha256
9657 (base32
9658 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9659 (build-system python-build-system)
9660 (native-inputs
9661 `(("python-webob" ,python-webob)
9662 ("python-webtest" ,python-webtest)))
9663 (propagated-inputs
9664 `(("python-lxml" ,python-lxml)
9665 ("python-cssselect" ,python-cssselect)))
9666 (home-page "https://github.com/gawel/pyquery")
9667 (synopsis "Make jQuery-like queries on xml documents")
9668 (description "pyquery allows you to make jQuery queries on xml documents.
9669The API is as much as possible the similar to jQuery. pyquery uses lxml for
9670fast xml and html manipulation.")
9671 (license license:bsd-3)))
9672
44d10b1f
RW
9673(define-public python-anyjson
9674 (package
9675 (name "python-anyjson")
9676 (version "0.3.3")
9677 (source
9678 (origin
9679 (method url-fetch)
9680 (uri (pypi-uri "anyjson" version))
9681 (sha256
9682 (base32
9683 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9684 (build-system python-build-system)
9685 (arguments
9686 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9687 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9688 ;; whatever) so this transformation needs to be done before the tests
9689 ;; can be run. Maybe we could add a build step to transform beforehand
9690 ;; but it could be annoying/difficult.
9691 ;; We can enable tests for the Python 2 version, though, and do below.
9692 #:tests? #f))
9693 (home-page "https://bitbucket.org/runeh/anyjson/")
9694 (synopsis
9695 "Wraps best available JSON implementation in a common interface")
9696 (description
9697 "Anyjson loads whichever is the fastest JSON module installed
9698and provides a uniform API regardless of which JSON implementation is used.")
9699 (license license:bsd-3)
9700 (properties `((python2-variant . ,(delay python2-anyjson))))))
9701
9702(define-public python2-anyjson
9703 (let ((anyjson (package-with-python2
9704 (strip-python2-variant python-anyjson))))
9705 (package
9706 (inherit anyjson)
9707 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9708 #:tests? #t
9709 ,@(package-arguments anyjson)))
9710 (native-inputs `(("python2-nose" ,python2-nose))))))
9711
9712(define-public python-amqp
9713 (package
9714 (name "python-amqp")
9715 (version "2.3.2")
9716 (source
9717 (origin
9718 (method url-fetch)
9719 (uri (pypi-uri "amqp" version))
9720 (sha256
9721 (base32
9722 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9723 (build-system python-build-system)
9724 (native-inputs
9725 `(("python-case" ,python-case)
9726 ("python-pytest-sugar" ,python-pytest-sugar)
9727 ("python-mock" ,python-mock)))
9728 (propagated-inputs
9729 `(("python-vine" ,python-vine)))
9730 (home-page "https://github.com/celery/py-amqp")
9731 (synopsis
9732 "Low-level AMQP client for Python (fork of amqplib)")
9733 (description
9734 "This is a fork of amqplib which was originally written by Barry Pederson.
9735It is maintained by the Celery project, and used by kombu as a pure python
9736alternative when librabbitmq is not available.")
9737 (license license:lgpl2.1+)
9738 (properties `((python2-variant . ,(delay python2-amqp))))))
9739
9740(define-public python2-amqp
9741 (let ((amqp (package-with-python2
9742 (strip-python2-variant python-amqp))))
9743 (package
9744 (inherit amqp)
9745 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9746 ;; unmaintained. Weirdly, does not do this on the python 3
9747 ;; version?
9748 #:tests? #f
9749 ,@(package-arguments amqp))))))
9750
9751(define-public python-txamqp
9752 (package
9753 (name "python-txamqp")
9754 (version "0.8.2")
9755 (source
9756 (origin
9757 (method url-fetch)
9758 (uri (pypi-uri "txAMQP" version))
9759 (sha256
9760 (base32
9761 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9762 (build-system python-build-system)
9763 (propagated-inputs
9764 `(("python-six" ,python-six)
9765 ("python-twisted" ,python-twisted)))
9766 (home-page "https://github.com/txamqp/txamqp")
9767 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9768 (description
9769 "This package provides a Python library for communicating with AMQP peers
9770and brokers using the asynchronous networking framework Twisted. It contains
9771all the necessary code to connect, send and receive messages to/from an
9772AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9773also includes support for using Thrift RPC over AMQP in Twisted
9774applications.")
9775 (license license:asl2.0)))
9776
9777(define-public python2-txamqp
9778 (package-with-python2 python-txamqp))
9779
9780(define-public python-kombu
9781 (package
9782 (name "python-kombu")
9783 (version "4.2.2")
9784 (source
9785 (origin
9786 (method url-fetch)
9787 (uri (pypi-uri "kombu" version))
9788 (sha256
9789 (base32
9790 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9791 (build-system python-build-system)
9792 (native-inputs
9793 `(("python-mock" ,python-mock)
9794 ("python-case" ,python-case)
9795 ("python-pyro4" ,python-pyro4)
9796 ("python-pytest-sugar" ,python-pytest-sugar)
9797 ("python-pytz" ,python-pytz)))
9798 (propagated-inputs
9799 `(("python-anyjson" ,python-anyjson)
9800 ("python-amqp" ,python-amqp)
9801 ("python-redis" ,python-redis)))
9802 (home-page "https://kombu.readthedocs.io")
9803 (synopsis "Message passing library for Python")
9804 (description "The aim of Kombu is to make messaging in Python as easy as
9805possible by providing an idiomatic high-level interface for the AMQ protocol,
9806and also provide proven and tested solutions to common messaging problems.
9807AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9808message orientation, queuing, routing, reliability and security, for which the
9809RabbitMQ messaging server is the most popular implementation.")
9810 (license license:bsd-3)
9811 (properties `((python2-variant . ,(delay python2-kombu))))))
9812
9813(define-public python2-kombu
9814 (let ((kombu (package-with-python2
9815 (strip-python2-variant python-kombu))))
9816 (package
9817 (inherit kombu)
9818 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9819 ;; It works fine on the python3 variant.
9820 #:tests? #f
9821 ,@(package-arguments kombu)))
9822 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9823 ,@(package-native-inputs kombu))))))
9824
9825(define-public python-billiard
9826 (package
9827 (name "python-billiard")
9828 (version "3.5.0.5")
9829 (source
9830 (origin
9831 (method url-fetch)
9832 (uri (pypi-uri "billiard" version))
9833 (sha256
9834 (base32
9835 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9836 (build-system python-build-system)
9837 (native-inputs
9838 `(("python-case" ,python-case)
9839 ("python-pytest" ,python-pytest)))
9840 (home-page "https://github.com/celery/billiard")
9841 (synopsis
9842 "Python multiprocessing fork with improvements and bugfixes")
9843 (description
9844 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9845multiprocessing package itself is a renamed and updated version of R Oudkerk's
9846pyprocessing package. This standalone variant is intended to be compatible with
9847Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9848 (license license:bsd-3)
9849 (properties `((python2-variant . ,(delay python2-billiard))))))
9850
9851(define-public python2-billiard
9852 (let ((billiard (package-with-python2
9853 (strip-python2-variant python-billiard))))
9854 (package
9855 (inherit billiard)
9856 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9857 ("python2-mock" ,python2-mock)
9858 ,@(package-native-inputs billiard))))))
9859
9860(define-public python-celery
9861 (package
9862 (name "python-celery")
9863 (version "4.2.1")
9864 (source
9865 (origin
9866 (method url-fetch)
9867 (uri (pypi-uri "celery" version))
9868 (sha256
9869 (base32
9870 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9871 (build-system python-build-system)
9872 (arguments
9873 '(;; TODO The tests fail with Python 3.7
9874 ;; https://github.com/celery/celery/issues/4849
9875 #:tests? #f
9876 #:phases
9877 (modify-phases %standard-phases
9878 (add-after 'unpack 'patch-requirements
9879 (lambda _
9880 (substitute* "requirements/test.txt"
9881 (("pytest>=3\\.0,<3\\.3")
9882 "pytest>=3.0"))
9883 #t)))))
9884 (native-inputs
9885 `(("python-case" ,python-case)
9886 ("python-pytest" ,python-pytest)))
9887 (propagated-inputs
9888 `(("python-pytz" ,python-pytz)
9889 ("python-billiard" ,python-billiard)
9890 ("python-kombu" ,python-kombu)))
9891 (home-page "https://celeryproject.org")
9892 (synopsis "Distributed Task Queue")
9893 (description "Celery is an asynchronous task queue/job queue based on
9894distributed message passing. It is focused on real-time operation, but
9895supports scheduling as well. The execution units, called tasks, are executed
9896concurrently on a single or more worker servers using multiprocessing,
9897Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9898synchronously (wait until ready).")
9899 (license license:bsd-3)
9900 (properties `((python2-variant . ,(delay python2-celery))))))
9901
9902(define-public python2-celery
9903 (let ((celery (package-with-python2
9904 (strip-python2-variant python-celery))))
9905 (package
9906 (inherit celery)
9907 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9908 ("python2-mock" ,python2-mock)
9909 ,@(package-native-inputs celery))))))
9910
9911(define-public python-translitcodec
9912 (package
9913 (name "python-translitcodec")
9914 (version "0.4.0")
9915 (source
9916 (origin
9917 (method url-fetch)
9918 (uri (pypi-uri "translitcodec" version))
9919 (sha256
9920 (base32
9921 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9922 (build-system python-build-system)
9923 (arguments
9924 `(#:tests? #f)) ; no tests provided
9925 (home-page
9926 "https://github.com/claudep/translitcodec")
9927 (synopsis
9928 "Unicode to 8-bit charset transliteration codec")
9929 (description
9930 "This package contains codecs for transliterating ISO 10646 texts into
9931best-effort representations using smaller coded character sets (ASCII,
9932ISO 8859, etc.).")
9933 (license license:expat)))
9934
9935(define-public python2-translitcodec
9936 (package-with-python2 python-translitcodec))
9937
9938(define-public python-editor
9939 (package
9940 (name "python-editor")
baea210c 9941 (version "1.0.4")
44d10b1f
RW
9942 (source
9943 (origin
9944 (method url-fetch)
9945 (uri (pypi-uri "python-editor" version))
9946 (sha256
9947 (base32
baea210c 9948 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
44d10b1f 9949 (build-system python-build-system)
baea210c
MB
9950 (arguments
9951 '(#:tests? #f)) ;XXX: needs a TTY and an editor
9952 (home-page "https://github.com/fmoo/python-editor")
9953 (synopsis "Programmatically open an editor, capture the result")
44d10b1f
RW
9954 (description
9955 "python-editor is a library that provides the editor module for
9956programmatically interfacing with your system's $EDITOR.")
9957 (license license:asl2.0)))
9958
9959(define-public python2-editor
9960 (package-with-python2 python-editor))
9961
44d10b1f
RW
9962(define-public python-vobject
9963 (package
9964 (name "python-vobject")
9965 (version "0.9.5")
9966 (source (origin
9967 (method url-fetch)
9968 (uri (pypi-uri "vobject" version))
9969 (sha256
9970 (base32
9971 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9972 (build-system python-build-system)
9973 (arguments
9974 '(;; The test suite relies on some non-portable Windows interfaces.
9975 #:tests? #f))
9976 (propagated-inputs
9977 `(("python-dateutil" ,python-dateutil)
9978 ("python-pyicu" ,python-pyicu)))
9979 (synopsis "Parse and generate vCard and vCalendar files")
9980 (description "Vobject is intended to be a full featured Python package for
9981parsing and generating vCard and vCalendar files. Currently, iCalendar files
9982are supported and well tested. vCard 3.0 files are supported, and all data
9983should be imported, but only a few components are understood in a sophisticated
9984way.")
5d6e7106 9985 (home-page "https://eventable.github.io/vobject/")
44d10b1f
RW
9986 (license license:asl2.0)))
9987
9988(define-public python2-vobject
9989 (package-with-python2 python-vobject))
9990
9991(define-public python-munkres
9992 (package
9993 (name "python-munkres")
9994 (version "1.0.8")
9995 (source (origin
9996 (method url-fetch)
9997 (uri (pypi-uri "munkres" version))
9998 (sha256
9999 (base32
10000 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10001 (build-system python-build-system)
10002 (arguments
10003 '(#:tests? #f)) ; no test suite
78f8780e 10004 (home-page "https://software.clapper.org/munkres/")
44d10b1f
RW
10005 (synopsis "Implementation of the Munkres algorithm")
10006 (description "The Munkres module provides an implementation of the Munkres
10007algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10008useful for solving the Assignment Problem.")
10009 (license license:bsd-3)))
10010
10011(define-public python2-munkres
10012 (package-with-python2 python-munkres))
10013
10014(define-public python-whoosh
10015 (package
10016 (name "python-whoosh")
10017 (version "2.7.4")
10018 (source
10019 (origin
10020 (method url-fetch)
10021 (uri (pypi-uri "Whoosh" version))
10022 (sha256
10023 (base32
10024 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10025 (build-system python-build-system)
2679d9a4 10026 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
10027 (native-inputs
10028 `(("python-pytest" ,python-pytest)))
10029 (home-page "https://bitbucket.org/mchaput/whoosh")
10030 (synopsis "Full text indexing, search, and spell checking library")
10031 (description
10032 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10033checking library.")
10034 (license license:bsd-2)))
10035
10036(define-public python2-whoosh
10037 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10038 (package (inherit whoosh)
10039 (propagated-inputs
10040 `(("python2-backport-ssl-match-hostname"
10041 ,python2-backport-ssl-match-hostname)
10042 ,@(package-propagated-inputs whoosh))))))
10043
10044(define-public python-pathlib
10045 (package
10046 (name "python-pathlib")
10047 (version "1.0.1")
10048 (source (origin
10049 (method url-fetch)
10050 (uri (pypi-uri "pathlib" version))
10051 (sha256
10052 (base32
10053 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10054 (build-system python-build-system)
10055 ;; The tests depend on the internal "test" module, which does not provide
10056 ;; a stable interface.
10057 (arguments `(#:tests? #f))
10058 (home-page "https://pathlib.readthedocs.org/")
10059 (synopsis "Object-oriented file system paths")
10060 (description "Pathlib offers a set of classes to handle file system paths.
10061It offers the following advantages over using string objects:
10062
10063@enumerate
10064@item No more cumbersome use of os and os.path functions. Everything can
10065be done easily through operators, attribute accesses, and method calls.
10066@item Embodies the semantics of different path types. For example,
10067comparing Windows paths ignores casing.
10068@item Well-defined semantics, eliminating any inconsistencies or
10069ambiguities (forward vs. backward slashes, etc.).
10070@end enumerate
10071
10072Note: In Python 3.4, pathlib is now part of the standard library. For other
10073Python versions please consider python-pathlib2 instead, which tracks the
10074standard library module. This module (python-pathlib) isn't maintained
10075anymore.")
10076 (license license:expat)))
10077
10078(define-public python2-pathlib
10079 (package-with-python2 python-pathlib))
10080
10081(define-public python2-pathlib2
10082 (package
10083 (name "python2-pathlib2")
54da6f9f 10084 (version "2.3.3")
44d10b1f
RW
10085 (source (origin
10086 (method url-fetch)
10087 (uri (pypi-uri "pathlib2" version))
10088 (sha256
10089 (base32
54da6f9f 10090 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
10091 (build-system python-build-system)
10092 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10093 ;; version is 3.4 which already includes this package as part of the
10094 ;; standard library.
10095 (arguments
10096 `(#:python ,python-2))
10097 (propagated-inputs
10098 `(("python2-scandir" ,python2-scandir)
10099 ("python2-six" ,python2-six)))
e85af137 10100 (home-page "https://pypi.org/project/pathlib2/")
44d10b1f
RW
10101 (synopsis "Object-oriented file system paths - backport of standard
10102pathlib module")
10103 (description "The goal of pathlib2 is to provide a backport of standard
10104pathlib module which tracks the standard library module, so all the newest
10105features of the standard pathlib can be used also on older Python versions.
10106
10107Pathlib offers a set of classes to handle file system paths. It offers the
10108following advantages over using string objects:
10109
10110@enumerate
10111@item No more cumbersome use of os and os.path functions. Everything can
10112be done easily through operators, attribute accesses, and method calls.
10113@item Embodies the semantics of different path types. For example,
10114comparing Windows paths ignores casing.
10115@item Well-defined semantics, eliminating any inconsistencies or
10116ambiguities (forward vs. backward slashes, etc.).
10117@end enumerate")
10118 (license license:expat)))
10119
10120(define-public python2-pathlib2-bootstrap
10121 (hidden-package
10122 (package
10123 (inherit python2-pathlib2)
10124 (name "python2-pathlib2-bootstrap")
10125 (propagated-inputs
10126 `(("python2-scandir" ,python2-scandir)
10127 ("python2-six" ,python2-six-bootstrap))))))
10128
10129(define-public python-jellyfish
10130 (package
10131 (name "python-jellyfish")
10132 (version "0.5.6")
10133 (source (origin
10134 (method url-fetch)
10135 (uri (pypi-uri "jellyfish" version))
10136 (sha256
10137 (base32
10138 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10139 (build-system python-build-system)
10140 (native-inputs
10141 `(("python-pytest" ,python-pytest)))
10142 (home-page "https://github.com/jamesturk/jellyfish")
10143 (synopsis "Approximate and phonetic matching of strings")
10144 (description "Jellyfish uses a variety of string comparison and phonetic
10145encoding algorithms to do fuzzy string matching.")
10146 (license license:bsd-2)
10147 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10148
10149(define-public python2-jellyfish
10150 (let ((jellyfish (package-with-python2
10151 (strip-python2-variant python-jellyfish))))
10152 (package (inherit jellyfish)
10153 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10154 ,@(package-native-inputs jellyfish))))))
10155
10156(define-public python2-unicodecsv
10157 (package
10158 (name "python2-unicodecsv")
10159 (version "0.14.1")
10160 (source (origin
f711b71b 10161 (method git-fetch)
44d10b1f
RW
10162 ;; The test suite is not included in the PyPi release.
10163 ;; https://github.com/jdunck/python-unicodecsv/issues/19
f711b71b
EF
10164 (uri (git-reference
10165 (url "https://github.com/jdunck/python-unicodecsv")
10166 (commit version)))
10167 (file-name (git-file-name name version))
44d10b1f
RW
10168 (sha256
10169 (base32
f711b71b 10170 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
44d10b1f
RW
10171 (build-system python-build-system)
10172 (arguments
10173 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10174 #:python ,python-2))
10175 (native-inputs
10176 `(("python2-unittest2" ,python2-unittest2)))
10177 (home-page "https://github.com/jdunck/python-unicodecsv")
10178 (synopsis "Unicode CSV module for Python 2")
10179 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10180module, adding support for Unicode strings.")
10181 (license license:bsd-2)))
10182
10183(define-public python-rarfile
10184 (package
10185 (name "python-rarfile")
10186 (version "2.8")
10187 (source (origin
10188 (method url-fetch)
10189 (uri (pypi-uri "rarfile" version))
10190 (sha256
10191 (base32
10192 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10193 (build-system python-build-system)
10194 (arguments
10195 '(#:phases
10196 (modify-phases %standard-phases
10197 (replace 'check
10198 ;; Many tests fail, but the installation proceeds.
e59dd341 10199 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
10200 (native-inputs
10201 `(("which" ,which))) ; required for tests
10202 (propagated-inputs
10203 `(("libarchive" ,libarchive)))
10204 (home-page "https://github.com/markokr/rarfile")
10205 (synopsis "RAR archive reader for Python")
10206 (description "This is Python module for RAR archive reading. The interface
10207is made as zipfile like as possible.")
10208 (license license:isc)))
10209
10210(define-public python2-rarfile
10211 (package-with-python2 python-rarfile))
10212
10213(define-public python-magic
10214 (package
10215 (name "python-magic")
10216 (version "0.4.15")
10217 (source
10218 (origin
10219 (method url-fetch)
10220 (uri (pypi-uri "python-magic" version))
10221 (sha256
10222 (base32
10223 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
10224 (file-name (string-append name "-" version "-checkout"))))
10225 (build-system python-build-system)
10226 (arguments
10227 ;; The tests are unreliable, so don't run them. The tests fail
10228 ;; under Python3 because they were written for Python2 and
10229 ;; contain import statements that do not work in Python3. One of
10230 ;; the tests fails under Python2 because its assertions are
10231 ;; overly stringent; it relies on comparing output strings which
10232 ;; are brittle and can change depending on the version of
10233 ;; libmagic being used and the system on which the test is
10234 ;; running. In my case, under GuixSD 0.10.0, only one test
10235 ;; failed, and it seems to have failed only because the version
10236 ;; of libmagic that is packaged in Guix outputs a slightly
10237 ;; different (but not wrong) string than the one that the test
10238 ;; expected.
10239 '(#:tests? #f
10240 #:phases (modify-phases %standard-phases
10241 ;; Replace a specific method call with a hard-coded
10242 ;; path to the necessary libmagic.so file in the
10243 ;; store. If we don't do this, then the method call
10244 ;; will fail to find the libmagic.so file, which in
10245 ;; turn will cause any application using
10246 ;; python-magic to fail.
10247 (add-before 'build 'hard-code-path-to-libmagic
10248 (lambda* (#:key inputs #:allow-other-keys)
10249 (let ((file (assoc-ref inputs "file")))
10250 (substitute* "magic.py"
10251 (("ctypes.util.find_library\\('magic'\\)")
10252 (string-append "'" file "/lib/libmagic.so'")))
10253 #t)))
10254 (add-before 'install 'disable-egg-compression
10255 (lambda _
10256 (let ((port (open-file "setup.cfg" "a")))
10257 (display "\n[easy_install]\nzip_ok = 0\n"
10258 port)
10259 (close-port port)
10260 #t))))))
10261 (inputs
10262 ;; python-magic needs to be able to find libmagic.so.
10263 `(("file" ,file)))
10264 (home-page
10265 "https://github.com/ahupp/python-magic")
10266 (synopsis
10267 "File type identification using libmagic")
10268 (description
10269 "This module uses ctypes to access the libmagic file type
10270identification library. It makes use of the local magic database and
10271supports both textual and MIME-type output. Note that this module and
10272the python-file module both provide a \"magic.py\" file; these two
10273modules, which are different and were developed separately, both serve
10274the same purpose: to provide Python bindings for libmagic.")
10275 (license license:expat)))
10276
10277(define-public python2-magic
10278 (package-with-python2 python-magic))
10279
10280(define-public python2-s3cmd
10281 (package
10282 (name "python2-s3cmd")
10283 (version "1.6.1")
10284 (source
10285 (origin
10286 (method url-fetch)
10287 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10288 "s3cmd-" version ".tar.gz"))
10289 (sha256
10290 (base32
10291 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10292 (build-system python-build-system)
10293 (arguments
10294 ;; s3cmd is written for python2 only and contains no tests.
10295 `(#:python ,python-2
10296 #:tests? #f))
10297 (propagated-inputs
10298 `(("python2-dateutil" ,python2-dateutil)
10299 ;; The python-file package also provides a magic.py module.
10300 ;; This is an unfortunate state of affairs; however, s3cmd
10301 ;; fails to install if it cannot find specifically the
10302 ;; python-magic package. Thus we include it, instead of using
10303 ;; python-file. Ironically, s3cmd sometimes works better
10304 ;; without libmagic bindings at all:
10305 ;; https://github.com/s3tools/s3cmd/issues/198
10306 ("python2-magic" ,python2-magic)))
fa7efe17 10307 (home-page "https://s3tools.org/s3cmd")
44d10b1f
RW
10308 (synopsis "Command line tool for S3-compatible storage services")
10309 (description
10310 "S3cmd is a command line tool for uploading, retrieving and managing data
10311in storage services that are compatible with the Amazon Simple Storage
10312Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10313GnuPG encryption, and more. It also supports management of Amazon's
10314CloudFront content delivery network.")
10315 (license license:gpl2+)))
10316
10317(define-public python-pkgconfig
10318 (package
10319 (name "python-pkgconfig")
10320 (version "1.3.1")
10321 (source
10322 (origin
10323 (method url-fetch)
10324 (uri (pypi-uri "pkgconfig" version))
10325 (sha256
10326 (base32
10327 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
10328 (build-system python-build-system)
10329 (native-inputs
10330 `(("python-nose" ,python-nose)))
10331 (inputs
10332 `(("pkg-config" ,pkg-config)))
10333 (arguments
10334 `(#:phases
10335 (modify-phases %standard-phases
10336 (add-before 'build 'patch
10337 ;; Hard-code the path to pkg-config.
10338 (lambda _
10339 (substitute* "pkgconfig/pkgconfig.py"
10340 (("cmd = 'pkg-config")
10341 (string-append "cmd = '" (which "pkg-config"))))
10342 #t))
10343 (replace 'check
10344 (lambda _
10345 (invoke "nosetests" "test.py"))))))
10346 (home-page "https://github.com/matze/pkgconfig")
10347 (synopsis "Python interface for pkg-config")
10348 (description "This module provides a Python interface to pkg-config. It
10349can be used to find all pkg-config packages, check if a package exists,
10350check if a package meets certain version requirements, query CFLAGS and
10351LDFLAGS and parse the output to build extensions with setup.py.")
10352 (license license:expat)))
10353
10354(define-public python2-pkgconfig
10355 (package-with-python2 python-pkgconfig))
10356
10357(define-public python-bz2file
10358 (package
10359 (name "python-bz2file")
10360 (version "0.98")
10361 (source
10362 (origin
10363 (method url-fetch)
10364 (uri (pypi-uri "bz2file" version))
10365 (sha256
10366 (base32
10367 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10368 (build-system python-build-system)
10369 (arguments
10370 `(#:tests? #f)) ; Tests use deprecated python modules.
10371 (home-page "https://github.com/nvawda/bz2file")
10372 (synopsis "Read and write bzip2-compressed files")
10373 (description
10374 "Bz2file is a Python library for reading and writing bzip2-compressed
10375files. It contains a drop-in replacement for the I/O interface in the
10376standard library's @code{bz2} module, including features from the latest
10377development version of CPython that are not available in older releases.")
10378 (license license:asl2.0)))
10379
10380(define-public python2-bz2file
10381 (package-with-python2 python-bz2file))
10382
10383(define-public python-future
10384 (package
10385 (name "python-future")
d5d54030 10386 (version "0.17.1")
44d10b1f
RW
10387 (source
10388 (origin
10389 (method url-fetch)
10390 (uri (pypi-uri "future" version))
10391 (sha256
10392 (base32
d5d54030 10393 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
10394 (build-system python-build-system)
10395 ;; Many tests connect to the network or are otherwise flawed.
10396 ;; https://github.com/PythonCharmers/python-future/issues/210
10397 (arguments
10398 `(#:tests? #f))
02d1fd03 10399 (home-page "https://python-future.org")
44d10b1f
RW
10400 (synopsis "Single-source support for Python 3 and 2")
10401 (description
10402 "@code{python-future} is the missing compatibility layer between Python 2 and
10403Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10404to support both Python 2 and Python 3 with minimal overhead.")
10405 (license license:expat)))
10406
10407(define-public python2-future
10408 (package-with-python2 python-future))
10409
10410(define-public python-cysignals
10411 (package
10412 (name "python-cysignals")
8e3e51df 10413 (version "1.9.0")
44d10b1f
RW
10414 (source
10415 (origin
10416 (method url-fetch)
8e3e51df 10417 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
10418 (sha256
10419 (base32
8e3e51df 10420 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
10421 (build-system python-build-system)
10422 (native-inputs
10423 `(("python-cython" ,python-cython)
10424 ("python-sphinx" ,python-sphinx)))
10425 (inputs
10426 `(("pari-gp" ,pari-gp)))
10427 (arguments
10428 `(#:modules ((guix build python-build-system)
10429 ((guix build gnu-build-system) #:prefix gnu:)
10430 (guix build utils))
10431 ;; FIXME: Tests are executed after installation and currently fail
10432 ;; when not installing into standard locations; the author is working
10433 ;; on a fix.
10434 #:tests? #f
10435 #:phases
10436 (modify-phases %standard-phases
10437 (add-before
10438 'build 'configure
10439 (assoc-ref gnu:%standard-phases 'configure)))))
10440 (home-page
10441 "https://github.com/sagemath/cysignals")
10442 (synopsis
10443 "Handling of interrupts and signals for Cython")
10444 (description
10445 "The cysignals package provides mechanisms to handle interrupts (and
10446other signals and errors) in Cython code, using two related approaches,
10447for mixed Cython/Python code or external C libraries and pure Cython code,
10448respectively.")
10449 (license license:lgpl3+)))
10450
10451(define-public python2-cysignals
10452 (package-with-python2 python-cysignals))
10453
10454(define-public python2-shedskin
10455 (package
10456 (name "python2-shedskin")
10457 (version "0.9.4")
10458 (source
10459 (origin
10460 (method url-fetch)
10461 (uri (string-append "https://github.com/shedskin/shedskin/"
10462 "releases/download/v" version
10463 "/shedskin-" version ".tgz"))
10464 (sha256
10465 (base32
10466 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10467 (build-system python-build-system)
10468 (arguments
10469 `(#:python ,python-2
10470 #:phases (modify-phases %standard-phases
10471 (add-after 'unpack 'fix-resulting-include-libs
10472 (lambda* (#:key inputs #:allow-other-keys)
10473 (let ((libgc (assoc-ref inputs "libgc"))
10474 (pcre (assoc-ref inputs "pcre")))
10475 (substitute* "shedskin/makefile.py"
10476 (("variable == 'CCFLAGS':[ ]*")
10477 (string-append "variable == 'CCFLAGS':\n"
10478 " line += ' -I " pcre "/include"
10479 " -I " libgc "/include'"))
10480 (("variable == 'LFLAGS':[ ]*")
10481 (string-append "variable == 'LFLAGS':\n"
10482 " line += ' -L" pcre "/lib"
10483 " -L " libgc "/lib'")))
10484 #t))))))
10485 (inputs `(("pcre" ,pcre)
10486 ("libgc" ,libgc)))
10487 (home-page "https://shedskin.github.io/")
10488 (synopsis "Experimental Python-2 to C++ Compiler")
10489 (description (string-append "This is an experimental compiler for a subset of
10490Python. It generates C++ code and a Makefile."))
10491 (license (list license:gpl3 license:bsd-3 license:expat))))
10492
10493(define-public python2-rope
10494 (package
10495 (name "python2-rope")
a9ba0a31 10496 (version "0.11.0")
44d10b1f
RW
10497 (source
10498 (origin
10499 (method url-fetch)
10500 (uri (pypi-uri "rope" version))
10501 (sha256
10502 (base32
a9ba0a31 10503 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 10504 (arguments
afb29715 10505 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
10506 `(#:python ,python-2))
10507 (build-system python-build-system)
10508 (native-inputs
10509 `(("python2-unittest2" ,python2-unittest2)))
10510 (home-page "https://github.com/python-rope/rope")
10511 (synopsis "Refactoring library for Python")
10512 (description "Rope is a refactoring library for Python. It facilitates
10513the renaming, moving and extracting of attributes, functions, modules, fields
10514and parameters in Python 2 source code. These refactorings can also be applied
10515to occurrences in strings and comments.")
10516 (license license:gpl2)))
10517
2c880ef4
LC
10518(define-public python-rope
10519 (package
10520 (inherit python2-rope)
10521 (name "python-rope")
10522 (arguments `(#:python ,python-wrapper
10523 ;; XXX: Only partial python3 support, results in some failing
10524 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10525 #:tests? #f))
10526 (properties `((python2-variant . ,(delay python2-rope))))))
10527
44d10b1f
RW
10528(define-public python-py3status
10529 (package
10530 (name "python-py3status")
ef68b35d 10531 (version "3.21")
44d10b1f
RW
10532 (source
10533 (origin
10534 (method url-fetch)
10535 (uri (pypi-uri "py3status" version))
10536 (sha256
ef68b35d 10537 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
10538 (build-system python-build-system)
10539 (inputs
10540 `(("file" ,file)))
10541 (arguments
10542 '(#:phases
10543 (modify-phases %standard-phases
10544 ;; 'file' is used for detection of configuration file encoding
10545 ;; let's make link the dependency to particular input
10546 (add-before 'build 'patch-file-path
10547 (lambda* (#:key inputs #:allow-other-keys)
10548 (let ((file-path (assoc-ref inputs "file")))
10549 (substitute* "py3status/parse_config.py"
6a6b8a3f 10550 (("\\[\"file\", \"-b\"")
44d10b1f
RW
10551 (string-append "['" file-path "/bin/file', '-b'")))
10552 #t))))
10553 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10554 (home-page "https://github.com/ultrabug/py3status")
10555 (synopsis "Extensible i3status wrapper written in Python")
10556 (description "py3status is an i3status wrapper which extends i3status
10557functionality in a modular way, allowing you to extend your panel with your
10558own code, responding to click events and updating clock every second.")
10559 (license license:bsd-3)))
10560
10561(define-public python-tblib
10562 (package
10563 (name "python-tblib")
4fc26c65 10564 (version "1.6.0")
44d10b1f
RW
10565 (source (origin
10566 (method url-fetch)
10567 (uri (pypi-uri "tblib" version))
4fc26c65
MB
10568 (sha256
10569 (base32
10570 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
44d10b1f
RW
10571 (build-system python-build-system)
10572 (arguments
10573 `(#:phases
10574 (modify-phases %standard-phases
44d10b1f
RW
10575 (replace 'check
10576 (lambda _
10577 ;; Upstream runs tests after installation and the package itself
10578 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10579 ;; found.
10580 (setenv "PYTHONPATH"
10581 (string-append (getcwd) "/build/lib:"
10582 (getenv "PYTHONPATH")))
10583 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10584 (native-inputs
10585 `(("python-pytest" ,python-pytest)
10586 ("python-six" ,python-six)))
10587 (home-page "https://github.com/ionelmc/python-tblib")
10588 (synopsis "Traceback serialization library")
10589 (description
10590 "Traceback serialization allows you to:
10591
10592@enumerate
10593@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10594different processes. This allows better error handling when running code over
10595multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10596
10597@item Parse traceback strings and raise with the parsed tracebacks.
10598@end enumerate\n")
10599 (license license:bsd-3)))
10600
10601(define-public python2-tblib
10602 (package-with-python2 python-tblib))
10603
10604(define-public python-greenlet
10605 (package
10606 (name "python-greenlet")
10607 (version "0.4.15")
10608 (source (origin
10609 (method url-fetch)
10610 (uri (pypi-uri "greenlet" version))
10611 (sha256
10612 (base32
10613 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10614 (build-system python-build-system)
10615 (home-page "https://greenlet.readthedocs.io/")
10616 (synopsis "Lightweight in-process concurrent programming")
10617 (description
10618 "Greenlet package is a spin-off of Stackless, a version of CPython
10619that supports micro-threads called \"tasklets\". Tasklets run
10620pseudo-concurrently (typically in a single or a few OS-level threads) and
10621are synchronized with data exchanges on \"channels\".")
10622 (license (list license:psfl license:expat))))
10623
10624(define-public python2-greenlet
10625 (package-with-python2 python-greenlet))
10626
10627(define-public python-objgraph
10628 (package
10629 (name "python-objgraph")
eebc03bb 10630 (version "3.4.1")
44d10b1f
RW
10631 (source
10632 (origin
10633 (method url-fetch)
10634 (uri (pypi-uri "objgraph" version))
10635 (sha256
10636 (base32
eebc03bb 10637 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
44d10b1f
RW
10638 (build-system python-build-system)
10639 (propagated-inputs
10640 `(("python-graphviz" ,python-graphviz)))
10641 (native-inputs
10642 `(("python-mock" ,python-mock)
10643 ("graphviz" ,graphviz)))
10644 (home-page "https://mg.pov.lt/objgraph/")
10645 (synopsis "Draw Python object reference graphs with graphviz")
10646 (description
10647 "This package provides tools to draw Python object reference graphs with
10648graphviz.")
10649 (license license:expat)))
10650
ffe58d1d
MB
10651(define-public python2-objgraph
10652 (package-with-python2 python-objgraph))
10653
44d10b1f
RW
10654(define-public python-gevent
10655 (package
10656 (name "python-gevent")
f11b5556 10657 (version "1.4.0")
44d10b1f
RW
10658 (source (origin
10659 (method url-fetch)
10660 (uri (pypi-uri "gevent" version))
10661 (sha256
10662 (base32
f11b5556 10663 "1lchr4akw2jkm5v4kz7bdm4wv3knkfhbfn9vkkz4s5yrkcxzmdqy"))
44d10b1f
RW
10664 (modules '((guix build utils)))
10665 (snippet
10666 '(begin
10667 ;; unbunding libev and c-ares
10668 (delete-file-recursively "deps")
10669 #t))))
10670 (build-system python-build-system)
10671 (arguments
10672 `(#:modules ((ice-9 ftw)
10673 (ice-9 match)
10674 (srfi srfi-26)
10675 (guix build utils)
10676 (guix build python-build-system))
10677 #:phases (modify-phases %standard-phases
44d10b1f
RW
10678 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10679 (lambda _
10680 (substitute* "src/gevent/subprocess.py"
10681 (("/bin/sh") (which "sh")))
10682 (for-each (lambda (file)
10683 (substitute* file
10684 (("/bin/sh") (which "sh"))
10685 (("/bin/true") (which "true"))))
10686 (find-files "src/greentest" "\\.py$"))
10687 #t))
10688 (add-before 'build 'do-not-use-bundled-sources
10689 (lambda* (#:key inputs #:allow-other-keys)
f11b5556 10690 (setenv "GEVENTSETUP_EMBED" "0")
44d10b1f 10691
b5b56b7f
MB
10692 ;; Prevent building bundled libev.
10693 (substitute* "setup.py"
10694 (("run_make=_BUILDING")
10695 "run_make=False"))
10696
44d10b1f
RW
10697 (let ((greenlet (string-append
10698 (assoc-ref inputs "python-greenlet")
10699 "/include")))
10700 (match (scandir greenlet
10701 (lambda (item)
10702 (string-prefix? "python" item)))
10703 ((python)
b5b56b7f 10704 (setenv "C_INCLUDE_PATH"
f11b5556
MB
10705 (string-append greenlet "/" python ":"
10706 (or (getenv "C_INCLUDE_PATH")
10707 ""))))))
44d10b1f 10708 #t))
f11b5556 10709 (add-before 'check 'pretend-to-be-CI
44d10b1f 10710 (lambda _
f11b5556
MB
10711 ;; A few tests are skipped due to network constraints or
10712 ;; get longer timeouts when running in a CI environment.
10713 ;; Piggy-back on that, as we need the same adjustments.
10714 (setenv "TRAVIS" "1")
10715 (setenv "APPVEYOR" "1")
44d10b1f 10716 #t))
f11b5556
MB
10717 (add-before 'check 'adjust-tests
10718 (lambda _
10719 (let ((disabled-tests
10720 '(;; These tests rely on networking which is not
10721 ;; available in the build container.
10722 "test_urllib2net.py"
10723 "test__server.py"
10724 "test__server_pywsgi.py"
10725 "test_socket.py"
10726 "test__socket.py"
10727 "test__socket_ssl.py"
10728 "test__socket_dns.py"
10729 "test__socket_dns6.py"
10730 "test___example_servers.py"
10731 "test__getaddrinfo_import.py"
10732 "test__examples.py"
10733 "test_httplib.py"
10734 "test_https.py"
10735 "test_urllib2_localnet.py"
10736 "test_ssl.py"
10737 "test__ssl.py"
10738 ;; XXX: These tests borrow functionality from the
10739 ;; Python builtin 'test' module, but it is not
10740 ;; installed with the Guix Python distribution.
10741 "test_smtpd.py"
10742 "test_wsgiref.py"
10743 "test_urllib2.py"
10744 "test_thread.py"
10745 "test_threading.py"
10746 "test__threading_2.py"
10747 ;; FIXME: test_patch_twice_warning_events fails for
10748 ;; no apparent reason. Needs more investigation!
10749 "test__monkey.py"
10750 ;; These tests rely on KeyboardInterrupts which do not
10751 ;; work inside the build container for some reason
10752 ;; (lack of controlling terminal?).
10753 "test_subprocess.py"
10754 "test__issues461_471.py"
10755 ;; TODO: Patch out the tests that use getprotobyname, etc
10756 ;; instead of disabling all the tests from these files.
10757 "test__all__.py"
10758 "test___config.py"
10759 "test__execmodules.py")))
10760 (call-with-output-file "skipped_tests.txt"
10761 (lambda (port)
10762 (display (string-join disabled-tests "\n") port)))
10763 #t)))
44d10b1f
RW
10764 (replace 'check
10765 (lambda _
10766 ;; Make sure the build directory is on PYTHONPATH.
10767 (setenv "PYTHONPATH"
10768 (string-append
10769 (getenv "PYTHONPATH") ":"
10770 (getcwd) "/build/"
10771 (car (scandir "build" (cut string-prefix? "lib." <>)))))
f11b5556
MB
10772
10773 ;; Use the build daemons configured number of workers.
10774 (setenv "NWORKERS" (number->string (parallel-job-count)))
10775
10776 (invoke "python" "-m" "gevent.tests" "--config"
10777 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
44d10b1f
RW
10778 (propagated-inputs
10779 `(("python-greenlet" ,python-greenlet)
10780 ("python-objgraph" ,python-objgraph)))
10781 (native-inputs
f11b5556
MB
10782 `(("python-six" ,python-six)
10783
10784 ;; For tests.
10785 ("python-dnspython" ,python-dnspython)
10786 ("python-psutil" ,python-psutil)
10787 ("python-zope.event" ,python-zope-event)
10788 ("python-zope.interface" ,python-zope-interface)))
44d10b1f
RW
10789 (inputs
10790 `(("c-ares" ,c-ares)
10791 ("libev" ,libev)))
10792 (home-page "http://www.gevent.org/")
10793 (synopsis "Coroutine-based network library")
10794 (description
10795 "gevent is a coroutine-based Python networking library that uses greenlet
10796to provide a high-level synchronous API on top of the libev event loop.")
10797 (license license:expat)
10798 (properties `((python2-variant . ,(delay python2-gevent))))))
10799
10800(define-public python2-gevent
10801 (let ((base (package-with-python2
10802 (strip-python2-variant python-gevent))))
10803 (package
10804 (inherit base)
f11b5556 10805 (native-inputs `(,@(package-native-inputs base)
44d10b1f
RW
10806 ("python-mock" ,python2-mock))))))
10807
10808(define-public python-fastimport
10809 (package
10810 (name "python-fastimport")
10811 (version "0.9.6")
10812 (source
10813 (origin
10814 (method url-fetch)
10815 (uri (pypi-uri "fastimport" version))
10816 (sha256
10817 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10818 (build-system python-build-system)
10819 (home-page "https://github.com/jelmer/python-fastimport")
10820 (synopsis "VCS fastimport parser and generator in Python")
10821 (description "This package provides a parser for and generator of the Git
10822@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10823format.")
10824 (license license:gpl2+)))
10825
10826(define-public python2-fastimport
10827 (package-with-python2 python-fastimport))
10828
10829(define-public python-twisted
10830 (package
10831 (name "python-twisted")
fdfad2fc 10832 (version "19.7.0")
44d10b1f
RW
10833 (source (origin
10834 (method url-fetch)
10835 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10836 (sha256
10837 (base32
fdfad2fc 10838 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10839 (build-system python-build-system)
10840 (arguments
0107c9b8 10841 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10842 (propagated-inputs
10843 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10844 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10845 ("python-incremental" ,python-incremental)
e5ba2fe3 10846 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10847 ("python-constantly" ,python-constantly)
10848 ("python-automat" ,python-automat)))
10849 (home-page "https://twistedmatrix.com/")
10850 (synopsis "Asynchronous networking framework written in Python")
10851 (description
10852 "Twisted is an extensible framework for Python programming, with special
10853focus on event-based network programming and multiprotocol integration.")
10854 (license license:expat)))
10855
10856(define-public python2-twisted
10857 (package-with-python2 python-twisted))
10858
10859(define-public python-pika
10860 (package
10861 (name "python-pika")
10862 (version "0.12.0")
10863 (source
10864 (origin
10865 (method url-fetch)
10866 (uri (pypi-uri "pika" version))
10867 (sha256
10868 (base32
10869 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10870 (build-system python-build-system)
10871 (native-inputs
10872 `(("python-pyev" ,python-pyev)
10873 ("python-tornado" ,python-tornado)
10874 ("python-twisted" ,python-twisted)))
10875 (home-page "https://pika.readthedocs.org")
10876 (synopsis "Pure Python AMQP Client Library")
10877 (description
10878 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10879Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10880network support library.")
10881 (license license:bsd-3)))
10882
10883(define-public python2-pika
10884 (package-with-python2 python-pika))
10885
10886(define-public python-ply
10887 (package
10888 (name "python-ply")
10889 (version "3.10")
10890 (source
10891 (origin
10892 (method url-fetch)
10893 (uri (pypi-uri "ply" version))
10894 (sha256
10895 (base32
10896 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10897 (build-system python-build-system)
10898 (home-page "http://www.dabeaz.com/ply/")
10899 (synopsis "Python Lex & Yacc")
10900 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10901It uses LR parsing and does extensive error checking.")
10902 (license license:bsd-3)))
10903
10904(define-public python2-ply
10905 (package-with-python2 python-ply))
10906
10907(define-public python-tabulate
10908 (package
10909 (name "python-tabulate")
10910 (version "0.7.7")
10911 (source (origin
10912 (method url-fetch)
10913 (uri (pypi-uri "tabulate" version))
10914 (sha256
10915 (base32
10916 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10917 (build-system python-build-system)
10918 (arguments
10919 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10920 ;; and the latest release is not tagged in the upstream repository.
10921 '(#:tests? #f))
10922 (home-page "https://bitbucket.org/astanin/python-tabulate")
10923 (synopsis "Pretty-print tabular data")
10924 (description
10925 "Tabulate is a library and command-line utility to pretty-print tabular
10926data in Python.")
10927 (license license:expat)))
10928
10929(define-public python2-tabulate
10930 (package-with-python2 python-tabulate))
10931
10932(define-public python-kazoo
10933 (package
10934 (name "python-kazoo")
10935 (version "2.4.0")
10936 (source
10937 (origin
10938 (method url-fetch)
10939 (uri (pypi-uri "kazoo" version))
10940 (sha256
10941 (base32
10942 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10943 (build-system python-build-system)
10944 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10945 (propagated-inputs
10946 `(("python-six" ,python-six)))
10947 (home-page "https://kazoo.readthedocs.org")
10948 (synopsis "High-level Zookeeper client library")
10949 (description
10950 "Kazoo is a Python client library for the Apache Zookeeper distributed
10951application service. It is designed to be easy to use and to avoid common
10952programming errors.")
10953 (license license:asl2.0)))
10954
10955(define-public python2-kazoo
10956 (package-with-python2 python-kazoo))
10957
10958(define-public python-pykafka
10959 (package
10960 (name "python-pykafka")
10961 (version "2.4.0")
10962 (source (origin
10963 (method url-fetch)
0ca1d040 10964 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10965 (sha256
10966 (base32
10967 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10968 (build-system python-build-system)
10969 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10970 (propagated-inputs
10971 `(("python-gevent" ,python-gevent)
10972 ("python-kazoo" ,python-kazoo)
10973 ("python-tabulate" ,python-tabulate)))
10974 (inputs
10975 `(("librdkafka" ,librdkafka)))
10976 (home-page "https://pykafka.readthedocs.io/")
10977 (synopsis "Apache Kafka client for Python")
10978 (description
10979 "PyKafka is a client for the Apache Kafka distributed messaging system.
10980It includes Python implementations of Kafka producers and consumers, which
10981are optionally backed by a C extension built on librdkafka.")
10982 (license license:asl2.0)))
10983
10984(define-public python2-pykafka
10985 (package-with-python2 python-pykafka))
10986
10987(define-public python-wcwidth
28ac442b
MB
10988 (package
10989 (name "python-wcwidth")
574a71a7 10990 (version "0.1.8")
28ac442b
MB
10991 (source (origin
10992 (method url-fetch)
10993 (uri (pypi-uri "wcwidth" version))
10994 (sha256
10995 (base32
574a71a7 10996 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
28ac442b
MB
10997 (build-system python-build-system)
10998 (home-page "https://github.com/jquast/wcwidth")
10999 (synopsis "Measure number of terminal column cells of wide-character codes")
11000 (description "Wcwidth measures the number of terminal column cells of
44d10b1f
RW
11001wide-character codes. It is useful for those implementing a terminal emulator,
11002or programs that carefully produce output to be interpreted by one. It is a
11003Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11004specified in POSIX.1-2001 and POSIX.1-2008.")
28ac442b 11005 (license license:expat)))
44d10b1f
RW
11006
11007(define-public python2-wcwidth
11008 (package-with-python2 python-wcwidth))
11009
11010(define-public python2-jsonrpclib
11011 (package
11012 (name "python2-jsonrpclib")
11013 (version "0.1.7")
11014 (source (origin
11015 (method url-fetch)
6571bba0 11016 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
11017 (sha256
11018 (base32
11019 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11020 (build-system python-build-system)
11021 (arguments
11022 `(#:tests? #f
11023 #:python ,python-2))
11024 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11025 (synopsis "Implementation of JSON-RPC specification for Python")
11026 (description
11027 "This library is an implementation of the JSON-RPC specification.
11028It supports both the original 1.0 specification, as well as the
11029new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11030etc.")
11031 (license license:asl2.0)))
11032
11033(define-public python-chai
11034 (package
11035 (name "python-chai")
11036 (version "1.1.2")
11037 (source (origin
11038 (method url-fetch)
11039 (uri (pypi-uri "chai" version))
11040 (sha256
11041 (base32
11042 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
11043 (build-system python-build-system)
11044 (home-page "https://github.com/agoragames/chai")
11045 (synopsis "Mocking framework for Python")
11046 (description
11047 "Chai provides an api for mocking, stubbing and spying your python
11048objects, patterned after the Mocha library for Ruby.")
11049 (license license:bsd-3)))
11050
11051(define-public python2-chai
11052 (package-with-python2 python-chai))
11053
11054(define-public python-inflection
11055 (package
11056 (name "python-inflection")
11057 (version "0.3.1")
11058 (source
11059 (origin (method url-fetch)
11060 (uri (pypi-uri "inflection" version))
11061 (sha256
11062 (base32
11063 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11064 (build-system python-build-system)
11065 (native-inputs
11066 `(("python-pytest" ,python-pytest)))
11067 (home-page "https://github.com/jpvanhal/inflection")
11068 (synopsis "Python string transformation library")
11069 (description
11070 "Inflection is a string transformation library. It singularizes
11071and pluralizes English words, and transforms strings from CamelCase to
11072underscored string.")
11073 (license license:expat)))
11074
11075(define-public python2-inflection
11076 (package-with-python2 python-inflection))
11077
11078(define-public python-pylev
11079 (package
11080 (name "python-pylev")
11081 (version "1.3.0")
11082 (source (origin
11083 (method url-fetch)
11084 (uri (pypi-uri "pylev" version))
11085 (sha256
11086 (base32
11087 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11088 (build-system python-build-system)
11089 (home-page "https://github.com/toastdriven/pylev")
11090 (synopsis "Levenshtein distance implementation in Python")
11091 (description "Pure Python Levenshtein implementation, based off the
11092Wikipedia code samples at
11093@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11094 (license license:bsd-3)))
11095
11096(define-public python2-pylev
11097 (package-with-python2 python-pylev))
11098
11099(define-public python-cleo
11100 (package
11101 (name "python-cleo")
0c101a04 11102 (version "0.7.6")
44d10b1f
RW
11103 (source (origin
11104 (method url-fetch)
11105 (uri (pypi-uri "cleo" version))
11106 (sha256
11107 (base32
0c101a04 11108 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
44d10b1f
RW
11109 (build-system python-build-system)
11110 (native-inputs
af2d3713 11111 `( ;; For testing
44d10b1f
RW
11112 ("python-mock" ,python-mock)
11113 ("python-pytest-mock" ,python-pytest-mock)
11114 ("python-pytest" ,python-pytest)))
11115 (propagated-inputs
11116 `(("python-backpack" ,python-backpack)
0c101a04 11117 ("python-clikit" ,python-clikit)
44d10b1f
RW
11118 ("python-pastel" ,python-pastel)
11119 ("python-pylev" ,python-pylev)))
11120 (home-page "https://github.com/sdispater/cleo")
11121 (synopsis "Command-line arguments library for Python")
11122 (description
11123 "Cleo allows you to create command-line commands with signature in
11124docstring and colored output.")
11125 (license license:expat)))
11126
11127(define-public python2-cleo
11128 (package-with-python2 python-cleo))
11129
2be85c45
TLC
11130(define-public python-tomlkit
11131 (package
11132 (name "python-tomlkit")
f4b6ce21 11133 (version "0.5.11")
2be85c45
TLC
11134 (source
11135 (origin
11136 (method url-fetch)
11137 (uri (pypi-uri "tomlkit" version))
11138 (sha256
f4b6ce21 11139 (base32 "1kq1663iqxgwrmb883n55ypi5axnixla2hrby9g2x227asifsi7h"))))
2be85c45
TLC
11140 (build-system python-build-system)
11141 (native-inputs
11142 `(("python-pytest" ,python-pytest)))
2d3da186
TGR
11143 (home-page "https://github.com/sdispater/tomlkit")
11144 (synopsis "Style-preserving TOML library")
2be85c45
TLC
11145 (description
11146 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
11147preserves all comments, indentations, whitespace and internal element ordering,
11148and makes them accessible and editable via an intuitive API. It can also
11149create new TOML documents from scratch using the provided helpers. Part of the
2d3da186 11150implementation has been adapted, improved, and fixed from Molten.")
2be85c45
TLC
11151 (license license:expat)))
11152
0bb32201
TLC
11153(define-public python-shellingham
11154 (package
11155 (name "python-shellingham")
11156 (version "1.3.1")
11157 (source
11158 (origin
11159 (method url-fetch)
11160 (uri (pypi-uri "shellingham" version))
11161 (sha256
11162 (base32
11163 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
11164 (build-system python-build-system)
11165 (home-page
11166 "https://github.com/sarugaku/shellingham")
11167 (synopsis "Tool to detect surrounding shell")
11168 (description
11169 "Shellingham detects what shell the current Python executable is
11170running in.")
11171 (license license:isc)))
11172
aee92957
TLC
11173(define-public python-memcached
11174 (package
11175 (name "python-memcached")
11176 (version "1.59")
11177 (source
11178 (origin
11179 (method url-fetch)
11180 (uri (pypi-uri "python-memcached" version))
11181 (sha256
11182 (base32
11183 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
11184 (build-system python-build-system)
11185 (propagated-inputs `(("python-six" ,python-six)))
11186 (home-page
11187 "https://github.com/linsomniac/python-memcached")
11188 (synopsis "Pure python memcached client")
11189 (description
11190 "This software is a pure Python interface to the memcached memory cache
11191daemon. It is the client side software which allows storing values in one or
11192more, possibly remote, memcached servers.")
11193 (license license:psfl)))
11194
b2ac2508
TLC
11195(define-public python-clikit
11196 (package
11197 (name "python-clikit")
eac978ee 11198 (version "0.4.2")
b2ac2508
TLC
11199 (source
11200 (origin
11201 (method url-fetch)
11202 (uri (pypi-uri "clikit" version))
11203 (sha256
11204 (base32
eac978ee 11205 "1jnnr21hvzx4i29nbph1z96ympv0njiwyvngjq48w1q05133cwzn"))))
b2ac2508
TLC
11206 (build-system python-build-system)
11207 (propagated-inputs
11208 `(("python-pastel" ,python-pastel)
11209 ("python-pylev" ,python-pylev)))
11210 (home-page "https://github.com/sdispater/clikit")
11211 (synopsis "Group of utilities to build command line interfaces")
11212 (description
11213 "CliKit is a group of utilities to build testable command line
11214interfaces.")
0266a6a2 11215 (properties `((python2-variant . ,(delay python2-clikit))))
b2ac2508
TLC
11216 (license license:expat)))
11217
0266a6a2
MB
11218(define-public python2-clikit
11219 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
11220 (package/inherit
11221 base
11222 (propagated-inputs
11223 `(("python-enum34" ,python2-enum34)
11224 ("python-typing" ,python2-typing)
11225 ,@(package-propagated-inputs base))))))
11226
c6f008d6
TLC
11227(define-public python-msgpack-python
11228 (package
11229 (name "python-msgpack-python")
11230 (version "0.5.6")
11231 (source
11232 (origin
11233 (method url-fetch)
11234 (uri (pypi-uri "msgpack-python" version))
11235 (sha256
11236 (base32
11237 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
11238 (build-system python-build-system)
11239 (home-page "http://msgpack.org/")
11240 (synopsis "Package to deserialize messages in MessagePack binary format")
11241 (description
11242 "MessagePack is an efficient binary serialization format. It lets you
11243exchange data among multiple languages like JSON. But it's faster and
11244smaller. Small integers are encoded into a single byte, and typical short
11245strings require only one extra byte in addition to the strings themselves.")
11246 (license license:asl2.0)))
11247
badc1c63
TLC
11248(define-public python-cachy
11249 (package
11250 (name "python-cachy")
c2981188 11251 (version "0.3.0")
badc1c63
TLC
11252 (source
11253 (origin
11254 (method url-fetch)
11255 (uri (pypi-uri "cachy" version))
11256 (sha256
11257 (base32
c2981188 11258 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
badc1c63 11259 (build-system python-build-system)
c2981188
TLC
11260 (arguments
11261 '(#:phases
11262 (modify-phases %standard-phases
11263 (replace 'check
11264 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
11265 "pytest"))))))
badc1c63 11266 (native-inputs
c2981188
TLC
11267 `(("memcached" ,memcached)
11268 ("python-fakeredis" ,python-fakeredis)
badc1c63 11269 ("python-flexmock" ,python-flexmock)
c2981188 11270 ("python-pifpaf" ,python-pifpaf)
badc1c63
TLC
11271 ("python-pytest" ,python-pytest)))
11272 (propagated-inputs
11273 `(("python-memcached" ,python-memcached)
11274 ("python-msgpack-python" ,python-msgpack-python)
11275 ("python-redis" ,python-redis)))
11276 (home-page "https://github.com/sdispater/cachy")
11277 (synopsis "Simple yet effective caching library")
11278 (description
11279 "Cachy provides a simple yet effective caching library. A simple but
11280powerful API: thread-safety; decorator syntax; support for memcached, redis,
11281database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
11282 (license license:expat)))
11283
617bb67b
TLC
11284(define-public poetry
11285 (package
11286 (name "poetry")
97b1366d
TLC
11287 (version "1.0.5")
11288 ;; Poetry can only be built from source with Poetry.
617bb67b
TLC
11289 (source
11290 (origin
11291 (method url-fetch)
11292 (uri (pypi-uri "poetry" version))
11293 (sha256
11294 (base32
97b1366d 11295 "02h387k0xssvv78yy82pcpknpq4w5ym2in1zl8cg9r5wljl5w6cf"))))
617bb67b
TLC
11296 (build-system python-build-system)
11297 (arguments
11298 `(#:tests? #f ;; Pypi does not have tests.
11299 #:phases
11300 (modify-phases %standard-phases
97b1366d 11301 (add-before 'build 'patch-setup-py
617bb67b 11302 (lambda _
97b1366d
TLC
11303 (substitute* "setup.py"
11304 ;; poetry won't update version as 21.0.0 relies on python > 3.6
11305 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
11306 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.16.0")
11307 (("importlib-metadata>=1.1.3,<1.2.0") "importlib-metadata>=1.1.3,<1.5.0"))
617bb67b
TLC
11308 #t)))))
11309 (propagated-inputs
11310 `(("python-cachecontrol" ,python-cachecontrol)
11311 ("python-cachy" ,python-cachy)
11312 ("python-cleo" ,python-cleo)
97b1366d 11313 ("python-clikit" ,python-clikit)
617bb67b 11314 ("python-html5lib" ,python-html5lib)
97b1366d 11315 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
617bb67b 11316 ("python-jsonschema" ,python-jsonschema)
97b1366d
TLC
11317 ("python-keyring" ,python-keyring)
11318 ("python-pexpect" ,python-pexpect)
617bb67b
TLC
11319 ("python-pkginfo" ,python-pkginfo)
11320 ("python-pyparsing" ,python-pyparsing)
11321 ("python-pyrsistent" ,python-pyrsistent)
11322 ("python-requests" ,python-requests)
11323 ("python-requests-toolbelt" ,python-requests-toolbelt)
11324 ("python-shellingham" ,python-shellingham)
11325 ("python-tomlkit" ,python-tomlkit)
11326 ("python-virtualenv" ,python-virtualenv)))
97b1366d 11327 (home-page "https://python-poetry.org")
617bb67b
TLC
11328 (synopsis "Python dependency management and packaging made easy")
11329 (description "Poetry is a tool for dependency management and packaging
11330in Python. It allows you to declare the libraries your project depends on and
11331it will manage (install/update) them for you.")
11332 (license license:expat)))
11333
44d10b1f
RW
11334(define-public python-lazy-object-proxy
11335 (package
11336 (name "python-lazy-object-proxy")
7454078a 11337 (version "1.4.3")
44d10b1f
RW
11338 (source (origin
11339 (method url-fetch)
11340 (uri (pypi-uri "lazy-object-proxy" version))
11341 (sha256
11342 (base32
7454078a 11343 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
11344 (native-inputs
11345 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
11346 (build-system python-build-system)
11347 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11348 (synopsis "Lazy object proxy for python")
11349 (description
11350 "Lazy object proxy is an object that wraps a callable but defers the call
11351until the object is actually required, and caches the result of said call.")
11352 (license license:bsd-2)))
11353
11354(define-public python2-lazy-object-proxy
11355 (package-with-python2 python-lazy-object-proxy))
11356
11357(define-public python-dnspython
11358 (package
11359 (name "python-dnspython")
11360 (version "1.15.0")
11361 (source (origin
11362 (method url-fetch)
11363 (uri (string-append "http://www.dnspython.org/kits/"
11364 version "/dnspython-" version ".tar.gz"))
11365 (sha256
11366 (base32
11367 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11368 (build-system python-build-system)
11369 (arguments '(#:tests? #f)) ; XXX: requires internet access
11370 (home-page "http://www.dnspython.org")
11371 (synopsis "DNS toolkit for Python")
11372 (description
11373 "dnspython is a DNS toolkit for Python. It supports almost all record
11374types. It can be used for queries, zone transfers, and dynamic updates.
11375It supports TSIG authenticated messages and EDNS0.")
11376 (license license:expat)))
11377
11378(define-public python2-dnspython
11379 (package-with-python2 python-dnspython))
11380
11381(define-public python-email-validator
11382 (package
11383 (name "python-email-validator")
11384 (version "1.0.2")
11385 (source
11386 (origin (method url-fetch)
11387 (uri (pypi-uri "email_validator" version))
11388 (sha256
11389 (base32
11390 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11391 (build-system python-build-system)
11392 (arguments
11393 '(#:phases
11394 (modify-phases %standard-phases
11395 (add-before 'build 'use-dnspython
11396 (lambda _
11397 (substitute* "setup.py"
11398 (("dnspython3") "dnspython"))
11399 #t)))))
11400 (propagated-inputs
11401 `(("python-dnspython" ,python-dnspython)
11402 ("python-idna" ,python-idna)))
11403 (home-page "https://github.com/JoshData/python-email-validator")
11404 (synopsis "Email address validation library for Python")
11405 (description
11406 "This library validates email address syntax and deliverability.")
11407 (license license:cc0)))
11408
11409(define-public python2-email-validator
11410 (package-with-python2 python-email-validator))
11411
11412(define-public python-ukpostcodeparser
11413 (package
11414 (name "python-ukpostcodeparser")
11415 (version "1.0.3")
11416 (source (origin
11417 (method url-fetch)
11418 (uri (pypi-uri "UkPostcodeParser" version))
11419 (sha256
11420 (base32
11421 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11422 (build-system python-build-system)
11423 (home-page "https://github.com/hamstah/ukpostcodeparser")
11424 (synopsis "UK Postcode parser for Python")
11425 (description
11426 "This library provides the @code{parse_uk_postcode} function for
11427parsing UK postcodes.")
11428 (license license:expat)))
11429
11430(define-public python2-ukpostcodeparser
11431 (package-with-python2 python-ukpostcodeparser))
11432
11433(define-public python-faker
11434 (package
11435 (name "python-faker")
a6a73369 11436 (version "4.0.2")
44d10b1f
RW
11437 (source (origin
11438 (method url-fetch)
11439 (uri (pypi-uri "Faker" version))
11440 (sha256
11441 (base32
a6a73369 11442 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
44d10b1f
RW
11443 (build-system python-build-system)
11444 (arguments
11445 '(#:phases
11446 (modify-phases %standard-phases
11447 (replace 'check
a6a73369 11448 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
44d10b1f
RW
11449 (native-inputs
11450 `(;; For testing
a6a73369
MB
11451 ("python-freezegun" ,python-freezegun)
11452 ("python-pytest" ,python-pytest)
11453 ("python-random2" ,python-random2)
11454 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
11455 ("python-validators" ,python-validators)))
44d10b1f
RW
11456 (propagated-inputs
11457 `(("python-dateutil" ,python-dateutil)
a6a73369 11458 ("python-text-unidecode" ,python-text-unidecode)))
44d10b1f
RW
11459 (home-page "https://github.com/joke2k/faker")
11460 (synopsis "Python package that generates fake data")
11461 (description
11462 "Faker is a Python package that generates fake data such as names,
11463addresses, and phone numbers.")
11464 (license license:expat)
11465 (properties `((python2-variant . ,(delay python2-faker))))))
11466
a6a73369 11467;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
44d10b1f
RW
11468(define-public python2-faker
11469 (let ((base (package-with-python2 (strip-python2-variant
11470 python-faker))))
11471 (package
11472 (inherit base)
a6a73369
MB
11473 (version "3.0.1")
11474 (source (origin
11475 (method url-fetch)
11476 (uri (pypi-uri "Faker" version))
11477 (sha256
11478 (base32
11479 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
11480 (native-inputs
11481 `(("python-mock" ,python2-mock)
11482 ,@(package-native-inputs base)))
44d10b1f
RW
11483 (propagated-inputs
11484 `(("python2-ipaddress" ,python2-ipaddress)
85bad77f 11485 ("python2-six" ,python2-six)
44d10b1f
RW
11486 ,@(package-propagated-inputs base))))))
11487
11488(define-public python-pyaml
11489 (package
11490 (name "python-pyaml")
11491 (version "18.11.0")
11492 (source (origin
11493 (method url-fetch)
11494 (uri (pypi-uri "pyaml" version))
11495 (sha256
11496 (base32
11497 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
11498 (build-system python-build-system)
11499 (native-inputs
11500 `(("python-unidecode" ,python-unidecode)))
11501 (propagated-inputs
11502 `(("python-pyyaml" ,python-pyyaml)))
11503 (home-page "https://github.com/mk-fg/pretty-yaml")
11504 (synopsis "YAML pretty-print library for Python")
11505 (description
11506 "pyaml is a PyYAML based python module to produce pretty and readable
11507YAML-serialized data.")
492e3a7a 11508 (license license:wtfpl2)))
44d10b1f
RW
11509
11510(define-public python2-pyaml
11511 (package-with-python2 python-pyaml))
11512
11513(define-public python-backpack
11514 (package
11515 (name "python-backpack")
11516 (version "0.1")
11517 (source
11518 (origin
11519 (method url-fetch)
11520 (uri (pypi-uri "backpack" version))
11521 (sha256
11522 (base32
11523 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
11524 (build-system python-build-system)
11525 (native-inputs
11526 `(("python-pytest" ,python-pytest)
11527 ("python-nose" ,python-nose)))
11528 (propagated-inputs
11529 `(("python-simplejson" ,python-simplejson)))
11530 (home-page "https://github.com/sdispater/backpack")
11531 (synopsis "Utilities for working with Python collections")
11532 (description "Backpack provides some useful utilities for working with
11533collections of data.")
11534 (license license:expat)))
11535
11536(define-public python2-backpack
11537 (package-with-python2 python-backpack))
11538
11539(define-public python-prompt-toolkit
11540 (package
11541 (name "python-prompt-toolkit")
11542 (version "2.0.7")
11543 (source
11544 (origin
11545 (method url-fetch)
11546 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11547 (sha256
11548 (base32
11549 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
11550 (build-system python-build-system)
11551 (arguments
11552 `(#:phases
11553 (modify-phases %standard-phases
11554 (delete 'check)
11555 (add-after 'install 'post-install-check
11556 (lambda* (#:key inputs outputs #:allow-other-keys)
11557 ;; HOME is needed for the test
11558 ;; "test_pathcompleter_can_expanduser".
11559 (setenv "HOME" "/tmp")
11560 (add-installed-pythonpath inputs outputs)
11561 (invoke "py.test"))))))
11562 (propagated-inputs
11563 `(("python-wcwidth" ,python-wcwidth)
11564 ("python-six" ,python-six)
11565 ("python-pygments" ,python-pygments)))
11566 (native-inputs
11567 `(("python-pytest" ,python-pytest)))
11568 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11569 (synopsis "Library for building command line interfaces in Python")
11570 (description
11571 "Prompt-Toolkit is a library for building interactive command line
11572interfaces in Python. It's like GNU Readline but it also features syntax
11573highlighting while typing, out-of-the-box multi-line input editing, advanced
11574code completion, incremental search, support for Chinese double-width
11575characters, mouse support, and auto suggestions.")
11576 (license license:bsd-3)))
11577
11578(define-public python2-prompt-toolkit
11579 (package-with-python2 python-prompt-toolkit))
11580
11581(define-public python-prompt-toolkit-1
11582 (package (inherit python-prompt-toolkit)
11583 (version "1.0.15")
11584 (source
11585 (origin
11586 (method url-fetch)
11587 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11588 (sha256
11589 (base32
11590 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
11591
11592(define-public python2-prompt-toolkit-1
11593 (package-with-python2 python-prompt-toolkit-1))
11594
11595(define-public python-jedi
11596 (package
11597 (name "python-jedi")
745041b5 11598 (version "0.16.0")
44d10b1f
RW
11599 (source
11600 (origin
11601 (method url-fetch)
11602 (uri (pypi-uri "jedi" version))
745041b5 11603 (patches (search-patches "python-jedi-deleted-variables.patch"))
44d10b1f
RW
11604 (sha256
11605 (base32
745041b5 11606 "1mb5kmrk9bkc3kwzx02j62cdan1jqd92q1z7h7wi9d30jg5p3j6m"))))
44d10b1f
RW
11607 (build-system python-build-system)
11608 (arguments
296e1aea 11609 `(#:phases
44d10b1f
RW
11610 (modify-phases %standard-phases
11611 (replace 'check
296e1aea
MC
11612 (lambda _
11613 (setenv "HOME" "/tmp")
11614 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
11615 (native-inputs
11616 `(("python-pytest" ,python-pytest)
11617 ("python-docopt" ,python-docopt)))
11618 (propagated-inputs
11619 `(("python-parso" ,python-parso)))
11620 (home-page "https://github.com/davidhalter/jedi")
11621 (synopsis "Autocompletion and static analysis library for Python")
11622 (description
11623 "Jedi is a static analysis tool for Python that can be used in Integrated
11624Development Environments (@dfn{IDE}s) and text editors. It understands Python
11625on a deeper level than many other static analysis frameworks for Python.
11626
11627Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11628well.")
11629 (license license:expat)))
11630
11631(define-public python2-jedi
296e1aea 11632 (package-with-python2 python-jedi))
44d10b1f 11633
dcff9bda
MB
11634;; python-language-server requires 0.15 specifically. Remove once unused.
11635(define-public python-jedi-0.15
11636 (package
11637 (inherit python-jedi)
11638 (version "0.15.2")
11639 (source (origin
11640 (method url-fetch)
11641 (uri (pypi-uri "jedi" version))
11642 (sha256
11643 (base32
11644 "01zqasl690x1i6dq4mvh13pz0cw8i276xsivsrnn00x90iqm42g9"))))
11645 (propagated-inputs
11646 `(("python-parso" ,python-parso-0.5)))))
11647
44d10b1f
RW
11648(define-public ptpython
11649 (package
11650 (name "ptpython")
11651 (version "0.34")
11652 (source (origin
11653 (method url-fetch)
11654 (uri (pypi-uri "ptpython" version))
11655 (sha256
11656 (base32
11657 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11658 (build-system python-build-system)
11659 (arguments
11660 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11661 (propagated-inputs
11662 `(("python-docopt" ,python-docopt)
11663 ("python-jedi" ,python-jedi)
11664 ("python-prompt-toolkit" ,python-prompt-toolkit)
11665 ("python-pygments" ,python-pygments)))
11666 (home-page "https://github.com/jonathanslenders/ptpython")
11667 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11668 (description
11669 "ptpython is a Python read-eval-print loop with IDE-like features.
11670It supports syntax highlighting, multiline editing, autocompletion, mouse,
11671color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11672etc.")
11673 (license license:bsd-3)
11674 (properties `((python2-variant . ,(delay ptpython-2))))))
11675
11676(define-public ptpython-2
11677 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11678 (package
11679 (inherit base)
11680 (name "ptpython2"))))
11681
11682(define-public python-stem
11683 (package
11684 (name "python-stem")
a1dc5898 11685 (version "1.8.0")
44d10b1f
RW
11686 (source
11687 (origin
11688 (method url-fetch)
11689 (uri (pypi-uri "stem" version))
11690 (sha256
11691 (base32
a1dc5898 11692 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
44d10b1f
RW
11693 (build-system python-build-system)
11694 (arguments
11695 `(#:phases
11696 (modify-phases %standard-phases
11697 (replace 'check
11698 (lambda _
11699 (invoke "./run_tests.py" "--unit")
11700 #t)))))
11701 (native-inputs
11702 `(("python-mock" ,python-mock)
11703 ("python-pycodestyle" ,python-pycodestyle)
11704 ("python-pyflakes" ,python-pyflakes)))
11705 (home-page "https://stem.torproject.org/")
11706 (synopsis
11707 "Python controller library that allows applications to interact with Tor")
11708 (description
11709 "Stem is a Python controller library for Tor. With it you can use Tor's
11710control protocol to script against the Tor process and read descriptor data
11711relays publish about themselves.")
11712 (license license:lgpl3)))
11713
11714(define-public python2-stem
11715 (package-with-python2 python-stem))
11716
11717(define-public python-pyserial
11718 (package
11719 (name "python-pyserial")
00d81f98 11720 (version "3.4")
44d10b1f
RW
11721 (source
11722 (origin
11723 (method url-fetch)
11724 (uri (pypi-uri "pyserial" version))
11725 (sha256
11726 (base32
00d81f98 11727 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
44d10b1f
RW
11728 (build-system python-build-system)
11729 (arguments
11730 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11731 ;; #:phases
11732 ;; (modify-phases %standard-phases
11733 ;; (replace 'check
11734 ;; (lambda _
11735 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11736 (home-page
11737 "https://github.com/pyserial/pyserial")
11738 (synopsis "Python Serial Port Bindings")
11739 (description "@code{pyserial} provide serial port bindings for Python. It
11740supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11741and/or Xon/Xoff. The port is accessed in RAW mode.")
11742 (license license:bsd-3)))
11743
11744(define-public python2-pyserial
11745 (package-with-python2 python-pyserial))
11746
11747(define-public python-kivy
11748 (package
11749 (name "python-kivy")
11750 (version "1.10.1")
11751 (source
11752 (origin
11753 (method url-fetch)
11754 (uri (pypi-uri "Kivy" version))
11755 (file-name (string-append name "-" version ".tar.gz"))
11756 (sha256
11757 (base32
11758 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11759 (build-system python-build-system)
11760 (arguments
11761 `(#:tests? #f ; Tests require many optional packages
11762 #:phases
11763 (modify-phases %standard-phases
11764 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11765 (lambda* (#:key inputs #:allow-other-keys)
11766 (setenv "KIVY_SDL2_PATH"
11767 (string-append (assoc-ref inputs "sdl-union")
11768 "/include/SDL2"))
11769 #t)))))
11770 (native-inputs
aa0e4413 11771 `(("pkg-config" ,pkg-config)
44d10b1f
RW
11772 ("python-cython" ,python-cython)))
11773 (inputs
11774 `(("gstreamer" ,gstreamer)
11775 ("mesa" ,mesa)
11776 ("sdl-union"
11777 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
3d2d9cc7 11778 (home-page "https://kivy.org")
44d10b1f
RW
11779 (synopsis
11780 "Multitouch application framework")
11781 (description
11782 "A software library for rapid development of
11783hardware-accelerated multitouch applications.")
11784 (license license:expat)))
11785
11786(define-public python2-kivy
11787 (package-with-python2 python-kivy))
11788
44d10b1f
RW
11789(define-public python-binaryornot
11790 (package
11791 (name "python-binaryornot")
11792 (version "0.4.4")
11793 (source (origin
11794 (method url-fetch)
11795 (uri (pypi-uri "binaryornot" version))
11796 (sha256
11797 (base32
11798 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11799 (build-system python-build-system)
86723f98
DM
11800 (arguments
11801 `(#:phases
11802 (modify-phases %standard-phases
ee623903 11803 (add-after 'unpack 'patch-tests
86723f98
DM
11804 (lambda _
11805 ;; TypeError: binary() got an unexpected keyword argument
11806 ;; 'average_size'.
11807 (substitute* "tests/test_check.py"
11808 (("average_size=512") ""))
11809 #t)))))
44d10b1f
RW
11810 (propagated-inputs
11811 `(("python-chardet" ,python-chardet)
11812 ("python-hypothesis" ,python-hypothesis)))
11813 (home-page "https://github.com/audreyr/binaryornot")
11814 (synopsis "Package to check if a file is binary or text")
11815 (description "Ultra-lightweight pure Python package to check if a file is
11816binary or text.")
11817 (license license:bsd-3)
11818 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11819
11820(define-public python2-binaryornot
11821 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11822 (package (inherit base)
11823 (propagated-inputs
11824 `(("python2-enum34" ,python2-enum34)
11825 ,@(package-propagated-inputs base))))))
11826
f315673d 11827(define-public python-binwalk
9b9ab657
JK
11828 (package
11829 (name "python-binwalk")
11830 (version "2.2.0")
11831 (source
11832 (origin
11833 (method git-fetch)
11834 (uri (git-reference
11835 (url "https://github.com/ReFirmLabs/binwalk")
11836 (commit (string-append "v" version))))
11837 (file-name (git-file-name name version))
11838 (sha256
11839 (base32
11840 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
11841 (build-system python-build-system)
11842 (arguments
11843 `(#:phases
11844 (modify-phases %standard-phases
11845 (add-before 'check 'set-pythonpath
11846 (lambda _
11847 (setenv "PYTHONPATH"
11848 (string-append
11849 (getcwd) "/src/"
11850 ":" (getenv "PYTHONPATH")))
11851 (setenv "HOME" "")
11852 #t)))))
11853 (native-inputs
11854 `(("python-coverage" ,python-coverage)
11855 ("python-nose" ,python-nose)))
11856 (home-page "https://github.com/ReFirmLabs/binwalk")
11857 (synopsis "Firmware analysis tool")
11858 (description "Binwalk is a tool for analyzing, reverse engineering, and
11859extracting firmware images")
11860 (license license:expat)))
f315673d 11861
44d10b1f
RW
11862(define-public python-nltk
11863 (package
11864 (name "python-nltk")
11865 (version "3.2.1")
11866 (source (origin
11867 (method url-fetch)
11868 (uri (pypi-uri "nltk" version))
11869 (sha256
11870 (base32
11871 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11872 (build-system python-build-system)
11873 (arguments
11874 '(;; The tests require some extra resources to be downloaded.
11875 ;; TODO Try packaging these resources.
11876 #:tests? #f))
11877 (home-page "http://nltk.org/")
11878 (synopsis "Natural Language Toolkit")
11879 (description "It provides interfaces to over 50 corpora and lexical
11880resources such as WordNet, along with a suite of text processing libraries
11881for classification, tokenization, stemming, tagging, parsing, and semantic
11882reasoning, wrappers for natural language processing libraries.")
11883 (license license:asl2.0)))
11884
11885(define-public python2-nltk
11886 (package-with-python2 python-nltk))
11887
11888(define-public python-pymongo
11889 (package
11890 (name "python-pymongo")
11891 (version "3.7.2")
11892 (source (origin
11893 (method url-fetch)
11894 (uri (pypi-uri "pymongo" version))
11895 (sha256
11896 (base32
11897 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11898 (build-system python-build-system)
11899 (propagated-inputs
11900 `(("python-certifi" ,python-certifi)))
11901 (home-page "https://github.com/mongodb/mongo-python-driver")
11902 (synopsis "Python driver for MongoDB")
11903 (description "Python driver for MongoDB.")
11904 (license license:asl2.0)))
11905
11906(define-public python2-pymongo
11907 (package-with-python2 python-pymongo))
11908
44d10b1f
RW
11909(define-public python-consul
11910 (package
11911 (name "python-consul")
11912 (version "0.6.1")
11913 (source
11914 (origin
11915 (method url-fetch)
11916 (uri (pypi-uri "python-consul" version))
11917 (sha256
11918 (base32
11919 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11920 (build-system python-build-system)
11921 (arguments
11922 '(#:tests? #f)) ; The tests are not distributed
11923 (propagated-inputs
11924 `(("python-requests" ,python-requests)
11925 ("python-six" ,python-six)))
11926 (home-page "https://github.com/cablehead/python-consul")
11927 (synopsis "Python client for Consul")
11928 (description
11929 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11930discovery, monitoring and configuration.")
11931 (license license:expat)))
11932
11933(define-public python2-consul
11934 (package-with-python2 python-consul))
11935
11936(define-public python-schematics
11937 (package
11938 (name "python-schematics")
11939 (version "1.1.1")
11940 (source
1961d187
TGR
11941 (origin
11942 (method git-fetch)
11943 (uri (git-reference
11944 (url "https://github.com/schematics/schematics.git")
11945 (commit (string-append "v" version))))
11946 (file-name (git-file-name name version))
11947 (sha256
11948 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11949 (build-system python-build-system)
11950 (propagated-inputs
11951 `(("python-six" ,python-six)))
11952 (arguments
1961d187
TGR
11953 ;; The tests require a bunch of not very nice packages with fixed
11954 ;; version requirements (e.g. python-coveralls).
11955 `(#:tests? #f))
44d10b1f
RW
11956 (home-page "https://github.com/schematics/schematics")
11957 (synopsis "Python Data Structures for Humans")
11958 (description "Python Data Structures for Humans.")
11959 (license license:bsd-3)))
11960
11961(define-public python2-schematics
11962 (package-with-python2 python-schematics))
11963
11964(define-public python-odfpy
11965 (package
11966 (name "python-odfpy")
11967 (version "1.3.3")
11968 (source (origin
11969 (method url-fetch)
11970 (uri (pypi-uri "odfpy" version))
11971 (sha256
11972 (base32
11973 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11974 (arguments
11975 `(#:modules ((srfi srfi-1)
11976 (guix build python-build-system)
11977 (guix build utils))
11978 #:phases
11979 (modify-phases %standard-phases
11980 (replace 'check
11981 ;; The test runner invokes python2 and python3 for test*.py.
11982 ;; To avoid having both in inputs, we replicate it here.
11983 (lambda _
21ccc01d
RW
11984 (for-each (lambda (test-file) (invoke "python" test-file))
11985 (find-files "tests" "^test.*\\.py$"))
11986 #t)))))
44d10b1f
RW
11987 (build-system python-build-system)
11988 (home-page "https://github.com/eea/odfpy")
11989 (synopsis "Python API and tools to manipulate OpenDocument files")
11990 (description "Collection of libraries and utility programs written in
11991Python to manipulate OpenDocument 1.2 files.")
11992 (license
11993 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11994 ;; number of files with other licenses.
11995 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11996
11997(define-public python2-odfpy
11998 (package-with-python2 python-odfpy))
11999
12000(define-public python-natsort
12001 (package
12002 (name "python-natsort")
e3da9b2e 12003 (version "7.0.1")
44d10b1f
RW
12004 (source (origin
12005 (method url-fetch)
12006 (uri (pypi-uri "natsort" version))
12007 (sha256
12008 (base32
e3da9b2e 12009 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
44d10b1f
RW
12010 (build-system python-build-system)
12011 (arguments
12012 `(#:modules ((guix build utils)
12013 (guix build python-build-system)
12014 (srfi srfi-1)
12015 (srfi srfi-26)
12016 (ice-9 ftw))
12017 #:phases
12018 (modify-phases %standard-phases
12019 (add-before 'check 'set-cachedir
12020 ;; Tests require write access to $HOME by default
12021 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
12022 (replace 'check
12023 (lambda _
12024 (let ((cwd (getcwd)))
12025 (setenv "PYTHONPATH"
12026 (string-append
12027 cwd "/build/"
12028 (find (cut string-prefix? "lib" <>)
12029 (scandir (string-append cwd "/build")))
12030 ":"
12031 (getenv "PYTHONPATH")))
12032 (invoke "pytest" "-v")))))))
12033 (native-inputs
12034 `(("python-hypothesis" ,python-hypothesis)
12035 ("python-pytest-cov" ,python-pytest-cov)
12036 ("python-pytest-mock" ,python-pytest-mock)
12037 ("python-pytest" ,python-pytest)))
12038 (propagated-inputs ; TODO: Add python-fastnumbers.
12039 `(("python-pyicu" ,python-pyicu)))
12040 (home-page "https://github.com/SethMMorton/natsort")
12041 (synopsis "Natural sorting for python and shell")
12042 (description
12043 "Natsort lets you apply natural sorting on lists instead of
12044lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
12045on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
12046@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
12047@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
12048identifies numbers and sorts them separately from strings. It can also sort
12049version numbers, real numbers, mixed types and more, and comes with a shell
12050command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
12051 (license license:expat)
12052 (properties `((python2-variant . ,(delay python2-natsort))))))
12053
e3da9b2e 12054;; Natsort 6.x are the last versions with support for Python 2.
44d10b1f
RW
12055(define-public python2-natsort
12056 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12057 (package (inherit base)
e3da9b2e
MB
12058 (version "6.2.1")
12059 (source (origin
12060 (method url-fetch)
12061 (uri (pypi-uri "natsort" version))
12062 (sha256
12063 (base32
12064 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
44d10b1f
RW
12065 (native-inputs
12066 `(("python2-pathlib" ,python2-pathlib)
12067 ,@(package-native-inputs base))))))
12068
58d90274 12069(define-public glances
44d10b1f 12070 (package
58d90274 12071 (name "glances")
b8e777ef 12072 (version "3.1.4")
44d10b1f
RW
12073 (source
12074 (origin
12075 (method url-fetch)
12076 (uri (pypi-uri "Glances" version))
12077 (sha256
b8e777ef 12078 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
15b4c911
TGR
12079 (modules '((guix build utils)))
12080 (snippet
12081 '(begin
12082 ;; Glances phones PyPI for weekly update checks by default.
12083 ;; Disable these. The user can re-enable them if desired.
12084 (substitute* "glances/outdated.py"
12085 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
12086 (string-append indentation
12087 "self.args.disable_check_update = True\n"
12088 line)))
12089 #t))))
44d10b1f
RW
12090 (build-system python-build-system)
12091 (propagated-inputs
9898a2d3
TGR
12092 `(("python-future" ,python-future)
12093 ("python-psutil" ,python-psutil)))
a4ac25df 12094 (home-page "https://github.com/nicolargo/glances")
bab94ffa 12095 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
12096 (description
12097 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
12098Glances uses the PsUtil library to get information from your system. It
12099monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
12100 (license license:lgpl3+)))
12101
58d90274
TGR
12102(define-public python-glances
12103 (deprecated-package "python-glances" glances))
12104
44d10b1f
RW
12105(define-public python-graphql-core
12106 (package
12107 (name "python-graphql-core")
12108 (version "0.5.3")
12109 (source
12110 (origin
12111 (method url-fetch)
12112 (uri (pypi-uri "graphql-core" version))
12113 (sha256
12114 (base32
12115 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12116 (build-system python-build-system)
12117 (arguments
12118 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12119 #:phases
12120 (modify-phases %standard-phases
12121 (add-after 'unpack 'patch-hardcoded-version
12122 (lambda _ (substitute*
12123 "setup.py"
12124 (("'gevent==1.1rc1'") "'gevent'"))
12125 #t)))))
12126 (native-inputs
12127 `(("python-gevent" ,python-gevent)
12128 ("python-mock" ,python-mock)
12129 ("python-pytest-mock" ,python-pytest-mock)))
12130 (propagated-inputs
12131 `(("python-promise" ,python-promise)
12132 ("python-six" ,python-six)))
12133 (home-page "https://github.com/graphql-python/graphql-core")
12134 (synopsis "GraphQL implementation for Python")
12135 (description
12136 "GraphQL implementation for Python. GraphQL is a data query language and
12137runtime designed and used to request and deliver data to mobile and web apps.
12138This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12139to Python.")
12140 (license license:expat)))
12141
12142(define-public python2-graphql-core
12143 (package-with-python2 python-graphql-core))
12144
12145(define-public python-graphql-relay
12146 (package
12147 (name "python-graphql-relay")
12148 (version "0.4.5")
12149 (source
12150 (origin
12151 (method url-fetch)
12152 (uri (pypi-uri "graphql-relay" version))
12153 (sha256
12154 (base32
12155 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12156 (build-system python-build-system)
12157 (arguments
12158 '(#:tests? #f)) ; The tests are not distributed
12159 (propagated-inputs
12160 `(("python-graphql-core" ,python-graphql-core)
12161 ("python-promise" ,python-promise)
12162 ("python-six" ,python-six)))
12163 (home-page "https://github.com/graphql-python/graphql-relay-py")
12164 (synopsis "Relay implementation for Python")
12165 (description
12166 "This is a library to allow the easy creation of Relay-compliant servers
12167using the GraphQL Python reference implementation of a GraphQL server. It
12168should be noted that the code is a exact port of the original
12169@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12170from Facebook.")
12171 (license license:expat)))
12172
12173(define-public python2-graphql-relay
12174 (package-with-python2 python-graphql-relay))
12175
12176(define-public python-graphene
12177 (package
12178 (name "python-graphene")
12179 (version "0.10.2")
12180 (source
12181 (origin
12182 (method url-fetch)
12183 (uri (pypi-uri "graphene" version))
12184 (sha256
12185 (base32
12186 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12187 (build-system python-build-system)
12188 (propagated-inputs
12189 `(("python-graphql-core" ,python-graphql-core)
12190 ("python-graphql-relay" ,python-graphql-relay)
12191 ("python-iso8601" ,python-iso8601)
12192 ("python-promise" ,python-promise)
12193 ("python-six" ,python-six)))
12194 (arguments
12195 `(#:tests? #f)) ; no tests/ in the PyPI tarball
3dd74c8d 12196 (home-page "https://graphene-python.org/")
44d10b1f
RW
12197 (synopsis "GraphQL Framework for Python")
12198 (description
12199 "Graphene is a Python library for building GraphQL schemas/types.
12200A GraphQL schema describes your data model, and provides a GraphQL server
12201with an associated set of resolve methods that know how to fetch data.")
12202 (properties `((python2-variant . ,(delay python2-graphene))))
12203 (license license:expat)))
12204
12205(define-public python2-graphene
12206 (let ((base (package-with-python2
12207 (strip-python2-variant python-graphene))))
12208 (package (inherit base)
12209 (native-inputs
12210 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12211 ,@(package-native-inputs base))))))
12212
12213(define-public python-nautilus
12214 (package
12215 (name "python-nautilus")
12216 (version "0.4.9")
12217 (source
12218 (origin
12219 (method url-fetch)
12220 (uri (pypi-uri "nautilus" version))
12221 (sha256
12222 (base32
12223 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12224 (build-system python-build-system)
12225 (arguments `(#:tests? #f)) ; fails to import test modules
12226 (propagated-inputs
12227 `(("python-bcrypt" ,python-bcrypt)
12228 ("python-click" ,python-click)
12229 ("python-consul" ,python-consul)
12230 ("python-graphene" ,python-graphene)
12231 ("python-jinja2" ,python-jinja2)
12232 ("python-peewee" ,python-peewee)
12233 ("python-pika" ,python-pika)
12234 ("python-tornado" ,python-tornado)
12235 ("python-wtforms" ,python-wtforms)))
12236 (native-inputs
12237 `(("python-nose2" ,python-nose2)))
12238 (home-page "https://github.com/AlecAivazis/nautilus")
12239 (synopsis "Library for creating microservice applications")
12240 (description
12241 "Nautilus is a framework for flux based microservices that looks to
12242provide extendible implementations of common aspects of a cloud so that you can
12243focus on building massively scalable web applications.")
12244 (license license:expat)))
12245
fe36fdb2
MB
12246(define-public python-random2
12247 (package
12248 (name "python-random2")
12249 (version "1.0.1")
12250 (source (origin
12251 (method url-fetch)
12252 (uri (pypi-uri "random2" version ".zip"))
12253 (sha256
12254 (base32
12255 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
12256 (build-system python-build-system)
12257 (native-inputs `(("unzip" ,unzip)))
12258 (home-page "http://pypi.python.org/pypi/random2")
12259 (synopsis "Python 3 version of the Python 2 @code{random} module")
12260 (description
12261 "This package provides a Python 3 ported version of Python 2.7’s
12262@code{random} module. It has also been back-ported to work in Python 2.6.
12263
12264In Python 3, the implementation of @code{randrange()} was changed, so that
12265even with the same seed you get different sequences in Python 2 and 3.
12266
12267This package closes that gap, allowing stable random number generation
12268between the different Python versions.")
12269 (license license:psfl)))
12270
12271(define-public python2-random2
12272 (package-with-python2 python-random2))
12273
44d10b1f
RW
12274(define-public python-snowballstemmer
12275 (package
12276 (name "python-snowballstemmer")
9b54d319 12277 (version "2.0.0")
44d10b1f
RW
12278 (source (origin
12279 (method url-fetch)
12280 (uri (pypi-uri "snowballstemmer" version))
12281 (sha256
12282 (base32
9b54d319 12283 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
44d10b1f
RW
12284 (build-system python-build-system)
12285 (arguments
12286 `(;; No tests exist
12287 #:tests? #f))
12288 (home-page "https://github.com/shibukawa/snowball_py")
12289 (synopsis "Snowball stemming library collection for Python")
12290 (description "This package provides 16 word stemmer algorithms generated
12291from Snowball algorithms. It includes the 15 original ones plus the Poerter
12292English stemmer.")
12293 (license license:bsd-3)))
12294
12295(define-public python2-snowballstemmer
12296 (package-with-python2 python-snowballstemmer))
12297
44d10b1f
RW
12298(define-public python-setproctitle
12299(package
12300 (name "python-setproctitle")
12301 (version "1.1.10")
12302 (source
12303 (origin
12304 (method url-fetch)
12305 (uri (pypi-uri "setproctitle" version))
12306 (sha256
12307 (base32
12308 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12309 (build-system python-build-system)
12310 (arguments
12311 '(#:phases
12312 (modify-phases %standard-phases
12313 (add-before 'check 'patch-Makefile
12314 ;; Stricly this is only required for the python2 variant.
12315 ;; But adding a phase in an inherited package seems to be
12316 ;; cumbersum. So we patch even for python3.
12317 (lambda _
12318 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12319 (when nose
12320 (substitute* "Makefile"
12321 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12322 (string-append nose "/bin/nosetests "))))
12323 #t)))
12324 (replace 'check
12325 (lambda _
12326 (setenv "PYTHON" (or (which "python3") (which "python")))
12327 (setenv "PYCONFIG" (or (which "python3-config")
12328 (which "python-config")))
12329 (setenv "CC" "gcc")
12330 ;; No need to extend PYTHONPATH to find the built package, since
12331 ;; the Makefile will build anyway
12332 (invoke "make" "check"))))))
12333 (native-inputs
12334 `(("procps" ,procps))) ; required for tests
12335 (home-page
12336 "https://github.com/dvarrazzo/py-setproctitle")
12337 (synopsis
12338 "Setproctitle implementation for Python to customize the process title")
12339 (description "The library allows a process to change its title (as displayed
12340by system tools such as ps and top).
12341
12342Changing the title is mostly useful in multi-process systems, for
12343example when a master process is forked: changing the children's title
12344allows to identify the task each process is busy with. The technique
12345is used by PostgreSQL and the OpenSSH Server for example.")
12346 (license license:bsd-3)
12347 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12348
12349(define-public python2-setproctitle
12350 (let ((base (package-with-python2
12351 (strip-python2-variant python-setproctitle))))
12352 (package
12353 (inherit base)
12354 (native-inputs `(("python2-nose" ,python2-nose)
12355 ,@(package-native-inputs base))))))
12356
12357(define-public python-validictory
12358 (package
12359 (name "python-validictory")
12360 (version "1.0.1")
12361 (source
12362 (origin
12363 (method url-fetch)
12364 (uri (pypi-uri "validictory" version))
12365 (sha256
12366 (base32
12367 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12368 (build-system python-build-system)
12369 (arguments
12370 '(#:phases
12371 (modify-phases %standard-phases
12372 (add-after 'unpack 'bootstrap
12373 ;; Move the tests out of the package directory to avoid
12374 ;; packaging them.
12375 (lambda* _
12376 (rename-file "validictory/tests" "tests")
12377 (delete-file "tests/__init__.py")))
12378 (replace 'check
12379 (lambda _
12380 ;; Extend PYTHONPATH so the built package will be found.
12381 (setenv "PYTHONPATH"
12382 (string-append (getcwd) "/build/lib:"
12383 (getenv "PYTHONPATH")))
6568bd5d 12384 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
12385 (native-inputs
12386 `(("python-pytest" ,python-pytest)))
12387 (home-page
12388 "https://github.com/jamesturk/validictory")
12389 (synopsis "General purpose Python data validator")
12390 (description "It allows validation of arbitrary Python data structures.
12391
12392The schema format is based on the JSON Schema
12393proposal (http://json-schema.org), so combined with json the library is also
12394useful as a validator for JSON data.")
12395 (license license:expat)))
12396
12397(define-public python2-validictory
12398 (package-with-python2 python-validictory))
12399
12400(define-public python-pyelftools
12401 (package
12402 (name "python-pyelftools")
12403 (version "0.25")
12404 (source
12405 (origin
12406 (method url-fetch)
12407 (uri (pypi-uri "pyelftools" version))
12408 (sha256
12409 (base32
12410 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
12411 (build-system python-build-system)
12412 (arguments
12413 `(#:phases
12414 (modify-phases %standard-phases
12415 (add-before 'check 'set-pythonpath
12416 (lambda _
12417 (setenv "PYTHONPATH"
12418 (string-append
12419 (getcwd) "/test/"
12420 ":" (getenv "PYTHONPATH")))
12421 #t)))))
12422 (home-page
12423 "https://github.com/eliben/pyelftools")
12424 (synopsis
12425 "Analyze binary and library file information")
12426 (description "This Python library provides interfaces for parsing and
12427analyzing two binary and library file formats; the Executable and Linking
12428Format (ELF), and debugging information in the Debugging With Attributed
12429Record Format (DWARF).")
12430 (license license:public-domain)))
12431
12432(define-public python-pyev
12433 (package
12434 (name "python-pyev")
12435 (version "0.9.0")
12436 (source
12437 (origin
12438 (method url-fetch)
12439 (uri (pypi-uri "pyev" version))
12440 (sha256
12441 (base32
12442 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12443 (build-system python-build-system)
12444 (arguments
12445 `(#:tests? #f ; no test suite
12446 #:phases
12447 (modify-phases %standard-phases
12448 (add-after 'unpack 'patch
12449 (lambda* (#:key inputs #:allow-other-keys)
12450 (let ((libev (string-append (assoc-ref inputs "libev")
12451 "/lib/libev.so.4")))
12452 (substitute* "setup.py"
12453 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12454 (string-append "libev_dll_name = \"" libev "\"")))))))))
12455 (inputs
12456 `(("libev" ,libev)))
12457 (home-page "http://pythonhosted.org/pyev/")
12458 (synopsis "Python libev interface")
12459 (description "Pyev provides a Python interface to libev.")
12460 (license license:gpl3)))
12461
12462(define-public python2-pyev
12463 (package-with-python2 python-pyev))
12464
12465(define-public python-imagesize
12466 (package
12467 (name "python-imagesize")
318c6a5a 12468 (version "1.2.0")
44d10b1f
RW
12469 (source
12470 (origin
12471 (method url-fetch)
12472 (uri (pypi-uri "imagesize" version))
12473 (sha256
12474 (base32
318c6a5a 12475 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
44d10b1f
RW
12476 (build-system python-build-system)
12477 (home-page "https://github.com/shibukawa/imagesize_py")
12478 (synopsis "Gets image size of files in various formats in Python")
12479 (description
12480 "This package allows determination of image size from
12481PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12482 (license license:expat)))
12483
12484(define-public python2-imagesize
12485 (package-with-python2 python-imagesize))
12486
12487(define-public python-termstyle
12488 (package
12489 (name "python-termstyle")
12490 (version "0.1.11")
12491 (source
12492 (origin
12493 (method url-fetch)
12494 (uri (pypi-uri "termstyle" version))
12495 (sha256
12496 (base32
12497 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12498 (build-system python-build-system)
12499 (arguments
12500 '(#:phases
12501 (modify-phases %standard-phases
12502 (replace 'check
12503 (lambda _
831080a6 12504 (invoke "python" "test3.py"))))))
44d10b1f
RW
12505 (home-page "https://github.com/gfxmonk/termstyle")
12506 (synopsis "Console text coloring for Python")
12507 (description "This package provides console text coloring for Python.")
12508 (license license:bsd-3)))
12509
12510(define-public python-argcomplete
12511 (package
12512 (name "python-argcomplete")
98aecd3a 12513 (version "1.10.3")
44d10b1f 12514 (source
98aecd3a
RW
12515 (origin
12516 (method url-fetch)
12517 (uri (pypi-uri "argcomplete" version))
12518 (sha256
12519 (base32
12520 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
44d10b1f 12521 (build-system python-build-system)
98aecd3a
RW
12522 (arguments
12523 `(#:phases
12524 (modify-phases %standard-phases
12525 (add-after 'unpack 'embed-tool-references
12526 (lambda _
12527 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
12528 ((" grep")
12529 (string-append " " (which "grep")))
12530 ((" egrep")
12531 (string-append " " (which "egrep")))
12532 (("elif which")
12533 (string-append "elif " (which "which")))
12534 (("\\$\\(which")
12535 (string-append "$(" (which "which"))))
12536 #t)))))
12537 (inputs
12538 `(("grep" ,grep)
12539 ("which" ,which)))
44d10b1f 12540 (native-inputs
98aecd3a
RW
12541 `(("python-coverage" ,python-coverage)
12542 ("python-flake8" ,python-flake8)
12543 ("python-pexpect" ,python-pexpect)
12544 ("python-wheel" ,python-wheel)
44d10b1f 12545 ("tcsh" ,tcsh)
98aecd3a
RW
12546 ("fish" ,fish)
12547 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
44d10b1f
RW
12548 (home-page "https://github.com/kislyuk/argcomplete")
12549 (synopsis "Shell tab completion for Python argparse")
12550 (description "argcomplete provides extensible command line tab completion
12551of arguments and options for Python scripts using @code{argparse}. It's
12552particularly useful for programs with many options or sub-parsers that can
12553dynamically suggest completions; for example, when browsing resources over the
12554network.")
12555 (license license:asl2.0)))
12556
12557(define-public python2-argcomplete
12558 (package-with-python2 python-argcomplete))
12559
12560(define-public python-xopen
12561 (package
12562 (name "python-xopen")
24d64989 12563 (version "0.5.0")
44d10b1f
RW
12564 (source
12565 (origin
12566 (method url-fetch)
12567 (uri (pypi-uri "xopen" version))
12568 (sha256
12569 (base32
24d64989 12570 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 12571 (build-system python-build-system)
24d64989
RW
12572 (propagated-inputs
12573 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
12574 (home-page "https://github.com/marcelm/xopen/")
12575 (synopsis "Open compressed files transparently")
12576 (description "This module provides an @code{xopen} function that works like
12577Python's built-in @code{open} function, but can also deal with compressed files.
12578Supported compression formats are gzip, bzip2 and, xz, and are automatically
12579recognized by their file extensions. The focus is on being as efficient as
12580possible on all supported Python versions.")
12581 (license license:expat)))
12582
12583(define-public python2-xopen
12584 (let ((base (package-with-python2
12585 (strip-python2-variant python-xopen))))
12586 (package
12587 (inherit base)
12588 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
12589 ,@(package-propagated-inputs base))))))
12590
12591(define-public python-cheetah
12592 (package
12593 (name "python-cheetah")
12594 (version "3.1.0")
12595 (source
12596 (origin
12597 (method url-fetch)
12598 (uri (pypi-uri "Cheetah3" version))
12599 (sha256
12600 (base32
12601 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
12602 (build-system python-build-system)
12603 (arguments
12604 `(#:modules ((guix build utils)
12605 (guix build python-build-system)
12606 (ice-9 ftw)
12607 (srfi srfi-1)
12608 (srfi srfi-26))
12609 #:phases (modify-phases %standard-phases
12610 (add-after 'unpack 'use-absolute-python
12611 (lambda _
12612 (substitute* "Cheetah/CheetahWrapper.py"
12613 (("#!/usr/bin/env python")
12614 (string-append "#!" (which "python"))))
12615 #t))
12616 (replace 'check
12617 (lambda _
12618 (let ((cwd (getcwd)))
12619 (setenv "PYTHONPATH"
12620 (string-append
12621 cwd "/build/"
12622 (find (cut string-prefix? "lib" <>)
12623 (scandir (string-append cwd "/build")))
12624 ":" (getenv "PYTHONPATH")))
12625 (setenv "PATH"
12626 (string-append (getenv "PATH")
12627 ":" cwd "/bin"))
12628 (setenv "TMPDIR" "/tmp")
12629
12630 (substitute* "Cheetah/Tests/Test.py"
12631 (("unittest.TextTestRunner\\(\\)")
12632 "unittest.TextTestRunner(verbosity=2)"))
12633
12634 (invoke "python" "Cheetah/Tests/Test.py")))))))
12635 (propagated-inputs
12636 `(("python-markdown" ,python-markdown))) ;optional
012d2950 12637 (home-page "https://cheetahtemplate.org/")
44d10b1f
RW
12638 (synopsis "Template engine")
12639 (description "Cheetah is a text-based template engine and Python code
12640generator.
12641
12642Cheetah can be used as a standalone templating utility or referenced as
12643a library from other Python applications. It has many potential uses,
12644but web developers looking for a viable alternative to ASP, JSP, PHP and
12645PSP are expected to be its principle user group.
12646
12647Features:
12648@enumerate
12649@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12650 text-based format.
12651@item Cleanly separates content, graphic design, and program code.
12652@item Blends the power and flexibility of Python with a simple template language
12653 that non-programmers can understand.
12654@item Gives template writers full access to any Python data structure, module,
12655 function, object, or method in their templates.
12656@item Makes code reuse easy by providing an object-orientated interface to
12657 templates that is accessible from Python code or other Cheetah templates.
12658 One template can subclass another and selectively reimplement sections of it.
12659@item Provides a simple, yet powerful, caching mechanism that can dramatically
12660 improve the performance of a dynamic website.
12661@item Compiles templates into optimized, yet readable, Python code.
12662@end enumerate")
12663 (license (license:x11-style "file://LICENSE"))))
12664
12665(define-public python2-cheetah
12666 (package-with-python2 python-cheetah))
12667
12668(define-public python-dulwich
12669 (package
12670 (name "python-dulwich")
12671 (version "0.18.6")
12672 (source
12673 (origin
12674 (method url-fetch)
12675 (uri (list (string-append "https://www.dulwich.io/releases/"
12676 "dulwich-" version ".tar.gz")
12677 (pypi-uri "dulwich" version)))
12678 (sha256
12679 (base32
12680 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12681 (build-system python-build-system)
12682 (arguments
12683 `(#:phases
12684 (modify-phases %standard-phases
12685 (add-before 'check 'fix-tests
12686 (lambda* (#:key inputs #:allow-other-keys)
12687 ;; The tests use Popen with a custom environment which doesn't
12688 ;; include PATH.
12689 (substitute* "dulwich/tests/compat/utils.py"
12690 (("'git'") (string-append "'"
12691 (which "git")
12692 "'")))
12693 (substitute* '("dulwich/tests/test_repository.py"
12694 "dulwich/tests/test_hooks.py")
12695 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12696 (setenv "TEST_RUNNER" "unittest")
12697 (setenv "PYTHONHASHSEED" "random")
12698 #t)))))
12699 (propagated-inputs
12700 `(("python-fastimport" ,python-fastimport)))
12701 (native-inputs
12702 `(("python-mock" ,python-mock)
12703 ("python-geventhttpclient" ,python-geventhttpclient)
12704 ("git" ,git)))
12705 (home-page "https://www.dulwich.io/")
12706 (synopsis "Git implementation in Python")
12707 (description "Dulwich is an implementation of the Git file formats and
12708protocols written in pure Python.")
12709 ;; Can be used with either license.
12710 (license (list license:asl2.0 license:gpl2+))))
12711
12712(define-public python2-dulwich
12713 (package-with-python2 python-dulwich))
12714
12715(define-public python-pbkdf2
12716 (package
12717 (name "python-pbkdf2")
12718 (version "1.3")
12719 (source
12720 (origin
12721 (method url-fetch)
12722 (uri (pypi-uri "pbkdf2" version))
12723 (sha256
12724 (base32
12725 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12726 (build-system python-build-system)
12727 (arguments
12728 '(#:phases
12729 (modify-phases %standard-phases
12730 (replace 'check
12731 (lambda _
12732 (setenv "PYTHONPATH"
12733 (string-append (getcwd) "/build/lib:"
12734 (getenv "PYTHONPATH")))
ee2bb944 12735 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
12736 (propagated-inputs
12737 `(("python-pycrypto" ,python-pycrypto))) ; optional
12738 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12739 (synopsis "Password-based key derivation")
12740 (description "This module implements the password-based key derivation
12741function, PBKDF2, specified in RSA PKCS#5 v2.0.
12742
12743PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12744is part of the RSA Public Key Cryptography Standards series. The provided
12745implementation takes a password or a passphrase and a salt value (and
12746optionally a iteration count, a digest module, and a MAC module) and provides
12747a file-like object from which an arbitrarly-sized key can be read.")
12748 (license license:expat)))
12749
12750(define-public python2-pbkdf2
12751 (package-with-python2 python-pbkdf2))
12752
12753(define-public python-qrcode
12754 (package
12755 (name "python-qrcode")
217ea1a1 12756 (version "6.1")
44d10b1f
RW
12757 (source
12758 (origin
12759 (method url-fetch)
12760 (uri (pypi-uri "qrcode" version))
12761 (sha256
217ea1a1 12762 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12763 (build-system python-build-system)
12764 (arguments
12765 ;; FIXME: Tests require packaging 'pymaging'.
12766 '(#:tests? #f))
12767 (propagated-inputs
12768 `(("python-lxml" ,python-lxml) ; for SVG output
12769 ("python-pillow" ,python-pillow) ; for PNG output
12770 ("python-six" ,python-six)))
44d10b1f
RW
12771 (home-page "https://github.com/lincolnloop/python-qrcode")
12772 (synopsis "QR Code image generator")
12773 (description "This package provides a pure Python QR Code generator
12774module. It uses the Python Imaging Library (PIL) to allow for the generation
12775of QR Codes.
12776
12777In addition this package provides a command line tool to generate QR codes and
12778either write these QR codes to a file or do the output as ascii art at the
12779console.")
12780 (license license:bsd-3)))
12781
12782(define-public python2-qrcode
12783 (package-with-python2 python-qrcode))
12784
12785(define-public python-rst2ansi
12786 (package
12787 (name "python-rst2ansi")
12788 (version "0.1.5")
12789 (source
12790 (origin
12791 (method url-fetch)
12792 (uri (pypi-uri "rst2ansi" version))
12793 (sha256
12794 (base32
12795 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12796 (build-system python-build-system)
12797 (propagated-inputs
12798 `(("python-docutils" ,python-docutils)))
12799 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12800 (synopsis "Convert RST to ANSI-decorated console output")
12801 (description
12802 "Python module dedicated to rendering RST (reStructuredText) documents
12803to ansi-escaped strings suitable for display in a terminal.")
12804 (license license:expat)))
12805
12806(define-public python-ansi2html
12807 (package
12808 (name "python-ansi2html")
12809 (version "1.2.0")
12810 (source
12811 (origin
12812 (method url-fetch)
12813 (uri (pypi-uri "ansi2html" version))
12814 (sha256
12815 (base32
12816 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12817 (build-system python-build-system)
12818 (native-inputs
12819 `(("python-mock" ,python-mock)
12820 ("python-nose" ,python-nose)))
12821 (propagated-inputs
12822 `(("python-six" ,python-six)))
12823 (home-page "https://github.com/ralphbean/ansi2html")
12824 (synopsis "Convert ANSI-decorated console output to HTML")
12825 (description
12826 "@command{ansi2html} is a Python library and command line utility for
12827convering text with ANSI color codes to HTML or LaTeX.")
12828 (license license:gpl3+)))
12829
12830(define-public python2-ansi2html
12831 (package-with-python2 python-ansi2html))
12832
12833(define-public python-ddt
12834 (package
12835 (name "python-ddt")
12836 (version "1.1.3")
12837 (source
12838 (origin
12839 (method url-fetch)
12840 (uri (pypi-uri "ddt" version))
12841 (sha256
12842 (base32
12843 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12844 (build-system python-build-system)
12845 (native-inputs
12846 `(("python-mock" ,python-mock)
12847 ("python-nose" ,python-nose)))
12848 (propagated-inputs
12849 `(("python-six" ,python-six)
12850 ("python-pyyaml" ,python-pyyaml)))
12851 (home-page "https://github.com/txels/ddt")
12852 (synopsis "Data-Driven Tests")
12853 (description
12854 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12855running it with different test data, and make it appear as multiple test
12856cases.")
12857 (license license:expat)))
12858
12859(define-public python2-ddt
12860 (package-with-python2 python-ddt))
12861
12862(define-public python-pycountry
12863 (package
12864 (name "python-pycountry")
12865 (version "18.5.26")
12866 (source
12867 (origin
12868 (method url-fetch)
12869 (uri (pypi-uri "pycountry" version))
12870 (sha256
12871 (base32
12872 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12873 (build-system python-build-system)
12874 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12875 (synopsis "ISO databases for languages, countries, currencies, etc.")
12876 (description
12877 "@code{pycountry} provides the ISO databases for the standards:
12878@enumerate
12879@item 639-3 (Languages)
12880@item 3166 (Countries)
12881@item 3166-3 (Deleted Countries)
12882@item 3166-2 (Subdivisions of countries)
12883@item 4217 (Currencies)
12884@item 15924 (Scripts)
12885@end enumerate
12886It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12887through a Python API.")
12888 (license license:lgpl2.1+)))
12889
12890(define-public python2-pycountry
12891 (package-with-python2 python-pycountry))
12892
12893(define-public python-pycosat
12894 (package
12895 (name "python-pycosat")
12896 (version "0.6.1")
12897 (source
12898 (origin
12899 (method url-fetch)
12900 (uri (pypi-uri "pycosat" version))
12901 (sha256
12902 (base32
12903 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12904 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12905 (build-system python-build-system)
12906 (home-page "https://github.com/ContinuumIO/pycosat")
12907 (synopsis "Bindings to picosat (a SAT solver)")
12908 (description
12909 "This package provides efficient Python bindings to @code{picosat} on
12910the C level. When importing pycosat, the @code{picosat} solver becomes part
12911of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12912Problem} (SAT) solver.")
12913 (license license:expat)))
12914
12915(define-public python2-pycosat
12916 (package-with-python2 python-pycosat))
12917
12918(define-public python2-ruamel.ordereddict
12919 (package
12920 (name "python2-ruamel.ordereddict")
12921 (version "0.4.9")
12922 (source
12923 (origin
12924 (method url-fetch)
12925 (uri (pypi-uri "ruamel.ordereddict" version))
12926 (sha256
12927 (base32
12928 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12929 (build-system python-build-system)
12930 (arguments
12931 `(#:python ,python-2
12932 #:phases
12933 (modify-phases %standard-phases
12934 (delete 'check)
12935 (add-after 'install 'check
12936 (lambda* (#:key inputs outputs #:allow-other-keys)
12937 (add-installed-pythonpath inputs outputs)
f987ac30 12938 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12939 (home-page "https://bitbucket.org/ruamel/ordereddict")
12940 (synopsis "Version of dict that keeps keys in insertion order")
12941 (description
12942 "This is an implementation of an ordered dictionary with @dfn{Key
12943Insertion Order} (KIO: updates of values do not affect the position of the
12944key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12945removed and put at the back). The standard library module @code{OrderedDict},
12946implemented later, implements a subset of @code{ordereddict} functionality.
12947Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12948Order} (KSO, no sorting function can be specified, but a transform can be
12949specified to apply on the key before comparison (e.g. @code{string.lower})).")
12950 (license license:expat)))
12951
12952(define-public python-pypeg2
12953 (package
12954 (name "python-pypeg2")
12955 (version "2.15.2")
12956 (source
12957 (origin
12958 (method url-fetch)
12959 (uri (pypi-uri "pyPEG2" version))
12960 (sha256
12961 (base32
12962 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12963 (build-system python-build-system)
12964 (propagated-inputs `(("python-lxml" ,python-lxml)))
12965 (arguments
12966 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12967 '(#:tests? #f))
12968 (home-page "https://fdik.org/pyPEG/")
12969 (synopsis "Parsering Expression Grammars in Python")
12970 (description "PyPEG is an intrinsic parser interpreter framework for
12971Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12972parse many formal languages.")
12973 (license license:gpl2)))
12974
12975(define-public python-incremental
12976 (package
12977 (name "python-incremental")
12978 (version "17.5.0")
12979 (source
12980 (origin
12981 (method url-fetch)
12982 (uri (pypi-uri "incremental" version))
12983 (sha256
12984 (base32
12985 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12986 (build-system python-build-system)
12987 (home-page "https://github.com/hawkowl/incremental")
12988 (synopsis "Library for versioning Python projects")
12989 (description "Incremental is a small library that versions your Python
12990projects.")
12991 (license license:expat)))
12992
12993(define-public python2-incremental
12994 (package-with-python2 python-incremental))
12995
12996(define-public python-invoke
12997 (package
12998 (name "python-invoke")
b5544cb4 12999 (home-page "https://www.pyinvoke.org/")
a5662319 13000 (version "1.3.0")
44d10b1f
RW
13001 (source (origin
13002 (method url-fetch)
13003 (uri (pypi-uri "invoke" version))
13004 (sha256
13005 (base32
a5662319 13006 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
13007 (build-system python-build-system)
13008 (arguments
13009 ;; XXX: Requires many dependencies that are not yet in Guix.
13010 `(#:tests? #f))
13011 (synopsis "Pythonic task execution")
13012 (description
13013 "Invoke is a Python task execution tool and library, drawing inspiration
13014from various sources to arrive at a powerful and clean feature set. It is
13015evolved from the Fabric project, but focuses on local and abstract concerns
13016instead of servers and network commands.")
13017 (license license:bsd-3)))
13018
13019(define-public python2-invoke
13020 (package-with-python2 python-invoke))
13021
13022(define-public python-automat
13023 (package
13024 (name "python-automat")
919d80a0 13025 (version "0.7.0")
44d10b1f
RW
13026 (source (origin
13027 (method url-fetch)
13028 (uri (pypi-uri "Automat" version))
13029 (sha256
13030 (base32
919d80a0 13031 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
13032 (build-system python-build-system)
13033 ;; We disable the tests because they require python-twisted, while
13034 ;; python-twisted depends on python-automat. Twisted is optional, but the
13035 ;; tests fail if it is not available. Also see
13036 ;; <https://github.com/glyph/automat/issues/71>.
13037 (arguments '(#:tests? #f))
13038 (native-inputs
13039 `(("python-m2r" ,python-m2r)
13040 ("python-setuptools-scm" ,python-setuptools-scm)
13041 ("python-graphviz" ,python-graphviz)))
13042 (propagated-inputs
13043 `(("python-six" ,python-six)
13044 ("python-attrs" ,python-attrs)))
13045 (home-page "https://github.com/glyph/Automat")
13046 (synopsis "Self-service finite-state machines")
13047 (description "Automat is a library for concise, idiomatic Python
13048expression of finite-state automata (particularly deterministic finite-state
13049transducers).")
13050 (license license:expat)))
13051
13052(define-public python2-automat
13053 (package-with-python2 python-automat))
13054
13055(define-public python-m2r
13056 (package
13057 (name "python-m2r")
bcfb8fac 13058 (version "0.2.1")
44d10b1f
RW
13059 (source (origin
13060 (method url-fetch)
13061 (uri (pypi-uri "m2r" version))
13062 (sha256
13063 (base32
bcfb8fac 13064 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
13065 (build-system python-build-system)
13066 (propagated-inputs
13067 `(("python-docutils" ,python-docutils)
13068 ("python-mistune" ,python-mistune)))
13069 (native-inputs
13070 `(("python-pygments" ,python-pygments)
13071 ("python-mock" ,python-mock)))
13072 (home-page "https://github.com/miyakogi/m2r")
13073 (synopsis "Markdown to reStructuredText converter")
13074 (description "M2R converts a markdown file including reST markups to valid
13075reST format.")
13076 (license license:expat)))
13077
13078(define-public python2-m2r
13079 (package-with-python2 python-m2r))
13080
13081(define-public python-constantly
13082 (package
13083 (name "python-constantly")
13084 (version "15.1.0")
13085 (source (origin
13086 (method url-fetch)
13087 (uri (pypi-uri "constantly" version))
13088 (sha256
13089 (base32
13090 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
13091 (build-system python-build-system)
13092 (home-page "https://github.com/twisted/constantly")
13093 (synopsis "Symbolic constants in Python")
13094 (description "Constantly is a Python library that provides symbolic
13095constant support. It includes collections and constants with text, numeric,
13096and bit flag values.")
13097 (license license:expat)))
13098
13099(define-public python2-constantly
13100 (package-with-python2 python-constantly))
13101
13102(define-public python-attrs
13103 (package
13104 (name "python-attrs")
c41d5144 13105 (version "19.1.0")
44d10b1f
RW
13106 (source (origin
13107 (method url-fetch)
13108 (uri (pypi-uri "attrs" version))
13109 (sha256
13110 (base32
c41d5144 13111 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
13112 (build-system python-build-system)
13113 (arguments
13114 `(#:modules ((guix build utils)
13115 (guix build python-build-system)
13116 (ice-9 ftw)
13117 (srfi srfi-1)
13118 (srfi srfi-26))
13119 #:phases (modify-phases %standard-phases
13120 (replace 'check
13121 (lambda _
13122 (let ((cwd (getcwd)))
13123 (setenv "PYTHONPATH"
13124 (string-append
13125 cwd "/build/"
13126 (find (cut string-prefix? "lib" <>)
13127 (scandir (string-append cwd "/build")))
13128 ":"
13129 (getenv "PYTHONPATH")))
13130 (invoke "python" "-m" "pytest")))))))
13131 (native-inputs
13132 `(("python-coverage" ,python-coverage)
13133 ("python-hypothesis" ,python-hypothesis)
13134 ("python-pympler" ,python-pympler)
13135 ("python-pytest" ,python-pytest)
13136 ("python-six" ,python-six)
13137 ("python-sphinx" ,python-sphinx)
13138 ("python-zope-interface" ,python-zope-interface)))
13139 (home-page "https://github.com/python-attrs/attrs/")
13140 (synopsis "Attributes without boilerplate")
13141 (description "@code{attrs} is a Python package with class decorators that
13142ease the chores of implementing the most common attribute-related object
13143protocols.")
13144 (license license:expat)))
13145
13146(define-public python2-attrs
13147 (package-with-python2 python-attrs))
13148
13149(define-public python-attrs-bootstrap
13150 (package
13151 (inherit python-attrs)
13152 (name "python-attrs-bootstrap")
44d10b1f
RW
13153 (native-inputs `())
13154 (arguments `(#:tests? #f))))
13155
13156(define-public python2-attrs-bootstrap
13157 (package-with-python2 python-attrs-bootstrap))
13158
13159(define-public python2-cliapp
13160 (package
13161 (name "python2-cliapp")
9064b84e 13162 (version "1.20180812.1")
44d10b1f
RW
13163 (source
13164 (origin
13165 (method url-fetch)
13166 (uri (string-append
13167 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13168 version ".tar.gz"))
13169 (sha256
13170 (base32
9064b84e 13171 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
13172 (build-system python-build-system)
13173 (arguments
13174 `(#:python ,python-2
13175 #:phases
13176 (modify-phases %standard-phases
13177 ;; check phase needs to be run before the build phase. If not,
13178 ;; coverage-test-runner looks for tests for the built source files,
13179 ;; and fails.
13180 (delete 'check)
13181 (add-before 'build 'check
13182 (lambda _
13183 ;; Disable python3 tests
13184 (substitute* "check"
13185 (("python3") "# python3"))
6c826d32 13186 (invoke "./check"))))))
44d10b1f
RW
13187 (native-inputs
13188 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13189 ("python2-pep8" ,python2-pep8)))
13190 (propagated-inputs
13191 `(("python2-pyaml" ,python2-pyaml)))
13192 (home-page "https://liw.fi/cliapp/")
13193 (synopsis "Python framework for command line programs")
13194 (description "@code{python2-cliapp} is a python framework for
13195command line programs. It contains the typical stuff such programs
13196need to do, such as parsing the command line for options, and
13197iterating over input files.")
13198 (license license:gpl2+)))
13199
13200(define-public python2-ttystatus
13201 (package
13202 (name "python2-ttystatus")
e516a9c2 13203 (version "0.36")
44d10b1f
RW
13204 (source
13205 (origin
13206 (method url-fetch)
13207 (uri (string-append
13208 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13209 version ".tar.gz"))
13210 (sha256
13211 (base32
e516a9c2 13212 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
13213 (build-system python-build-system)
13214 (native-inputs
13215 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
13216 ("python2-pep8" ,python2-pep8)))
13217 (arguments
13218 `(#:python ,python-2
13219 #:phases
13220 (modify-phases %standard-phases
13221 ;; check phase needs to be run before the build phase. If not,
13222 ;; coverage-test-runner looks for tests for the built source files,
13223 ;; and fails.
13224 (delete 'check)
13225 (add-before 'build 'check
cbeee881 13226 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
13227 (home-page "https://liw.fi/ttystatus/")
13228 (synopsis "Python library for showing progress reporting and
13229status updates on terminals")
13230 (description "@code{python2-ttystatus} is a python library for
13231showing progress reporting and status updates on terminals, for
13232command line programs. Output is automatically adapted to the width
13233of the terminal: truncated if it does not fit, and resized if the
13234terminal size changes.")
13235 (license license:gpl3+)))
13236
13237(define-public python2-tracing
13238 (package
13239 (name "python2-tracing")
13240 (version "0.10")
13241 (source
13242 (origin
13243 (method url-fetch)
13244 (uri (string-append
13245 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13246 version ".tar.gz"))
13247 (sha256
13248 (base32
13249 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13250 (build-system python-build-system)
13251 (arguments
13252 `(#:python ,python-2))
13253 (home-page "https://liw.fi/tracing/")
13254 (synopsis "Python debug logging helper")
13255 (description "@code{python2-tracing} is a python library for
13256logging debug messages. It provides a way to turn debugging messages
13257on and off, based on the filename they occur in. It is much faster
13258than using @code{logging.Filter} to accomplish the same thing, which
13259matters when code is run in production mode. The actual logging still
13260happens using the @code{logging} library.")
13261 (license license:gpl3+)))
13262
13263(define-public python2-larch
13264 (package
13265 (name "python2-larch")
13266 (version "1.20151025")
13267 (source
13268 (origin
13269 (method url-fetch)
13270 (uri (string-append
13271 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13272 version ".tar.gz"))
13273 (patches (search-patches
13274 "python2-larch-coverage-4.0a6-compatibility.patch"))
13275 (sha256
13276 (base32
13277 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13278 (build-system python-build-system)
13279 (arguments
13280 `(#:python ,python-2
13281 #:phases
13282 (modify-phases %standard-phases
13283 ;; check phase needs to be run before the build phase. If not,
13284 ;; coverage-test-runner looks for tests for the built source files,
13285 ;; and fails.
13286 (delete 'check)
13287 (add-before 'build 'check
204ad455 13288 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
13289 (native-inputs
13290 `(("cmdtest" ,cmdtest)
13291 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
13292 (propagated-inputs
13293 `(("python2-tracing" ,python2-tracing)))
13294 (home-page "https://liw.fi/larch/")
13295 (synopsis "Python copy-on-write B-tree library")
13296 (description "@code{python2-larch} is an implementation of
13297particular kind of B-tree, based on research by Ohad Rodeh. See
13298@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13299on the data structure.
13300
13301The distinctive feature of this B-tree is that a node is never
13302(conceptually) modified. Instead, all updates are done by
13303copy-on-write. This makes it easy to clone a tree, and modify only the
13304clone, while other processes access the original tree.")
13305 (license license:gpl3+)))
13306
13307(define-public python-astroid
13308 (package
13309 (name "python-astroid")
1c43c698 13310 (version "2.3.3")
44d10b1f
RW
13311 (source
13312 (origin
13313 (method url-fetch)
13314 (uri (pypi-uri "astroid" version))
13315 (sha256
1c43c698 13316 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
13317 (build-system python-build-system)
13318 (propagated-inputs
13319 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13320 ("python-six" ,python-six)
f0935460 13321 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
13322 ("python-wrapt" ,python-wrapt)))
13323 (native-inputs
13324 `(("python-dateutil" ,python-dateutil)
13325 ("python-nose" ,python-nose)
13326 ("python-pytest" ,python-pytest)
13327 ("python-pytest-runner" ,python-pytest-runner)))
13328 (arguments
13329 `(#:phases
13330 (modify-phases %standard-phases
13331 (add-after 'unpack 'remove-spurious-test
13332 (lambda _
13333 ;; This can be removed after upgrading from python-3.7
13334 ;; https://github.com/PyCQA/astroid/issues/593
13335 ;; https://bugs.python.org/issue34056
13336 (delete-file "astroid/tests/unittest_modutils.py")
13337 #t))
13338 (replace 'check
13339 (lambda _
13340 (invoke "pytest" "astroid"))))))
13341 (home-page "https://github.com/PyCQA/astroid")
13342 (synopsis "Common base representation of python source code for pylint and
13343other projects")
13344 (description "@code{python-astroid} provides a common base representation
13345of python source code for projects such as pychecker, pyreverse, pylint, etc.
13346
13347It provides a compatible representation which comes from the _ast module. It
13348rebuilds the tree generated by the builtin _ast module by recursively walking
13349down the AST and building an extended ast. The new node classes have
13350additional methods and attributes for different usages. They include some
13351support for static inference and local name scopes. Furthermore, astroid
13352builds partial trees by inspecting living objects.")
13353 (license license:lgpl2.1+)
13354 (properties `((python2-variant . ,(delay python2-astroid))))))
13355
13356(define-public python2-astroid
13357 (let ((base (package-with-python2
13358 (strip-python2-variant python-astroid))))
13359 (package (inherit base)
13360 ;; Version 2.x removes python2 support.
13361 (version "1.6.5")
13362 (source
13363 (origin
13364 (method url-fetch)
13365 (uri (pypi-uri "astroid" version))
13366 (sha256
13367 (base32
13368 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
13369 (arguments
13370 (substitute-keyword-arguments (package-arguments base)
13371 ((#:phases phases)
13372 `(modify-phases ,phases
13373 (add-after 'unpack 'remove-spurious-test
13374 (lambda _
13375 ;; https://github.com/PyCQA/astroid/issues/276
13376 (delete-file "astroid/tests/unittest_brain.py")
13377 #t))
13378 (replace 'check
13379 (lambda _
13380 (invoke"python" "-m" "unittest" "discover"
13381 "-p" "unittest*.py")))))))
13382 (native-inputs `())
13383 (propagated-inputs
13384 `(("python2-backports-functools-lru-cache"
13385 ,python2-backports-functools-lru-cache)
13386 ("python2-enum34" ,python2-enum34)
13387 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
13388 ,@(alist-delete "python-typed-ast"
13389 (package-propagated-inputs base)))))))
44d10b1f
RW
13390
13391(define-public python-isort
13392 (package
13393 (name "python-isort")
e2227b6a 13394 (version "4.3.4")
44d10b1f
RW
13395 (source
13396 (origin
e2227b6a
EF
13397 (method git-fetch)
13398 (uri (git-reference
13399 ;; Tests pass only from the Github sources
13400 (url "https://github.com/timothycrosley/isort")
13401 (commit version)))
13402 (file-name (git-file-name name version))
44d10b1f
RW
13403 (sha256
13404 (base32
e2227b6a 13405 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
13406 (build-system python-build-system)
13407 (native-inputs
13408 `(("python-mock" ,python-mock)
13409 ("python-pytest" ,python-pytest)))
13410 (home-page "https://github.com/timothycrosley/isort")
13411 (synopsis "Python utility/library to sort python imports")
13412 (description "@code{python-isort} is a python utility/library to sort
13413imports alphabetically, and automatically separated into sections. It
13414provides a command line utility, a python library and plugins for various
13415editors.")
e2227b6a
EF
13416 (license license:expat)
13417 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
13418
13419(define-public python2-isort
e2227b6a
EF
13420 (let ((base (package-with-python2
13421 (strip-python2-variant python-isort))))
13422 (package (inherit base)
13423 (native-inputs
13424 `(("python2-futures" ,python2-futures)
13425 ,@(package-native-inputs base))))))
44d10b1f
RW
13426
13427(define-public python2-backports-functools-lru-cache
13428 (package
13429 (name "python2-backports-functools-lru-cache")
13430 (version "1.5")
13431 (source
13432 (origin
13433 (method url-fetch)
13434 ;; only the pypi tarballs contain the necessary metadata
13435 (uri (pypi-uri "backports.functools_lru_cache" version))
13436 (sha256
13437 (base32
13438 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
13439 (build-system python-build-system)
13440 (native-inputs
13441 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13442 (arguments
13443 `(#:python ,python-2))
13444 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13445 (synopsis "Backport of functools.lru_cache from Python 3.3")
13446 (description "@code{python2-backports-functools-lru-cache} is a backport
13447of @code{functools.lru_cache} from python 3.3.")
13448 (license license:expat)))
13449
13450(define-public python-configparser
13451 (package
13452 (name "python-configparser")
84127f8c 13453 (version "3.7.1")
44d10b1f
RW
13454 (source
13455 (origin
13456 (method url-fetch)
84127f8c 13457 (uri (pypi-uri "configparser" version))
44d10b1f
RW
13458 (sha256
13459 (base32
84127f8c 13460 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 13461 (build-system python-build-system)
809f003f 13462 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
13463 (synopsis "Backport of configparser from python 3.5")
13464 (description "@code{python-configparser} is a backport of
13465@code{configparser} from Python 3.5 so that it can be used directly
13466in other versions.")
13467 (license license:expat)))
13468
13469(define-public python2-configparser
13470 (package-with-python2 python-configparser))
13471
13472(define-public python-mando
13473 (package
13474 (name "python-mando")
13475 (version "0.6.4")
13476 (source (origin
13477 (method url-fetch)
13478 (uri (pypi-uri "mando" version))
13479 (sha256
13480 (base32
13481 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
13482 (build-system python-build-system)
13483 (propagated-inputs
13484 `(("python-rst2ansi" ,python-rst2ansi)
13485 ("python-six" ,python-six)))
13486 (native-inputs
13487 `(("python-pytest" ,python-pytest)))
13488 (home-page "https://mando.readthedocs.org/")
13489 (synopsis
13490 "Wrapper around argparse, allowing creation of complete CLI applications")
13491 (description
13492 "This package is a wrapper around argparse, allowing you to write complete CLI
13493applications in seconds while maintaining all the flexibility.")
13494 (license license:expat)))
13495
13496(define-public python2-mando
13497 (package-with-python2 python-mando))
13498
70daf82f
RW
13499(define-public python2-argparse
13500 (package
13501 (name "python2-argparse")
13502 (version "1.4.0")
13503 (source
13504 (origin
13505 (method url-fetch)
13506 (uri (pypi-uri "argparse" version))
13507 (sha256
13508 (base32
13509 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
13510 (build-system python-build-system)
13511 (arguments
13512 `(#:python ,python-2))
13513 (home-page "https://github.com/ThomasWaldmann/argparse/")
13514 (synopsis "Python command-line parsing library")
13515 (description
13516 "This package is mostly for people who want to have @code{argparse} on
13517older Pythons because it was not part of the standard library back then.")
13518 (license license:psfl)))
13519
44d10b1f
RW
13520(define-public python-fudge
13521 (package
13522 (name "python-fudge")
13523 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
13524 ;; package, which is currently the only use of this package.
13525 (version "0.9.6")
13526 (source
13527 (origin
13528 (method url-fetch)
13529 (uri (pypi-uri "fudge" version))
13530 (sha256
13531 (base32
13532 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
13533 (build-system python-build-system)
13534 (arguments
13535 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
13536 (home-page "https://github.com/fudge-py/fudge")
13537 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
13538 (description
13539 "Fudge is a Python module for using fake objects (mocks and stubs) to
13540test real ones.
13541
13542In readable Python code, you declare the methods available on your fake object
13543and how they should be called. Then you inject that into your application and
13544start testing. This declarative approach means you don’t have to record and
13545playback actions and you don’t have to inspect your fakes after running code.
13546If the fake object was used incorrectly then you’ll see an informative
13547exception message with a traceback that points to the culprit.")
13548 (license license:expat)))
13549
13550(define-public python2-fudge
13551 (package-with-python2 python-fudge))
13552
13553(define-public python-mwclient
13554 (package
13555 (name "python-mwclient")
957c6833 13556 (version "0.10.0")
44d10b1f
RW
13557 (source
13558 (origin
957c6833 13559 (method git-fetch)
44d10b1f 13560 ;; The PyPI version wouldn't contain tests.
957c6833
EF
13561 (uri (git-reference
13562 (url "https://github.com/mwclient/mwclient")
13563 (commit (string-append "v" version))))
13564 (file-name (git-file-name name version))
44d10b1f
RW
13565 (sha256
13566 (base32
957c6833 13567 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
44d10b1f
RW
13568 (build-system python-build-system)
13569 (propagated-inputs
957c6833 13570 `(("python-requests-oauthlib" ,python-requests-oauthlib)
44d10b1f
RW
13571 ("python-six" ,python-six)))
13572 (native-inputs
13573 `(("python-mock" ,python-mock)
13574 ("python-pytest" ,python-pytest)
44d10b1f 13575 ("python-pytest-cov" ,python-pytest-cov)
957c6833 13576 ("python-pytest-runner" ,python-pytest-runner)
44d10b1f
RW
13577 ("python-responses" ,python-responses)))
13578 (home-page "https://github.com/btongminh/mwclient")
13579 (synopsis "MediaWiki API client")
13580 (description "This package provides a MediaWiki API client.")
13581 (license license:expat)))
13582
13583(define-public python2-mwclient
13584 (package-with-python2 python-mwclient))
13585
13586(define-public python-utils
13587 (package
13588 (name "python-utils")
13589 (version "2.1.0")
13590 (source (origin
13591 (method url-fetch)
13592 (uri (pypi-uri "python-utils" version))
13593 (sha256
13594 (base32
13595 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
13596 (build-system python-build-system)
13597 (native-inputs
13598 `(("pytest-runner" ,python-pytest-runner)
13599 ("pytest" ,python-pytest)
13600 ("six" ,python-six)))
13601 (home-page "https://github.com/WoLpH/python-utils")
13602 (synopsis "Convenient utilities not included with the standard Python install")
13603 (description
13604 "Python Utils is a collection of small Python functions and classes which
13605make common patterns shorter and easier.")
13606 (license license:bsd-2)))
13607
13608(define-public python2-utils
13609 (package-with-python2 python-utils))
13610
44d10b1f
RW
13611(define-public python-diff-match-patch
13612 (package
13613 (name "python-diff-match-patch")
13614 (version "20121119")
13615 (source
13616 (origin
13617 (method url-fetch)
13618 (uri (pypi-uri "diff-match-patch" version))
13619 (sha256
13620 (base32
13621 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
13622 (build-system python-build-system)
13623 (home-page "https://code.google.com/p/google-diff-match-patch")
13624 (synopsis "Synchronize plain text")
13625 (description "Diff Match and Patch libraries offer robust algorithms to
13626perform the operations required for synchronizing plain text.")
13627 (license license:asl2.0)))
13628
13629(define-public python2-diff-match-patch
13630 (package-with-python2 python-diff-match-patch))
13631
13632(define-public python-dirsync
13633 (package
13634 (name "python-dirsync")
13635 (version "2.2.3")
13636 (source
13637 (origin
13638 (method url-fetch)
13639 (uri (pypi-uri "dirsync" version))
13640 (sha256
13641 (base32
13642 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
13643 (build-system python-build-system)
13644 (propagated-inputs
13645 `(("six" ,python-six)))
13646 (home-page "https://bitbucket.org/tkhyn/dirsync")
13647 (synopsis "Advanced directory tree synchronisation tool")
13648 (description "Advanced directory tree synchronisation tool.")
13649 (license license:expat)))
13650
13651(define-public python2-dirsync
13652 (package-with-python2 python-dirsync))
13653
13654(define-public python-levenshtein
13655 (package
13656 (name "python-levenshtein")
13657 (version "0.12.0")
13658 (source
13659 (origin
13660 (method url-fetch)
13661 (uri (pypi-uri "python-Levenshtein" version))
13662 (sha256
13663 (base32
13664 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13665 (build-system python-build-system)
13666 (home-page "https://github.com/ztane/python-Levenshtein")
13667 (synopsis "Fast computation of Levenshtein distance and string similarity")
13668 (description
13669 "The Levenshtein Python C extension module contains functions for fast computation of
13670@enumerate
13671@item Levenshtein (edit) distance, and edit operations
13672@item string similarity
13673@item approximate median strings, and generally string averaging
13674@item string sequence and set similarity
13675@end enumerate
13676It supports both normal and Unicode strings.")
13677 (license license:gpl2+)))
13678
13679(define-public python2-levenshtein
13680 (package-with-python2 python-levenshtein))
13681
13682(define-public python-scandir
13683 (package
13684 (name "python-scandir")
13685 (version "1.9.0")
13686 (source
13687 (origin
13688 (method url-fetch)
13689 (uri (pypi-uri "scandir" version))
13690 (sha256
13691 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13692 (build-system python-build-system)
13693 (arguments
13694 `(#:phases (modify-phases %standard-phases
13695 (replace 'check
13696 (lambda _
13697 (invoke "python" "test/run_tests.py"))))))
13698 (home-page "https://github.com/benhoyt/scandir")
13699 (synopsis "Directory iteration function")
13700 (description
13701 "Directory iteration function like os.listdir(), except that instead of
13702returning a list of bare filenames, it yields DirEntry objects that include
13703file type and stat information along with the name. Using scandir() increases
13704the speed of os.walk() by 2-20 times (depending on the platform and file
13705system) by avoiding unnecessary calls to os.stat() in most cases.
13706
13707This package is part of the Python standard library since version 3.5.")
13708 (license license:bsd-3)))
13709
13710(define-public python2-scandir
13711 (package-with-python2 python-scandir))
13712
13713(define-public python2-stemming
13714 (package
13715 (name "python2-stemming")
13716 (version "1.0.1")
13717 (source
13718 (origin
13719 (method url-fetch)
13720 (uri (pypi-uri "stemming" version))
13721 (sha256
13722 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13723 (build-system python-build-system)
13724 (arguments
13725 `(#:python ,python-2))
13726 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13727 (synopsis "Python implementations of various stemming algorithms")
13728 (description
13729 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13730stemming algorithms for English. These implementations are straightforward and
13731efficient, unlike some Python versions of the same algorithms available on the
13732Web. This package is an extraction of the stemming code included in the Whoosh
13733search engine.")
13734 (license license:public-domain)))
13735
13736(define-public python-factory-boy
13737 (package
13738 (name "python-factory-boy")
13739 (version "2.8.1")
13740 (source
13741 (origin
13742 (method url-fetch)
13743 (uri (pypi-uri "factory_boy" version))
13744 (sha256
13745 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13746 (build-system python-build-system)
13747 (arguments
13748 ;; Tests are not included in the tarball.
13749 `(#:tests? #f))
13750 (propagated-inputs
13751 `(("faker" ,python-faker)))
13752 (home-page "https://github.com/benhoyt/scandir")
13753 (synopsis "Versatile test fixtures replacement")
13754 (description
13755 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13756
13757As a fixtures replacement tool, it aims to replace static, hard to maintain
13758fixtures with easy-to-use factories for complex object.
13759
13760Instead of building an exhaustive test setup with every possible combination
13761of corner cases, factory_boy allows you to use objects customized for the
13762current test, while only declaring the test-specific fields")
13763 (license license:expat)))
13764
13765(define-public python2-factory-boy
13766 (package-with-python2 python-factory-boy))
13767
13768(define-public python-translate-toolkit
13769 (package
13770 (name "python-translate-toolkit")
13771 (version "2.1.0")
13772 (source
13773 (origin
13774 (method url-fetch)
13775 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13776 (sha256
13777 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13778 (build-system python-build-system)
13779 (native-inputs
13780 `(("python-pytest" ,python-pytest)
13781 ("python-sphinx" ,python-sphinx)))
13782 (propagated-inputs
13783 `(("python-babel" ,python-babel)
13784 ("python-beautifulsoup4" ,python-beautifulsoup4)
13785 ("python-chardet" ,python-chardet)
13786 ("python-diff-match-patch" ,python-diff-match-patch)
13787 ("python-levenshtein" ,python-levenshtein)
13788 ("python-lxml" ,python-lxml)
13789 ("python-six" ,python-six)
13790 ("python-vobject" ,python-vobject)
13791 ("python-pyyaml" ,python-pyyaml)))
13792 (arguments
13793 ;; TODO: tests are not run, because they end with
13794 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13795 ;; 'parse_funcs'
13796 ;; during test setup.
13797 `(#:tests? #f))
18919cf9 13798 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13799 (synopsis "Tools and API for translation and localization engineering")
13800 (description
13801 "Tools and API for translation and localization engineering. It contains
13802several utilities, as well as an API for building localization tools.")
13803 (license license:gpl2+)))
13804
13805(define-public python2-translate-toolkit
13806 (package-with-python2 python-translate-toolkit))
13807
13808(define-public python-packaging
13809 (package
13810 (name "python-packaging")
a72a1892 13811 (version "20.0")
44d10b1f
RW
13812 (source
13813 (origin
13814 (method url-fetch)
13815 (uri (pypi-uri "packaging" version))
20bf58bf
MB
13816 ;; XXX: The URL in the patch file is wrong, it should be
13817 ;; <https://github.com/pypa/packaging/pull/256>.
fdd0c369 13818 (patches (search-patches "python-packaging-test-arch.patch"))
44d10b1f
RW
13819 (sha256
13820 (base32
a72a1892 13821 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
44d10b1f
RW
13822 (build-system python-build-system)
13823 (arguments
13824 `(#:phases (modify-phases %standard-phases
13825 (replace 'check
13826 (lambda _ (invoke "py.test" "-vv"))))))
13827 (native-inputs
13828 `(("python-pretend" ,python-pretend)
13829 ("python-pytest" ,python-pytest)))
13830 (propagated-inputs
13831 `(("python-pyparsing" ,python-pyparsing)
13832 ("python-six" ,python-six)))
13833 (home-page "https://github.com/pypa/packaging")
13834 (synopsis "Core utilities for Python packages")
13835 (description "Packaging is a Python module for dealing with Python packages.
13836It offers an interface for working with package versions, names, and dependency
13837information.")
13838 ;; From 'LICENSE': This software is made available under the terms of
13839 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13840 ;; Contributions to this software is made under the terms of *both* these
13841 ;; licenses.
13842 (license (list license:asl2.0 license:bsd-2))))
13843
13844(define-public python2-packaging
13845 (package-with-python2 python-packaging))
13846
13847(define-public python-relatorio
13848 (package
13849 (name "python-relatorio")
13850 (version "0.8.0")
13851 (source
13852 (origin
13853 (method url-fetch)
13854 (uri (pypi-uri "relatorio" version))
13855 (sha256
13856 (base32
13857 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13858 (build-system python-build-system)
13859 (propagated-inputs
13860 `(("python-lxml" ,python-lxml)
13861 ("python-genshi" ,python-genshi)))
13862 (native-inputs
13863 `(("python-magic" ,python-magic)))
13864 (home-page "https://relatorio.tryton.org/")
13865 (synopsis "Templating library able to output ODT and PDF files")
13866 (description "Relatorio is a templating library which provides a way to
13867easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13868for more filetypes can be easily added by creating plugins for them.")
13869 (license license:gpl3+)))
13870
13871(define-public python2-relatorio
13872 (package-with-python2 python-relatorio))
13873
13874(define-public python-radon
13875 (package
13876 (name "python-radon")
f675ab4f 13877 (version "4.1.0")
44d10b1f
RW
13878 (source
13879 (origin
13880 (method url-fetch)
13881 (uri (pypi-uri "radon" version))
13882 (sha256
13883 (base32
f675ab4f 13884 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
44d10b1f
RW
13885 (build-system python-build-system)
13886 (arguments
13887 `(#:phases (modify-phases %standard-phases
13888 (replace 'check
13889 (lambda _
13890 (invoke "python" "radon/tests/run.py"))))))
13891 (propagated-inputs
13892 `(("python-colorama" ,python-colorama)
13893 ("python-flake8-polyfill" ,python-flake8-polyfill)
13894 ("python-mando" ,python-mando)))
13895 (native-inputs
13896 `(("python-pytest" ,python-pytest)
13897 ("python-pytest-mock" ,python-pytest-mock)))
13898 (home-page "https://radon.readthedocs.org/")
13899 (synopsis "Code Metrics in Python")
13900 (description "Radon is a Python tool which computes various code metrics.
13901Supported metrics are:
13902@itemize @bullet
13903@item raw metrics: SLOC, comment lines, blank lines, &c.
13904@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13905@item Halstead metrics (all of them)
13906@item the Maintainability Index (a Visual Studio metric)
13907@end itemize")
6bd7d4cb 13908 (properties `((python2-variant . ,(delay python2-radon))))
44d10b1f
RW
13909 (license license:expat)))
13910
13911(define-public python2-radon
6bd7d4cb
MB
13912 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
13913 (package
13914 (inherit base)
13915 (propagated-inputs
13916 `(("python-configparser" ,python2-configparser)
13917 ("python-future" ,python2-future)
13918 ,@(package-propagated-inputs base))))))
44d10b1f
RW
13919
13920(define-public python-sure
13921 (package
13922 (name "python-sure")
13923 (version "1.4.11")
13924 (source
13925 (origin
13926 (method url-fetch)
13927 (uri (pypi-uri "sure" version))
13928 (sha256
13929 (base32
13930 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13931 (build-system python-build-system)
13932 (propagated-inputs
13933 `(("python-mock" ,python-mock)
13934 ("python-six" ,python-six)))
13935 (native-inputs
13936 `(("python-nose" ,python-nose)))
13937 (home-page "https://github.com/gabrielfalcao/sure")
13938 (synopsis "Automated testing library in python for python")
13939 (description
13940 "Sure is a python library that leverages a DSL for writing assertions.
13941Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13942 (license license:gpl3+)))
13943
13944(define-public python2-sure
13945 (package-with-python2 python-sure))
13946
13947(define-public python2-couleur
13948 ;; This package does not seem to support python3 at all, hence,
13949 ;; only the python2 variant definition is provided.
13950 (package
13951 (name "python2-couleur")
13952 (version "0.6.2")
13953 (source
13954 (origin
13955 (method url-fetch)
13956 (uri (pypi-uri "couleur" version))
13957 (sha256
13958 (base32
13959 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13960 (build-system python-build-system)
13961 (arguments
13962 `(#:python ,python-2))
13963 (home-page "https://github.com/gabrielfalcao/couleur")
13964 (synopsis
13965 "ANSI terminal tool for python, colored shell and other handy fancy features")
13966 (description
13967 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13968terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13969 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13970 ;; https://github.com/gabrielfalcao/couleur/issues/11
13971 (license license:lgpl3+)))
13972
13973(define-public python-misaka
13974 (package
13975 (name "python-misaka")
0dcb3412 13976 (version "2.1.1")
44d10b1f
RW
13977 (source
13978 (origin
13979 (method url-fetch)
13980 (uri (pypi-uri "misaka" version))
13981 (sha256
13982 (base32
0dcb3412 13983 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13984 (build-system python-build-system)
13985 (arguments
13986 `(;; Line 37 of setup.py calls self.run_command('develop')
13987 ;; in the 'check' phase. This command seems to be trying
13988 ;; to write to
13989 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13990 ;; for which it does not have the permission to write.
13991 #:tests? #f))
13992 (propagated-inputs
13993 `(("python-cffi" ,python-cffi)))
13994 (home-page "https://github.com/FSX/misaka")
13995 (synopsis "Python binding for Hoedown")
13996 (description
13997 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13998library written in C. It features a fast HTML renderer and functionality to make custom
13999renderers (e.g. man pages or LaTeX).")
14000 (license license:expat)))
14001
14002(define-public python2-misaka
14003 (package-with-python2 python-misaka))
14004
14005(define-public python2-steadymark
14006 ;; This is forced into being a python2 only variant
14007 ;; due to its dependence on couleur that has no support
14008 ;; for python3
14009 (package
14010 (name "python2-steadymark")
14011 (version "0.7.3")
14012 (source
14013 (origin
14014 (method url-fetch)
14015 (uri (pypi-uri "steadymark" version))
14016 (sha256
14017 (base32
14018 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
14019 (build-system python-build-system)
14020 (native-inputs
14021 `(("python-couleur" ,python2-couleur)
14022 ("python-sure" ,python2-sure)
14023 ("python-misaka" ,python2-misaka)))
14024 (arguments
14025 `(#:python ,python-2
14026 #:phases
14027 (modify-phases %standard-phases
14028 (add-before 'build 'patch-setup-py
14029 (lambda _
14030 ;; Update requirements from dependency==version
14031 ;; to dependency>=version
14032 (substitute* "setup.py"
14033 (("==") ">="))
14034 #t)))))
14035 (home-page "https://github.com/gabrielfalcao/steadymark")
14036 (synopsis "Markdown-based test runner for python")
14037 (description
14038 "@code{Steadymark} allows documentation to be written in github-flavoured
14039markdown. The documentation may contain snippets of code surrounded by python
14040code blocks and @code{Steadymark} will find these snippets and run them, making
14041sure that there are no old malfunctional examples in the documentation examples.")
14042 (license license:expat)))
14043
14044(define-public python-jsonpointer
14045 (package
14046 (name "python-jsonpointer")
14047 (version "1.10")
14048 (source
14049 (origin
14050 (method url-fetch)
14051 (uri (pypi-uri "jsonpointer" version))
14052 (sha256
14053 (base32
14054 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
14055 (build-system python-build-system)
14056 (home-page "https://github.com/stefankoegl/python-json-pointer")
14057 (synopsis "Identify specific nodes in a JSON document")
14058 (description "@code{jsonpointer} allows you to access specific nodes
14059by path in a JSON document (see RFC 6901).")
14060 (license license:bsd-3)))
14061
14062(define-public python2-jsonpointer
14063 (package-with-python2 python-jsonpointer))
14064
14065(define-public python-jsonpatch
14066 (package
14067 (name "python-jsonpatch")
14068 (version "1.16")
14069 (source
14070 (origin
854c5c95 14071 (method git-fetch)
44d10b1f 14072 ;; pypi version lacks tests.js
854c5c95
EF
14073 (uri (git-reference
14074 (url "https://github.com/stefankoegl/python-json-patch")
14075 (commit (string-append "v" version))))
14076 (file-name (git-file-name name version))
44d10b1f
RW
14077 (sha256
14078 (base32
854c5c95 14079 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
44d10b1f
RW
14080 (build-system python-build-system)
14081 (native-inputs
14082 `(("python-jsonpointer" ,python-jsonpointer)))
14083 (home-page "https://github.com/stefankoegl/python-json-patch")
14084 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
14085 (description "@code{jsonpatch} is a library and program that allows
14086applying JSON Patches according to RFC 6902.")
14087 (license license:bsd-3)))
14088
14089(define-public python2-jsonpatch
14090 (package-with-python2 python-jsonpatch))
14091
14092(define-public python-jsonpatch-0.4
14093 (package (inherit python-jsonpatch)
14094 (name "python-jsonpatch")
14095 (version "0.4")
14096 (source
14097 (origin
a9722d0d
EF
14098 (method git-fetch)
14099 (uri (git-reference
14100 (url "https://github.com/stefankoegl/python-json-patch")
14101 (commit (string-append "v" version))))
14102 (file-name (git-file-name name version))
44d10b1f
RW
14103 (sha256
14104 (base32
a9722d0d 14105 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
44d10b1f
RW
14106
14107(define-public python2-jsonpatch-0.4
14108 (package-with-python2 python-jsonpatch-0.4))
14109
14110(define-public python-rfc3986
14111 (package
14112 (name "python-rfc3986")
14113 (version "1.1.0")
14114 (source (origin
14115 (method url-fetch)
14116 (uri (pypi-uri "rfc3986" version))
14117 (sha256
14118 (base32
14119 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
14120 (build-system python-build-system)
14121 (arguments
14122 `(#:modules ((guix build utils)
14123 (guix build python-build-system)
14124 (ice-9 ftw)
14125 (srfi srfi-1)
14126 (srfi srfi-26))
14127 #:phases
14128 (modify-phases %standard-phases
14129 (replace 'check
14130 (lambda _
14131 (let ((cwd (getcwd)))
14132 (setenv "PYTHONPATH"
14133 (string-append cwd "/build/"
14134 (find (cut string-prefix? "lib" <>)
14135 (scandir (string-append cwd "/build")))
14136 ":"
14137 (getenv "PYTHONPATH")))
14138 (invoke "pytest" "-v")))))))
14139 (native-inputs
14140 `(("python-pytest" ,python-pytest)))
14141 (home-page "https://rfc3986.readthedocs.io/")
14142 (synopsis "Parse and validate URI references")
14143 (description
14144 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
14145validation and authority parsing. This module also supports RFC@tie{}6874
14146which adds support for zone identifiers to IPv6 addresses.")
14147 (license license:asl2.0)))
14148
14149(define-public python2-rfc3986
14150 (package-with-python2 python-rfc3986))
14151
14152(define-public python-rfc3987
14153 (package
14154 (name "python-rfc3987")
14155 (version "1.3.7")
14156 (source
14157 (origin
14158 (method url-fetch)
14159 (uri (pypi-uri "rfc3987" version))
14160 (sha256
14161 (base32
14162 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
14163 (build-system python-build-system)
e85af137 14164 (home-page "https://pypi.org/project/rfc3987/")
44d10b1f
RW
14165 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
14166 (description "@code{rfc3987} provides routines for parsing and
14167validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
14168 (license license:gpl3+)))
14169
14170(define-public python2-rfc3987
14171 (package-with-python2 python-rfc3987))
14172
28030d29
MB
14173(define-public python-validators
14174 (package
14175 (name "python-validators")
14176 (version "0.14.2")
14177 (source (origin
14178 (method url-fetch)
14179 (uri (pypi-uri "validators" version))
14180 (sha256
14181 (base32
14182 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
14183 (build-system python-build-system)
14184 (arguments
14185 '(#:phases (modify-phases %standard-phases
14186 (replace 'check
14187 (lambda _
14188 (invoke "pytest" "-vv"))))))
14189 (propagated-inputs
14190 `(("python-decorator" ,python-decorator)
14191 ("python-six" ,python-six)))
14192 (native-inputs
14193 `(("python-flake8" ,python-flake8)
14194 ("python-isort" ,python-isort)
14195 ("python-pytest" ,python-pytest)))
14196 (home-page "https://github.com/kvesteri/validators")
14197 (synopsis "Data validation library")
14198 (description
14199 "This package contains validators for different things such as email
14200addresses, IP addresses, URLs, hashes and more. It has been designed to
14201be easy to use and not require defining a schema or form just to validate
14202some input.")
14203 (license license:expat)))
14204
14205(define-public python2-validators
14206 (package-with-python2 python-validators))
14207
44d10b1f
RW
14208(define-public python-validate-email
14209 (package
14210 (name "python-validate-email")
14211 (version "1.3")
14212 (source
14213 (origin
14214 (method url-fetch)
14215 (uri (pypi-uri "validate_email" version))
14216 (sha256
14217 (base32
14218 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
14219 (build-system python-build-system)
14220 (home-page "https://github.com/syrusakbary/validate_email")
14221 (synopsis "Verifies if an email address is valid and really exists")
14222 (description "@code{validate_email} can be used to verify if an email
14223address is valid and really exists.")
14224 (license license:lgpl3+)))
14225
14226(define-public python2-validate-email
14227 (package-with-python2 python-validate-email))
14228
14229(define-public python-flex
14230 (package
14231 (name "python-flex")
14232 (version "6.10.0")
14233 (source
14234 (origin
14235 (method url-fetch)
14236 (uri (pypi-uri "flex" version))
14237 (sha256
14238 (base32
14239 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
14240 (build-system python-build-system)
14241 (propagated-inputs
14242 `(("python-click" ,python-click)
14243 ("python-iso8601" ,python-iso8601)
14244 ("python-jsonpointer" ,python-jsonpointer)
14245 ("python-pyyaml" ,python-pyyaml)
14246 ("python-requests" ,python-requests)
14247 ("python-rfc3987" ,python-rfc3987)
14248 ("python-six" ,python-six)
14249 ("python-validate-email" ,python-validate-email)))
14250 (home-page "https://github.com/pipermerriam/flex")
14251 (synopsis "Validates Swagger schemata")
14252 (description "@code{flex} can be used to validate Swagger schemata.")
14253 (license license:bsd-3)))
14254
14255(define-public python2-flex
14256 (package-with-python2 python-flex))
14257
14258(define-public python-marshmallow
14259 (package
14260 (name "python-marshmallow")
14261 (version "3.0.0b14")
14262 (source
14263 (origin
14264 (method url-fetch)
14265 (uri (pypi-uri "marshmallow" version))
14266 (sha256
14267 (base32
14268 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
14269 (build-system python-build-system)
14270 (propagated-inputs
14271 `(("python-dateutil" ,python-dateutil)
14272 ("python-simplejson" ,python-simplejson)))
14273 (native-inputs
14274 `(("python-pytest" ,python-pytest)
14275 ("python-pytz" ,python-pytz)))
14276 (home-page "https://github.com/marshmallow-code/marshmallow")
14277 (synopsis "Convert complex datatypes to and from native
14278Python datatypes.")
14279 (description "@code{marshmallow} provides a library for converting
14280complex datatypes to and from native Python datatypes.")
14281 (license license:expat)))
14282
14283(define-public python2-marshmallow
14284 (package-with-python2 python-marshmallow))
14285
14286(define-public python-apispec
14287 (package
14288 (name "python-apispec")
14289 (version "0.25.3")
14290 (source
14291 (origin
14292 (method url-fetch)
14293 (uri (pypi-uri "apispec" version))
14294 (sha256
14295 (base32
14296 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
14297 (build-system python-build-system)
14298 (propagated-inputs
14299 `(("python-pyyaml" ,python-pyyaml)))
14300 (native-inputs
14301 `(("python-pytest" ,python-pytest)
14302 ("python-flask" ,python-flask)
14303 ("python-marshmallow" ,python-marshmallow)
14304 ("python-tornado" ,python-tornado)
14305 ("python-bottle" ,python-bottle)
14306 ("python-mock" ,python-mock)))
14307 (home-page "https://github.com/marshmallow-code/apispec")
14308 (synopsis "Swagger 2.0 API specification generator")
14309 (description "@code{python-apispec} is a pluggable API specification
14310generator. Currently supports the OpenAPI specification (f.k.a.
14311Swagger 2.0).")
14312 (license license:expat)))
14313
14314(define-public python2-apispec
14315 (package-with-python2 python-apispec))
14316
14317(define-public python-flasgger
14318 (package
14319 (name "python-flasgger")
14320 (version "0.6.3")
14321 (source
14322 (origin
1a04d421
TGR
14323 (method git-fetch)
14324 (uri (git-reference
14325 (url "https://github.com/rochacbruno/flasgger.git")
14326 (commit version)))
14327 (file-name (git-file-name name version))
44d10b1f 14328 (sha256
1a04d421 14329 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
14330 (build-system python-build-system)
14331 (arguments
14332 `(#:phases
14333 (modify-phases %standard-phases
14334 (replace 'check
14335 (lambda* (#:key inputs outputs #:allow-other-keys)
14336 (substitute* "Makefile"
14337 (("flake8 flasgger --ignore=F403")
14338 "flake8 flasgger --ignore=E731,F403"))
14339 (setenv "PYTHONPATH" (string-append (getcwd)
14340 ":"
14341 (getenv "PYTHONPATH")))
ac599a09 14342 (invoke "py.test"))))))
44d10b1f
RW
14343 (propagated-inputs
14344 `(("python-flask" ,python-flask)
14345 ("python-pyyaml" ,python-pyyaml)
14346 ("python-jsonschema" ,python-jsonschema)
14347 ("python-mistune" ,python-mistune)
14348 ("python-six" ,python-six)))
14349 (native-inputs
14350 `(("python-decorator" ,python-decorator)
14351 ("python-flake8" ,python-flake8)
14352 ("python-flask-restful" ,python-flask-restful)
14353 ("python-flex" ,python-flex)
14354 ("python-pytest" ,python-pytest)
14355 ("python-pytest-cov" ,python-pytest-cov)
14356 ("python-marshmallow" ,python-marshmallow)
14357 ("python-apispec" ,python-apispec)))
14358 (home-page "https://github.com/rochacbruno/flasgger/")
14359 (synopsis "Extract Swagger specs from your Flask project")
14360 (description "@code{python-flasgger} allows extracting Swagger specs
14361from your Flask project. It is a fork of Flask-Swagger.")
14362 (license license:expat)))
14363
14364(define-public python2-flasgger
14365 (package-with-python2 python-flasgger))
14366
14367(define-public python-swagger-spec-validator
14368 (package
14369 (name "python-swagger-spec-validator")
fe9c5b1d 14370 (version "2.4.3")
44d10b1f
RW
14371 (source
14372 (origin
14373 (method url-fetch)
14374 (uri (pypi-uri "swagger-spec-validator" version))
14375 (sha256
14376 (base32
fe9c5b1d 14377 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
14378 (build-system python-build-system)
14379 (propagated-inputs
14380 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 14381 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
14382 ("python-six" ,python-six)))
14383 (home-page
14384 "https://github.com/Yelp/swagger_spec_validator")
14385 (synopsis "Validation of Swagger specifications")
14386 (description "@code{swagger_spec_validator} provides a library for
14387validating Swagger API specifications.")
14388 (license license:asl2.0)))
14389
14390(define-public python2-swagger-spec-validator
14391 (package-with-python2 python-swagger-spec-validator))
14392
14393(define-public python-apache-libcloud
14394 (package
14395 (name "python-apache-libcloud")
14396 (version "2.4.0")
14397 (source
14398 (origin
14399 (method url-fetch)
14400 (uri (pypi-uri "apache-libcloud" version))
14401 (sha256
14402 (base32
14403 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
14404 (build-system python-build-system)
14405 (arguments
14406 `(#:phases
14407 (modify-phases %standard-phases
14408 (add-after 'unpack 'patch-ssh
14409 (lambda* (#:key inputs #:allow-other-keys)
14410 (substitute* "libcloud/compute/ssh.py"
14411 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
14412 "/bin/ssh" "'")))
14413 #t))
14414 (add-after 'unpack 'patch-tests
14415 (lambda _
14416 (substitute* "./libcloud/test/test_file_fixtures.py"
14417 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
14418 (("def _ascii") "def _raw_data(self, method, url, body, headers):
14419 return (httplib.OK,
14420 \"1234abcd\",
14421 {\"test\": \"value\"},
14422 httplib.responses[httplib.OK])
14423 def _ascii"))
14424 (substitute* "libcloud/test/compute/test_ssh_client.py"
14425 (("class ShellOutSSHClientTests")
14426 "@unittest.skip(\"Guix container doesn't have ssh service\")
14427class ShellOutSSHClientTests")
14428 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
14429 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
14430 (("'.xF0', '.x90', '.x8D', '.x88'")
14431 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
14432 #t))
14433 (add-before 'check 'copy-secret
14434 (lambda _
14435 (copy-file "libcloud/test/secrets.py-dist"
14436 "libcloud/test/secrets.py")
14437 #t)))))
14438 (inputs
14439 `(("openssh" ,openssh)))
14440 (propagated-inputs
14441 `(("python-paramiko" ,python-paramiko)
14442 ("python-requests" ,python-requests)))
14443 (native-inputs
14444 `(("python-lockfile" ,python-lockfile)
14445 ("python-mock" ,python-mock)
14446 ("python-pytest" ,python-pytest)
14447 ("python-pytest-runner" ,python-pytest-runner)
14448 ("python-requests-mock" ,python-requests-mock)))
14449 (home-page "https://libcloud.apache.org/")
14450 (synopsis "Unified Cloud API")
14451 (description "@code{libcloud} is a Python library for interacting with
14452many of the popular cloud service providers using a unified API.")
14453 (license license:asl2.0)))
14454
14455(define-public python2-apache-libcloud
14456 (package-with-python2 python-apache-libcloud))
14457
1639e0b7 14458(define-public python-smmap
44d10b1f 14459 (package
1639e0b7
MC
14460 (name "python-smmap")
14461 (version "3.0.1")
44d10b1f
RW
14462 (source
14463 (origin
14464 (method url-fetch)
1639e0b7 14465 (uri (pypi-uri "smmap" version))
44d10b1f 14466 (sha256
1639e0b7 14467 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
44d10b1f
RW
14468 (build-system python-build-system)
14469 (native-inputs
14470 `(("python-nosexcover" ,python-nosexcover)))
14471 (home-page "https://github.com/Byron/smmap")
14472 (synopsis "Python sliding window memory map manager")
1639e0b7 14473 (description "@code{smmap} is a pure Python implementation of a sliding
44d10b1f
RW
14474window memory map manager.")
14475 (license license:bsd-3)))
14476
1639e0b7
MC
14477(define-public python-smmap2
14478 (deprecated-package "python-smmap2" python-smmap))
14479
14480(define-public python2-smmap
14481 (package-with-python2 python-smmap))
14482
44d10b1f 14483(define-public python2-smmap2
1639e0b7 14484 (deprecated-package "python2-smmap2" python2-smmap))
44d10b1f
RW
14485
14486(define-public python-regex
14487 (package
14488 (name "python-regex")
c187c9d7 14489 (version "2019.04.14")
44d10b1f
RW
14490 (source (origin
14491 (method url-fetch)
14492 (uri (pypi-uri "regex" version))
14493 (sha256
14494 (base32
c187c9d7
BT
14495 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
14496 ;; TODO: Fix and enable regex_test.py tests that complain about the
14497 ;; test.support module not existing.
44d10b1f
RW
14498 (build-system python-build-system)
14499 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
14500 (synopsis "Alternative regular expression module")
14501 (description "This regular expression implementation is backwards-
14502compatible with the standard @code{re} module, but offers additional
14503functionality like full case-folding for case-insensitive matches in Unicode.")
14504 (license license:psfl)))
14505
14506(define-public python2-regex
14507 (package-with-python2 python-regex))
14508
14509(define-public python2-pyopengl
14510 (package
14511 (name "python2-pyopengl")
14512 (version "3.1.0")
14513 (source
14514 (origin
14515 (method url-fetch)
14516 (uri (pypi-uri "PyOpenGL" version))
14517 (sha256
14518 (base32
14519 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
14520 (arguments
14521 `(#:python ,python-2))
14522 (build-system python-build-system)
14523 (home-page "http://pyopengl.sourceforge.net")
14524 (synopsis "Standard OpenGL bindings for Python")
14525 (description
14526 "PyOpenGL is the most common cross platform Python binding to OpenGL and
14527related APIs. The binding is created using the standard @code{ctypes}
14528library.")
14529 (license license:bsd-3)))
14530
14531(define-public python2-pyopengl-accelerate
14532 (package
14533 (inherit python2-pyopengl)
14534 (name "python2-pyopengl-accelerate")
14535 (version "3.1.0")
14536 (source
14537 (origin
14538 (method url-fetch)
14539 (uri (pypi-uri "PyOpenGL-accelerate" version))
14540 (sha256
14541 (base32
14542 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
14543 (synopsis "Acceleration code for PyOpenGL")
14544 (description
14545 "This is the Cython-coded accelerator module for PyOpenGL.")))
14546
14547(define-public python-rencode
14548 (package
14549 (name "python-rencode")
14550 (version "1.0.5")
14551 (source
14552 (origin
14553 (method url-fetch)
14554 (uri (pypi-uri "rencode" version))
14555 (sha256
14556 (base32
14557 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
14558 (build-system python-build-system)
14559 (arguments
14560 `(#:phases
14561 (modify-phases %standard-phases
14562 (add-before 'check 'delete-bogus-test
14563 ;; This test requires /home/aresch/Downloads, which is not provided by
14564 ;; the build environment.
14565 (lambda _
14566 (delete-file "rencode/t.py")
14567 #t)))))
14568 (native-inputs `(("pkg-config" ,pkg-config)
14569 ("python-cython" ,python-cython)))
14570 (home-page "https://github.com/aresch/rencode")
14571 (synopsis "Serialization of heterogeneous data structures")
14572 (description
14573 "The @code{rencode} module is a data structure serialization library,
14574similar to @code{bencode} from the BitTorrent project. For complex,
14575heterogeneous data structures with many small elements, r-encoding stake up
14576significantly less space than b-encodings. This version of rencode is a
14577complete rewrite in Cython to attempt to increase the performance over the
14578pure Python module.")
14579 (license license:bsd-3)))
14580
14581(define-public python2-rencode
14582 (package-with-python2 python-rencode))
14583
14584(define-public python-xenon
14585 (package
14586 (name "python-xenon")
8c06d6d8 14587 (version "0.7.0")
44d10b1f
RW
14588 (source
14589 (origin
14590 (method url-fetch)
14591 (uri (pypi-uri "xenon" version))
14592 (sha256
14593 (base32
8c06d6d8 14594 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
44d10b1f
RW
14595 (build-system python-build-system)
14596 (native-inputs
14597 `(("python-pyyaml" ,python-pyyaml)
14598 ("python-radon" ,python-radon)
14599 ("python-requests" ,python-requests)
14600 ("python-flake8" ,python-flake8)
14601 ("python-tox" ,python-tox)))
14602 (arguments
8c06d6d8
MC
14603 `(#:tests? #f ;test suite not shipped with the PyPI archive
14604 #:phases
44d10b1f
RW
14605 (modify-phases %standard-phases
14606 (add-before 'build 'patch-test-requirements
14607 (lambda _
14608 ;; Remove httpretty dependency for tests.
14609 (substitute* "setup.py"
14610 (("httpretty") ""))
14611 #t)))))
14612 (home-page "https://xenon.readthedocs.org/")
14613 (synopsis "Monitor code metrics for Python on your CI server")
14614 (description
14615 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
14616Ideally, @code{xenon} is run every time code is committed. Through command
14617line options, various thresholds can be set for the complexity of code. It
14618will fail (i.e. it will exit with a non-zero exit code) when any of these
14619requirements is not met.")
14620 (license license:expat)))
14621
14622(define-public python2-xenon
14623 (package-with-python2 python-xenon))
14624
14625(define-public python-pysocks
14626 (package
14627 (name "python-pysocks")
b8725cdf 14628 (version "1.7.0")
44d10b1f
RW
14629 (source
14630 (origin
14631 (method url-fetch)
14632 (uri (pypi-uri "PySocks" version))
14633 (sha256
14634 (base32
b8725cdf 14635 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
14636 (build-system python-build-system)
14637 (arguments `(#:tests? #f))
14638 (home-page "https://github.com/Anorov/PySocks")
14639 (synopsis "SOCKS client module")
14640 (description "@code{pysocks} is an updated and semi-actively maintained
14641version of @code{SocksiPy} with bug fixes and extra features.")
14642 (license license:bsd-3)))
14643
14644(define-public python2-pysocks
14645 (package-with-python2 python-pysocks))
14646
14647(define-public python-pydiff
14648 (package
14649 (name "python-pydiff")
14650 (version "0.2")
14651 (source
14652 (origin
14653 (method url-fetch)
14654 (uri (pypi-uri "pydiff" version))
14655 (sha256
14656 (base32
14657 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
14658 (build-system python-build-system)
14659 (home-page "https://github.com/myint/pydiff")
14660 (synopsis "Library to diff two Python files at the bytecode level")
14661 (description
14662 "@code{pydiff} makes it easy to look for actual code changes while
14663ignoring formatting changes.")
14664 (license license:expat)))
14665
14666(define-public python2-pydiff
14667 (package-with-python2 python-pydiff))
14668
14669(define-public python-tqdm
14670 (package
14671 (name "python-tqdm")
8317c89a 14672 (version "4.43.0")
44d10b1f
RW
14673 (source
14674 (origin
14675 (method url-fetch)
14676 (uri (pypi-uri "tqdm" version))
14677 (sha256
14678 (base32
8317c89a 14679 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
44d10b1f 14680 (build-system python-build-system)
8317c89a
MB
14681 (arguments
14682 '(#:phases (modify-phases %standard-phases
14683 (replace 'check
14684 (lambda* (#:key inputs outputs #:allow-other-keys)
14685 (add-installed-pythonpath inputs outputs)
14686 ;; This invokation is taken from tox.ini.
14687 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
14688 "-d" "-v" "tqdm/"))))))
44d10b1f 14689 (native-inputs
8317c89a 14690 `(("python-nose" ,python-nose)))
44d10b1f
RW
14691 (home-page "https://github.com/tqdm/tqdm")
14692 (synopsis "Fast, extensible progress meter")
14693 (description
14694 "Make loops show a progress bar on the console by just wrapping any
14695iterable with @code{|tqdm(iterable)|}. Offers many options to define
14696design and layout.")
8317c89a 14697 (license (list license:mpl2.0 license:expat))))
44d10b1f
RW
14698
14699(define-public python2-tqdm
8317c89a 14700 (package-with-python2 python-tqdm))
44d10b1f
RW
14701
14702(define-public python-pkginfo
14703 (package
14704 (name "python-pkginfo")
14705 (version "1.4.2")
14706 (source
14707 (origin
14708 (method url-fetch)
14709 (uri (pypi-uri "pkginfo" version))
14710 (sha256
14711 (base32
14712 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14713 (build-system python-build-system)
14714 (arguments
14715 ;; The tests are broken upstream.
14716 '(#:tests? #f))
14717 (home-page
14718 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14719 (synopsis
14720 "Query metadatdata from sdists, bdists, and installed packages")
14721 (description
14722 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14723source distriubtion (an sdist) or a binary distribution (e.g., created by
14724running bdist_egg). It can also query the EGG-INFO directory of an installed
14725distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14726created by running @code{python setup.py develop}).")
14727 (license license:expat)))
14728
14729(define-public python2-pkginfo
14730 (package-with-python2 python-pkginfo))
14731
14732(define-public python-twine
14733 (package
14734 (name "python-twine")
14735 (version "1.9.1")
14736 (source
14737 (origin
14738 (method url-fetch)
14739 (uri (pypi-uri "twine" version))
14740 (sha256
14741 (base32
14742 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14743 (build-system python-build-system)
14744 (propagated-inputs
14745 `(("python-tqdm" ,python-tqdm)
14746 ("python-pkginfo" ,python-pkginfo)
14747 ("python-requests" ,python-requests)
14748 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14749 (home-page "https://github.com/pypa/twine")
14750 (synopsis "Collection of utilities for interacting with PyPI")
14751 (description
14752 "@code{twine} currently supports registering projects and uploading
14753distributions. It authenticates the user over HTTPS, allows them to pre-sign
14754their files and supports any packaging format (including wheels).")
14755 (license license:asl2.0)))
14756
14757(define-public python2-twine
14758 (package-with-python2 python-twine))
14759
14760(define-public python-linecache2
14761 (package
14762 (name "python-linecache2")
14763 (version "1.0.0")
14764 (source
14765 (origin
14766 (method url-fetch)
14767 (uri (pypi-uri "linecache2" version))
14768 (sha256
14769 (base32
14770 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14771 (build-system python-build-system)
14772 (arguments
14773 `(;; The tests depend on unittest2, and our version is a bit too old.
14774 #:tests? #f))
14775 (native-inputs
14776 `(("python-pbr" ,python-pbr-minimal)))
14777 (home-page
14778 "https://github.com/testing-cabal/linecache2")
14779 (synopsis "Backports of the linecache module")
14780 (description
14781 "The linecache module allows one to get any line from any file, while
14782attempting to optimize internally, using a cache, the common case where many
14783lines are read from a single file.")
14784 (license license:psfl)))
14785
14786(define-public python2-linecache2
14787 (package-with-python2 python-linecache2))
14788
14789(define-public python-traceback2
14790 (package
14791 (name "python-traceback2")
14792 (version "1.4.0")
14793 (source
14794 (origin
14795 (method url-fetch)
14796 (uri (pypi-uri "traceback2" version))
14797 (sha256
14798 (base32
14799 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14800 (build-system python-build-system)
14801 (arguments
14802 `(;; python-traceback2 and python-unittest2 depend on one another.
14803 #:tests? #f))
14804 (native-inputs
14805 `(("python-pbr" ,python-pbr-minimal)))
14806 (propagated-inputs
14807 `(("python-linecache2" ,python-linecache2)))
14808 (home-page
14809 "https://github.com/testing-cabal/traceback2")
14810 (synopsis "Backports of the traceback module")
14811 (description
14812 "This module provides a standard interface to extract, format and print
14813stack traces of Python programs. It exactly mimics the behavior of the Python
14814interpreter when it prints a stack trace.")
14815 (license license:psfl)))
14816
14817(define-public python2-traceback2
14818 (package-with-python2 python-traceback2))
14819
14820(define-public python-ratelimiter
14821 (package
14822 (name "python-ratelimiter")
14823 (version "1.2.0")
14824 (source
14825 (origin
14826 (method url-fetch)
14827 (uri (pypi-uri "ratelimiter" version))
14828 (sha256
14829 (base32
14830 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14831 (build-system python-build-system)
14832 (arguments
14833 '(#:tests? #f)) ; There are no tests in the pypi archive.
14834 (home-page "https://github.com/RazerM/ratelimiter")
14835 (synopsis "Simple rate limiting object")
14836 (description
14837 "The @code{ratelimiter} module ensures that an operation will not be
14838executed more than a given number of times during a given period.")
14839 (license license:asl2.0)))
14840
14841(define-public python2-ratelimiter
14842 (package-with-python2 python-ratelimiter))
14843
14844(define-public python-dukpy
14845 (package
14846 (name "python-dukpy")
14847 (version "0.3")
14848 (source
14849 (origin
5b77ebe1
TGR
14850 (method git-fetch)
14851 (uri (git-reference
14852 (url "https://github.com/kovidgoyal/dukpy.git")
14853 (commit (string-append "v" version))))
14854 (file-name (git-file-name name version))
44d10b1f 14855 (sha256
5b77ebe1 14856 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14857 (build-system python-build-system)
14858 (home-page "https://github.com/kovidgoyal/dukpy")
14859 (synopsis "Run JavaScript in python")
14860 (description
14861 "dukpy is a JavaScript runtime environment for Python using the duktape
14862embeddable JavaScript engine.")
14863 ;; Dukpy is licensed under MIT like the embedded duktape library,
14864 ;; with 'errors.c' as GPL3.
14865 (license (list license:expat license:gpl3))))
14866
14867(define-public python2-dukpy
14868 (package-with-python2 python-dukpy))
14869
14870(define-public python-jsonrpclib-pelix
14871 (package
14872 (name "python-jsonrpclib-pelix")
14873 (version "0.3.2")
14874 (source
14875 (origin
14876 (method url-fetch)
14877 (uri (pypi-uri "jsonrpclib-pelix" version))
14878 (sha256
14879 (base32
14880 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14881 (build-system python-build-system)
14882 (arguments
14883 `(#:tests? #f)) ; no tests in PyPI tarball
14884 (home-page "https://github.com/tcalmant/jsonrpclib/")
14885 (synopsis "JSON-RPC 2.0 client library for Python")
14886 (description
14887 "This library implements the JSON-RPC v2.0
14888specification (backwards-compatible) as a client library for Python. This
14889version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14890services.")
14891 (license license:asl2.0)))
14892
14893(define-public python2-jsonrpclib-pelix
14894 (package-with-python2 python-jsonrpclib-pelix))
14895
14896(define-public python-setuptools-scm-git-archive
14897 (package
14898 (name "python-setuptools-scm-git-archive")
14899 (version "1.0")
14900 (source
14901 (origin
14902 (method url-fetch)
14903 (uri (pypi-uri "setuptools_scm_git_archive" version))
14904 (sha256
14905 (base32
14906 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14907 (build-system python-build-system)
14908 (native-inputs
14909 `(("python-pytest" ,python-pytest)))
14910 (propagated-inputs
14911 `(("python-setuptools-scm" ,python-setuptools-scm)))
14912 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14913 (synopsis "Setuptools_scm plugin for git archives")
14914 (description
14915 "The setuptools_scm_git_archive package is a plugin to
14916setuptools_scm, which supports obtaining versions from git archives that
14917belong to tagged versions.")
14918 (license license:expat)))
14919
14920(define-public python2-setuptools-scm-git-archive
14921 (package-with-python2 python-setuptools-scm-git-archive))
14922
724a350c
RW
14923(define-public python-setuptools-git
14924 (package
14925 (name "python-setuptools-git")
14926 (version "1.2")
14927 (source
14928 (origin
14929 (method url-fetch)
14930 (uri (pypi-uri "setuptools-git" version))
14931 (sha256
14932 (base32
14933 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14934 (build-system python-build-system)
14935 (arguments
14936 `(#:phases
14937 (modify-phases %standard-phases
14938 ;; This is needed for tests.
14939 (add-after 'unpack 'configure-git
14940 (lambda _
14941 (setenv "HOME" "/tmp")
14942 (invoke "git" "config" "--global" "user.email" "guix")
14943 (invoke "git" "config" "--global" "user.name" "guix")
14944 #t)))))
14945 (native-inputs
14946 `(("git" ,git-minimal)))
14947 (home-page "https://github.com/msabramo/setuptools-git")
14948 (synopsis "Setuptools revision control system plugin for Git")
14949 (description
14950 "This package provides a plugin for Setuptools for revision control with
14951Git.")
14952 (license license:bsd-3)))
14953
44d10b1f
RW
14954(define-public python-pyclipper
14955 (package
14956 (name "python-pyclipper")
ff3d1b99 14957 (version "1.1.0.post3")
44d10b1f
RW
14958 (source
14959 (origin
14960 (method url-fetch)
14961 (uri (pypi-uri "pyclipper" version ".zip"))
14962 (sha256
ff3d1b99 14963 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14964 (modules '((guix build utils)))
14965 (snippet
14966 '(begin
14967 ;; This file is generated by Cython.
14968 (delete-file "pyclipper/pyclipper.cpp") #t))))
14969 (build-system python-build-system)
14970 (arguments
14971 `(#:phases
14972 (modify-phases %standard-phases
14973 (add-before 'build 'cythonize-sources
14974 (lambda _
14975 (with-directory-excursion "pyclipper"
14976 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14977 (propagated-inputs
14978 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14979 (native-inputs
14980 `(("python-cython" ,python-cython)
14981 ("python-pytest" ,python-pytest)
14982 ("python-pytest-runner" ,python-pytest-runner)
14983 ("python-unittest2" ,python-unittest2)
14984 ("unzip" ,unzip)))
14985 (home-page "https://github.com/greginvm/pyclipper")
14986 (synopsis "Wrapper for Angus Johnson's Clipper library")
14987 (description
14988 "Pyclipper is a Cython wrapper for the C++ translation of the
14989Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14990 (license license:expat)))
14991
14992(define-public python2-pyclipper
14993 (package-with-python2 python-pyclipper))
14994
14995(define-public python2-booleanoperations
14996 (package
14997 (name "python2-booleanoperations")
14998 (version "0.7.1")
14999 (source
15000 (origin
15001 (method url-fetch)
15002 (uri (pypi-uri "booleanOperations" version ".zip"))
15003 (sha256
15004 (base32
15005 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
15006 (build-system python-build-system)
15007 (arguments
15008 `(#:python ,python-2))
15009 (native-inputs
15010 `(("unzip" ,unzip)
15011 ("python2-pytest" ,python2-pytest)
15012 ("python2-pytest-runner" ,python2-pytest-runner)))
15013 (propagated-inputs
15014 `(("python-fonttools" ,python2-fonttools)
15015 ("python-pyclipper" ,python2-pyclipper)
15016 ("python-ufolib" ,python2-ufolib)))
15017 (home-page "https://github.com/typemytype/booleanOperations")
15018 (synopsis "Boolean operations on paths")
15019 (description
15020 "BooleanOperations provides a Python library that enables
15021boolean operations on paths.")
15022 (license license:expat)))
15023
15024(define-public python-tempdir
15025 (package
15026 (name "python-tempdir")
15027 (version "0.7.1")
15028 (source
15029 (origin
15030 (method url-fetch)
15031 (uri (pypi-uri "tempdir" version))
15032 (sha256
15033 (base32
15034 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
15035 (build-system python-build-system)
15036 (home-page "https://pypi.org/project/tempdir/")
15037 (arguments
15038 ;; the package has no tests
15039 '(#:tests? #f))
15040 (synopsis "Python library for managing temporary directories")
15041 (description
15042 "This library manages temporary directories that are automatically
15043deleted with all their contents when they are no longer needed. It is
15044particularly convenient for use in tests.")
15045 (license license:expat)))
15046
15047(define-public python2-tempdir
15048 (package-with-python2 python-tempdir))
15049
15050(define-public python-activepapers
15051 (package
15052 (name "python-activepapers")
15053 (version "0.2.2")
15054 (source
15055 (origin
15056 (method url-fetch)
15057 (uri (pypi-uri "ActivePapers.Py" version))
15058 (sha256
15059 (base32
15060 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
15061 (build-system python-build-system)
15062 (arguments
15063 `(#:modules ((ice-9 ftw)
15064 (srfi srfi-1)
15065 (guix build utils)
15066 (guix build python-build-system))
15067
15068 #:phases
15069 (modify-phases %standard-phases
15070 (add-after 'unpack 'delete-python2-code
15071 (lambda _
15072 (for-each delete-file
15073 '("lib/activepapers/builtins2.py"
15074 "lib/activepapers/standardlib2.py"
15075 "lib/activepapers/utility2.py"))))
15076 (replace 'check
15077 (lambda _
15078 ;; Deactivate the test cases that download files
15079 (setenv "NO_NETWORK_ACCESS" "1")
15080 ;; For some strange reason, some tests fail if nosetests runs all
15081 ;; test modules in a single execution. They pass if each test
15082 ;; module is run individually.
15083 (for-each (lambda (filename)
15084 (invoke "nosetests"
15085 (string-append "tests/" filename)))
15086 (scandir "tests"
15087 (lambda (filename)
15088 (string-suffix? ".py" filename)))))))))
15089 (native-inputs
15090 `(("python-tempdir" ,python-tempdir)
15091 ("python-nose" ,python-nose)))
15092 (propagated-inputs
15093 `(("python-h5py" ,python-h5py)))
26827dfe 15094 (home-page "https://www.activepapers.org/")
44d10b1f
RW
15095 (synopsis "Executable papers for scientific computing")
15096 (description
15097 "ActivePapers is a tool for working with executable papers, which
15098combine data, code, and documentation in single-file packages,
15099suitable for publication as supplementary material or on repositories
15100such as figshare or Zenodo.")
15101 (properties `((python2-variant . ,(delay python2-activepapers))))
15102 (license license:bsd-3)))
15103
15104(define-public python2-activepapers
15105 (let ((base (package-with-python2
15106 (strip-python2-variant python-activepapers))))
15107 (package
15108 (inherit base)
15109 (arguments
15110 (substitute-keyword-arguments (package-arguments base)
15111 ((#:phases phases)
15112 `(modify-phases ,phases
15113 (delete 'delete-python2-code)
15114 (add-after 'unpack 'delete-python3-code
15115 (lambda _
15116 (for-each delete-file
15117 '("lib/activepapers/builtins3.py"
15118 "lib/activepapers/standardlib3.py"
15119 "lib/activepapers/utility3.py")))))))))))
15120
15121(define-public python-semver
15122 (package
15123 (name "python-semver")
594280b1 15124 (version "2.9.0")
44d10b1f 15125 (source
2ecbba24
BG
15126 (origin
15127 (method url-fetch)
15128 (uri (pypi-uri "semver" version))
15129 (sha256
15130 (base32
15131 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
44d10b1f 15132 (build-system python-build-system)
44d10b1f 15133 (native-inputs
b4e1ca06
RJ
15134 `(("python-appdirs" ,python-appdirs)
15135 ("python-distlib" ,python-distlib)
15136 ("python-importlib-metadata" ,python-importlib-metadata)
15137 ("python-filelock" ,python-filelock)
15138 ("python-six" ,python-six)
15139 ("python-tox" ,python-tox)
44d10b1f
RW
15140 ("python-virtualenv" ,python-virtualenv)))
15141 (home-page "https://github.com/k-bx/python-semver")
15142 (synopsis "Python helper for Semantic Versioning")
15143 (description "This package provides a Python library for
15144@url{Semantic Versioning, http://semver.org/}.")
15145 (license license:bsd-3)))
15146
15147(define-public python2-semver
15148 (package-with-python2 python-semver))
15149
15150(define-public python-pyro4
15151 (package
15152 (name "python-pyro4")
3ce91d44 15153 (version "4.77")
44d10b1f
RW
15154 (source
15155 (origin
15156 (method url-fetch)
15157 (uri (pypi-uri "Pyro4" version))
15158 (sha256
3ce91d44 15159 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 15160 (build-system python-build-system)
3ce91d44
GL
15161 (arguments
15162 '(#:tests? #f)) ;FIXME: Some tests require network access.
15163 (native-inputs
15164 `(("python-cloudpickle" ,python-cloudpickle)
15165 ("python-dill" ,python-dill)
15166 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
15167 (propagated-inputs
15168 `(("python-serpent" ,python-serpent)))
15169 (home-page "https://pyro4.readthedocs.io")
15170 (synopsis "Distributed object middleware for Python")
15171 (description
15172 "Pyro enables you to build applications in which objects can talk to each
15173other over the network. You can just use normal Python method calls to call
15174objects on other machines, also known as remote procedure calls (RPC).")
15175 (license license:expat)))
15176
15177(define-public python2-pyro
15178 (package
15179 (name "python2-pyro")
15180 (version "3.16")
15181 (source
15182 (origin
15183 (method url-fetch)
15184 (uri (pypi-uri "Pyro" version))
15185 (file-name (string-append "Pyro-" version ".tar.gz"))
15186 (sha256
15187 (base32
15188 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
15189 (build-system python-build-system)
15190 (arguments
15191 ;; Pyro is not compatible with Python 3
15192 `(#:python ,python-2
15193 ;; Pyro has no test cases for automatic execution
15194 #:tests? #f))
26be188f 15195 (home-page "https://pythonhosted.org/Pyro/")
44d10b1f
RW
15196 (synopsis "Distributed object manager for Python")
15197 (description "Pyro is a Distributed Object Technology system
15198written in Python that is designed to be easy to use. It resembles
15199Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
15200which is a system and language independent Distributed Object Technology
15201and has much more to offer than Pyro or RMI. Pyro 3.x is no
15202longer maintained. New projects should use Pyro4 instead, which
15203is the new Pyro version that is actively developed.")
15204 (license license:expat)))
15205
15206(define-public python2-scientific
15207 (package
15208 (name "python2-scientific")
15209 (version "2.9.4")
15210 (source
15211 (origin
c695f011
KH
15212 (method git-fetch)
15213 (uri (git-reference
15214 (url "https://github.com/khinsen/ScientificPython")
15215 (commit (string-append "rel" version))))
15216 (file-name (git-file-name name version))
44d10b1f
RW
15217 (sha256
15218 (base32
c695f011 15219 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
15220 (build-system python-build-system)
15221 (inputs
15222 `(("netcdf" ,netcdf)))
15223 (propagated-inputs
15224 `(("python-numpy" ,python2-numpy-1.8)
15225 ("python-pyro" ,python2-pyro)))
15226 (arguments
15227 ;; ScientificPython is not compatible with Python 3
15228 `(#:python ,python-2
15229 #:tests? #f ; No test suite
15230 #:phases
15231 (modify-phases %standard-phases
15232 (replace 'build
15233 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
15234 (invoke "python" "setup.py" "build"
15235 (string-append "--netcdf_prefix="
15236 (assoc-ref inputs "netcdf"))))))))
c695f011 15237 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
15238 (synopsis "Python modules for scientific computing")
15239 (description "ScientificPython is a collection of Python modules that are
15240useful for scientific computing. Most modules are rather general (Geometry,
15241physical units, automatic derivatives, ...) whereas others are more
15242domain-specific (e.g. netCDF and PDB support). The library is currently
15243not actively maintained and works only with Python 2 and NumPy < 1.9.")
15244 (license license:cecill-c)))
15245
15246(define-public python2-mmtk
15247 (package
15248 (name "python2-mmtk")
fe9b72c5 15249 (version "2.7.12")
44d10b1f
RW
15250 (source
15251 (origin
fe9b72c5
KH
15252 (method git-fetch)
15253 (uri (git-reference
15254 (url "https://github.com/khinsen/MMTK")
15255 (commit (string-append "rel" version))))
15256 (file-name (git-file-name name version))
44d10b1f
RW
15257 (sha256
15258 (base32
fe9b72c5 15259 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
15260 (build-system python-build-system)
15261 (native-inputs
15262 `(("netcdf" ,netcdf)))
15263 (propagated-inputs
15264 `(("python-scientific" ,python2-scientific)
15265 ("python-tkinter" ,python-2 "tk")))
15266 (arguments
15267 `(#:python ,python-2
15268 #:tests? #f
15269 #:phases
15270 (modify-phases %standard-phases
15271 (add-before 'build 'includes-from-scientific
15272 (lambda* (#:key inputs #:allow-other-keys)
15273 (mkdir-p "Include/Scientific")
15274 (copy-recursively
15275 (string-append
15276 (assoc-ref inputs "python-scientific")
15277 "/include/python2.7/Scientific")
15278 "Include/Scientific"))))))
15279 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
15280 (synopsis "Python library for molecular simulation")
15281 (description "MMTK is a library for molecular simulations with an emphasis
15282on biomolecules. It provides widely used methods such as Molecular Dynamics
15283and normal mode analysis, but also basic routines for implementing new methods
15284for simulation and analysis. The library is currently not actively maintained
15285and works only with Python 2 and NumPy < 1.9.")
15286 (license license:cecill-c)))
15287
15288(define-public python-phonenumbers
15289 (package
15290 (name "python-phonenumbers")
15291 (version "8.9.1")
15292 (source
15293 (origin
15294 (method url-fetch)
15295 (uri (pypi-uri "phonenumbers" version))
15296 (sha256
15297 (base32
15298 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
15299 (build-system python-build-system)
15300 (home-page
15301 "https://github.com/daviddrysdale/python-phonenumbers")
15302 (synopsis
15303 "Python library for dealing with international phone numbers")
15304 (description
15305 "This package provides a Python port of Google's libphonenumber library.")
15306 (license license:asl2.0)))
15307
15308(define-public python2-phonenumbers
15309 (package-with-python2 python-phonenumbers))
15310
15311(define-public python-send2trash
15312 (package
15313 (name "python-send2trash")
d9b0216b 15314 (version "1.5.0")
44d10b1f 15315 (source
d9b0216b 15316 (origin (method git-fetch)
44d10b1f 15317 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
15318 (uri (git-reference
15319 (url "https://github.com/hsoft/send2trash.git")
15320 (commit version)))
15321 (file-name (git-file-name name version))
44d10b1f
RW
15322 (sha256
15323 (base32
d9b0216b 15324 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
15325 (build-system python-build-system)
15326 (arguments
15327 '(#:phases
15328 (modify-phases %standard-phases
15329 (add-before 'check 'pre-check
15330 (lambda _
15331 (mkdir-p "/tmp/foo")
15332 (setenv "HOME" "/tmp/foo")
15333 #t)))))
15334 (home-page "https://github.com/hsoft/send2trash")
15335 (synopsis "Send files to the user's @file{~/Trash} directory")
15336 (description "This package provides a Python library to send files to the
15337user's @file{~/Trash} directory.")
20b3fde7 15338 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
15339 (license license:bsd-3)))
15340
15341(define-public python2-send2trash
15342 (package
f32164ab 15343 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
15344 (arguments
15345 (substitute-keyword-arguments (package-arguments python-send2trash)
15346 ((#:phases phases)
15347 `(modify-phases ,phases
15348 (add-before 'check 'setenv
15349 (lambda _
15350 (setenv "PYTHONPATH"
15351 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 15352 #t))))))))
44d10b1f
RW
15353
15354(define-public python-yapf
15355 (package
15356 (name "python-yapf")
19ba75dc 15357 (version "0.29.0")
44d10b1f
RW
15358 (source
15359 (origin
15360 (method url-fetch)
15361 (uri (pypi-uri "yapf" version))
15362 (sha256
15363 (base32
19ba75dc 15364 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
44d10b1f
RW
15365 (build-system python-build-system)
15366 (home-page "https://github.com/google/yapf")
15367 (synopsis "Formatter for Python code")
15368 (description "YAPF is a formatter for Python code. It's based off of
15369@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
15370takes the code and reformats it to the best formatting that conforms to the
15371style guide, even if the original code didn't violate the style guide.")
15372 (license license:asl2.0)))
15373
15374(define-public python2-yapf
15375 (package-with-python2 python-yapf))
15376
15377(define-public python-gyp
15378 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
15379 (revision "0"))
15380 (package
15381 (name "python-gyp")
15382 ;; Google does not release versions,
15383 ;; based on second most recent commit date.
15384 (version (git-version "0.0.0" revision commit))
15385 (source
15386 (origin
15387 ;; Google does not release tarballs,
15388 ;; git checkout is needed.
15389 (method git-fetch)
15390 (uri (git-reference
15391 (url "https://chromium.googlesource.com/external/gyp")
15392 (commit commit)))
15393 (file-name (git-file-name name version))
15394 (sha256
15395 (base32
15396 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
15397 (build-system python-build-system)
15398 (home-page "https://gyp.gsrc.io/")
15399 (synopsis "GYP is a Meta-Build system")
15400 (description
15401 "GYP builds build systems for large, cross platform applications.
15402It can be used to generate XCode projects, Visual Studio projects, Ninja build
15403files, and Makefiles.")
15404 (license license:bsd-3))))
15405
15406(define-public python2-gyp
15407 (package-with-python2 python-gyp))
15408
15409(define-public python-whatever
15410 (package
15411 (name "python-whatever")
97610a66 15412 (version "0.6")
44d10b1f
RW
15413 (source
15414 (origin
ac0ea38c
EF
15415 (method git-fetch)
15416 (uri (git-reference
15417 (url "https://github.com/Suor/whatever")
15418 (commit version)))
15419 (file-name (git-file-name name version))
44d10b1f 15420 (sha256
ac0ea38c 15421 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
44d10b1f
RW
15422 (build-system python-build-system)
15423 (arguments
15424 `(#:phases
15425 (modify-phases %standard-phases
15426 (replace 'check
15427 (lambda _
15428 (invoke "py.test"))))))
15429 (native-inputs
15430 `(("python-pytest" ,python-pytest)))
15431 (home-page "http://github.com/Suor/whatever")
15432 (synopsis "Make anonymous functions by partial application of operators")
15433 (description "@code{whatever} provides an easy way to make anonymous
15434functions by partial application of operators.")
15435 (license license:bsd-3)))
15436
15437(define-public python2-whatever
15438 (package-with-python2 python-whatever))
15439
15440(define-public python-funcy
15441 (package
15442 (name "python-funcy")
9e396ab8 15443 (version "1.11")
44d10b1f
RW
15444 (source
15445 (origin
a85c6027
TGR
15446 (method git-fetch)
15447 (uri (git-reference
15448 (url "https://github.com/Suor/funcy.git")
15449 (commit version)))
44d10b1f 15450 (sha256
a85c6027
TGR
15451 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
15452 (file-name (git-file-name name version))))
44d10b1f
RW
15453 (build-system python-build-system)
15454 (arguments
15455 `(#:phases
15456 (modify-phases %standard-phases
15457 (replace 'check
15458 (lambda _
15459 (invoke "py.test"))))))
15460 (native-inputs
15461 `(("python-pytest" ,python-pytest)
15462 ("python-whatever" ,python-whatever)))
15463 (home-page "http://github.com/Suor/funcy")
15464 (synopsis "Functional tools")
15465 (description "@code{funcy} is a library that provides functional tools.
15466Examples are:
15467@enumerate
15468@item merge - Merges collections of the same type
15469@item walk - Type-preserving map
15470@item select - Selects a part of a collection
15471@item take - Takes the first n items of a collection
15472@item first - Takes the first item of a collection
15473@item remove - Predicated-removes items of a collection
15474@item concat - Concatenates two collections
15475@item flatten - Flattens a collection with subcollections
15476@item distinct - Returns only distinct items
15477@item split - Predicated-splits a collection
15478@item split_at - Splits a collection at a given item
15479@item group_by - Groups items by group
15480@item pairwise - Pairs off adjacent items
15481@item partial - Partially-applies a function
15482@item curry - Curries a function
15483@item compose - Composes functions
15484@item complement - Complements a predicate
15485@item all_fn - \"all\" with predicate
15486@end enumerate")
15487 (license license:bsd-3)))
15488
15489(define-public python2-funcy
15490 (package-with-python2 python-funcy))
15491
15492(define-public python-isoweek
15493 (package
15494 (name "python-isoweek")
15495 (version "1.3.3")
15496 (source
15497 (origin
15498 (method url-fetch)
15499 (uri (pypi-uri "isoweek" version))
15500 (sha256
15501 (base32
15502 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
15503 (build-system python-build-system)
15504 (home-page "https://github.com/gisle/isoweek")
15505 (synopsis "Objects representing a week")
15506 (description "The @code{isoweek} module provide the class Week that
15507implements the week definition of ISO 8601. This standard also defines
15508a notation for identifying weeks; yyyyWww (where the W is a literal).
15509Week instances stringify to this form.")
15510 (license license:bsd-3)))
15511
15512(define-public python2-isoweek
15513 (package-with-python2 python-isoweek))
15514
15515(define-public python-tokenize-rt
15516 (package
15517 (name "python-tokenize-rt")
15518 (version "2.0.1")
15519 (source
15520 (origin
15521 (method url-fetch)
15522 (uri (pypi-uri "tokenize-rt" version))
15523 (sha256
15524 (base32
15525 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
15526 (build-system python-build-system)
15527 (home-page "https://github.com/asottile/tokenize-rt")
15528 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
15529 (description
15530 "This Python library is a wrapper around @code{tokenize} from the Python
15531standard library. It provides two additional tokens @code{ESCAPED_NL} and
15532@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
15533and @code{tokens_to_src} to roundtrip.")
15534 (license license:expat)))
15535
15536(define-public python-future-fstrings
15537 (package
15538 (name "python-future-fstrings")
15539 (version "0.4.1")
15540 (source
15541 (origin
15542 (method url-fetch)
15543 (uri (pypi-uri "future_fstrings" version))
15544 (sha256
15545 (base32
15546 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
15547 (build-system python-build-system)
15548 (propagated-inputs
15549 `(("python-tokenize-rt" ,python-tokenize-rt)))
15550 (home-page "https://github.com/asottile/future-fstrings")
15551 (synopsis "Backport of fstrings to Python < 3.6")
15552 (description
15553 "This package provides a UTF-8 compatible encoding
15554@code{future_fstrings}, which performs source manipulation. It decodes the
15555source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
15556@code{f} strings.")
15557 (license license:expat)))
15558
dae2eb1c
MC
15559(define-public python-typed-ast
15560 (package
15561 (name "python-typed-ast")
bae89583 15562 (version "1.4.0")
dae2eb1c
MC
15563 (source
15564 (origin
bae89583
MO
15565 (method git-fetch)
15566 (uri (git-reference
15567 (url "https://github.com/python/typed_ast.git")
15568 (commit version)))
dae2eb1c 15569 (sha256
bae89583
MO
15570 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
15571 (file-name (git-file-name name version))))
dae2eb1c
MC
15572 (build-system python-build-system)
15573 (arguments
15574 `(#:modules ((guix build utils)
15575 (guix build python-build-system)
15576 (ice-9 ftw)
15577 (srfi srfi-1)
15578 (srfi srfi-26))
15579 #:phases
15580 (modify-phases %standard-phases
15581 (replace 'check
15582 (lambda _
15583 (let ((cwd (getcwd)))
15584 (setenv "PYTHONPATH"
15585 (string-append cwd "/build/"
15586 (find (cut string-prefix? "lib" <>)
15587 (scandir (string-append cwd "/build")))
15588 ":"
15589 (getenv "PYTHONPATH"))))
15590 (invoke "pytest")
15591 #t)))))
15592 (native-inputs `(("python-pytest" ,python-pytest)))
15593 (home-page "https://github.com/python/typed_ast")
15594 (synopsis "Fork of Python @code{ast} modules with type comment support")
15595 (description "This package provides a parser similar to the standard
15596@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
15597include PEP 484 type comments and are independent of the version of Python
15598under which they are run. The @code{typed_ast} parsers produce the standard
15599Python AST (plus type comments), and are both fast and correct, as they are
15600based on the CPython 2.7 and 3.7 parsers.")
15601 ;; See the file "LICENSE" for the details.
15602 (license (list license:psfl
15603 license:asl2.0
15604 license:expat)))) ;ast27/Parser/spark.py
15605
44d10b1f
RW
15606(define-public python-typing
15607 (package
15608 (name "python-typing")
15609 (version "3.6.6")
15610 (source
15611 (origin
15612 (method url-fetch)
15613 (uri (pypi-uri "typing" version))
15614 (sha256
15615 (base32
15616 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
15617 (build-system python-build-system)
15618 (home-page "https://docs.python.org/3/library/typing.html")
15619 (synopsis "Type hints for Python")
15620 (description "This is a backport of the standard library @code{typing}
15621module to Python versions older than 3.5. Typing defines a standard notation
15622for Python function and variable type annotations. The notation can be used
15623for documenting code in a concise, standard format, and it has been designed
15624to also be used by static and runtime type checkers, static analyzers, IDEs
15625and other tools.")
15626 (license license:psfl)))
15627
15628(define-public python2-typing
15629 (package-with-python2 python-typing))
15630
f89d443b
VC
15631(define-public python-typing-extensions
15632 (package
15633 (name "python-typing-extensions")
15634 (version "3.7.2")
15635 (source
15636 (origin
15637 (method url-fetch)
15638 (uri (pypi-uri "typing_extensions" version))
15639 (sha256
15640 (base32
15641 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
15642 (build-system python-build-system)
15643 (home-page
15644 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
15645 (synopsis "Experimental type hints for Python")
15646 (description
15647 "The typing_extensions module contains additional @code{typing} hints not
15648yet present in the of the @code{typing} standard library.
15649Included are implementations of:
15650@enumerate
15651@item ClassVar
15652@item ContextManager
15653@item Counter
15654@item DefaultDict
15655@item Deque
15656@item NewType
15657@item NoReturn
15658@item overload
15659@item Protocol
15660@item runtime
15661@item Text
15662@item Type
15663@item TYPE_CHECKING
15664@item AsyncGenerator
15665@end enumerate\n")
15666 (license license:psfl)))
15667
44d10b1f
RW
15668(define-public bpython
15669 (package
15670 (name "bpython")
4de93b2f 15671 (version "0.18")
44d10b1f
RW
15672 (source
15673 (origin
15674 (method url-fetch)
15675 (uri (pypi-uri "bpython" version))
15676 (sha256
4de93b2f 15677 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
15678 (build-system python-build-system)
15679 (arguments
15680 `(#:phases
15681 (modify-phases %standard-phases
15682 (add-after 'unpack 'remove-failing-test
15683 (lambda _
15684 ;; Remove failing test. FIXME: make it pass
15685 (delete-file "bpython/test/test_args.py")
15686 #t))
15687 (add-after 'wrap 'add-aliases
15688 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15689 (lambda* (#:key outputs #:allow-other-keys)
15690 (let ((out (assoc-ref outputs "out")))
15691 (for-each
15692 (lambda (old new)
15693 (symlink old (string-append out "/bin/" new)))
15694 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
15695 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
15696 #t)))))
15697 (propagated-inputs
15698 `(("python-pygments" ,python-pygments)
15699 ("python-requests" ,python-requests)
4de93b2f 15700 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
15701 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
15702 ("python-greenlet" ,python-greenlet)
4de93b2f 15703 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
15704 ("python-six" ,python-six)))
15705 (native-inputs
15706 `(("python-sphinx" ,python-sphinx)
15707 ("python-mock" ,python-mock)))
15708 (home-page "https://bpython-interpreter.org/")
15709 (synopsis "Fancy interface to the Python interpreter")
15710 (description "Bpython is a fancy interface to the Python
15711interpreter. bpython's main features are
15712
15713@enumerate
15714@item in-line syntax highlighting,
15715@item readline-like autocomplete with suggestions displayed as you type,
15716@item expected parameter list for any Python function,
15717@item \"rewind\" function to pop the last line of code from memory and
15718 re-evaluate,
15719@item send the code you've entered off to a pastebin,
15720@item save the code you've entered to a file, and
15721@item auto-indentation.
15722@end enumerate")
15723 (license license:expat)))
15724
15725(define-public bpython2
15726 (let ((base (package-with-python2
15727 (strip-python2-variant bpython))))
15728 (package (inherit base)
15729 (name "bpython2")
15730 (arguments
15731 `(#:python ,python-2
15732 #:phases
15733 (modify-phases %standard-phases
15734 (add-after 'unpack 'remove-failing-test
15735 (lambda _
15736 ;; Remove failing test. FIXME: make it pass
15737 (delete-file "bpython/test/test_args.py")
15738 ;; Disable failing test-cases (renaming inhibits they are
15739 ;; discovered)
15740 (substitute* "bpython/test/test_curtsies_repl.py"
15741 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15742 (string-append a "xxx_off_" b))
15743 (("^(\\s*def )(test_complex\\W)" _ a b)
15744 (string-append a "xxx_off_" b)))
15745 #t))
15746 (add-before 'build 'rename-scripts
15747 ;; rename the scripts to bypthon2, bpdb2, etc.
15748 (lambda _
15749 (substitute* "setup.py"
15750 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15751 (string-append name "2" rest "\n"))
15752 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15753 (string-append name "2" (or sub "") rest "\n")))
15754 #t))))))))
15755
15756(define-public python-pyinotify
15757 (package
15758 (name "python-pyinotify")
15759 (version "0.9.6")
15760 (source (origin
15761 (method url-fetch)
15762 (uri (pypi-uri "pyinotify" version))
15763 (sha256
15764 (base32
15765 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15766 (build-system python-build-system)
15767 (arguments `(#:tests? #f)) ;no tests
15768 (home-page "https://github.com/seb-m/pyinotify")
15769 (synopsis "Python library for monitoring inotify events")
15770 (description
15771 "@code{pyinotify} provides a Python interface for monitoring
15772file system events on Linux.")
15773 (license license:expat)))
15774
15775(define-public python2-pyinotify
15776 (package-with-python2 python-pyinotify))
15777
15778;; Ada parser uses this version.
15779(define-public python2-quex-0.67.3
15780 (package
15781 (name "python2-quex")
15782 (version "0.67.3")
15783 (source
15784 (origin
15785 (method url-fetch)
15786 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15787 (version-major+minor version)
15788 "/quex-" version ".zip"))
15789 (sha256
15790 (base32
15791 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15792 (build-system python-build-system)
15793 (native-inputs
15794 `(("unzip" ,unzip)))
15795 (arguments
15796 `(#:python ,python-2
15797 #:tests? #f
15798 #:phases
15799 (modify-phases %standard-phases
15800 (delete 'configure)
15801 (delete 'build)
15802 (replace 'install
15803 (lambda* (#:key outputs #:allow-other-keys)
15804 (let* ((out (assoc-ref outputs "out"))
15805 (share/quex (string-append out "/share/quex"))
15806 (bin (string-append out "/bin")))
15807 (copy-recursively "." share/quex)
15808 (mkdir-p bin)
15809 (symlink (string-append share/quex "/quex-exe.py")
15810 (string-append bin "/quex"))
15811 #t))))))
15812 (native-search-paths
15813 (list (search-path-specification
15814 (variable "QUEX_PATH")
15815 (files '("share/quex")))))
15816 (home-page "http://quex.sourceforge.net/")
15817 (synopsis "Lexical analyzer generator in Python")
15818 (description "@code{quex} is a lexical analyzer generator in Python.")
15819 (license license:lgpl2.1+))) ; Non-military
15820
15821(define-public python2-quex
15822 (package (inherit python2-quex-0.67.3)
15823 (name "python2-quex")
15824 (version "0.68.1")
15825 (source
15826 (origin
15827 (method url-fetch)
15828 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15829 (sha256
15830 (base32
15831 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15832 (file-name (string-append name "-" version ".tar.gz"))))))
15833
15834(define-public python-more-itertools
15835 (package
15836 (name "python-more-itertools")
1b066827 15837 (version "7.1.0")
44d10b1f
RW
15838 (source
15839 (origin
15840 (method url-fetch)
15841 (uri (pypi-uri "more-itertools" version))
15842 (sha256
15843 (base32
1b066827 15844 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15845 (build-system python-build-system)
44d10b1f
RW
15846 (home-page "https://github.com/erikrose/more-itertools")
15847 (synopsis "More routines for operating on iterables, beyond itertools")
15848 (description "Python's built-in @code{itertools} module implements a
15849number of iterator building blocks inspired by constructs from APL, Haskell,
15850and SML. @code{more-itertools} includes additional building blocks for
15851working with iterables.")
47f66348 15852 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15853 (license license:expat)))
15854
47f66348 15855;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15856(define-public python2-more-itertools
47f66348
MB
15857 (package
15858 (inherit python-more-itertools)
15859 (name "python2-more-itertools")
15860 (version "5.0.0")
15861 (source (origin
15862 (method url-fetch)
15863 (uri (pypi-uri "more-itertools" version))
15864 (sha256
15865 (base32
15866 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15867 (arguments
15868 `(#:python ,python2-minimal))
15869 (propagated-inputs
15870 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15871
15872(define-public python-latexcodec
15873 (package
15874 (name "python-latexcodec")
f3415ba5 15875 (version "1.0.7")
44d10b1f
RW
15876 (source
15877 (origin
15878 (method url-fetch)
15879 (uri (pypi-uri "latexcodec" version))
15880 (sha256
f3415ba5 15881 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15882 (build-system python-build-system)
15883 (inputs
15884 `(("python-six" ,python-six)))
15885 (home-page "https://readthedocs.org/projects/latexcodec/")
15886 (synopsis "Work with LaTeX code in Python")
15887 (description "Lexer and codec to work with LaTeX code in Python.")
15888 (license license:expat)))
15889
15890(define-public python-pybtex
15891 (package
15892 (name "python-pybtex")
9441a9c1 15893 (version "0.22.2")
44d10b1f
RW
15894 (source
15895 (origin
15896 (method url-fetch)
15897 (uri (pypi-uri "pybtex" version))
15898 (sha256
9441a9c1 15899 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15900 (build-system python-build-system)
15901 (native-inputs
15902 `(("python-nose" ,python-nose)))
15903 (inputs
15904 `(("python-latexcodec" ,python-latexcodec)
15905 ("python-pyyaml" ,python-pyyaml)
15906 ("python-six" ,python-six)))
15907 (arguments
15908 `(#:test-target "nosetests"))
15909 (home-page "https://pybtex.org/")
15910 (synopsis "BibTeX-compatible bibliography processor")
15911 (description "Pybtex is a BibTeX-compatible bibliography processor written
15912in Python. You can simply type pybtex instead of bibtex.")
15913 (license license:expat)))
15914
15915(define-public python-onetimepass
15916 (package
15917 (name "python-onetimepass")
15918 (version "1.0.1")
15919 (source
15920 (origin
15921 (method url-fetch)
15922 (uri (pypi-uri "onetimepass" version))
15923 (sha256
15924 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15925 (build-system python-build-system)
15926 (propagated-inputs `(("python-six" ,python-six)))
15927 (home-page "https://github.com/tadeck/onetimepass/")
15928 (synopsis "One-time password library")
15929 (description "Python one-time password library for HMAC-based (HOTP) and
15930time-based (TOTP) passwords.")
15931 (license license:expat)))
15932
15933(define-public python-parso
15934 (package
15935 (name "python-parso")
a4abed71 15936 (version "0.6.2")
44d10b1f
RW
15937 (source
15938 (origin
15939 (method url-fetch)
15940 (uri (pypi-uri "parso" version))
15941 (sha256
15942 (base32
a4abed71 15943 "0mr1j4ijqnrihz1yap34g6i8vjldg5lz814sz4v0d8pbqvh5jmhc"))))
44d10b1f
RW
15944 (native-inputs
15945 `(("python-pytest" ,python-pytest)))
15946 (build-system python-build-system)
4eb97c25
MC
15947 (arguments
15948 `(#:phases (modify-phases %standard-phases
15949 (replace 'check
15950 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15951 (home-page "https://github.com/davidhalter/parso")
15952 (synopsis "Python Parser")
15953 (description "Parso is a Python parser that supports error recovery and
15954round-trip parsing for different Python versions (in multiple Python versions).
15955Parso is also able to list multiple syntax errors in your Python file.")
15956 (license license:expat)))
15957
15958(define-public python2-parso
15959 (package-with-python2 python-parso))
15960
dcff9bda
MB
15961;; This version is required for Jedi@0.15, which in turn is needed for
15962;; python-language-server.
15963(define-public python-parso-0.5
15964 (package
15965 (inherit python-parso)
15966 (version "0.5.2")
15967 (source (origin
15968 (method url-fetch)
15969 (uri (pypi-uri "parso" version))
15970 (sha256
15971 (base32
15972 "1qgvrkpma7vylrk047mxxvqd66nwqk978n3ig2w8iz9m3bgjbksm"))))))
15973
44d10b1f
RW
15974(define-public python-async-generator
15975 (package
15976 (name "python-async-generator")
94fcbf8d 15977 (version "1.10")
44d10b1f
RW
15978 (source
15979 (origin
15980 (method url-fetch)
15981 (uri (pypi-uri "async_generator" version))
15982 (sha256
15983 (base32
94fcbf8d 15984 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15985 (build-system python-build-system)
15986 (native-inputs
15987 `(("python-pytest" ,python-pytest)))
15988 (home-page "https://github.com/python-trio/async_generator")
15989 (synopsis "Async generators and context managers for Python 3.5+")
15990 (description "@code{async_generator} back-ports Python 3.6's native async
15991generators and Python 3.7's context managers into Python 3.5.")
15992 ;; Dual licensed.
15993 (license (list license:expat license:asl2.0))))
15994
15995(define-public python-async-timeout
15996 (package
15997 (name "python-async-timeout")
15998 (version "3.0.1")
15999 (source
16000 (origin
16001 (method url-fetch)
16002 (uri (pypi-uri "async-timeout" version))
16003 (sha256
16004 (base32
16005 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
16006 (build-system python-build-system)
16007 (home-page "https://github.com/aio-libs/async_timeout/")
16008 (synopsis "Timeout context manager for asyncio programs")
16009 (description "@code{async-timeout} provides a timeout timeout context
16010manager compatible with @code{asyncio}.")
16011 (license license:asl2.0)))
16012
16013(define-public python-glob2
16014 (package
16015 (name "python-glob2")
4df49d19 16016 (version "0.7")
8fa2bcc7
TGR
16017 (source
16018 (origin
16019 (method git-fetch)
16020 (uri (git-reference
16021 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 16022 (commit (string-append "v" version))))
8fa2bcc7
TGR
16023 (file-name (git-file-name name version))
16024 (sha256
4df49d19 16025 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
16026 (build-system python-build-system)
16027 (home-page "https://github.com/miracle2k/python-glob2/")
16028 (synopsis "Extended Version of the python buildin glob module")
16029 (description "This is an extended version of the Python
16030@url{http://docs.python.org/library/glob.html, built-in glob module} which
16031adds:
16032
16033@itemize
16034@item The ability to capture the text matched by glob patterns, and return
16035those matches alongside the file names.
16036@item A recursive @code{**} globbing syntax, akin for example to the
16037@code{globstar} option of Bash.
16038@item The ability to replace the file system functions used, in order to glob
16039on virtual file systems.
16040@item Compatible with Python 2 and Python 3 (tested with 3.3).
16041@end itemize
16042
16043Glob2 currently based on the glob code from Python 3.3.1.")
16044 (license license:bsd-2)))
16045
16046(define-public python2-glob2
16047 (package-with-python2 python-glob2))
16048
16049(define-public python-gipc
16050 (package
16051 (name "python-gipc")
16052 (version "0.6.0")
16053 (source
16054 (origin
16055 (method url-fetch)
16056 (uri (pypi-uri "gipc" version ".zip"))
16057 (sha256
16058 (base32
16059 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
16060 (build-system python-build-system)
16061 (native-inputs
16062 `(("unzip" ,unzip)))
16063 (propagated-inputs
16064 `(("python-gevent" ,python-gevent)))
fd3ae040 16065 (home-page "https://gehrcke.de/gipc/")
44d10b1f
RW
16066 (synopsis "Child process management in the context of gevent")
16067 (description "Usage of Python's multiprocessing package in a
16068gevent-powered application may raise problems. With @code{gipc},
16069process-based child processes can safely be created anywhere within a
16070gevent-powered application.")
16071 (license license:expat)))
16072
16073(define-public python2-gipc
16074 (package-with-python2 python-gipc))
16075
16076(define-public python-fusepy
16077 (package
16078 (name "python-fusepy")
16079 (version "2.0.4")
16080 (source
16081 (origin
16082 (method url-fetch)
16083 (uri (pypi-uri "fusepy" version))
16084 (sha256
16085 (base32
16086 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
16087 (build-system python-build-system)
16088 (arguments
16089 `(#:phases
16090 (modify-phases %standard-phases
16091 (add-before 'build 'set-library-file-name
16092 (lambda* (#:key inputs #:allow-other-keys)
16093 (let ((fuse (assoc-ref inputs "fuse")))
16094 (substitute* "fuse.py"
16095 (("find_library\\('fuse'\\)")
16096 (string-append "'" fuse "/lib/libfuse.so'")))
16097 #t))))))
16098 (propagated-inputs
16099 `(("fuse" ,fuse)))
16100 (home-page "https://github.com/fusepy/fusepy")
16101 (synopsis "Simple ctypes bindings for FUSE")
16102 (description "Python module that provides a simple interface to FUSE and
16103MacFUSE. The binding is created using the standard @code{ctypes} library.")
16104 (license license:isc)))
16105
16106(define-public python2-fusepy
16107 (package-with-python2 python-fusepy))
16108
2eb09a5c
EF
16109(define-public python-fusepyng
16110 (package
16111 (name "python-fusepyng")
16112 (version "1.0.7")
16113 (source
16114 (origin
16115 (method url-fetch)
16116 (uri (pypi-uri "fusepyng" version))
16117 (sha256
16118 (base32
16119 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
16120 (build-system python-build-system)
16121 (arguments
16122 '(#:phases
16123 (modify-phases %standard-phases
16124 (add-after 'unpack 'set-libfuse-path
16125 (lambda* (#:key inputs #:allow-other-keys)
16126 (let ((fuse (assoc-ref inputs "fuse")))
16127 (substitute* "fusepyng.py"
16128 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
16129 (string-append "\"" fuse "/lib/libfuse.so\""))))
16130 #t)))))
16131 (inputs
16132 `(("fuse" ,fuse)))
16133 (propagated-inputs
16134 `(("python-paramiko" ,python-paramiko)))
16135 (home-page "https://github.com/rianhunter/fusepyng")
16136 (synopsis "Simple ctypes bindings for FUSE")
16137 (description "@code{fusepyng} is a Python module that provides a simple
16138interface to FUSE on various operating systems. It's just one file and is
16139implemented using @code{ctypes}.")
16140 (license license:isc)))
16141
44d10b1f
RW
16142(define-public python2-gdrivefs
16143 (package
16144 (name "python2-gdrivefs")
16145 (version "0.14.9")
16146 (source
16147 (origin
16148 (method url-fetch)
16149 (uri (pypi-uri "gdrivefs" version))
16150 (sha256
16151 (base32
16152 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
16153 (build-system python-build-system)
16154 (arguments
16155 `(#:python ,python-2
16156 #:phases
16157 (modify-phases %standard-phases
16158 (add-before 'build 'patch-setup-py
16159 (lambda _
16160 ;; Update requirements from dependency==version
16161 ;; to dependency>=version
16162 (substitute* "gdrivefs/resources/requirements.txt"
16163 (("==") ">="))
16164 #t)))))
16165 (native-inputs
16166 `(("python2-gipc" ,python2-gipc)
16167 ("python2-gevent" ,python2-gevent)
16168 ("python2-greenlet" ,python2-greenlet)
16169 ("python2-httplib2" ,python2-httplib2)
16170 ("python2-uritemplate" ,python2-uritemplate)
16171 ("python2-oauth2client" ,python2-oauth2client)
16172 ("python2-six" ,python2-six)))
16173 (propagated-inputs
16174 `(("python2-dateutil" ,python2-dateutil)
16175 ("python2-fusepy" ,python2-fusepy)
16176 ("python2-google-api-client" ,python2-google-api-client)))
16177 (home-page "https://github.com/dsoprea/GDriveFS")
16178 (synopsis "Mount Google Drive as a local file system")
16179 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
16180under Python 2.7.")
16181 (license license:gpl2)))
16182
24200bdf
EF
16183(define-public python-userspacefs
16184 (package
16185 (name "python-userspacefs")
16186 (version "1.0.13")
16187 (source
16188 (origin
16189 (method url-fetch)
16190 (uri (pypi-uri "userspacefs" version))
16191 (sha256
16192 (base32
16193 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
16194 (build-system python-build-system)
16195 (propagated-inputs
16196 `(("python-fusepyng" ,python-fusepyng)))
16197 (home-page "https://github.com/rianhunter/userspacefs")
16198 (synopsis "User-space file systems for Python")
16199 (description
16200 "@code{userspacefs} is a library that allows you to easily write
16201user-space file systems in Python.")
16202 (license license:gpl3+)))
16203
44d10b1f
RW
16204(define-public pybind11
16205 (package
16206 (name "pybind11")
0690f324 16207 (version "2.4.3")
44d10b1f
RW
16208 (source (origin
16209 (method git-fetch)
16210 (uri (git-reference
16211 (url "https://github.com/pybind/pybind11.git")
16212 (commit (string-append "v" version))))
16213 (sha256
16214 (base32
0690f324 16215 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
44d10b1f
RW
16216 (file-name (git-file-name name version))))
16217 (build-system cmake-build-system)
16218 (native-inputs
3cf579e9 16219 `(("python" ,python-wrapper)
ae8db9ce
LC
16220
16221 ;; The following dependencies are used for tests.
16222 ("python-pytest" ,python-pytest)
16223 ("catch" ,catch-framework2-1)
16224 ("eigen" ,eigen)))
44d10b1f 16225 (arguments
ae8db9ce
LC
16226 `(#:configure-flags
16227 (list (string-append "-DCATCH_INCLUDE_DIR="
16228 (assoc-ref %build-inputs "catch")
16229 "/include/catch"))
16230
3cf579e9
LC
16231 #:phases (modify-phases %standard-phases
16232 (add-after 'install 'install-python
16233 (lambda* (#:key outputs #:allow-other-keys)
16234 (let ((out (assoc-ref outputs "out")))
16235 (with-directory-excursion "../source"
16236 (setenv "PYBIND11_USE_CMAKE" "yes")
16237 (invoke "python" "setup.py" "install"
16238 "--single-version-externally-managed"
16239 "--root=/"
16240 (string-append "--prefix=" out)))))))
16241
ae8db9ce 16242 #:test-target "check"))
44d10b1f
RW
16243 (home-page "https://github.com/pybind/pybind11/")
16244 (synopsis "Seamless operability between C++11 and Python")
ab17297a
LC
16245 (description
16246 "@code{pybind11} is a lightweight header-only library that exposes C++
16247types in Python and vice versa, mainly to create Python bindings of existing
16248C++ code. Its goals and syntax are similar to the @code{Boost.Python}
16249library: to minimize boilerplate code in traditional extension modules by
16250inferring type information using compile-time introspection.")
65eada58 16251 (license license:bsd-3)))
44d10b1f
RW
16252
16253(define-public python-fasteners
16254 (package
16255 (name "python-fasteners")
16256 (version "0.14.1")
16257 (source
16258 (origin
16259 (method url-fetch)
16260 (uri (pypi-uri "fasteners" version))
16261 (sha256
16262 (base32
16263 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
16264 (build-system python-build-system)
16265 (propagated-inputs
16266 `(("python-monotonic" ,python-monotonic)
16267 ("python-six" ,python-six)
16268 ("python-testtools" ,python-testtools)))
16269 (home-page "https://github.com/harlowja/fasteners")
16270 (synopsis "Python package that provides useful locks")
16271 (description
16272 "This package provides a Python program that provides following locks:
16273
16274@itemize
16275@item Locking decorator
16276@item Reader-writer locks
16277@item Inter-process locks
16278@item Generic helpers
16279@end itemize\n")
16280 (properties `((python2-variant . ,(delay python2-fasteners))))
16281 (license license:asl2.0)))
16282
16283(define-public python2-fasteners
16284 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
16285 (package
16286 (inherit base)
16287 (propagated-inputs
16288 `(("python2-futures" ,python2-futures)
16289 ,@(package-propagated-inputs base))))))
16290
16291(define-public python-requests-file
16292 (package
16293 (name "python-requests-file")
16294 (version "1.4.3")
16295 (source
16296 (origin
16297 (method url-fetch)
16298 (uri (pypi-uri "requests-file" version))
16299 (sha256
16300 (base32
16301 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
16302 (build-system python-build-system)
16303 (propagated-inputs
16304 `(("python-requests" ,python-requests)
16305 ("python-six" ,python-six)))
16306 (home-page
16307 "https://github.com/dashea/requests-file")
16308 (synopsis "File transport adapter for Requests")
16309 (description
16310 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 16311library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
16312 (license license:asl2.0)))
16313
16314(define-public python2-requests-file
16315 (package-with-python2 python-requests-file))
16316
16317(define-public python-tldextract
16318 (package
16319 (name "python-tldextract")
16320 (version "2.2.0")
16321 (source
16322 (origin
16323 (method url-fetch)
16324 (uri (pypi-uri "tldextract" version))
16325 (sha256
16326 (base32
16327 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
16328 (build-system python-build-system)
16329 (native-inputs
16330 `(("python-pytest" ,python-pytest)
16331 ("python-responses" ,python-responses)))
16332 (propagated-inputs
16333 `(("python-idna" ,python-idna)
16334 ("python-requests" ,python-requests)
16335 ("python-requests-file" ,python-requests-file)))
16336 (home-page
16337 "https://github.com/john-kurkowski/tldextract")
16338 (synopsis
16339 "Separate the TLD from the registered domain and subdomains of a URL")
16340 (description
16341 "TLDExtract accurately separates the TLD from the registered domain and
16342subdomains of a URL, using the Public Suffix List. By default, this includes
16343the public ICANN TLDs and their exceptions. It can optionally support the
16344Public Suffix List's private domains as well.")
16345 (license license:bsd-3)))
16346
16347(define-public python2-tldextract
16348 (package-with-python2 python-tldextract))
16349
16350(define-public python-pynamecheap
16351 (package
16352 (name "python-pynamecheap")
16353 (version "0.0.3")
16354 (source
16355 (origin
16356 (method url-fetch)
16357 (uri (pypi-uri "PyNamecheap" version))
16358 (sha256
16359 (base32
16360 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
16361 (build-system python-build-system)
16362 (propagated-inputs
16363 `(("python-requests" ,python-requests)))
16364 (home-page
16365 "https://github.com/Bemmu/PyNamecheap")
16366 (synopsis
16367 "Namecheap API client in Python")
16368 (description
16369 "PyNamecheap is a Namecheap API client in Python.")
16370 (license license:expat)))
16371
16372(define-public python2-pynamecheap
16373 (package-with-python2 python-pynamecheap))
16374
16375(define-public python-dns-lexicon
16376 (package
16377 (name "python-dns-lexicon")
16378 (version "2.4.0")
16379 (source
16380 (origin
16381 (method url-fetch)
16382 (uri (pypi-uri "dns-lexicon" version))
16383 (sha256
16384 (base32
16385 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
16386 (build-system python-build-system)
16387 (arguments
16388 `(#:tests? #f)) ;requires internet access
16389 (propagated-inputs
16390 `(("python-future" ,python-future)
16391 ("python-pynamecheap" ,python-pynamecheap)
16392 ("python-requests" ,python-requests)
16393 ("python-tldextract" ,python-tldextract)
16394 ("python-urllib3" ,python-urllib3)))
16395 (home-page "https://github.com/AnalogJ/lexicon")
16396 (synopsis
16397 "Manipulate DNS records on various DNS providers")
16398 (description
16399 "Lexicon provides a way to manipulate DNS records on multiple DNS
16400providers in a standardized way. It has a CLI but it can also be used as a
16401Python library. It was designed to be used in automation, specifically with
16402Let's Encrypt.")
16403 (license license:expat)))
16404
16405(define-public python2-dns-lexicon
16406 (package-with-python2 python-dns-lexicon))
16407
16408(define-public python-commandlines
16409 (package
16410 (name "python-commandlines")
16411 (version "0.4.1")
16412 (source
16413 (origin
16414 (method url-fetch)
16415 (uri (pypi-uri "commandlines" version))
16416 (sha256
16417 (base32
16418 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
16419 (build-system python-build-system)
16420 (home-page "https://github.com/chrissimpkins/commandlines")
16421 (synopsis "Command line argument to object parsing library")
16422 (description
16423 "@code{Commandlines} is a Python library for command line application
16424development that supports command line argument parsing, command string
16425validation testing and application logic.")
16426 (license license:expat)))
16427
16428;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
16429;; python-numba. They have a very unflexible relationship.
16430(define-public python-numba
16431 (package
16432 (name "python-numba")
65f84096 16433 (version "0.46.0")
44d10b1f
RW
16434 (source
16435 (origin
16436 (method url-fetch)
16437 (uri (pypi-uri "numba" version))
16438 (sha256
16439 (base32
65f84096 16440 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
44d10b1f
RW
16441 (build-system python-build-system)
16442 (arguments
16443 `(#:modules ((guix build utils)
16444 (guix build python-build-system)
16445 (ice-9 ftw)
16446 (srfi srfi-1)
16447 (srfi srfi-26))
16448 #:phases
16449 (modify-phases %standard-phases
16450 (add-after 'unpack 'disable-proprietary-features
16451 (lambda _
16452 (setenv "NUMBA_DISABLE_HSA" "1")
16453 (setenv "NUMBA_DISABLE_CUDA" "1")
16454 #t))
16455 (add-after 'unpack 'remove-failing-tests
16456 (lambda _
65f84096 16457 ;; FIXME: These tests fail for unknown reasons:
44d10b1f
RW
16458 ;; test_non_writable_pycache, test_non_creatable_pycache, and
16459 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
16460 (substitute* "numba/tests/test_dispatcher.py"
16461 (("def test(_non_writable_pycache)" _ m)
16462 (string-append "def guix_skip" m))
16463 (("def test(_non_creatable_pycache)" _ m)
16464 (string-append "def guix_skip" m))
16465 (("def test(_frozen)" _ m)
16466 (string-append "def guix_skip" m)))
16467
16468 ;; These tests fail because we don't run the tests from the build
16469 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
65f84096 16470 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
44d10b1f
RW
16471 (substitute* "numba/tests/test_pycc.py"
16472 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
16473 (string-append "def guix_skip" m)))
65f84096
BG
16474
16475 ;; These tests fail because our version of Python does not have
16476 ;; a recognizable front-end for the Numba distribution to use
16477 ;; to check against.
16478 (substitute* "numba/tests/test_entrypoints.py"
16479 (("def test(_init_entrypoint)" _ m)
16480 (string-append "def guix_skip" m)))
16481 (substitute* "numba/tests/test_jitclasses.py"
16482 (("def test(_jitclass_longlabel_not_truncated)" _ m)
16483 (string-append "def guix_skip" m)))
44d10b1f
RW
16484 #t))
16485 (replace 'check
16486 (lambda _
16487 (let ((cwd (getcwd)))
16488 (setenv "PYTHONPATH"
16489 (string-append cwd "/build/"
16490 (find (cut string-prefix? "lib" <>)
16491 (scandir (string-append cwd "/build")))
16492 ":"
16493 (getenv "PYTHONPATH")))
16494 ;; Something is wrong with the PYTHONPATH when running the
16495 ;; tests from the build directory, as it complains about not being
16496 ;; able to import certain modules.
16497 (with-directory-excursion "/tmp"
16498 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
16499 #t)))))
16500 (propagated-inputs
16501 `(("python-llvmlite" ,python-llvmlite)
16502 ("python-numpy" ,python-numpy)
16503 ("python-singledispatch" ,python-singledispatch)))
16504 ;; Needed for tests.
16505 (inputs
16506 `(("python-jinja2" ,python-jinja2)
16507 ("python-pygments" ,python-pygments)))
16508 (home-page "https://numba.pydata.org")
16509 (synopsis "Compile Python code using LLVM")
16510 (description "Numba gives you the power to speed up your applications with
16511high performance functions written directly in Python. With a few
16512annotations, array-oriented and math-heavy Python code can be just-in-time
16513compiled to native machine instructions, similar in performance to C, C++ and
16514Fortran, without having to switch languages or Python interpreters.
16515
16516Numba works by generating optimized machine code using the LLVM compiler
16517infrastructure at import time, runtime, or statically (using the included pycc
16518tool).")
16519 (license license:bsd-3)))
16520
241409cd
RW
16521(define-public python-numcodecs
16522 (package
16523 (name "python-numcodecs")
16524 (version "0.6.4")
16525 (source
16526 (origin
16527 (method url-fetch)
16528 (uri (pypi-uri "numcodecs" version))
16529 (sha256
16530 (base32
16531 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
16532 (build-system python-build-system)
16533 (propagated-inputs
16534 `(("python-numpy" ,python-numpy)
16535 ("python-msgpack" ,python-msgpack)))
16536 (native-inputs
16537 `(("python-pytest" ,python-pytest)
16538 ("python-setuptools-scm" ,python-setuptools-scm)))
16539 (home-page "https://github.com/zarr-developers/numcodecs")
16540 (synopsis "Buffer compression and transformation codecs")
16541 (description
16542 "This Python package provides buffer compression and transformation
16543codecs for use in data storage and communication applications.")
16544 (license license:expat)))
16545
8e04b233
RW
16546(define-public python-asciitree
16547 (package
16548 (name "python-asciitree")
16549 (version "0.3.3")
16550 (source
16551 (origin
16552 (method url-fetch)
16553 (uri (pypi-uri "asciitree" version))
16554 (sha256
16555 (base32
16556 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
16557 (build-system python-build-system)
16558 (home-page "https://github.com/mbr/asciitree")
16559 (synopsis "Draws ASCII trees")
16560 (description "This package draws tree structures using characters.")
16561 (license license:expat)))
16562
7032c1cc
RW
16563(define-public python-zarr
16564 (package
16565 (name "python-zarr")
16566 (version "2.4.0")
16567 (source
16568 (origin
16569 (method url-fetch)
16570 (uri (pypi-uri "zarr" version))
16571 (sha256
16572 (base32
16573 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
16574 (build-system python-build-system)
16575 (arguments
16576 `(#:phases
16577 (modify-phases %standard-phases
16578 (add-after 'unpack 'disable-service-tests
16579 (lambda _
16580 (setenv "ZARR_TEST_ABS" "0")
16581 (setenv "ZARR_TEST_MONGO" "0")
16582 (setenv "ZARR_TEST_REDIS" "0")
16583 #t))
16584 (replace 'check
16585 (lambda _
16586 (invoke "pytest" "-vv" "-k" "not lmdb")
16587 #t)))))
16588 (propagated-inputs
16589 `(("python-asciitree" ,python-asciitree)
16590 ("python-fasteners" ,python-fasteners)
16591 ("python-numcodecs" ,python-numcodecs)
16592 ("python-numpy" ,python-numpy)))
16593 (native-inputs
16594 `(("python-pytest" ,python-pytest)
16595 ("python-setuptools-scm" ,python-setuptools-scm)))
16596 (home-page "https://github.com/zarr-developers/zarr-python")
16597 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
16598 (description
16599 "This package provides an implementation of chunked, compressed,
16600N-dimensional arrays for Python.")
16601 (license license:expat)))
16602
44d10b1f
RW
16603(define-public python-anndata
16604 (package
16605 (name "python-anndata")
a098b349 16606 (version "0.7.1")
44d10b1f
RW
16607 (source
16608 (origin
16609 (method url-fetch)
16610 (uri (pypi-uri "anndata" version))
16611 (sha256
16612 (base32
a098b349 16613 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
44d10b1f 16614 (build-system python-build-system)
a098b349
RW
16615 (arguments
16616 `(#:phases
16617 (modify-phases %standard-phases
16618 (add-after 'unpack 'delete-inconvenient-tests
16619 (lambda _
16620 ;; This test depends on python-scikit-learn.
16621 (delete-file "anndata/tests/test_inplace_subset.py")
16622 #t))
16623 (delete 'check)
16624 (add-after 'install 'check
16625 (lambda* (#:key inputs outputs #:allow-other-keys)
16626 (add-installed-pythonpath inputs outputs)
16627 (invoke "pytest" "-vv"))))))
44d10b1f
RW
16628 (propagated-inputs
16629 `(("python-h5py" ,python-h5py)
a098b349 16630 ("python-importlib-metadata" ,python-importlib-metadata)
44d10b1f 16631 ("python-natsort" ,python-natsort)
a098b349
RW
16632 ("python-numcodecs" ,python-numcodecs)
16633 ("python-packaging" ,python-packaging)
44d10b1f 16634 ("python-pandas" ,python-pandas)
a098b349
RW
16635 ("python-scipy" ,python-scipy)
16636 ("python-zarr" ,python-zarr)))
16637 (native-inputs
16638 `(("python-joblib" ,python-joblib)
16639 ("python-pytest" ,python-pytest)
16640 ("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
16641 (home-page "https://github.com/theislab/anndata")
16642 (synopsis "Annotated data for data analysis pipelines")
16643 (description "Anndata is a package for simple (functional) high-level APIs
16644for data analysis pipelines. In this context, it provides an efficient,
16645scalable way of keeping track of data together with learned annotations and
16646reduces the code overhead typically encountered when using a mostly
16647object-oriented library such as @code{scikit-learn}.")
16648 (license license:bsd-3)))
16649
16650(define-public python-dill
16651 (package
16652 (name "python-dill")
32be3577 16653 (version "0.3.1.1")
44d10b1f
RW
16654 (source
16655 (origin
16656 (method url-fetch)
16657 (uri (pypi-uri "dill" version))
16658 (sha256
32be3577 16659 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
44d10b1f 16660 (build-system python-build-system)
32be3577
MIP
16661 (arguments
16662 `(#:phases
16663 (modify-phases %standard-phases
16664 (replace 'check
16665 (lambda _
16666 (with-directory-excursion "/tmp"
16667 (invoke "nosetests" "-v"))
16668 #t)))))
16669 (native-inputs
16670 `(("python-nose" ,python-nose)))
16671 (home-page "https://pypi.org/project/dill/")
44d10b1f
RW
16672 (synopsis "Serialize all of Python")
16673 (description "Dill extends Python's @code{pickle} module for serializing
16674and de-serializing Python objects to the majority of the built-in Python
16675types. Dill provides the user the same interface as the @code{pickle} module,
16676and also includes some additional features. In addition to pickling Python
16677objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 16678session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
16679interpreter session, close the interpreter, ship the pickled file to another
16680computer, open a new interpreter, unpickle the session and thus continue from
16681the saved state of the original interpreter session.")
16682 (license license:bsd-3)))
16683
16684(define-public python-multiprocess
16685 (package
16686 (name "python-multiprocess")
fcc4e9e7 16687 (version "0.70.9")
44d10b1f
RW
16688 (source
16689 (origin
16690 (method url-fetch)
16691 (uri (pypi-uri "multiprocess" version))
16692 (sha256
16693 (base32
fcc4e9e7 16694 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
44d10b1f 16695 (build-system python-build-system)
fcc4e9e7
MIP
16696 (arguments
16697 `(#:phases
16698 (modify-phases %standard-phases
16699 (add-after 'unpack 'disable-broken-tests
16700 (lambda _
16701 ;; This test is broken as there is no keyboard interrupt.
16702 (substitute* "py3.7/multiprocess/tests/__init__.py"
16703 (("^(.*)def test_wait_result"
16704 line indent)
16705 (string-append indent
16706 "@unittest.skip(\"Disabled by Guix\")\n"
16707 line)))
16708 #t))
16709 ;; Tests must be run after installation.
16710 (delete 'check)
16711 (add-after 'install 'check
16712 (lambda* (#:key inputs outputs #:allow-other-keys)
16713 (add-installed-pythonpath inputs outputs)
16714 (invoke "python" "-m" "multiprocess.tests")
16715 #t)))))
44d10b1f
RW
16716 (propagated-inputs
16717 `(("python-dill" ,python-dill)))
fcc4e9e7 16718 (home-page "https://pypi.org/project/multiprocess/")
44d10b1f
RW
16719 (synopsis "Multiprocessing and multithreading in Python")
16720 (description
16721 "This package is a fork of the multiprocessing Python package, a package
16722which supports the spawning of processes using the API of the standard
16723library's @code{threading} module.")
16724 (license license:bsd-3)))
16725
16726(define-public python-toolz
16727 (package
16728 (name "python-toolz")
16729 (version "0.9.0")
16730 (source
16731 (origin
16732 (method url-fetch)
16733 (uri (pypi-uri "toolz" version))
16734 (sha256
16735 (base32
16736 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
16737 (build-system python-build-system)
16738 ;; FIXME: tests cannot be computed: "Can't perform this operation for
16739 ;; unregistered loader type"
16740 (arguments '(#:tests? #f))
16741 (home-page "https://github.com/pytoolz/toolz/")
16742 (synopsis "List processing tools and functional utilities")
16743 (description
16744 "This package provides a set of utility functions for iterators,
16745functions, and dictionaries.")
16746 (license license:bsd-3)))
16747
16748(define-public python2-toolz
16749 (package-with-python2 python-toolz))
16750
16751(define-public python-cytoolz
16752 (package
16753 (name "python-cytoolz")
16754 (version "0.9.0.1")
16755 (source
16756 (origin
16757 (method url-fetch)
16758 (uri (pypi-uri "cytoolz" version))
16759 (sha256
16760 (base32
16761 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
16762 (build-system python-build-system)
16763 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
16764 ;; 'exceptions'"
16765 (arguments '(#:tests? #f))
16766 (propagated-inputs
16767 `(("python-toolz" ,python-toolz)))
16768 (native-inputs
16769 `(("python-cython" ,python-cython)))
16770 (home-page "https://github.com/pytoolz/cytoolz")
16771 (synopsis "High performance functional utilities")
16772 (description
16773 "The cytoolz package implements the same API as provided by toolz. The
16774main differences are that @code{cytoolz} is faster and cytoolz offers a C API
16775that is accessible to other projects developed in Cython.")
16776 (license license:bsd-3)))
16777
16778(define-public python-sortedcontainers
16779 (package
16780 (name "python-sortedcontainers")
b244f166 16781 (version "2.1.0")
44d10b1f
RW
16782 (source
16783 (origin
16784 (method url-fetch)
16785 (uri (pypi-uri "sortedcontainers" version))
16786 (sha256
16787 (base32
b244f166 16788 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
44d10b1f
RW
16789 (build-system python-build-system)
16790 (native-inputs
16791 `(("python-tox" ,python-tox)))
01e30442
TLC
16792 (propagated-inputs
16793 `(("python-appdirs" ,python-appdirs)
16794 ("python-distlib" ,python-distlib)
16795 ("python-filelock" ,python-filelock)
16796 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
16797 ("python-six" ,python-six)))
44d10b1f
RW
16798 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
16799 (synopsis "Sorted List, Sorted Dict, Sorted Set")
16800 (description
16801 "This package provides a sorted collections library, written in
16802pure-Python.")
16803 (license license:asl2.0)))
16804
16805(define-public python-cloudpickle
16806 (package
16807 (name "python-cloudpickle")
16808 (version "0.6.1")
16809 (source
16810 (origin
16811 (method url-fetch)
16812 (uri (pypi-uri "cloudpickle" version))
16813 (sha256
16814 (base32
16815 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
16816 (build-system python-build-system)
16817 ;; FIXME: there are 5 errors in 122 tests:
16818 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
16819 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
16820 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16821 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16822 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
16823 ;; TypeError: cannot serialize '_io.BufferedRandom' object
16824 (arguments '(#:tests? #f))
16825 (native-inputs
16826 `(("python-pytest" ,python-pytest)
16827 ("python-mock" ,python-mock)
16828 ("python-tornado" ,python-tornado)))
16829 (home-page "https://github.com/cloudpipe/cloudpickle")
16830 (synopsis "Extended pickling support for Python objects")
16831 (description
16832 "Cloudpickle makes it possible to serialize Python constructs not
16833supported by the default pickle module from the Python standard library. It
16834is especially useful for cluster computing where Python expressions are
16835shipped over the network to execute on remote hosts, possibly close to the
16836data.")
16837 (license license:bsd-3)))
16838
16839(define-public python2-cloudpickle
16840 (package-with-python2 python-cloudpickle))
16841
16842(define-public python-locket
16843 (package
16844 (name "python-locket")
16845 (version "0.2.0")
16846 (source
16847 (origin
16848 (method url-fetch)
16849 (uri (pypi-uri "locket" version))
16850 (sha256
16851 (base32
16852 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
16853 (build-system python-build-system)
16854 (home-page "https://github.com/mwilliamson/locket.py")
16855 (synopsis "File-based locks for Python")
16856 (description
16857 "Locket implements a lock that can be used by multiple processes provided
16858they use the same path.")
16859 (license license:bsd-2)))
16860
16861(define-public python2-locket
16862 (package-with-python2 python-locket))
16863
16864(define-public python-blosc
16865 (package
16866 (name "python-blosc")
16867 (version "1.5.1")
16868 (source
16869 (origin
16870 (method url-fetch)
16871 (uri (pypi-uri "blosc" version))
16872 (sha256
16873 (base32
16874 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
16875 (build-system python-build-system)
16876 ;; FIXME: all tests pass, but then this error is printed:
16877 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
16878 (arguments '(#:tests? #f))
16879 (propagated-inputs
16880 `(("python-numpy" ,python-numpy)))
16881 (home-page "https://github.com/blosc/python-blosc")
16882 (synopsis "Python wrapper for the Blosc data compressor library")
16883 (description "Blosc is a high performance compressor optimized for binary
16884data. It has been designed to transmit data to the processor cache faster
16885than the traditional, non-compressed, direct memory fetch approach via a
16886@code{memcpy()} system call.
16887
16888Blosc works well for compressing numerical arrays that contains data with
16889relatively low entropy, like sparse data, time series, grids with
16890regular-spaced values, etc.
16891
16892This Python package wraps the Blosc library.")
16893 (license license:bsd-3)))
16894
16895(define-public python2-blosc
16896 (package-with-python2 python-blosc))
16897
16898(define-public python-partd
16899 (package
16900 (name "python-partd")
16901 (version "0.3.9")
16902 (source
16903 (origin
16904 (method url-fetch)
16905 (uri (pypi-uri "partd" version))
16906 (sha256
16907 (base32
16908 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16909 (build-system python-build-system)
16910 (propagated-inputs
16911 `(("python-blosc" ,python-blosc)
16912 ("python-locket" ,python-locket)
16913 ("python-numpy" ,python-numpy)
16914 ("python-pandas" ,python-pandas)
16915 ("python-pyzmq" ,python-pyzmq)
16916 ("python-toolz" ,python-toolz)))
16917 (home-page "https://github.com/dask/partd/")
16918 (synopsis "Appendable key-value storage")
16919 (description "Partd stores key-value pairs. Values are raw bytes. We
16920append on old values. Partd excels at shuffling operations.")
16921 (license license:bsd-3)))
16922
16923(define-public python2-partd
16924 (package-with-python2 python-partd))
16925
c70a0191
RW
16926(define-public python-fsspec
16927 (package
16928 (name "python-fsspec")
16929 (version "0.6.1")
16930 (source
16931 (origin
16932 (method url-fetch)
16933 (uri (pypi-uri "fsspec" version))
16934 (sha256
16935 (base32
16936 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16937 (build-system python-build-system)
16938 (arguments '(#:tests? #f)) ; there are none
16939 (home-page "https://github.com/intake/filesystem_spec")
16940 (synopsis "File-system specification")
16941 (description "The purpose of this package is to produce a template or
16942specification for a file-system interface, that specific implementations
16943should follow, so that applications making use of them can rely on a common
16944behavior and not have to worry about the specific internal implementation
16945decisions with any given backend.")
16946 (license license:bsd-3)))
16947
44d10b1f
RW
16948(define-public python-dask
16949 (package
16950 (name "python-dask")
86c7ca07 16951 (version "2.9.0")
44d10b1f
RW
16952 (source
16953 (origin
16954 (method url-fetch)
16955 (uri (pypi-uri "dask" version))
16956 (sha256
86c7ca07 16957 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
44d10b1f 16958 (build-system python-build-system)
44d10b1f
RW
16959 (arguments
16960 `(#:phases
16961 (modify-phases %standard-phases
86c7ca07 16962 (add-after 'unpack 'disable-broken-tests
44d10b1f 16963 (lambda _
86c7ca07 16964 ;; This test is marked as xfail when pytest-xdist is used.
44d10b1f
RW
16965 (substitute* "dask/tests/test_threaded.py"
16966 (("def test_interrupt\\(\\)" m)
16967 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16968 m)))
86c7ca07
RW
16969 ;; This one fails with a type error:
16970 ;; TypeError: Already tz-aware, use tz_convert to convert.
16971 (substitute* "dask/dataframe/tests/test_shuffle.py"
16972 (("def test_set_index_timestamp\\(\\)" m)
16973 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16974 m)))
44d10b1f
RW
16975 #t))
16976 (replace 'check
16977 (lambda _ (invoke "pytest" "-vv"))))))
16978 (propagated-inputs
16979 `(("python-cloudpickle" ,python-cloudpickle)
86c7ca07 16980 ("python-fsspec" ,python-fsspec)
44d10b1f 16981 ("python-numpy" ,python-numpy)
86c7ca07 16982 ("python-packaging" ,python-packaging)
44d10b1f
RW
16983 ("python-pandas" ,python-pandas)
16984 ("python-partd" ,python-partd)
16985 ("python-toolz" ,python-toolz)
16986 ("python-pyyaml" ,python-pyyaml)))
16987 (native-inputs
16988 `(("python-pytest" ,python-pytest)
16989 ("python-pytest-runner" ,python-pytest-runner)))
16990 (home-page "https://github.com/dask/dask/")
16991 (synopsis "Parallel computing with task scheduling")
16992 (description
16993 "Dask is a flexible parallel computing library for analytics. It
16994consists of two components: dynamic task scheduling optimized for computation,
16995and large data collections like parallel arrays, dataframes, and lists that
16996extend common interfaces like NumPy, Pandas, or Python iterators to
16997larger-than-memory or distributed environments. These parallel collections
16998run on top of the dynamic task schedulers. ")
16999 (license license:bsd-3)))
17000
44d10b1f
RW
17001(define-public python-ilinkedlist
17002 (package
17003 (name "python-ilinkedlist")
17004 (version "0.4.0")
17005 (source
17006 (origin
17007 (method url-fetch)
17008 (uri (pypi-uri "ilinkedlist" version))
17009 (sha256
17010 (base32
17011 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
17012 (build-system python-build-system)
17013 (native-inputs `(("python-pytest" ,python-pytest)))
17014 (inputs `(("python" ,python)))
17015 (home-page "https://github.com/luther9/ilinkedlist-py")
17016 (synopsis "Immutable linked list library")
17017 (description
17018 "This is a implementation of immutable linked lists for Python. It
17019contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
17020Since a linked list is treated as immutable, it is hashable, and its length
17021can be retrieved in constant time. Some of the terminology is inspired by
17022LISP. It is possible to create an improper list by creating a @code{Pair}
17023with a non-list @code{cdr}.")
17024 (license license:gpl3+)))
17025
17026(define-public python-readlike
17027 (package
17028 (name "python-readlike")
17029 (version "0.1.3")
17030 (source
17031 (origin
17032 (method url-fetch)
17033 (uri (pypi-uri "readlike" version))
17034 (sha256
17035 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
17036 (build-system python-build-system)
17037 (home-page "https://github.com/jangler/readlike")
17038 (synopsis "GNU Readline-like line editing module")
17039 (description
17040 "This Python module provides line editing functions similar to the default
17041Emacs-style ones of GNU Readline. Unlike the Python standard library's
17042@code{readline} package, this one allows access to those capabilties in settings
17043outside of a standard command-line interface. It is especially well-suited to
17044interfacing with Urwid, due to a shared syntax for describing key inputs.
17045
17046Currently, all stateless Readline commands are implemented. Yanking and history
17047are not supported.")
17048 (license license:expat)))
17049
17050(define-public python2-readlike
17051 (package-with-python2 python-readlike))
17052
17053(define-public python-reparser
17054 (package
17055 (name "python-reparser")
17056 (version "1.4.3")
17057 (source
17058 (origin
17059 (method url-fetch)
17060 (uri (pypi-uri "ReParser" version))
17061 (sha256
17062 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
17063 (build-system python-build-system)
17064 (home-page "https://github.com/xmikos/reparser")
17065 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
17066 (description
17067 "This Python library provides a simple lexer/parser for inline markup based
17068on regular expressions.")
17069 (license license:expat)))
17070
17071(define-public python2-reparser
17072 (let ((reparser (package-with-python2
17073 (strip-python2-variant python-reparser))))
17074 (package (inherit reparser)
17075 (propagated-inputs
17076 `(("python2-enum34" ,python2-enum34)
17077 ,@(package-propagated-inputs reparser))))))
17078
17079(define-public python-precis-i18n
17080 (package
17081 (name "python-precis-i18n")
17082 (version "1.0.0")
17083 (source
17084 (origin
17085 (method url-fetch)
17086 (uri (pypi-uri "precis_i18n" version))
17087 (sha256
17088 (base32
17089 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
17090 (build-system python-build-system)
17091 (home-page "https://github.com/byllyfish/precis_i18n")
17092 (synopsis "Implementation of the PRECIS framework")
17093 (description
17094 "This module implements the PRECIS Framework as described in RFC 8264,
17095RFC 8265 and RFC 8266.")
17096 (license license:expat)))
17097
d0446c4b
RW
17098(define-public python-absl-py
17099 (package
17100 (name "python-absl-py")
17101 (version "0.6.1")
17102 (source
17103 (origin
17104 (method url-fetch)
17105 (uri (pypi-uri "absl-py" version))
17106 (sha256
17107 (base32
17108 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
17109 (build-system python-build-system)
17110 (propagated-inputs
17111 `(("python-six" ,python-six)))
17112 (home-page "https://github.com/abseil/abseil-py")
17113 (synopsis "Abseil Python common libraries")
17114 (description
17115 "This package provides the Abseil Python Common Libraries, a collection
17116of Python libraries for building Python applications.")
17117 (license license:asl2.0)))
17118
81bed4e9
RW
17119(define-public python-astor
17120 (package
17121 (name "python-astor")
17122 (version "0.7.1")
17123 (source
17124 (origin
17125 (method url-fetch)
17126 (uri (pypi-uri "astor" version))
17127 (sha256
17128 (base32
17129 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
17130 (build-system python-build-system)
17131 ;; FIXME: There are two errors and two test failures.
17132 (arguments `(#:tests? #f))
17133 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 17134 (synopsis "Read and write Python ASTs")
81bed4e9 17135 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 17136source via the Abstract Syntax Tree.")
81bed4e9
RW
17137 (license license:bsd-3)))
17138
39ee82ff
RW
17139(define-public python2-astor
17140 (package-with-python2 python-astor))
17141
79869f80
RW
17142(define-public python-astunparse
17143 (package
17144 (name "python-astunparse")
47d79541 17145 (version "1.6.2")
79869f80
RW
17146 (source
17147 (origin
17148 (method url-fetch)
17149 (uri (pypi-uri "astunparse" version))
17150 (sha256
47d79541 17151 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 17152 (build-system python-build-system)
47d79541 17153 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
17154 (propagated-inputs
17155 `(("python-six" ,python-six)
17156 ("python-wheel" ,python-wheel)))
17157 (home-page "https://github.com/simonpercivall/astunparse")
17158 (synopsis "AST unparser for Python")
17159 (description "This package provides an AST unparser for Python. It is a
17160factored out version of @code{unparse} found in the Python source
17161distribution.")
17162 (license license:bsd-3)))
17163
2884aac0
RW
17164(define-public python-gast
17165 (package
17166 (name "python-gast")
c28a8855 17167 (version "0.3.3")
2884aac0
RW
17168 (source
17169 (origin
17170 (method url-fetch)
17171 (uri (pypi-uri "gast" version))
17172 (sha256
c28a8855 17173 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
2884aac0
RW
17174 (build-system python-build-system)
17175 (propagated-inputs
17176 `(("python-astunparse" ,python-astunparse)))
17177 (home-page "https://pypi.org/project/gast/")
17178 (synopsis "Generic Python AST that abstracts the underlying Python version")
17179 (description
17180 "GAST provides a compatibility layer between the AST of various Python
17181versions, as produced by @code{ast.parse} from the standard @code{ast}
17182module.")
17183 (license license:bsd-3)))
17184
44d10b1f
RW
17185(define-public python-wikidata
17186 (package
17187 (name "python-wikidata")
17188 (version "0.6.1")
17189 (source
17190 (origin
17191 (method url-fetch)
17192 (uri (pypi-uri "Wikidata" version))
17193 (sha256
17194 (base32
17195 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
17196 (build-system python-build-system)
17197 (propagated-inputs
17198 `(("python-babel" ,python-babel)))
17199 (home-page "https://github.com/dahlia/wikidata")
17200 (synopsis "Wikidata client library")
17201 (description
17202 "This package provides a Python interface to
17203@url{https://www.wikidata.org/, Wikidata}.")
17204 (properties '((upstream-name . "Wikidata")))
17205 (license license:gpl3+)))
17206
17207(define-public python-doctest-ignore-unicode
17208 (package
17209 (name "python-doctest-ignore-unicode")
17210 (version "0.1.2")
17211 (source
17212 (origin
17213 (method url-fetch)
17214 (uri (pypi-uri "doctest-ignore-unicode" version))
17215 (sha256
17216 (base32
17217 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
17218 (build-system python-build-system)
17219 (native-inputs
17220 `(("python-nose" ,python-nose)))
17221 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
17222 (synopsis "Ignore Unicode literal prefixes in doctests")
17223 (description
17224 "This package adds support for a flag to ignore Unicode literal prefixes
17225in doctests.")
17226 (license license:asl2.0)))
17227
17228(define-public python-attr
17229 (package
17230 (name "python-attr")
17231 (version "0.3.1")
17232 (source
17233 (origin
17234 (method url-fetch)
17235 (uri (pypi-uri "attr" version))
17236 (sha256
17237 (base32
17238 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
17239 (build-system python-build-system)
17240 (home-page "https://github.com/denis-ryzhkov/attr")
17241 (synopsis "Decorator for attributes of target function or class")
17242 (description "Simple decorator to set attributes of target function or
17243class in a @acronym{DRY, Don't Repeat Yourself} way.")
17244 (license license:expat)))
f98232a3
VC
17245
17246(define-public python-construct
17247 (package
17248 (name "python-construct")
d854ab15 17249 (version "2.10.56")
f98232a3
VC
17250 (source
17251 (origin
17252 (method url-fetch)
17253 (uri (pypi-uri "construct" version))
17254 (sha256
17255 (base32
d854ab15 17256 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
f98232a3
VC
17257 (build-system python-build-system)
17258 (arguments
17259 `(#:tests? #f)) ; No tests exist.
17260 (propagated-inputs
17261 `(("python-extras" ,python-extras)
17262 ("python-arrow" ,python-arrow)
17263 ("python-numpy" ,python-numpy)
17264 ("python-ruamel.yaml" ,python-ruamel.yaml)))
aabc8954 17265 (home-page "https://construct.readthedocs.io")
f98232a3
VC
17266 (synopsis "Declarative and symmetrical parser and builder for binary data")
17267 (description
17268 "This package provides both simple, atomic constructs (such as
17269integers of various sizes), as well as composite ones which allow you
17270form hierarchical and sequential structures of increasing complexity.
17271It features bit and byte granularity, easy debugging and testing, an
17272easy-to-extend subclass system, and lots of primitive constructs to
17273make your work easier.")
17274 (license license:expat)))
b742c006
LF
17275
17276(define-public python-humanize
17277 (package
17278 (name "python-humanize")
17279 (version "0.5.1")
17280 (source
17281 (origin
17282 (method url-fetch)
17283 (uri (pypi-uri "humanize" version))
17284 (sha256
17285 (base32
17286 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
17287 (arguments
17288 '(#:tests? #f)) ; tests not in pypi archive
17289 (build-system python-build-system)
17290 (home-page "https://github.com/jmoiron/humanize")
17291 (synopsis "Print numerical information in a human-readable form")
17292 (description "This package provides a Python module that displays numbers
17293and dates in \"human readable\" forms. For example, it would display
17294\"12345591313\" as \"12.3 billion\".")
17295 (license license:expat)))
d5bbf66d
LF
17296
17297(define-public python-txaio
17298 (package
17299 (name "python-txaio")
17300 (version "18.8.1")
17301 (source
17302 (origin
17303 (method url-fetch)
17304 (uri (pypi-uri "txaio" version))
17305 (sha256
17306 (base32
17307 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
17308 (build-system python-build-system)
17309 (propagated-inputs
17310 `(("python-twisted" ,python-twisted)
17311 ("python-six" ,python-six)))
17312 (home-page "https://github.com/crossbario/txaio")
17313 (synopsis "Compatibility layer between Python asyncio and Twisted")
17314 (description "Txaio provides a compatibility layer between the Python
17315@code{asyncio} module and @code{Twisted}.")
17316 (license license:expat)))
963dfd3a
RW
17317
17318(define-public python-toolshed
17319 (package
17320 (name "python-toolshed")
17321 (version "0.4.6")
17322 (source
17323 (origin
17324 (method url-fetch)
17325 (uri (pypi-uri "toolshed" version))
17326 (sha256
17327 (base32
17328 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
17329 (build-system python-build-system)
17330 (native-inputs
17331 `(("python-nose" ,python-nose)))
17332 (home-page "https://github.com/brentp/toolshed/")
17333 (synopsis "Collection of modules and functions for working with data")
17334 (description "This is a collection of well-tested, simple modules and
17335functions that aim to reduce boilerplate when working with data.")
17336 (license license:bsd-2)))
c91ecf2d
RW
17337
17338(define-public python-annoy
17339 (package
17340 (name "python-annoy")
17341 (version "1.15.1")
17342 (source
17343 (origin
17344 (method url-fetch)
17345 (uri (pypi-uri "annoy" version))
17346 (sha256
17347 (base32
17348 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
17349 (build-system python-build-system)
17350 (native-inputs
17351 `(("python-nose" ,python-nose)))
17352 (home-page "https://github.com/spotify/annoy/")
17353 (synopsis "Approximate nearest neighbors library")
17354 (description
17355 "Annoy is a C++ library with Python bindings to search for points in
17356space that are close to a given query point. It also creates large read-only
17357file-based data structures that are @code{mmap}ped into memory so that many
17358processes may share the same data.")
17359 (license license:asl2.0)))
412342d1 17360
79bfa422 17361(define-public python-pylzma
412342d1 17362 (package
79bfa422
DM
17363 (name "python-pylzma")
17364 (version "0.5.0")
17365 (source
17366 (origin
17367 (method url-fetch)
17368 (uri (pypi-uri "pylzma" version))
17369 (sha256
17370 (base32
17371 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 17372 (build-system python-build-system)
79bfa422
DM
17373 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
17374 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
17375 (description "This package provides Python bindings for the LZMA library
17376by Igor Pavlov.")
17377 (license license:lgpl2.1+)))
17378
17379(define-public python2-pylzma
17380 (package-with-python2 python-pylzma))
f825e605 17381
6609ebe7
AG
17382(define-public python2-zeroconf
17383 (package
17384 (name "python2-zeroconf")
17385
17386 ;; This is the last version that supports Python 2.x.
17387 (version "0.19.1")
17388 (source
17389 (origin
17390 (method url-fetch)
17391 (uri (pypi-uri "zeroconf" version))
17392 (sha256
17393 (base32
17394 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
17395 (build-system python-build-system)
17396 (arguments
17397 `(#:python ,python-2
17398 #:phases
17399 (modify-phases %standard-phases
17400 (add-after 'unpack 'patch-requires
17401 (lambda* (#:key inputs #:allow-other-keys)
17402 (substitute* "setup.py"
17403 (("enum-compat")
17404 "enum34"))
17405 #t)))))
17406 (native-inputs
17407 `(("python2-six" ,python2-six)
17408 ("python2-enum32" ,python2-enum34)
17409 ("python2-netifaces" ,python2-netifaces)
17410 ("python2-typing" ,python2-typing)))
17411 (home-page "https://github.com/jstasiak/python-zeroconf")
17412 (synopsis "Pure Python mDNS service discovery")
17413 (description
17414 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
17415compatible).")
17416 (license license:lgpl2.1+)))
17417
f825e605
GLV
17418(define-public python-bsddb3
17419 (package
17420 (name "python-bsddb3")
17421 (version "6.2.6")
17422 (source
17423 (origin
17424 (method url-fetch)
17425 (uri (pypi-uri "bsddb3" version))
17426 (sha256
17427 (base32
17428 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
17429 (build-system python-build-system)
17430 (inputs
17431 `(("bdb" ,bdb)))
17432 (arguments
17433 '(#:phases
17434 (modify-phases %standard-phases
17435 (add-after 'unpack 'configure-locations
17436 (lambda* (#:key inputs #:allow-other-keys)
17437 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
17438 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
17439 #t))
17440 (replace 'check
17441 (lambda _
17442 (invoke "python3" "test3.py" "-v"))))))
17443 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
17444 (synopsis "Python bindings for Oracle Berkeley DB")
17445 (description
17446 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
17447C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
17448Transaction objects, and each of these is exposed as a Python type in the
17449bsddb3.db module. The database objects can use various access methods: btree,
17450hash, recno, and queue. Complete support of Berkeley DB distributed
17451transactions. Complete support for Berkeley DB Replication Manager.
17452Complete support for Berkeley DB Base Replication. Support for RPC.")
17453 (license license:bsd-3)))
edeb04bf
PL
17454
17455(define-public python-dbfread
17456 (package
17457 (name "python-dbfread")
17458 (version "2.0.7")
17459 (source (origin
17460 (method url-fetch)
17461 (uri (pypi-uri "dbfread" version))
17462 (sha256
17463 (base32
17464 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
17465 (build-system python-build-system)
17466 (native-inputs
17467 `(("python-pytest" ,python-pytest)))
17468 (home-page "https://dbfread.readthedocs.io")
17469 (synopsis "Read DBF Files with Python")
17470 (description
17471 "This library reads DBF files and returns the data as native Python data
17472types for further processing. It is primarily intended for batch jobs and
17473one-off scripts.")
17474 (license license:expat)))
e308b4f0
JM
17475
17476(define-public python-cached-property
17477 (package
17478 (name "python-cached-property")
17479 (version "1.5.1")
17480 (source
17481 (origin
17482 (method url-fetch)
17483 (uri (pypi-uri "cached-property" version))
17484 (sha256
17485 (base32
17486 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
17487 (build-system python-build-system)
17488 (arguments
17489 `(#:phases
17490 (modify-phases %standard-phases
17491 ;; https://github.com/pydanny/cached-property/issues/131
17492 ;; recent versions of freezegun break one test
17493 (add-after 'unpack 'disable-broken-test
17494 (lambda _
17495 (substitute* "tests/test_cached_property.py"
17496 (("def test_threads_ttl_expiry\\(self\\)" m)
17497 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
17498 " " m)))
17499 #t)))))
17500 (native-inputs
17501 `(("python-freezegun" ,python-freezegun)))
17502 (home-page
17503 "https://github.com/pydanny/cached-property")
17504 (synopsis
17505 "Decorator for caching properties in classes")
17506 (description
17507 "This package provides a decorator which makes caching
17508time-or-computationally-expensive properties quick and easy and works in Python
175092 or 3.")
17510 (license license:bsd-3)))
dfe8a704
NG
17511
17512(define-public python-folium
17513 (package
17514 (name "python-folium")
d3bc1ea9 17515 (version "0.10.1")
dfe8a704
NG
17516 (source
17517 (origin
17518 (method url-fetch)
17519 (uri (pypi-uri "folium" version))
17520 (sha256
17521 (base32
d3bc1ea9 17522 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
dfe8a704
NG
17523 (build-system python-build-system)
17524 (propagated-inputs
17525 `(("python-branca" ,python-branca)
17526 ("python-jinja2" ,python-jinja2)
17527 ("python-numpy" ,python-numpy)
17528 ("python-requests" ,python-requests)))
17529 (native-inputs
17530 `(("python-pytest" ,python-pytest)))
17531 (home-page "https://github.com/python-visualization/folium")
17532 (synopsis "Make beautiful maps with Leaflet.js & Python")
17533 (description "@code{folium} makes it easy to visualize data that’s been
17534manipulated in Python on an interactive leaflet map. It enables both the
17535binding of data to a map for @code{choropleth} visualizations as well as
17536passing rich vector/raster/HTML visualizations as markers on the map.
17537
17538The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
17539Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
17540supports Image, Video, GeoJSON and TopoJSON overlays.")
17541 (license license:expat)))
9dd5f475
LC
17542
17543(define-public jube
17544 (package
17545 ;; This is a command-line tool, so no "python-" prefix.
17546 (name "jube")
17547 (version "2.2.2")
17548 (source (origin
17549 (method url-fetch)
17550 (uri (string-append
17551 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
17552 version))
17553 (sha256
17554 (base32
17555 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
17556 (file-name (string-append "jube-" version ".tar.gz"))))
17557 (build-system python-build-system)
17558 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
17559 (synopsis "Benchmarking environment")
17560 (description
17561 "JUBE helps perform and analyze benchmarks in a systematic way. For each
17562benchmarked application, benchmark data is stored in a format that allows JUBE
17563to deduct the desired information. This data can be parsed by automatic pre-
17564and post-processing scripts that draw information and store it more densely
17565for manual interpretation.")
a9f33960 17566 (license license:gpl3+)))
66436424
NG
17567
17568(define-public python-pyroutelib3
17569 (package
17570 (name "python-pyroutelib3")
17571 (version "1.3.post1")
17572 (source
17573 (origin
17574 (method url-fetch)
17575 (uri (pypi-uri "pyroutelib3" version))
17576 (sha256
17577 (base32
17578 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
17579 (build-system python-build-system)
17580 (propagated-inputs
17581 `(("python-dateutil" ,python-dateutil)))
17582 (home-page "https://github.com/MKuranowski/pyroutelib3")
17583 (synopsis "Library for simple routing on OSM data")
17584 (description "Library for simple routing on OSM data")
17585 (license license:gpl3+)))
30e7c03a 17586
c1bbef69
17587(define-public python-bibtexparser
17588 (package
17589 (name "python-bibtexparser")
17590 (version "1.1.0")
17591 (source
17592 (origin
17593 (method url-fetch)
17594 (uri (pypi-uri "bibtexparser" version))
17595 (sha256
17596 (base32
17597 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
17598 (build-system python-build-system)
17599 (propagated-inputs
17600 `(("python-pyparsing" ,python-pyparsing)))
17601 (native-inputs
17602 `(("python-future" ,python-future)))
17603 (home-page "https://github.com/sciunto-org/python-bibtexparser")
17604 (synopsis "Python library to parse BibTeX files")
17605 (description "BibtexParser is a Python library to parse BibTeX files.")
17606 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
17607
17608(define-public python-distro
17609 (package
17610 (name "python-distro")
17611 (version "1.4.0")
17612 (source
17613 (origin
17614 (method url-fetch)
17615 (uri (pypi-uri "distro" version))
17616 (sha256
17617 (base32
17618 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
17619 (build-system python-build-system)
17620 (native-inputs
17621 `(("python-pytest" ,python-pytest)))
17622 (home-page "https://github.com/nir0s/distro")
17623 (synopsis
17624 "OS platform information API")
17625 (description
17626 "@code{distro} provides information about the OS distribution it runs on,
17627such as a reliable machine-readable ID, or version information.
17628
17629It is the recommended replacement for Python's original
17630`platform.linux_distribution` function (which will be removed in Python 3.8).
17631@code{distro} also provides a command-line interface to output the platform
17632information in various formats.")
17633 (license license:asl2.0)))
f2f41e1a
HG
17634
17635(define-public python-cairosvg
17636 (package
17637 (name "python-cairosvg")
17638 (version "2.4.2")
17639 (source
17640 (origin
17641 (method url-fetch)
17642 (uri (pypi-uri "CairoSVG" version))
17643 (sha256
17644 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
17645 (build-system python-build-system)
17646 (arguments
17647 `(#:phases
17648 (modify-phases %standard-phases
17649 (replace 'check
17650 (lambda _ (invoke "pytest"))))))
17651 (propagated-inputs
17652 `(("python-cairocffi" ,python-cairocffi)
17653 ("python-cssselect2" ,python-cssselect2)
17654 ("python-defusedxml" ,python-defusedxml)
17655 ("python-pillow" ,python-pillow)
17656 ("python-tinycss2" ,python-tinycss2)))
17657 (native-inputs
17658 `(("python-pytest-flake8" ,python-pytest-flake8)
17659 ("python-pytest-isort" ,python-pytest-isort)
17660 ("python-pytest-runner" ,python-pytest-runner)))
17661 (home-page "https://cairosvg.org/")
17662 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
17663 (description "CairoSVG is a SVG converter based on Cairo. It can export
17664SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
17665SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
17666parsed, the result is drawn to a Cairo surface that can be exported to
17667qvarious formats: PDF, PostScript, PNG and even SVG.")
17668 (license license:lgpl3+)))
ea1801e0
HG
17669
17670(define-public python-pyphen
17671 (package
17672 (name "python-pyphen")
17673 (version "0.9.5")
17674 (source
17675 (origin
17676 (method url-fetch)
17677 (uri (pypi-uri "Pyphen" version))
17678 (sha256
17679 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
17680 (build-system python-build-system)
17681 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
17682 ;; embedded set provided by upstream - like Debian does.
17683 (home-page "https://github.com/Kozea/Pyphen")
17684 (synopsis "Pure Python module to hyphenate text")
17685 (description "Pyphen is a pure Python module to hyphenate text using
17686existing Hunspell hyphenation dictionaries.")
17687 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
17688
17689(define-public python-intelhex
17690 (package
17691 (name "python-intelhex")
17692 (version "2.2.1")
17693 (source
17694 (origin
17695 (method url-fetch)
17696 (uri (pypi-uri "intelhex" version))
17697 (sha256
17698 (base32
17699 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
17700 (build-system python-build-system)
17701 (arguments '(#:tests? #f)) ;issue with version
17702 (home-page "https://pypi.org/project/IntelHex/")
17703 (synopsis "Python library for Intel HEX files manipulations")
17704 (description "The Intel HEX file format is widely used in microprocessors
17705and microcontrollers area (embedded systems etc.) as the de facto standard for
17706representation of code to be programmed into microelectronic devices. This
17707package provides an intelhex Python library to read, write, create from
17708scratch and manipulate data from Intel HEX file format. It also includes
17709several convenience Python scripts, including \"classic\" hex2bin and bin2hex
17710converters and more, those based on the library itself.")
17711 (license license:bsd-3)))
34bf6869
CL
17712
17713(define-public python-pykwalify
17714 (package
17715 (name "python-pykwalify")
17716 (version "1.7.0")
17717 (source
17718 (origin
17719 (method url-fetch)
17720 (uri (pypi-uri "pykwalify" version))
17721 (sha256
17722 (base32
17723 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
17724 (build-system python-build-system)
17725 (arguments '(#:tests? #f)) ;missing dependencies
17726 (propagated-inputs
17727 `(("python-dateutil" ,python-dateutil)
17728 ("python-docopt" ,python-docopt)
17729 ("python-pyyaml" ,python-pyyaml)))
17730 (home-page "https://github.com/grokzen/pykwalify")
17731 (synopsis
17732 "Python lib/cli for JSON/YAML schema validation")
17733 (description
17734 "This package provides a parser, schema validator, and data binding tool
17735for YAML and JSON.")
17736 (license license:expat)))
e2ebbbcc
KK
17737
17738(define-public python-dbusmock
17739 (package
022b0d5f
BG
17740 (name "python-dbusmock")
17741 (version "0.18.3")
17742 (source
17743 (origin
17744 (method url-fetch)
17745 (uri (pypi-uri "python-dbusmock" version))
17746 (sha256
e2ebbbcc 17747 (base32
022b0d5f
BG
17748 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
17749 (build-system python-build-system)
17750 (arguments
17751 '(#:phases
17752 (modify-phases %standard-phases
17753 (add-after 'unpack 'patch-shell-path
17754 (lambda _
17755 (substitute* "tests/test_code.py"
17756 (("/bin/bash") (which "bash")))
17757 #t)))))
17758 (native-inputs
17759 `(;; For tests.
17760 ("dbus" ,dbus) ; for dbus-daemon
17761 ("python-nose" ,python-nose)
17762 ("which" ,which)))
17763 (propagated-inputs
17764 `(("python-dbus" ,python-dbus)
17765 ("python-pygobject" ,python-pygobject)))
17766 (home-page "https://github.com/martinpitt/python-dbusmock")
17767 (synopsis "Python library for mock D-Bus objects")
17768 (description "python-dbusmock allows for the easy creation of mock objects on
e2ebbbcc
KK
17769D-Bus. This is useful for writing tests for software which talks to D-Bus
17770services such as upower, systemd, logind, gnome-session or others, and it is
17771hard (or impossible without root privileges) to set the state of the real
17772services to what you expect in your tests.")
022b0d5f 17773 (license license:lgpl3+)))
b657b23f
BG
17774
17775(define-public python-ujson
17776 (package
17777 (name "python-ujson")
17778 (version "1.35")
17779 (source
17780 (origin
17781 (method url-fetch)
17782 (uri (pypi-uri "ujson" version))
17783 (sha256
17784 (base32
17785 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
17786 (build-system python-build-system)
17787 (home-page "http://www.esn.me")
17788 (synopsis
17789 "Ultra fast JSON encoder and decoder for Python")
17790 (description
17791 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
17792 bindings for Python 2.5+ and 3.")
17793 (license license:bsd-3)))
17794
17795(define-public python2-ujson
17796 (package-with-python2 python-ujson))
dbcef44a
MIP
17797
17798(define-public python-iocapture
17799 ;; The latest release is more than a year older than this commit.
17800 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
17801 (revision "1"))
17802 (package
17803 (name "python-iocapture")
17804 (version "0.1.2")
17805 (source
17806 (origin
17807 (method git-fetch)
17808 (uri (git-reference
17809 (url "https://github.com/oinume/iocapture.git")
17810 (commit commit)))
17811 (file-name (git-file-name name version))
17812 (sha256
17813 (base32
17814 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
17815 (build-system python-build-system)
17816 (arguments
17817 `(#:phases
17818 (modify-phases %standard-phases
17819 (delete 'check)
17820 (add-after 'install 'check
17821 (lambda* (#:key inputs outputs #:allow-other-keys)
17822 (add-installed-pythonpath inputs outputs)
17823 (invoke "py.test" "-v" "tests")
17824 #t)))))
17825 (propagated-inputs
17826 `(("python-flexmock" ,python-flexmock)
17827 ("python-pytest" ,python-pytest)
17828 ("python-pytest-cov" ,python-pytest-cov)
17829 ("python-six" ,python-six)))
17830 (home-page "https://github.com/oinume/iocapture")
17831 (synopsis "Python capturing tool for stdout and stderr")
17832 (description
17833 "This package helps you to capture the standard out (stdout) and the
17834standard error channel (stderr) in your program.")
17835 (license license:expat))))
db6bd842
MIP
17836
17837(define-public python-argh
17838 ;; There are 21 commits since the latest release containing important
17839 ;; improvements.
17840 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
17841 (revision "1"))
17842 (package
17843 (name "python-argh")
17844 (version (git-version "0.26.2" revision commit))
17845 (source
17846 (origin
17847 (method git-fetch)
17848 (uri (git-reference
17849 (url "https://github.com/neithere/argh.git")
17850 (commit commit)))
17851 (file-name (git-file-name name version))
17852 (sha256
17853 (base32
17854 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
17855 (build-system python-build-system)
17856 (propagated-inputs
17857 `(("python-iocapture" ,python-iocapture)
17858 ("python-mock" ,python-mock)
17859 ("python-pytest" ,python-pytest)
17860 ("python-pytest-cov" ,python-pytest-cov)
17861 ("python-pytest-xdist" ,python-pytest-xdist)
17862 ("python-tox" ,python-tox)))
17863 (home-page "https://github.com/neithere/argh/")
17864 (synopsis "Argparse wrapper with natural syntax")
17865 (description
17866 "python-argh is a small library that provides several layers of
17867abstraction on top of @code{python-argparse}. The layers can be mixed. It is
17868always possible to declare a command with the highest possible (and least
17869flexible) layer and then tune the behaviour with any of the lower layers
17870including the native API of @code{python-argparse}.")
17871 (license license:lgpl3+))))
073723fa
MIP
17872
17873(define-public python-ppft
17874 (package
17875 (name "python-ppft")
17876 (version "1.6.6.1")
17877 (source
17878 (origin
17879 (method url-fetch)
17880 (uri (pypi-uri "ppft" version))
17881 (sha256
17882 (base32
17883 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
17884 (build-system python-build-system)
17885 (arguments '(#:tests? #f)) ; there are none
17886 (propagated-inputs
17887 `(("python-six" ,python-six)))
17888 (home-page "https://pypi.org/project/ppft/")
17889 (synopsis "Fork of Parallel Python")
17890 (description
17891 "This package is a fork of Parallel Python. The Parallel Python
17892module (@code{pp}) provides an easy and efficient way to create
17893parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
17894computers and clusters. It features cross-platform portability and dynamic
17895load balancing.")
17896 (license license:bsd-3)))
8451ea19
MIP
17897
17898(define-public python-pox
17899 (package
17900 (name "python-pox")
17901 (version "0.2.7")
17902 (source
17903 (origin
17904 (method url-fetch)
17905 (uri (pypi-uri "pox" version))
17906 (sha256
17907 (base32
17908 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17909 (build-system python-build-system)
17910 (arguments
17911 `(#:phases
17912 (modify-phases %standard-phases
17913 (replace 'check
17914 (lambda _
17915 (mkdir-p "/tmp/guix")
17916 (setenv "SHELL" "bash")
17917 (setenv "USERNAME" "guix")
17918 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17919 (invoke "py.test" "-vv")
17920 #t)))))
17921 (native-inputs
17922 `(("python-pytest" ,python-pytest)
17923 ("which" ,which)))
17924 (home-page "https://pypi.org/project/pox/")
17925 (synopsis "Python utilities for filesystem exploration and automated builds")
17926 (description
17927 "Pox provides a collection of utilities for navigating and manipulating
17928filesystems. This module is designed to facilitate some of the low level
17929operating system interactions that are useful when exploring a filesystem on a
17930remote host. Pox provides Python equivalents of several shell commands such
17931as @command{which} and @command{find}. These commands allow automated
17932discovery of what has been installed on an operating system, and where the
17933essential tools are located.")
17934 (license license:bsd-3)))
7e476ae8
MIP
17935
17936(define-public python-pathos
17937 (package
17938 (name "python-pathos")
17939 (version "0.2.5")
17940 (source
17941 (origin
17942 (method url-fetch)
17943 (uri (pypi-uri "pathos" version))
17944 (sha256
17945 (base32
17946 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17947 (build-system python-build-system)
8f82e7e3
EF
17948 (arguments
17949 '(#:phases
17950 (modify-phases %standard-phases
17951 (replace 'check
17952 (lambda _
17953 (setenv "PYTHONPATH"
17954 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17955 (invoke "python" "./tests/__main__.py"))))))
7e476ae8
MIP
17956 (propagated-inputs
17957 `(("python-dill" ,python-dill)
17958 ("python-multiprocess" ,python-multiprocess)
17959 ("python-pox" ,python-pox)
17960 ("python-ppft" ,python-ppft)))
8f82e7e3
EF
17961 (native-inputs
17962 `(("python-pytest" ,python-pytest)))
7e476ae8
MIP
17963 (home-page "https://pypi.org/project/pathos/")
17964 (synopsis
17965 "Parallel graph management and execution in heterogeneous computing")
17966 (description
17967 "Python-pathos is a framework for heterogenous computing. It provides a
17968consistent high-level interface for configuring and launching parallel
17969computations across heterogenous resources. Python-pathos provides configurable
17970launchers for parallel and distributed computing, where each launcher contains
17971the syntactic logic to configure and launch jobs in an execution environment.")
17972 (license license:bsd-3)))
54e5ee5a
BG
17973
17974(define-public python-flit
17975 (package
17976 (name "python-flit")
17977 (version "2.1.0")
17978 (source
17979 (origin
17980 (method url-fetch)
17981 (uri (pypi-uri "flit" version))
17982 (sha256
17983 (base32
17984 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17985 (build-system python-build-system)
17986 (arguments
17987 `(#:tests? #f)) ; XXX: Check requires network access.
17988 (home-page "https://flit.readthedocs.io/")
17989 (synopsis
17990 "Simple packaging tool for simple packages")
17991 (description
17992 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17993packages a single importable module or package at a time, using the import
17994name as the name on PyPI. All subpackages and data files within a package
17995are included automatically.")
17996 (license license:bsd-3)))
02139b42
BG
17997
17998(define-public python-pathtools
17999 (package
18000 (name "python-pathtools")
18001 (version "0.1.2")
18002 (source
18003 (origin
18004 (method url-fetch)
18005 (uri (pypi-uri "pathtools" version))
18006 (sha256
18007 (base32
18008 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
18009 (build-system python-build-system)
18010 (home-page
18011 "https://github.com/gorakhargosh/pathtools")
18012 (synopsis "Path utilities for Python")
18013 (description "Pattern matching and various utilities for file systems
18014paths.")
18015 (license license:expat)))
6b520177
JG
18016
18017(define-public python-fastentrypoints
18018 (package
18019 (name "python-fastentrypoints")
18020 (version "0.12")
18021 (source
18022 (origin
18023 (method url-fetch)
18024 (uri (pypi-uri "fastentrypoints" version))
18025 (sha256
18026 (base32
18027 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
18028 (build-system python-build-system)
18029 (home-page
18030 "https://github.com/ninjaaron/fast-entry_points")
18031 (synopsis
18032 "Makes entry_points specified in setup.py load more quickly")
18033 (description
18034 "Using entry_points in your setup.py makes scripts that start really
18035slowly because it imports pkg_resources. This package allows such setup
18036scripts to load entry points more quickly.")
18037 (license license:bsd-3)))
c5eb8cf8
JG
18038
18039(define-public python-funcparserlib
18040 (package
18041 (name "python-funcparserlib")
18042 (version "0.3.6")
18043 (source
18044 (origin
18045 (method url-fetch)
18046 (uri (pypi-uri "funcparserlib" version))
18047 (sha256
18048 (base32
18049 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
18050 (native-inputs
18051 `(("python-tox" ,python-tox)))
18052 (arguments
18053 `(#:phases
18054 (modify-phases %standard-phases
18055 (replace 'check
18056 (lambda _
18057 (invoke "tox"))))))
18058 (build-system python-build-system)
18059 (home-page
18060 "https://github.com/vlasovskikh/funcparserlib")
18061 (synopsis
18062 "Recursive descent parsing library based on functional combinators")
18063 (description
11140cf1 18064 "This package is a recursive descent parsing library for Python based on
c5eb8cf8
JG
18065functional combinators. Parser combinators are just higher-order functions
18066that take parsers as their arguments and return them as result values.")
18067 (license license:expat)))
602f3b67
NG
18068
18069(define-public python-speg
18070 (package
18071 (name "python-speg")
18072 (version "0.3")
18073 (source
18074 (origin
18075 (method url-fetch)
18076 (uri (pypi-uri "speg" version ".zip"))
18077 (sha256
18078 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
18079 (arguments
18080 `(#:tests? #f)) ;FIXME: tests fail, not sure why
18081 (native-inputs
18082 `(("unzip" ,unzip)))
18083 (build-system python-build-system)
18084 (home-page "https://github.com/avakar/speg")
18085 (synopsis "PEG-based parser interpreter with memoization")
18086 (description "This package is a PEG-based parser and interpreter with
18087memoization.")
18088 (license license:expat)))
07c8177b
NG
18089
18090(define-public python-cson
18091 (package
18092 (name "python-cson")
18093 (version "0.8")
18094 (source
18095 (origin
18096 (method url-fetch)
18097 (uri (pypi-uri "cson" version))
18098 (sha256
18099 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
18100 (build-system python-build-system)
18101 (propagated-inputs
18102 `(("python-speg" ,python-speg)))
18103 (home-page "https://github.com/avakar/pycson")
18104 (synopsis "Parser for Coffeescript Object Notation (CSON)")
18105 (description "This package is a parser for Coffeescript Object
18106Notation (CSON).")
18107 (license license:expat)))
e24c672e
LDB
18108
18109(define-public python-asynctest
18110 (package
18111 (name "python-asynctest")
18112 (version "0.13.0")
18113 (source
18114 (origin
18115 (method url-fetch)
18116 (uri (pypi-uri "asynctest" version))
18117 (sha256
18118 (base32
18119 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
18120 (build-system python-build-system)
18121 (arguments
18122 '(#:phases
18123 (modify-phases %standard-phases
18124 (replace 'check
18125 (lambda _
18126 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
18127 (add-after 'unpack 'disable-tests
18128 (lambda* _
18129 (substitute* "test/test_selector.py"
18130 ;; XXX: This test fails for unknown reason inside the build
18131 ;; environment.
18132 (("def test_events_watched_outside_test_are_ignored")
18133 "@unittest.skip('disabled by guix')
18134 def test_events_watched_outside_test_are_ignored")))))))
18135 (home-page "https://github.com/Martiusweb/asynctest")
18136 (synopsis "Extension of unittest for testing asyncio libraries")
18137 (description
18138 "The package asynctest is built on top of the standard unittest module
18139and cuts down boilerplate code when testing libraries for asyncio.")
18140 (license license:asl2.0)))
1cc9c38e
LDB
18141
18142(define-public python-aionotify
18143 (package
18144 (name "python-aionotify")
18145 (version "0.2.0")
18146 (source
18147 (origin
18148 ;; Source tarball on PyPi lacks tests
18149 (method git-fetch)
18150 (uri (git-reference
18151 (url "https://github.com/rbarrois/aionotify")
18152 (commit (string-append "v" version))))
18153 (file-name (git-file-name name version))
18154 (sha256
18155 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
18156 (build-system python-build-system)
18157 (native-inputs `(("python-asynctest" ,python-asynctest)))
18158 (home-page "https://github.com/rbarrois/aionotify")
18159 (synopsis "Asyncio-powered inotify library")
18160 (description
18161 "@code{aionotify} is a simple, asyncio-based inotify library.")
18162 (license license:bsd-3)))
84efaa3b
LDB
18163
18164(define-public python-forbiddenfruit
18165 (package
18166 (name "python-forbiddenfruit")
18167 (version "0.1.3")
18168 (source
18169 (origin
18170 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
18171 (method git-fetch)
18172 (uri (git-reference
18173 (url "https://github.com/clarete/forbiddenfruit")
18174 (commit version)))
18175 (file-name (git-file-name name version))
18176 (sha256
18177 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
18178 (build-system python-build-system)
18179 (arguments
18180 '(#:phases
18181 (modify-phases %standard-phases
18182 (replace 'check
18183 (lambda _
18184 (invoke "make" "SKIP_DEPS=1"))))))
18185 (native-inputs
18186 `(("python-nose" ,python-nose)
18187 ("python-coverage" ,python-coverage)))
18188 (home-page "https://github.com/clarete/forbiddenfruit")
18189 (synopsis "Patch python built-in objects")
18190 (description "This project allows Python code to extend built-in types.")
18191 (license (list license:gpl3+ license:expat))))
9786258b
LDB
18192
18193(define-public python-shouldbe
18194 (package
18195 (name "python-shouldbe")
18196 (version "0.1.2")
18197 (source
18198 (origin
18199 (method url-fetch)
18200 (uri (pypi-uri "shouldbe" version))
18201 (sha256
18202 (base32
18203 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
18204 (build-system python-build-system)
18205 (propagated-inputs
18206 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
18207 (native-inputs
18208 `(("python-nose" ,python-nose)))
18209 (home-page "https://github.com/directxman12/should_be")
18210 (synopsis "Python Assertion Helpers inspired by Shouldly")
18211 (description
18212 "Python Assertion Helpers inspired by Shouldly.")
18213 (license license:isc)))
72c2478a
LDB
18214
18215(define-public python-k5test
18216 (package
18217 (name "python-k5test")
18218 (version "0.9.2")
18219 (source
18220 (origin
18221 (method url-fetch)
18222 (uri (pypi-uri "k5test" version))
18223 (sha256
18224 (base32
18225 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
18226 (build-system python-build-system)
18227 (propagated-inputs
18228 `(("python-six" ,python-six)
18229 ;; `which`, `kadmin.local` binaries called inside library
18230 ("which" ,which)
18231 ("mit-krb5" ,mit-krb5)))
18232 (native-inputs `(("mit-krb5" ,mit-krb5)))
18233 (arguments
18234 '(#:phases
18235 (modify-phases %standard-phases
18236 (add-after 'unpack 'patch-paths
18237 (lambda* _
18238 (substitute* "k5test/realm.py"
18239 (("'kadmin_local'") "'kadmin.local'")))))))
18240 (home-page "https://github.com/pythongssapi/k5test")
18241 (synopsis "Library for setting up self-contained Kerberos 5 environments")
18242 (description
18243 "@code{k5test} is a library for setting up self-contained Kerberos 5
18244environments, and running Python unit tests inside those environments. It is
18245based on the file of the same name found alongside the MIT Kerberos 5 unit
18246tests.")
18247 (license license:isc)))
a8ef4978
LDB
18248
18249(define-public python-gssapi
18250 (package
18251 (name "python-gssapi")
18252 (version "1.6.1")
18253 (source
18254 (origin
18255 (method url-fetch)
18256 (uri (pypi-uri "gssapi" version))
18257 (sha256
18258 (base32
18259 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
18260 (build-system python-build-system)
18261 (propagated-inputs
18262 `(("python-decorator" ,python-decorator)
18263 ("python-six" ,python-six)))
18264 (inputs
18265 `(("mit-krb5" ,mit-krb5)))
18266 ;; for tests
18267 (native-inputs
18268 `(("python-shouldbe" ,python-shouldbe)
18269 ("python-parameterized" ,python-parameterized)
18270 ("python-k5test" ,python-k5test)
18271 ("python-nose" ,python-nose)))
18272 (home-page "https://github.com/pythongssapi/python-gssapi")
18273 (synopsis "Python GSSAPI Wrapper")
18274 (description
18275 "Python-GSSAPI provides both low-level and high level wrappers around the
18276GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
18277also be useable with other GSSAPI mechanisms.")
18278 (license license:isc)))
7261bdca
JL
18279
18280(define-public python-check-manifest
18281 (package
18282 (name "python-check-manifest")
18283 (version "0.37")
18284 (source
18285 (origin
18286 (method url-fetch)
18287 (uri (pypi-uri "check-manifest" version))
18288 (sha256
18289 (base32
18290 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
18291 (build-system python-build-system)
18292 (native-inputs
18293 `(("python-mock" ,python-mock)
18294 ("git" ,git)))
18295 (home-page "https://github.com/mgedmin/check-manifest")
18296 (synopsis "Check MANIFEST.in in a Python source package for completeness")
18297 (description "Python package can include a MANIFEST.in file to help with
18298sending package files to the Python Package Index. This package checks that
18299file to ensure it completely and accurately describes your project.")
18300 (license license:expat)))
b487b7b5
JL
18301
18302(define-public python-android-stringslib
18303 (package
18304 (name "python-android-stringslib")
18305 (version "0.1.2")
18306 (source
18307 (origin
18308 (method git-fetch)
18309 (uri (git-reference
18310 (url "https://framagit.org/tyreunom/python-android-strings-lib")
18311 (commit (string-append "v" version))))
18312 (file-name (git-file-name name version))
18313 (sha256
18314 (base32
18315 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
18316 (build-system python-build-system)
18317 (arguments
18318 `(#:tests? #f))
18319 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
18320 (synopsis "Android strings.xml support")
18321 (description "Android Strings Lib provides support for android's strings.xml
18322files. These files are used to translate strings in android apps.")
18323 (license license:expat)))
87435943 18324
7dec888f
JL
18325(define-public python-watchdog
18326 (package
18327 (name "python-watchdog")
18328 (version "0.9.0")
18329 (source
18330 (origin
18331 (method url-fetch)
18332 (uri (pypi-uri "watchdog" version))
18333 (sha256
18334 (base32
18335 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
18336 (build-system python-build-system)
18337 (arguments
18338 `(#:phases
18339 (modify-phases %standard-phases
18340 (add-before 'check 'remove-failing
18341 (lambda _
18342 (delete-file "tests/test_inotify_buffer.py")
18343 (delete-file "tests/test_snapshot_diff.py")
18344 #t)))))
18345 (propagated-inputs
18346 `(("python-argh" ,python-argh)
18347 ("python-pathtools" ,python-pathtools)
18348 ("python-pyyaml" ,python-pyyaml)))
18349 (native-inputs
18350 `(("python-pytest-cov" ,python-pytest-cov)
18351 ("python-pytest-timeout" ,python-pytest-timeout)))
18352 (home-page "https://github.com/gorakhargosh/watchdog")
18353 (synopsis "Filesystem events monitoring")
18354 (description "This package provides a way to monitor filesystem events
18355such as a file modification and trigger an action. This is similar to inotify,
18356but portable.")
18357 (license license:asl2.0)))
2cbede59 18358
9c9704a9
MC
18359(define-public python-wget
18360 (package
18361 (name "python-wget")
18362 (version "3.2")
18363 (source
18364 (origin
18365 (method url-fetch)
18366 (uri (pypi-uri "wget" version ".zip"))
18367 (sha256
18368 (base32
18369 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
18370 (build-system python-build-system)
18371 (native-inputs `(("unzip" ,unzip)))
18372 (home-page "https://bitbucket.org/techtonik/python-wget/")
18373 (synopsis "Pure Python download utility")
18374 (description "The python-wget library provides an API to download files
18375with features similar to the @command{wget} utility.")
18376 (license license:unlicense)))
18377
2cbede59
JL
18378(define-public offlate
18379 (package
18380 (name "offlate")
18381 (version "0.5")
18382 (source
18383 (origin
18384 (method git-fetch)
18385 (uri (git-reference
18386 (url "https://framagit.org/tyreunom/offlate")
18387 (commit version)))
18388 (file-name (git-file-name name version))
18389 (sha256
18390 (base32
18391 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
18392 (build-system python-build-system)
18393 (arguments
18394 ;; No tests
18395 `(#:tests? #f))
18396 (propagated-inputs
18397 `(("python-android-stringslib" ,python-android-stringslib)
18398 ("python-dateutil" ,python-dateutil)
18399 ("python-gitlab" ,python-gitlab)
18400 ("python-lxml" ,python-lxml)
18401 ("python-polib" ,python-polib)
18402 ("python-pyenchant" ,python-pyenchant)
18403 ("python-pygit2" ,python-pygit2)
18404 ("python-pygithub" ,python-pygithub)
18405 ("python-pyqt" ,python-pyqt)
18406 ("python-requests" ,python-requests)
18407 ("python-ruamel.yaml" ,python-ruamel.yaml)
18408 ("python-translation-finder" ,python-translation-finder)
18409 ("python-watchdog" ,python-watchdog)))
18410 (native-inputs
18411 `(("qttools" ,qttools)))
18412 (home-page "https://framagit.org/tyreunom/offlate")
18413 (synopsis "Offline translation interface for online translation tools")
18414 (description "Offlate offers a unified interface for different translation
18415file formats, as well as many different online translation platforms. You can
18416use it to get work from online platforms, specialized such as the Translation
18417Project, or not such a gitlab instance when your upstream doesn't use any
18418dedicated platform. The tool proposes a unified interface for any format and
18419an upload option to send your work back to the platform.")
18420 (license license:gpl3+)))
479f4013
JK
18421
18422(define-public python-pypng
18423 (package
18424 (name "python-pypng")
18425 (version "0.0.20")
18426 (source
18427 (origin
18428 (method url-fetch)
18429 (uri (pypi-uri "pypng" version))
18430 (sha256
18431 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
18432 (build-system python-build-system)
18433 (home-page "https://github.com/drj11/pypng")
18434 (synopsis "Pure Python PNG image encoder/decoder")
18435 (description
18436 "The PyPNG module implements support for PNG images. It reads and writes
18437PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
18438pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
18439LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
18440images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
18441A number of optional chunks can be specified (when writing) and
18442understood (when reading): tRNS, bKGD, gAMA.
18443
18444PyPNG is not a high level toolkit for image processing (like PIL) and does not
18445aim at being a replacement or competitor. Its strength lies in fine-grained
18446extensive support of PNG features. It can also read and write Netpbm PAM
18447files, with a focus on its use as an intermediate format for implementing
18448custom PNG processing.")
18449 (license license:expat)))
da8ca4c3 18450
18451(define-public python-fuzzywuzzy
18452 (package
18453 (name "python-fuzzywuzzy")
18454 (version "0.18.0")
18455 (source
18456 (origin
18457 (method url-fetch)
18458 (uri (pypi-uri "fuzzywuzzy" version))
18459 (sha256
18460 (base32
18461 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
18462 (build-system python-build-system)
18463 (native-inputs
18464 `(("python-hypothesis" ,python-hypothesis)
18465 ("python-pycodestyle" ,python-pycodestyle)
18466 ("python-pytest" ,python-pytest)))
18467 (propagated-inputs
18468 `(("python-levenshtein" ,python-levenshtein)))
18469 (home-page "https://github.com/seatgeek/fuzzywuzzy")
7d9f8db2 18470 (synopsis "Fuzzy string matching in Python")
da8ca4c3 18471 (description "Approximate string matching using
18472@emph{Levenshtein Distance} to calculate the differences between
18473sequences.")
18474 (license license:gpl2)))
18475
18476(define-public python2-fuzzywuzzy
18477 (package-with-python2 python-fuzzywuzzy))
34bf3ed2
EF
18478
18479(define-public python-block-tracing
18480 (package
18481 (name "python-block-tracing")
18482 (version "1.0.1")
18483 (source
18484 (origin
18485 (method url-fetch)
18486 (uri (pypi-uri "block_tracing" version))
18487 (sha256
18488 (base32
18489 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
18490 (build-system python-build-system)
18491 (arguments '(#:tests? #f)) ; no tests
18492 (home-page "https://github.com/rianhunter/block_tracing")
18493 (synopsis "Protect process memory")
18494 (description
18495 "@code{block_tracing} is a tiny Python library that can be used to
18496prevent debuggers and other applications from inspecting the memory within
18497your process.")
18498 (license license:expat)))
591faabd
AT
18499
18500(define-public python-gcovr
18501 (package
18502 (name "python-gcovr")
18503 (version "4.2")
18504 (source
18505 (origin
18506 (method url-fetch)
18507 (uri (pypi-uri "gcovr" version))
18508 (sha256
18509 (base32
18510 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
18511 (build-system python-build-system)
18512 (propagated-inputs
18513 `(("python-lxml" ,python-lxml)
18514 ("python-jinja2" ,python-jinja2)))
18515 (home-page "https://gcovr.com/")
18516 (synopsis "Utility for generating code coverage results")
18517 (description
18518 "Gcovr provides a utility for managing the use of the GNU gcov
18519utility and generating summarized code coverage results. It is inspired
18520by the Python coverage.py package, which provides a similar utility for
18521Python.")
18522 (license license:bsd-3)))
efcb0508
GLV
18523
18524(define-public python-owslib
18525 (package
18526 (name "python-owslib")
18527 (version "0.19.2")
18528 (source
18529 (origin
18530 (method url-fetch)
18531 (uri (pypi-uri "OWSLib" version))
18532 (sha256
18533 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
18534 (build-system python-build-system)
18535 (arguments
18536 '(#:tests? #f)) ; TODO: package dependencies required for tests.
18537 (synopsis "Interface for Open Geospatial Consortium web service")
18538 (description
18539 "OWSLib is a Python package for client programming with Open Geospatial
18540Consortium (OGC) web service (hence OWS) interface standards, and their related
18541content models.")
18542 (home-page "https://geopython.github.io/OWSLib/")
18543 (license license:bsd-3)))
b14c234c
JM
18544
18545(define-public python-docusign-esign
18546 (package
18547 (name "python-docusign-esign")
18548 (version "3.1.0")
18549 (source (origin
18550 (method url-fetch)
18551 (uri (pypi-uri "docusign_esign" version))
18552 (sha256
18553 (base32
18554 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
18555 (build-system python-build-system)
18556 ;; Testing requires undocumented setup changes, and so testing is disabled here.
18557 (arguments `(#:tests? #f))
18558 (propagated-inputs
18559 `(("python-certifi", python-certifi)
18560 ("python-six", python-six)
18561 ("python-dateutil", python-dateutil)
18562 ("python-urllib3", python-urllib3)
18563 ("python-pyjwt", python-pyjwt)
18564 ("python-cryptography", python-cryptography)
18565 ("python-nose", python-nose)))
18566 (synopsis "DocuSign Python Client")
18567 (description "The Official DocuSign Python Client Library used to interact
18568 with the eSign REST API. Send, sign, and approve documents using this client.")
18569 (home-page "https://www.docusign.com/devcenter")
18570 (license license:expat)))
f6c78480
TLC
18571
18572(define-public python-xattr
18573 (package
18574 (name "python-xattr")
18575 (version "0.9.7")
18576 (source
18577 (origin
18578 (method url-fetch)
18579 (uri (pypi-uri "xattr" version))
18580 (sha256
18581 (base32
18582 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
18583 (build-system python-build-system)
18584 (propagated-inputs
18585 `(("python-cffi" ,python-cffi)))
18586 (home-page "https://github.com/xattr/xattr")
18587 (synopsis
18588 "Python wrapper for extended filesystem attributes")
18589 (description "This package provides a Python wrapper for using extended
18590filesystem attributes. Extended attributes extend the basic attributes of files
18591and directories in the file system. They are stored as name:data pairs
18592associated with file system objects (files, directories, symlinks, etc).")
18593 (license license:expat)))
3b3edfa8
TLC
18594
18595(define-public python-json-logger
18596 (package
18597 (name "python-json-logger")
18598 (version "0.1.11")
18599 (source
18600 (origin
18601 (method url-fetch)
18602 (uri (pypi-uri "python-json-logger" version))
18603 (sha256
18604 (base32
18605 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
18606 (build-system python-build-system)
18607 (home-page
18608 "https://github.com/madzak/python-json-logger")
18609 (synopsis "JSON log formatter in Python")
18610 (description "This library allows standard Python logging to output log data
18611as JSON objects. With JSON we can make our logs more readable by machines and
18612we can stop writing custom parsers for syslog-type records.")
18613 (license license:bsd-3)))
20c9df4e
TLC
18614
18615(define-public python-daiquiri
18616 (package
18617 (name "python-daiquiri")
18618 (version "2.1.1")
18619 (source
18620 (origin
18621 (method url-fetch)
18622 (uri (pypi-uri "daiquiri" version))
18623 (sha256
18624 (base32
18625 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
18626 (build-system python-build-system)
18627 (propagated-inputs
18628 `(("python-json-logger" ,python-json-logger)))
18629 (native-inputs
18630 `(("python-mock" ,python-mock)
18631 ("python-pytest" ,python-pytest)
18632 ("python-setuptools-scm" ,python-setuptools-scm)
18633 ("python-six" ,python-six)))
18634 (home-page "https://github.com/jd/daiquiri")
18635 (synopsis
18636 "Library to configure Python logging easily")
18637 (description "The daiquiri library provides an easy way to configure
18638logging in Python. It also provides some custom formatters and handlers.")
18639 (license license:asl2.0)))
f5879f15
TLC
18640
18641(define-public python-pifpaf
18642 (package
18643 (name "python-pifpaf")
18644 (version "2.4.0")
18645 (source
18646 (origin
18647 (method url-fetch)
18648 (uri (pypi-uri "pifpaf" version))
18649 (sha256
18650 (base32
18651 "150av2pylsjy8ykrpyi0vzy2q24s9rhh2ya01zvwnvj9j5dspviz"))))
18652 (build-system python-build-system)
18653 (arguments
18654 `(#:tests? #f))
18655 (propagated-inputs
18656 `(("python-click" ,python-click)
18657 ("python-daiquiri" ,python-daiquiri)
18658 ("python-fixtures" ,python-fixtures)
18659 ("python-jinja2" ,python-jinja2)
18660 ("python-pbr" ,python-pbr)
18661 ("python-psutil" ,python-psutil)
18662 ("python-six" ,python-six)
18663 ("python-xattr" ,python-xattr)))
18664 (native-inputs
18665 `(("python-mock" ,python-mock)
18666 ("python-os-testr" ,python-os-testr)
18667 ("python-requests" ,python-requests)
18668 ("python-testrepository" ,python-testrepository)
18669 ("python-testtools" ,python-testtools)))
18670 (home-page "https://github.com/jd/pifpaf")
18671 (synopsis "Tools and fixtures to manage daemons for testing in Python")
18672 (description "Pifpaf is a suite of fixtures and a command-line tool that
18673allows to start and stop daemons for a quick throw-away usage. This is typically
18674useful when needing these daemons to run integration testing. It originally
18675evolved from its precursor @code{overtest}.")
18676 (license license:asl2.0)))
aefcfecd
LDB
18677
18678(define-public python-pytest-check-links
18679 (package
18680 (name "python-pytest-check-links")
18681 (version "0.3.0")
18682 (source
18683 (origin
18684 (method url-fetch)
18685 ;; URI uses underscores
18686 (uri (pypi-uri "pytest_check_links" version))
18687 (sha256
18688 (base32
18689 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
18690 (build-system python-build-system)
18691 (propagated-inputs
18692 `(("python-docutils" ,python-docutils)
18693 ("python-html5lib" ,python-html5lib)
18694 ("python-nbconvert" ,python-nbconvert)
18695 ("python-nbformat" ,python-nbformat)
18696 ("python-pytest" ,python-pytest)
18697 ("python-six" ,python-six)))
18698 (native-inputs
18699 `(("python-pbr-minimal" ,python-pbr-minimal)))
18700 (home-page "https://github.com/minrk/pytest-check-links")
18701 (synopsis "Check links in files")
18702 (description "This package provides a pytest plugin that checks URLs for
18703HTML-containing files.")
18704 (license license:bsd-3)))
01d5f2c5
LDB
18705
18706(define-public python-json5
18707 (package
18708 (name "python-json5")
18709 (version "0.8.5")
18710 (source
18711 (origin
18712 ;; sample.json5 is missing from PyPi source tarball
18713 (method git-fetch)
18714 (uri (git-reference
18715 (url "https://github.com/dpranke/pyjson5.git")
18716 (commit (string-append "v" version))))
18717 (file-name (git-file-name name version))
18718 (sha256
18719 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
18720 (build-system python-build-system)
18721 (home-page "https://github.com/dpranke/pyjson5")
18722 (synopsis
18723 "Python implementation of the JSON5 data format")
18724 (description
18725 "JSON5 extends the JSON data interchange format to make it slightly more
18726usable as a configuration language. This Python package implements parsing and
18727dumping of JSON5 data structures.")
18728 (license license:asl2.0)))