gnu: Add python-shouldbe.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
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>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
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>
22 ;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;;
72 ;;; This file is part of GNU Guix.
73 ;;;
74 ;;; GNU Guix is free software; you can redistribute it and/or modify it
75 ;;; under the terms of the GNU General Public License as published by
76 ;;; the Free Software Foundation; either version 3 of the License, or (at
77 ;;; your option) any later version.
78 ;;;
79 ;;; GNU Guix is distributed in the hope that it will be useful, but
80 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
81 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
82 ;;; GNU General Public License for more details.
83 ;;;
84 ;;; You should have received a copy of the GNU General Public License
85 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
86
87 (define-module (gnu packages python-xyz)
88 #:use-module ((guix licenses) #:prefix license:)
89 #:use-module (gnu packages)
90 #:use-module (gnu packages algebra)
91 #:use-module (gnu packages adns)
92 #:use-module (gnu packages attr)
93 #:use-module (gnu packages backup)
94 #:use-module (gnu packages bash)
95 #:use-module (gnu packages check)
96 #:use-module (gnu packages compression)
97 #:use-module (gnu packages crypto)
98 #:use-module (gnu packages databases)
99 #:use-module (gnu packages dbm)
100 #:use-module (gnu packages file)
101 #:use-module (gnu packages fontutils)
102 #:use-module (gnu packages gcc)
103 #:use-module (gnu packages geo)
104 #:use-module (gnu packages ghostscript)
105 #:use-module (gnu packages gl)
106 #:use-module (gnu packages glib)
107 #:use-module (gnu packages gnome)
108 #:use-module (gnu packages graphviz)
109 #:use-module (gnu packages graphics)
110 #:use-module (gnu packages gstreamer)
111 #:use-module (gnu packages gtk)
112 #:use-module (gnu packages icu4c)
113 #:use-module (gnu packages image)
114 #:use-module (gnu packages imagemagick)
115 #:use-module (gnu packages libevent)
116 #:use-module (gnu packages libffi)
117 #:use-module (gnu packages linux)
118 #:use-module (gnu packages llvm)
119 #:use-module (gnu packages man)
120 #:use-module (gnu packages maths)
121 #:use-module (gnu packages monitoring)
122 #:use-module (gnu packages multiprecision)
123 #:use-module (gnu packages networking)
124 #:use-module (gnu packages ncurses)
125 #:use-module (gnu packages openstack)
126 #:use-module (gnu packages pcre)
127 #:use-module (gnu packages perl)
128 #:use-module (gnu packages pkg-config)
129 #:use-module (gnu packages python)
130 #:use-module (gnu packages python-check)
131 #:use-module (gnu packages python-compression)
132 #:use-module (gnu packages python-crypto)
133 #:use-module (gnu packages python-science)
134 #:use-module (gnu packages python-web)
135 #:use-module (gnu packages qt)
136 #:use-module (gnu packages readline)
137 #:use-module (gnu packages sdl)
138 #:use-module (gnu packages search)
139 #:use-module (gnu packages shells)
140 #:use-module (gnu packages sphinx)
141 #:use-module (gnu packages ssh)
142 #:use-module (gnu packages terminals)
143 #:use-module (gnu packages tex)
144 #:use-module (gnu packages texinfo)
145 #:use-module (gnu packages time)
146 #:use-module (gnu packages tls)
147 #:use-module (gnu packages version-control)
148 #:use-module (gnu packages video)
149 #:use-module (gnu packages web)
150 #:use-module (gnu packages base)
151 #:use-module (gnu packages xml)
152 #:use-module (gnu packages xorg)
153 #:use-module (gnu packages xdisorg)
154 #:use-module (gnu packages tcl)
155 #:use-module (gnu packages bdw-gc)
156 #:use-module (gnu packages serialization)
157 #:use-module (guix packages)
158 #:use-module (guix download)
159 #:use-module (guix git-download)
160 #:use-module (guix hg-download)
161 #:use-module (guix utils)
162 #:use-module (guix build-system gnu)
163 #:use-module (guix build-system cmake)
164 #:use-module (guix build-system python)
165 #:use-module (guix build-system trivial)
166 #:use-module (srfi srfi-1)
167 #:use-module (srfi srfi-26))
168
169 (define-public python-psutil
170 (package
171 (name "python-psutil")
172 (version "5.6.5")
173 (source
174 (origin
175 (method url-fetch)
176 (uri (pypi-uri "psutil" version))
177 (sha256
178 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
179 (build-system python-build-system)
180 (arguments
181 ;; FIXME: some tests does not return and times out.
182 '(#:tests? #f))
183 (home-page "https://www.github.com/giampaolo/psutil")
184 (synopsis "Library for retrieving information on running processes")
185 (description
186 "psutil (Python system and process utilities) is a library for retrieving
187 information on running processes and system utilization (CPU, memory, disks,
188 network) in Python. It is useful mainly for system monitoring, profiling and
189 limiting process resources and management of running processes. It implements
190 many functionalities offered by command line tools such as: ps, top, lsof,
191 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
192 pidof, tty, taskset, pmap.")
193 (properties `((python2-variant . ,(delay python2-psutil))))
194 (license license:bsd-3)))
195
196 (define-public python2-psutil
197 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
198 (package
199 (inherit base)
200 (propagated-inputs
201 `(("python2-enum34" ,python2-enum34) ;optional
202 ,@(package-propagated-inputs base))))))
203
204 (define-public python-shapely
205 (package
206 (name "python-shapely")
207 (version "1.6.4.post2")
208 (source
209 (origin
210 (method url-fetch)
211 (uri (pypi-uri "Shapely" version))
212 (sha256
213 (base32
214 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
215 (build-system python-build-system)
216 (native-inputs
217 `(("python-cython" ,python-cython)
218 ("python-matplotlib" ,python-matplotlib)
219 ("python-pytest" ,python-pytest)
220 ("python-pytest-cov" ,python-pytest-cov)))
221 (inputs
222 `(("geos" ,geos)))
223 (propagated-inputs
224 `(("python-numpy" ,python-numpy)))
225 (arguments
226 `(#:phases
227 (modify-phases %standard-phases
228 (add-after 'unpack 'patch-geos-path
229 (lambda* (#:key inputs #:allow-other-keys)
230 (let ((geos (assoc-ref inputs "geos"))
231 (glibc (assoc-ref inputs ,(if (%current-target-system)
232 "cross-libc" "libc"))))
233 (substitute* "shapely/geos.py"
234 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
235 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
236 geos "/lib/libgeos_c.so'])"))
237 (("free = load_dll\\('c'\\)\\.free")
238 (string-append "free = load_dll('c', fallbacks=['"
239 glibc "/lib/libc.so.6']).free"))))
240 #t)))))
241 (home-page "https://github.com/Toblerity/Shapely")
242 (synopsis "Library for the manipulation and analysis of geometric objects")
243 (description "Shapely is a Python package for manipulation and analysis of
244 planar geometric objects. It is based on the @code{GEOS} library.")
245 (license license:bsd-3)))
246
247 (define-public python-shortuuid
248 (package
249 (name "python-shortuuid")
250 (version "0.5.0")
251 (source
252 (origin
253 (method url-fetch)
254 (uri (pypi-uri "shortuuid" version))
255 (sha256
256 (base32
257 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
258 (build-system python-build-system)
259 (native-inputs
260 `(("python-pep8" ,python-pep8)))
261 (home-page "https://github.com/skorokithakis/shortuuid")
262 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
263 (description
264 "@code{shortuuid} is a Python library for generating concise, unambiguous
265 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
266 module and then similar looking characters are removed.")
267 (license license:bsd-3)))
268
269 (define-public python-logwrap
270 (package
271 (name "python-logwrap")
272 (version "3.2.1")
273 (source
274 (origin
275 (method url-fetch)
276 (uri (pypi-uri "logwrap" version ".zip"))
277 (sha256
278 (base32
279 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
280 (build-system python-build-system)
281 (propagated-inputs
282 `(("python-six" ,python-six)
283 ("python-typing" ,python-typing)))
284 (native-inputs
285 `(("unzip" ,unzip)
286 ("python-cython" ,python-cython)
287 ("python-pytest" ,python-pytest)
288 ("python-pytest-cov" ,python-pytest-cov)
289 ("python-pytest-runner" ,python-pytest-runner)))
290 (home-page "https://github.com/penguinolog/logwrap")
291 (synopsis "Decorator for logging function arguments")
292 (description "This package provides a decorator to log function arguments
293 and function call return values in a human-readable way.")
294 (license license:asl2.0)))
295
296 (define-public python2-shapely
297 (package-with-python2 python-shapely))
298
299 (define-public python-clyent
300 (package
301 (name "python-clyent")
302 (version "1.2.1")
303 (source
304 (origin
305 (method url-fetch)
306 (uri (pypi-uri "clyent" version))
307 (sha256
308 (base32
309 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
310 (build-system python-build-system)
311 (native-inputs
312 `(("python-mock" ,python-mock)))
313 (home-page "https://github.com/binstar/clyent")
314 (synopsis "Command line client library")
315 (description "Clyent is a Python command line utiliy library. It is used
316 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
317 (license license:bsd-3)))
318
319 (define-public python2-clyent
320 (package-with-python2 python-clyent))
321
322 (define-public python-babel
323 (package
324 (name "python-babel")
325 (version "2.7.0")
326 (source
327 (origin
328 (method url-fetch)
329 (uri (pypi-uri "Babel" version))
330 (sha256
331 (base32
332 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
333 (build-system python-build-system)
334 (native-inputs
335 `(("python-freezegun" ,python-freezegun)
336 ("python-pytest" ,python-pytest)))
337 (propagated-inputs
338 `(("python-pytz" ,python-pytz)))
339 (arguments
340 `(#:phases (modify-phases %standard-phases
341 (replace 'check
342 (lambda _
343 (invoke "pytest" "-vv" "-k"
344 (string-append
345 ;; XXX: These tests fail when using Pytest 4.x and
346 ;; Babel 2.6.0. Try removing this for later versions.
347 "not test_no_inherit_metazone_marker_never_in_output"
348 " and not test_smoke_dates"
349 " and not test_smoke_numbers")))))))
350 (home-page "http://babel.pocoo.org/")
351 (synopsis
352 "Tools for internationalizing Python applications")
353 (description
354 "Babel is composed of two major parts:
355 - tools to build and work with gettext message catalogs
356 - a Python interface to the CLDR (Common Locale Data Repository), providing
357 access to various locale display names, localized number and date formatting,
358 etc. ")
359 (license license:bsd-3)))
360
361 (define-public python2-babel
362 (package-with-python2 python-babel))
363
364 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
365 (define-public python2-babel-2.6
366 (package
367 (inherit python2-babel)
368 (version "2.6.0")
369 (source (origin
370 (method url-fetch)
371 (uri (pypi-uri "Babel" version))
372 (sha256
373 (base32
374 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
375
376 (define-public python2-backport-ssl-match-hostname
377 (package
378 (name "python2-backport-ssl-match-hostname")
379 (version "3.5.0.1")
380 (source
381 (origin
382 (method url-fetch)
383 (uri (pypi-uri "backports.ssl_match_hostname" version))
384 (sha256
385 (base32
386 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
387 (build-system python-build-system)
388 (arguments
389 `(#:python ,python-2
390 #:tests? #f)) ; no test target
391 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
392 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
393 (description
394 "This backport brings the ssl.match_hostname() function to users of
395 earlier versions of Python. The function checks the hostname in the
396 certificate returned by the server to which a connection has been established,
397 and verifies that it matches the intended target hostname.")
398 (license license:psfl)))
399
400 (define-public python-boolean.py
401 (package
402 (name "python-boolean.py")
403 (version "3.6")
404 (source
405 (origin
406 ;; There's no source tarball on PyPI.
407 (method git-fetch)
408 (uri (git-reference
409 (url "https://github.com/bastikr/boolean.py")
410 (commit (string-append "v" version))))
411 (file-name (git-file-name name version))
412 (sha256
413 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
414 (build-system python-build-system)
415 (home-page "https://github.com/bastikr/boolean.py")
416 (synopsis "Boolean algebra in one Python module")
417 (description
418 "This is a small Python library that implements boolean algebra.
419 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
420 @code{Symbol} class that can take on one of these two values. Calculations
421 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
422 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
423 Expressions are constructed from parsed strings or directly in Python.")
424 (license license:bsd-2)))
425
426 (define-public python-hdf4
427 (package
428 (name "python-hdf4")
429 (version "0.9")
430 (source
431 (origin
432 (method url-fetch)
433 (uri (pypi-uri name version))
434 (sha256
435 (base32
436 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
437 (build-system python-build-system)
438 (native-inputs `(("nose" ,python-nose)))
439 (propagated-inputs `(("numpy" ,python-numpy)))
440 (inputs
441 `(("hdf4" ,hdf4)
442 ("libjpeg" ,libjpeg)
443 ("zlib" ,zlib)))
444 (arguments
445 `(#:phases
446 (modify-phases %standard-phases
447 (replace 'check
448 (lambda _
449 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
450 ;; on to import numpy. Somehow this works on their CI system.
451 ;; Let's just manage PYTHONPATH here instead.
452 (substitute* "runexamples.sh"
453 (("export PYTHONPATH=.*") ""))
454 (setenv "PYTHONPATH"
455 (string-append (getcwd) ":"
456 (getenv "PYTHONPATH")))
457 (invoke "./runexamples.sh")
458 (invoke "nosetests" "-v"))))))
459 (home-page "https://github.com/fhs/python-hdf4")
460 (synopsis "Python interface to the NCSA HDF4 library")
461 (description
462 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
463 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
464 NetCDF files can also be read and modified. Python-HDF4 is a fork of
465 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
466 (license license:expat)))
467
468 (define-public python2-hdf4
469 (package-with-python2 python-hdf4))
470
471 (define-public python-h5py
472 (package
473 (name "python-h5py")
474 (version "2.8.0")
475 (source
476 (origin
477 (method url-fetch)
478 (uri (pypi-uri "h5py" version))
479 (sha256
480 (base32
481 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
482 (build-system python-build-system)
483 (arguments
484 `(#:tests? #f ; no test target
485 #:phases
486 (modify-phases %standard-phases
487 (add-after 'unpack 'fix-hdf5-paths
488 (lambda* (#:key inputs #:allow-other-keys)
489 (let ((prefix (assoc-ref inputs "hdf5")))
490 (substitute* "setup_build.py"
491 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
492 (string-append "['" prefix "/lib" "']"))
493 (("'/opt/local/include', '/usr/local/include'")
494 (string-append "'" prefix "/include" "'")))
495 (substitute* "setup_configure.py"
496 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
497 (string-append "['" prefix "/lib" "']")))
498 #t))))))
499 (propagated-inputs
500 `(("python-six" ,python-six)
501 ("python-numpy" ,python-numpy)))
502 (inputs
503 `(("hdf5" ,hdf5)))
504 (native-inputs
505 `(("python-cython" ,python-cython)
506 ("python-pkgconfig" ,python-pkgconfig)))
507 (home-page "http://www.h5py.org/")
508 (synopsis "Read and write HDF5 files from Python")
509 (description
510 "The h5py package provides both a high- and low-level interface to the
511 HDF5 library from Python. The low-level interface is intended to be a
512 complete wrapping of the HDF5 API, while the high-level component supports
513 access to HDF5 files, datasets and groups using established Python and NumPy
514 concepts.")
515 (license license:bsd-3)))
516
517 (define-public python2-h5py
518 (package-with-python2 python-h5py))
519
520 (define-public python-sh
521 (package
522 (name "python-sh")
523 (version "1.12.14")
524 (source
525 (origin
526 (method url-fetch)
527 (uri (pypi-uri "sh" version))
528 (sha256
529 (base32
530 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
531 (build-system python-build-system)
532 (arguments
533 '(#:phases
534 (modify-phases %standard-phases
535 (replace 'check
536 (lambda _
537 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
538 (setenv "HOME" "/tmp")
539 (invoke "python" "sh.py" "test"))))))
540 (native-inputs
541 `(("python-coverage" ,python-coverage)))
542 (home-page "https://github.com/amoffat/sh")
543 (synopsis "Python subprocess replacement")
544 (description "This package provides a replacement for Python's
545 @code{subprocess} feature.")
546 (license license:expat)))
547
548 (define-public python2-sh
549 (package-with-python2 python-sh))
550
551 (define-public python-cftime
552 (package
553 (name "python-cftime")
554 (version "1.0.4.2")
555 (source
556 (origin
557 (method url-fetch)
558 (uri (pypi-uri "cftime" version))
559 (sha256
560 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
561 (build-system python-build-system)
562 (propagated-inputs
563 `(("python-numpy" ,python-numpy)))
564 (native-inputs
565 `(("python-coveralls" ,python-coveralls)
566 ("python-cython" ,python-cython)
567 ("python-pytest-cov" ,python-pytest-cov)))
568 (home-page "https://github.com/Unidata/cftime")
569 (synopsis "Library for time handling")
570 (description
571 "This package provides time-handling functionality that used to be part
572 of the netcdf4 package before.")
573 ;; This package claims to include code under the GPLv3 but is released
574 ;; under ISC.
575 (license (list license:isc license:gpl3+))))
576
577 (define-public python-netcdf4
578 (package
579 (name "python-netcdf4")
580 (version "1.4.2")
581 (source
582 (origin
583 (method url-fetch)
584 (uri (pypi-uri "netCDF4" version))
585 (sha256
586 (base32
587 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
588 (build-system python-build-system)
589 (arguments
590 '(#:phases
591 (modify-phases %standard-phases
592 (add-after 'unpack 'configure-locations
593 (lambda* (#:key inputs #:allow-other-keys)
594 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
595 #t)))))
596 (native-inputs
597 `(("python-cython" ,python-cython)))
598 (propagated-inputs
599 `(("python-numpy" ,python-numpy)
600 ("python-cftime" ,python-cftime)))
601 (inputs
602 `(("netcdf" ,netcdf)
603 ("hdf4" ,hdf4)
604 ("hdf5" ,hdf5)))
605 (home-page "https://github.com/Unidata/netcdf4-python")
606 (synopsis "Python/numpy interface to the netCDF library")
607 (description "Netcdf4-python is a Python interface to the netCDF C
608 library. netCDF version 4 has many features not found in earlier
609 versions of the library and is implemented on top of HDF5. This module
610 can read and write files in both the new netCDF 4 and the old netCDF 3
611 format, and can create files that are readable by HDF5 clients. The
612 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
613 to users of that module.")
614 ;; The software is mainly ISC, but includes some files covered
615 ;; by the Expat license.
616 (license (list license:isc license:expat))))
617
618 (define-public python2-netcdf4
619 (package-with-python2 python-netcdf4))
620
621 (define-public python-license-expression
622 (package
623 (name "python-license-expression")
624 (version "0.999")
625 (source
626 (origin
627 (method url-fetch)
628 (uri (pypi-uri "license-expression" version))
629 (sha256
630 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
631 (build-system python-build-system)
632 (propagated-inputs
633 `(("python-boolean.py" ,python-boolean.py)))
634 (home-page "https://github.com/nexB/license-expression")
635 (synopsis "Apply boolean logic to license expressions")
636 (description
637 "This Python module defines a tiny language to evaluate and compare
638 license expressions using boolean logic. Logical combinations of licenses can
639 be tested for equality, containment, and equivalence. They can be normalised
640 and simplified. It supports SPDX license expressions as well as other naming
641 conventions and aliases in the same expression.")
642 (license license:gpl2+)))
643
644 (define-public python-lockfile
645 (package
646 (name "python-lockfile")
647 (version "0.12.2")
648 (source
649 (origin
650 (method url-fetch)
651 (uri (pypi-uri "lockfile" version))
652 (sha256
653 (base32
654 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
655 (build-system python-build-system)
656 (arguments '(#:test-target "check"))
657 (native-inputs
658 `(("python-pbr" ,python-pbr)))
659 (home-page "https://launchpad.net/pylockfile")
660 (synopsis "Platform-independent file locking module")
661 (description
662 "The lockfile package exports a LockFile class which provides a simple
663 API for locking files.")
664 (license license:expat)))
665
666 (define-public python2-lockfile
667 (package-with-python2 python-lockfile))
668
669 (define-public python-semantic-version
670 (package
671 (name "python-semantic-version")
672 (version "2.6.0")
673 (source
674 (origin
675 (method url-fetch)
676 (uri (pypi-uri "semantic_version" version))
677 (sha256
678 (base32
679 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
680 (build-system python-build-system)
681 (arguments
682 `(#:tests? #f)) ; PyPI tarball lacks tests
683 (home-page "https://github.com/rbarrois/python-semanticversion")
684 (synopsis "Semantic versioning module for Python")
685 (description
686 "The @code{semantic_version} class is a small library for handling
687 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
688
689 It can compare versions, generate a new version that represents a bump in one of
690 the version levels, and check whether any given string is a proper semantic
691 version identifier.")
692 (license license:bsd-3)))
693
694 (define-public python2-semantic-version
695 (package-with-python2 python-semantic-version))
696
697 (define-public python-serpent
698 (package
699 (name "python-serpent")
700 (version "1.28")
701 (source
702 (origin
703 (method url-fetch)
704 (uri (pypi-uri "serpent" version))
705 (sha256
706 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
707 (build-system python-build-system)
708 (native-inputs
709 `(("python-attrs" ,python-attrs)
710 ("python-pytz" ,python-pytz)))
711 (home-page "https://github.com/irmen/Serpent")
712 (synopsis "Serializer for literal Python expressions")
713 (description
714 "Serpent provides @code{ast.literal_eval()}-compatible object tree
715 serialization. It serializes an object tree into bytes (an utf-8 encoded
716 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
717 to rebuild the original object tree.
718
719 Because only safe literals are encoded, it is safe to send serpent data to
720 other machines, such as over the network.")
721 (license license:expat)))
722
723 (define-public python-setuptools
724 (package
725 (name "python-setuptools")
726 (version "41.0.1")
727 (source
728 (origin
729 (method url-fetch)
730 (uri (pypi-uri "setuptools" version ".zip"))
731 (sha256
732 (base32
733 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
734 (modules '((guix build utils)))
735 (snippet
736 '(begin
737 ;; Remove included binaries which are used to build self-extracting
738 ;; installers for Windows.
739 ;; TODO: Find some way to build them ourself so we can include them.
740 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
741 #t))))
742 (build-system python-build-system)
743 ;; FIXME: Tests require pytest, which itself relies on setuptools.
744 ;; One could bootstrap with an internal untested setuptools.
745 (arguments
746 `(#:tests? #f))
747 (home-page "https://pypi.python.org/pypi/setuptools")
748 (synopsis
749 "Library designed to facilitate packaging Python projects")
750 (description
751 "Setuptools is a fully-featured, stable library designed to facilitate
752 packaging Python projects, where packaging includes:
753 Python package and module definitions,
754 distribution package metadata,
755 test hooks,
756 project installation,
757 platform-specific details,
758 Python 3 support.")
759 ;; TODO: setuptools now bundles the following libraries:
760 ;; packaging, pyparsing, six and appdirs. How to unbundle?
761 (license (list license:psfl ; setuptools itself
762 license:expat ; six, appdirs, pyparsing
763 license:asl2.0 ; packaging is dual ASL2/BSD-2
764 license:bsd-2))))
765
766 (define-public python2-setuptools
767 (package-with-python2 python-setuptools))
768
769 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
770 (define-public python-setuptools-for-tensorflow
771 (hidden-package
772 (package
773 (inherit python-setuptools)
774 (version "39.1.0")
775 (source (origin
776 (inherit (package-source python-setuptools))
777 (uri (pypi-uri "setuptools" version ".zip"))
778 (sha256
779 (base32
780 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
781
782 (define-public python-uniseg
783 (package
784 (name "python-uniseg")
785 (version "0.7.1")
786 (source
787 (origin
788 (method url-fetch)
789 (uri (pypi-uri "uniseg" version ".zip"))
790 (sha256
791 (base32
792 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
793 (build-system python-build-system)
794 (arguments
795 '(#:tests? #f)) ; The test suite requires network access.
796 (native-inputs
797 `(("unzip" ,unzip)))
798 (home-page
799 "https://bitbucket.org/emptypage/uniseg-python")
800 (synopsis
801 "Python library to determine Unicode text segmentations")
802 (description
803 "Uniseg is a Python package used to determine Unicode text segmentations.
804 Supported segmentations include:
805 @enumerate
806 @item @dfn{Code point} (any value in the Unicode codespace)
807 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
808 multiple Unicode code points, e.g. \"G\" + acute-accent)
809 @item Word break
810 @item Sentence break
811 @item Line break
812 @end enumerate")
813 (license license:expat)))
814
815 (define-public python2-uniseg
816 (package-with-python2 python-uniseg))
817
818 (define-public python-humanfriendly
819 (package
820 (name "python-humanfriendly")
821 (version "4.4.1")
822 (source
823 (origin
824 (method url-fetch)
825 (uri (pypi-uri "humanfriendly" version))
826 (sha256
827 (base32
828 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
829 (build-system python-build-system)
830 (arguments
831 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
832 #:tests? #f))
833 (propagated-inputs
834 `(("python-monotonic" ,python-monotonic)))
835 (home-page "https://humanfriendly.readthedocs.io")
836 (synopsis "Human-friendly input and output in Python")
837 (description
838 "The functions and classes in @code{humanfriendly} can be used to make
839 text interfaces more user-friendly. It includes tools to parse and format
840 numbers, file sizes, and timespans, timers for long-running operations, menus
841 to allow the user to choose from a list of options, and terminal interaction
842 helpers.")
843 (license license:expat)))
844
845 (define-public python2-humanfriendly
846 (package-with-python2 python-humanfriendly))
847
848 (define-public python-capturer
849 (package
850 (name "python-capturer")
851 (version "2.4")
852 (source
853 (origin
854 (method url-fetch)
855 (uri (pypi-uri "capturer" version))
856 (sha256
857 (base32
858 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
859 (build-system python-build-system)
860 (arguments
861 `(#:tests? #f))
862 (propagated-inputs
863 `(("python-humanfriendly" ,python-humanfriendly)))
864 (home-page "https://capturer.readthedocs.io")
865 (synopsis "Capture stdout and stderr streams of the current process")
866 (description
867 "The capturer package makes it easy to capture the stdout and stderr
868 streams of the current process and subprocesses. Output can be relayed
869 to the terminal in real time but is also available to the Python program
870 for additional processing.")
871 (license license:expat)))
872
873 (define-public python2-capturer
874 (package-with-python2 python-capturer))
875
876 (define-public python-case
877 (package
878 (name "python-case")
879 (version "1.5.3")
880 (source
881 (origin
882 (method url-fetch)
883 (uri (pypi-uri "case" version))
884 (sha256
885 (base32
886 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
887 (build-system python-build-system)
888 (propagated-inputs
889 `(("python-mock" ,python-mock)
890 ("python-nose" ,python-nose)
891 ("python-six" ,python-six)
892 ("python-unittest2" ,python-unittest2)))
893 (native-inputs
894 `(("python-coverage" ,python-coverage)))
895 (home-page "https://github.com/celery/case")
896 (synopsis "Unittest utilities and convenience methods")
897 (description
898 "The @code{case} package provides utilities on top of unittest, including
899 some helpful Python 2 compatibility convenience methods.")
900 (license license:bsd-3)))
901
902 (define-public python-verboselogs
903 (package
904 (name "python-verboselogs")
905 (version "1.7")
906 (source
907 (origin
908 (method url-fetch)
909 (uri (pypi-uri "verboselogs" version))
910 (sha256
911 (base32
912 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
913 (build-system python-build-system)
914 (arguments
915 `(#:phases
916 (modify-phases %standard-phases
917 (replace 'check
918 (lambda _
919 ;; Do not run pylint plugin test, as astroid is an old
920 ;; unsupported version.
921 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
922 "verboselogs/tests.py"))))))
923 (native-inputs
924 `(("python-mock" ,python-mock)
925 ("python-pytest" ,python-pytest)))
926 (home-page "https://verboselogs.readthedocs.io")
927 (synopsis "Verbose logging level for Python's logging module")
928 (description
929 "The @code{verboselogs} package extends Python's @code{logging} module to
930 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
931 (license license:expat)))
932
933 (define-public python2-verboselogs
934 (package-with-python2 python-verboselogs))
935
936 (define-public python-coloredlogs
937 (package
938 (name "python-coloredlogs")
939 (version "10.0")
940 (source
941 (origin
942 (method url-fetch)
943 (uri (pypi-uri "coloredlogs" version))
944 (sha256
945 (base32
946 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
947 (build-system python-build-system)
948 (arguments
949 `(;Tests require some updated modules
950 #:tests? #f))
951 (propagated-inputs
952 `(("python-capturer" ,python-capturer)))
953 (home-page "https://coloredlogs.readthedocs.io")
954 (synopsis "Colored stream handler for Python's logging module")
955 (description
956 "The @code{coloredlogs} package enables colored terminal output for
957 Python's logging module. The @code{ColoredFormatter} class inherits from
958 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
959 messages in color.")
960 (license license:expat)))
961
962 (define-public python2-coloredlogs
963 (package-with-python2 python-coloredlogs))
964
965 (define-public python-editorconfig
966 (package
967 (name "python-editorconfig")
968 (version "0.12.2")
969 (source
970 (origin
971 (method url-fetch)
972 (uri (pypi-uri "EditorConfig" version))
973 (sha256
974 (base32
975 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
976 (build-system python-build-system)
977 (home-page "https://editorconfig.org/")
978 (synopsis "EditorConfig bindings for python")
979 (description "The EditorConfig project consists of a file format for
980 defining coding styles and a collection of text editor plugins that enable
981 editors to read the file format and adhere to defined styles. EditorConfig
982 files are easily readable and they work nicely with version control systems.")
983 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
984 (license (list license:bsd-2 license:psfl))))
985
986 (define-public python-et-xmlfile
987 (package
988 (name "python-et-xmlfile")
989 (version "1.0.1")
990 (source
991 (origin
992 (method url-fetch)
993 (uri (pypi-uri "et_xmlfile" version))
994 (sha256
995 (base32
996 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
997 (build-system python-build-system)
998 (arguments
999 `(#:phases (modify-phases %standard-phases
1000 (replace 'check
1001 (lambda _
1002 (invoke "pytest"))))))
1003 (native-inputs
1004 `(("python-pytest" ,python-pytest)
1005 ("python-lxml" ,python-lxml))) ;used for the tests
1006 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1007 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1008 (description "This Python library is based upon the @code{xmlfile} module
1009 from @code{lxml}. It aims to provide a low memory, compatible implementation
1010 of @code{xmlfile}.")
1011 (license license:expat)))
1012
1013 (define-public python2-et-xmlfile
1014 (package-with-python2 python-et-xmlfile))
1015
1016 (define-public python-openpyxl
1017 (package
1018 (name "python-openpyxl")
1019 (version "2.6.2")
1020 (source
1021 (origin
1022 ;; We use the upstream repository, as the tests are not included in the
1023 ;; PyPI releases.
1024 (method hg-fetch)
1025 (uri (hg-reference
1026 (url "https://bitbucket.org/openpyxl/openpyxl")
1027 (changeset version)))
1028 (file-name (string-append name "-" version "-checkout"))
1029 (sha256
1030 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1031 (build-system python-build-system)
1032 (arguments
1033 `(#:phases (modify-phases %standard-phases
1034 (replace 'check
1035 (lambda _
1036 (invoke "pytest"))))))
1037 (native-inputs
1038 ;; For the test suite.
1039 `(("python-lxml" ,python-lxml)
1040 ("python-pillow" ,python-pillow)
1041 ("python-pytest" ,python-pytest)))
1042 (propagated-inputs
1043 `(("python-et-xmlfile" ,python-et-xmlfile)
1044 ("python-jdcal" ,python-jdcal)))
1045 (home-page "https://openpyxl.readthedocs.io")
1046 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1047 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1048 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1049 standard.")
1050 (license license:expat)))
1051
1052 (define-public python-eventlet
1053 (package
1054 (name "python-eventlet")
1055 (version "0.25.1")
1056 (source
1057 (origin
1058 (method url-fetch)
1059 (uri (pypi-uri "eventlet" version))
1060 (sha256
1061 (base32
1062 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1063 (build-system python-build-system)
1064 (propagated-inputs
1065 `(("python-greenlet" ,python-greenlet)))
1066 (arguments
1067 ;; TODO: Requires unpackaged 'enum-compat'.
1068 '(#:tests? #f))
1069 (home-page "https://eventlet.net")
1070 (synopsis "Concurrent networking library for Python")
1071 (description
1072 "Eventlet is a concurrent networking library for Python that
1073 allows you to change how you run your code, not how you write it.
1074 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1075 Coroutines ensure that the developer uses a blocking style of programming
1076 that is similar to threading, but provide the benefits of non-blocking I/O.
1077 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1078 from the Python interpreter, or as a small part of a larger application.")
1079 (license license:expat)))
1080
1081 (define-public python2-eventlet
1082 (let ((base (package-with-python2
1083 (strip-python2-variant python-eventlet))))
1084 (package (inherit base)
1085 (propagated-inputs
1086 `(("python2-enum34" ,python2-enum34)
1087 ,@(package-propagated-inputs base))))))
1088
1089 (define-public python-six
1090 (package
1091 (name "python-six")
1092 (version "1.12.0")
1093 (source
1094 (origin
1095 (method url-fetch)
1096 (uri (pypi-uri "six" version))
1097 (sha256
1098 (base32
1099 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1100 (build-system python-build-system)
1101 (arguments
1102 `(#:phases
1103 (modify-phases %standard-phases
1104 (replace 'check
1105 (lambda _
1106 (invoke "py.test" "-v"))))))
1107 (native-inputs
1108 `(("python-py" ,python-py)
1109 ("python-pytest" ,python-pytest-bootstrap)))
1110 (home-page "https://pypi.python.org/pypi/six/")
1111 (synopsis "Python 2 and 3 compatibility utilities")
1112 (description
1113 "Six is a Python 2 and 3 compatibility library. It provides utility
1114 functions for smoothing over the differences between the Python versions with
1115 the goal of writing Python code that is compatible on both Python versions.
1116 Six supports every Python version since 2.5. It is contained in only one
1117 Python file, so it can be easily copied into your project.")
1118 (license license:x11)))
1119
1120 (define-public python2-six
1121 (package-with-python2 python-six))
1122
1123 (define-public python-six-bootstrap
1124 (package
1125 (inherit python-six)
1126 (name "python-six-bootstrap")
1127 (native-inputs `())
1128 (arguments `(#:tests? #f))))
1129
1130 (define-public python2-six-bootstrap
1131 (package-with-python2 python-six-bootstrap))
1132
1133 (define-public python-schedule
1134 (package
1135 (name "python-schedule")
1136 (version "0.4.3")
1137 (source
1138 (origin
1139 (method url-fetch)
1140 (uri (pypi-uri "schedule" version))
1141 (sha256
1142 (base32
1143 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1144 (build-system python-build-system)
1145 (native-inputs
1146 `(("python-pytest" ,python-pytest)
1147 ("python-mock" ,python-mock)))
1148 (home-page "https://github.com/dbader/schedule")
1149 (synopsis "Schedule periodic function calls in Python")
1150 (description
1151 "Schedule is an in-process scheduler for periodic jobs that uses the
1152 builder pattern for configuration. Schedule lets you run Python functions (or
1153 any other callable) periodically at pre-determined intervals using a simple,
1154 human-friendly syntax.")
1155 (license license:expat)))
1156
1157 (define-public python2-schedule
1158 (package-with-python2 python-schedule))
1159
1160 (define-public python2-mechanize
1161 (package
1162 (name "python2-mechanize")
1163 (version "0.2.5")
1164 (source
1165 (origin
1166 (method url-fetch)
1167 (uri (pypi-uri "mechanize" version))
1168 (sha256
1169 (base32
1170 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1171 (build-system python-build-system)
1172 (arguments
1173 `(#:python ,python-2 ; apparently incompatible with Python 3
1174 #:tests? #f))
1175 ;; test fails with message
1176 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1177 ;; (python-3.3.2) or
1178 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1179 ;; (python-2.7.5).
1180 ;; The source code is from March 2011 and probably not up-to-date
1181 ;; with respect to python unit tests.
1182 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1183 (synopsis
1184 "Stateful programmatic web browsing in Python")
1185 (description
1186 "Mechanize implements stateful programmatic web browsing in Python,
1187 after Andy Lester’s Perl module WWW::Mechanize.")
1188 (license (license:non-copyleft
1189 "file://COPYING"
1190 "See COPYING in the distribution."))))
1191
1192
1193 (define-public python-simplejson
1194 (package
1195 (name "python-simplejson")
1196 (version "3.14.0")
1197 (source
1198 (origin
1199 (method url-fetch)
1200 (uri (pypi-uri "simplejson" version))
1201 (sha256
1202 (base32
1203 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1204 (build-system python-build-system)
1205 (home-page "http://simplejson.readthedocs.org/en/latest/")
1206 (synopsis
1207 "Json library for Python")
1208 (description
1209 "JSON (JavaScript Object Notation) is a subset of JavaScript
1210 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1211 format.
1212
1213 Simplejson exposes an API familiar to users of the standard library marshal
1214 and pickle modules. It is the externally maintained version of the json
1215 library contained in Python 2.6, but maintains compatibility with Python 2.5
1216 and (currently) has significant performance advantages, even without using
1217 the optional C extension for speedups. Simplejson is also supported on
1218 Python 3.3+.")
1219 (license license:x11)))
1220
1221 (define-public python2-simplejson
1222 (package-with-python2 python-simplejson))
1223
1224
1225 (define-public python-pyicu
1226 (package
1227 (name "python-pyicu")
1228 (version "2.3.1")
1229 (source
1230 (origin
1231 (method url-fetch)
1232 (uri (pypi-uri "PyICU" version))
1233 (sha256
1234 (base32
1235 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1236 (build-system python-build-system)
1237 (inputs
1238 `(("icu4c" ,icu4c)))
1239 (native-inputs
1240 `(("python-pytest" ,python-pytest)
1241 ("python-six" ,python-six)))
1242 (home-page "https://github.com/ovalhub/pyicu")
1243 (synopsis "Python extension wrapping the ICU C++ API")
1244 (description
1245 "PyICU is a python extension wrapping the ICU C++ API.")
1246 (properties `((python2-variant . ,(delay python2-pyicu))))
1247 (license license:x11)))
1248
1249 (define-public python2-pyicu
1250 (let ((base (package-with-python2
1251 (strip-python2-variant python-pyicu))))
1252 (package
1253 (inherit base)
1254 (arguments
1255 `(,@(package-arguments base)
1256 #:phases
1257 (modify-phases %standard-phases
1258 (add-before 'check 'delete-failing-test
1259 (λ _
1260 ;; XXX: This fails due to Unicode issues unique to Python 2,
1261 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1262 (delete-file "test/test_Script.py")
1263 #t))))))))
1264
1265 (define-public python2-dogtail
1266 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1267 ;; spaces in indentation" with Python 3.
1268 (package
1269 (name "python2-dogtail")
1270 (version "0.9.9")
1271 (source (origin
1272 (method url-fetch)
1273 (uri (pypi-uri "dogtail" version))
1274 (sha256
1275 (base32
1276 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1277 (build-system python-build-system)
1278 (arguments `(#:python ,python-2
1279 #:tests? #f)) ; invalid command "test"
1280 ;; Currently no offical homepage.
1281 (home-page "https://pypi.python.org/pypi/dogtail/")
1282 (synopsis "GUI test tool and automation framework written in Python")
1283 (description
1284 "Dogtail is a GUI test tool and automation framework written in Python.
1285 It uses Accessibility (a11y) technologies to communicate with desktop
1286 applications. dogtail scripts are written in Python and executed like any
1287 other Python program.")
1288 (license license:gpl2+)))
1289
1290 (define-public python-empy
1291 (package
1292 (name "python-empy")
1293 (version "3.3.3")
1294 (source (origin
1295 (method url-fetch)
1296 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1297 version ".tar.gz"))
1298 (sha256
1299 (base32
1300 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1301 (build-system python-build-system)
1302 (arguments
1303 `(#:tests? #f)) ; python2 only
1304 (home-page "http://www.alcyone.com/software/empy/")
1305 (synopsis "Templating system for Python")
1306 (description
1307 "EmPy is a system for embedding Python expressions and statements in
1308 template text; it takes an EmPy source file, processes it, and produces
1309 output. This is accomplished via expansions, which are special signals to the
1310 EmPy system and are set off by a special prefix (by default the at sign, @@).
1311 EmPy can expand arbitrary Python expressions and statements in this way, as
1312 well as a variety of special forms. Textual data not explicitly delimited in
1313 this way is sent unaffected to the output, allowing Python to be used in
1314 effect as a markup language. Also supported are callbacks via hooks,
1315 recording and playback via diversions, and dynamic, chainable filters. The
1316 system is highly configurable via command line options and embedded
1317 commands.")
1318 (license license:lgpl2.1+)))
1319
1320 (define-public python2-empy
1321 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1322 (package
1323 (inherit base)
1324 (arguments `(,@(package-arguments base)
1325 #:tests? #t)))))
1326
1327 (define-public python2-element-tree
1328 (package
1329 (name "python2-element-tree")
1330 (version "1.2.6")
1331 (source (origin
1332 (method url-fetch)
1333 (uri (string-append
1334 "http://effbot.org/media/downloads/elementtree-"
1335 version "-20050316.tar.gz"))
1336 (sha256
1337 (base32
1338 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1339 (build-system python-build-system)
1340 (arguments
1341 `(#:python ,python-2 ; seems to be part of Python 3
1342 #:tests? #f)) ; no 'test' sub-command
1343 (synopsis "Toolkit for XML processing in Python")
1344 (description
1345 "ElementTree is a Python library supporting lightweight XML processing.")
1346 (home-page "http://effbot.org/zone/element-index.htm")
1347 (license (license:x11-style
1348 "http://docs.python.org/2/license.html"
1349 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1350
1351 (define-public python2-pybugz
1352 (package
1353 (name "python2-pybugz")
1354 (version "0.6.11")
1355 (source (origin
1356 (method url-fetch)
1357 (uri (string-append
1358 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1359 version ".tar.gz"))
1360 (sha256
1361 (base32
1362 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1363 (patches (search-patches "pybugz-stty.patch"
1364 "pybugz-encode-error.patch"))))
1365 (build-system python-build-system)
1366 (arguments
1367 `(#:python ,python-2 ; SyntaxError with Python 3
1368 #:tests? #f)) ; no 'test' sub-command
1369 (propagated-inputs
1370 `(("element-tree" ,python2-element-tree)))
1371 (synopsis "Python and command-line interface to Bugzilla")
1372 (description
1373 "PyBugz is a Python library and command-line tool to query the Bugzilla
1374 bug tracking system. It is meant as an aid to speed up interaction with the
1375 bug tracker.")
1376 (home-page "http://www.liquidx.net/pybugz/")
1377 (license license:gpl2)))
1378
1379 (define-public python2-enum
1380 (package
1381 (name "python2-enum")
1382 (version "0.4.6")
1383 (source (origin
1384 (method url-fetch)
1385 (uri (pypi-uri "enum" version))
1386 (sha256
1387 (base32
1388 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1389 (build-system python-build-system)
1390 (arguments
1391 `(#:python ,python-2))
1392 (home-page "http://pypi.python.org/pypi/enum/")
1393 (synopsis "Robust enumerated type support in Python")
1394 (description
1395 "This provides a module for robust enumerations in Python. It has
1396 been superseded by the Python standard library and is provided only for
1397 compatibility.")
1398 ;; Choice of either license.
1399 (license (list license:gpl3+ license:psfl))))
1400
1401 (define-public python-enum34
1402 (package
1403 (name "python-enum34")
1404 (version "1.1.6")
1405 (source
1406 (origin
1407 (method url-fetch)
1408 (uri (pypi-uri "enum34" version))
1409 (sha256
1410 (base32
1411 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1412 (build-system python-build-system)
1413 (home-page "https://pypi.python.org/pypi/enum34")
1414 (synopsis "Backported Python 3.4 Enum")
1415 (description
1416 "Enum34 is the new Python stdlib enum module available in Python 3.4
1417 backported for previous versions of Python from 2.4 to 3.3.")
1418 (license license:bsd-3)))
1419
1420 (define-public python2-enum34
1421 (package-with-python2 python-enum34))
1422
1423 (define-public python-parse-type
1424 (package
1425 (name "python-parse-type")
1426 (version "0.4.2")
1427 (source
1428 (origin
1429 (method url-fetch)
1430 (uri (pypi-uri "parse_type" version))
1431 (sha256
1432 (base32
1433 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1434 (build-system python-build-system)
1435 (propagated-inputs
1436 `(("python-six" ,python-six)
1437 ("python-parse" ,python-parse)))
1438 (native-inputs
1439 `(("python-pytest" ,python-pytest)
1440 ("python-pytest-runner" ,python-pytest-runner)))
1441 (home-page "https://github.com/jenisys/parse_type")
1442 (synopsis "Extended parse module")
1443 (description
1444 "Parse_type extends the python parse module.")
1445 (properties
1446 `((python2-variant . ,(delay python2-parse-type))))
1447 (license license:bsd-3)))
1448
1449 (define-public python2-parse-type
1450 (let ((base (package-with-python2
1451 (strip-python2-variant python-parse-type))))
1452 (package (inherit base)
1453 (propagated-inputs
1454 `(("python2-enum34" ,python2-enum34)
1455 ,@(package-propagated-inputs base))))))
1456
1457 (define-public python-parse
1458 (package
1459 (name "python-parse")
1460 (version "1.8.4")
1461 (source
1462 (origin
1463 (method url-fetch)
1464 (uri (pypi-uri "parse" version))
1465 (sha256
1466 (base32
1467 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1468 (build-system python-build-system)
1469 (arguments
1470 `(#:phases
1471 (modify-phases %standard-phases
1472 (replace 'check
1473 (lambda _ (invoke "python" "test_parse.py"))))))
1474 (home-page "https://github.com/r1chardj0n3s/parse")
1475 (synopsis "Parse strings")
1476 (description
1477 "Parse strings using a specification based on the Python @code{format()}
1478 syntax.")
1479 (license license:x11)))
1480
1481 (define-public python-polib
1482 (package
1483 (name "python-polib")
1484 (version "1.0.8")
1485 (source (origin
1486 (method url-fetch)
1487 (uri (pypi-uri "polib" version))
1488 (sha256
1489 (base32
1490 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1491 (build-system python-build-system)
1492 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1493 (synopsis "Manipulate, create and modify gettext files")
1494 (description "Polib can manipulate any gettext format (po, pot and mo)
1495 files. It can be used to create po files from scratch or to modify
1496 existing ones.")
1497 (license license:expat)))
1498
1499 (define-public python2-polib
1500 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1501 (package
1502 (inherit base)
1503 (arguments `(,@(package-arguments base)
1504 ;; Tests don't work with python2.
1505 #:tests? #f)))))
1506
1507 (define-public python-poyo
1508 (package
1509 (name "python-poyo")
1510 (version "0.5.0")
1511 (source
1512 (origin
1513 (method url-fetch)
1514 (uri (pypi-uri "poyo" version))
1515 (sha256
1516 (base32
1517 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1518 (build-system python-build-system)
1519 (home-page "https://github.com/hackebrot/poyo")
1520 (synopsis "Lightweight YAML Parser for Python")
1521 (description
1522 "This package provides a lightweight YAML Parser for Python. It supports
1523 only a chosen subset of the YAML format that is required to parse cookiecutter
1524 user configuration files. It does not have support for serializing into YAML
1525 and is not compatible with JSON.")
1526 (license license:expat)))
1527
1528 (define-public scons
1529 (package
1530 (name "scons")
1531 (version "3.0.4")
1532 (source (origin
1533 (method git-fetch)
1534 (uri (git-reference
1535 (url "https://github.com/SCons/scons.git")
1536 (commit version)))
1537 (file-name (git-file-name name version))
1538 (sha256
1539 (base32
1540 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1541 (build-system python-build-system)
1542 (arguments
1543 `(#:use-setuptools? #f ; still relies on distutils
1544 #:tests? #f ; no 'python setup.py test' command
1545 #:phases
1546 (modify-phases %standard-phases
1547 (add-before 'build 'bootstrap
1548 (lambda _
1549 (substitute* "src/engine/SCons/compat/__init__.py"
1550 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1551 "sys.modules[new] = __import__(old)"))
1552 (substitute* "src/engine/SCons/Platform/__init__.py"
1553 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1554 "mod = __import__(full_name)"))
1555 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1556 (chdir "build/scons")
1557 #t)))))
1558 (home-page "http://scons.org/")
1559 (synopsis "Software construction tool written in Python")
1560 (description
1561 "SCons is a software construction tool. Think of SCons as an improved,
1562 cross-platform substitute for the classic Make utility with integrated
1563 functionality similar to autoconf/automake and compiler caches such as ccache.
1564 In short, SCons is an easier, more reliable and faster way to build
1565 software.")
1566 (license license:x11)))
1567
1568 (define-public scons-python2
1569 (package
1570 (inherit (package-with-python2 scons))
1571 (name "scons-python2")))
1572
1573 (define-public python-extras
1574 (package
1575 (name "python-extras")
1576 (version "1.0.0")
1577 (source
1578 (origin
1579 (method url-fetch)
1580 (uri (pypi-uri "extras" version))
1581 (sha256
1582 (base32
1583 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1584 (build-system python-build-system)
1585 (arguments
1586 ;; FIXME: Circular dependency on testtools.
1587 '(#:tests? #f))
1588 (home-page "https://github.com/testing-cabal/extras")
1589 (synopsis "Useful extensions to the Python standard library")
1590 (description
1591 "Extras is a set of extensions to the Python standard library.")
1592 (license license:expat)))
1593
1594 (define-public python2-extras
1595 (package-with-python2 python-extras))
1596
1597 (define-public python-mimeparse
1598 (package
1599 (name "python-mimeparse")
1600 (version "1.6.0")
1601 (source
1602 (origin
1603 (method url-fetch)
1604 (uri (pypi-uri "python-mimeparse" version))
1605 (sha256
1606 (base32
1607 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1608 (build-system python-build-system)
1609 (arguments
1610 '(#:phases
1611 (modify-phases %standard-phases
1612 (replace 'check
1613 (lambda _
1614 (invoke "./mimeparse_test.py"))))))
1615 (home-page
1616 "https://github.com/dbtsai/python-mimeparse")
1617 (synopsis "Python library for parsing MIME types")
1618 (description
1619 "Mimeparse provides basic functions for parsing MIME type names and
1620 matching them against a list of media-ranges.")
1621 (license license:expat)))
1622
1623 (define-public python2-mimeparse
1624 (package-with-python2 python-mimeparse))
1625
1626 (define-public python-miniboa
1627 (package
1628 (name "python-miniboa")
1629 (version "1.0.7")
1630 (source
1631 (origin
1632 (method url-fetch)
1633 (uri (pypi-uri "miniboa" version))
1634 (sha256
1635 (base32
1636 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1637 (build-system python-build-system)
1638 (home-page "https://github.com/shmup/miniboa")
1639 (synopsis "Simple, single-threaded Telnet server")
1640 (description
1641 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1642 server.")
1643 (license license:asl2.0)))
1644
1645 (define-public python2-miniboa
1646 (package-with-python2 python-miniboa))
1647
1648 (define-public python-pafy
1649 (package
1650 (name "python-pafy")
1651 (version "0.5.3.1")
1652 (source
1653 (origin
1654 (method url-fetch)
1655 (uri (pypi-uri "pafy" version))
1656 (sha256
1657 (base32
1658 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1659 (build-system python-build-system)
1660 (arguments
1661 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1662 (propagated-inputs
1663 ;; Youtube-dl is a python package which is imported in the file
1664 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1665 `(("youtube-dl" ,youtube-dl)))
1666 (home-page "https://np1.github.io/pafy/")
1667 (synopsis "Retrieve YouTube content and metadata")
1668 (description
1669 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1670 (license license:lgpl3+)))
1671
1672 (define-public python2-funcsigs
1673 (package
1674 (name "python2-funcsigs")
1675 (version "1.0.2")
1676 (source (origin
1677 (method url-fetch)
1678 (uri (pypi-uri "funcsigs" version))
1679 (sha256
1680 (base32
1681 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1682 (build-system python-build-system)
1683 (arguments
1684 `(#:python ,python-2))
1685 (native-inputs
1686 `(("python2-unittest2" ,python2-unittest2)))
1687 (home-page "http://funcsigs.readthedocs.org")
1688 (synopsis "Python function signatures from PEP362")
1689 (description
1690 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1691 (license license:asl2.0)))
1692
1693 (define-public python2-funcsigs-bootstrap
1694 (package
1695 (inherit python2-funcsigs)
1696 (name "python2-funcsigs-bootstrap")
1697 (native-inputs `())
1698 (arguments
1699 `(#:tests? #f
1700 ,@(package-arguments python2-funcsigs)))))
1701
1702 (define-public python-py
1703 (package
1704 (name "python-py")
1705 (version "1.8.0")
1706 (source
1707 (origin
1708 (method url-fetch)
1709 (uri (pypi-uri "py" version))
1710 (sha256
1711 (base32
1712 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1713 (build-system python-build-system)
1714 (arguments
1715 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1716 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1717 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1718 ;; Is this module globally installed?"
1719 '(#:tests? #f))
1720 (native-inputs
1721 `(("python-setuptools-scm" ,python-setuptools-scm)))
1722 (home-page "https://github.com/pytest-dev/py")
1723 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1724 (description
1725 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1726 code introspection, and logging.")
1727 (license license:expat)))
1728
1729 (define-public python2-py
1730 (package-with-python2 python-py))
1731
1732 ;; Recent versions of python-fixtures and python-testrepository need
1733 ;; python-pbr for packaging, which itself needs these two packages for
1734 ;; testing.
1735 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1736 ;; same source, just without any test dependencies and with tests disabled.
1737 ;; python-pbr-minmal is then used to package python-fixtures and
1738 ;; python-testrepository.
1739 ;; Strictly speaking we currently could remove the test-requirements from the
1740 ;; normal python-pbr package (and save this package) since test are disabled
1741 ;; there anyway. But this may change in future.
1742 (define-public python-pbr-minimal
1743 (package
1744 (name "python-pbr-minimal")
1745 (version "3.0.1")
1746 (source
1747 (origin
1748 (method url-fetch)
1749 (uri (pypi-uri "pbr" version))
1750 (sha256
1751 (base32
1752 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1753 (build-system python-build-system)
1754 (arguments
1755 `(#:tests? #f))
1756 (home-page "http://docs.openstack.org/developer/pbr/")
1757 (synopsis "Minimal build of python-pbr used for bootstrapping")
1758 (description
1759 "Used only for bootstrapping python2-pbr, you should not need this.")
1760 (license license:asl2.0)))
1761
1762 (define-public python2-pbr-minimal
1763 (package-with-python2 python-pbr-minimal))
1764
1765 (define-public python-pbr
1766 (package
1767 (inherit python-pbr-minimal)
1768 (name "python-pbr")
1769 (arguments
1770 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1771 (propagated-inputs
1772 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1773 (native-inputs
1774 `(("python-fixtures" ,python-fixtures-bootstrap)
1775 ;; discover, coverage, hacking, subunit
1776 ("python-mock" ,python-mock)
1777 ("python-six" ,python-six)
1778 ("python-sphinx" ,python-sphinx)
1779 ("python-testrepository" ,python-testrepository-bootstrap)
1780 ("python-testresources" ,python-testresources-bootstrap)
1781 ("python-testscenarios" ,python-testscenarios-bootstrap)
1782 ("python-testtools" ,python-testtools-bootstrap)
1783 ("python-virtualenv" ,python-virtualenv)))
1784 (synopsis "Enhance the default behavior of Python’s setuptools")
1785 (description
1786 "Python Build Reasonableness (PBR) is a library that injects some useful
1787 and sensible default behaviors into your setuptools run. It will set
1788 versions, process requirements files and generate AUTHORS and ChangeLog file
1789 from git information.
1790 ")))
1791
1792 (define-public python2-pbr
1793 (package-with-python2 python-pbr))
1794
1795 (define-public python-pyrsistent
1796 (package
1797 (name "python-pyrsistent")
1798 (version "0.14.11")
1799 (home-page "https://github.com/tobgu/pyrsistent")
1800 (source (origin
1801 (method url-fetch)
1802 (uri (pypi-uri "pyrsistent" version))
1803 (sha256
1804 (base32
1805 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1806 (build-system python-build-system)
1807 (native-inputs
1808 `(("python-hypothesis" ,python-hypothesis)
1809 ("python-pytest" ,python-pytest)
1810 ("python-pytest-runner" ,python-pytest-runner)))
1811 (propagated-inputs
1812 `(("python-six" ,python-six)))
1813 (synopsis "Persistent data structures for Python")
1814 (description
1815 "Pyrsistent is a number of persistent collections (by some referred to as
1816 functional data structures). Persistent in the sense that they are immutable.
1817
1818 All methods on a data structure that would normally mutate it instead return a
1819 new copy of the structure containing the requested updates. The original
1820 structure is left untouched.")
1821 (license license:expat)))
1822
1823 (define-public python2-pyrsistent
1824 (package-with-python2 python-pyrsistent))
1825
1826 (define-public python-exif-read
1827 (package
1828 (name "python-exif-read")
1829 (version "2.1.2")
1830 (source (origin
1831 (method url-fetch)
1832 (uri (pypi-uri "ExifRead" version))
1833 (sha256
1834 (base32
1835 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1836 (build-system python-build-system)
1837 (arguments `(#:tests? #f)) ; no tests
1838 (home-page "https://github.com/ianare/exif-py")
1839 (synopsis "Python library to extract EXIF data from image files")
1840 (description
1841 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1842 files.")
1843 (license license:bsd-3)))
1844
1845 (define-public python2-exif-read
1846 (package-with-python2 python-exif-read))
1847
1848 (define-public python-pyld
1849 (package
1850 (name "python-pyld")
1851 (version "1.0.5")
1852 (source (origin
1853 (method url-fetch)
1854 (uri (pypi-uri "PyLD" version))
1855 (sha256
1856 (base32
1857 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
1858 (build-system python-build-system)
1859 (home-page "https://github.com/digitalbazaar/pyld")
1860 (synopsis "Python implementation of the JSON-LD specification")
1861 (description
1862 "PyLD is an implementation of the JSON-LD specification.")
1863 (license license:bsd-3)))
1864
1865 (define-public python2-pyld
1866 (package-with-python2 python-pyld))
1867
1868 (define-public python-click
1869 (package
1870 (name "python-click")
1871 (version "7.0")
1872 (source
1873 (origin
1874 (method url-fetch)
1875 (uri (pypi-uri "click" version))
1876 (sha256
1877 (base32
1878 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1879 (build-system python-build-system)
1880 (arguments
1881 `(#:phases
1882 (modify-phases %standard-phases
1883 (add-after 'unpack 'fix-paths
1884 (lambda* (#:key inputs #:allow-other-keys)
1885 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1886 "cross-libc" "libc"))))
1887 (substitute* "click/_unicodefun.py"
1888 (("'locale'")
1889 (string-append "'" glibc "/bin/locale'"))))
1890 #t))
1891 (replace 'check
1892 (lambda _
1893 (invoke "python" "-m" "pytest"))))))
1894 (native-inputs
1895 `(("python-pytest" ,python-pytest)))
1896 (home-page "https://palletsprojects.com/p/click/")
1897 (synopsis "Command line library for Python")
1898 (description
1899 "Click is a Python package for creating command line interfaces in a
1900 composable way with as little code as necessary. Its name stands for
1901 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1902 with sensible defaults out of the box.")
1903 (license license:bsd-3)))
1904
1905 (define-public python2-click
1906 (package-with-python2 python-click))
1907
1908 (define-public python-wheel
1909 (package
1910 (name "python-wheel")
1911 (version "0.33.6")
1912 (source
1913 (origin
1914 (method url-fetch)
1915 (uri (pypi-uri "wheel" version))
1916 (sha256
1917 (base32
1918 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
1919 (build-system python-build-system)
1920 (arguments
1921 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
1922 ;; fails to find the newly-built bdist_wheel library, even though it is
1923 ;; available on PYTHONPATH. What search path is consulted by setup.py?
1924 '(#:tests? #f))
1925 (home-page "https://bitbucket.org/pypa/wheel/")
1926 (synopsis "Format for built Python packages")
1927 (description
1928 "A wheel is a ZIP-format archive with a specially formatted filename and
1929 the @code{.whl} extension. It is designed to contain all the files for a PEP
1930 376 compatible install in a way that is very close to the on-disk format. Many
1931 packages will be properly installed with only the @code{Unpack} step and the
1932 unpacked archive preserves enough information to @code{Spread} (copy data and
1933 scripts to their final locations) at any later time. Wheel files can be
1934 installed with a newer @code{pip} or with wheel's own command line utility.")
1935 (license license:expat)))
1936
1937 (define-public python2-wheel
1938 (package-with-python2 python-wheel))
1939
1940 (define-public python-vcversioner
1941 (package
1942 (name "python-vcversioner")
1943 (version "2.16.0.0")
1944 (source
1945 (origin
1946 (method url-fetch)
1947 (uri (pypi-uri "vcversioner" version))
1948 (sha256
1949 (base32
1950 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1951 (build-system python-build-system)
1952 (synopsis "Python library for version number discovery")
1953 (description "Vcversioner is a Python library that inspects tagging
1954 information in a variety of version control systems in order to discover
1955 version numbers.")
1956 (home-page "https://github.com/habnabit/vcversioner")
1957 (license license:isc)))
1958
1959 (define-public python2-vcversioner
1960 (package-with-python2 python-vcversioner))
1961
1962 (define-public python-jdcal
1963 (package
1964 (name "python-jdcal")
1965 (version "1.4")
1966 (source
1967 (origin
1968 (method url-fetch)
1969 (uri (pypi-uri "jdcal" version))
1970 (sha256
1971 (base32
1972 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1973 (build-system python-build-system)
1974 (arguments
1975 `(#:phases (modify-phases %standard-phases
1976 (replace 'check
1977 (lambda _
1978 (invoke "pytest"))))))
1979 (native-inputs
1980 `(("python-pytest" ,python-pytest)))
1981 (home-page "https://github.com/phn/jdcal")
1982 (synopsis "Functions to convert between Julian dates Gregorian dates")
1983 (description "This Python library provides functions for converting
1984 between Julian dates and Gregorian dates.")
1985 (license license:bsd-2)))
1986
1987 (define-public python2-jdcal
1988 (package-with-python2 python-jdcal))
1989
1990 (define-public python-jsonschema
1991 (package
1992 (name "python-jsonschema")
1993 (version "3.0.1")
1994 (source (origin
1995 (method url-fetch)
1996 (uri (pypi-uri "jsonschema" version))
1997 (sha256
1998 (base32
1999 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2000 (build-system python-build-system)
2001 (arguments
2002 '(#:phases
2003 (modify-phases %standard-phases
2004 (replace 'check
2005 (lambda _
2006 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2007 (invoke "trial" "jsonschema"))))))
2008 (native-inputs
2009 `(("python-setuptools_scm" ,python-setuptools-scm)
2010 ("python-twisted" ,python-twisted)))
2011 (propagated-inputs
2012 `(("python-attrs" ,python-attrs)
2013 ("python-pyrsistent" ,python-pyrsistent)
2014 ("python-six" ,python-six)))
2015 (home-page "https://github.com/Julian/jsonschema")
2016 (synopsis "Implementation of JSON Schema for Python")
2017 (description
2018 "Jsonschema is an implementation of JSON Schema for Python.")
2019 (license license:expat)
2020 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2021
2022 (define-public python2-jsonschema
2023 (let ((jsonschema (package-with-python2
2024 (strip-python2-variant python-jsonschema))))
2025 (package (inherit jsonschema)
2026 (propagated-inputs
2027 `(("python2-functools32" ,python2-functools32)
2028 ,@(package-propagated-inputs jsonschema))))))
2029
2030 ;; This old version is still required by docker-compose as of 1.24.0.
2031 (define-public python-jsonschema-2.6
2032 (package
2033 (name "python-jsonschema")
2034 (version "2.6.0")
2035 (source (origin
2036 (method url-fetch)
2037 (uri (pypi-uri "jsonschema" version))
2038 (sha256
2039 (base32
2040 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2041 (build-system python-build-system)
2042 (arguments
2043 '(#:phases
2044 (modify-phases %standard-phases
2045 (replace 'check (lambda _ (invoke "nosetests"))))))
2046 (native-inputs
2047 `(("python-nose" ,python-nose)
2048 ("python-vcversioner" ,python-vcversioner)))
2049 (home-page "https://github.com/Julian/jsonschema")
2050 (synopsis "Implementation of JSON Schema for Python")
2051 (description
2052 "Jsonschema is an implementation of JSON Schema for Python.")
2053 (license license:expat)
2054 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2055
2056 (define-public python-schema
2057 (package
2058 (name "python-schema")
2059 (version "0.6.6")
2060 (source
2061 (origin
2062 (method url-fetch)
2063 (uri (pypi-uri "schema" version))
2064 (sha256
2065 (base32
2066 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2067 (build-system python-build-system)
2068 (native-inputs
2069 `(("python-pytest" ,python-pytest)))
2070 (home-page "https://github.com/keleshev/schema")
2071 (synopsis "Simple data validation library")
2072 (description
2073 "@code{python-schema} is a library for validating Python data
2074 structures, such as those obtained from config-files, forms, external
2075 services or command-line parsing, converted from JSON/YAML (or
2076 something else) to Python data-types.")
2077 (license license:psfl)))
2078
2079 (define-public python2-schema
2080 (package-with-python2 python-schema))
2081
2082 (define-public python-schema-0.5
2083 (package (inherit python-schema)
2084 (version "0.5.0")
2085 (source
2086 (origin
2087 (method url-fetch)
2088 (uri (pypi-uri "schema" version))
2089 (sha256
2090 (base32
2091 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2092
2093 (define-public python2-schema-0.5
2094 (package-with-python2 python-schema-0.5))
2095
2096 (define-public python-kitchen
2097 (package
2098 (name "python-kitchen")
2099 (version "1.2.5")
2100 (source
2101 (origin
2102 (method url-fetch)
2103 (uri (pypi-uri "kitchen" version))
2104 (sha256
2105 (base32
2106 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2107 (build-system python-build-system)
2108 (propagated-inputs
2109 `(("python-chardet" ,python-chardet)))
2110 (home-page "https://github.com/fedora-infra/kitchen")
2111 (synopsis "Python API for snippets")
2112 (description "@code{kitchen} module provides a python API for all sorts of
2113 little useful snippets of code that everybody ends up writing for their projects
2114 but never seem big enough to build an independent release. Use kitchen and stop
2115 cutting and pasting that code over and over.")
2116 (license (list license:lgpl2.1+
2117 ;; subprocess.py, test_subprocess.py,
2118 ;; kitchen/pycompat25/defaultdict.py:
2119 license:psfl))))
2120
2121 (define-public python2-kitchen
2122 (package-with-python2 python-kitchen))
2123
2124 (define-public python-unidecode
2125 (package
2126 (name "python-unidecode")
2127 (version "1.1.1")
2128 (source (origin
2129 (method url-fetch)
2130 (uri (pypi-uri "Unidecode" version))
2131 (sha256
2132 (base32
2133 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2134 (build-system python-build-system)
2135 (home-page "https://pypi.python.org/pypi/Unidecode")
2136 (synopsis "ASCII transliterations of Unicode text")
2137 (description
2138 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2139 useful when integrating with legacy code that doesn't support Unicode, or for
2140 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2141 machine identifiers from human-readable Unicode strings that should still be
2142 somewhat intelligible.")
2143 (license license:gpl2+)))
2144
2145 (define-public python2-unidecode
2146 (package-with-python2 python-unidecode))
2147
2148 (define-public python-pyjwt
2149 (package
2150 (name "python-pyjwt")
2151 (version "1.7.1")
2152 (source
2153 (origin
2154 (method url-fetch)
2155 (uri (pypi-uri "PyJWT" version))
2156 (sha256
2157 (base32
2158 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2159 (modules '((guix build utils)))
2160 (snippet
2161 '(begin
2162 (for-each delete-file-recursively
2163 (find-files "." "\\.pyc$"))
2164 #t))))
2165 (build-system python-build-system)
2166 (native-inputs
2167 `(("python-pytest" ,python-pytest)
2168 ("python-pytest-cov" ,python-pytest-cov)
2169 ("python-pytest-runner" ,python-pytest-runner)))
2170 (home-page "https://github.com/progrium/pyjwt")
2171 (synopsis "JSON Web Token implementation in Python")
2172 (description
2173 "PyJWT is a JSON Web Token implementation written in Python.")
2174 (license license:expat)))
2175
2176 (define-public python2-pyjwt
2177 (package-with-python2 python-pyjwt))
2178
2179 (define-public python-pykka
2180 (package
2181 (name "python-pykka")
2182 (version "1.2.1")
2183 (source
2184 (origin
2185 (method url-fetch)
2186 (uri (pypi-uri "Pykka" version))
2187 (sha256
2188 (base32
2189 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2190 (build-system python-build-system)
2191 (native-inputs
2192 `(("python-mock" ,python-mock)
2193 ("python-nose" ,python-nose)
2194 ("python-gevent" ,python-gevent)
2195 ("python-eventlet" ,python-eventlet)))
2196 (home-page "https://www.pykka.org/")
2197 (synopsis "Pykka is a Python implementation of the actor model")
2198 (description
2199 "Pykka is a Python implementation of the actor model.
2200 The actor model introduces some simple rules to control the sharing
2201 of state and cooperation between execution units, which makes it
2202 easier to build concurrent applications.")
2203 (license license:asl2.0)))
2204
2205 (define-public python2-pykka
2206 (package-with-python2 python-pykka))
2207
2208 (define-public python-pymsgbox
2209 (package
2210 (name "python-pymsgbox")
2211 (version "1.0.6")
2212 (source
2213 (origin
2214 (method git-fetch)
2215 (uri (git-reference
2216 ;; LICENSE.txt is not present on pypi
2217 (url "https://github.com/asweigart/PyMsgBox")
2218 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2219 (file-name (git-file-name name version))
2220 (sha256
2221 (base32
2222 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2223 (arguments
2224 ;; Circular dependency to run tests:
2225 ;; Tests need pyautogui, which depends on pymsgbox.
2226 '(#:tests? #f))
2227 (build-system python-build-system)
2228 (home-page "https://github.com/asweigart/PyMsgBox")
2229 (synopsis "Python module for JavaScript-like message boxes")
2230 (description
2231 "PyMsgBox is a simple, cross-platform, pure Python module for
2232 JavaScript-like message boxes. Types of dialog boxes include:
2233 @enumerate
2234 @item alert
2235 @item confirm
2236 @item prompt
2237 @item password
2238 @end enumerate
2239 ")
2240 (license license:bsd-3)))
2241
2242 (define-public python-pympler
2243 (package
2244 (name "python-pympler")
2245 (home-page "https://pythonhosted.org/Pympler/")
2246 (version "0.7")
2247 (source (origin
2248 (method url-fetch)
2249 (uri (pypi-uri "Pympler" version))
2250 (sha256
2251 (base32
2252 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2253 (build-system python-build-system)
2254 (arguments
2255 `(#:phases (modify-phases %standard-phases
2256 (delete 'check)
2257 (add-after 'install 'check
2258 (lambda* (#:key inputs outputs #:allow-other-keys)
2259 (add-installed-pythonpath inputs outputs)
2260 (invoke "python" "setup.py" "test"))))))
2261 (synopsis "Measure, monitor and analyze memory behavior")
2262 (description
2263 "Pympler is a development tool to measure, monitor and analyze
2264 the memory behavior of Python objects in a running Python application.
2265
2266 By pympling a Python application, detailed insight in the size and the
2267 lifetime of Python objects can be obtained. Undesirable or unexpected
2268 runtime behavior like memory bloat and other @samp{pymples} can easily
2269 be identified.
2270
2271 A web profiling frontend exposes process statistics, garbage
2272 visualisation and class tracker statistics.")
2273 (license license:asl2.0)))
2274
2275 (define-public python2-pympler
2276 (package-with-python2 python-pympler))
2277
2278 (define-public python-itsdangerous
2279 (package
2280 (name "python-itsdangerous")
2281 (version "1.1.0")
2282 (source
2283 (origin
2284 (method url-fetch)
2285 (uri (pypi-uri "itsdangerous" version))
2286 (sha256
2287 (base32
2288 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2289 (build-system python-build-system)
2290 (home-page "https://palletsprojects.com/p/itsdangerous/")
2291 (synopsis "Python library for passing data to/from untrusted environments")
2292 (description
2293 "Itsdangerous provides various helpers to pass trusted data to untrusted
2294 environments and back.")
2295 (license license:bsd-3)))
2296
2297 (define-public python2-itsdangerous
2298 (package-with-python2 python-itsdangerous))
2299
2300 (define-public python-pyyaml
2301 (package
2302 (name "python-pyyaml")
2303 (version "3.13")
2304 (source
2305 (origin
2306 (method url-fetch)
2307 (uri (pypi-uri "PyYAML" version))
2308 (sha256
2309 (base32
2310 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2311 (build-system python-build-system)
2312 (inputs
2313 `(("libyaml" ,libyaml)))
2314 (home-page "http://pyyaml.org/wiki/PyYAML")
2315 (synopsis "YAML parser and emitter for Python")
2316 (description
2317 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2318 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2319 API, and sensible error messages. PyYAML supports standard YAML tags and
2320 provides Python-specific tags that allow to represent an arbitrary Python
2321 object.")
2322 (license license:expat)))
2323
2324 (define-public python2-pyyaml
2325 (package-with-python2 python-pyyaml))
2326
2327 (define-public python-vine
2328 (package
2329 (name "python-vine")
2330 (version "1.1.4")
2331 (source
2332 (origin
2333 (method url-fetch)
2334 (uri (pypi-uri "vine" version))
2335 (sha256
2336 (base32
2337 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2338 (build-system python-build-system)
2339 (native-inputs
2340 `(("python-pytest" ,python-pytest)
2341 ("python-case" ,python-case)))
2342 (home-page "https://github.com/celery/vine")
2343 (synopsis "Promises for Python")
2344 (description
2345 "@code{vine} provides a special implementation of promises in that it can
2346 be used both for \"promise of a value\" and lazy evaluation. The biggest
2347 upside for this is that everything in a promise can also be a promise,
2348 e.g. filters, callbacks and errbacks can all be promises.")
2349 (license license:bsd-3)))
2350
2351 (define-public python-virtualenv
2352 (package
2353 (name "python-virtualenv")
2354 (version "16.1.0")
2355 (source
2356 (origin
2357 (method url-fetch)
2358 (uri (pypi-uri "virtualenv" version))
2359 (sha256
2360 (base32
2361 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2362 (build-system python-build-system)
2363 (arguments
2364 `(#:phases
2365 (modify-phases %standard-phases
2366 (add-before 'check 'disable-failing-test
2367 (lambda _
2368 ;; Disable failing test. See upstream bug report
2369 ;; https://github.com/pypa/virtualenv/issues/957
2370 (substitute* "tests/test_virtualenv.py"
2371 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2372 #t)))))
2373 (native-inputs
2374 `(("python-mock" ,python-mock)
2375 ("python-pytest" ,python-pytest)))
2376 (home-page "https://virtualenv.pypa.io/")
2377 (synopsis "Virtual Python environment builder")
2378 (description
2379 "Virtualenv is a tool to create isolated Python environments.")
2380 (license license:expat)))
2381
2382 (define-public python2-virtualenv
2383 (package-with-python2 python-virtualenv))
2384
2385 (define-public python-markupsafe
2386 (package
2387 (name "python-markupsafe")
2388 (version "1.1.1")
2389 (source
2390 (origin
2391 (method url-fetch)
2392 (uri (pypi-uri "MarkupSafe" version))
2393 (sha256
2394 (base32
2395 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2396 (build-system python-build-system)
2397 (arguments
2398 `(#:modules ((ice-9 ftw)
2399 (srfi srfi-1)
2400 (srfi srfi-26)
2401 (guix build utils)
2402 (guix build python-build-system))
2403 #:phases (modify-phases %standard-phases
2404 (replace 'check
2405 (lambda _
2406 (let ((cwd (getcwd))
2407 (libdir (find (cut string-prefix? "lib." <>)
2408 (scandir "build"))))
2409 (setenv "PYTHONPATH"
2410 (string-append cwd "/build/" libdir ":"
2411 (getenv "PYTHONPATH")))
2412 (invoke "pytest" "-vv")))))))
2413 (native-inputs
2414 `(("python-pytest" ,python-pytest)))
2415 (home-page "https://github.com/mitsuhiko/markupsafe")
2416 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2417 (description
2418 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2419 for Python.")
2420 (license license:bsd-3)))
2421
2422 (define-public python2-markupsafe
2423 (package-with-python2 python-markupsafe))
2424
2425 (define-public python-jinja2
2426 (package
2427 (name "python-jinja2")
2428 (version "2.10.1")
2429 (source
2430 (origin
2431 (method url-fetch)
2432 (uri (pypi-uri "Jinja2" version))
2433 (sha256
2434 (base32
2435 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2436 (build-system python-build-system)
2437 (propagated-inputs
2438 `(("python-markupsafe" ,python-markupsafe)))
2439 (home-page "http://jinja.pocoo.org/")
2440 (synopsis "Python template engine")
2441 (description
2442 "Jinja2 is a small but fast and easy to use stand-alone template engine
2443 written in pure Python.")
2444 (license license:bsd-3)))
2445
2446 (define-public python2-jinja2
2447 (package-with-python2 python-jinja2))
2448
2449 (define-public python-jinja2-time
2450 (package
2451 (name "python-jinja2-time")
2452 (version "0.2.0")
2453 (source
2454 (origin
2455 (method url-fetch)
2456 (uri (pypi-uri "jinja2-time" version))
2457 (sha256
2458 (base32
2459 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2460 (build-system python-build-system)
2461 (propagated-inputs
2462 `(("python-arrow" ,python-arrow)
2463 ("python-jinja2" ,python-jinja2)))
2464 (home-page
2465 "https://github.com/hackebrot/jinja2-time")
2466 (synopsis "Jinja2 Extension for Dates and Times")
2467 (description
2468 "This package provides an extension for the template engine Jinja2. It
2469 adds a 'now' tag providing a convenient access to the arrow.now() API from
2470 templates. A format string can be provided to control the output.")
2471 (license license:expat)))
2472
2473 (define-public python-pystache
2474 (package
2475 (name "python-pystache")
2476 (version "0.5.4")
2477 (source (origin
2478 (method url-fetch)
2479 (uri (pypi-uri "pystache" version))
2480 (sha256
2481 (base32
2482 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2483 (build-system python-build-system)
2484 (arguments
2485 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2486 (home-page "http://defunkt.io/pystache/")
2487 (synopsis "Python logic-less template engine")
2488 (description
2489 "Pystache is a Python implementation of the framework agnostic,
2490 logic-free templating system Mustache.")
2491 (license license:expat)
2492 (properties `((python2-variant . ,(delay python2-pystache))))))
2493
2494 (define-public python2-pystache
2495 (package (inherit (package-with-python2
2496 (strip-python2-variant python-pystache)))
2497 (arguments
2498 `(#:python ,python-2
2499 #:phases
2500 (modify-phases %standard-phases
2501 (replace 'check
2502 (lambda _
2503 (invoke "python" "test_pystache.py"))))))))
2504
2505 (define-public python-joblib
2506 (package
2507 (name "python-joblib")
2508 (version "0.13.0")
2509 (source (origin
2510 (method url-fetch)
2511 (uri (pypi-uri "joblib" version))
2512 (sha256
2513 (base32
2514 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2515 (build-system python-build-system)
2516 (arguments
2517 `(#:phases
2518 (modify-phases %standard-phases
2519 (replace 'check
2520 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2521 (native-inputs
2522 `(("python-pytest" ,python-pytest)))
2523 (home-page "https://joblib.readthedocs.io/")
2524 (synopsis "Using Python functions as pipeline jobs")
2525 (description
2526 "Joblib is a set of tools to provide lightweight pipelining in Python.
2527 In particular, joblib offers: transparent disk-caching of the output values
2528 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2529 logging and tracing of the execution.")
2530 (license license:bsd-3)))
2531
2532 (define-public python2-joblib
2533 (package-with-python2 python-joblib))
2534
2535 (define-public python-daemon
2536 (package
2537 (name "python-daemon")
2538 (version "2.2.3")
2539 (source
2540 (origin
2541 (method url-fetch)
2542 (uri (pypi-uri "python-daemon" version))
2543 (sha256
2544 (base32
2545 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2546 (build-system python-build-system)
2547 (arguments
2548 `(#:phases
2549 (modify-phases %standard-phases
2550 (add-before 'check 'disable-tests
2551 (lambda _
2552 ;; FIXME: Determine why test fails
2553 (substitute* "test/test_daemon.py"
2554 (("test_detaches_process_context")
2555 "skip_test_detaches_process_context"))
2556 #t)))))
2557 (propagated-inputs
2558 `(("python-lockfile" ,python-lockfile)))
2559 (native-inputs
2560 `(("python-unittest2" ,python-unittest2)
2561 ("python-testtools" ,python-testtools)
2562 ("python-testscenarios" ,python-testscenarios)
2563 ("python-mock" ,python-mock)
2564 ("python-docutils" ,python-docutils)))
2565 (home-page "https://pagure.io/python-daemon/")
2566 (synopsis "Python library for making a Unix daemon process")
2567 (description "Python-daemon is a library that assists a Python program to
2568 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2569
2570 This library provides a @code{DaemonContext} class that manages the following
2571 important tasks for becoming a daemon process:
2572 @enumerate
2573 @item Detach the process into its own process group.
2574 @item Set process environment appropriate for running inside a chroot.
2575 @item Renounce suid and sgid privileges.
2576 @item Close all open file descriptors.
2577 @item Change the working directory, uid, gid, and umask.
2578 @item Set appropriate signal handlers.
2579 @item Open new file descriptors for stdin, stdout, and stderr.
2580 @item Manage a specified PID lock file.
2581 @item Register cleanup functions for at-exit processing.
2582 @end enumerate")
2583 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2584 (license (list license:asl2.0 license:gpl3+))))
2585
2586 (define-public python-docutils
2587 (package
2588 (name "python-docutils")
2589 (version "0.14")
2590 (source
2591 (origin
2592 (method url-fetch)
2593 (uri (pypi-uri "docutils" version))
2594 (sha256
2595 (base32
2596 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2597 (build-system python-build-system)
2598 (arguments
2599 '(#:tests? #f)) ; no setup.py test command
2600 (home-page "http://docutils.sourceforge.net/")
2601 (synopsis "Python Documentation Utilities")
2602 (description
2603 "Docutils is a modular system for processing documentation into useful
2604 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2605 reStructuredText.")
2606 ;; Most of the source code is public domain, but some source files are
2607 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2608 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2609
2610 (define-public python2-docutils
2611 (package-with-python2 python-docutils))
2612
2613 (define-public python-pygments
2614 (package
2615 (name "python-pygments")
2616 (version "2.4.2")
2617 (source
2618 (origin
2619 (method url-fetch)
2620 (uri (pypi-uri "Pygments" version))
2621 (sha256
2622 (base32
2623 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2624 (build-system python-build-system)
2625 (arguments
2626 ;; FIXME: Tests require sphinx, which depends on this.
2627 '(#:tests? #f))
2628 (home-page "http://pygments.org/")
2629 (synopsis "Syntax highlighting")
2630 (description
2631 "Pygments is a syntax highlighting package written in Python.")
2632 (license license:bsd-2)))
2633
2634 (define-public python2-pygments
2635 (package-with-python2 python-pygments))
2636
2637 (define-public python-bumpversion
2638 (package
2639 (name "python-bumpversion")
2640 (version "0.5.3")
2641 (source
2642 (origin
2643 (method url-fetch)
2644 (uri (pypi-uri "bumpversion" version))
2645 (sha256
2646 (base32
2647 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2648 (build-system python-build-system)
2649 (home-page "https://github.com/peritus/bumpversion")
2650 (synopsis "Tool to bump software version")
2651 (description "This tool provides a command-line interface (CLI) to bump a
2652 software version simply.")
2653 (license license:expat)))
2654
2655 (define-public python-deprecated
2656 (package
2657 (name "python-deprecated")
2658 (version "1.2.5")
2659 (source
2660 (origin
2661 (method git-fetch)
2662 (uri (git-reference
2663 (url "https://github.com/tantale/deprecated.git")
2664 (commit (string-append "v" version))))
2665 (file-name (git-file-name name version))
2666 (sha256
2667 (base32
2668 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2669 (build-system python-build-system)
2670 (arguments
2671 `(#:phases (modify-phases %standard-phases
2672 (replace 'check
2673 (lambda _
2674 (invoke "pytest"))))))
2675 (propagated-inputs
2676 `(("python-wrapt" ,python-wrapt)))
2677 (native-inputs
2678 `(("python-bumpversion" ,python-bumpversion)
2679 ("python-pytest" ,python-pytest)
2680 ("python-pytest-cov" ,python-pytest-cov)
2681 ("python-sphinx" ,python-sphinx)
2682 ("python-tox" ,python-tox)))
2683 (home-page "https://github.com/tantale/deprecated")
2684 (synopsis "Python decorator to deprecate classes, functions or methods")
2685 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2686 to deprecate classes, functions or methods.")
2687 (license license:expat)))
2688
2689 (define-public python-pygithub
2690 (package
2691 (name "python-pygithub")
2692 (version "1.43.8")
2693 (source
2694 ;; We fetch from the Git repo because there are no tests in the PyPI
2695 ;; archive.
2696 (origin
2697 (method git-fetch)
2698 (uri (git-reference
2699 (url "https://github.com/PyGithub/PyGithub.git")
2700 (commit (string-append "v" version))))
2701 (file-name (git-file-name name version))
2702 (sha256
2703 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2704 (build-system python-build-system)
2705 (arguments
2706 `(#:phases (modify-phases %standard-phases
2707 ;; Some tests rely on the network.
2708 (add-after 'unpack 'disable-failing-tests
2709 (lambda _
2710 (substitute* "tests/Issue142.py"
2711 (("testDecodeJson") "disabled_testDecodeJson"))
2712 #t))
2713 (add-before 'check 'prepare-for-tests
2714 (lambda _
2715 (for-each (lambda (f)
2716 (chmod f #o666))
2717 (find-files "./tests"))
2718 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2719 (setenv "PYTHONPATH"
2720 (string-append "./tests:" (getenv "PYTHONPATH")))
2721 #t)))))
2722 (propagated-inputs
2723 `(("python-deprecated" ,python-deprecated)
2724 ("python-pyjwt" ,python-pyjwt)
2725 ("python-requests" ,python-requests)))
2726 (native-inputs `(("python-httpretty" ,python-httpretty)))
2727 (home-page "https://pygithub.readthedocs.io/en/latest/")
2728 (synopsis "Python library for the GitHub API")
2729 (description "This library allows managing GitHub resources such as
2730 repositories, user profiles, and organizations in your Python applications,
2731 using version 3 of the GitHub application programming interface (API).")
2732 (license license:lgpl3+)))
2733
2734 (define-public python-rellu
2735 (package
2736 (name "python-rellu")
2737 (version "0.7")
2738 (source
2739 (origin
2740 (method url-fetch)
2741 (uri (pypi-uri "rellu" version))
2742 (sha256
2743 (base32
2744 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2745 (build-system python-build-system)
2746 (propagated-inputs
2747 `(("python-invoke" ,python-invoke)
2748 ("python-pygithub" ,python-pygithub)))
2749 (home-page "https://github.com/robotframework/rellu")
2750 (synopsis "Utilities to create PyPI releases")
2751 (description "This collection of utilities contains tooling and templates
2752 to assist in creating releases on GitHub and publishing them on PyPI. It is
2753 designed to be used by Robot Framework and tools and libraries in its
2754 ecosystem, but can naturally be used also by other projects.")
2755 (license license:asl2.0)))
2756
2757 (define-public python-robotframework
2758 (package
2759 (name "python-robotframework")
2760 (version "3.1.2")
2761 ;; There are no tests in the PyPI archive.
2762 (source
2763 (origin
2764 (method git-fetch)
2765 (uri (git-reference
2766 (url "https://github.com/robotframework/robotframework.git")
2767 (commit (string-append "v" version))))
2768 (file-name (git-file-name name version))
2769 (sha256
2770 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2771 (patches (search-patches
2772 "python-robotframework-honor-source-date-epoch.patch"))))
2773 (build-system python-build-system)
2774 (arguments
2775 `(#:phases (modify-phases %standard-phases
2776 (add-before 'build 'build-and-install-doc
2777 (lambda* (#:key outputs #:allow-other-keys)
2778 (let* ((doc-output (assoc-ref outputs "doc"))
2779 (doc (string-append doc-output "/share/"
2780 ,name "-" ,version "/")))
2781 (invoke "invoke" "library-docs" "all")
2782 (mkdir-p doc)
2783 (copy-recursively "doc/libraries"
2784 (string-append doc "/libraries"))
2785 #t)))
2786 (replace 'check
2787 (lambda _
2788 (invoke "python" "utest/run.py"))))))
2789 (native-inputs
2790 `(("python-invoke" ,python-invoke)
2791 ("python-rellu" ,python-rellu)
2792 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2793 (outputs '("out" "doc"))
2794 (home-page "https://robotframework.org")
2795 (synopsis "Generic automation framework")
2796 (description "Robot Framework is a generic automation framework for
2797 acceptance testing, acceptance test driven development (ATDD), and robotic
2798 process automation (RPA).")
2799 (license license:asl2.0)))
2800
2801 (define-public python-robotframework-lint
2802 ;; There is no properly tagged release; the commit below seems to correspond
2803 ;; to the 0.9 stable release available from PyPI. The tests are not
2804 ;; included in the PyPI archive, so we fetch the sources from the upstream
2805 ;; Git repo.
2806 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2807 (revision "1"))
2808 (package
2809 (name "python-robotframework-lint")
2810 (version (git-version "0.9.0" revision commit))
2811 (source
2812 (origin
2813 (method git-fetch)
2814 (uri (git-reference
2815 (url "https://github.com/boakley/robotframework-lint.git")
2816 (commit commit)))
2817 (file-name (git-file-name name version))
2818 (sha256
2819 (base32
2820 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2821 (build-system python-build-system)
2822 (arguments
2823 `(#:phases
2824 (modify-phases %standard-phases
2825 (replace 'check
2826 (lambda _
2827 (invoke "python" "-m" "robot" "-A"
2828 "tests/conf/default.args" "tests"))))))
2829 (propagated-inputs
2830 `(("python-robotframework" ,python-robotframework)))
2831 (home-page "https://github.com/boakley/robotframework-lint/")
2832 (synopsis "Static analysis tool (linter) for Robot Framework")
2833 (description "This package provides the @code{rflint} command-line
2834 utility, a static analysis tool (linter) for Robot Framework source files.")
2835 (license license:asl2.0))))
2836
2837 (define-public python-robotframework-sshlibrary
2838 (package
2839 (name "python-robotframework-sshlibrary")
2840 (version "3.3.0")
2841 ;; There are no tests in the PyPI archive.
2842 (source
2843 (origin
2844 (method git-fetch)
2845 (uri (git-reference
2846 (url "https://github.com/robotframework/SSHLibrary.git")
2847 (commit (string-append "v" version))))
2848 (file-name (git-file-name name version))
2849 (sha256
2850 (base32
2851 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2852 (build-system python-build-system)
2853 (arguments
2854 `(#:phases
2855 (modify-phases %standard-phases
2856 (add-before 'build 'build-and-install-doc
2857 (lambda* (#:key outputs #:allow-other-keys)
2858 (let* ((doc-output (assoc-ref outputs "doc"))
2859 (doc (string-append doc-output "/share/"
2860 ,name "-" ,version "/")))
2861 (invoke "chmod" "-R" "+w" "docs")
2862 (invoke "invoke" "kw-docs" "project-docs")
2863 (mkdir-p doc)
2864 (for-each delete-file (find-files "docs" "\\.rst"))
2865 (copy-recursively "docs" doc)
2866 #t)))
2867 (replace 'check
2868 (lambda _
2869 ;; Some tests require an SSH server; we remove them.
2870 (delete-file "utest/test_client_api.py")
2871 (delete-file "utest/test_scp.py")
2872 (invoke "python" "utest/run.py"))))))
2873 (propagated-inputs
2874 `(("python-robotframework" ,python-robotframework)
2875 ("python-paramiko" ,python-paramiko)
2876 ("python-scp" ,python-scp)))
2877 (native-inputs
2878 `(("openssh" ,openssh)
2879 ("which" ,which)
2880 ;; To generate the documentation
2881 ("python-docutils" ,python-docutils)
2882 ("python-invoke" ,python-invoke)
2883 ("python-pygments" ,python-pygments)
2884 ("python-rellu" ,python-rellu)))
2885 (outputs '("out" "doc"))
2886 (home-page "https://github.com/robotframework/SSHLibrary")
2887 (synopsis "Robot Framework library for SSH and SFTP")
2888 (description "SSHLibrary is a Robot Framework library providing support
2889 for SSH and SFTP. It has the following main usages:
2890 @itemize @bullet
2891 @item Executing commands on the remote machine, either blocking or non-blocking.
2892 @item Writing and reading in an interactive shell.
2893 @item Transferring files and directories over SFTP.
2894 @item Ensuring that files and directories exist on the remote machine.
2895 @end itemize")
2896 (license license:asl2.0)))
2897
2898 (define-public python-scp
2899 (package
2900 (name "python-scp")
2901 (version "0.13.2")
2902 (source
2903 (origin
2904 (method url-fetch)
2905 (uri (pypi-uri "scp" version))
2906 (sha256
2907 (base32
2908 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2909 (build-system python-build-system)
2910 (arguments
2911 '(#:tests? #f)) ;tests require an SSH server
2912 (propagated-inputs
2913 `(("python-paramiko" ,python-paramiko)))
2914 (home-page "https://github.com/jbardin/scp.py")
2915 (synopsis "SCP protocol module for Python and Paramiko")
2916 (description "The scp module extends the Paramiko library to send and
2917 receive files via the SCP1 protocol, as implemented by the OpenSSH
2918 @command{scp} program.")
2919 (license license:gpl2+)))
2920
2921 (define-public python-rst.linker
2922 (package
2923 (name "python-rst.linker")
2924 (version "1.11")
2925 (source
2926 (origin
2927 (method url-fetch)
2928 (uri (pypi-uri "rst.linker" version))
2929 (sha256
2930 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
2931 (build-system python-build-system)
2932 (propagated-inputs
2933 `(("python-dateutil" ,python-dateutil)
2934 ("python-six" ,python-six)))
2935 (native-inputs
2936 `(("python-setuptools-scm" ,python-setuptools-scm)))
2937 ;; Test would require path.py, which would introduce a cyclic dependence.
2938 (arguments `(#:tests? #f))
2939 ;; Note: As of version 1.7 the documentation is not worth building.
2940 (home-page "https://github.com/jaraco/rst.linker")
2941 (synopsis "Sphinx plugin to add links and timestamps")
2942 (description "rst.linker allows to automatically replace text by a
2943 reStructuredText external reference or timestamps. It's primary purpose is to
2944 augment the changelog, but it can be used for other documents, too.")
2945 (license license:expat)))
2946
2947 (define-public python2-rst.linker
2948 (package-with-python2 python-rst.linker))
2949
2950 (define-public python-feedgenerator
2951 (package
2952 (name "python-feedgenerator")
2953 (version "1.9")
2954 (source
2955 (origin
2956 (method url-fetch)
2957 (uri (pypi-uri "feedgenerator" version))
2958 (sha256
2959 (base32
2960 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2961 (modules '((guix build utils)))
2962 (snippet
2963 '(begin
2964 ;; Remove pre-compiled .pyc files from source.
2965 (for-each delete-file-recursively
2966 (find-files "." "__pycache__" #:directories? #t))
2967 (for-each delete-file (find-files "." "\\.pyc$"))
2968 #t))))
2969 (build-system python-build-system)
2970 (propagated-inputs
2971 `(("python-pytz" ,python-pytz)
2972 ("python-six" ,python-six)))
2973 (home-page "https://github.com/getpelican/feedgenerator")
2974 (synopsis
2975 "Standalone version of Django's Atom/RSS feed generator")
2976 (description
2977 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2978 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2979 (license license:bsd-3)))
2980
2981 (define-public python2-feedgenerator
2982 (package-with-python2 python-feedgenerator))
2983
2984 (define-public python-toml
2985 (package
2986 (name "python-toml")
2987 (version "0.9.4")
2988 (source
2989 (origin
2990 (method url-fetch)
2991 (uri (pypi-uri "toml" version))
2992 (sha256
2993 (base32
2994 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2995 (build-system python-build-system)
2996 (arguments
2997 `(#:tests? #f)) ;no tests suite in release
2998 (home-page "https://github.com/uiri/toml")
2999 (synopsis "Library for TOML")
3000 (description
3001 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3002 Language (TOML) configuration files.")
3003 (license license:expat)))
3004
3005 (define-public python-jsonrpc-server
3006 (package
3007 (name "python-jsonrpc-server")
3008 (version "0.3.2")
3009 (source
3010 (origin
3011 (method url-fetch)
3012 (uri (pypi-uri "python-jsonrpc-server" version))
3013 (sha256
3014 (base32
3015 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
3016 (build-system python-build-system)
3017 (propagated-inputs
3018 `(("python-future" ,python-future)
3019 ("python-mock" ,python-mock)
3020 ("python-pytest" ,python-pytest)
3021 ("python-ujson" ,python-ujson)))
3022 (home-page
3023 "https://github.com/palantir/python-jsonrpc-server")
3024 (synopsis "JSON RPC 2.0 server library")
3025 (description
3026 "This package provides a JSON RPC 2.0 server library for Python.")
3027 (license license:expat)))
3028
3029 (define-public python-pydocstyle
3030 (package
3031 (name "python-pydocstyle")
3032 (version "3.0.0")
3033 (source
3034 (origin
3035 (method url-fetch)
3036 (uri (pypi-uri "pydocstyle" version))
3037 (sha256
3038 (base32
3039 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3040 (build-system python-build-system)
3041 (propagated-inputs
3042 `(("python-six" ,python-six)
3043 ("python-snowballstemmer" ,python-snowballstemmer)))
3044 (home-page
3045 "https://github.com/PyCQA/pydocstyle/")
3046 (synopsis "Python docstring style checker")
3047 (description
3048 "This package provides a style checker for the Python Language
3049 Server (PLS).")
3050 (license license:expat)))
3051
3052 (define-public python-language-server
3053 (package
3054 (name "python-language-server")
3055 (version "0.31.6")
3056 (source
3057 (origin
3058 (method url-fetch)
3059 (uri (pypi-uri "python-language-server" version))
3060 (sha256
3061 (base32
3062 "0cqrffd5272p2hifa35rf1h1g6dss741jmjkwa43jninifmbz0df"))))
3063 (build-system python-build-system)
3064 (propagated-inputs
3065 `(("python-pluggy" ,python-pluggy)
3066 ("python-jsonrpc-server" ,python-jsonrpc-server)
3067 ("python-jedi" ,python-jedi)
3068 ("python-yapf" ,python-yapf)
3069 ("python-pyflakes" ,python-pyflakes)
3070 ("python-pydocstyle" ,python-pydocstyle)
3071 ("python-pycodestyle" ,python-pycodestyle)
3072 ("python-mccabe" ,python-mccabe)
3073 ("python-rope" ,python-rope)
3074 ("python-autopep8" ,python-autopep8)
3075 ("python-flake8" ,python-flake8)
3076 ("python-pylint" ,python-pylint)))
3077 (home-page "https://github.com/palantir/python-language-server")
3078 (synopsis "Python implementation of the Language Server Protocol")
3079 (description
3080 "The Python Language Server (pyls) is an implementation of the Python 3
3081 language specification for the Language Server Protocol (LSP). This tool is
3082 used in text editing environments to provide a complete and integrated
3083 feature-set for programming Python effectively.")
3084 (license license:expat)))
3085
3086 (define-public python-black
3087 (package
3088 (name "python-black")
3089 (version "18.6b4")
3090 (source
3091 (origin
3092 (method url-fetch)
3093 (uri (pypi-uri "black" version))
3094 (sha256
3095 (base32
3096 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3097 (build-system python-build-system)
3098 (arguments
3099 `(#:phases
3100 (modify-phases %standard-phases
3101 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3102 (lambda _
3103 (let ((python3 (which "python3")))
3104 (substitute* '("tests/data/fmtonoff.py"
3105 "tests/data/string_prefixes.py"
3106 "tests/data/function.py")
3107 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3108 (string-append "#!" python3 (if (string? minor-version)
3109 minor-version
3110 ""))))))))))
3111 (propagated-inputs
3112 `(("python-click" ,python-click)
3113 ("python-attrs" ,python-attrs)
3114 ("python-appdirs" ,python-appdirs)
3115 ("python-toml" ,python-toml)))
3116 (home-page "https://github.com/ambv/black")
3117 (synopsis "The uncompromising code formatter")
3118 (description "Black is the uncompromising Python code formatter.")
3119 (license license:expat)))
3120
3121 (define-public python-blinker
3122 (package
3123 (name "python-blinker")
3124 (version "1.4")
3125 (source
3126 (origin
3127 (method url-fetch)
3128 (uri (pypi-uri "blinker" version))
3129 (sha256
3130 (base32
3131 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3132 (build-system python-build-system)
3133 (home-page "http://pythonhosted.org/blinker/")
3134 (synopsis "Fast, simple object-to-object and broadcast signaling")
3135 (description
3136 "Blinker provides a fast dispatching system that allows any number of
3137 interested parties to subscribe to events, or \"signals\".")
3138 (license license:expat)))
3139
3140 (define-public python2-blinker
3141 (package-with-python2 python-blinker))
3142
3143 (define-public pelican
3144 (package
3145 (name "pelican")
3146 (version "4.2.0")
3147 (source
3148 (origin
3149 (method url-fetch)
3150 (uri (pypi-uri "pelican" version))
3151 (sha256
3152 (base32
3153 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
3154 (build-system python-build-system)
3155 (propagated-inputs
3156 `(("python-blinker" ,python-blinker)
3157 ("python-dateutil" ,python-dateutil)
3158 ("python-docutils" ,python-docutils)
3159 ("python-feedgenerator" ,python-feedgenerator)
3160 ("python-jinja2" ,python-jinja2)
3161 ("python-markdown" ,python-markdown)
3162 ("python-pygments" ,python-pygments)
3163 ("python-pytz" ,python-pytz)
3164 ("python-six" ,python-six)
3165 ("python-unidecode" ,python-unidecode)))
3166 (home-page "https://getpelican.com/")
3167 (arguments
3168 `(;; XXX Requires a lot more packages to do unit tests :P
3169 #:tests? #f))
3170 (synopsis "Python-based static site publishing system")
3171 (description
3172 "Pelican is a tool to generate a static blog from reStructuredText,
3173 Markdown input files, and more. Pelican uses Jinja2 for templating
3174 and is very extensible.")
3175 (license license:agpl3+)))
3176
3177 (define-public mallard-ducktype
3178 (package
3179 (name "mallard-ducktype")
3180 (version "1.0.2")
3181 (source
3182 (origin
3183 (method git-fetch)
3184 ;; git-reference because tests are not included in pypi source tarball
3185 ;; https://issues.guix.gnu.org/issue/36755#2
3186 (uri (git-reference
3187 (url "https://github.com/projectmallard/mallard-ducktype.git")
3188 (commit version)))
3189 (file-name (git-file-name name version))
3190 (sha256
3191 (base32
3192 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3193 (build-system python-build-system)
3194 (arguments
3195 '(#:phases
3196 (modify-phases %standard-phases
3197 (replace 'check
3198 (lambda _
3199 (with-directory-excursion "tests"
3200 (invoke "sh" "runtests")))))))
3201 (home-page "http://projectmallard.org")
3202 (synopsis "Convert Ducktype to Mallard documentation markup")
3203 (description
3204 "Ducktype is a lightweight syntax that can represent all the semantics
3205 of the Mallard XML documentation system. Ducktype files can be converted to
3206 Mallard using the @command{ducktype} tool. The yelp-tools package
3207 provides additional functionality on the produced Mallard documents.")
3208 (license license:expat)))
3209
3210 (define-public python-cython
3211 (package
3212 (name "python-cython")
3213 (version "0.29.13")
3214 (source
3215 (origin
3216 (method url-fetch)
3217 (uri (pypi-uri "Cython" version))
3218 (sha256
3219 (base32
3220 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3221 (build-system python-build-system)
3222 ;; we need the full python package and not just the python-wrapper
3223 ;; because we need libpython3.3m.so
3224 (inputs
3225 `(("python" ,python)))
3226 (arguments
3227 `(#:phases
3228 (modify-phases %standard-phases
3229 (add-before 'check 'set-HOME
3230 ;; some tests require access to "$HOME/.cython"
3231 (lambda _ (setenv "HOME" "/tmp") #t))
3232
3233 ;; FIXME: These tests started failing on armhf after the 0.28 update
3234 ;; (commit c69d11c5930), both with an error such as this:
3235 ;; compiling (cpp) and running dictcomp ...
3236 ;; === C/C++ compiler error output: ===
3237 ;; ‘
3238 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3239 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3240 ,@(if (target-arm32?)
3241 `((add-before 'check 'disable-failing-tests
3242 (lambda _
3243 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3244 (for-each (lambda (test)
3245 (format disabled-tests "~a\n" test))
3246 '("memslice" "dictcomp"))
3247 (close-port disabled-tests)))))
3248 '())
3249
3250 (replace 'check
3251 (lambda _
3252 ;; Disable compiler optimizations to greatly reduce the running
3253 ;; time of the test suite.
3254 (setenv "CFLAGS" "-O0")
3255
3256 (invoke "python" "runtests.py" "-vv"
3257 "-j" (number->string (parallel-job-count))))))))
3258 (home-page "https://cython.org/")
3259 (synopsis "C extensions for Python")
3260 (description "Cython is an optimising static compiler for both the Python
3261 programming language and the extended Cython programming language. It makes
3262 writing C extensions for Python as easy as Python itself.")
3263 (license license:asl2.0)
3264 (properties `((python2-variant . ,(delay python2-cython))))))
3265
3266 (define-public python2-cython
3267 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3268 (package
3269 (inherit base)
3270 (name "python2-cython")
3271 (inputs
3272 `(("python-2" ,python-2))) ;this is not automatically changed
3273 (arguments
3274 (substitute-keyword-arguments (package-arguments base)
3275 ((#:phases phases)
3276 `(modify-phases ,phases
3277 (add-before 'check 'adjust-test_embed
3278 (lambda _
3279 (substitute* "runtests.py"
3280 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3281 ;; so it can give the right -L flag to GCC when embedding static
3282 ;; builds of Python. It is unaware that the Python "config"
3283 ;; directory (where the static library lives) was renamed in
3284 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3285 ;; which works fine, because that is where the shared library is.
3286 ;;
3287 ;; It also appears to be unaware that the Makefile in Demos/embed
3288 ;; already unconditionally pass the static library location to GCC,
3289 ;; after checking sysconfig.get_config_var('LIBPL).
3290 ;;
3291 ;; The effect is that the linker is unable to resolve libexpat
3292 ;; symbols when building for Python 2, because neither the Python 2
3293 ;; shared library nor Expat is available. To fix it, we can either
3294 ;; add Expat as an input and make it visible to the linker, or just
3295 ;; prevent it from overriding the Python shared library location.
3296 ;; The end result is identical, so we take the easy route.
3297 ((" or libname not in os\\.listdir\\(libdir\\)")
3298 ""))
3299 #t)))))))))
3300
3301 ;; The RPython toolchain currently does not support Python 3.
3302 (define-public python2-rpython
3303 (package
3304 (name "python2-rpython")
3305 (version "0.2.1")
3306 (source
3307 (origin
3308 (method url-fetch)
3309 (uri (pypi-uri "rpython" version))
3310 (sha256
3311 (base32
3312 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3313 (build-system python-build-system)
3314 (arguments `(#:python ,python-2))
3315 (native-inputs
3316 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3317 (home-page "https://rpython.readthedocs.org")
3318 (synopsis "Framework for implementing interpreters and virtual machines")
3319 (description "RPython is a translation and support framework for
3320 producing implementations of dynamic languages, emphasizing a clean separation
3321 between language specification and implementation aspects.")
3322 (license license:expat)))
3323
3324 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3325 ;; python-scipy still build, as these three packages are often used together.
3326 (define-public python-numpy
3327 (package
3328 (name "python-numpy")
3329 (version "1.17.3")
3330 (source
3331 (origin
3332 (method url-fetch)
3333 (uri (string-append
3334 "https://github.com/numpy/numpy/releases/download/v"
3335 version "/numpy-" version ".tar.gz"))
3336 (sha256
3337 (base32
3338 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3339 (build-system python-build-system)
3340 (inputs
3341 `(("openblas" ,openblas)
3342 ("lapack" ,lapack)))
3343 (native-inputs
3344 `(("python-cython" ,python-cython)
3345 ("python-pytest" ,python-pytest)
3346 ("gfortran" ,gfortran)))
3347 (arguments
3348 `(#:phases
3349 (modify-phases %standard-phases
3350 (add-before 'build 'configure-blas-lapack
3351 (lambda* (#:key inputs #:allow-other-keys)
3352 (call-with-output-file "site.cfg"
3353 (lambda (port)
3354 (format port
3355 "[openblas]
3356 libraries = openblas
3357 library_dirs = ~a/lib
3358 include_dirs = ~a/include
3359
3360 # backslash-n to make emacs happy
3361 \n[lapack]
3362 lapack_libs = lapack
3363 library_dirs = ~a/lib
3364 include_dirs = ~a/include
3365 "
3366 (assoc-ref inputs "openblas")
3367 (assoc-ref inputs "openblas")
3368 (assoc-ref inputs "lapack")
3369 (assoc-ref inputs "lapack"))))
3370 #t))
3371 (add-before 'build 'fix-executable-paths
3372 (lambda* (#:key inputs #:allow-other-keys)
3373 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3374 ;; instead of /bin/sh.
3375 (substitute* "numpy/distutils/exec_command.py"
3376 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3377 (string-append match-start (assoc-ref inputs "bash") match-end)))
3378 ;; Use "gcc" executable, not "cc".
3379 (substitute* "numpy/distutils/system_info.py"
3380 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3381 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3382 #t))
3383 ;; Tests can only be run after the library has been installed and not
3384 ;; within the source directory.
3385 (delete 'check)
3386 (add-after 'install 'check
3387 (lambda* (#:key outputs inputs #:allow-other-keys)
3388 ;; Make installed package available for running the tests
3389 (add-installed-pythonpath inputs outputs)
3390 ;; Make sure "f2py" etc is found.
3391 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3392 ":" (getenv "PATH")))
3393 (with-directory-excursion "/tmp"
3394 (invoke "python" "-c"
3395 "import numpy; numpy.test(verbose=2)")))))))
3396 (home-page "http://www.numpy.org/")
3397 (synopsis "Fundamental package for scientific computing with Python")
3398 (description "NumPy is the fundamental package for scientific computing
3399 with Python. It contains among other things: a powerful N-dimensional array
3400 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3401 and Fortran code, useful linear algebra, Fourier transform, and random number
3402 capabilities.")
3403 (properties `((python2-variant . ,(delay python2-numpy))))
3404 (license license:bsd-3)))
3405
3406 ;; Numpy 1.16.x are the last versions that support Python 2.
3407 (define-public python2-numpy
3408 (let ((numpy (package-with-python2
3409 (strip-python2-variant python-numpy))))
3410 (package/inherit
3411 numpy
3412 (version "1.16.5")
3413 (source (origin
3414 (method url-fetch)
3415 (uri (string-append
3416 "https://github.com/numpy/numpy/releases/download/v"
3417 version "/numpy-" version ".tar.gz"))
3418 (sha256
3419 (base32
3420 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3421
3422 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3423 ;; interest only for legacy code going back to NumPy's predecessor
3424 ;; Numeric.
3425 (define-public python2-numpy-1.8
3426 (package (inherit python2-numpy)
3427 (version "1.8.2")
3428 (source
3429 (origin
3430 (method git-fetch)
3431 (uri (git-reference
3432 (url "https://github.com/numpy/numpy")
3433 (commit (string-append "v" version))))
3434 (file-name (git-file-name "numpy" version))
3435 (sha256
3436 (base32
3437 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
3438 (arguments
3439 (substitute-keyword-arguments (package-arguments python2-numpy)
3440 ((#:phases phases)
3441 `(modify-phases ,phases
3442 (replace 'configure-blas-lapack
3443 (lambda* (#:key inputs #:allow-other-keys)
3444 (call-with-output-file "site.cfg"
3445 (lambda (port)
3446 (format port
3447 "[openblas]
3448 libraries = openblas,lapack
3449 library_dirs = ~a/lib:~a/lib
3450 include_dirs = ~a/include:~a/include
3451 "
3452 (assoc-ref inputs "openblas")
3453 (assoc-ref inputs "lapack")
3454 (assoc-ref inputs "openblas")
3455 (assoc-ref inputs "lapack"))))
3456 #t))))))
3457 (native-inputs
3458 `(("python2-nose" ,python2-nose)))
3459 (description "NumPy is the fundamental package for scientific computing
3460 with Python. It contains among other things: a powerful N-dimensional array
3461 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3462 and Fortran code, useful linear algebra, Fourier transform, and random number
3463 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3464 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3465 Numeric.")
3466 (license license:bsd-3)))
3467
3468 (define-public python-munch
3469 (package
3470 (name "python-munch")
3471 (version "2.0.4")
3472 (source
3473 (origin
3474 (method url-fetch)
3475 (uri (pypi-uri "munch" version))
3476 (sha256
3477 (base32
3478 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3479 (build-system python-build-system)
3480 (home-page "https://github.com/Infinidat/munch")
3481 (synopsis "Dot-accessible dictionary")
3482 (description "Munch is a dot-accessible dictionary similar to JavaScript
3483 objects.")
3484 (license license:expat)))
3485
3486 (define-public python2-munch
3487 (package-with-python2 python-munch))
3488
3489 (define-public python-colormath
3490 (package
3491 (name "python-colormath")
3492 (version "3.0.0")
3493 (source
3494 (origin
3495 (method url-fetch)
3496 (uri (pypi-uri "colormath" version))
3497 (sha256
3498 (base32
3499 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3500 (build-system python-build-system)
3501 (propagated-inputs
3502 `(("python-networkx" ,python-networkx)
3503 ("python-numpy" ,python-numpy)))
3504 (home-page "https://github.com/gtaylor/python-colormath")
3505 (synopsis "Color math and conversion library")
3506 (description
3507 "This is a Python library for color math and conversions.")
3508 (license license:bsd-3)))
3509
3510 (define-public python2-colormath
3511 (package-with-python2 python-colormath))
3512
3513 (define-public python-spectra
3514 (package
3515 (name "python-spectra")
3516 (version "0.0.11")
3517 (source
3518 (origin
3519 (method url-fetch)
3520 (uri (pypi-uri "spectra" version))
3521 (sha256
3522 (base32
3523 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3524 (build-system python-build-system)
3525 (arguments
3526 `(#:phases
3527 (modify-phases %standard-phases
3528 (replace 'check
3529 (lambda _ (invoke "nosetests" "-v"))))))
3530 (propagated-inputs
3531 `(("python-colormath" ,python-colormath)))
3532 (native-inputs
3533 `(("python-nose" ,python-nose)))
3534 (home-page "https://github.com/jsvine/spectra")
3535 (synopsis "Color scales and color conversion")
3536 (description
3537 "This package provides a Python library intended to make color math,
3538 color scales, and color space conversion easy. It has support for:
3539
3540 @enumerate
3541 @item Color scales
3542 @item Color ranges
3543 @item Color blending
3544 @item Brightening/darkening colors
3545 @item Saturating/desaturating colors
3546 @item Conversion to/from multiple color spaces.
3547 @end enumerate\n")
3548 (license license:expat)))
3549
3550 (define-public python2-spectra
3551 (package-with-python2 python-spectra))
3552
3553 (define-public python-numpy-documentation
3554 (package
3555 (name "python-numpy-documentation")
3556 (version (package-version python-numpy))
3557 (source (package-source python-numpy))
3558 (build-system python-build-system)
3559 (native-inputs
3560 `(("python-matplotlib" ,python-matplotlib)
3561 ("python-numpy" ,python-numpy)
3562 ("pkg-config" ,pkg-config)
3563 ("python-sphinx" ,python-sphinx)
3564 ("python-numpydoc" ,python-numpydoc)
3565 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3566 texlive-fonts-ec
3567 texlive-generic-ifxetex
3568 texlive-generic-pdftex
3569 texlive-amsfonts
3570 texlive-latex-capt-of
3571 texlive-latex-cmap
3572 texlive-latex-environ
3573 texlive-latex-eqparbox
3574 texlive-latex-etoolbox
3575 texlive-latex-expdlist
3576 texlive-latex-fancyhdr
3577 texlive-latex-fancyvrb
3578 texlive-latex-fncychap
3579 texlive-latex-float
3580 texlive-latex-framed
3581 texlive-latex-geometry
3582 texlive-latex-graphics
3583 texlive-latex-hyperref
3584 texlive-latex-mdwtools
3585 texlive-latex-multirow
3586 texlive-latex-needspace
3587 texlive-latex-oberdiek
3588 texlive-latex-parskip
3589 texlive-latex-preview
3590 texlive-latex-tabulary
3591 texlive-latex-threeparttable
3592 texlive-latex-titlesec
3593 texlive-latex-trimspaces
3594 texlive-latex-ucs
3595 texlive-latex-upquote
3596 texlive-latex-url
3597 texlive-latex-varwidth
3598 texlive-latex-wrapfig)))
3599 ("texinfo" ,texinfo)
3600 ("perl" ,perl)
3601 ("scipy-sphinx-theme"
3602 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3603 (method git-fetch)
3604 (uri (git-reference
3605 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3606 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3607 (sha256
3608 (base32
3609 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3610 ,@(package-native-inputs python-numpy)))
3611 (arguments
3612 `(#:tests? #f ; we're only generating the documentation
3613 #:phases
3614 (modify-phases %standard-phases
3615 (delete 'build)
3616 (replace 'install
3617 (lambda* (#:key inputs outputs #:allow-other-keys)
3618 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3619 (doc (string-append
3620 data "/doc/" ,name "-"
3621 ,(package-version python-numpy)))
3622 (info-reader (string-append data "/info"))
3623 (html (string-append doc "/html"))
3624 (scipy-sphinx-theme "scipy-sphinx-theme")
3625 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3626 (pyver ,(string-append "PYVER=")))
3627
3628 ;; FIXME: this is needed to for texlive-union to generate
3629 ;; fonts, which are not found.
3630 (setenv "HOME" "/tmp")
3631
3632 (with-directory-excursion "doc"
3633 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3634 (mkdir-p html)
3635 (invoke "make" "html" pyver)
3636 (invoke "make" "latex" "PAPER=a4" pyver)
3637 (invoke "make" "-C" "build/latex"
3638 "all-pdf" "PAPER=a4" pyver)
3639 ;; FIXME: Generation of the info file fails.
3640 ;; (invoke "make" "info" pyver)
3641 ;; (mkdir-p info)
3642 ;; (copy-file "build/texinfo/numpy.info"
3643 ;; (string-append info "/numpy.info"))
3644 (for-each (lambda (file)
3645 (copy-file (string-append "build/latex" file)
3646 (string-append doc file)))
3647 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3648 (with-directory-excursion "build/html"
3649 (for-each (lambda (file)
3650 (let* ((dir (dirname file))
3651 (tgt-dir (string-append html "/" dir)))
3652 (unless (equal? "." dir)
3653 (mkdir-p tgt-dir))
3654 (install-file file html)))
3655 (find-files "." ".*")))))
3656 #t)))))
3657 (home-page (package-home-page python-numpy))
3658 (synopsis "Documentation for the python-numpy package")
3659 (description (package-description python-numpy))
3660 (license (package-license python-numpy))))
3661
3662 (define-public python2-numpy-documentation
3663 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3664 (package
3665 (inherit numpy-documentation)
3666 (native-inputs `(("python2-functools32" ,python2-functools32)
3667 ,@(package-native-inputs numpy-documentation))))))
3668
3669 (define-public python-pygit2
3670 (package
3671 (name "python-pygit2")
3672 (version "0.28.2")
3673 (source
3674 (origin
3675 (method url-fetch)
3676 (uri (pypi-uri "pygit2" version))
3677 (sha256
3678 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3679 (build-system python-build-system)
3680 (arguments
3681 '(#:tests? #f)) ; tests don't run correctly in our environment
3682 (propagated-inputs
3683 `(("python-six" ,python-six)
3684 ("python-cffi" ,python-cffi)
3685 ("libgit2" ,libgit2)
3686 ("python-tox" ,python-tox)))
3687 (native-inputs
3688 `(("python-pytest" ,python-pytest)))
3689 (home-page "https://github.com/libgit2/pygit2")
3690 (synopsis "Python bindings for libgit2")
3691 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3692 library, libgit2 implements Git plumbing.")
3693 ;; GPL2.0 only, with linking exception.
3694 (license license:gpl2)))
3695
3696 (define-public python2-pygit2
3697 (package-with-python2 python-pygit2))
3698
3699 (define-public python-pyparsing
3700 (package
3701 (name "python-pyparsing")
3702 (version "2.3.1")
3703 (source
3704 (origin
3705 (method url-fetch)
3706 (uri (pypi-uri "pyparsing" version))
3707 (sha256
3708 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3709 (build-system python-build-system)
3710 (outputs '("out" "doc"))
3711 (arguments
3712 `(#:tests? #f ; no test target
3713 #:phases
3714 (modify-phases %standard-phases
3715 (add-after 'install 'install-doc
3716 (lambda* (#:key outputs #:allow-other-keys)
3717 (let* ((doc (string-append (assoc-ref outputs "doc")
3718 "/share/doc/" ,name "-" ,version))
3719 (html-doc (string-append doc "/html"))
3720 (examples (string-append doc "/examples")))
3721 (mkdir-p html-doc)
3722 (mkdir-p examples)
3723 (for-each
3724 (lambda (dir tgt)
3725 (map (lambda (file)
3726 (install-file file tgt))
3727 (find-files dir ".*")))
3728 (list "docs" "htmldoc" "examples")
3729 (list doc html-doc examples))
3730 #t))))))
3731 (home-page "https://github.com/pyparsing/pyparsing")
3732 (synopsis "Python parsing class library")
3733 (description
3734 "The pyparsing module is an alternative approach to creating and
3735 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3736 of regular expressions. The pyparsing module provides a library of classes
3737 that client code uses to construct the grammar directly in Python code.")
3738 (license license:expat)))
3739
3740 (define-public python2-pyparsing
3741 (package-with-python2 python-pyparsing))
3742
3743 (define-public python-numpydoc
3744 (package
3745 (name "python-numpydoc")
3746 (version "0.8.0")
3747 (source
3748 (origin
3749 (method url-fetch)
3750 (uri (pypi-uri "numpydoc" version))
3751 (sha256
3752 (base32
3753 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3754 (build-system python-build-system)
3755 (propagated-inputs
3756 `(("python-sphinx" ,python-sphinx)))
3757 (native-inputs
3758 `(("python-nose" ,python-nose)))
3759 (home-page "https://pypi.python.org/pypi/numpydoc")
3760 (synopsis
3761 "Numpy's Sphinx extensions")
3762 (description
3763 "Sphinx extension to support docstrings in Numpy format.")
3764 (license license:bsd-2)))
3765
3766 (define-public python2-numpydoc
3767 (package-with-python2 python-numpydoc))
3768
3769 (define-public python-numexpr
3770 (package
3771 (name "python-numexpr")
3772 (version "2.6.5")
3773 (source
3774 (origin
3775 (method url-fetch)
3776 (uri (pypi-uri "numexpr" version))
3777 (sha256
3778 (base32
3779 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3780 (build-system python-build-system)
3781 (arguments `(#:tests? #f)) ; no tests included
3782 (propagated-inputs
3783 `(("python-numpy" ,python-numpy)))
3784 (home-page "https://github.com/pydata/numexpr")
3785 (synopsis "Fast numerical expression evaluator for NumPy")
3786 (description
3787 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3788 expressions that operate on arrays are accelerated and use less memory than
3789 doing the same calculation in Python. In addition, its multi-threaded
3790 capabilities can make use of all your cores, which may accelerate
3791 computations, most specially if they are not memory-bounded (e.g. those using
3792 transcendental functions).")
3793 (license license:expat)))
3794
3795 (define-public python2-numexpr
3796 (package-with-python2 python-numexpr))
3797
3798 (define-public python-cycler
3799 (package
3800 (name "python-cycler")
3801 (version "0.10.0")
3802 (source (origin
3803 (method url-fetch)
3804 (uri (pypi-uri "cycler" version))
3805 (sha256
3806 (base32
3807 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3808 (build-system python-build-system)
3809 (arguments
3810 ;; XXX: The current version requires 'coveralls' which we don't have.
3811 ;; Enable this for the next release which uses 'python-pytest'.
3812 '(#:tests? #f))
3813 (propagated-inputs
3814 `(("python-six" ,python-six)))
3815 (home-page "http://matplotlib.org/cycler/")
3816 (synopsis "Composable keyword argument iterator")
3817 (description
3818 "When using @code{matplotlib} and plotting more than one line, it is
3819 common to want to be able to want to be able to cycle over one or more artist
3820 styles; but the plotting logic can quickly become involved.
3821 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3822 @code{Cycler} class was developed.")
3823 (license license:bsd-3)))
3824
3825 (define-public python2-cycler
3826 (package-with-python2 python-cycler))
3827
3828 (define-public python-colorspacious
3829 (package
3830 (name "python-colorspacious")
3831 (version "1.1.2")
3832 (source
3833 (origin
3834 (method git-fetch)
3835 (uri (git-reference
3836 (url "https://github.com/njsmith/colorspacious.git")
3837 (commit (string-append "v" version))))
3838 (file-name (git-file-name name version))
3839 (sha256
3840 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3841 (build-system python-build-system)
3842 (propagated-inputs
3843 `(("python-numpy" ,python-numpy)))
3844 (native-inputs
3845 `(("python-nose" ,python-nose)))
3846 (arguments
3847 `(#:phases
3848 (modify-phases %standard-phases
3849 (replace 'check
3850 (lambda _
3851 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3852 (home-page "https://github.com/njsmith/colorspacious")
3853 (synopsis "Python library for colorspace conversions")
3854 (description "@code{colorspacious} is a Python library that lets you
3855 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3856 (license license:expat)))
3857
3858 (define-public python2-colorspacious
3859 (package-with-python2 python-colorspacious))
3860
3861 (define-public python-matplotlib
3862 (package
3863 (name "python-matplotlib")
3864 (version "3.1.2")
3865 (source
3866 (origin
3867 (method url-fetch)
3868 (uri (pypi-uri "matplotlib" version))
3869 (sha256
3870 (base32
3871 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
3872 (build-system python-build-system)
3873 (propagated-inputs ; the following packages are all needed at run time
3874 `(("python-cycler" ,python-cycler)
3875 ("python-kiwisolver" ,python-kiwisolver)
3876 ("python-pyparsing" ,python-pyparsing)
3877 ("python-pygobject" ,python-pygobject)
3878 ("gobject-introspection" ,gobject-introspection)
3879 ("python-tkinter" ,python "tk")
3880 ("python-dateutil" ,python-dateutil)
3881 ("python-numpy" ,python-numpy)
3882 ("python-pillow" ,python-pillow)
3883 ("python-pytz" ,python-pytz)
3884 ("python-six" ,python-six)
3885 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3886 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3887 ;; object. For this reason we need to import both libraries.
3888 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3889 ("python-pycairo" ,python-pycairo)
3890 ("python-cairocffi" ,python-cairocffi)))
3891 (inputs
3892 `(("libpng" ,libpng)
3893 ("imagemagick" ,imagemagick)
3894 ("freetype" ,freetype)
3895 ("cairo" ,cairo)
3896 ("glib" ,glib)
3897 ;; FIXME: Add backends when available.
3898 ;("python-wxpython" ,python-wxpython)
3899 ("tcl" ,tcl)
3900 ("tk" ,tk)))
3901 (native-inputs
3902 `(("pkg-config" ,pkg-config)
3903 ("python-pytest" ,python-pytest)
3904 ("python-mock" ,python-mock)
3905 ("unzip" ,unzip)
3906 ("jquery-ui"
3907 ,(origin
3908 (method url-fetch)
3909 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3910 (sha256
3911 (base32
3912 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3913 (arguments
3914 `(#:phases
3915 (modify-phases %standard-phases
3916 ;; XXX We disable all image comparison tests because we're using a
3917 ;; newer version of FreeType than matplotlib expects. This leads to
3918 ;; minor differences throughout the tests.
3919 (add-after 'unpack 'fix-and-disable-failing-tests
3920 (lambda _
3921 (substitute* (append (find-files "lib/matplotlib/tests/"
3922 "test_.*\\.py$")
3923 (find-files "lib/mpl_toolkits/tests"
3924 "test_.*\\.py$"))
3925 (("^from matplotlib" match)
3926 (string-append "import pytest\n" match))
3927 (("( *)@image_comparison" match indent)
3928 (string-append indent
3929 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3930 match)))
3931 (substitute* "lib/matplotlib/tests/test_animation.py"
3932 (("/bin/sh") (which "sh")))
3933 (for-each delete-file
3934 ;; test_normal_axes, test_get_tightbbox_polar
3935 '("lib/matplotlib/tests/test_axes.py"
3936 ;; We don't use the webagg backend and this test forces it.
3937 "lib/matplotlib/tests/test_backend_webagg.py"
3938 ;; test_outward_ticks
3939 "lib/matplotlib/tests/test_tightlayout.py"
3940 ;; test_hidden_axes fails with minor extent
3941 ;; differences, possibly due to the use of a
3942 ;; different version of FreeType.
3943 "lib/matplotlib/tests/test_constrainedlayout.py"
3944 ;; Fontconfig returns no fonts.
3945 "lib/matplotlib/tests/test_font_manager.py"))
3946 #t))
3947 (add-before 'install 'install-jquery-ui
3948 (lambda* (#:key outputs inputs #:allow-other-keys)
3949 (let ((dir (string-append (assoc-ref outputs "out")
3950 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3951 (mkdir-p dir)
3952 (invoke "unzip"
3953 (assoc-ref inputs "jquery-ui")
3954 "-d" dir))
3955 #t))
3956 (replace 'check
3957 (lambda* (#:key outputs inputs #:allow-other-keys)
3958 (add-installed-pythonpath inputs outputs)
3959 (invoke "python" "tests.py" "-v"
3960 "-m" "not network and not webagg")))
3961 (add-before 'build 'configure-environment
3962 (lambda* (#:key outputs inputs #:allow-other-keys)
3963 (let ((cairo (assoc-ref inputs "cairo")))
3964 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3965 ;; has not effect.
3966 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3967 (setenv "HOME" (getcwd))
3968 (call-with-output-file "setup.cfg"
3969 (lambda (port)
3970 (format port "[directories]~%
3971 basedirlist = ~a,~a~%
3972 [packages]~%
3973 tests = True~%"
3974 (assoc-ref inputs "tcl")
3975 (assoc-ref inputs "tk")))))
3976 #t)))))
3977 (home-page "https://matplotlib.org/")
3978 (synopsis "2D plotting library for Python")
3979 (description
3980 "Matplotlib is a Python 2D plotting library which produces publication
3981 quality figures in a variety of hardcopy formats and interactive environments
3982 across platforms. Matplotlib can be used in Python scripts, the python and
3983 ipython shell, web application servers, and six graphical user interface
3984 toolkits.")
3985 (license license:psfl)
3986 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3987
3988 (define-public python2-matplotlib
3989 (let ((matplotlib (package-with-python2
3990 (strip-python2-variant python-matplotlib))))
3991 (package (inherit matplotlib)
3992 (version "2.2.4")
3993 (source
3994 (origin
3995 (method url-fetch)
3996 (uri (pypi-uri "matplotlib" version))
3997 (sha256
3998 (base32
3999 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4000 (arguments
4001 (substitute-keyword-arguments (package-arguments matplotlib)
4002 ((#:phases phases)
4003 `(modify-phases ,phases
4004 (replace 'install-jquery-ui
4005 (lambda* (#:key outputs inputs #:allow-other-keys)
4006 (let ((dir (string-append (assoc-ref outputs "out")
4007 "/lib/python2.7/site-packages/"
4008 "matplotlib/backends/web_backend/")))
4009 (mkdir-p dir)
4010 (invoke "unzip"
4011 (assoc-ref inputs "jquery-ui")
4012 "-d" dir))
4013 #t))
4014 (delete 'fix-and-disable-failing-tests)
4015 (delete 'check))))) ; These tests weren't run the the past.
4016 ;; Make sure to use special packages for Python 2 instead
4017 ;; of those automatically rewritten by package-with-python2.
4018 (propagated-inputs
4019 `(("python2-pycairo" ,python2-pycairo)
4020 ("python2-backports-functools-lru-cache"
4021 ,python2-backports-functools-lru-cache)
4022 ("python2-functools32" ,python2-functools32)
4023 ("python2-pygobject-2" ,python2-pygobject-2)
4024 ("python2-subprocess32" ,python2-subprocess32)
4025 ("python2-tkinter" ,python-2 "tk")
4026 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4027 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4028
4029 (define-public python-matplotlib-documentation
4030 (package
4031 (name "python-matplotlib-documentation")
4032 (version (package-version python-matplotlib))
4033 (source (package-source python-matplotlib))
4034 (build-system python-build-system)
4035 (native-inputs
4036 `(("python-matplotlib" ,python-matplotlib)
4037 ("python-colorspacious" ,python-colorspacious)
4038 ("python-sphinx" ,python-sphinx)
4039 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4040 ("python-sphinx-gallery" ,python-sphinx-gallery)
4041 ("python-numpydoc" ,python-numpydoc)
4042 ("python-ipython" ,python-ipython)
4043 ("python-ipykernel" ,python-ipykernel)
4044 ("python-mock" ,python-mock)
4045 ("graphviz" ,graphviz)
4046 ("texlive" ,(texlive-union (list texlive-amsfonts
4047 texlive-latex-amsmath
4048 texlive-latex-enumitem
4049 texlive-latex-expdlist
4050 texlive-latex-geometry
4051 texlive-latex-preview
4052 texlive-latex-type1cm
4053 texlive-latex-ucs
4054
4055 texlive-generic-pdftex
4056
4057 texlive-fonts-ec
4058 texlive-fonts-adobe-times
4059 texlive-fonts-txfonts)))
4060 ("texinfo" ,texinfo)
4061 ,@(package-native-inputs python-matplotlib)))
4062 (arguments
4063 `(#:tests? #f ; we're only generating documentation
4064 #:phases
4065 (modify-phases %standard-phases
4066 ;; The tests in python-matplotlib are run after the install phase, so
4067 ;; we need to delete the extra phase here.
4068 (delete 'check)
4069 (replace 'build
4070 (lambda _
4071 (chdir "doc")
4072 (setenv "PYTHONPATH"
4073 (string-append (getenv "PYTHONPATH")
4074 ":" (getcwd) "/../examples/units"))
4075 (substitute* "conf.py"
4076 ;; Don't use git.
4077 (("^SHA = check_output.*")
4078 (string-append "SHA = \"" ,version "\"\n"))
4079 ;; Don't fetch intersphinx files from the Internet
4080 (("^explicit_order_folders" m)
4081 (string-append "intersphinx_mapping = {}\n" m))
4082 (("'sphinx.ext.intersphinx',") "")
4083 ;; Disable URL embedding which requires internet access.
4084 (("'https://docs.scipy.org/doc/numpy'") "None")
4085 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4086 (invoke "make"
4087 "SPHINXBUILD=sphinx-build"
4088 "SPHINXOPTS=" ; don't abort on warnings
4089 "html" "texinfo")))
4090 (replace 'install
4091 (lambda* (#:key inputs outputs #:allow-other-keys)
4092 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4093 (doc (string-append data "/doc/python-matplotlib-" ,version))
4094 (info (string-append data "/info"))
4095 (html (string-append doc "/html")))
4096 (mkdir-p html)
4097 (mkdir-p info)
4098 (copy-recursively "build/html" html)
4099 (symlink (string-append html "/_images")
4100 (string-append info "/matplotlib-figures"))
4101 (with-directory-excursion "build/texinfo"
4102 (substitute* "matplotlib.texi"
4103 (("@image\\{([^,]*)" all file)
4104 (string-append "@image{matplotlib-figures/" file)))
4105 (symlink (string-append html "/_images")
4106 "./matplotlib-figures")
4107 (invoke "makeinfo" "--no-split"
4108 "-o" "matplotlib.info" "matplotlib.texi"))
4109 (install-file "build/texinfo/matplotlib.info" info))
4110 #t)))))
4111 (home-page (package-home-page python-matplotlib))
4112 (synopsis "Documentation for the python-matplotlib package")
4113 (description (package-description python-matplotlib))
4114 (license (package-license python-matplotlib))))
4115
4116 (define-public python2-matplotlib-documentation
4117 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4118 (package
4119 (inherit parent)
4120 (native-inputs
4121 (alist-delete "python-sphinx-copybutton"
4122 (package-native-inputs parent))))))
4123
4124 (define-public python-matplotlib-venn
4125 (package
4126 (name "python-matplotlib-venn")
4127 (version "0.11.5")
4128 (source
4129 (origin
4130 (method url-fetch)
4131 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4132 (sha256
4133 (base32
4134 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4135 (build-system python-build-system)
4136 (arguments '(#:tests? #f)) ; tests are not included
4137 (propagated-inputs
4138 `(("python-matplotlib" ,python-matplotlib)
4139 ("python-numpy" ,python-numpy)
4140 ("python-scipy" ,python-scipy)))
4141 (native-inputs
4142 `(("unzip" ,unzip)))
4143 (home-page "https://github.com/konstantint/matplotlib-venn")
4144 (synopsis "Plot area-proportional Venn diagrams")
4145 (description
4146 "This package provides tools for plotting area-proportional two- and
4147 three-way Venn diagrams in @code{matplotlib}.")
4148 (license license:expat)))
4149
4150 (define-public python2-pysnptools
4151 (package
4152 (name "python2-pysnptools")
4153 (version "0.3.13")
4154 (source
4155 (origin
4156 (method url-fetch)
4157 (uri (pypi-uri "pysnptools" version))
4158 (sha256
4159 (base32
4160 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4161 (build-system python-build-system)
4162 (arguments
4163 `(#:python ,python-2 ; only Python 2.7 is supported
4164 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4165 (propagated-inputs
4166 `(("python2-numpy" ,python2-numpy)
4167 ("python2-scipy" ,python2-scipy)
4168 ("python2-pandas" ,python2-pandas)))
4169 (native-inputs
4170 `(("python2-cython" ,python2-cython)))
4171 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4172 (synopsis "Library for reading and manipulating genetic data")
4173 (description
4174 "PySnpTools is a library for reading and manipulating genetic data. It
4175 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4176 those files. It can also efficiently manipulate ranges of integers using set
4177 operators such as union, intersection, and difference.")
4178 (license license:asl2.0)))
4179
4180 (define-public python-socksipy-branch
4181 (package
4182 (name "python-socksipy-branch")
4183 (version "1.01")
4184 (source
4185 (origin
4186 (method url-fetch)
4187 (uri (pypi-uri "SocksiPy-branch" version))
4188 (sha256
4189 (base32
4190 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4191 (build-system python-build-system)
4192 (arguments
4193 `(#:tests? #f)) ; There are no tests
4194 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4195 (synopsis "Python SOCKS module")
4196 (description
4197 "SocksiPy - A Python SOCKS client module. It provides a
4198 socket-like interface that supports connections to any TCP
4199 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4200 The original version was developed by Dan Haim, this is a
4201 branch created by Mario Vilas to address some open issues,
4202 as the original project seems to have been abandoned circa 2007.")
4203 (license license:bsd-3)))
4204
4205 (define-public python2-socksipy-branch
4206 (package-with-python2 python-socksipy-branch))
4207
4208 (define-public python-socksipychain
4209 (package
4210 (name "python-socksipychain")
4211 (version "2.1.0")
4212 (source
4213 (origin
4214 (method git-fetch)
4215 (uri (git-reference
4216 (url "https://github.com/pagekite/PySocksipyChain.git")
4217 (commit (string-append "v" version))))
4218 (file-name (git-file-name name version))
4219 (sha256
4220 (base32
4221 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4222 (build-system python-build-system)
4223 (arguments
4224 `(#:tests? #f)) ; Tests try to access the network.
4225 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4226 (synopsis "Python SOCKS module with chained proxies support")
4227 (description
4228 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4229 adds support for arbitrary chaining of proxy servers and various modes of
4230 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4231 a simple netcat replacement with chaining support.")
4232 (license license:bsd-3)))
4233
4234 (define-public python-pycodestyle
4235 (package
4236 (name "python-pycodestyle")
4237 (version "2.5.0")
4238 (source
4239 (origin
4240 (method url-fetch)
4241 (uri (pypi-uri "pycodestyle" version))
4242 (sha256
4243 (base32
4244 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4245 (build-system python-build-system)
4246 (home-page "https://pycodestyle.readthedocs.io/")
4247 (synopsis "Python style guide checker")
4248 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4249 Python code against some of the style conventions in
4250 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4251 (license license:expat)))
4252
4253 (define-public python2-pycodestyle
4254 (package-with-python2 python-pycodestyle))
4255
4256 (define-public python-multidict
4257 (package
4258 (name "python-multidict")
4259 (version "4.2.0")
4260 (source
4261 (origin
4262 (method url-fetch)
4263 (uri (pypi-uri "multidict" version))
4264 (sha256
4265 (base32
4266 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4267 (build-system python-build-system)
4268 (native-inputs
4269 `(("python-pytest" ,python-pytest)
4270 ("python-pytest-runner" ,python-pytest-runner)))
4271 (home-page "https://github.com/aio-libs/multidict/")
4272 (synopsis "Multidict implementation")
4273 (description "Multidict is dict-like collection of key-value pairs
4274 where key might be occurred more than once in the container.")
4275 (license license:asl2.0)))
4276
4277 (define-public python-orderedmultidict
4278 (package
4279 (name "python-orderedmultidict")
4280 (version "0.7.11")
4281 (source
4282 (origin
4283 (method url-fetch)
4284 (uri (pypi-uri "orderedmultidict" version))
4285 (sha256
4286 (base32
4287 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4288 (build-system python-build-system)
4289 (arguments
4290 `(#:phases
4291 (modify-phases %standard-phases
4292 (add-after 'unpack 'fix-tests
4293 (lambda _
4294 ;; The package uses nosetest for running the tests.
4295 ;; Adding this initfile allows to run the test suite
4296 ;; without requiring nosetest.
4297 (with-output-to-file "tests/__init__.py" newline)
4298 #t)))))
4299 (propagated-inputs
4300 `(("python-six" ,python-six)))
4301 (native-inputs
4302 `(("python-pycodestyle" ,python-pycodestyle)))
4303 (home-page "https://github.com/gruns/orderedmultidict")
4304 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4305 (description "This package contains a library for ordered multivalue
4306 dictionaries. A multivalue dictionary is a dictionary that can store
4307 multiple values for the same key. An ordered multivalue dictionary is a
4308 multivalue dictionary that retains the order of insertions and deletions.")
4309 (license license:unlicense)))
4310
4311 (define-public python2-orderedmultidict
4312 (package-with-python2 python-orderedmultidict))
4313
4314 (define-public python-autopep8
4315 (package
4316 (name "python-autopep8")
4317 (version "1.3.5")
4318 (source
4319 (origin
4320 (method url-fetch)
4321 (uri (pypi-uri "autopep8" version))
4322 (sha256
4323 (base32
4324 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4325 (build-system python-build-system)
4326 (propagated-inputs
4327 `(("python-pycodestyle" ,python-pycodestyle)))
4328 (home-page "https://github.com/hhatto/autopep8")
4329 (synopsis "Format Python code according to the PEP 8 style guide")
4330 (description
4331 "@code{autopep8} automatically formats Python code to conform to
4332 the PEP 8 style guide. It uses the pycodestyle utility to determine
4333 what parts of the code needs to be formatted. @code{autopep8} is
4334 capable of fixing most of the formatting issues that can be reported
4335 by pycodestyle.")
4336 (license (license:non-copyleft
4337 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4338
4339 (define-public python2-autopep8
4340 (package-with-python2 python-autopep8))
4341
4342 (define-public python-distutils-extra
4343 (package
4344 (name "python-distutils-extra")
4345 (version "2.38")
4346 (source
4347 (origin
4348 (method url-fetch)
4349 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4350 version "/+download/python-distutils-extra-"
4351 version ".tar.gz"))
4352 (sha256
4353 (base32
4354 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4355 (build-system python-build-system)
4356 (home-page "https://launchpad.net/python-distutils-extra/")
4357 (synopsis "Enhancements to Python's distutils")
4358 (description
4359 "The python-distutils-extra module enables you to easily integrate
4360 gettext support, themed icons, and scrollkeeper-based documentation into
4361 Python's distutils.")
4362 (license license:gpl2)))
4363
4364 (define-public python2-distutils-extra
4365 (package-with-python2 python-distutils-extra))
4366
4367 (define-public python2-elib.intl
4368 (package
4369 (name "python2-elib.intl")
4370 (version "0.0.3")
4371 (source
4372 (origin
4373 ;; This project doesn't tag releases or publish tarballs, so we take
4374 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4375 (method git-fetch)
4376 (uri (git-reference
4377 (url "https://github.com/dieterv/elib.intl.git")
4378 (commit "d09997cfef")))
4379 (file-name (string-append name "-" version "-checkout"))
4380 (sha256
4381 (base32
4382 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4383 (build-system python-build-system)
4384 (arguments
4385 ;; incompatible with Python 3 (exception syntax)
4386 `(#:python ,python-2
4387 #:tests? #f))
4388 (home-page "https://github.com/dieterv/elib.intl")
4389 (synopsis "Enhanced internationalization for Python")
4390 (description
4391 "The elib.intl module provides enhanced internationalization (I18N)
4392 services for your Python modules and applications.")
4393 (license license:lgpl3+)))
4394
4395 (define-public python-olefile
4396 (package
4397 (name "python-olefile")
4398 (version "0.46")
4399 (source
4400 (origin
4401 (method url-fetch)
4402 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4403 "download/v" version "/olefile-" version ".tar.gz"))
4404 (file-name (string-append name "-" version ".tar.gz"))
4405 (sha256
4406 (base32
4407 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4408 (build-system python-build-system)
4409 (home-page "https://www.decalage.info/python/olefileio")
4410 (synopsis "Read and write Microsoft OLE2 files.")
4411 (description
4412 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4413 Storage or Compound Document, Microsoft Office). It is an improved version of
4414 the OleFileIO module from PIL, the Python Image Library.")
4415 (license license:bsd-3)))
4416
4417 (define-public python2-olefile
4418 (package-with-python2 python-olefile))
4419
4420 (define-public python-pillow
4421 (package
4422 (name "python-pillow")
4423 (version "6.2.1")
4424 (source
4425 (origin
4426 (method url-fetch)
4427 (uri (pypi-uri "Pillow" version))
4428 (sha256
4429 (base32
4430 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4431 (build-system python-build-system)
4432 (native-inputs
4433 `(("python-pytest" ,python-pytest)))
4434 (inputs
4435 `(("freetype" ,freetype)
4436 ("lcms" ,lcms)
4437 ("libjpeg" ,libjpeg)
4438 ("libtiff" ,libtiff)
4439 ("libwebp" ,libwebp)
4440 ("openjpeg" ,openjpeg)
4441 ("zlib" ,zlib)))
4442 (propagated-inputs
4443 `(("python-olefile" ,python-olefile)))
4444 (arguments
4445 `(#:phases
4446 (modify-phases %standard-phases
4447 (add-after 'unpack 'patch-ldconfig
4448 (lambda _
4449 (substitute* "setup.py"
4450 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4451 (replace 'check
4452 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4453 (if tests?
4454 (begin
4455 (setenv "HOME" (getcwd))
4456 ;; Make installed package available for running the tests.
4457 (add-installed-pythonpath inputs outputs)
4458 (invoke "python" "selftest.py" "--installed")
4459 (invoke "python" "-m" "pytest" "-vv"))
4460 #t))))))
4461 (home-page "https://python-pillow.org")
4462 (synopsis "Fork of the Python Imaging Library")
4463 (description
4464 "The Python Imaging Library adds image processing capabilities to your
4465 Python interpreter. This library provides extensive file format support, an
4466 efficient internal representation, and fairly powerful image processing
4467 capabilities. The core image library is designed for fast access to data
4468 stored in a few basic pixel formats. It should provide a solid foundation for
4469 a general image processing tool.")
4470 (license (license:x11-style
4471 "http://www.pythonware.com/products/pil/license.htm"
4472 "The PIL Software License"))))
4473
4474 (define-public python2-pillow
4475 (package-with-python2 python-pillow))
4476
4477 (define-public python-pycparser
4478 (package
4479 (name "python-pycparser")
4480 (version "2.19")
4481 (source
4482 (origin
4483 (method url-fetch)
4484 (uri (pypi-uri "pycparser" version))
4485 (sha256
4486 (base32
4487 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4488 (outputs '("out" "doc"))
4489 (build-system python-build-system)
4490 (native-inputs
4491 `(("pkg-config" ,pkg-config)))
4492 (arguments
4493 `(#:phases
4494 (modify-phases %standard-phases
4495 (replace 'check
4496 (lambda _
4497 (with-directory-excursion "tests"
4498 (invoke "python" "all_tests.py"))
4499 #t))
4500 (add-after 'install 'install-doc
4501 (lambda* (#:key outputs #:allow-other-keys)
4502 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4503 (doc (string-append data "/doc/" ,name "-" ,version))
4504 (examples (string-append doc "/examples")))
4505 (mkdir-p examples)
4506 (for-each (lambda (file)
4507 (copy-file (string-append "." file)
4508 (string-append doc file)))
4509 '("/README.rst" "/CHANGES" "/LICENSE"))
4510 (copy-recursively "examples" examples)
4511 #t))))))
4512 (home-page "https://github.com/eliben/pycparser")
4513 (synopsis "C parser in Python")
4514 (description
4515 "Pycparser is a complete parser of the C language, written in pure Python
4516 using the PLY parsing library. It parses C code into an AST and can serve as
4517 a front-end for C compilers or analysis tools.")
4518 (license license:bsd-3)))
4519
4520 (define-public python2-pycparser
4521 (package-with-python2 python-pycparser))
4522
4523 (define-public python-pywavelets
4524 (package
4525 (name "python-pywavelets")
4526 (version "1.0.1")
4527 (home-page "https://github.com/PyWavelets/pywt")
4528 (source (origin
4529 (method url-fetch)
4530 (uri (pypi-uri "PyWavelets" version))
4531 (sha256
4532 (base32
4533 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4534 (build-system python-build-system)
4535 (arguments
4536 '(#:modules ((ice-9 ftw)
4537 (srfi srfi-1)
4538 (srfi srfi-26)
4539 (guix build utils)
4540 (guix build python-build-system))
4541 #:phases (modify-phases %standard-phases
4542 (replace 'check
4543 (lambda _
4544 (let ((cwd (getcwd))
4545 (libdir (find (cut string-prefix? "lib." <>)
4546 (scandir "build"))))
4547 (with-directory-excursion (string-append cwd "/build/" libdir)
4548 (invoke "nosetests" "-v" "."))))))))
4549 (native-inputs
4550 `(("python-matplotlib" ,python-matplotlib) ;for tests
4551 ("python-nose" ,python-nose)))
4552 (propagated-inputs
4553 `(("python-numpy" ,python-numpy)))
4554 (synopsis "Wavelet transforms in Python")
4555 (description
4556 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4557 mathematical basis functions that are localized in both time and frequency.
4558 Wavelet transforms are time-frequency transforms employing wavelets. They are
4559 similar to Fourier transforms, the difference being that Fourier transforms are
4560 localized only in frequency instead of in time and frequency.")
4561 (license license:expat)))
4562
4563 (define-public python2-pywavelets
4564 (package-with-python2 python-pywavelets))
4565
4566 (define-public python-xcffib
4567 (package
4568 (name "python-xcffib")
4569 (version "0.6.0")
4570 (source
4571 (origin
4572 (method url-fetch)
4573 (uri (pypi-uri "xcffib" version))
4574 (sha256
4575 (base32
4576 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4577 (build-system python-build-system)
4578 (inputs
4579 `(("libxcb" ,libxcb)))
4580 (propagated-inputs
4581 `(("python-cffi" ,python-cffi) ; used at run time
4582 ("python-six" ,python-six)))
4583 (arguments
4584 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4585 #:tests? #f
4586 #:phases
4587 (modify-phases %standard-phases
4588 (add-after 'unpack 'fix-libxcb-path
4589 (lambda* (#:key inputs #:allow-other-keys)
4590 (let ((libxcb (assoc-ref inputs "libxcb")))
4591 (substitute* '("xcffib/__init__.py")
4592 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4593 #t)))
4594 (add-after 'install 'install-doc
4595 (lambda* (#:key outputs #:allow-other-keys)
4596 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4597 "/doc/" ,name "-" ,version)))
4598 (mkdir-p doc)
4599 (copy-file "README.md"
4600 (string-append doc "/README.md"))
4601 #t))))))
4602 (home-page "https://github.com/tych0/xcffib")
4603 (synopsis "XCB Python bindings")
4604 (description
4605 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4606 support for Python 3 and PyPy. It is based on cffi.")
4607 (license license:expat)))
4608
4609 (define-public python2-xcffib
4610 (package-with-python2 python-xcffib))
4611
4612 (define-public python-cairocffi
4613 (package
4614 (name "python-cairocffi")
4615 (version "0.9.0")
4616 (source
4617 (origin
4618 (method url-fetch)
4619 (uri (pypi-uri "cairocffi" version))
4620 (sha256
4621 (base32
4622 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4623 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4624 (build-system python-build-system)
4625 (outputs '("out" "doc"))
4626 (inputs
4627 `(("glib" ,glib)
4628 ("gtk+" ,gtk+)
4629 ("gdk-pixbuf" ,gdk-pixbuf)
4630 ("cairo" ,cairo)
4631 ("pango" ,pango)))
4632 (native-inputs
4633 `(("pkg-config" ,pkg-config)
4634 ("python-pytest" ,python-pytest)
4635 ("python-pytest-cov" ,python-pytest-cov)
4636 ("python-pytest-runner" ,python-pytest-runner)
4637 ("python-sphinx" ,python-sphinx)
4638 ("python-docutils" ,python-docutils)))
4639 (propagated-inputs
4640 `(("python-xcffib" ,python-xcffib))) ; used at run time
4641 (arguments
4642 `(#:phases
4643 (modify-phases %standard-phases
4644 (add-after 'unpack 'patch-paths
4645 (lambda* (#:key inputs outputs #:allow-other-keys)
4646 (substitute* (find-files "." "\\.py$")
4647 (("dlopen\\(ffi, 'cairo'")
4648 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4649 "/lib/libcairo.so.2'"))
4650 (("dlopen\\(ffi, 'gdk-3'")
4651 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4652 "/lib/libgtk-3.so.0'"))
4653 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4654 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4655 "/lib/libgdk_pixbuf-2.0.so.0'"))
4656 (("dlopen\\(ffi, 'glib-2.0'")
4657 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4658 "/lib/libglib-2.0.so.0'"))
4659 (("dlopen\\(ffi, 'gobject-2.0'")
4660 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4661 "/lib/libgobject-2.0.so.0'"))
4662 (("dlopen\\(ffi, 'pangocairo-1.0'")
4663 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4664 "/lib/libpangocairo-1.0.so.0'"))
4665 (("dlopen\\(ffi, 'pango-1.0'")
4666 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4667 "/lib/libpango-1.0.so.0'")))
4668 #t))
4669 (add-after 'install 'install-doc
4670 (lambda* (#:key inputs outputs #:allow-other-keys)
4671 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4672 (doc (string-append data "/doc/" ,name "-" ,version))
4673 (html (string-append doc "/html")))
4674 (setenv "LD_LIBRARY_PATH"
4675 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4676 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4677 (setenv "LANG" "en_US.UTF-8")
4678 (mkdir-p html)
4679 (for-each (lambda (file)
4680 (copy-file (string-append "." file)
4681 (string-append doc file)))
4682 '("/README.rst" "/CHANGES" "/LICENSE"))
4683 (system* "python" "setup.py" "build_sphinx")
4684 (copy-recursively "docs/_build/html" html)
4685 #t))))))
4686 (home-page "https://github.com/Kozea/cairocffi")
4687 (synopsis "Python bindings and object-oriented API for Cairo")
4688 (description
4689 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4690 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4691 graphics library with support for multiple backends including image buffers,
4692 PNG, PostScript, PDF, and SVG file output.")
4693 (license license:bsd-3)))
4694
4695 (define-public python2-cairocffi
4696 (package-with-python2 python-cairocffi))
4697
4698 (define-public python-decorator
4699 (package
4700 (name "python-decorator")
4701 (version "4.3.0")
4702 (source
4703 (origin
4704 (method url-fetch)
4705 (uri (pypi-uri "decorator" version))
4706 (sha256
4707 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4708 (build-system python-build-system)
4709 (home-page "https://pypi.python.org/pypi/decorator/")
4710 (synopsis "Python module to simplify usage of decorators")
4711 (description
4712 "The aim of the decorator module is to simplify the usage of decorators
4713 for the average programmer, and to popularize decorators usage giving examples
4714 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4715 etc. The core of this module is a decorator factory.")
4716 (license license:expat)))
4717
4718 (define-public python2-decorator
4719 (package-with-python2 python-decorator))
4720
4721 (define-public python-drmaa
4722 (package
4723 (name "python-drmaa")
4724 (version "0.7.7")
4725 (source
4726 (origin
4727 (method url-fetch)
4728 (uri (pypi-uri "drmaa" version))
4729 (sha256
4730 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4731 (build-system python-build-system)
4732 ;; The test suite requires libdrmaa which is provided by the cluster
4733 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4734 ;; should be set to the path of the libdrmaa library.
4735 (arguments '(#:tests? #f))
4736 (native-inputs
4737 `(("python-nose" ,python-nose)))
4738 (home-page "https://pypi.python.org/pypi/drmaa")
4739 (synopsis "Python bindings for the DRMAA library")
4740 (description
4741 "A Python package for Distributed Resource Management (DRM) job
4742 submission and control. This package is an implementation of the DRMAA 1.0
4743 Python language binding specification.")
4744 (license license:bsd-3)))
4745
4746 (define-public python2-drmaa
4747 (package-with-python2 python-drmaa))
4748
4749 (define-public python-grako
4750 (package
4751 (name "python-grako")
4752 (version "3.99.9")
4753 (source
4754 (origin
4755 (method url-fetch)
4756 (uri
4757 (pypi-uri "grako" version ".zip"))
4758 (sha256
4759 (base32
4760 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4761 (build-system python-build-system)
4762 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4763 (native-inputs
4764 `(("unzip" ,unzip)
4765 ("python-pytest" ,python-pytest)
4766 ("python-pytest-runner" ,python-pytest-runner)))
4767 (home-page "https://bitbucket.org/neogeny/grako")
4768 (synopsis "EBNF parser generator")
4769 (description
4770 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4771 memoizing PEG/Packrat parser in Python.")
4772 (license license:bsd-3)))
4773
4774 (define-public python2-grako
4775 (package-with-python2 python-grako))
4776
4777 (define-public python-gridmap
4778 (package
4779 (name "python-gridmap")
4780 (version "0.13.0")
4781 (source
4782 (origin
4783 (method git-fetch)
4784 (uri (git-reference
4785 (url "https://github.com/pygridtools/gridmap.git")
4786 (commit (string-append "v" version))))
4787 (file-name (git-file-name name version))
4788 (sha256
4789 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4790 (build-system python-build-system)
4791 (arguments
4792 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4793 (propagated-inputs
4794 `(("python-psutil" ,python-psutil)
4795 ("python-drmaa" ,python-drmaa)
4796 ("python-pyzmq" ,python-pyzmq)))
4797 (home-page "https://github.com/pygridtools/gridmap")
4798 (synopsis "Create jobs on a cluster directly from Python")
4799 (description
4800 "Gridmap is a Python package to allow you to easily create jobs on the
4801 cluster directly from Python. You can directly map Python functions onto the
4802 cluster without needing to write any wrapper code yourself.")
4803 (license license:gpl3+)))
4804
4805 (define-public python2-gridmap
4806 (package-with-python2 python-gridmap))
4807
4808 (define-public python-honcho
4809 (package
4810 (name "python-honcho")
4811 (version "1.0.1")
4812 (source
4813 (origin
4814 (method git-fetch)
4815 (uri (git-reference
4816 (url "https://github.com/nickstenning/honcho.git")
4817 (commit (string-append "v" version))))
4818 (file-name (git-file-name name version))
4819 (sha256
4820 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4821 (build-system python-build-system)
4822 (native-inputs
4823 `(("python-pytest" ,python-pytest)
4824 ("python-mock" ,python-mock)
4825 ("python-tox" ,python-tox)
4826 ("which" ,which))) ;for tests
4827 (propagated-inputs
4828 `(("python-jinja2" ,python-jinja2)))
4829 (arguments
4830 `(#:phases
4831 (modify-phases %standard-phases
4832 (delete 'check)
4833 (add-after 'install 'check
4834 (lambda* (#:key outputs inputs #:allow-other-keys)
4835 ;; fix honcho path in testsuite
4836 (substitute* "tests/conftest.py"
4837 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4838 "/bin/honcho" "'")))
4839 ;; It's easier to run tests after install.
4840 ;; Make installed package available for running the tests
4841 (add-installed-pythonpath inputs outputs)
4842 (invoke "py.test" "-v"))))))
4843 (home-page "https://github.com/nickstenning/honcho")
4844 (synopsis "Manage Procfile-based applications")
4845 (description
4846 "A Procfile is a file which describes how to run an application
4847 consisting of several processes. honcho starts all listed processes.
4848 The output of all running processes is collected by honcho and
4849 displayed.")
4850 (license license:expat)))
4851
4852 (define-public python2-honcho
4853 (package-with-python2 python-honcho))
4854
4855 (define-public python-pexpect
4856 (package
4857 (name "python-pexpect")
4858 (version "4.6.0")
4859 (source
4860 (origin
4861 (method url-fetch)
4862 (uri (pypi-uri "pexpect" version))
4863 (sha256
4864 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4865 (build-system python-build-system)
4866 (arguments
4867 `(#:phases
4868 (modify-phases %standard-phases
4869 (add-before 'check 'prepare-tests
4870 (lambda _
4871 (substitute* (find-files "tests")
4872 (("/bin/ls") (which "ls"))
4873 (("/bin/echo") (which "echo"))
4874 (("/bin/which") (which "which"))
4875 ;; Many tests try to use the /bin directory which
4876 ;; is not present in the build environment.
4877 ;; Use one that's non-empty and unlikely to change.
4878 (("/bin'") "/dev'"))
4879 ;; XXX: Socket connection test gets "Connection reset by peer".
4880 ;; Why does it not work? Delete for now.
4881 (delete-file "tests/test_socket.py")
4882 #t))
4883 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4884 (native-inputs
4885 `(("python-nose" ,python-nose)
4886 ("python-pytest" ,python-pytest)
4887 ("man-db" ,man-db)
4888 ("which" ,which)
4889 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4890 (propagated-inputs
4891 `(("python-ptyprocess" ,python-ptyprocess)))
4892 (home-page "http://pexpect.readthedocs.org/")
4893 (synopsis "Controlling interactive console applications")
4894 (description
4895 "Pexpect is a pure Python module for spawning child applications;
4896 controlling them; and responding to expected patterns in their output.
4897 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4898 child application and control it as if a human were typing commands.")
4899 (license license:isc)))
4900
4901 (define-public python2-pexpect
4902 (package-with-python2 python-pexpect))
4903
4904 (define-public python-setuptools-scm
4905 (package
4906 (name "python-setuptools-scm")
4907 (version "3.2.0")
4908 (source (origin
4909 (method url-fetch)
4910 (uri (pypi-uri "setuptools_scm" version))
4911 (sha256
4912 (base32
4913 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4914 (build-system python-build-system)
4915 (home-page "https://github.com/pypa/setuptools_scm/")
4916 (synopsis "Manage Python package versions in SCM metadata")
4917 (description
4918 "Setuptools_scm handles managing your Python package versions in
4919 @dfn{software configuration management} (SCM) metadata instead of declaring
4920 them as the version argument or in a SCM managed file.")
4921 (license license:expat)))
4922
4923 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
4924 (define-public python-setuptools-scm-3.3
4925 (package
4926 (inherit python-setuptools-scm)
4927 (version "3.3.3")
4928 (source (origin
4929 (method url-fetch)
4930 (uri (pypi-uri "setuptools_scm" version))
4931 (sha256
4932 (base32
4933 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
4934
4935 (define-public python2-setuptools-scm
4936 (package-with-python2 python-setuptools-scm))
4937
4938 (define-public python-pathlib2
4939 (package
4940 (name "python-pathlib2")
4941 (version "2.3.3")
4942 (source
4943 (origin
4944 (method url-fetch)
4945 (uri (pypi-uri "pathlib2" version))
4946 (sha256
4947 (base32
4948 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4949 (build-system python-build-system)
4950 (propagated-inputs
4951 `(("python-scandir" ,python-scandir)
4952 ("python-six" ,python-six)))
4953 (home-page "https://pypi.python.org/pypi/pathlib2/")
4954 (synopsis "Object-oriented file system paths")
4955 (description "The goal of pathlib2 is to provide a backport of the
4956 standard @code{pathlib} module which tracks the standard library module, so
4957 all the newest features of the standard @code{pathlib} can be used also on
4958 older Python versions.")
4959 (license license:expat)))
4960
4961 (define-public python2-importlib-resources
4962 (package
4963 (name "python2-importlib-resources")
4964 (version "1.0.2")
4965 (source (origin
4966 (method url-fetch)
4967 (uri (pypi-uri "importlib_resources" version))
4968 (sha256
4969 (base32
4970 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
4971 (build-system python-build-system)
4972 (arguments
4973 `(#:python ,python-2))
4974 (native-inputs
4975 `(("python-wheel" ,python2-wheel)))
4976 (propagated-inputs
4977 `(("python-pathlib2" ,python2-pathlib2)
4978 ("python-typing" ,python2-typing)))
4979 (home-page "https://gitlab.com/python-devs/importlib_resources")
4980 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
4981 (description
4982 "This package provides an implementation of @code{importlib.resources}
4983 for older versions of Python.")
4984 (license license:asl2.0)))
4985
4986 (define-public python-importlib-metadata
4987 (package
4988 (name "python-importlib-metadata")
4989 (version "1.4.0")
4990 (source
4991 (origin
4992 (method url-fetch)
4993 (uri (pypi-uri "importlib_metadata" version))
4994 (sha256
4995 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
4996 (build-system python-build-system)
4997 (propagated-inputs
4998 `(("python-zipp" ,python-zipp)))
4999 (native-inputs
5000 `(("python-setuptools-scm" ,python-setuptools-scm)
5001 ("python-packaging" ,python-packaging)))
5002 (home-page "https://importlib-metadata.readthedocs.io/")
5003 (synopsis "Read metadata from Python packages")
5004 (description
5005 "@code{importlib_metadata} is a library which provides an API for
5006 accessing an installed Python package's metadata, such as its entry points or
5007 its top-level name. This functionality intends to replace most uses of
5008 @code{pkg_resources} entry point API and metadata API. Along with
5009 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5010 need to use the older and less efficient @code{pkg_resources} package.")
5011 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
5012 (license license:asl2.0)))
5013
5014 (define-public python2-importlib-metadata
5015 (let ((base (package-with-python2 (strip-python2-variant
5016 python-importlib-metadata))))
5017 (package/inherit
5018 base
5019 (name "python2-importlib-metadata")
5020 (propagated-inputs
5021 `(("python-configparser" ,python2-configparser)
5022 ("python-contextlib2" ,python2-contextlib2)
5023 ("python-importlib-resources" ,python2-importlib-resources)
5024 ("python-pathlib2" ,python2-pathlib2)
5025 ,@(package-propagated-inputs base))))))
5026
5027 (define-public python-jaraco-packaging
5028 (package
5029 (name "python-jaraco-packaging")
5030 (version "6.1")
5031 (source
5032 (origin
5033 (method url-fetch)
5034 (uri (pypi-uri "jaraco.packaging" version))
5035 (sha256
5036 (base32
5037 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5038 (build-system python-build-system)
5039 (propagated-inputs
5040 `(("python-pytest" ,python-pytest)
5041 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5042 ("python-pytest-flake8" ,python-pytest-flake8)
5043 ("python-rst.linker" ,python-rst.linker)
5044 ("python-setuptools" ,python-setuptools)
5045 ("python-setuptools-scm" ,python-setuptools-scm)
5046 ("python-six" ,python-six)
5047 ("python-sphinx" ,python-sphinx)))
5048 (home-page "https://github.com/jaraco/jaraco.packaging")
5049 (synopsis "Tools to supplement packaging Python releases")
5050 (description
5051 "This package provides various tools to supplement packaging Python
5052 releases.")
5053 (license license:expat)))
5054
5055 (define-public python-pathpy
5056 (package
5057 (name "python-pathpy")
5058 (version "11.5.1")
5059 (source
5060 (origin
5061 (method url-fetch)
5062 (uri (pypi-uri "path.py" version))
5063 (sha256
5064 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5065 (outputs '("out" "doc"))
5066 (build-system python-build-system)
5067 (propagated-inputs
5068 `(("python-appdirs" ,python-appdirs)
5069 ("python-importlib-metadata" ,python-importlib-metadata)))
5070 (native-inputs
5071 `(("python-setuptools-scm" ,python-setuptools-scm)
5072 ("python-sphinx" ,python-sphinx)
5073 ("python-rst.linker" ,python-rst.linker)
5074 ("python-pytest" ,python-pytest)
5075 ("python-pytest-runner" ,python-pytest-runner)
5076 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5077 (arguments
5078 `(#:phases
5079 (modify-phases %standard-phases
5080 (add-after 'build 'build-doc
5081 (lambda _
5082 (setenv "LANG" "en_US.UTF-8")
5083 (invoke "python" "setup.py" "build_sphinx")))
5084 (add-after 'install 'install-doc
5085 (lambda* (#:key outputs #:allow-other-keys)
5086 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5087 (doc (string-append data "/doc/" ,name "-" ,version))
5088 (html (string-append doc "/html")))
5089 (mkdir-p html)
5090 (for-each (lambda (file)
5091 (copy-file file (string-append doc "/" file)))
5092 '("README.rst" "CHANGES.rst"))
5093 (copy-recursively "build/sphinx/html" html)
5094 #t)))
5095 (replace 'check
5096 (lambda _
5097 ;; The import time test aborts if an import takes longer than
5098 ;; 100ms. It may very well take a little longer than that.
5099 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5100 (home-page "https://github.com/jaraco/path.py")
5101 (synopsis "Python module wrapper for built-in os.path")
5102 (description
5103 "@code{path.py} implements path objects as first-class entities, allowing
5104 common operations on files to be invoked on those path objects directly.")
5105 (license license:expat)))
5106
5107 (define-public python2-pathpy
5108 (package-with-python2 python-pathpy))
5109
5110 (define-public python-simplegeneric
5111 (package
5112 (name "python-simplegeneric")
5113 (version "0.8.1")
5114 (source
5115 (origin
5116 (method url-fetch)
5117 (uri (pypi-uri "simplegeneric" version ".zip"))
5118 (sha256
5119 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5120 (build-system python-build-system)
5121 (native-inputs
5122 `(("unzip" ,unzip)))
5123 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5124 (synopsis "Python module for simple generic functions")
5125 (description
5126 "The simplegeneric module lets you define simple single-dispatch generic
5127 functions, akin to Python’s built-in generic functions like @code{len()},
5128 @code{iter()} and so on. However, instead of using specially-named methods,
5129 these generic functions use simple lookup tables, akin to those used by
5130 e.g. @code{pickle.dump()} and other generic functions found in the Python
5131 standard library.")
5132 (license license:zpl2.1)))
5133
5134 (define-public python2-simplegeneric
5135 (package-with-python2 python-simplegeneric))
5136
5137 (define-public python-ipython-genutils
5138 ;; TODO: This package is retired, check if can be removed, see description.
5139 (package
5140 (name "python-ipython-genutils")
5141 (version "0.1.0")
5142 (source
5143 (origin
5144 (method url-fetch)
5145 (uri (pypi-uri "ipython_genutils" version))
5146 (sha256
5147 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5148 (build-system python-build-system)
5149 (arguments `(#:tests? #f)) ; no tests
5150 (home-page "https://ipython.org")
5151 (synopsis "Vestigial utilities from IPython")
5152 (description
5153 "This package provides retired utilities from IPython. No packages
5154 outside IPython/Jupyter should depend on it.
5155
5156 This package shouldn't exist. It contains some common utilities shared by
5157 Jupyter and IPython projects during The Big Split. As soon as possible, those
5158 packages will remove their dependency on this, and this package will go
5159 away.")
5160 (license license:bsd-3)))
5161
5162 (define-public python2-ipython-genutils
5163 (package-with-python2 python-ipython-genutils))
5164
5165 (define-public python-traitlets
5166 (package
5167 (name "python-traitlets")
5168 (version "4.3.3")
5169 (source
5170 (origin
5171 (method url-fetch)
5172 (uri (pypi-uri "traitlets" version))
5173 (sha256
5174 (base32
5175 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5176 (build-system python-build-system)
5177 (arguments
5178 `(#:phases
5179 (modify-phases %standard-phases
5180 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5181 (propagated-inputs
5182 `(("python-ipython-genutils" ,python-ipython-genutils)
5183 ("python-decorator" ,python-decorator)))
5184 (native-inputs
5185 `(("python-pytest" ,python-pytest)))
5186 (properties `((python2-variant . ,(delay python2-traitlets))))
5187 (home-page "https://ipython.org")
5188 (synopsis "Configuration system for Python applications")
5189 (description
5190 "Traitlets is a framework that lets Python classes have attributes with
5191 type checking, dynamically calculated default values, and ‘on change’
5192 callbacks. The package also includes a mechanism to use traitlets for
5193 configuration, loading values from files or from command line arguments. This
5194 is a distinct layer on top of traitlets, so you can use traitlets in your code
5195 without using the configuration machinery.")
5196 (license license:bsd-3)))
5197
5198 (define-public python2-traitlets
5199 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5200 (package
5201 (inherit traitlets)
5202 (propagated-inputs
5203 `(("python2-enum34" ,python2-enum34)
5204 ,@(package-propagated-inputs traitlets))))))
5205
5206 (define-public python-jupyter-core
5207 (package
5208 (name "python-jupyter-core")
5209 (version "4.4.0")
5210 (source
5211 (origin
5212 (method url-fetch)
5213 (uri (string-append (pypi-uri "jupyter_core" version)))
5214 (sha256
5215 (base32
5216 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5217 (build-system python-build-system)
5218 ;; FIXME: not sure how to run the tests
5219 (arguments `(#:tests? #f))
5220 (propagated-inputs
5221 `(("python-traitlets" ,python-traitlets)))
5222 (home-page "http://jupyter.org/")
5223 (synopsis "Jupyter base package")
5224 (description
5225 "Jupyter core is the base package on which Jupyter projects rely.")
5226 (license license:bsd-3)))
5227
5228 (define-public python2-jupyter-core
5229 (package-with-python2 python-jupyter-core))
5230
5231 (define-public python-jupyter-client
5232 (package
5233 (name "python-jupyter-client")
5234 (version "5.2.4")
5235 (source
5236 (origin
5237 (method url-fetch)
5238 (uri (pypi-uri "jupyter_client" version))
5239 (sha256
5240 (base32
5241 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5242 (build-system python-build-system)
5243 ;; Tests fail because of missing native python kernel which I assume is
5244 ;; provided by the ipython package, which we cannot use because it would
5245 ;; cause a dependency cycle.
5246 (arguments
5247 `(#:tests? #f
5248
5249 #:phases (modify-phases %standard-phases
5250 (add-after 'unpack 'set-tool-file-names
5251 (lambda* (#:key inputs #:allow-other-keys)
5252 (let ((iproute (assoc-ref inputs "iproute")))
5253 (substitute* "jupyter_client/localinterfaces.py"
5254 (("'ip'")
5255 (string-append "'" iproute "/sbin/ip'")))
5256 #t))))))
5257 (inputs
5258 `(("iproute" ,iproute)))
5259 (propagated-inputs
5260 `(("python-pyzmq" ,python-pyzmq)
5261 ("python-traitlets" ,python-traitlets)
5262 ("python-jupyter-core" ,python-jupyter-core)))
5263 (home-page "http://jupyter.org/")
5264 (synopsis "Jupyter protocol implementation and client libraries")
5265 (description
5266 "The @code{jupyter_client} package contains the reference implementation
5267 of the Jupyter protocol. It also provides client and kernel management APIs
5268 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5269 installing @code{kernelspec}s for use with Jupyter frontends.")
5270 (license license:bsd-3)))
5271
5272 (define-public python2-jupyter-client
5273 (package-with-python2 python-jupyter-client))
5274
5275 (define-public python-ipykernel
5276 (package
5277 (name "python-ipykernel")
5278 (version "5.1.3")
5279 (source
5280 (origin
5281 (method url-fetch)
5282 (uri (pypi-uri "ipykernel" version))
5283 (sha256
5284 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5285 (build-system python-build-system)
5286 (arguments
5287 `(#:phases
5288 (modify-phases %standard-phases
5289 (replace 'check
5290 (lambda _
5291 (setenv "HOME" "/tmp")
5292 (invoke "pytest" "-v")
5293 #t))
5294 (add-after 'install 'set-python-file-name
5295 (lambda* (#:key outputs #:allow-other-keys)
5296 ;; Record the absolute file name of the 'python' executable in
5297 ;; 'kernel.json'.
5298 (let ((out (assoc-ref outputs "out")))
5299 (substitute* (string-append out "/share/jupyter"
5300 "/kernels/python3/kernel.json")
5301 (("\"python\"")
5302 (string-append "\"" (which "python") "\"")))
5303 #t))))))
5304 (propagated-inputs
5305 `(("python-ipython" ,python-ipython)
5306 ;; imported at runtime during connect
5307 ("python-jupyter-client" ,python-jupyter-client)))
5308 (native-inputs
5309 `(("python-flaky" ,python-flaky)
5310 ("python-nose" ,python-nose)
5311 ("python-pytest" ,python-pytest)))
5312 (home-page "https://ipython.org")
5313 (synopsis "IPython Kernel for Jupyter")
5314 (description
5315 "This package provides the IPython kernel for Jupyter.")
5316 (license license:bsd-3)))
5317
5318 ;; Version 5.1.1 and above no longer support Python 2.
5319 (define-public python2-ipykernel
5320 (package
5321 (name "python2-ipykernel")
5322 (version "5.1.0")
5323 (source
5324 (origin
5325 (method url-fetch)
5326 (uri (pypi-uri "ipykernel" version))
5327 (sha256
5328 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5329 (build-system python-build-system)
5330 (arguments
5331 `(#:python ,python-2
5332 #:phases
5333 (modify-phases %standard-phases
5334 (replace 'check
5335 (lambda _
5336 (setenv "HOME" "/tmp")
5337 (invoke "pytest" "-v")
5338 #t)))))
5339 (propagated-inputs
5340 `(("python2-ipython" ,python2-ipython)
5341 ;; imported at runtime during connect
5342 ("python2-jupyter-client" ,python2-jupyter-client)))
5343 (native-inputs
5344 `(("python2-pytest" ,python2-pytest)
5345 ("python2-nose" ,python2-nose)))
5346 (home-page "https://ipython.org")
5347 (synopsis "IPython Kernel for Jupyter")
5348 (description
5349 "This package provides the IPython kernel for Jupyter.")
5350 (license license:bsd-3)))
5351
5352 (define-public python-pari-jupyter
5353 (package
5354 (name "python-pari-jupyter")
5355 (version "1.3.2")
5356 (source
5357 (origin
5358 (method url-fetch)
5359 (uri (pypi-uri "pari_jupyter" version))
5360 (sha256
5361 (base32
5362 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5363 (build-system python-build-system)
5364 (propagated-inputs
5365 `(("python-ipykernel" ,python-ipykernel)))
5366 (inputs
5367 `(("pari-gp" ,pari-gp)
5368 ("readline" ,readline)))
5369 (arguments
5370 `(#:tests? #f)) ; no test suite
5371 (home-page
5372 "https://github.com/jdemeyer/pari_jupyter")
5373 (synopsis "A Jupyter kernel for PARI/GP")
5374 (description "The package provides a PARI/GP kernel for Jupyter.")
5375 (license license:gpl3+)))
5376
5377 (define-public python-backcall
5378 (package
5379 (name "python-backcall")
5380 (version "0.1.0")
5381 (source
5382 (origin
5383 (method url-fetch)
5384 (uri (pypi-uri "backcall" version))
5385 (sha256
5386 (base32
5387 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5388 (build-system python-build-system)
5389 (home-page "https://github.com/takluyver/backcall/")
5390 (synopsis "Specifications for callback functions passed in to an API")
5391 (description
5392 "If your code lets other people supply callback functions, it's important
5393 to specify the function signature you expect, and check that functions support
5394 that. Adding extra parameters later would break other peoples code unless
5395 you're careful. The @code{backcall} package provides a way of specifying the
5396 callback signature using a prototype function.")
5397 (license license:bsd-3)))
5398
5399 ;; This is the latest release of the LTS version of ipython with support for
5400 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5401 ;; dropped support for Python 2.7.
5402 (define-public python2-ipython
5403 (package
5404 (name "python2-ipython")
5405 (version "5.8.0")
5406 (source
5407 (origin
5408 (method url-fetch)
5409 (uri (pypi-uri "ipython" version ".tar.gz"))
5410 (sha256
5411 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5412 (build-system python-build-system)
5413 (propagated-inputs
5414 `(("python2-backports-shutil-get-terminal-size"
5415 ,python2-backports-shutil-get-terminal-size)
5416 ("python2-pathlib2" ,python2-pathlib2)
5417 ("python2-pyzmq" ,python2-pyzmq)
5418 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5419 ("python2-terminado" ,python2-terminado)
5420 ("python2-matplotlib" ,python2-matplotlib)
5421 ("python2-numpy" ,python2-numpy)
5422 ("python2-numpydoc" ,python2-numpydoc)
5423 ("python2-jinja2" ,python2-jinja2)
5424 ("python2-mistune" ,python2-mistune)
5425 ("python2-pexpect" ,python2-pexpect)
5426 ("python2-pickleshare" ,python2-pickleshare)
5427 ("python2-simplegeneric" ,python2-simplegeneric)
5428 ("python2-jsonschema" ,python2-jsonschema)
5429 ("python2-traitlets" ,python2-traitlets)
5430 ("python2-nbformat" ,python2-nbformat)
5431 ("python2-pygments" ,python2-pygments)))
5432 (inputs
5433 `(("readline" ,readline)
5434 ("which" ,which)))
5435 (native-inputs
5436 `(("graphviz" ,graphviz)
5437 ("pkg-config" ,pkg-config)
5438 ("python2-requests" ,python2-requests) ;; for tests
5439 ("python2-testpath" ,python2-testpath)
5440 ("python2-mock" ,python2-mock)
5441 ("python2-nose" ,python2-nose)))
5442 (arguments
5443 `(#:python ,python-2
5444 #:phases
5445 (modify-phases %standard-phases
5446 (add-before 'check 'delete-broken-tests
5447 (lambda* (#:key inputs #:allow-other-keys)
5448 ;; These tests throw errors for unknown reasons.
5449 (delete-file "IPython/core/tests/test_profile.py")
5450 (delete-file "IPython/core/tests/test_interactiveshell.py")
5451 (delete-file "IPython/core/tests/test_magic.py")
5452 #t)))))
5453 (home-page "https://ipython.org")
5454 (synopsis "IPython is a tool for interactive computing in Python")
5455 (description
5456 "IPython provides a rich architecture for interactive computing with:
5457 Powerful interactive shells, a browser-based notebook, support for interactive
5458 data visualization, embeddable interpreters and tools for parallel
5459 computing.")
5460 (license license:bsd-3)))
5461
5462 (define-public python-ipython
5463 (package
5464 (name "python-ipython")
5465 (version "7.9.0")
5466 (source
5467 (origin
5468 (method url-fetch)
5469 (uri (pypi-uri "ipython" version ".tar.gz"))
5470 (sha256
5471 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5472 (build-system python-build-system)
5473 (propagated-inputs
5474 `(("python-backcall" ,python-backcall)
5475 ("python-pyzmq" ,python-pyzmq)
5476 ("python-prompt-toolkit" ,python-prompt-toolkit)
5477 ("python-terminado" ,python-terminado)
5478 ("python-matplotlib" ,python-matplotlib)
5479 ("python-numpy" ,python-numpy)
5480 ("python-numpydoc" ,python-numpydoc)
5481 ("python-jedi" ,python-jedi)
5482 ("python-jinja2" ,python-jinja2)
5483 ("python-mistune" ,python-mistune)
5484 ("python-pexpect" ,python-pexpect)
5485 ("python-pickleshare" ,python-pickleshare)
5486 ("python-simplegeneric" ,python-simplegeneric)
5487 ("python-jsonschema" ,python-jsonschema)
5488 ("python-traitlets" ,python-traitlets)
5489 ("python-nbformat" ,python-nbformat)
5490 ("python-pygments" ,python-pygments)))
5491 (inputs
5492 `(("readline" ,readline)
5493 ("which" ,which)))
5494 (native-inputs
5495 `(("graphviz" ,graphviz)
5496 ("pkg-config" ,pkg-config)
5497 ("python-requests" ,python-requests) ;; for tests
5498 ("python-testpath" ,python-testpath)
5499 ("python-nose" ,python-nose)))
5500 (arguments
5501 `(#:phases
5502 (modify-phases %standard-phases
5503 (add-after 'unpack 'make-docs-reproducible
5504 (lambda _
5505 (substitute* "IPython/sphinxext/ipython_directive.py"
5506 ((".*import datetime") "")
5507 ((".*datetime.datetime.now\\(\\)") "")
5508 (("%timeit") "# %timeit"))
5509 #t))
5510 ;; Tests can only be run after the library has been installed and not
5511 ;; within the source directory.
5512 (delete 'check)
5513 (add-after 'install 'check
5514 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5515 (if tests?
5516 (begin
5517 ;; Make installed package available for running the tests
5518 (add-installed-pythonpath inputs outputs)
5519 (setenv "HOME" "/tmp/") ;; required by a test
5520 ;; We only test the core because one of the other tests
5521 ;; tries to import ipykernel.
5522 (invoke "python" "IPython/testing/iptest.py"
5523 "-v" "IPython/core/tests"))
5524 #t)))
5525 (add-before 'check 'fix-tests
5526 (lambda* (#:key inputs #:allow-other-keys)
5527 (substitute* "./IPython/utils/_process_posix.py"
5528 (("/usr/bin/env', 'which") (which "which")))
5529 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5530 (("#!/usr/bin/env python")
5531 (string-append "#!" (which "python"))))
5532 ;; This test introduces a circular dependency on ipykernel
5533 ;; (which depends on ipython).
5534 (delete-file "IPython/core/tests/test_display.py")
5535 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5536 (delete-file "IPython/core/tests/test_interactiveshell.py")
5537 #t)))))
5538 (home-page "https://ipython.org")
5539 (synopsis "IPython is a tool for interactive computing in Python")
5540 (description
5541 "IPython provides a rich architecture for interactive computing with:
5542 Powerful interactive shells, a browser-based notebook, support for interactive
5543 data visualization, embeddable interpreters and tools for parallel
5544 computing.")
5545 (license license:bsd-3)))
5546
5547 (define-public python-ipython-documentation
5548 (package
5549 (inherit python-ipython)
5550 (name "python-ipython-documentation")
5551 (version (package-version python-ipython))
5552 (arguments
5553 `(#:phases
5554 (modify-phases %standard-phases
5555 (delete 'build)
5556 (delete 'check)
5557 (replace 'install
5558 (lambda* (#:key outputs #:allow-other-keys)
5559 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5560 (doc (string-append data "/doc/" ,name "-" ,version))
5561 (html (string-append doc "/html"))
5562 (man1 (string-append data "/man/man1"))
5563 (info (string-append data "/info"))
5564 (examples (string-append doc "/examples"))
5565 (python-arg (string-append "PYTHON=" (which "python"))))
5566 (setenv "LANG" "en_US.utf8")
5567 (with-directory-excursion "docs"
5568 ;; FIXME: pdf fails to build
5569 ;;(system* "make" "pdf" "PAPER=a4")
5570 (system* "make" python-arg "html")
5571 ;; FIXME: the generated texi file contains ^@^@, which trips
5572 ;; up the parser.
5573 ;; (system* "make" python-arg "info")
5574 )
5575 (copy-recursively "docs/man" man1)
5576 (copy-recursively "examples" examples)
5577 (copy-recursively "docs/build/html" html)
5578 ;; (copy-file "docs/build/latex/ipython.pdf"
5579 ;; (string-append doc "/ipython.pdf"))
5580 (mkdir-p info)
5581 ;; (copy-file "docs/build/texinfo/ipython.info"
5582 ;; (string-append info "/ipython.info"))
5583 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5584 #t)))))
5585 (inputs
5586 `(("python-ipython" ,python-ipython)
5587 ("python-ipykernel" ,python-ipykernel)))
5588 (native-inputs
5589 `(("python-sphinx" ,python-sphinx)
5590 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5591 ;; FIXME: It's possible that a smaller union would work just as well.
5592 ("texlive" ,(texlive-union (list texlive-amsfonts
5593 texlive-fonts-ec
5594 texlive-generic-ifxetex
5595 texlive-generic-pdftex
5596 texlive-latex-capt-of
5597 texlive-latex-cmap
5598 texlive-latex-environ
5599 texlive-latex-eqparbox
5600 texlive-latex-etoolbox
5601 texlive-latex-expdlist
5602 texlive-latex-fancyhdr
5603 texlive-latex-fancyvrb
5604 texlive-latex-fncychap
5605 texlive-latex-float
5606 texlive-latex-framed
5607 texlive-latex-geometry
5608 texlive-latex-graphics
5609 texlive-latex-hyperref
5610 texlive-latex-mdwtools
5611 texlive-latex-multirow
5612 texlive-latex-needspace
5613 texlive-latex-oberdiek
5614 texlive-latex-parskip
5615 texlive-latex-preview
5616 texlive-latex-tabulary
5617 texlive-latex-threeparttable
5618 texlive-latex-titlesec
5619 texlive-latex-trimspaces
5620 texlive-latex-ucs
5621 texlive-latex-upquote
5622 texlive-latex-url
5623 texlive-latex-varwidth
5624 texlive-latex-wrapfig)))
5625 ("texinfo" ,texinfo)))))
5626
5627 (define-public python-urwid
5628 (package
5629 (name "python-urwid")
5630 (version "2.0.1")
5631 (source
5632 (origin
5633 (method url-fetch)
5634 (uri (pypi-uri "urwid" version))
5635 (sha256
5636 (base32
5637 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5638 (build-system python-build-system)
5639 (home-page "http://urwid.org")
5640 (synopsis "Console user interface library for Python")
5641 (description
5642 "Urwid is a curses-based UI/widget library for Python. It includes many
5643 features useful for text console applications.")
5644 (license license:lgpl2.1+)))
5645
5646 (define-public python2-urwid
5647 (package-with-python2 python-urwid))
5648
5649 (define-public python-urwidtrees
5650 (package
5651 (name "python-urwidtrees")
5652 (version "1.0.2")
5653 (source
5654 (origin
5655 (method git-fetch)
5656 ;; package author intends on distributing via github rather than pypi:
5657 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5658 (uri (git-reference
5659 (url "https://github.com/pazz/urwidtrees")
5660 (commit version)))
5661 (file-name (git-file-name name version))
5662 (sha256
5663 (base32
5664 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
5665 (build-system python-build-system)
5666 (arguments
5667 '(#:use-setuptools? #f
5668 #:tests? #f)) ; no tests
5669 (propagated-inputs `(("python-urwid" ,python-urwid)))
5670 (home-page "https://github.com/pazz/urwidtrees")
5671 (synopsis "Tree widgets for urwid")
5672 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5673 toolkit. Use it to build trees of widgets.")
5674 (license license:gpl3+)))
5675
5676 (define-public python2-urwidtrees
5677 (package-with-python2 python-urwidtrees))
5678
5679 (define-public python-ua-parser
5680 (package
5681 (name "python-ua-parser")
5682 (version "0.8.0")
5683 (source
5684 (origin
5685 (method url-fetch)
5686 (uri (pypi-uri "ua-parser" version))
5687 (sha256
5688 (base32
5689 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5690 (build-system python-build-system)
5691 (arguments
5692 `(#:tests? #f)) ;no test suite in release
5693 (native-inputs
5694 `(("python-pyyaml" ,python-pyyaml)))
5695 (home-page "https://github.com/ua-parser/uap-python")
5696 (synopsis "User agent parser")
5697 (description
5698 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5699 (license license:asl2.0)))
5700
5701 (define-public python2-ua-parser
5702 (package-with-python2 python-ua-parser))
5703
5704 (define-public python-user-agents
5705 (package
5706 (name "python-user-agents")
5707 (version "1.1.0")
5708 (source
5709 (origin
5710 (method url-fetch)
5711 (uri (pypi-uri "user-agents" version))
5712 (sha256
5713 (base32
5714 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5715 (build-system python-build-system)
5716 (arguments
5717 `(#:tests? #f)) ;missing devices.json test file in release
5718 (propagated-inputs
5719 `(("python-ua-parser" ,python-ua-parser)))
5720 (home-page "https://github.com/selwin/python-user-agents")
5721 (synopsis "User Agent strings parsing library")
5722 (description
5723 "A library to identify devices (phones, tablets) and their capabilities by
5724 parsing (browser/HTTP) user agent strings.")
5725 (license license:expat)))
5726
5727 (define-public python2-user-agents
5728 (package-with-python2 python-user-agents))
5729
5730 (define-public python-dbus
5731 (package
5732 (name "python-dbus")
5733 (version "1.2.14")
5734 (source
5735 (origin
5736 (method url-fetch)
5737 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5738 "dbus-python-" version ".tar.gz"))
5739 (sha256
5740 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
5741 (build-system gnu-build-system)
5742 (native-inputs
5743 `(("pkg-config" ,pkg-config)))
5744 (inputs
5745 `(("python" ,python-wrapper)
5746 ("dbus-glib" ,dbus-glib)))
5747 (synopsis "Python bindings for D-bus")
5748 (description "python-dbus provides bindings for libdbus, the reference
5749 implementation of D-Bus.")
5750 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5751 (license license:expat)))
5752
5753 (define-public python2-dbus
5754 (package (inherit python-dbus)
5755 (name "python2-dbus")
5756 (inputs `(("python" ,python-2)
5757 ,@(alist-delete "python"
5758 (package-inputs python-dbus)
5759 equal?)))))
5760
5761 (define-public python-notify2
5762 (package
5763 (name "python-notify2")
5764 (version "0.3.1")
5765 (source
5766 (origin
5767 (method url-fetch)
5768 (uri (pypi-uri "notify2" version))
5769 (sha256
5770 (base32
5771 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5772 (build-system python-build-system)
5773 (arguments `(#:tests? #f)) ; tests depend on system state
5774 (native-inputs
5775 `(("python-dbus" ,python-dbus)))
5776 (home-page "https://bitbucket.org/takluyver/pynotify2")
5777 (synopsis "Python interface to D-Bus notifications")
5778 (description
5779 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5780 It is a reimplementation of pynotify in pure Python, and an alternative to
5781 the GObject Introspection bindings to libnotify for non-GTK applications.")
5782 (license (list license:bsd-2
5783 license:lgpl2.1+))))
5784
5785 (define-public python2-notify2
5786 (package-with-python2 python-notify2))
5787
5788 ;; beautifulsoup4 has a totally different namespace than 3.x,
5789 ;; and pypi seems to put it under its own name, so I guess we should too
5790 (define-public python-beautifulsoup4
5791 (package
5792 (name "python-beautifulsoup4")
5793 (version "4.7.1")
5794 (source
5795 (origin
5796 (method url-fetch)
5797 (uri (pypi-uri "beautifulsoup4" version))
5798 (sha256
5799 (base32
5800 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5801 (build-system python-build-system)
5802 (arguments
5803 `(#:phases
5804 (modify-phases %standard-phases
5805 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5806 ;; must use this conversion script when building with Python 3. The
5807 ;; conversion script also runs the tests.
5808 ;; For more information, see the file 'convert-py3k' in the source
5809 ;; distribution.
5810 (replace 'check
5811 (lambda _ (invoke "./convert-py3k"))))))
5812 (propagated-inputs
5813 `(("python-soupsieve" ,python-soupsieve)))
5814 (home-page
5815 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5816 (synopsis
5817 "Python screen-scraping library")
5818 (description
5819 "Beautiful Soup is a Python library designed for rapidly setting up
5820 screen-scraping projects. It offers Pythonic idioms for navigating,
5821 searching, and modifying a parse tree, providing a toolkit for
5822 dissecting a document and extracting what you need. It automatically
5823 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5824 (license license:expat)
5825 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5826
5827 (define-public python2-beautifulsoup4
5828 (package
5829 (inherit (package-with-python2
5830 (strip-python2-variant python-beautifulsoup4)))
5831 (arguments `(#:python ,python-2))))
5832
5833 (define-public python-soupsieve
5834 (package
5835 (name "python-soupsieve")
5836 (version "1.9.5")
5837 (source
5838 (origin
5839 (method url-fetch)
5840 (uri (pypi-uri "soupsieve" version))
5841 (sha256
5842 (base32
5843 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
5844 (build-system python-build-system)
5845 (arguments `(#:tests? #f))
5846 ;;XXX: 2 tests fail currently despite claming they were to be
5847 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5848 ;;don't want to create a circular dependency.
5849 (home-page "https://github.com/facelessuser/soupsieve")
5850 (synopsis "CSS selector library")
5851 (description
5852 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5853 Soup 4. It aims to provide selecting, matching, and filtering using modern
5854 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5855 specifications up through the latest CSS level 4 drafts and beyond (though
5856 some are not yet implemented).")
5857 (properties `((python2-variant . ,(delay python2-soupsieve))))
5858 (license license:expat)))
5859
5860 (define-public python2-soupsieve
5861 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5862 (package
5863 (inherit base)
5864 (propagated-inputs
5865 `(("python2-backports-functools-lru-cache"
5866 ,python2-backports-functools-lru-cache)
5867 ,@(package-propagated-inputs base))))))
5868
5869 (define-public python-netifaces
5870 (package
5871 (name "python-netifaces")
5872 (version "0.10.7")
5873 (source
5874 (origin
5875 (method url-fetch)
5876 (uri (pypi-uri "netifaces" version))
5877 (sha256
5878 (base32
5879 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5880 (build-system python-build-system)
5881 (home-page "https://github.com/al45tair/netifaces")
5882 (synopsis
5883 "Python module for portable network interface information")
5884 (description
5885 "Netifaces is a Python module providing information on network
5886 interfaces in an easy and portable manner.")
5887 (license license:expat)))
5888
5889 (define-public python2-netifaces
5890 (package-with-python2 python-netifaces))
5891
5892 (define-public python-networkx
5893 (package
5894 (name "python-networkx")
5895 (version "2.2")
5896 (source
5897 (origin
5898 (method url-fetch)
5899 (uri (pypi-uri "networkx" version ".zip"))
5900 (sha256
5901 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5902 (build-system python-build-system)
5903 ;; python-decorator is needed at runtime.
5904 (propagated-inputs
5905 `(("python-decorator" ,python-decorator)))
5906 (native-inputs
5907 `(("python-nose" ,python-nose)
5908 ("unzip" ,unzip)))
5909 (home-page "https://networkx.github.io/")
5910 (synopsis "Python module for creating and manipulating graphs and networks")
5911 (description
5912 "NetworkX is a Python package for the creation, manipulation, and study
5913 of the structure, dynamics, and functions of complex networks.")
5914 (license license:bsd-3)))
5915
5916 (define-public python2-networkx
5917 (package-with-python2 python-networkx))
5918
5919 (define-public python-datrie
5920 (package
5921 (name "python-datrie")
5922 (version "0.8")
5923 (source
5924 (origin
5925 (method url-fetch)
5926 (uri (pypi-uri "datrie" version))
5927 (sha256
5928 (base32
5929 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5930 (build-system python-build-system)
5931 (native-inputs
5932 `(("python-cython" ,python-cython)
5933 ("python-hypothesis" ,python-hypothesis)
5934 ("python-pytest" ,python-pytest)
5935 ("python-pytest-runner" ,python-pytest-runner)))
5936 (home-page "https://github.com/kmike/datrie")
5937 (synopsis "Fast, efficiently stored trie for Python")
5938 (description
5939 "This package provides a fast, efficiently stored trie implementation for
5940 Python.")
5941 (license license:lgpl2.1+)))
5942
5943 (define-public snakemake
5944 (package
5945 (name "snakemake")
5946 (version "5.7.1")
5947 (source
5948 (origin
5949 (method url-fetch)
5950 (uri (pypi-uri "snakemake" version))
5951 (sha256
5952 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
5953 (build-system python-build-system)
5954 (arguments
5955 ;; TODO: Package missing test dependencies.
5956 '(#:tests? #f
5957 #:phases
5958 (modify-phases %standard-phases
5959 ;; For cluster execution Snakemake will call Python. Since there is
5960 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5961 ;; this by calling the snakemake wrapper instead.
5962 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5963 (lambda* (#:key outputs #:allow-other-keys)
5964 (substitute* "snakemake/executors.py"
5965 (("\\{sys.executable\\} -m snakemake")
5966 (string-append (assoc-ref outputs "out")
5967 "/bin/snakemake")))
5968 #t)))))
5969 (propagated-inputs
5970 `(("python-appdirs" ,python-appdirs)
5971 ("python-configargparse" ,python-configargparse)
5972 ("python-datrie" ,python-datrie)
5973 ("python-docutils" ,python-docutils)
5974 ("python-gitpython" ,python-gitpython)
5975 ("python-jinja2" ,python-jinja2)
5976 ("python-jsonschema" ,python-jsonschema)
5977 ("python-networkx" ,python-networkx)
5978 ("python-psutil" ,python-psutil)
5979 ("python-pyyaml" ,python-pyyaml)
5980 ("python-ratelimiter" ,python-ratelimiter)
5981 ("python-requests" ,python-requests)
5982 ("python-wrapt" ,python-wrapt)))
5983 (home-page "https://snakemake.readthedocs.io")
5984 (synopsis "Python-based execution environment for make-like workflows")
5985 (description
5986 "Snakemake aims to reduce the complexity of creating workflows by
5987 providing a clean and modern domain specific specification language (DSL) in
5988 Python style, together with a fast and comfortable execution environment.")
5989 (license license:expat)))
5990
5991 (define-public python-pyqrcode
5992 (package
5993 (name "python-pyqrcode")
5994 (version "1.2.1")
5995 (source
5996 (origin
5997 (method url-fetch)
5998 (uri (pypi-uri "PyQRCode" version))
5999 (sha256
6000 (base32
6001 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6002 (build-system python-build-system)
6003 (home-page
6004 "https://github.com/mnooner256/pyqrcode")
6005 (synopsis "QR code generator")
6006 (description
6007 "Pyqrcode is a QR code generator written purely in Python with
6008 SVG, EPS, PNG and terminal output.")
6009 (license license:bsd-3)))
6010
6011 (define-public python-seaborn
6012 (package
6013 (name "python-seaborn")
6014 (version "0.9.0")
6015 (source
6016 (origin
6017 (method url-fetch)
6018 (uri (pypi-uri "seaborn" version))
6019 (sha256
6020 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6021 (patches
6022 (list (origin
6023 (method url-fetch)
6024 ;; This has already been merged, but there is no new
6025 ;; release including this patch. It fixes problems
6026 ;; with axis rotation that would lead to test
6027 ;; failures.
6028 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6029 (sha256
6030 (base32
6031 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6032 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
6033 (build-system python-build-system)
6034 (arguments
6035 `(#:phases
6036 (modify-phases %standard-phases
6037 (add-before 'check 'start-xserver
6038 (lambda* (#:key inputs #:allow-other-keys)
6039 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6040 ;; There must be a running X server and make check doesn't
6041 ;; start one. Therefore we must do it.
6042 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6043 (setenv "DISPLAY" ":1")
6044 #t)))
6045 (add-after 'unpack 'fix-tests
6046 (lambda _
6047 ;; test_cbar_ticks fails probably because of matplotlib's
6048 ;; expectation of using an older version of FreeType.
6049 (delete-file "seaborn/tests/test_matrix.py")
6050 #t))
6051 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6052 (propagated-inputs
6053 `(("python-pandas" ,python-pandas)
6054 ("python-matplotlib" ,python-matplotlib)
6055 ("python-numpy" ,python-numpy)
6056 ("python-scipy" ,python-scipy)))
6057 (native-inputs
6058 `(("python-pytest" ,python-pytest)
6059 ("xorg-server" ,xorg-server-for-tests)))
6060 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6061 (synopsis "Statistical data visualization")
6062 (description
6063 "Seaborn is a library for making attractive and informative statistical
6064 graphics in Python. It is built on top of matplotlib and tightly integrated
6065 with the PyData stack, including support for numpy and pandas data structures
6066 and statistical routines from scipy and statsmodels.")
6067 (license license:bsd-3)))
6068
6069 (define-public python2-seaborn
6070 (package-with-python2 python-seaborn))
6071
6072 (define-public python-mpmath
6073 (package
6074 (name "python-mpmath")
6075 (version "0.19")
6076 (source (origin
6077 (method url-fetch)
6078 (uri (string-append "http://mpmath.org/files/mpmath-"
6079 version ".tar.gz"))
6080 (sha256
6081 (base32
6082 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6083 (build-system python-build-system)
6084 (arguments
6085 '(#:phases
6086 (modify-phases %standard-phases
6087 (replace 'check
6088 (lambda _
6089 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6090 (home-page "http://mpmath.org")
6091 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6092 (description
6093 "@code{mpmath} can be used as an arbitrary-precision substitute for
6094 Python's float/complex types and math/cmath modules, but also does much
6095 more advanced mathematics.")
6096 (license license:bsd-3)))
6097
6098 (define-public python2-mpmath
6099 (package-with-python2 python-mpmath))
6100
6101 (define-public python-bigfloat
6102 (package
6103 (name "python-bigfloat")
6104 (version "0.3.0")
6105 (source
6106 (origin
6107 (method url-fetch)
6108 (uri (pypi-uri "bigfloat" version))
6109 (sha256
6110 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6111 (build-system python-build-system)
6112 (inputs
6113 `(("mpfr" ,mpfr)))
6114 (home-page "https://github.com/mdickinson/bigfloat")
6115 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6116 (description
6117 "This package provides a Python interface to the MPFR library for
6118 multiprecision arithmetic.")
6119 (license license:lgpl3+)))
6120
6121 (define-public python2-bigfloat
6122 (package-with-python2 python-bigfloat))
6123
6124 (define-public python-sympy
6125 (package
6126 (name "python-sympy")
6127 (version "1.1.1")
6128 (source
6129 (origin
6130 (method url-fetch)
6131 (uri (string-append
6132 "https://github.com/sympy/sympy/releases/download/sympy-"
6133 version "/sympy-" version ".tar.gz"))
6134 (sha256
6135 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6136 (build-system python-build-system)
6137 (arguments
6138 `(#:phases
6139 (modify-phases %standard-phases
6140 ;; Run the core tests after installation. By default it would run
6141 ;; *all* tests, which take a very long time to complete and are known
6142 ;; to be flaky.
6143 (delete 'check)
6144 (add-after 'install 'check
6145 (lambda* (#:key outputs #:allow-other-keys)
6146 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6147 #t)))))
6148 (propagated-inputs
6149 `(("python-mpmath" ,python-mpmath)))
6150 (home-page "http://www.sympy.org/")
6151 (synopsis "Python library for symbolic mathematics")
6152 (description
6153 "SymPy is a Python library for symbolic mathematics. It aims to become a
6154 full-featured computer algebra system (CAS) while keeping the code as simple
6155 as possible in order to be comprehensible and easily extensible.")
6156 (license license:bsd-3)))
6157
6158 (define-public python2-sympy
6159 (package
6160 (inherit (package-with-python2 python-sympy))
6161 (arguments
6162 `(#:phases
6163 (modify-phases %standard-phases
6164 ;; Run the core tests after installation. By default it would run
6165 ;; *all* tests, which take a very long time to complete and are known
6166 ;; to be flaky.
6167 (delete 'check)
6168 (add-after 'install 'check
6169 (lambda* (#:key outputs #:allow-other-keys)
6170 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6171 #t)))))))
6172
6173 (define-public python-q
6174 (package
6175 (name "python-q")
6176 (version "2.6")
6177 (source
6178 (origin
6179 (method url-fetch)
6180 (uri (pypi-uri "q" version))
6181 (sha256
6182 (base32
6183 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6184 (build-system python-build-system)
6185 (home-page "https://github.com/zestyping/q")
6186 (synopsis "Quick-and-dirty debugging output for tired programmers")
6187 (description
6188 "q is a Python module for \"print\" style of debugging Python code. It
6189 provides convenient short API for print out of values, tracebacks, and
6190 falling into the Python interpreter.")
6191 (license license:asl2.0)))
6192
6193 (define-public python2-q
6194 (package-with-python2 python-q))
6195
6196 (define-public python2-xlib
6197 (package
6198 (name "python2-xlib")
6199 (version "0.14")
6200 (source (origin
6201 (method url-fetch)
6202 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6203 "/" version "/"
6204 "python-xlib-" version ".tar.gz"))
6205 (sha256
6206 (base32
6207 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6208 (build-system python-build-system)
6209 (arguments
6210 `(#:python ,python-2 ;Python 2 only
6211 #:tests? #f)) ;no tests
6212 (home-page "http://python-xlib.sourceforge.net/")
6213 (synopsis "Python X11 client library")
6214 (description
6215 "The Python X Library is intended to be a fully functional X client
6216 library for Python programs. It is useful to implement low-level X clients.
6217 It is written entirely in Python.")
6218 (license license:gpl2+)))
6219
6220 (define-public python-singledispatch
6221 (package
6222 (name "python-singledispatch")
6223 (version "3.4.0.3")
6224 (source
6225 (origin
6226 (method url-fetch)
6227 (uri (pypi-uri "singledispatch" version))
6228 (sha256
6229 (base32
6230 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6231 (build-system python-build-system)
6232 (native-inputs
6233 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6234 (home-page
6235 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6236 (synopsis "Backport of singledispatch feature from Python 3.4")
6237 (description
6238 "This library brings functools.singledispatch from Python 3.4 to Python
6239 2.6-3.3.")
6240 (license license:expat)))
6241
6242 (define-public python2-singledispatch
6243 (package-with-python2 python-singledispatch))
6244
6245 ;; the python- version can be removed with python-3.5
6246 (define-public python-backports-abc
6247 (package
6248 (name "python-backports-abc")
6249 (version "0.5")
6250 (source
6251 (origin
6252 (method url-fetch)
6253 (uri (pypi-uri "backports_abc" version))
6254 (sha256
6255 (base32
6256 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6257 (build-system python-build-system)
6258 (home-page "https://github.com/cython/backports_abc")
6259 (synopsis "Backport of additions to the 'collections.abc' module")
6260 (description
6261 "Python-backports-abc provides a backport of additions to the
6262 @code{collections.abc} module in Python-3.5.")
6263 (license license:psfl)))
6264
6265 (define-public python2-backports-abc
6266 (package-with-python2 python-backports-abc))
6267
6268 (define-public python-backports-csv
6269 (package
6270 (name "python-backports-csv")
6271 (version "1.0.5")
6272 (source
6273 (origin
6274 (method url-fetch)
6275 (uri (pypi-uri "backports.csv" version))
6276 (sha256
6277 (base32
6278 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6279 (build-system python-build-system)
6280 (home-page "https://github.com/ryanhiebert/backports.csv")
6281 (synopsis "Backport of Python 3's csv module for Python 2")
6282 (description
6283 "Provides a backport of Python 3's @code{csv} module for parsing
6284 comma separated values. The API of the @code{csv} module in Python 2
6285 is drastically different from the @code{csv} module in Python 3.
6286 This is due, for the most part, to the difference between str in
6287 Python 2 and Python 3.")
6288 (license license:psfl)))
6289
6290 (define-public python2-backports-csv
6291 (package-with-python2 python-backports-csv))
6292
6293 (define-public python2-backports-shutil-get-terminal-size
6294 (package
6295 (name "python2-backports-shutil-get-terminal-size")
6296 (version "1.0.0")
6297 (source
6298 (origin
6299 (method url-fetch)
6300 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6301 (sha256
6302 (base32
6303 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6304 (build-system python-build-system)
6305 (arguments
6306 `(#:python ,python-2
6307 #:phases
6308 (modify-phases %standard-phases
6309 (replace 'check
6310 (lambda _
6311 (invoke "py.test" "-v"))))))
6312 (native-inputs
6313 `(("python2-pytest" ,python2-pytest)))
6314 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6315 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6316 (description
6317 "This package provides a backport of the @code{get_terminal_size
6318 function} from Python 3.3's @code{shutil}.
6319 Unlike the original version it is written in pure Python rather than C,
6320 so it might be a tiny bit slower.")
6321 (license license:expat)))
6322
6323 (define-public python-waf
6324 (package
6325 (name "python-waf")
6326 (version "2.0.19")
6327 (source (origin
6328 (method url-fetch)
6329 (uri (string-append "https://waf.io/"
6330 "waf-" version ".tar.bz2"))
6331 (sha256
6332 (base32
6333 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
6334 (build-system python-build-system)
6335 (arguments
6336 '(#:phases
6337 (modify-phases %standard-phases
6338 (replace 'build
6339 (lambda _
6340 ;; XXX: Find a way to add all extra tools.
6341 (let ((tools '("gccdeps"
6342 "clang_compilation_database")))
6343 (invoke "python" "waf-light" "configure" "build"
6344 (string-append "--tools="
6345 (string-join tools ","))))))
6346 (replace 'check
6347 (lambda _
6348 (invoke "python" "waf" "--version")))
6349 (replace 'install
6350 (lambda* (#:key outputs #:allow-other-keys)
6351 (let ((out (assoc-ref outputs "out")))
6352 (install-file "waf" (string-append out "/bin")))
6353 #t))
6354 ;; waf breaks when it is wrapped.
6355 (delete 'wrap))))
6356 (home-page "https://waf.io/")
6357 (synopsis "Python-based build system")
6358 (description
6359 "Waf is a Python-based framework for configuring, compiling and installing
6360 applications.")
6361 (license license:bsd-3)))
6362
6363 (define-public python2-waf
6364 (package-with-python2 python-waf))
6365
6366 (define-public python-pyzmq
6367 (package
6368 (name "python-pyzmq")
6369 (version "17.1.2")
6370 (source
6371 (origin
6372 (method url-fetch)
6373 (uri (pypi-uri "pyzmq" version))
6374 (sha256
6375 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6376 (build-system python-build-system)
6377 (arguments
6378 `(#:configure-flags
6379 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6380 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6381 ;; --inplace' for 'python setup.py test' to work.
6382 #:tests? #f))
6383 (inputs
6384 `(("zeromq" ,zeromq)))
6385 (native-inputs
6386 `(("pkg-config" ,pkg-config)
6387 ("python-nose" ,python-nose)))
6388 (home-page "https://github.com/zeromq/pyzmq")
6389 (synopsis "Python bindings for 0MQ")
6390 (description
6391 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6392 (license license:bsd-4)))
6393
6394 (define-public python2-pyzmq
6395 (package-with-python2 python-pyzmq))
6396
6397 (define-public python-pep8
6398 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6399 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6400 ;; some dependents' test suites, and nothing more.
6401 (package
6402 (name "python-pep8")
6403 (version "1.7.0")
6404 (source
6405 (origin
6406 (method url-fetch)
6407 (uri (pypi-uri "pep8" version))
6408 (sha256
6409 (base32
6410 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6411 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6412 (build-system python-build-system)
6413 (home-page "https://pep8.readthedocs.org/")
6414 (synopsis "Python style guide checker")
6415 (description
6416 "This tools checks Python code against some of the style conventions in
6417 PEP 8.")
6418 (license license:expat)))
6419
6420 (define-public python2-pep8
6421 (package-with-python2 python-pep8))
6422
6423 (define-public python-pyflakes
6424 (package
6425 (name "python-pyflakes")
6426 (version "2.1.1")
6427 (source
6428 (origin
6429 (method url-fetch)
6430 (uri (pypi-uri "pyflakes" version))
6431 (sha256
6432 (base32
6433 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6434 (build-system python-build-system)
6435 (home-page
6436 "https://github.com/pyflakes/pyflakes")
6437 (synopsis "Passive checker of Python programs")
6438 (description
6439 "Pyflakes statically checks Python source code for common errors.")
6440 (license license:expat)))
6441
6442 (define-public python2-pyflakes
6443 (package-with-python2 python-pyflakes))
6444
6445 (define-public python-mccabe
6446 (package
6447 (name "python-mccabe")
6448 (version "0.6.1")
6449 (source
6450 (origin
6451 (method url-fetch)
6452 (uri (pypi-uri "mccabe" version))
6453 (sha256
6454 (base32
6455 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6456 (build-system python-build-system)
6457 (native-inputs
6458 `(("python-pytest" ,python-pytest-bootstrap)
6459 ("python-pytest-runner" ,python-pytest-runner)))
6460 (home-page "https://github.com/flintwork/mccabe")
6461 (synopsis "McCabe checker, plugin for flake8")
6462 (description
6463 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6464 complexity of Python source code.")
6465 (license license:expat)))
6466
6467 (define-public python2-mccabe
6468 (package-with-python2 python-mccabe))
6469
6470 (define-public python-mccabe-0.2.1
6471 (package (inherit python-mccabe)
6472 (version "0.2.1")
6473 (source
6474 (origin
6475 (method url-fetch)
6476 (uri (pypi-uri "mccabe" version))
6477 (sha256
6478 (base32
6479 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6480
6481 (define-public python2-mccabe-0.2.1
6482 (package-with-python2 python-mccabe-0.2.1))
6483
6484 ;; Flake8 2.4.1 requires an older version of pep8.
6485 ;; This should be removed ASAP.
6486 (define-public python-pep8-1.5.7
6487 (package (inherit python-pep8)
6488 (version "1.5.7")
6489 (source
6490 (origin
6491 (method url-fetch)
6492 (uri (pypi-uri "pep8" version))
6493 (sha256
6494 (base32
6495 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6496 (arguments
6497 ;; XXX Tests not compatible with Python 3.5.
6498 '(#:tests? #f))))
6499
6500 (define-public python2-pep8-1.5.7
6501 (package-with-python2 python-pep8-1.5.7))
6502
6503 ;; Flake8 2.4.1 requires an older version of pyflakes.
6504 ;; This should be removed ASAP.
6505 (define-public python-pyflakes-0.8.1
6506 (package (inherit python-pyflakes)
6507 (version "0.8.1")
6508 (source
6509 (origin
6510 (method url-fetch)
6511 (uri (pypi-uri "pyflakes" version))
6512 (sha256
6513 (base32
6514 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6515 (arguments
6516 ;; XXX Tests not compatible with Python 3.5.
6517 '(#:tests? #f))))
6518
6519 (define-public python2-pyflakes-0.8.1
6520 (package-with-python2 python-pyflakes-0.8.1))
6521
6522 (define-public python-flake8
6523 (package
6524 (name "python-flake8")
6525 (version "3.7.7")
6526 (source (origin
6527 (method url-fetch)
6528 (uri (pypi-uri "flake8" version))
6529 (sha256
6530 (base32
6531 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6532 (build-system python-build-system)
6533 (arguments
6534 `(#:phases
6535 (modify-phases %standard-phases
6536 (delete 'check)
6537 (add-after 'install 'check
6538 (lambda* (#:key inputs outputs #:allow-other-keys)
6539 (add-installed-pythonpath inputs outputs)
6540 (invoke "pytest" "-v")
6541 #t)))))
6542 (propagated-inputs
6543 `(("python-pycodestyle" ,python-pycodestyle)
6544 ("python-entrypoints" ,python-entrypoints)
6545 ("python-pyflakes" ,python-pyflakes)
6546 ("python-mccabe" ,python-mccabe)))
6547 (native-inputs
6548 `(("python-mock" ,python-mock)
6549 ("python-pytest" ,python-pytest-bootstrap)
6550 ("python-pytest-runner" ,python-pytest-runner)))
6551 (home-page "https://gitlab.com/pycqa/flake8")
6552 (synopsis
6553 "The modular source code checker: pep8, pyflakes and co")
6554 (description
6555 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6556 (properties `((python2-variant . ,(delay python2-flake8))))
6557 (license license:expat)))
6558
6559 (define-public python2-flake8
6560 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6561 (package (inherit base)
6562 (propagated-inputs
6563 `(("python2-configparser" ,python2-configparser)
6564 ("python2-enum34" ,python2-enum34)
6565 ("python2-typing" ,python2-typing)
6566 ,@(package-propagated-inputs base))))))
6567
6568 ;; python-hacking requires flake8 <2.6.0.
6569 (define-public python-flake8-2.5
6570 (package
6571 (inherit python-flake8)
6572 (version "2.5.5")
6573 (source (origin
6574 (method url-fetch)
6575 (uri (pypi-uri "flake8" version))
6576 (sha256
6577 (base32
6578 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6579 (propagated-inputs
6580 `(("python-pep8" ,python-pep8)
6581 ,@(package-propagated-inputs python-flake8)))
6582 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6583
6584 (define-public python2-flake8-2.5
6585 (package
6586 (inherit python2-flake8)
6587 (version (package-version python-flake8-2.5))
6588 (source (origin
6589 (inherit (package-source python-flake8-2.5))))
6590 (propagated-inputs
6591 `(("python2-pep8" ,python2-pep8)
6592 ,@(package-propagated-inputs python2-flake8)))))
6593
6594 (define-public python-flake8-polyfill
6595 (package
6596 (name "python-flake8-polyfill")
6597 (version "1.0.2")
6598 (source
6599 (origin
6600 (method url-fetch)
6601 (uri (pypi-uri "flake8-polyfill" version))
6602 (sha256
6603 (base32
6604 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6605 (build-system python-build-system)
6606 (arguments
6607 '(#:phases
6608 (modify-phases %standard-phases
6609 (replace 'check
6610 (lambda _
6611 ;; Be compatible with Pytest 4:
6612 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6613 (substitute* "setup.cfg"
6614 (("\\[pytest\\]")
6615 "[tool:pytest]"))
6616
6617 (setenv "PYTHONPATH"
6618 (string-append (getcwd) "/build/lib:"
6619 (getenv "PYTHONPATH")))
6620 (invoke "py.test" "-v"))))))
6621 (native-inputs
6622 `(("python-flake8" ,python-flake8)
6623 ("python-mock" ,python-mock)
6624 ("python-pep8" ,python-pep8)
6625 ("python-pycodestyle" ,python-pycodestyle)
6626 ("python-pytest" ,python-pytest)))
6627 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6628 (synopsis "Polyfill package for Flake8 plugins")
6629 (description
6630 "This package that provides some compatibility helpers for Flake8
6631 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6632 (license license:expat)))
6633
6634 (define-public python2-flake8-polyfill
6635 (package-with-python2 python-flake8-polyfill))
6636
6637 (define-public python-mistune
6638 (package
6639 (name "python-mistune")
6640 (version "0.8.4")
6641 (source
6642 (origin
6643 (method url-fetch)
6644 (uri (pypi-uri "mistune" version))
6645 (sha256
6646 (base32
6647 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6648 (build-system python-build-system)
6649 (native-inputs
6650 `(("python-nose" ,python-nose)
6651 ("python-cython" ,python-cython)))
6652 (home-page "https://github.com/lepture/mistune")
6653 (synopsis "Markdown parser in pure Python")
6654 (description "This package provides a fast markdown parser in pure
6655 Python.")
6656 (license license:bsd-3)))
6657
6658 (define-public python2-mistune
6659 (package-with-python2 python-mistune))
6660
6661 (define-public python-markdown
6662 (package
6663 (name "python-markdown")
6664 (version "3.1.1")
6665 (source
6666 (origin
6667 (method url-fetch)
6668 (uri (pypi-uri "Markdown" version))
6669 (sha256
6670 (base32
6671 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6672 (build-system python-build-system)
6673 (native-inputs
6674 `(("python-nose" ,python-nose)
6675 ("python-pyyaml" ,python-pyyaml)))
6676 (home-page "https://python-markdown.github.io/")
6677 (synopsis "Python implementation of Markdown")
6678 (description
6679 "This package provides a Python implementation of John Gruber's
6680 Markdown. The library features international input, various Markdown
6681 extensions, and several HTML output formats. A command line wrapper
6682 markdown_py is also provided to convert Markdown files to HTML.")
6683 (license license:bsd-3)))
6684
6685 (define-public python2-markdown
6686 (package-with-python2 python-markdown))
6687
6688 (define-public python-ptyprocess
6689 (package
6690 (name "python-ptyprocess")
6691 (version "0.5.2")
6692 (source
6693 (origin
6694 (method url-fetch)
6695 (uri (pypi-uri "ptyprocess" version))
6696 (sha256
6697 (base32
6698 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6699 (build-system python-build-system)
6700 (native-inputs
6701 `(("python-nose" ,python-nose)))
6702 (arguments
6703 `(#:phases
6704 (modify-phases %standard-phases
6705 (replace 'check
6706 (lambda _ (invoke "nosetests"))))))
6707 (home-page "https://github.com/pexpect/ptyprocess")
6708 (synopsis "Run a subprocess in a pseudo terminal")
6709 (description
6710 "This package provides a Python library used to launch a subprocess in a
6711 pseudo terminal (pty), and interact with both the process and its pty.")
6712 (license license:isc)))
6713
6714 (define-public python2-ptyprocess
6715 (package-with-python2 python-ptyprocess))
6716
6717 (define-public python-cram
6718 (package
6719 (name "python-cram")
6720 (version "0.7")
6721 (home-page "https://bitheap.org/cram/")
6722 (source (origin
6723 (method url-fetch)
6724 (uri (list (string-append home-page "cram-"
6725 version ".tar.gz")
6726 (pypi-uri "cram" version)))
6727 (sha256
6728 (base32
6729 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6730 (arguments
6731 '(#:phases
6732 (modify-phases %standard-phases
6733 (add-after 'unpack 'patch-source
6734 (lambda _
6735 (substitute* (find-files "cram" ".*\\.py$")
6736 ;; Replace default shell path.
6737 (("/bin/sh") (which "sh")))
6738 (substitute* (find-files "tests" ".*\\.t$")
6739 (("md5") "md5sum")
6740 (("/bin/bash") (which "bash"))
6741 (("/bin/sh") (which "sh")))
6742 (substitute* "cram/_test.py"
6743 ;; This hack works around a bug triggered by substituting
6744 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6745 ;; "cram -h", which breaks the output at 80 characters. This
6746 ;; causes the line showing the default shell to break into two
6747 ;; lines, but the test expects a single line...
6748 (("env\\['COLUMNS'\\] = '80'")
6749 "env['COLUMNS'] = '160'"))
6750
6751 (substitute* "Makefile"
6752 ;; Recent versions of python-coverage have caused the test
6753 ;; coverage to decrease (as of version 0.7). Allow that.
6754 (("--fail-under=100")
6755 "--fail-under=90"))
6756
6757 #t))
6758 (replace 'check
6759 ;; The test phase uses the built library and executable.
6760 (lambda* (#:key inputs outputs #:allow-other-keys)
6761 (add-installed-pythonpath inputs outputs)
6762 (setenv "PATH" (string-append (getenv "PATH") ":"
6763 (assoc-ref outputs "out") "/bin"))
6764 (invoke "make" "test"))))))
6765 (build-system python-build-system)
6766 (native-inputs
6767 `(("python-coverage" ,python-coverage)
6768 ("which" ,which)))
6769 (synopsis "Simple testing framework for command line applications")
6770 (description
6771 "Cram is a functional testing framework for command line applications.
6772 Cram tests look like snippets of interactive shell sessions. Cram runs each
6773 command and compares the command output in the test with the command’s actual
6774 output.")
6775 (license license:gpl2+)))
6776
6777 (define-public python2-cram
6778 (package-with-python2 python-cram))
6779
6780 (define-public python-straight-plugin
6781 (package
6782 (name "python-straight-plugin")
6783 (version "1.4.1")
6784 (source
6785 (origin
6786 (method url-fetch)
6787 (uri (pypi-uri "straight.plugin" version))
6788 (sha256
6789 (base32
6790 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6791 (build-system python-build-system)
6792 (home-page "https://github.com/ironfroggy/straight.plugin")
6793 (synopsis "Simple namespaced plugin facility")
6794 (description "Straight Plugin provides a type of plugin you can create from
6795 almost any existing Python modules, and an easy way for outside developers to
6796 add functionality and customization to your projects with their own plugins.")
6797 (license license:expat)))
6798
6799 (define-public python2-straight-plugin
6800 (package-with-python2 python-straight-plugin))
6801
6802 (define-public python-fonttools
6803 (package
6804 (name "python-fonttools")
6805 (version "3.38.0")
6806 (source (origin
6807 (method url-fetch)
6808 (uri (pypi-uri "fonttools" version ".zip"))
6809 (sha256
6810 (base32
6811 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6812 (build-system python-build-system)
6813 (native-inputs
6814 `(("unzip" ,unzip)
6815 ("python-pytest" ,python-pytest)
6816 ("python-pytest-runner" ,python-pytest-runner)))
6817 (home-page "https://github.com/fonttools/fonttools")
6818 (synopsis "Tools to manipulate font files")
6819 (description
6820 "FontTools/TTX is a library to manipulate font files from Python. It
6821 supports reading and writing of TrueType/OpenType fonts, reading and writing
6822 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6823 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6824 from an XML-based format.")
6825 (license license:expat)))
6826
6827 (define-public python2-fonttools
6828 (package-with-python2 python-fonttools))
6829
6830 (define-public python-ly
6831 (package
6832 (name "python-ly")
6833 (version "0.9.5")
6834 (source
6835 (origin
6836 (method url-fetch)
6837 (uri (pypi-uri name version))
6838 (sha256
6839 (base32
6840 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6841 (build-system python-build-system)
6842 (arguments
6843 ;; FIXME: Some tests need network access.
6844 '(#:tests? #f))
6845 (synopsis "Tool and library for manipulating LilyPond files")
6846 (description "This package provides a Python library to parse, manipulate
6847 or create documents in LilyPond format. A command line program ly is also
6848 provided that can be used to do various manipulations with LilyPond files.")
6849 (home-page "https://pypi.python.org/pypi/python-ly")
6850 (license license:gpl2+)))
6851
6852 (define-public python-appdirs
6853 (package
6854 (name "python-appdirs")
6855 (version "1.4.3")
6856 (source
6857 (origin
6858 (method url-fetch)
6859 (uri (pypi-uri "appdirs" version))
6860 (sha256
6861 (base32
6862 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6863 (build-system python-build-system)
6864 (home-page "https://github.com/ActiveState/appdirs")
6865 (synopsis
6866 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6867 (description
6868 "This module provides a portable way of finding out where user data
6869 should be stored on various operating systems.")
6870 (license license:expat)))
6871
6872 (define-public python2-appdirs
6873 (package-with-python2 python-appdirs))
6874
6875 (define-public python-llfuse
6876 (package
6877 (name "python-llfuse")
6878 (version "1.3.5")
6879 (source (origin
6880 (method url-fetch)
6881 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6882 (sha256
6883 (base32
6884 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6885 (build-system python-build-system)
6886 (inputs
6887 `(("fuse" ,fuse)
6888 ("attr" ,attr)))
6889 (native-inputs
6890 `(("pkg-config" ,pkg-config)))
6891 (synopsis "Python bindings for FUSE")
6892 (description
6893 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6894 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6895 (license license:lgpl2.0+)
6896 (properties `((python2-variant . ,(delay python2-llfuse))))))
6897
6898 (define-public python2-llfuse
6899 (package (inherit (package-with-python2
6900 (strip-python2-variant python-llfuse)))
6901 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6902
6903 ;; For attic-0.16
6904 (define-public python-llfuse-0.41
6905 (package (inherit python-llfuse)
6906 (version "0.41.1")
6907 (source (origin
6908 (method url-fetch)
6909 (uri (string-append
6910 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6911 "llfuse-" version ".tar.bz2"))
6912 (sha256
6913 (base32
6914 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6915 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6916 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6917 (license (list license:expat license:lgpl2.0+))))
6918
6919 (define-public python-msgpack
6920 (package
6921 (name "python-msgpack")
6922 (version "0.5.6")
6923 (source (origin
6924 (method url-fetch)
6925 (uri (pypi-uri "msgpack" version))
6926 (sha256
6927 (base32
6928 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6929 (build-system python-build-system)
6930 (arguments
6931 `(#:modules ((guix build utils)
6932 (guix build python-build-system)
6933 (ice-9 ftw)
6934 (srfi srfi-1)
6935 (srfi srfi-26))
6936 #:phases
6937 (modify-phases %standard-phases
6938 (replace 'check
6939 (lambda _
6940 (let ((cwd (getcwd)))
6941 (setenv "PYTHONPATH"
6942 (string-append cwd "/build/"
6943 (find (cut string-prefix? "lib" <>)
6944 (scandir (string-append cwd "/build")))
6945 ":"
6946 (getenv "PYTHONPATH")))
6947 (invoke "pytest" "-v" "test")))))))
6948 (native-inputs
6949 `(("python-pytest" ,python-pytest)))
6950 (synopsis "MessagePack (de)serializer")
6951 (description "MessagePack is a fast, compact binary serialization format,
6952 suitable for similar data to JSON. This package provides CPython bindings for
6953 reading and writing MessagePack data.")
6954 (home-page "https://pypi.python.org/pypi/msgpack/")
6955 (license license:asl2.0)))
6956
6957 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6958 ;; release 0.5. Some packages like borg still call it by the old name for now.
6959 ;; <https://bugs.gnu.org/30662>
6960 (define-public python-msgpack-transitional
6961 (package
6962 (inherit python-msgpack)
6963 (name "python-msgpack-transitional")
6964 (arguments
6965 (substitute-keyword-arguments (package-arguments python-msgpack)
6966 ((#:phases phases)
6967 `(modify-phases ,phases
6968 (add-after 'unpack 'configure-transitional
6969 (lambda _
6970 ;; Keep using the old name.
6971 (substitute* "setup.py"
6972 (("TRANSITIONAL = False")
6973 "TRANSITIONAL = 1"))
6974 #t))))))))
6975
6976 (define-public python2-msgpack
6977 (package-with-python2 python-msgpack))
6978
6979 (define-public python-netaddr
6980 (package
6981 (name "python-netaddr")
6982 (version "0.7.19")
6983 (source
6984 (origin
6985 (method url-fetch)
6986 (uri (pypi-uri "netaddr" version))
6987 (sha256
6988 (base32
6989 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6990 (build-system python-build-system)
6991 (arguments `(#:tests? #f)) ;; No tests.
6992 (home-page "https://github.com/drkjam/netaddr/")
6993 (synopsis "Pythonic manipulation of network addresses")
6994 (description
6995 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6996 and MAC network addresses.")
6997 (license license:bsd-3)))
6998
6999 (define-public python2-netaddr
7000 (package-with-python2 python-netaddr))
7001
7002 (define-public python2-pyroute2
7003 (package
7004 (name "python2-pyroute2")
7005 (version "0.5.6")
7006 (source
7007 (origin
7008 (method url-fetch)
7009 (uri (pypi-uri "pyroute2" version))
7010 (sha256
7011 (base32
7012 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7013 (build-system python-build-system)
7014 (arguments
7015 `(#:python ,python-2)) ;Python 3.x is not supported
7016 (home-page "https://github.com/svinota/pyroute2")
7017 (synopsis "Python netlink library")
7018 (description
7019 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7020 Supported netlink families and protocols include:
7021 @itemize
7022 @item rtnl, network settings - addresses, routes, traffic controls
7023 @item nfnetlink - netfilter API: ipset, nftables, ...
7024 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7025 @item devlink - manage and monitor devlink-enabled hardware
7026 @item generic - generic netlink families
7027 @itemize
7028 @item nl80211 - wireless functions API (basic support)
7029 @item taskstats - extended process statistics
7030 @item acpi_events - ACPI events monitoring
7031 @item thermal_events - thermal events monitoring
7032 @item VFS_DQUOT - disk quota events monitoring
7033 @end itemize
7034 @end itemize")
7035 (license license:gpl2+)))
7036
7037 (define-public python-wrapt
7038 (package
7039 (name "python-wrapt")
7040 (version "1.11.2")
7041 (source
7042 (origin
7043 (method url-fetch)
7044 (uri (pypi-uri "wrapt" version))
7045 (sha256
7046 (base32
7047 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7048 (build-system python-build-system)
7049 (arguments
7050 ;; Tests are not included in the tarball, they are only available in the
7051 ;; git repository.
7052 `(#:tests? #f))
7053 (home-page "https://github.com/GrahamDumpleton/wrapt")
7054 (synopsis "Module for decorators, wrappers and monkey patching")
7055 (description
7056 "The aim of the wrapt module is to provide a transparent object proxy for
7057 Python, which can be used as the basis for the construction of function
7058 wrappers and decorator functions.")
7059 (license license:bsd-2)))
7060
7061 (define-public python2-wrapt
7062 (package-with-python2 python-wrapt))
7063
7064 (define-public python-xlrd
7065 (package
7066 (name "python-xlrd")
7067 (version "1.2.0")
7068 (source (origin
7069 (method url-fetch)
7070 (uri (pypi-uri "xlrd" version))
7071 (sha256
7072 (base32
7073 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7074 (build-system python-build-system)
7075 (arguments
7076 `(#:phases
7077 (modify-phases %standard-phases
7078 ;; Some tests depend on writing a temporary file to the user's home
7079 ;; directory.
7080 (add-after 'unpack 'fix-tests
7081 (lambda _
7082 (delete-file "tests/test_open_workbook.py")
7083 #t)))))
7084 (home-page "http://www.python-excel.org/")
7085 (synopsis "Library for extracting data from Excel files")
7086 (description "This package provides a library to extract data from
7087 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7088 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7089 Unicode-aware. It is not intended as an end-user tool.")
7090 (license license:bsd-3)))
7091
7092 (define-public python2-xlrd
7093 (package-with-python2 python-xlrd))
7094
7095 (define-public python-prettytable
7096 (package
7097 (name "python-prettytable")
7098 (version "0.7.2")
7099 (source
7100 (origin
7101 (method url-fetch)
7102 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7103 (sha256
7104 (base32
7105 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7106 (build-system python-build-system)
7107 (home-page "http://code.google.com/p/prettytable/")
7108 (synopsis "Display tabular data in an ASCII table format")
7109 (description
7110 "A library designed to represent tabular data in visually appealing ASCII
7111 tables. PrettyTable allows for selection of which columns are to be printed,
7112 independent alignment of columns (left or right justified or centred) and
7113 printing of sub-tables by specifying a row range.")
7114 (license license:bsd-3)))
7115
7116 (define-public python2-prettytable
7117 (package-with-python2 python-prettytable))
7118
7119 (define-public python-tables
7120 (package
7121 (name "python-tables")
7122 (version "3.4.4")
7123 (source
7124 (origin
7125 (method url-fetch)
7126 (uri (pypi-uri "tables" version))
7127 (sha256
7128 (base32
7129 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7130 (modules '((guix build utils)))
7131 (snippet
7132 '(begin
7133 ;; Remove pre-compiled .pyc files from source.
7134 (for-each delete-file-recursively
7135 (find-files "." "__pycache__" #:directories? #t))
7136 (for-each delete-file (find-files "." "\\.pyc$"))
7137 #t))))
7138 (build-system python-build-system)
7139 (arguments
7140 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7141 ;; or "check", so we must override the build and check phases.
7142 #:phases
7143 (modify-phases %standard-phases
7144 (add-after 'unpack 'use-gcc
7145 (lambda _
7146 (substitute* "setup.py"
7147 (("compiler = new_compiler\\(\\)" line)
7148 (string-append line
7149 "\ncompiler.set_executables(compiler='gcc',"
7150 "compiler_so='gcc',"
7151 "linker_exe='gcc',"
7152 "linker_so='gcc -shared')")))
7153 #t))
7154 (replace 'build
7155 (lambda* (#:key inputs #:allow-other-keys)
7156 (invoke "python" "setup.py" "build"
7157 (string-append "--hdf5="
7158 (assoc-ref inputs "hdf5")))))
7159 (replace 'check
7160 (lambda* (#:key inputs #:allow-other-keys)
7161 (invoke "python" "setup.py" "check"
7162 (string-append "--hdf5="
7163 (assoc-ref inputs "hdf5"))))))))
7164 (propagated-inputs
7165 `(("python-numexpr" ,python-numexpr)
7166 ("python-numpy" ,python-numpy)))
7167 (native-inputs
7168 `(("python-cython" ,python-cython)
7169 ("pkg-config" ,pkg-config)))
7170 (inputs
7171 `(("hdf5" ,hdf5)
7172 ("bzip2" ,bzip2)
7173 ("zlib" ,zlib)))
7174 (home-page "http://www.pytables.org/")
7175 (synopsis "Hierarchical datasets for Python")
7176 (description "PyTables is a package for managing hierarchical datasets and
7177 designed to efficiently cope with extremely large amounts of data.")
7178 (license license:bsd-3)))
7179
7180 (define-public python2-tables
7181 (package-with-python2 python-tables))
7182
7183 (define-public python-pyasn1
7184 (package
7185 (name "python-pyasn1")
7186 (version "0.4.3")
7187 (source
7188 (origin
7189 (method url-fetch)
7190 (uri (pypi-uri "pyasn1" version))
7191 (sha256
7192 (base32
7193 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7194 (build-system python-build-system)
7195 (home-page "http://pyasn1.sourceforge.net/")
7196 (synopsis "ASN.1 types and codecs")
7197 (description
7198 "This is an implementation of ASN.1 types and codecs in Python. It is
7199 suitable for a wide range of protocols based on the ASN.1 specification.")
7200 (license license:bsd-2)))
7201
7202 (define-public python2-pyasn1
7203 (package-with-python2 python-pyasn1))
7204
7205 (define-public python-pyasn1-modules
7206 (package
7207 (name "python-pyasn1-modules")
7208 (version "0.2.2")
7209 (source
7210 (origin
7211 (method url-fetch)
7212 (uri (pypi-uri "pyasn1-modules" version))
7213 (sha256
7214 (base32
7215 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7216 (build-system python-build-system)
7217 (propagated-inputs
7218 `(("python-pyasn1" ,python-pyasn1)))
7219 (home-page "https://sourceforge.net/projects/pyasn1/")
7220 (synopsis "ASN.1 codec implementations")
7221 (description
7222 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7223 implementations of ASN.1-based codecs and protocols.")
7224 (license license:bsd-3)))
7225
7226 (define-public python2-pyasn1-modules
7227 (package-with-python2 python-pyasn1-modules))
7228
7229 (define-public python-ipaddress
7230 (package
7231 (name "python-ipaddress")
7232 (version "1.0.22")
7233 (source (origin
7234 (method url-fetch)
7235 (uri (pypi-uri "ipaddress" version))
7236 (sha256
7237 (base32
7238 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7239 (build-system python-build-system)
7240 (home-page "https://github.com/phihag/ipaddress")
7241 (synopsis "IP address manipulation library")
7242 (description
7243 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7244 in Python. This library is used to create, poke at, and manipulate IPv4 and
7245 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7246 module to older versions of Python.")
7247 (license license:psfl)))
7248
7249 (define-public python2-ipaddress
7250 (package-with-python2 python-ipaddress))
7251
7252 (define-public python2-ipaddr
7253 (package
7254 (name "python2-ipaddr")
7255 (version "2.1.11")
7256 (source
7257 (origin
7258 (method url-fetch)
7259 (uri (pypi-uri "ipaddr" version))
7260 (sha256
7261 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7262 (build-system python-build-system)
7263 (arguments
7264 `(#:python ,python-2 ;version 2 only
7265 #:phases
7266 (modify-phases %standard-phases
7267 (replace 'check
7268 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7269 (home-page "https://github.com/google/ipaddr-py")
7270 (synopsis "IP address manipulation library")
7271 (description
7272 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7273 IPv6 addresses and networks.
7274
7275 For new implementations you may prefer to use the standard module
7276 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7277 versions of Python.")
7278 (license license:asl2.0)))
7279
7280 (define-public python-idna
7281 (package
7282 (name "python-idna")
7283 (version "2.8")
7284 (source
7285 (origin
7286 (method url-fetch)
7287 (uri (pypi-uri "idna" version))
7288 (sha256
7289 (base32
7290 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7291 (build-system python-build-system)
7292 (home-page "https://github.com/kjd/idna")
7293 (synopsis "Internationalized domain names in applications")
7294 (description
7295 "This is a library to support the Internationalised Domain Names in
7296 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7297 protocol is often referred to as “IDNA2008” and can produce different results
7298 from the earlier standard from 2003. The library is also intended to act as a
7299 suitable drop-in replacement for the “encodings.idna” module that comes with
7300 the Python standard library but currently only supports the older 2003
7301 specification.")
7302 (license license:bsd-4)))
7303
7304 (define-public python-idna-2.7
7305 (package (inherit python-idna)
7306 (version "2.7")
7307 (source (origin
7308 (method url-fetch)
7309 (uri (pypi-uri "idna" version))
7310 (sha256
7311 (base32
7312 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7313
7314
7315 (define-public python2-idna
7316 (package-with-python2 python-idna))
7317
7318 (define-public python-idna-ssl
7319 (package
7320 (name "python-idna-ssl")
7321 (version "1.0.1")
7322 (source
7323 (origin
7324 (method url-fetch)
7325 (uri (pypi-uri "idna-ssl" version))
7326 (sha256
7327 (base32
7328 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7329 (build-system python-build-system)
7330 (arguments
7331 `(#:tests? #f)) ;circular dependency with python-aiohttp
7332 (home-page "https://github.com/aio-libs/idna-ssl")
7333 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7334 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7335 domains support.")
7336 (license license:expat)))
7337
7338 (define-public python-pretend
7339 (package
7340 (name "python-pretend")
7341 (version "1.0.9")
7342 (source
7343 (origin
7344 (method url-fetch)
7345 (uri (pypi-uri "pretend" version))
7346 (sha256
7347 (base32
7348 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7349 (build-system python-build-system)
7350 (home-page "https://github.com/alex/pretend")
7351 (synopsis "Library for stubbing in Python")
7352 (description
7353 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7354 technique for writing tests. You may hear the term mixed up with mocks,
7355 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7356 responses, rather than doing any computation.")
7357 (license license:bsd-3)))
7358
7359 (define-public python2-pretend
7360 (package-with-python2 python-pretend))
7361
7362 (define-public python-pip
7363 (package
7364 (name "python-pip")
7365 (version "19.2.1")
7366 (source
7367 (origin
7368 (method url-fetch)
7369 (uri (pypi-uri "pip" version))
7370 (sha256
7371 (base32
7372 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7373 (build-system python-build-system)
7374 (arguments
7375 '(#:tests? #f)) ; there are no tests in the pypi archive.
7376 (home-page "https://pip.pypa.io/")
7377 (synopsis "Package manager for Python software")
7378 (description
7379 "Pip is a package manager for Python software, that finds packages on the
7380 Python Package Index (PyPI).")
7381 (license license:expat)))
7382
7383 (define-public python2-pip
7384 (package-with-python2 python-pip))
7385
7386 (define-public python-tlsh
7387 (package
7388 (name "python-tlsh")
7389 (version "3.4.5")
7390 (home-page "https://github.com/trendmicro/tlsh")
7391 (source
7392 (origin
7393 (method git-fetch)
7394 (uri (git-reference
7395 (url "https://github.com/trendmicro/tlsh.git")
7396 (commit (string-append "v" version))))
7397 (file-name (git-file-name name version))
7398 (sha256
7399 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7400 (build-system cmake-build-system)
7401 (arguments
7402 '(#:out-of-source? #f
7403 #:phases (modify-phases %standard-phases
7404 (replace
7405 'install
7406 (lambda* (#:key outputs #:allow-other-keys)
7407 ;; Build and install the Python bindings. The underlying
7408 ;; C++ library is apparently not meant to be installed.
7409 (let ((out (assoc-ref outputs "out")))
7410 (with-directory-excursion "py_ext"
7411 (and (system* "python" "setup.py" "build")
7412 (system* "python" "setup.py" "install"
7413 (string-append "--prefix=" out))))))))))
7414 (inputs `(("python" ,python-wrapper))) ;for the bindings
7415 (synopsis "Fuzzy matching library for Python")
7416 (description
7417 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7418 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7419 value which can be used for similarity comparisons. Similar objects have
7420 similar hash values, which allows for the detection of similar objects by
7421 comparing their hash values. The byte stream should have a sufficient amount
7422 of complexity; for example, a byte stream of identical bytes will not generate
7423 a hash value.")
7424 (license license:asl2.0)))
7425
7426 (define-public python2-tlsh
7427 (package
7428 (inherit python-tlsh)
7429 (name "python2-tlsh")
7430 (inputs `(("python" ,python-2)))))
7431
7432 (define-public python-termcolor
7433 (package
7434 (name "python-termcolor")
7435 (version "1.1.0")
7436 (source
7437 (origin
7438 (method url-fetch)
7439 (uri (pypi-uri "termcolor" version))
7440 (sha256
7441 (base32
7442 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7443 (build-system python-build-system)
7444 (arguments
7445 ;; There are no tests.
7446 `(#:tests? #f))
7447 (home-page "https://pypi.python.org/pypi/termcolor")
7448 (synopsis "ANSII Color formatting for terminal output")
7449 (description
7450 "This package provides ANSII Color formatting for output in terminals.")
7451 (license license:expat)))
7452
7453 (define-public python2-termcolor
7454 (package-with-python2 python-termcolor))
7455
7456 (define-public python-libarchive-c
7457 (package
7458 (name "python-libarchive-c")
7459 (version "2.8")
7460 (source (origin
7461 (method url-fetch)
7462 (uri (pypi-uri "libarchive-c" version))
7463 (sha256
7464 (base32
7465 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7466 (build-system python-build-system)
7467 (arguments
7468 '(#:phases (modify-phases %standard-phases
7469 (add-before
7470 'build 'reference-libarchive
7471 (lambda* (#:key inputs #:allow-other-keys)
7472 ;; Retain the absolute file name of libarchive.so.
7473 (let ((libarchive (assoc-ref inputs "libarchive")))
7474 (substitute* "libarchive/ffi.py"
7475 (("find_library\\('archive'\\)")
7476 (string-append "'" libarchive
7477 "/lib/libarchive.so'"))))))
7478 (replace 'check
7479 (lambda _ (invoke "pytest" "-vv"))))))
7480 (native-inputs
7481 `(("python-mock" ,python-mock)
7482 ("python-pytest" ,python-pytest)))
7483 (inputs
7484 `(("libarchive" ,libarchive)))
7485 (home-page "https://github.com/Changaco/python-libarchive-c")
7486 (synopsis "Python interface to libarchive")
7487 (description
7488 "This package provides Python bindings to libarchive, a C library to
7489 access possibly compressed archives in many different formats. It uses
7490 Python's @code{ctypes} foreign function interface (FFI).")
7491 (license license:lgpl2.0+)))
7492
7493 (define-public python2-libarchive-c
7494 (package-with-python2 python-libarchive-c))
7495
7496 (define-public python-file
7497 (package
7498 (inherit file)
7499 (name "python-file")
7500 (build-system python-build-system)
7501 (arguments
7502 '(#:tests? #f ;no tests
7503 #:configure-flags '("--single-version-externally-managed" "--root=/")
7504 #:phases (modify-phases %standard-phases
7505 (add-before 'build 'change-directory
7506 (lambda _
7507 (chdir "python")
7508 #t))
7509 (add-before 'build 'set-library-file-name
7510 (lambda* (#:key inputs #:allow-other-keys)
7511 (let ((file (assoc-ref inputs "file")))
7512 (substitute* "magic.py"
7513 (("find_library\\('magic'\\)")
7514 (string-append "'" file "/lib/libmagic.so'")))
7515 #t))))))
7516 (inputs `(("file" ,file)))
7517 (native-inputs (if (%current-target-system)
7518 `(("self" ,this-package))
7519 '()))
7520 (synopsis "Python bindings to the libmagic file type guesser. Note that
7521 this module and the python-magic module both provide a \"magic.py\" file;
7522 these two modules, which are different and were developed separately, both
7523 serve the same purpose: provide Python bindings for libmagic.")))
7524
7525 (define-public python2-file
7526 (package-with-python2 python-file))
7527
7528 (define-public python-debian
7529 (package
7530 (name "python-debian")
7531 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7532 (version "0.1.36")
7533 (source
7534 (origin
7535 ;; Use git-fetch, as pypi doesn't include test suite.
7536 (method git-fetch)
7537 (uri (git-reference
7538 (url home-page)
7539 (commit version)))
7540 (file-name (git-file-name name version))
7541 (sha256
7542 (base32
7543 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7544 (build-system python-build-system)
7545 (arguments
7546 `(#:phases (modify-phases %standard-phases
7547 (add-after 'unpack 'remove-debian-specific-tests
7548 ;; python-apt, apt and dpkg are not yet available in guix,
7549 ;; and these tests heavily depend on them.
7550 (lambda _
7551 (delete-file "lib/debian/tests/test_deb822.py")
7552 (delete-file "lib/debian/tests/test_debfile.py")
7553 #t)))))
7554 (propagated-inputs
7555 `(("python-six" ,python-six)
7556 ("python-chardet" ,python-chardet)))
7557 (synopsis "Debian package related modules")
7558 (description
7559 ;; XXX: Use @enumerate instead of @itemize to work around
7560 ;; <http://bugs.gnu.org/21772>.
7561 "This package provides Python modules that abstract many formats of
7562 Debian-related files, such as:
7563
7564 @enumerate
7565 @item Debtags information;
7566 @item @file{debian/changelog} files;
7567 @item packages files, pdiffs;
7568 @item control files of single or multiple RFC822-style paragraphs---e.g.
7569 @file{debian/control}, @file{.changes}, @file{.dsc};
7570 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7571 contained files and meta-information.
7572 @end enumerate\n")
7573
7574 ;; Modules are either GPLv2+ or GPLv3+.
7575 (license license:gpl3+)))
7576
7577 (define-public python2-debian
7578 (package-with-python2 python-debian))
7579
7580 (define-public python-nbformat
7581 (package
7582 (name "python-nbformat")
7583 (version "4.4.0")
7584 (source
7585 (origin
7586 (method url-fetch)
7587 (uri (pypi-uri "nbformat" version))
7588 (sha256
7589 (base32
7590 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7591 (build-system python-build-system)
7592 (arguments `(#:tests? #f)) ; no test target
7593 (propagated-inputs
7594 `(("python-ipython-genutils" ,python-ipython-genutils)
7595 ("python-jsonschema" ,python-jsonschema)
7596 ("python-jupyter-core" ,python-jupyter-core)
7597 ("python-traitlets" ,python-traitlets)))
7598 (home-page "http://jupyter.org")
7599 (synopsis "Jupyter Notebook format")
7600 (description "This package provides the reference implementation of the
7601 Jupyter Notebook format and Python APIs for working with notebooks.")
7602 (license license:bsd-3)))
7603
7604 (define-public python2-nbformat
7605 (package-with-python2 python-nbformat))
7606
7607 (define-public python-bleach
7608 (package
7609 (name "python-bleach")
7610 (version "3.1.0")
7611 (source
7612 (origin
7613 (method url-fetch)
7614 (uri (pypi-uri "bleach" version))
7615 (sha256
7616 (base32
7617 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7618 (build-system python-build-system)
7619 (propagated-inputs
7620 `(("python-webencodings" ,python-webencodings)
7621 ("python-six" ,python-six)))
7622 (native-inputs
7623 `(("python-pytest" ,python-pytest)
7624 ("python-pytest-runner" ,python-pytest-runner-2)))
7625 (home-page "https://github.com/jsocol/bleach")
7626 (synopsis "Whitelist-based HTML-sanitizing tool")
7627 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7628 (license license:asl2.0)))
7629
7630 (define-public python2-bleach
7631 (package-with-python2 python-bleach))
7632
7633 (define-public python-entrypoints
7634 (package
7635 (name "python-entrypoints")
7636 (version "0.3")
7637 (source
7638 (origin
7639 (method url-fetch)
7640 (uri (pypi-uri "entrypoints" version))
7641 (sha256
7642 (base32
7643 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7644 (build-system python-build-system)
7645 ;; The package does not come with a setup.py file, so we have to generate
7646 ;; one ourselves.
7647 (arguments
7648 `(#:tests? #f
7649 #:phases
7650 (modify-phases %standard-phases
7651 (add-after 'unpack 'create-setup.py
7652 (lambda _
7653 (call-with-output-file "setup.py"
7654 (lambda (port)
7655 (format port "\
7656 from setuptools import setup
7657 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7658 " ,version))))))))
7659 (home-page "https://github.com/takluyver/entrypoints")
7660 (synopsis "Discover and load entry points from installed Python packages")
7661 (description "Entry points are a way for Python packages to advertise
7662 objects with some common interface. The most common examples are
7663 @code{console_scripts} entry points, which define shell commands by
7664 identifying a Python function to run. The @code{entrypoints} module contains
7665 functions to find and load entry points.")
7666 (license license:expat)))
7667
7668 (define-public python2-entrypoints
7669 (package-with-python2 python-entrypoints))
7670
7671 (define-public python-nbconvert
7672 (package
7673 (name "python-nbconvert")
7674 (version "5.0.0b1")
7675 (source
7676 (origin
7677 (method url-fetch)
7678 (uri (pypi-uri "nbconvert" version))
7679 (sha256
7680 (base32
7681 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7682 (build-system python-build-system)
7683 (arguments
7684 `(;; The "bdist_egg" target is disabled by default, causing the installation
7685 ;; to fail.
7686 #:configure-flags (list "bdist_egg")
7687 ;; FIXME: 5 failures, 40 errors.
7688 #:tests? #f))
7689 ;; #:phases
7690 ;; (modify-phases %standard-phases
7691 ;; (replace 'check
7692 ;; (lambda _
7693 ;; (zero? (system* "py.test" "-v")))))
7694 (native-inputs
7695 `(("python-pytest" ,python-pytest)))
7696 (propagated-inputs
7697 `(("python-bleach" ,python-bleach)
7698 ("python-entrypoints" ,python-entrypoints)
7699 ("python-jinja2" ,python-jinja2)
7700 ("python-jupyter-core" ,python-jupyter-core)
7701 ("python-mistune" ,python-mistune)
7702 ("python-nbformat" ,python-nbformat)
7703 ("python-pygments" ,python-pygments)
7704 ("python-traitlets" ,python-traitlets)))
7705 (home-page "http://jupyter.org")
7706 (synopsis "Converting Jupyter Notebooks")
7707 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7708 notebooks to various other formats via Jinja templates. It allows you to
7709 convert an @code{.ipynb} notebook file into various static formats including:
7710
7711 @enumerate
7712 @item HTML
7713 @item LaTeX
7714 @item PDF
7715 @item Reveal JS
7716 @item Markdown (md)
7717 @item ReStructured Text (rst)
7718 @item executable script
7719 @end enumerate\n")
7720 (license license:bsd-3)))
7721
7722 (define-public python2-nbconvert
7723 (package-with-python2 python-nbconvert))
7724
7725 (define-public python-notebook
7726 (package
7727 (name "python-notebook")
7728 (version "5.7.4")
7729 (source (origin
7730 (method url-fetch)
7731 (uri (pypi-uri "notebook" version))
7732 (sha256
7733 (base32
7734 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7735 (build-system python-build-system)
7736 (arguments
7737 `(#:phases
7738 (modify-phases %standard-phases
7739 (replace 'check
7740 (lambda _
7741 ;; These tests require a browser
7742 (delete-file-recursively "notebook/tests/selenium")
7743 ;; Some tests need HOME
7744 (setenv "HOME" "/tmp")
7745 ;; This file contains "warningfilters", which are not supported
7746 ;; by this version of nose.
7747 (delete-file "setup.cfg")
7748 (with-directory-excursion "/tmp"
7749 (invoke "nosetests" "-v"))
7750 #t)))))
7751 (propagated-inputs
7752 `(("python-jupyter-core" ,python-jupyter-core)
7753 ("python-nbformat" ,python-nbformat)
7754 ("python-nbconvert" ,python-nbconvert)
7755 ("python-prometheus-client" ,python-prometheus-client)
7756 ("python-send2trash" ,python-send2trash)
7757 ("python-terminado" ,python-terminado)))
7758 (native-inputs
7759 `(("python-nose" ,python-nose)
7760 ("python-sphinx" ,python-sphinx)
7761 ("python-requests" ,python-requests)))
7762 (home-page "http://jupyter.org/")
7763 (synopsis "Web-based notebook environment for interactive computing")
7764 (description
7765 "The Jupyter HTML notebook is a web-based notebook environment for
7766 interactive computing.")
7767 (properties `((python2-variant . ,(delay python2-notebook))))
7768 (license license:bsd-3)))
7769
7770 (define-public python2-notebook
7771 (let ((base (package-with-python2
7772 (strip-python2-variant python-notebook))))
7773 (package (inherit base)
7774 (native-inputs
7775 `(("python2-mock" ,python2-mock)
7776 ,@(package-native-inputs base)))
7777 (arguments
7778 (substitute-keyword-arguments (package-arguments base)
7779 ((#:phases phases)
7780 `(modify-phases ,phases
7781 (add-before 'check 'disable-test-case
7782 ;; The test requires network access to localhost. Curiously it
7783 ;; fails with Python 2 only. Simply make the test-case return
7784 ;; immediately.
7785 (lambda _
7786 (substitute*
7787 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7788 (("formats = self.nbconvert_api") "return #")))))))))))
7789
7790 (define-public python-widgetsnbextension
7791 (package
7792 (name "python-widgetsnbextension")
7793 (version "3.4.2")
7794 (source
7795 (origin
7796 (method url-fetch)
7797 (uri (pypi-uri "widgetsnbextension" version))
7798 (sha256
7799 (base32
7800 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7801 (build-system python-build-system)
7802 (propagated-inputs
7803 `(("python-ipykernel" ,python-ipykernel)
7804 ("python-notebook" ,python-notebook)))
7805 (native-inputs
7806 `(("python-certifi" ,python-certifi)
7807 ("python-nose" ,python-nose)))
7808 (home-page "https://ipython.org")
7809 (synopsis "IPython HTML widgets for Jupyter")
7810 (description "This package provides interactive HTML widgets for Jupyter
7811 notebooks.")
7812 (license license:bsd-3)))
7813
7814 (define-public python2-widgetsnbextension
7815 (package-with-python2 python-widgetsnbextension))
7816
7817 (define-public python-ipywidgets
7818 (package
7819 (name "python-ipywidgets")
7820 (version "5.2.2")
7821 (source
7822 (origin
7823 (method url-fetch)
7824 (uri (pypi-uri "ipywidgets" version))
7825 (sha256
7826 (base32
7827 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7828 (build-system python-build-system)
7829 (propagated-inputs
7830 `(("python-ipython" ,python-ipython)
7831 ("python-traitlets" ,python-traitlets)
7832 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7833 (native-inputs
7834 `(("python-nose" ,python-nose)
7835 ("python-pytest" ,python-pytest)))
7836 (home-page "https://ipython.org")
7837 (synopsis "IPython HTML widgets for Jupyter")
7838 (description "Ipywidgets are interactive HTML widgets for Jupyter
7839 notebooks and the IPython kernel. Notebooks come alive when interactive
7840 widgets are used. Users gain control of their data and can visualize changes
7841 in the data.")
7842 (license license:bsd-3)))
7843
7844 (define-public python2-ipywidgets
7845 (package-with-python2 python-ipywidgets))
7846
7847 (define-public python-jupyter-console
7848 (package
7849 (name "python-jupyter-console")
7850 (version "6.0.0")
7851 (source
7852 (origin
7853 (method url-fetch)
7854 (uri (pypi-uri "jupyter_console" version))
7855 (sha256
7856 (base32
7857 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7858 (build-system python-build-system)
7859 (propagated-inputs
7860 `(("python-ipykernel" ,python-ipykernel)
7861 ("python-jupyter-client" ,python-jupyter-client)
7862 ("python-prompt-toolkit" ,python-prompt-toolkit)
7863 ("python-pygments" ,python-pygments)))
7864 (native-inputs
7865 `(("python-nose" ,python-nose)))
7866 (home-page "https://jupyter.org")
7867 (synopsis "Jupyter terminal console")
7868 (description "This package provides a terminal-based console frontend for
7869 Jupyter kernels. It also allows for console-based interaction with non-Python
7870 Jupyter kernels such as IJulia and IRKernel.")
7871 (license license:bsd-3)))
7872
7873 (define-public python2-jupyter-console
7874 (package
7875 (name "python2-jupyter-console")
7876 (version "5.2.0")
7877 (source
7878 (origin
7879 (method url-fetch)
7880 (uri (pypi-uri "jupyter_console" version))
7881 (sha256
7882 (base32
7883 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7884 (build-system python-build-system)
7885 ;; Tests only run in an TTY.
7886 (arguments `(#:tests? #f))
7887 (propagated-inputs
7888 `(("python2-ipykernel" ,python2-ipykernel)
7889 ("python2-jupyter-client" ,python2-jupyter-client)
7890 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7891 ("python2-pygments" ,python2-pygments)))
7892 (native-inputs
7893 `(("python2-nose" ,python2-nose)))
7894 (home-page "https://jupyter.org")
7895 (synopsis "Jupyter terminal console")
7896 (description "This package provides a terminal-based console frontend for
7897 Jupyter kernels. It also allows for console-based interaction with non-Python
7898 Jupyter kernels such as IJulia and IRKernel.")
7899 (license license:bsd-3)))
7900
7901 ;; The python-ipython and python-jupyter-console require each other. To get
7902 ;; the functionality in both packages working, strip down the
7903 ;; python-jupyter-console package when using it as an input to python-ipython.
7904 (define python-jupyter-console-minimal
7905 (package
7906 (inherit python-jupyter-console)
7907 (name "python-jupyter-console-minimal")
7908 (arguments
7909 (substitute-keyword-arguments
7910 (package-arguments python-jupyter-console)
7911 ((#:phases phases)
7912 `(modify-phases ,phases
7913 (add-after 'install 'delete-bin
7914 (lambda* (#:key outputs #:allow-other-keys)
7915 ;; Delete the bin files, to avoid conflicts in profiles
7916 ;; where python-ipython and python-jupyter-console are
7917 ;; both present.
7918 (delete-file-recursively
7919 (string-append
7920 (assoc-ref outputs "out") "/bin"))))))))
7921 ;; Remove the python-ipython propagated input, to avoid the cycle
7922 (propagated-inputs
7923 (alist-delete
7924 "python-ipython"
7925 (package-propagated-inputs python-jupyter-console)))))
7926
7927 (define-public python-qtconsole
7928 (package
7929 (name "python-qtconsole")
7930 (version "4.4.3")
7931 (source
7932 (origin
7933 (method url-fetch)
7934 (uri (pypi-uri "qtconsole" version))
7935 (sha256
7936 (base32
7937 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7938 (build-system python-build-system)
7939 (arguments
7940 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7941 ;; but we only have the LTS version 5.x. This means that there might be
7942 ;; runtime errors, but since this is a dependency of the Jupyter package,
7943 ;; and Jupyter can be used without the qtconsole we can overlook this for
7944 ;; now.
7945 `(#:tests? #f
7946 #:phases
7947 (modify-phases %standard-phases
7948 (add-before 'check 'pre-check
7949 (lambda _
7950 (setenv "QT_QPA_PLATFORM" "offscreen")
7951 #t)))))
7952 (propagated-inputs
7953 `(("python-ipykernel" ,python-ipykernel)
7954 ("python-ipython" ,python-ipython)))
7955 (native-inputs
7956 `(("python-pytest" ,python-pytest)))
7957 (home-page "http://jupyter.org")
7958 (synopsis "Jupyter Qt console")
7959 (description "This package provides a Qt-based console for Jupyter with
7960 support for rich media output.")
7961 (license license:bsd-3)))
7962
7963 (define-public python-jsbeautifier
7964 (package
7965 (name "python-jsbeautifier")
7966 (version "1.10.2")
7967 (home-page "https://github.com/beautify-web/js-beautify")
7968 (source (origin
7969 (method git-fetch)
7970 (uri (git-reference
7971 (url home-page)
7972 (commit (string-append "v" version))))
7973 (file-name (git-file-name name version))
7974 (sha256
7975 (base32
7976 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
7977 (build-system python-build-system)
7978 (arguments
7979 `(#:phases (modify-phases %standard-phases
7980 (add-after 'unpack 'chdir
7981 (lambda _
7982 ;; The upstream Git repository contains all the code,
7983 ;; but this package only builds the python code.
7984 (chdir "python")
7985 #t))
7986 (add-after 'unpack 'patch-python-six-requirements
7987 (lambda _
7988 (substitute* "python/setup.py"
7989 (("six>=1.12.0")
7990 "six>=1.11.0"))
7991 #t)))))
7992 (propagated-inputs
7993 `(("python-editorconfig" ,python-editorconfig)
7994 ("python-six" ,python-six)))
7995 (native-inputs
7996 `(("python-pytest" ,python-pytest)))
7997 (synopsis "JavaScript unobfuscator and beautifier")
7998 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
7999 popular online obfuscators.")
8000 (license license:expat)))
8001
8002 (define-public jupyter
8003 (package
8004 (name "jupyter")
8005 (version "1.0.0")
8006 (source
8007 (origin
8008 (method url-fetch)
8009 (uri (pypi-uri "jupyter" version))
8010 (sha256
8011 (base32
8012 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8013 (build-system python-build-system)
8014 (arguments '(#:tests? #f)) ; there are none.
8015 (propagated-inputs
8016 `(("python-ipykernel" ,python-ipykernel)
8017 ("python-ipywidgets" ,python-ipywidgets)
8018 ("python-jupyter-console" ,python-jupyter-console)
8019 ("python-nbconvert" ,python-nbconvert)
8020 ("python-notebook" ,python-notebook)
8021 ("python-qtconsole" ,python-qtconsole)))
8022 (native-search-paths
8023 (list (search-path-specification
8024 (variable "JUPYTER_PATH")
8025 (files '("share/jupyter")))))
8026 (home-page "https://jupyter.org")
8027 (synopsis "Web application for interactive documents")
8028 (description
8029 "The Jupyter Notebook is a web application that allows you to create and
8030 share documents that contain live code, equations, visualizations and
8031 explanatory text. Uses include: data cleaning and transformation, numerical
8032 simulation, statistical modeling, machine learning and much more.")
8033 (license license:bsd-3)))
8034
8035 (define-public python-chardet
8036 (package
8037 (name "python-chardet")
8038 (version "3.0.4")
8039 (source
8040 (origin
8041 (method url-fetch)
8042 (uri (pypi-uri "chardet" version))
8043 (sha256
8044 (base32
8045 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8046 (native-inputs
8047 `(("python-hypothesis" ,python-hypothesis)
8048 ("python-pytest" ,python-pytest)
8049 ("python-pytest-runner" ,python-pytest-runner)))
8050 (build-system python-build-system)
8051 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8052 (arguments `(#:tests? #f))
8053 (home-page "https://github.com/chardet/chardet")
8054 (synopsis "Universal encoding detector for Python 2 and 3")
8055 (description
8056 "This package provides @code{chardet}, a Python module that can
8057 automatically detect a wide range of file encodings.")
8058 (license license:lgpl2.1+)))
8059
8060 (define-public python2-chardet
8061 (package-with-python2 python-chardet))
8062
8063 (define-public python-docopt
8064 (package
8065 (name "python-docopt")
8066 (version "0.6.2")
8067 (source
8068 (origin
8069 (method git-fetch)
8070 ;; The release on PyPI does not include tests.
8071 (uri (git-reference
8072 (url "https://github.com/docopt/docopt")
8073 (commit version)))
8074 (file-name (git-file-name name version))
8075 (sha256
8076 (base32
8077 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
8078 (build-system python-build-system)
8079 (native-inputs
8080 `(("python-pytest" ,python-pytest)))
8081 (arguments
8082 `(#:phases
8083 (modify-phases %standard-phases
8084 (replace 'check
8085 (lambda _ (invoke "py.test"))))))
8086 (home-page "http://docopt.org")
8087 (synopsis "Command-line interface description language for Python")
8088 (description "This library allows the user to define a command-line
8089 interface from a program's help message rather than specifying it
8090 programmatically with command-line parsers like @code{getopt} and
8091 @code{argparse}.")
8092 (license license:expat)))
8093
8094 (define-public python2-docopt
8095 (package-with-python2 python-docopt))
8096
8097 (define-public python-pythondialog
8098 (package
8099 (name "python-pythondialog")
8100 (version "3.4.0")
8101 (source
8102 (origin
8103 (method url-fetch)
8104 (uri (pypi-uri "pythondialog" version))
8105 (sha256
8106 (base32
8107 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8108 (build-system python-build-system)
8109 (arguments
8110 `(#:phases
8111 (modify-phases %standard-phases
8112 (add-after 'unpack 'patch-path
8113 (lambda* (#:key inputs #:allow-other-keys)
8114 (let* ((dialog (assoc-ref inputs "dialog")))
8115 ;; Since this library really wants to grovel the search path, we
8116 ;; must hardcode dialog's store path into it.
8117 (substitute* "dialog.py"
8118 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8119 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8120 #t))))
8121 #:tests? #f)) ; no test suite
8122 (propagated-inputs
8123 `(("dialog" ,dialog)))
8124 (home-page "http://pythondialog.sourceforge.net/")
8125 (synopsis "Python interface to the UNIX dialog utility")
8126 (description "A Python wrapper for the dialog utility. Its purpose is to
8127 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8128 This allows one to make simple text-mode user interfaces on Unix-like systems")
8129 (license license:lgpl2.1)
8130 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8131
8132 (define-public python2-pythondialog
8133 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8134 (package
8135 (inherit base)
8136 (version (package-version python-pythondialog))
8137 (source (origin
8138 (method url-fetch)
8139 (uri (pypi-uri "python2-pythondialog" version))
8140 (sha256
8141 (base32
8142 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8143
8144 (define-public python-configobj
8145 (package
8146 (name "python-configobj")
8147 (version "5.0.6")
8148 (source (origin
8149 (method url-fetch)
8150 (uri (pypi-uri "configobj" version))
8151 (sha256
8152 (base32
8153 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8154 ;; Patch setup.py so it looks for python-setuptools, which is
8155 ;; required to parse the keyword 'install_requires' in setup.py.
8156 (patches (search-patches "python-configobj-setuptools.patch"))))
8157 (build-system python-build-system)
8158 (propagated-inputs
8159 `(("python-six" ,python-six)))
8160 (synopsis "Config file reading, writing and validation")
8161 (description "ConfigObj is a simple but powerful config file reader and
8162 writer: an ini file round tripper. Its main feature is that it is very easy to
8163 use, with a straightforward programmer’s interface and a simple syntax for
8164 config files.")
8165 (home-page "https://github.com/DiffSK/configobj")
8166 (license license:bsd-3)))
8167
8168 (define-public python2-configobj
8169 (package-with-python2 python-configobj))
8170
8171 (define-public python-configargparse
8172 (package
8173 (name "python-configargparse")
8174 (version "0.14.0")
8175 (source (origin
8176 (method url-fetch)
8177 (uri (pypi-uri "ConfigArgParse" version))
8178 (sha256
8179 (base32
8180 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8181 (build-system python-build-system)
8182 (native-inputs
8183 `(("python-pyyaml" ,python-pyyaml)))
8184 (arguments
8185 `(#:phases
8186 (modify-phases %standard-phases
8187 (replace 'check
8188 (lambda _
8189 ;; Bypass setuptools-shim because one test relies on "setup.py"
8190 ;; being the first argument passed to the python call.
8191 ;;
8192 ;; NOTE: Many tests do not run because they rely on Python's
8193 ;; built-in test.test_argparse, but we remove the unit tests from
8194 ;; our Python installation.
8195 (invoke "python" "setup.py" "test"))))))
8196 (synopsis "Replacement for argparse")
8197 (description "A drop-in replacement for argparse that allows options to also
8198 be set via config files and/or environment variables.")
8199 (home-page "https://github.com/bw2/ConfigArgParse")
8200 (license license:expat)))
8201
8202 (define-public python2-configargparse
8203 (package-with-python2 python-configargparse))
8204
8205 (define-public python-argparse-manpage
8206 (package
8207 (name "python-argparse-manpage")
8208 (version "1.1")
8209 (source
8210 (origin
8211 (method url-fetch)
8212 (uri (pypi-uri "argparse-manpage" version))
8213 (sha256
8214 (base32
8215 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8216 (build-system python-build-system)
8217 (home-page "https://github.com/praiskup/argparse-manpage")
8218 (synopsis "Build manual page from Python's ArgumentParser object")
8219 (description
8220 "This package provides tools to build manual pages from Python's
8221 @code{ArgumentParser} object.")
8222 (license license:asl2.0)))
8223
8224 (define-public python-contextlib2
8225 (package
8226 (name "python-contextlib2")
8227 (version "0.5.5")
8228 (source
8229 (origin
8230 (method url-fetch)
8231 (uri (pypi-uri "contextlib2" version))
8232 (sha256
8233 (base32
8234 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8235 (build-system python-build-system)
8236 (home-page "http://contextlib2.readthedocs.org/")
8237 (synopsis "Tools for decorators and context managers")
8238 (description "This module is primarily a backport of the Python
8239 3.2 contextlib to earlier Python versions. Like contextlib, it
8240 provides utilities for common tasks involving decorators and context
8241 managers. It also contains additional features that are not part of
8242 the standard library.")
8243 (properties `((python2-variant . ,(delay python2-contextlib2))))
8244 (license license:psfl)))
8245
8246 (define-public python2-contextlib2
8247 (let ((base (package-with-python2
8248 (strip-python2-variant python-contextlib2))))
8249 (package
8250 (inherit base)
8251 (arguments
8252 (substitute-keyword-arguments (package-arguments base)
8253 ((#:phases phases)
8254 `(modify-phases ,phases
8255 (replace 'check
8256 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8257 (native-inputs
8258 `(("python2-unittest2" ,python2-unittest2))))))
8259
8260 (define-public python-texttable
8261 (package
8262 (name "python-texttable")
8263 (version "0.9.1")
8264 (source
8265 (origin
8266 (method url-fetch)
8267 (uri (pypi-uri "texttable" version))
8268 (sha256
8269 (base32
8270 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8271 (build-system python-build-system)
8272 (arguments '(#:tests? #f)) ; no tests
8273 (home-page "https://github.com/foutaise/texttable/")
8274 (synopsis "Python module for creating simple ASCII tables")
8275 (description "Texttable is a Python module for creating simple ASCII
8276 tables.")
8277 (license license:lgpl2.1+)))
8278
8279 (define-public python2-texttable
8280 (package-with-python2 python-texttable))
8281
8282 (define-public python-atomicwrites
8283 (package
8284 (name "python-atomicwrites")
8285 (version "1.3.0")
8286 (source (origin
8287 (method url-fetch)
8288 (uri (pypi-uri "atomicwrites" version))
8289 (sha256
8290 (base32
8291 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8292 (build-system python-build-system)
8293 (synopsis "Atomic file writes in Python")
8294 (description "Library for atomic file writes using platform dependent tools
8295 for atomic file system operations.")
8296 (home-page "https://github.com/untitaker/python-atomicwrites")
8297 (license license:expat)))
8298
8299 (define-public python2-atomicwrites
8300 (package-with-python2 python-atomicwrites))
8301
8302 (define-public python-click-threading
8303 (package
8304 (name "python-click-threading")
8305 (version "0.4.4")
8306 (source (origin
8307 (method url-fetch)
8308 (uri (pypi-uri "click-threading" version))
8309 (sha256
8310 (base32
8311 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8312 (build-system python-build-system)
8313 (propagated-inputs
8314 `(("python-click" ,python-click)))
8315 (synopsis "Utilities for multithreading in Click")
8316 (description "This package provides utilities for multithreading in Click
8317 applications.")
8318 (home-page "https://github.com/click-contrib/click-threading")
8319 (license license:expat)))
8320
8321 (define-public python-click-log
8322 (package
8323 (name "python-click-log")
8324 (version "0.3.2")
8325 (source (origin
8326 (method url-fetch)
8327 (uri (pypi-uri "click-log" version))
8328 (sha256
8329 (base32
8330 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8331 (build-system python-build-system)
8332 (propagated-inputs
8333 `(("python-click" ,python-click)))
8334 (synopsis "Logging for click applications")
8335 (description "This package provides a Python library for logging Click
8336 applications.")
8337 (home-page "https://github.com/click-contrib/click-log")
8338 (license license:expat)))
8339
8340 (define-public python-apipkg
8341 (package
8342 (name "python-apipkg")
8343 (version "1.4")
8344 (source (origin
8345 (method url-fetch)
8346 (uri (pypi-uri "apipkg" version))
8347 (sha256
8348 (base32
8349 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8350 (build-system python-build-system)
8351 (native-inputs
8352 `(("python-pytest" ,python-pytest)))
8353 (synopsis "Namespace control and lazy-import mechanism")
8354 (description "With apipkg you can control the exported namespace of a Python
8355 package and greatly reduce the number of imports for your users. It is a small
8356 pure Python module that works on virtually all Python versions.")
8357 (home-page "https://github.com/pytest-dev/apipkg")
8358 (license license:expat)))
8359
8360 (define-public python2-apipkg
8361 (package-with-python2 python-apipkg))
8362
8363 (define-public python-execnet
8364 (package
8365 (name "python-execnet")
8366 (version "1.4.1")
8367 (source (origin
8368 (method url-fetch)
8369 (uri (pypi-uri "execnet" version))
8370 (sha256
8371 (base32
8372 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8373 (build-system python-build-system)
8374 (arguments
8375 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8376 ;; The two test failures are caused by the lack of an `ssh` executable.
8377 ;; The test suite can be run with pytest after the 'install' phase.
8378 #:tests? #f))
8379 (native-inputs
8380 `(("python-pytest" ,python-pytest)
8381 ("python-setuptools-scm" ,python-setuptools-scm)))
8382 (propagated-inputs
8383 `(("python-apipkg" ,python-apipkg)))
8384 (synopsis "Rapid multi-Python deployment")
8385 (description "Execnet provides a share-nothing model with
8386 channel-send/receive communication for distributing execution across many
8387 Python interpreters across version, platform and network barriers. It has a
8388 minimal and fast API targeting the following uses:
8389 @enumerate
8390 @item distribute tasks to (many) local or remote CPUs
8391 @item write and deploy hybrid multi-process applications
8392 @item write scripts to administer multiple environments
8393 @end enumerate")
8394 (home-page "http://codespeak.net/execnet/")
8395 (license license:expat)))
8396
8397 (define-public python2-execnet
8398 (package-with-python2 python-execnet))
8399
8400 (define-public python-icalendar
8401 (package
8402 (name "python-icalendar")
8403 (version "4.0.4")
8404 (source (origin
8405 (method url-fetch)
8406 (uri (pypi-uri "icalendar" version))
8407 (sha256
8408 (base32
8409 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8410 (build-system python-build-system)
8411 (propagated-inputs
8412 `(("python-dateutil" ,python-dateutil)
8413 ("python-pytz" ,python-pytz)))
8414 (synopsis "Python library for parsing iCalendar files")
8415 (description "The icalendar package is a parser/generator of iCalendar
8416 files for use with Python.")
8417 (home-page "https://github.com/collective/icalendar")
8418 (license license:bsd-2)))
8419
8420 (define-public python-args
8421 (package
8422 (name "python-args")
8423 (version "0.1.0")
8424 (source (origin
8425 (method url-fetch)
8426 (uri (pypi-uri "args" version))
8427 (sha256
8428 (base32
8429 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8430 (build-system python-build-system)
8431 (home-page "https://github.com/kennethreitz/args")
8432 (synopsis "Command-line argument parser")
8433 (description
8434 "This library provides a Python module to parse command-line arguments.")
8435 (license license:bsd-3)))
8436
8437 (define-public python2-args
8438 (package-with-python2 python-args))
8439
8440 (define-public python-clint
8441 (package
8442 (name "python-clint")
8443 (version "0.5.1")
8444 (source (origin
8445 (method url-fetch)
8446 (uri (pypi-uri "clint" version))
8447 (sha256
8448 (base32
8449 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8450 (build-system python-build-system)
8451 (arguments
8452 '(#:phases
8453 (modify-phases %standard-phases
8454 (replace 'check
8455 (lambda _ (invoke "py.test" "-v"))))))
8456 (native-inputs
8457 `(("python-pytest" ,python-pytest)))
8458 (propagated-inputs
8459 `(("python-args" ,python-args)))
8460 (home-page "https://github.com/kennethreitz/clint")
8461 (synopsis "Command-line interface tools")
8462 (description
8463 "Clint is a Python module filled with a set of tools for developing
8464 command-line applications, including tools for colored and indented
8465 output, progress bar display, and pipes.")
8466 (license license:isc)))
8467
8468 (define-public python2-clint
8469 (package-with-python2 python-clint))
8470
8471 (define-public python-rply
8472 (package
8473 (name "python-rply")
8474 (version "0.7.5")
8475 (source (origin
8476 (method url-fetch)
8477 (uri (pypi-uri "rply" version))
8478 (sha256
8479 (base32
8480 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8481 (build-system python-build-system)
8482 (propagated-inputs
8483 `(("python-appdirs" ,python-appdirs)))
8484 (home-page "https://github.com/alex/rply")
8485 (synopsis "Parser generator for Python")
8486 (description
8487 "This package provides a pure Python based parser generator, that also
8488 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8489 with a new public API, and RPython support.")
8490 (license license:bsd-3)))
8491
8492 (define-public python2-rply
8493 (package-with-python2 python-rply))
8494
8495 (define-public python-hy
8496 (package
8497 (name "python-hy")
8498 (version "0.17.0")
8499 (source (origin
8500 (method url-fetch)
8501 (uri (pypi-uri "hy" version))
8502 (sha256
8503 (base32
8504 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
8505 (build-system python-build-system)
8506 (arguments
8507 '(#:phases
8508 (modify-phases %standard-phases
8509 (add-before 'install 'set-HOME
8510 (lambda _
8511 (setenv "HOME" "/tmp")))
8512 (replace 'check
8513 (lambda _
8514 ;; Tests require write access to HOME.
8515 (setenv "HOME" "/tmp")
8516 (invoke "nosetests"))))))
8517 (native-inputs
8518 `(("python-coverage" ,python-coverage)
8519 ("python-nose" ,python-nose)))
8520 (propagated-inputs
8521 `(("python-astor" ,python-astor)
8522 ("python-clint" ,python-clint)
8523 ("python-rply" ,python-rply)
8524 ("python-fastentrypoints"
8525 ,python-fastentrypoints)
8526 ("python-funcparserlib"
8527 ,python-funcparserlib)))
8528 (home-page "http://hylang.org/")
8529 (synopsis "Lisp frontend to Python")
8530 (description
8531 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8532 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8533 Python at your fingertips, in Lisp form.")
8534 (license license:expat)))
8535
8536 (define-public python2-hy
8537 (package-with-python2 python-hy))
8538
8539 (define-public python2-functools32
8540 (package
8541 (name "python2-functools32")
8542 (version "3.2.3-2")
8543 (source
8544 (origin
8545 (method url-fetch)
8546 (uri (pypi-uri "functools32" version))
8547 (sha256
8548 (base32
8549 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8550 (build-system python-build-system)
8551 (arguments
8552 `(#:python ,python-2
8553 #:tests? #f)) ; no test target
8554 (home-page "https://github.com/MiCHiLU/python-functools32")
8555 (synopsis
8556 "Backport of the functools module from Python 3.2.3")
8557 (description
8558 "This package is a backport of the @code{functools} module from Python
8559 3.2.3 for use with older versions of Python and PyPy.")
8560 (license license:expat)))
8561
8562 (define-public python2-subprocess32
8563 (package
8564 (name "python2-subprocess32")
8565 (version "3.2.7")
8566 (source (origin
8567 (method url-fetch)
8568 (uri (pypi-uri "subprocess32" version))
8569 (sha256
8570 (base32
8571 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8572 (patches
8573 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8574 (build-system python-build-system)
8575 (arguments
8576 `(#:python ,python-2
8577 ;; The test suite fails with Python > 2.7.13:
8578 ;; import test.support
8579 ;; ImportError: No module named support
8580 #:tests? #f
8581 #:phases
8582 (modify-phases %standard-phases
8583 (add-after 'unpack 'patch-/bin/sh
8584 (lambda _
8585 (substitute* '("subprocess32.py"
8586 "test_subprocess32.py")
8587 (("/bin/sh") (which "sh")))
8588 #t)))))
8589 (home-page "https://github.com/google/python-subprocess32")
8590 (synopsis "Backport of the subprocess module from Python 3.2")
8591 (description
8592 "This is a backport of the @code{subprocess} standard library module
8593 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8594 new features. On POSIX systems it is guaranteed to be reliable when used
8595 in threaded applications. It includes timeout support from Python 3.3 but
8596 otherwise matches 3.2’s API.")
8597 (license license:psfl)))
8598
8599 (define-public python2-futures
8600 (package
8601 (name "python2-futures")
8602 (version "3.2.0")
8603 (source
8604 (origin
8605 (method url-fetch)
8606 (uri (pypi-uri "futures" version))
8607 (sha256
8608 (base32
8609 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8610 (build-system python-build-system)
8611 (arguments
8612 `(#:python ,python-2
8613 #:phases
8614 (modify-phases %standard-phases
8615 (replace 'check
8616 (lambda _
8617 (invoke "python" "test_futures.py")
8618 #t)))))
8619 (home-page "https://github.com/agronholm/pythonfutures")
8620 (synopsis
8621 "Backport of the concurrent.futures package from Python 3.2")
8622 (description
8623 "The concurrent.futures module provides a high-level interface for
8624 asynchronously executing callables. This package backports the
8625 concurrent.futures package from Python 3.2")
8626 (license license:bsd-3)))
8627
8628 (define-public python-promise
8629 (package
8630 (name "python-promise")
8631 (version "0.4.2")
8632 (source
8633 (origin
8634 (method url-fetch)
8635 (uri (pypi-uri "promise" version))
8636 (sha256
8637 (base32
8638 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8639 (build-system python-build-system)
8640 ;; Tests wants python-futures, which is a python2 only program, and
8641 ;; can't be found by python-promise at test time.
8642 (arguments `(#:tests? #f))
8643 (home-page "https://github.com/syrusakbary/promise")
8644 (synopsis "Promises/A+ implementation for Python")
8645 (description
8646 "Promises/A+ implementation for Python")
8647 (properties `((python2-variant . ,(delay python2-promise))))
8648 (license license:expat)))
8649
8650 (define-public python2-promise
8651 (let ((promise (package-with-python2
8652 (strip-python2-variant python-promise))))
8653 (package (inherit promise)
8654 (arguments (substitute-keyword-arguments (package-arguments promise)
8655 ((#:tests? _) #t)))
8656 (native-inputs
8657 `(("python2-futures" ,python2-futures)
8658 ("python2-pytest" ,python2-pytest)
8659 ,@(package-native-inputs promise))))))
8660
8661 (define-public python-progressbar33
8662 (package
8663 (name "python-progressbar33")
8664 (version "2.4")
8665 (source
8666 (origin
8667 (method url-fetch)
8668 (uri (pypi-uri "progressbar33" version))
8669 (sha256
8670 (base32
8671 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8672 (build-system python-build-system)
8673 (home-page "http://github.com/germangh/python-progressbar")
8674 (synopsis "Text progress bar library for Python")
8675 (description
8676 "This package provides a text progress bar library for Python. This
8677 version only differs from the original @code{progressbar} package in that it
8678 uses relative package imports instead of absolute imports, which is necessary
8679 for the module to work under Python 3.3.")
8680 ;; Either or both of these licenses may be selected.
8681 (license (list license:lgpl2.1+ license:bsd-3))))
8682
8683 (define-public python-colorama
8684 (package
8685 (name "python-colorama")
8686 (version "0.3.9")
8687 (source
8688 (origin
8689 (method url-fetch)
8690 (uri (pypi-uri "colorama" version))
8691 (sha256
8692 (base32
8693 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8694 (build-system python-build-system)
8695 (synopsis "Colored terminal text rendering for Python")
8696 (description "Colorama is a Python library for rendering colored terminal
8697 text.")
8698 (home-page "https://pypi.python.org/pypi/colorama")
8699 (license license:bsd-3)))
8700
8701 (define-public python2-colorama
8702 (package-with-python2 python-colorama))
8703
8704 (define-public python-rsa
8705 (package
8706 (name "python-rsa")
8707 (version "3.4.2")
8708 (source
8709 (origin
8710 (method url-fetch)
8711 (uri (pypi-uri "rsa" version))
8712 (sha256
8713 (base32
8714 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8715 (build-system python-build-system)
8716 (propagated-inputs
8717 `(("python-pyasn1" ,python-pyasn1)))
8718 (synopsis "Pure-Python RSA implementation")
8719 (description "Python-RSA is a pure-Python RSA implementation. It supports
8720 encryption and decryption, signing and verifying signatures, and key
8721 generation according to PKCS#1 version 1.5. It can be used as a Python
8722 library as well as on the command line.")
8723 (home-page "https://stuvel.eu/rsa")
8724 (license license:asl2.0)))
8725
8726 (define-public python2-rsa
8727 (package-with-python2 python-rsa))
8728
8729 (define-public python-pluggy
8730 (package
8731 (name "python-pluggy")
8732 (version "0.11.0")
8733 (source
8734 (origin
8735 (method url-fetch)
8736 (uri (pypi-uri "pluggy" version))
8737 (sha256
8738 (base32
8739 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8740 (build-system python-build-system)
8741 (native-inputs
8742 `(("python-setuptools-scm" ,python-setuptools-scm)))
8743 (synopsis "Plugin and hook calling mechanism for Python")
8744 (description "Pluggy is an extraction of the plugin manager as used by
8745 Pytest but stripped of Pytest specific details.")
8746 (home-page "https://pypi.python.org/pypi/pluggy")
8747 (license license:expat)))
8748
8749 (define-public python2-pluggy
8750 (package-with-python2 python-pluggy))
8751
8752 (define-public python-tox
8753 (package
8754 (name "python-tox")
8755 (version "2.8.1")
8756 (source
8757 (origin
8758 (method url-fetch)
8759 (uri (pypi-uri "tox" version))
8760 (sha256
8761 (base32
8762 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8763 (build-system python-build-system)
8764 (arguments
8765 ;; FIXME: Tests require pytest-timeout, which itself requires
8766 ;; pytest>=2.8.0 for installation.
8767 '(#:tests? #f))
8768 (propagated-inputs
8769 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8770 ("python-py" ,python-py)
8771 ("python-virtualenv" ,python-virtualenv)))
8772 (native-inputs
8773 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8774 ("python-pytest" ,python-pytest) ; >= 2.3.5
8775 ("python-setuptools-scm" ,python-setuptools-scm)))
8776 (home-page "http://tox.testrun.org/")
8777 (synopsis "Virtualenv-based automation of test activities")
8778 (description "Tox is a generic virtualenv management and test command line
8779 tool. It can be used to check that a package installs correctly with
8780 different Python versions and interpreters, or run tests in each type of
8781 supported environment, or act as a frontend to continuous integration
8782 servers.")
8783 (license license:expat)))
8784
8785 (define-public python2-tox
8786 (package-with-python2 python-tox))
8787
8788 (define-public python-jmespath
8789 (package
8790 (name "python-jmespath")
8791 (version "0.9.4")
8792 (source
8793 (origin
8794 (method url-fetch)
8795 (uri (pypi-uri "jmespath" version))
8796 (sha256
8797 (base32
8798 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
8799 (build-system python-build-system)
8800 (native-inputs
8801 `(("python-nose" ,python-nose)))
8802 (synopsis "JSON Matching Expressions")
8803 (description "JMESPath (pronounced “james path”) is a Python library that
8804 allows one to declaratively specify how to extract elements from a JSON
8805 document.")
8806 (home-page "https://github.com/jmespath/jmespath.py")
8807 (license license:expat)))
8808
8809 (define-public python2-jmespath
8810 (package-with-python2 python-jmespath))
8811
8812 (define-public python-botocore
8813 (package
8814 (name "python-botocore")
8815 (version "1.12.149")
8816 (source
8817 (origin
8818 (method url-fetch)
8819 (uri (pypi-uri "botocore" version))
8820 (sha256
8821 (base32
8822 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8823 (build-system python-build-system)
8824 (arguments
8825 ;; FIXME: Many tests are failing.
8826 '(#:tests? #f))
8827 (propagated-inputs
8828 `(("python-dateutil" ,python-dateutil)
8829 ("python-docutils" ,python-docutils)
8830 ("python-jmespath" ,python-jmespath)))
8831 (native-inputs
8832 `(("python-mock" ,python-mock)
8833 ("python-nose" ,python-nose)
8834 ("behave" ,behave)
8835 ("python-tox" ,python-tox)
8836 ("python-urllib3" ,python-urllib3)
8837 ("python-wheel" ,python-wheel)))
8838 (home-page "https://github.com/boto/botocore")
8839 (synopsis "Low-level interface to AWS")
8840 (description "Botocore is a Python library that provides a low-level
8841 interface to the Amazon Web Services (AWS) API.")
8842 (license license:asl2.0)))
8843
8844 (define-public python2-botocore
8845 (package-with-python2 python-botocore))
8846
8847 (define-public python-xdo
8848 (package
8849 (name "python-xdo")
8850 (version "0.3")
8851 (source (origin
8852 (method url-fetch)
8853 (uri (string-append
8854 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8855 "python-xdo_" version ".orig.tar.gz"))
8856 (sha256
8857 (base32
8858 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8859 (build-system python-build-system)
8860 (arguments
8861 '(#:phases
8862 (modify-phases %standard-phases
8863 (add-before 'install 'patch-libxdo-path
8864 ;; Hardcode the path of dynamically loaded libxdo library.
8865 (lambda* (#:key inputs #:allow-other-keys)
8866 (let ((libxdo (string-append
8867 (assoc-ref inputs "xdotool")
8868 "/lib/libxdo.so")))
8869 (substitute* "xdo/_xdo.py"
8870 (("find_library\\(\"xdo\"\\)")
8871 (simple-format #f "\"~a\"" libxdo)))
8872 #t))))
8873 #:tests? #f)) ; no tests provided
8874 (propagated-inputs
8875 `(("python-six" ,python-six)))
8876 (inputs
8877 `(("xdotool" ,xdotool)
8878 ("libX11" ,libx11)))
8879 (home-page "https://tracker.debian.org/pkg/python-xdo")
8880 (synopsis "Python library for simulating X11 keyboard/mouse input")
8881 (description "Provides bindings to libxdo for manipulating X11 via simulated
8882 input. (Note that this is mostly a legacy library; you may wish to look at
8883 python-xdo for newer bindings.)")
8884 (license license:bsd-3)))
8885
8886 (define-public python2-xdo
8887 (package-with-python2 python-xdo))
8888
8889 (define-public python-mako
8890 (package
8891 (name "python-mako")
8892 (version "1.1.0")
8893 (source
8894 (origin
8895 (method url-fetch)
8896 (uri (pypi-uri "Mako" version))
8897 (sha256
8898 (base32
8899 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8900 (build-system python-build-system)
8901 (arguments
8902 `(#:phases (modify-phases %standard-phases
8903 (replace 'check
8904 (lambda _
8905 (invoke "pytest" "-vv"))))))
8906 (propagated-inputs
8907 `(("python-markupsafe" ,python-markupsafe)))
8908 (native-inputs
8909 `(("python-mock" ,python-mock)
8910 ("python-pytest" ,python-pytest)))
8911 (home-page "https://www.makotemplates.org/")
8912 (synopsis "Templating language for Python")
8913 (description "Mako is a templating language for Python that compiles
8914 templates into Python modules.")
8915 (license license:expat)))
8916
8917 (define-public python2-mako
8918 (package-with-python2 python-mako))
8919
8920 (define-public python-waitress
8921 (package
8922 (name "python-waitress")
8923 (version "1.1.0")
8924 (source
8925 (origin
8926 (method url-fetch)
8927 (uri (pypi-uri "waitress" version))
8928 (patches (search-patches "python-waitress-fix-tests.patch"))
8929 (sha256
8930 (base32
8931 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8932 (build-system python-build-system)
8933 (home-page "https://github.com/Pylons/waitress")
8934 (synopsis "Waitress WSGI server")
8935 (description "Waitress is meant to be a production-quality pure-Python WSGI
8936 server with very acceptable performance.")
8937 (license license:zpl2.1)))
8938
8939 (define-public python2-waitress
8940 (package-with-python2 python-waitress))
8941
8942 (define-public python-whichcraft
8943 (package
8944 (name "python-whichcraft")
8945 (version "0.6.1")
8946 (source
8947 (origin
8948 (method url-fetch)
8949 (uri (pypi-uri "whichcraft" version))
8950 (sha256
8951 (base32
8952 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
8953 (build-system python-build-system)
8954 (native-inputs
8955 `(("python-pytest" ,python-pytest)))
8956 (home-page "https://github.com/pydanny/whichcraft")
8957 (synopsis "Cross-platform cross-python shutil.which functionality")
8958 (description
8959 "This package provides a shim of the shutil.which function that's
8960 designed to work across multiple versions of Python.")
8961 (license license:bsd-3)))
8962
8963 (define-public python-cookiecutter
8964 (package
8965 (name "python-cookiecutter")
8966 (version "1.6.0")
8967 (source
8968 (origin
8969 (method url-fetch)
8970 (uri (pypi-uri "cookiecutter" version))
8971 (sha256
8972 (base32
8973 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
8974 (build-system python-build-system)
8975 (native-inputs
8976 `(("python-freezegun" ,python-freezegun)
8977 ("python-pytest" ,python-pytest)
8978 ("python-pytest-catchlog" ,python-pytest-catchlog)
8979 ("python-pytest-cov" ,python-pytest-cov)
8980 ("python-pytest-mock" ,python-pytest-mock)))
8981 (propagated-inputs
8982 `(("python-binaryornot" ,python-binaryornot)
8983 ("python-click" ,python-click)
8984 ("python-future" ,python-future)
8985 ("python-jinja2" ,python-jinja2)
8986 ("python-jinja2-time" ,python-jinja2-time)
8987 ("python-poyo" ,python-poyo)
8988 ("python-requests" ,python-requests)
8989 ("python-whichcraft" ,python-whichcraft)))
8990 (home-page "https://github.com/audreyr/cookiecutter")
8991 (synopsis
8992 "Command-line utility that creates projects from project templates")
8993 (description
8994 "This package provides a command-line utility that creates projects from
8995 project templates, e.g. creating a Python package project from a Python package
8996 project template.")
8997 (license license:bsd-3)))
8998
8999 (define-public python-pyquery
9000 (package
9001 (name "python-pyquery")
9002 (version "1.2.17")
9003 (source
9004 (origin
9005 (method url-fetch)
9006 (uri (pypi-uri "pyquery" version))
9007 (sha256
9008 (base32
9009 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9010 (build-system python-build-system)
9011 (native-inputs
9012 `(("python-webob" ,python-webob)
9013 ("python-webtest" ,python-webtest)))
9014 (propagated-inputs
9015 `(("python-lxml" ,python-lxml)
9016 ("python-cssselect" ,python-cssselect)))
9017 (home-page "https://github.com/gawel/pyquery")
9018 (synopsis "Make jQuery-like queries on xml documents")
9019 (description "pyquery allows you to make jQuery queries on xml documents.
9020 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9021 fast xml and html manipulation.")
9022 (license license:bsd-3)))
9023
9024 (define-public python-anyjson
9025 (package
9026 (name "python-anyjson")
9027 (version "0.3.3")
9028 (source
9029 (origin
9030 (method url-fetch)
9031 (uri (pypi-uri "anyjson" version))
9032 (sha256
9033 (base32
9034 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9035 (build-system python-build-system)
9036 (arguments
9037 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9038 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9039 ;; whatever) so this transformation needs to be done before the tests
9040 ;; can be run. Maybe we could add a build step to transform beforehand
9041 ;; but it could be annoying/difficult.
9042 ;; We can enable tests for the Python 2 version, though, and do below.
9043 #:tests? #f))
9044 (home-page "https://bitbucket.org/runeh/anyjson/")
9045 (synopsis
9046 "Wraps best available JSON implementation in a common interface")
9047 (description
9048 "Anyjson loads whichever is the fastest JSON module installed
9049 and provides a uniform API regardless of which JSON implementation is used.")
9050 (license license:bsd-3)
9051 (properties `((python2-variant . ,(delay python2-anyjson))))))
9052
9053 (define-public python2-anyjson
9054 (let ((anyjson (package-with-python2
9055 (strip-python2-variant python-anyjson))))
9056 (package
9057 (inherit anyjson)
9058 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9059 #:tests? #t
9060 ,@(package-arguments anyjson)))
9061 (native-inputs `(("python2-nose" ,python2-nose))))))
9062
9063 (define-public python-amqp
9064 (package
9065 (name "python-amqp")
9066 (version "2.3.2")
9067 (source
9068 (origin
9069 (method url-fetch)
9070 (uri (pypi-uri "amqp" version))
9071 (sha256
9072 (base32
9073 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9074 (build-system python-build-system)
9075 (native-inputs
9076 `(("python-case" ,python-case)
9077 ("python-pytest-sugar" ,python-pytest-sugar)
9078 ("python-mock" ,python-mock)))
9079 (propagated-inputs
9080 `(("python-vine" ,python-vine)))
9081 (home-page "https://github.com/celery/py-amqp")
9082 (synopsis
9083 "Low-level AMQP client for Python (fork of amqplib)")
9084 (description
9085 "This is a fork of amqplib which was originally written by Barry Pederson.
9086 It is maintained by the Celery project, and used by kombu as a pure python
9087 alternative when librabbitmq is not available.")
9088 (license license:lgpl2.1+)
9089 (properties `((python2-variant . ,(delay python2-amqp))))))
9090
9091 (define-public python2-amqp
9092 (let ((amqp (package-with-python2
9093 (strip-python2-variant python-amqp))))
9094 (package
9095 (inherit amqp)
9096 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9097 ;; unmaintained. Weirdly, does not do this on the python 3
9098 ;; version?
9099 #:tests? #f
9100 ,@(package-arguments amqp))))))
9101
9102 (define-public python-txamqp
9103 (package
9104 (name "python-txamqp")
9105 (version "0.8.2")
9106 (source
9107 (origin
9108 (method url-fetch)
9109 (uri (pypi-uri "txAMQP" version))
9110 (sha256
9111 (base32
9112 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9113 (build-system python-build-system)
9114 (propagated-inputs
9115 `(("python-six" ,python-six)
9116 ("python-twisted" ,python-twisted)))
9117 (home-page "https://github.com/txamqp/txamqp")
9118 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9119 (description
9120 "This package provides a Python library for communicating with AMQP peers
9121 and brokers using the asynchronous networking framework Twisted. It contains
9122 all the necessary code to connect, send and receive messages to/from an
9123 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9124 also includes support for using Thrift RPC over AMQP in Twisted
9125 applications.")
9126 (license license:asl2.0)))
9127
9128 (define-public python2-txamqp
9129 (package-with-python2 python-txamqp))
9130
9131 (define-public python-kombu
9132 (package
9133 (name "python-kombu")
9134 (version "4.2.2")
9135 (source
9136 (origin
9137 (method url-fetch)
9138 (uri (pypi-uri "kombu" version))
9139 (sha256
9140 (base32
9141 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9142 (build-system python-build-system)
9143 (native-inputs
9144 `(("python-mock" ,python-mock)
9145 ("python-case" ,python-case)
9146 ("python-pyro4" ,python-pyro4)
9147 ("python-pytest-sugar" ,python-pytest-sugar)
9148 ("python-pytz" ,python-pytz)))
9149 (propagated-inputs
9150 `(("python-anyjson" ,python-anyjson)
9151 ("python-amqp" ,python-amqp)
9152 ("python-redis" ,python-redis)))
9153 (home-page "https://kombu.readthedocs.io")
9154 (synopsis "Message passing library for Python")
9155 (description "The aim of Kombu is to make messaging in Python as easy as
9156 possible by providing an idiomatic high-level interface for the AMQ protocol,
9157 and also provide proven and tested solutions to common messaging problems.
9158 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9159 message orientation, queuing, routing, reliability and security, for which the
9160 RabbitMQ messaging server is the most popular implementation.")
9161 (license license:bsd-3)
9162 (properties `((python2-variant . ,(delay python2-kombu))))))
9163
9164 (define-public python2-kombu
9165 (let ((kombu (package-with-python2
9166 (strip-python2-variant python-kombu))))
9167 (package
9168 (inherit kombu)
9169 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9170 ;; It works fine on the python3 variant.
9171 #:tests? #f
9172 ,@(package-arguments kombu)))
9173 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9174 ,@(package-native-inputs kombu))))))
9175
9176 (define-public python-billiard
9177 (package
9178 (name "python-billiard")
9179 (version "3.5.0.5")
9180 (source
9181 (origin
9182 (method url-fetch)
9183 (uri (pypi-uri "billiard" version))
9184 (sha256
9185 (base32
9186 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9187 (build-system python-build-system)
9188 (native-inputs
9189 `(("python-case" ,python-case)
9190 ("python-pytest" ,python-pytest)))
9191 (home-page "https://github.com/celery/billiard")
9192 (synopsis
9193 "Python multiprocessing fork with improvements and bugfixes")
9194 (description
9195 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9196 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9197 pyprocessing package. This standalone variant is intended to be compatible with
9198 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9199 (license license:bsd-3)
9200 (properties `((python2-variant . ,(delay python2-billiard))))))
9201
9202 (define-public python2-billiard
9203 (let ((billiard (package-with-python2
9204 (strip-python2-variant python-billiard))))
9205 (package
9206 (inherit billiard)
9207 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9208 ("python2-mock" ,python2-mock)
9209 ,@(package-native-inputs billiard))))))
9210
9211 (define-public python-celery
9212 (package
9213 (name "python-celery")
9214 (version "4.2.1")
9215 (source
9216 (origin
9217 (method url-fetch)
9218 (uri (pypi-uri "celery" version))
9219 (sha256
9220 (base32
9221 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9222 (build-system python-build-system)
9223 (arguments
9224 '(;; TODO The tests fail with Python 3.7
9225 ;; https://github.com/celery/celery/issues/4849
9226 #:tests? #f
9227 #:phases
9228 (modify-phases %standard-phases
9229 (add-after 'unpack 'patch-requirements
9230 (lambda _
9231 (substitute* "requirements/test.txt"
9232 (("pytest>=3\\.0,<3\\.3")
9233 "pytest>=3.0"))
9234 #t)))))
9235 (native-inputs
9236 `(("python-case" ,python-case)
9237 ("python-pytest" ,python-pytest)))
9238 (propagated-inputs
9239 `(("python-pytz" ,python-pytz)
9240 ("python-billiard" ,python-billiard)
9241 ("python-kombu" ,python-kombu)))
9242 (home-page "https://celeryproject.org")
9243 (synopsis "Distributed Task Queue")
9244 (description "Celery is an asynchronous task queue/job queue based on
9245 distributed message passing. It is focused on real-time operation, but
9246 supports scheduling as well. The execution units, called tasks, are executed
9247 concurrently on a single or more worker servers using multiprocessing,
9248 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9249 synchronously (wait until ready).")
9250 (license license:bsd-3)
9251 (properties `((python2-variant . ,(delay python2-celery))))))
9252
9253 (define-public python2-celery
9254 (let ((celery (package-with-python2
9255 (strip-python2-variant python-celery))))
9256 (package
9257 (inherit celery)
9258 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9259 ("python2-mock" ,python2-mock)
9260 ,@(package-native-inputs celery))))))
9261
9262 (define-public python-translitcodec
9263 (package
9264 (name "python-translitcodec")
9265 (version "0.4.0")
9266 (source
9267 (origin
9268 (method url-fetch)
9269 (uri (pypi-uri "translitcodec" version))
9270 (sha256
9271 (base32
9272 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9273 (build-system python-build-system)
9274 (arguments
9275 `(#:tests? #f)) ; no tests provided
9276 (home-page
9277 "https://github.com/claudep/translitcodec")
9278 (synopsis
9279 "Unicode to 8-bit charset transliteration codec")
9280 (description
9281 "This package contains codecs for transliterating ISO 10646 texts into
9282 best-effort representations using smaller coded character sets (ASCII,
9283 ISO 8859, etc.).")
9284 (license license:expat)))
9285
9286 (define-public python2-translitcodec
9287 (package-with-python2 python-translitcodec))
9288
9289 (define-public python-editor
9290 (package
9291 (name "python-editor")
9292 (version "0.5")
9293 (source
9294 (origin
9295 (method url-fetch)
9296 (uri (pypi-uri "python-editor" version))
9297 (sha256
9298 (base32
9299 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9300 (build-system python-build-system)
9301 (home-page
9302 "https://github.com/fmoo/python-editor")
9303 (synopsis
9304 "Programmatically open an editor, capture the result")
9305 (description
9306 "python-editor is a library that provides the editor module for
9307 programmatically interfacing with your system's $EDITOR.")
9308 (license license:asl2.0)))
9309
9310 (define-public python2-editor
9311 (package-with-python2 python-editor))
9312
9313 (define-public python-vobject
9314 (package
9315 (name "python-vobject")
9316 (version "0.9.5")
9317 (source (origin
9318 (method url-fetch)
9319 (uri (pypi-uri "vobject" version))
9320 (sha256
9321 (base32
9322 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9323 (build-system python-build-system)
9324 (arguments
9325 '(;; The test suite relies on some non-portable Windows interfaces.
9326 #:tests? #f))
9327 (propagated-inputs
9328 `(("python-dateutil" ,python-dateutil)
9329 ("python-pyicu" ,python-pyicu)))
9330 (synopsis "Parse and generate vCard and vCalendar files")
9331 (description "Vobject is intended to be a full featured Python package for
9332 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9333 are supported and well tested. vCard 3.0 files are supported, and all data
9334 should be imported, but only a few components are understood in a sophisticated
9335 way.")
9336 (home-page "http://eventable.github.io/vobject/")
9337 (license license:asl2.0)))
9338
9339 (define-public python2-vobject
9340 (package-with-python2 python-vobject))
9341
9342 (define-public python-munkres
9343 (package
9344 (name "python-munkres")
9345 (version "1.0.8")
9346 (source (origin
9347 (method url-fetch)
9348 (uri (pypi-uri "munkres" version))
9349 (sha256
9350 (base32
9351 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9352 (build-system python-build-system)
9353 (arguments
9354 '(#:tests? #f)) ; no test suite
9355 (home-page "http://software.clapper.org/munkres/")
9356 (synopsis "Implementation of the Munkres algorithm")
9357 (description "The Munkres module provides an implementation of the Munkres
9358 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9359 useful for solving the Assignment Problem.")
9360 (license license:bsd-3)))
9361
9362 (define-public python2-munkres
9363 (package-with-python2 python-munkres))
9364
9365 (define-public python-whoosh
9366 (package
9367 (name "python-whoosh")
9368 (version "2.7.4")
9369 (source
9370 (origin
9371 (method url-fetch)
9372 (uri (pypi-uri "Whoosh" version))
9373 (sha256
9374 (base32
9375 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9376 (build-system python-build-system)
9377 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9378 (native-inputs
9379 `(("python-pytest" ,python-pytest)))
9380 (home-page "https://bitbucket.org/mchaput/whoosh")
9381 (synopsis "Full text indexing, search, and spell checking library")
9382 (description
9383 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9384 checking library.")
9385 (license license:bsd-2)))
9386
9387 (define-public python2-whoosh
9388 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9389 (package (inherit whoosh)
9390 (propagated-inputs
9391 `(("python2-backport-ssl-match-hostname"
9392 ,python2-backport-ssl-match-hostname)
9393 ,@(package-propagated-inputs whoosh))))))
9394
9395 (define-public python-pathlib
9396 (package
9397 (name "python-pathlib")
9398 (version "1.0.1")
9399 (source (origin
9400 (method url-fetch)
9401 (uri (pypi-uri "pathlib" version))
9402 (sha256
9403 (base32
9404 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9405 (build-system python-build-system)
9406 ;; The tests depend on the internal "test" module, which does not provide
9407 ;; a stable interface.
9408 (arguments `(#:tests? #f))
9409 (home-page "https://pathlib.readthedocs.org/")
9410 (synopsis "Object-oriented file system paths")
9411 (description "Pathlib offers a set of classes to handle file system paths.
9412 It offers the following advantages over using string objects:
9413
9414 @enumerate
9415 @item No more cumbersome use of os and os.path functions. Everything can
9416 be done easily through operators, attribute accesses, and method calls.
9417 @item Embodies the semantics of different path types. For example,
9418 comparing Windows paths ignores casing.
9419 @item Well-defined semantics, eliminating any inconsistencies or
9420 ambiguities (forward vs. backward slashes, etc.).
9421 @end enumerate
9422
9423 Note: In Python 3.4, pathlib is now part of the standard library. For other
9424 Python versions please consider python-pathlib2 instead, which tracks the
9425 standard library module. This module (python-pathlib) isn't maintained
9426 anymore.")
9427 (license license:expat)))
9428
9429 (define-public python2-pathlib
9430 (package-with-python2 python-pathlib))
9431
9432 (define-public python2-pathlib2
9433 (package
9434 (name "python2-pathlib2")
9435 (version "2.3.3")
9436 (source (origin
9437 (method url-fetch)
9438 (uri (pypi-uri "pathlib2" version))
9439 (sha256
9440 (base32
9441 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9442 (build-system python-build-system)
9443 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9444 ;; version is 3.4 which already includes this package as part of the
9445 ;; standard library.
9446 (arguments
9447 `(#:python ,python-2))
9448 (propagated-inputs
9449 `(("python2-scandir" ,python2-scandir)
9450 ("python2-six" ,python2-six)))
9451 (home-page "https://pypi.python.org/pypi/pathlib2/")
9452 (synopsis "Object-oriented file system paths - backport of standard
9453 pathlib module")
9454 (description "The goal of pathlib2 is to provide a backport of standard
9455 pathlib module which tracks the standard library module, so all the newest
9456 features of the standard pathlib can be used also on older Python versions.
9457
9458 Pathlib offers a set of classes to handle file system paths. It offers the
9459 following advantages over using string objects:
9460
9461 @enumerate
9462 @item No more cumbersome use of os and os.path functions. Everything can
9463 be done easily through operators, attribute accesses, and method calls.
9464 @item Embodies the semantics of different path types. For example,
9465 comparing Windows paths ignores casing.
9466 @item Well-defined semantics, eliminating any inconsistencies or
9467 ambiguities (forward vs. backward slashes, etc.).
9468 @end enumerate")
9469 (license license:expat)))
9470
9471 (define-public python2-pathlib2-bootstrap
9472 (hidden-package
9473 (package
9474 (inherit python2-pathlib2)
9475 (name "python2-pathlib2-bootstrap")
9476 (propagated-inputs
9477 `(("python2-scandir" ,python2-scandir)
9478 ("python2-six" ,python2-six-bootstrap))))))
9479
9480 (define-public python-jellyfish
9481 (package
9482 (name "python-jellyfish")
9483 (version "0.5.6")
9484 (source (origin
9485 (method url-fetch)
9486 (uri (pypi-uri "jellyfish" version))
9487 (sha256
9488 (base32
9489 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9490 (build-system python-build-system)
9491 (native-inputs
9492 `(("python-pytest" ,python-pytest)))
9493 (home-page "https://github.com/jamesturk/jellyfish")
9494 (synopsis "Approximate and phonetic matching of strings")
9495 (description "Jellyfish uses a variety of string comparison and phonetic
9496 encoding algorithms to do fuzzy string matching.")
9497 (license license:bsd-2)
9498 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9499
9500 (define-public python2-jellyfish
9501 (let ((jellyfish (package-with-python2
9502 (strip-python2-variant python-jellyfish))))
9503 (package (inherit jellyfish)
9504 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9505 ,@(package-native-inputs jellyfish))))))
9506
9507 (define-public python2-unicodecsv
9508 (package
9509 (name "python2-unicodecsv")
9510 (version "0.14.1")
9511 (source (origin
9512 (method git-fetch)
9513 ;; The test suite is not included in the PyPi release.
9514 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9515 (uri (git-reference
9516 (url "https://github.com/jdunck/python-unicodecsv")
9517 (commit version)))
9518 (file-name (git-file-name name version))
9519 (sha256
9520 (base32
9521 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
9522 (build-system python-build-system)
9523 (arguments
9524 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9525 #:python ,python-2))
9526 (native-inputs
9527 `(("python2-unittest2" ,python2-unittest2)))
9528 (home-page "https://github.com/jdunck/python-unicodecsv")
9529 (synopsis "Unicode CSV module for Python 2")
9530 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9531 module, adding support for Unicode strings.")
9532 (license license:bsd-2)))
9533
9534 (define-public python-rarfile
9535 (package
9536 (name "python-rarfile")
9537 (version "2.8")
9538 (source (origin
9539 (method url-fetch)
9540 (uri (pypi-uri "rarfile" version))
9541 (sha256
9542 (base32
9543 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9544 (build-system python-build-system)
9545 (arguments
9546 '(#:phases
9547 (modify-phases %standard-phases
9548 (replace 'check
9549 ;; Many tests fail, but the installation proceeds.
9550 (lambda _ (invoke "make" "-C" "test" "test"))))))
9551 (native-inputs
9552 `(("which" ,which))) ; required for tests
9553 (propagated-inputs
9554 `(("libarchive" ,libarchive)))
9555 (home-page "https://github.com/markokr/rarfile")
9556 (synopsis "RAR archive reader for Python")
9557 (description "This is Python module for RAR archive reading. The interface
9558 is made as zipfile like as possible.")
9559 (license license:isc)))
9560
9561 (define-public python2-rarfile
9562 (package-with-python2 python-rarfile))
9563
9564 (define-public python-magic
9565 (package
9566 (name "python-magic")
9567 (version "0.4.15")
9568 (source
9569 (origin
9570 (method url-fetch)
9571 (uri (pypi-uri "python-magic" version))
9572 (sha256
9573 (base32
9574 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9575 (file-name (string-append name "-" version "-checkout"))))
9576 (build-system python-build-system)
9577 (arguments
9578 ;; The tests are unreliable, so don't run them. The tests fail
9579 ;; under Python3 because they were written for Python2 and
9580 ;; contain import statements that do not work in Python3. One of
9581 ;; the tests fails under Python2 because its assertions are
9582 ;; overly stringent; it relies on comparing output strings which
9583 ;; are brittle and can change depending on the version of
9584 ;; libmagic being used and the system on which the test is
9585 ;; running. In my case, under GuixSD 0.10.0, only one test
9586 ;; failed, and it seems to have failed only because the version
9587 ;; of libmagic that is packaged in Guix outputs a slightly
9588 ;; different (but not wrong) string than the one that the test
9589 ;; expected.
9590 '(#:tests? #f
9591 #:phases (modify-phases %standard-phases
9592 ;; Replace a specific method call with a hard-coded
9593 ;; path to the necessary libmagic.so file in the
9594 ;; store. If we don't do this, then the method call
9595 ;; will fail to find the libmagic.so file, which in
9596 ;; turn will cause any application using
9597 ;; python-magic to fail.
9598 (add-before 'build 'hard-code-path-to-libmagic
9599 (lambda* (#:key inputs #:allow-other-keys)
9600 (let ((file (assoc-ref inputs "file")))
9601 (substitute* "magic.py"
9602 (("ctypes.util.find_library\\('magic'\\)")
9603 (string-append "'" file "/lib/libmagic.so'")))
9604 #t)))
9605 (add-before 'install 'disable-egg-compression
9606 (lambda _
9607 (let ((port (open-file "setup.cfg" "a")))
9608 (display "\n[easy_install]\nzip_ok = 0\n"
9609 port)
9610 (close-port port)
9611 #t))))))
9612 (inputs
9613 ;; python-magic needs to be able to find libmagic.so.
9614 `(("file" ,file)))
9615 (home-page
9616 "https://github.com/ahupp/python-magic")
9617 (synopsis
9618 "File type identification using libmagic")
9619 (description
9620 "This module uses ctypes to access the libmagic file type
9621 identification library. It makes use of the local magic database and
9622 supports both textual and MIME-type output. Note that this module and
9623 the python-file module both provide a \"magic.py\" file; these two
9624 modules, which are different and were developed separately, both serve
9625 the same purpose: to provide Python bindings for libmagic.")
9626 (license license:expat)))
9627
9628 (define-public python2-magic
9629 (package-with-python2 python-magic))
9630
9631 (define-public python2-s3cmd
9632 (package
9633 (name "python2-s3cmd")
9634 (version "1.6.1")
9635 (source
9636 (origin
9637 (method url-fetch)
9638 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9639 "s3cmd-" version ".tar.gz"))
9640 (sha256
9641 (base32
9642 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9643 (build-system python-build-system)
9644 (arguments
9645 ;; s3cmd is written for python2 only and contains no tests.
9646 `(#:python ,python-2
9647 #:tests? #f))
9648 (propagated-inputs
9649 `(("python2-dateutil" ,python2-dateutil)
9650 ;; The python-file package also provides a magic.py module.
9651 ;; This is an unfortunate state of affairs; however, s3cmd
9652 ;; fails to install if it cannot find specifically the
9653 ;; python-magic package. Thus we include it, instead of using
9654 ;; python-file. Ironically, s3cmd sometimes works better
9655 ;; without libmagic bindings at all:
9656 ;; https://github.com/s3tools/s3cmd/issues/198
9657 ("python2-magic" ,python2-magic)))
9658 (home-page "http://s3tools.org/s3cmd")
9659 (synopsis "Command line tool for S3-compatible storage services")
9660 (description
9661 "S3cmd is a command line tool for uploading, retrieving and managing data
9662 in storage services that are compatible with the Amazon Simple Storage
9663 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9664 GnuPG encryption, and more. It also supports management of Amazon's
9665 CloudFront content delivery network.")
9666 (license license:gpl2+)))
9667
9668 (define-public python-pkgconfig
9669 (package
9670 (name "python-pkgconfig")
9671 (version "1.3.1")
9672 (source
9673 (origin
9674 (method url-fetch)
9675 (uri (pypi-uri "pkgconfig" version))
9676 (sha256
9677 (base32
9678 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9679 (build-system python-build-system)
9680 (native-inputs
9681 `(("python-nose" ,python-nose)))
9682 (inputs
9683 `(("pkg-config" ,pkg-config)))
9684 (arguments
9685 `(#:phases
9686 (modify-phases %standard-phases
9687 (add-before 'build 'patch
9688 ;; Hard-code the path to pkg-config.
9689 (lambda _
9690 (substitute* "pkgconfig/pkgconfig.py"
9691 (("cmd = 'pkg-config")
9692 (string-append "cmd = '" (which "pkg-config"))))
9693 #t))
9694 (replace 'check
9695 (lambda _
9696 (invoke "nosetests" "test.py"))))))
9697 (home-page "https://github.com/matze/pkgconfig")
9698 (synopsis "Python interface for pkg-config")
9699 (description "This module provides a Python interface to pkg-config. It
9700 can be used to find all pkg-config packages, check if a package exists,
9701 check if a package meets certain version requirements, query CFLAGS and
9702 LDFLAGS and parse the output to build extensions with setup.py.")
9703 (license license:expat)))
9704
9705 (define-public python2-pkgconfig
9706 (package-with-python2 python-pkgconfig))
9707
9708 (define-public python-bz2file
9709 (package
9710 (name "python-bz2file")
9711 (version "0.98")
9712 (source
9713 (origin
9714 (method url-fetch)
9715 (uri (pypi-uri "bz2file" version))
9716 (sha256
9717 (base32
9718 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9719 (build-system python-build-system)
9720 (arguments
9721 `(#:tests? #f)) ; Tests use deprecated python modules.
9722 (home-page "https://github.com/nvawda/bz2file")
9723 (synopsis "Read and write bzip2-compressed files")
9724 (description
9725 "Bz2file is a Python library for reading and writing bzip2-compressed
9726 files. It contains a drop-in replacement for the I/O interface in the
9727 standard library's @code{bz2} module, including features from the latest
9728 development version of CPython that are not available in older releases.")
9729 (license license:asl2.0)))
9730
9731 (define-public python2-bz2file
9732 (package-with-python2 python-bz2file))
9733
9734 (define-public python-future
9735 (package
9736 (name "python-future")
9737 (version "0.17.1")
9738 (source
9739 (origin
9740 (method url-fetch)
9741 (uri (pypi-uri "future" version))
9742 (sha256
9743 (base32
9744 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9745 (build-system python-build-system)
9746 ;; Many tests connect to the network or are otherwise flawed.
9747 ;; https://github.com/PythonCharmers/python-future/issues/210
9748 (arguments
9749 `(#:tests? #f))
9750 (home-page "http://python-future.org")
9751 (synopsis "Single-source support for Python 3 and 2")
9752 (description
9753 "@code{python-future} is the missing compatibility layer between Python 2 and
9754 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9755 to support both Python 2 and Python 3 with minimal overhead.")
9756 (license license:expat)))
9757
9758 (define-public python2-future
9759 (package-with-python2 python-future))
9760
9761 (define-public python-cysignals
9762 (package
9763 (name "python-cysignals")
9764 (version "1.9.0")
9765 (source
9766 (origin
9767 (method url-fetch)
9768 (uri (pypi-uri "cysignals" version))
9769 (sha256
9770 (base32
9771 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9772 (build-system python-build-system)
9773 (native-inputs
9774 `(("python-cython" ,python-cython)
9775 ("python-sphinx" ,python-sphinx)))
9776 (inputs
9777 `(("pari-gp" ,pari-gp)))
9778 (arguments
9779 `(#:modules ((guix build python-build-system)
9780 ((guix build gnu-build-system) #:prefix gnu:)
9781 (guix build utils))
9782 ;; FIXME: Tests are executed after installation and currently fail
9783 ;; when not installing into standard locations; the author is working
9784 ;; on a fix.
9785 #:tests? #f
9786 #:phases
9787 (modify-phases %standard-phases
9788 (add-before
9789 'build 'configure
9790 (assoc-ref gnu:%standard-phases 'configure)))))
9791 (home-page
9792 "https://github.com/sagemath/cysignals")
9793 (synopsis
9794 "Handling of interrupts and signals for Cython")
9795 (description
9796 "The cysignals package provides mechanisms to handle interrupts (and
9797 other signals and errors) in Cython code, using two related approaches,
9798 for mixed Cython/Python code or external C libraries and pure Cython code,
9799 respectively.")
9800 (license license:lgpl3+)))
9801
9802 (define-public python2-cysignals
9803 (package-with-python2 python-cysignals))
9804
9805 (define-public python2-shedskin
9806 (package
9807 (name "python2-shedskin")
9808 (version "0.9.4")
9809 (source
9810 (origin
9811 (method url-fetch)
9812 (uri (string-append "https://github.com/shedskin/shedskin/"
9813 "releases/download/v" version
9814 "/shedskin-" version ".tgz"))
9815 (sha256
9816 (base32
9817 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9818 (build-system python-build-system)
9819 (arguments
9820 `(#:python ,python-2
9821 #:phases (modify-phases %standard-phases
9822 (add-after 'unpack 'fix-resulting-include-libs
9823 (lambda* (#:key inputs #:allow-other-keys)
9824 (let ((libgc (assoc-ref inputs "libgc"))
9825 (pcre (assoc-ref inputs "pcre")))
9826 (substitute* "shedskin/makefile.py"
9827 (("variable == 'CCFLAGS':[ ]*")
9828 (string-append "variable == 'CCFLAGS':\n"
9829 " line += ' -I " pcre "/include"
9830 " -I " libgc "/include'"))
9831 (("variable == 'LFLAGS':[ ]*")
9832 (string-append "variable == 'LFLAGS':\n"
9833 " line += ' -L" pcre "/lib"
9834 " -L " libgc "/lib'")))
9835 #t))))))
9836 (inputs `(("pcre" ,pcre)
9837 ("libgc" ,libgc)))
9838 (home-page "https://shedskin.github.io/")
9839 (synopsis "Experimental Python-2 to C++ Compiler")
9840 (description (string-append "This is an experimental compiler for a subset of
9841 Python. It generates C++ code and a Makefile."))
9842 (license (list license:gpl3 license:bsd-3 license:expat))))
9843
9844 (define-public python2-rope
9845 (package
9846 (name "python2-rope")
9847 (version "0.11.0")
9848 (source
9849 (origin
9850 (method url-fetch)
9851 (uri (pypi-uri "rope" version))
9852 (sha256
9853 (base32
9854 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9855 (arguments
9856 ;; Rope has only partial python3 support, see `python-rope'
9857 `(#:python ,python-2))
9858 (build-system python-build-system)
9859 (native-inputs
9860 `(("python2-unittest2" ,python2-unittest2)))
9861 (home-page "https://github.com/python-rope/rope")
9862 (synopsis "Refactoring library for Python")
9863 (description "Rope is a refactoring library for Python. It facilitates
9864 the renaming, moving and extracting of attributes, functions, modules, fields
9865 and parameters in Python 2 source code. These refactorings can also be applied
9866 to occurrences in strings and comments.")
9867 (license license:gpl2)))
9868
9869 (define-public python-rope
9870 (package
9871 (inherit python2-rope)
9872 (name "python-rope")
9873 (arguments `(#:python ,python-wrapper
9874 ;; XXX: Only partial python3 support, results in some failing
9875 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9876 #:tests? #f))
9877 (properties `((python2-variant . ,(delay python2-rope))))))
9878
9879 (define-public python-py3status
9880 (package
9881 (name "python-py3status")
9882 (version "3.21")
9883 (source
9884 (origin
9885 (method url-fetch)
9886 (uri (pypi-uri "py3status" version))
9887 (sha256
9888 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
9889 (build-system python-build-system)
9890 (inputs
9891 `(("file" ,file)))
9892 (arguments
9893 '(#:phases
9894 (modify-phases %standard-phases
9895 ;; 'file' is used for detection of configuration file encoding
9896 ;; let's make link the dependency to particular input
9897 (add-before 'build 'patch-file-path
9898 (lambda* (#:key inputs #:allow-other-keys)
9899 (let ((file-path (assoc-ref inputs "file")))
9900 (substitute* "py3status/parse_config.py"
9901 (("\\[\"file\", \"-b\"")
9902 (string-append "['" file-path "/bin/file', '-b'")))
9903 #t))))
9904 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9905 (home-page "https://github.com/ultrabug/py3status")
9906 (synopsis "Extensible i3status wrapper written in Python")
9907 (description "py3status is an i3status wrapper which extends i3status
9908 functionality in a modular way, allowing you to extend your panel with your
9909 own code, responding to click events and updating clock every second.")
9910 (license license:bsd-3)))
9911
9912 (define-public python-tblib
9913 (package
9914 (name "python-tblib")
9915 (version "1.3.2")
9916 (source (origin
9917 (method url-fetch)
9918 (uri (pypi-uri "tblib" version))
9919 (sha256 (base32
9920 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9921 (build-system python-build-system)
9922 (arguments
9923 `(#:phases
9924 (modify-phases %standard-phases
9925 (add-before 'check 'adjust-tests
9926 (lambda _
9927 (when (which "python3")
9928 ;; Adjust the example output to match that of Python 3.7:
9929 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9930 (substitute* "README.rst"
9931 (("Exception\\('fail',") "Exception('fail'"))
9932 #t)))
9933 (replace 'check
9934 (lambda _
9935 ;; Upstream runs tests after installation and the package itself
9936 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9937 ;; found.
9938 (setenv "PYTHONPATH"
9939 (string-append (getcwd) "/build/lib:"
9940 (getenv "PYTHONPATH")))
9941 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9942 (native-inputs
9943 `(("python-pytest" ,python-pytest)
9944 ("python-six" ,python-six)))
9945 (home-page "https://github.com/ionelmc/python-tblib")
9946 (synopsis "Traceback serialization library")
9947 (description
9948 "Traceback serialization allows you to:
9949
9950 @enumerate
9951 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9952 different processes. This allows better error handling when running code over
9953 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9954
9955 @item Parse traceback strings and raise with the parsed tracebacks.
9956 @end enumerate\n")
9957 (license license:bsd-3)))
9958
9959 (define-public python2-tblib
9960 (package-with-python2 python-tblib))
9961
9962 (define-public python-greenlet
9963 (package
9964 (name "python-greenlet")
9965 (version "0.4.15")
9966 (source (origin
9967 (method url-fetch)
9968 (uri (pypi-uri "greenlet" version))
9969 (sha256
9970 (base32
9971 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9972 (build-system python-build-system)
9973 (home-page "https://greenlet.readthedocs.io/")
9974 (synopsis "Lightweight in-process concurrent programming")
9975 (description
9976 "Greenlet package is a spin-off of Stackless, a version of CPython
9977 that supports micro-threads called \"tasklets\". Tasklets run
9978 pseudo-concurrently (typically in a single or a few OS-level threads) and
9979 are synchronized with data exchanges on \"channels\".")
9980 (license (list license:psfl license:expat))))
9981
9982 (define-public python2-greenlet
9983 (package-with-python2 python-greenlet))
9984
9985 (define-public python-objgraph
9986 (package
9987 (name "python-objgraph")
9988 (version "3.4.1")
9989 (source
9990 (origin
9991 (method url-fetch)
9992 (uri (pypi-uri "objgraph" version))
9993 (sha256
9994 (base32
9995 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
9996 (build-system python-build-system)
9997 (propagated-inputs
9998 `(("python-graphviz" ,python-graphviz)))
9999 (native-inputs
10000 `(("python-mock" ,python-mock)
10001 ("graphviz" ,graphviz)))
10002 (home-page "https://mg.pov.lt/objgraph/")
10003 (synopsis "Draw Python object reference graphs with graphviz")
10004 (description
10005 "This package provides tools to draw Python object reference graphs with
10006 graphviz.")
10007 (license license:expat)))
10008
10009 (define-public python2-objgraph
10010 (package-with-python2 python-objgraph))
10011
10012 (define-public python-gevent
10013 (package
10014 (name "python-gevent")
10015 (version "1.3.7")
10016 (source (origin
10017 (method url-fetch)
10018 (uri (pypi-uri "gevent" version))
10019 (sha256
10020 (base32
10021 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10022 (modules '((guix build utils)))
10023 (snippet
10024 '(begin
10025 ;; unbunding libev and c-ares
10026 (delete-file-recursively "deps")
10027 #t))))
10028 (build-system python-build-system)
10029 (arguments
10030 `(#:modules ((ice-9 ftw)
10031 (ice-9 match)
10032 (srfi srfi-26)
10033 (guix build utils)
10034 (guix build python-build-system))
10035 #:phases (modify-phases %standard-phases
10036 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10037 (lambda _
10038 (substitute* "src/gevent/subprocess.py"
10039 (("/bin/sh") (which "sh")))
10040 (for-each (lambda (file)
10041 (substitute* file
10042 (("/bin/sh") (which "sh"))
10043 (("/bin/true") (which "true"))))
10044 (find-files "src/greentest" "\\.py$"))
10045 #t))
10046 (add-before 'build 'do-not-use-bundled-sources
10047 (lambda* (#:key inputs #:allow-other-keys)
10048 (setenv "CONFIG_SHELL" (which "bash"))
10049 (setenv "LIBEV_EMBED" "false")
10050 (setenv "CARES_EMBED" "false")
10051 (setenv "EMBED" "false")
10052
10053 ;; Prevent building bundled libev.
10054 (substitute* "setup.py"
10055 (("run_make=_BUILDING")
10056 "run_make=False"))
10057
10058 (let ((greenlet (string-append
10059 (assoc-ref inputs "python-greenlet")
10060 "/include")))
10061 (match (scandir greenlet
10062 (lambda (item)
10063 (string-prefix? "python" item)))
10064 ((python)
10065 (setenv "C_INCLUDE_PATH"
10066 (string-append greenlet "/" python)))))
10067 #t))
10068 (add-before 'check 'skip-timer-test
10069 (lambda _
10070 ;; XXX: Skip 'TestTimerResolution', which appears to be
10071 ;; unreliable.
10072 (substitute* "src/greentest/test__core_timer.py"
10073 (("not greentest.RUNNING_ON_CI") "False"))
10074 #t))
10075 (replace 'check
10076 (lambda _
10077 ;; Make sure the build directory is on PYTHONPATH.
10078 (setenv "PYTHONPATH"
10079 (string-append
10080 (getenv "PYTHONPATH") ":"
10081 (getcwd) "/build/"
10082 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10083 (with-directory-excursion "src/greentest"
10084 ;; XXX: Many tests require network access. Instead we only
10085 ;; run known-good tests. Unfortunately we cannot use
10086 ;; recursion here since this directory also contains
10087 ;; Python-version-specific subfolders.
10088 (apply invoke "python" "testrunner.py" "--config"
10089 "known_failures.py"
10090 (scandir "." (cut regexp-exec
10091 (make-regexp "test_+(subprocess|core)")
10092 <>)))))))))
10093 (propagated-inputs
10094 `(("python-greenlet" ,python-greenlet)
10095 ("python-objgraph" ,python-objgraph)))
10096 (native-inputs
10097 `(("python-six" ,python-six)))
10098 (inputs
10099 `(("c-ares" ,c-ares)
10100 ("libev" ,libev)))
10101 (home-page "http://www.gevent.org/")
10102 (synopsis "Coroutine-based network library")
10103 (description
10104 "gevent is a coroutine-based Python networking library that uses greenlet
10105 to provide a high-level synchronous API on top of the libev event loop.")
10106 (license license:expat)
10107 (properties `((python2-variant . ,(delay python2-gevent))))))
10108
10109 (define-public python2-gevent
10110 (let ((base (package-with-python2
10111 (strip-python2-variant python-gevent))))
10112 (package
10113 (inherit base)
10114 (native-inputs `(,@(package-native-inputs python-gevent)
10115 ("python-mock" ,python2-mock))))))
10116
10117 (define-public python-fastimport
10118 (package
10119 (name "python-fastimport")
10120 (version "0.9.6")
10121 (source
10122 (origin
10123 (method url-fetch)
10124 (uri (pypi-uri "fastimport" version))
10125 (sha256
10126 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10127 (build-system python-build-system)
10128 (home-page "https://github.com/jelmer/python-fastimport")
10129 (synopsis "VCS fastimport parser and generator in Python")
10130 (description "This package provides a parser for and generator of the Git
10131 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10132 format.")
10133 (license license:gpl2+)))
10134
10135 (define-public python2-fastimport
10136 (package-with-python2 python-fastimport))
10137
10138 (define-public python-twisted
10139 (package
10140 (name "python-twisted")
10141 (version "19.7.0")
10142 (source (origin
10143 (method url-fetch)
10144 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10145 (sha256
10146 (base32
10147 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10148 (build-system python-build-system)
10149 (arguments
10150 '(#:tests? #f)) ; FIXME: some tests fail
10151 (propagated-inputs
10152 `(("python-zope-interface" ,python-zope-interface)
10153 ("python-pyhamcrest" ,python-pyhamcrest)
10154 ("python-incremental" ,python-incremental)
10155 ("python-hyperlink" ,python-hyperlink)
10156 ("python-constantly" ,python-constantly)
10157 ("python-automat" ,python-automat)))
10158 (home-page "https://twistedmatrix.com/")
10159 (synopsis "Asynchronous networking framework written in Python")
10160 (description
10161 "Twisted is an extensible framework for Python programming, with special
10162 focus on event-based network programming and multiprotocol integration.")
10163 (license license:expat)))
10164
10165 (define-public python2-twisted
10166 (package-with-python2 python-twisted))
10167
10168 (define-public python-pika
10169 (package
10170 (name "python-pika")
10171 (version "0.12.0")
10172 (source
10173 (origin
10174 (method url-fetch)
10175 (uri (pypi-uri "pika" version))
10176 (sha256
10177 (base32
10178 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10179 (build-system python-build-system)
10180 (native-inputs
10181 `(("python-pyev" ,python-pyev)
10182 ("python-tornado" ,python-tornado)
10183 ("python-twisted" ,python-twisted)))
10184 (home-page "https://pika.readthedocs.org")
10185 (synopsis "Pure Python AMQP Client Library")
10186 (description
10187 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10188 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10189 network support library.")
10190 (license license:bsd-3)))
10191
10192 (define-public python2-pika
10193 (package-with-python2 python-pika))
10194
10195 (define-public python-ply
10196 (package
10197 (name "python-ply")
10198 (version "3.10")
10199 (source
10200 (origin
10201 (method url-fetch)
10202 (uri (pypi-uri "ply" version))
10203 (sha256
10204 (base32
10205 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10206 (build-system python-build-system)
10207 (home-page "http://www.dabeaz.com/ply/")
10208 (synopsis "Python Lex & Yacc")
10209 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10210 It uses LR parsing and does extensive error checking.")
10211 (license license:bsd-3)))
10212
10213 (define-public python2-ply
10214 (package-with-python2 python-ply))
10215
10216 (define-public python-tabulate
10217 (package
10218 (name "python-tabulate")
10219 (version "0.7.7")
10220 (source (origin
10221 (method url-fetch)
10222 (uri (pypi-uri "tabulate" version))
10223 (sha256
10224 (base32
10225 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10226 (build-system python-build-system)
10227 (arguments
10228 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10229 ;; and the latest release is not tagged in the upstream repository.
10230 '(#:tests? #f))
10231 (home-page "https://bitbucket.org/astanin/python-tabulate")
10232 (synopsis "Pretty-print tabular data")
10233 (description
10234 "Tabulate is a library and command-line utility to pretty-print tabular
10235 data in Python.")
10236 (license license:expat)))
10237
10238 (define-public python2-tabulate
10239 (package-with-python2 python-tabulate))
10240
10241 (define-public python-kazoo
10242 (package
10243 (name "python-kazoo")
10244 (version "2.4.0")
10245 (source
10246 (origin
10247 (method url-fetch)
10248 (uri (pypi-uri "kazoo" version))
10249 (sha256
10250 (base32
10251 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10252 (build-system python-build-system)
10253 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10254 (propagated-inputs
10255 `(("python-six" ,python-six)))
10256 (home-page "https://kazoo.readthedocs.org")
10257 (synopsis "High-level Zookeeper client library")
10258 (description
10259 "Kazoo is a Python client library for the Apache Zookeeper distributed
10260 application service. It is designed to be easy to use and to avoid common
10261 programming errors.")
10262 (license license:asl2.0)))
10263
10264 (define-public python2-kazoo
10265 (package-with-python2 python-kazoo))
10266
10267 (define-public python-pykafka
10268 (package
10269 (name "python-pykafka")
10270 (version "2.4.0")
10271 (source (origin
10272 (method url-fetch)
10273 (uri (pypi-uri "pykafka" version))
10274 (sha256
10275 (base32
10276 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10277 (build-system python-build-system)
10278 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10279 (propagated-inputs
10280 `(("python-gevent" ,python-gevent)
10281 ("python-kazoo" ,python-kazoo)
10282 ("python-tabulate" ,python-tabulate)))
10283 (inputs
10284 `(("librdkafka" ,librdkafka)))
10285 (home-page "https://pykafka.readthedocs.io/")
10286 (synopsis "Apache Kafka client for Python")
10287 (description
10288 "PyKafka is a client for the Apache Kafka distributed messaging system.
10289 It includes Python implementations of Kafka producers and consumers, which
10290 are optionally backed by a C extension built on librdkafka.")
10291 (license license:asl2.0)))
10292
10293 (define-public python2-pykafka
10294 (package-with-python2 python-pykafka))
10295
10296 (define-public python-wcwidth
10297 (package
10298 (name "python-wcwidth")
10299 (version "0.1.8")
10300 (source (origin
10301 (method url-fetch)
10302 (uri (pypi-uri "wcwidth" version))
10303 (sha256
10304 (base32
10305 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
10306 (build-system python-build-system)
10307 (home-page "https://github.com/jquast/wcwidth")
10308 (synopsis "Measure number of terminal column cells of wide-character codes")
10309 (description "Wcwidth measures the number of terminal column cells of
10310 wide-character codes. It is useful for those implementing a terminal emulator,
10311 or programs that carefully produce output to be interpreted by one. It is a
10312 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10313 specified in POSIX.1-2001 and POSIX.1-2008.")
10314 (license license:expat)))
10315
10316 (define-public python2-wcwidth
10317 (package-with-python2 python-wcwidth))
10318
10319 (define-public python2-jsonrpclib
10320 (package
10321 (name "python2-jsonrpclib")
10322 (version "0.1.7")
10323 (source (origin
10324 (method url-fetch)
10325 (uri (pypi-uri "jsonrpclib" version))
10326 (sha256
10327 (base32
10328 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10329 (build-system python-build-system)
10330 (arguments
10331 `(#:tests? #f
10332 #:python ,python-2))
10333 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10334 (synopsis "Implementation of JSON-RPC specification for Python")
10335 (description
10336 "This library is an implementation of the JSON-RPC specification.
10337 It supports both the original 1.0 specification, as well as the
10338 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10339 etc.")
10340 (license license:asl2.0)))
10341
10342 (define-public python-chai
10343 (package
10344 (name "python-chai")
10345 (version "1.1.2")
10346 (source (origin
10347 (method url-fetch)
10348 (uri (pypi-uri "chai" version))
10349 (sha256
10350 (base32
10351 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10352 (build-system python-build-system)
10353 (home-page "https://github.com/agoragames/chai")
10354 (synopsis "Mocking framework for Python")
10355 (description
10356 "Chai provides an api for mocking, stubbing and spying your python
10357 objects, patterned after the Mocha library for Ruby.")
10358 (license license:bsd-3)))
10359
10360 (define-public python2-chai
10361 (package-with-python2 python-chai))
10362
10363 (define-public python-inflection
10364 (package
10365 (name "python-inflection")
10366 (version "0.3.1")
10367 (source
10368 (origin (method url-fetch)
10369 (uri (pypi-uri "inflection" version))
10370 (sha256
10371 (base32
10372 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10373 (build-system python-build-system)
10374 (native-inputs
10375 `(("python-pytest" ,python-pytest)))
10376 (home-page "https://github.com/jpvanhal/inflection")
10377 (synopsis "Python string transformation library")
10378 (description
10379 "Inflection is a string transformation library. It singularizes
10380 and pluralizes English words, and transforms strings from CamelCase to
10381 underscored string.")
10382 (license license:expat)))
10383
10384 (define-public python2-inflection
10385 (package-with-python2 python-inflection))
10386
10387 (define-public python-pylev
10388 (package
10389 (name "python-pylev")
10390 (version "1.3.0")
10391 (source (origin
10392 (method url-fetch)
10393 (uri (pypi-uri "pylev" version))
10394 (sha256
10395 (base32
10396 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10397 (build-system python-build-system)
10398 (home-page "https://github.com/toastdriven/pylev")
10399 (synopsis "Levenshtein distance implementation in Python")
10400 (description "Pure Python Levenshtein implementation, based off the
10401 Wikipedia code samples at
10402 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10403 (license license:bsd-3)))
10404
10405 (define-public python2-pylev
10406 (package-with-python2 python-pylev))
10407
10408 (define-public python-cleo
10409 (package
10410 (name "python-cleo")
10411 (version "0.6.8")
10412 (source (origin
10413 (method url-fetch)
10414 (uri (pypi-uri "cleo" version))
10415 (sha256
10416 (base32
10417 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
10418 (build-system python-build-system)
10419 (native-inputs
10420 `( ;; For testing
10421 ("python-mock" ,python-mock)
10422 ("python-pytest-mock" ,python-pytest-mock)
10423 ("python-pytest" ,python-pytest)))
10424 (propagated-inputs
10425 `(("python-backpack" ,python-backpack)
10426 ("python-pastel" ,python-pastel)
10427 ("python-pylev" ,python-pylev)))
10428 (home-page "https://github.com/sdispater/cleo")
10429 (synopsis "Command-line arguments library for Python")
10430 (description
10431 "Cleo allows you to create command-line commands with signature in
10432 docstring and colored output.")
10433 (license license:expat)))
10434
10435 (define-public python2-cleo
10436 (package-with-python2 python-cleo))
10437
10438 (define-public python-tomlkit
10439 (package
10440 (name "python-tomlkit")
10441 (version "0.5.7")
10442 (source
10443 (origin
10444 (method url-fetch)
10445 (uri (pypi-uri "tomlkit" version))
10446 (sha256
10447 (base32
10448 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10449 (build-system python-build-system)
10450 (native-inputs
10451 `(("python-pytest" ,python-pytest)))
10452 (home-page
10453 "https://github.com/sdispater/tomlkit")
10454 (synopsis "Style preserving TOML library")
10455 (description
10456 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10457 preserves all comments, indentations, whitespace and internal element ordering,
10458 and makes them accessible and editable via an intuitive API. It can also
10459 create new TOML documents from scratch using the provided helpers. Part of the
10460 implementation as been adapted, improved and fixed from Molten.")
10461 (license license:expat)))
10462
10463 (define-public python-shellingham
10464 (package
10465 (name "python-shellingham")
10466 (version "1.3.1")
10467 (source
10468 (origin
10469 (method url-fetch)
10470 (uri (pypi-uri "shellingham" version))
10471 (sha256
10472 (base32
10473 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10474 (build-system python-build-system)
10475 (home-page
10476 "https://github.com/sarugaku/shellingham")
10477 (synopsis "Tool to detect surrounding shell")
10478 (description
10479 "Shellingham detects what shell the current Python executable is
10480 running in.")
10481 (license license:isc)))
10482
10483 (define-public python-memcached
10484 (package
10485 (name "python-memcached")
10486 (version "1.59")
10487 (source
10488 (origin
10489 (method url-fetch)
10490 (uri (pypi-uri "python-memcached" version))
10491 (sha256
10492 (base32
10493 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10494 (build-system python-build-system)
10495 (propagated-inputs `(("python-six" ,python-six)))
10496 (home-page
10497 "https://github.com/linsomniac/python-memcached")
10498 (synopsis "Pure python memcached client")
10499 (description
10500 "This software is a pure Python interface to the memcached memory cache
10501 daemon. It is the client side software which allows storing values in one or
10502 more, possibly remote, memcached servers.")
10503 (license license:psfl)))
10504
10505 (define-public python-clikit
10506 (package
10507 (name "python-clikit")
10508 (version "0.2.4")
10509 (source
10510 (origin
10511 (method url-fetch)
10512 (uri (pypi-uri "clikit" version))
10513 (sha256
10514 (base32
10515 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10516 (build-system python-build-system)
10517 (propagated-inputs
10518 `(("python-pastel" ,python-pastel)
10519 ("python-pylev" ,python-pylev)))
10520 (home-page "https://github.com/sdispater/clikit")
10521 (synopsis "Group of utilities to build command line interfaces")
10522 (description
10523 "CliKit is a group of utilities to build testable command line
10524 interfaces.")
10525 (license license:expat)))
10526
10527 (define-public python-msgpack-python
10528 (package
10529 (name "python-msgpack-python")
10530 (version "0.5.6")
10531 (source
10532 (origin
10533 (method url-fetch)
10534 (uri (pypi-uri "msgpack-python" version))
10535 (sha256
10536 (base32
10537 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10538 (build-system python-build-system)
10539 (home-page "http://msgpack.org/")
10540 (synopsis "Package to deserialize messages in MessagePack binary format")
10541 (description
10542 "MessagePack is an efficient binary serialization format. It lets you
10543 exchange data among multiple languages like JSON. But it's faster and
10544 smaller. Small integers are encoded into a single byte, and typical short
10545 strings require only one extra byte in addition to the strings themselves.")
10546 (license license:asl2.0)))
10547
10548 (define-public python-cachy
10549 (package
10550 (name "python-cachy")
10551 (version "0.2.0")
10552 (source
10553 (origin
10554 (method url-fetch)
10555 (uri (pypi-uri "cachy" version))
10556 (sha256
10557 (base32
10558 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10559 (build-system python-build-system)
10560 (native-inputs
10561 `(("python-fakeredis" ,python-fakeredis)
10562 ("python-flexmock" ,python-flexmock)
10563 ("python-pytest" ,python-pytest)))
10564 (propagated-inputs
10565 `(("python-memcached" ,python-memcached)
10566 ("python-msgpack-python" ,python-msgpack-python)
10567 ("python-redis" ,python-redis)))
10568 (home-page "https://github.com/sdispater/cachy")
10569 (synopsis "Simple yet effective caching library")
10570 (description
10571 "Cachy provides a simple yet effective caching library. A simple but
10572 powerful API: thread-safety; decorator syntax; support for memcached, redis,
10573 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10574 (license license:expat)))
10575
10576 (define-public poetry
10577 (package
10578 (name "poetry")
10579 (version "0.12.17")
10580 ;; Poetry can only be built from source with poetry.
10581 (source
10582 (origin
10583 (method url-fetch)
10584 (uri (pypi-uri "poetry" version))
10585 (sha256
10586 (base32
10587 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10588 (build-system python-build-system)
10589 (arguments
10590 `(#:tests? #f ;; Pypi does not have tests.
10591 #:phases
10592 (modify-phases %standard-phases
10593 (replace 'build
10594 (lambda _
10595 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10596 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10597 "setup.py")
10598 #t)))))
10599 (propagated-inputs
10600 `(("python-cachecontrol" ,python-cachecontrol)
10601 ("python-cachy" ,python-cachy)
10602 ("python-cleo" ,python-cleo)
10603 ("python-glob2" ,python-glob2)
10604 ("python-html5lib" ,python-html5lib)
10605 ("python-jsonschema" ,python-jsonschema)
10606 ("python-msgpack" ,python-msgpack)
10607 ("python-pkginfo" ,python-pkginfo)
10608 ("python-pyparsing" ,python-pyparsing)
10609 ("python-pyrsistent" ,python-pyrsistent)
10610 ("python-requests" ,python-requests)
10611 ("python-requests-toolbelt" ,python-requests-toolbelt)
10612 ("python-shellingham" ,python-shellingham)
10613 ("python-tomlkit" ,python-tomlkit)
10614 ("python-virtualenv" ,python-virtualenv)))
10615 (home-page "https://poetry.eustace.io/")
10616 (synopsis "Python dependency management and packaging made easy")
10617 (description "Poetry is a tool for dependency management and packaging
10618 in Python. It allows you to declare the libraries your project depends on and
10619 it will manage (install/update) them for you.")
10620 (license license:expat)))
10621
10622 (define-public python-lazy-object-proxy
10623 (package
10624 (name "python-lazy-object-proxy")
10625 (version "1.4.3")
10626 (source (origin
10627 (method url-fetch)
10628 (uri (pypi-uri "lazy-object-proxy" version))
10629 (sha256
10630 (base32
10631 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
10632 (native-inputs
10633 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
10634 (build-system python-build-system)
10635 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10636 (synopsis "Lazy object proxy for python")
10637 (description
10638 "Lazy object proxy is an object that wraps a callable but defers the call
10639 until the object is actually required, and caches the result of said call.")
10640 (license license:bsd-2)))
10641
10642 (define-public python2-lazy-object-proxy
10643 (package-with-python2 python-lazy-object-proxy))
10644
10645 (define-public python-dnspython
10646 (package
10647 (name "python-dnspython")
10648 (version "1.15.0")
10649 (source (origin
10650 (method url-fetch)
10651 (uri (string-append "http://www.dnspython.org/kits/"
10652 version "/dnspython-" version ".tar.gz"))
10653 (sha256
10654 (base32
10655 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10656 (build-system python-build-system)
10657 (arguments '(#:tests? #f)) ; XXX: requires internet access
10658 (home-page "http://www.dnspython.org")
10659 (synopsis "DNS toolkit for Python")
10660 (description
10661 "dnspython is a DNS toolkit for Python. It supports almost all record
10662 types. It can be used for queries, zone transfers, and dynamic updates.
10663 It supports TSIG authenticated messages and EDNS0.")
10664 (license license:expat)))
10665
10666 (define-public python2-dnspython
10667 (package-with-python2 python-dnspython))
10668
10669 (define-public python-email-validator
10670 (package
10671 (name "python-email-validator")
10672 (version "1.0.2")
10673 (source
10674 (origin (method url-fetch)
10675 (uri (pypi-uri "email_validator" version))
10676 (sha256
10677 (base32
10678 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10679 (build-system python-build-system)
10680 (arguments
10681 '(#:phases
10682 (modify-phases %standard-phases
10683 (add-before 'build 'use-dnspython
10684 (lambda _
10685 (substitute* "setup.py"
10686 (("dnspython3") "dnspython"))
10687 #t)))))
10688 (propagated-inputs
10689 `(("python-dnspython" ,python-dnspython)
10690 ("python-idna" ,python-idna)))
10691 (home-page "https://github.com/JoshData/python-email-validator")
10692 (synopsis "Email address validation library for Python")
10693 (description
10694 "This library validates email address syntax and deliverability.")
10695 (license license:cc0)))
10696
10697 (define-public python2-email-validator
10698 (package-with-python2 python-email-validator))
10699
10700 (define-public python-ukpostcodeparser
10701 (package
10702 (name "python-ukpostcodeparser")
10703 (version "1.0.3")
10704 (source (origin
10705 (method url-fetch)
10706 (uri (pypi-uri "UkPostcodeParser" version))
10707 (sha256
10708 (base32
10709 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10710 (build-system python-build-system)
10711 (home-page "https://github.com/hamstah/ukpostcodeparser")
10712 (synopsis "UK Postcode parser for Python")
10713 (description
10714 "This library provides the @code{parse_uk_postcode} function for
10715 parsing UK postcodes.")
10716 (license license:expat)))
10717
10718 (define-public python2-ukpostcodeparser
10719 (package-with-python2 python-ukpostcodeparser))
10720
10721 (define-public python-faker
10722 (package
10723 (name "python-faker")
10724 (version "0.7.9")
10725 (source (origin
10726 (method url-fetch)
10727 (uri (pypi-uri "Faker" version))
10728 (sha256
10729 (base32
10730 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10731 (patches
10732 (search-patches "python-faker-fix-build-32bit.patch"))
10733 (modules '((guix build utils)))
10734 (snippet
10735 '(begin
10736 (for-each delete-file (find-files "." "\\.pyc$"))
10737 #t))))
10738 (build-system python-build-system)
10739 (arguments
10740 '(#:phases
10741 (modify-phases %standard-phases
10742 (replace 'check
10743 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10744 (native-inputs
10745 `(;; For testing
10746 ("python-email-validator" ,python-email-validator)
10747 ("python-mock" ,python-mock)
10748 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10749 (propagated-inputs
10750 `(("python-dateutil" ,python-dateutil)
10751 ("python-six" ,python-six)))
10752 (home-page "https://github.com/joke2k/faker")
10753 (synopsis "Python package that generates fake data")
10754 (description
10755 "Faker is a Python package that generates fake data such as names,
10756 addresses, and phone numbers.")
10757 (license license:expat)
10758 (properties `((python2-variant . ,(delay python2-faker))))))
10759
10760 (define-public python2-faker
10761 (let ((base (package-with-python2 (strip-python2-variant
10762 python-faker))))
10763 (package
10764 (inherit base)
10765 (propagated-inputs
10766 `(("python2-ipaddress" ,python2-ipaddress)
10767 ,@(package-propagated-inputs base))))))
10768
10769 (define-public python-pyaml
10770 (package
10771 (name "python-pyaml")
10772 (version "18.11.0")
10773 (source (origin
10774 (method url-fetch)
10775 (uri (pypi-uri "pyaml" version))
10776 (sha256
10777 (base32
10778 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10779 (build-system python-build-system)
10780 (native-inputs
10781 `(("python-unidecode" ,python-unidecode)))
10782 (propagated-inputs
10783 `(("python-pyyaml" ,python-pyyaml)))
10784 (home-page "https://github.com/mk-fg/pretty-yaml")
10785 (synopsis "YAML pretty-print library for Python")
10786 (description
10787 "pyaml is a PyYAML based python module to produce pretty and readable
10788 YAML-serialized data.")
10789 (license license:wtfpl2)))
10790
10791 (define-public python2-pyaml
10792 (package-with-python2 python-pyaml))
10793
10794 (define-public python-backpack
10795 (package
10796 (name "python-backpack")
10797 (version "0.1")
10798 (source
10799 (origin
10800 (method url-fetch)
10801 (uri (pypi-uri "backpack" version))
10802 (sha256
10803 (base32
10804 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10805 (build-system python-build-system)
10806 (native-inputs
10807 `(("python-pytest" ,python-pytest)
10808 ("python-nose" ,python-nose)))
10809 (propagated-inputs
10810 `(("python-simplejson" ,python-simplejson)))
10811 (home-page "https://github.com/sdispater/backpack")
10812 (synopsis "Utilities for working with Python collections")
10813 (description "Backpack provides some useful utilities for working with
10814 collections of data.")
10815 (license license:expat)))
10816
10817 (define-public python2-backpack
10818 (package-with-python2 python-backpack))
10819
10820 (define-public python-prompt-toolkit
10821 (package
10822 (name "python-prompt-toolkit")
10823 (version "2.0.7")
10824 (source
10825 (origin
10826 (method url-fetch)
10827 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10828 (sha256
10829 (base32
10830 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10831 (build-system python-build-system)
10832 (arguments
10833 `(#:phases
10834 (modify-phases %standard-phases
10835 (delete 'check)
10836 (add-after 'install 'post-install-check
10837 (lambda* (#:key inputs outputs #:allow-other-keys)
10838 ;; HOME is needed for the test
10839 ;; "test_pathcompleter_can_expanduser".
10840 (setenv "HOME" "/tmp")
10841 (add-installed-pythonpath inputs outputs)
10842 (invoke "py.test"))))))
10843 (propagated-inputs
10844 `(("python-wcwidth" ,python-wcwidth)
10845 ("python-six" ,python-six)
10846 ("python-pygments" ,python-pygments)))
10847 (native-inputs
10848 `(("python-pytest" ,python-pytest)))
10849 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10850 (synopsis "Library for building command line interfaces in Python")
10851 (description
10852 "Prompt-Toolkit is a library for building interactive command line
10853 interfaces in Python. It's like GNU Readline but it also features syntax
10854 highlighting while typing, out-of-the-box multi-line input editing, advanced
10855 code completion, incremental search, support for Chinese double-width
10856 characters, mouse support, and auto suggestions.")
10857 (license license:bsd-3)))
10858
10859 (define-public python2-prompt-toolkit
10860 (package-with-python2 python-prompt-toolkit))
10861
10862 (define-public python-prompt-toolkit-1
10863 (package (inherit python-prompt-toolkit)
10864 (version "1.0.15")
10865 (source
10866 (origin
10867 (method url-fetch)
10868 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10869 (sha256
10870 (base32
10871 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10872
10873 (define-public python2-prompt-toolkit-1
10874 (package-with-python2 python-prompt-toolkit-1))
10875
10876 (define-public python-jedi
10877 (package
10878 (name "python-jedi")
10879 (version "0.15.1")
10880 (source
10881 (origin
10882 (method url-fetch)
10883 (uri (pypi-uri "jedi" version))
10884 (sha256
10885 (base32
10886 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10887 (build-system python-build-system)
10888 (arguments
10889 `(#:phases
10890 (modify-phases %standard-phases
10891 (add-after 'unpack 'disable-file-completion-test
10892 ;; A single parameterized test currently fail (see:
10893 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10894 (lambda _
10895 (substitute* "test/test_api/test_completion.py"
10896 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10897 #t))
10898 (replace 'check
10899 (lambda _
10900 (setenv "HOME" "/tmp")
10901 (invoke "python" "-m" "pytest"))))))
10902 (native-inputs
10903 `(("python-pytest" ,python-pytest)
10904 ("python-docopt" ,python-docopt)))
10905 (propagated-inputs
10906 `(("python-parso" ,python-parso)))
10907 (home-page "https://github.com/davidhalter/jedi")
10908 (synopsis "Autocompletion and static analysis library for Python")
10909 (description
10910 "Jedi is a static analysis tool for Python that can be used in Integrated
10911 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10912 on a deeper level than many other static analysis frameworks for Python.
10913
10914 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10915 well.")
10916 (license license:expat)))
10917
10918 (define-public python2-jedi
10919 (package-with-python2 python-jedi))
10920
10921 (define-public ptpython
10922 (package
10923 (name "ptpython")
10924 (version "0.34")
10925 (source (origin
10926 (method url-fetch)
10927 (uri (pypi-uri "ptpython" version))
10928 (sha256
10929 (base32
10930 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10931 (build-system python-build-system)
10932 (arguments
10933 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10934 (propagated-inputs
10935 `(("python-docopt" ,python-docopt)
10936 ("python-jedi" ,python-jedi)
10937 ("python-prompt-toolkit" ,python-prompt-toolkit)
10938 ("python-pygments" ,python-pygments)))
10939 (home-page "https://github.com/jonathanslenders/ptpython")
10940 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10941 (description
10942 "ptpython is a Python read-eval-print loop with IDE-like features.
10943 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10944 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10945 etc.")
10946 (license license:bsd-3)
10947 (properties `((python2-variant . ,(delay ptpython-2))))))
10948
10949 (define-public ptpython-2
10950 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10951 (package
10952 (inherit base)
10953 (name "ptpython2"))))
10954
10955 (define-public python-stem
10956 (package
10957 (name "python-stem")
10958 (version "1.7.1")
10959 (source
10960 (origin
10961 (method url-fetch)
10962 (uri (pypi-uri "stem" version))
10963 (sha256
10964 (base32
10965 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10966 (build-system python-build-system)
10967 (arguments
10968 `(#:phases
10969 (modify-phases %standard-phases
10970 (replace 'check
10971 (lambda _
10972 (invoke "./run_tests.py" "--unit")
10973 #t)))))
10974 (native-inputs
10975 `(("python-mock" ,python-mock)
10976 ("python-pycodestyle" ,python-pycodestyle)
10977 ("python-pyflakes" ,python-pyflakes)))
10978 (home-page "https://stem.torproject.org/")
10979 (synopsis
10980 "Python controller library that allows applications to interact with Tor")
10981 (description
10982 "Stem is a Python controller library for Tor. With it you can use Tor's
10983 control protocol to script against the Tor process and read descriptor data
10984 relays publish about themselves.")
10985 (license license:lgpl3)))
10986
10987 (define-public python2-stem
10988 (package-with-python2 python-stem))
10989
10990 (define-public python-pyserial
10991 (package
10992 (name "python-pyserial")
10993 (version "3.4")
10994 (source
10995 (origin
10996 (method url-fetch)
10997 (uri (pypi-uri "pyserial" version))
10998 (sha256
10999 (base32
11000 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
11001 (build-system python-build-system)
11002 (arguments
11003 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11004 ;; #:phases
11005 ;; (modify-phases %standard-phases
11006 ;; (replace 'check
11007 ;; (lambda _
11008 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11009 (home-page
11010 "https://github.com/pyserial/pyserial")
11011 (synopsis "Python Serial Port Bindings")
11012 (description "@code{pyserial} provide serial port bindings for Python. It
11013 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11014 and/or Xon/Xoff. The port is accessed in RAW mode.")
11015 (license license:bsd-3)))
11016
11017 (define-public python2-pyserial
11018 (package-with-python2 python-pyserial))
11019
11020 (define-public python-kivy
11021 (package
11022 (name "python-kivy")
11023 (version "1.10.1")
11024 (source
11025 (origin
11026 (method url-fetch)
11027 (uri (pypi-uri "Kivy" version))
11028 (file-name (string-append name "-" version ".tar.gz"))
11029 (sha256
11030 (base32
11031 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11032 (build-system python-build-system)
11033 (arguments
11034 `(#:tests? #f ; Tests require many optional packages
11035 #:phases
11036 (modify-phases %standard-phases
11037 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11038 (lambda* (#:key inputs #:allow-other-keys)
11039 (setenv "KIVY_SDL2_PATH"
11040 (string-append (assoc-ref inputs "sdl-union")
11041 "/include/SDL2"))
11042 #t)))))
11043 (native-inputs
11044 `(("git" ,git)
11045 ("pkg-config" ,pkg-config)
11046 ("python-cython" ,python-cython)))
11047 (inputs
11048 `(("gstreamer" ,gstreamer)
11049 ("mesa" ,mesa)
11050 ("sdl-union"
11051 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11052 (home-page "http://kivy.org")
11053 (synopsis
11054 "Multitouch application framework")
11055 (description
11056 "A software library for rapid development of
11057 hardware-accelerated multitouch applications.")
11058 (license license:expat)))
11059
11060 (define-public python2-kivy
11061 (package-with-python2 python-kivy))
11062
11063 (define-public python-kivy-next
11064 (deprecated-package "python-kivy-next" python-kivy))
11065
11066 (define-public python2-kivy-next
11067 (deprecated-package "python2-kivy-next" python2-kivy))
11068
11069 (define-public python-binaryornot
11070 (package
11071 (name "python-binaryornot")
11072 (version "0.4.4")
11073 (source (origin
11074 (method url-fetch)
11075 (uri (pypi-uri "binaryornot" version))
11076 (sha256
11077 (base32
11078 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11079 (build-system python-build-system)
11080 (arguments
11081 `(#:phases
11082 (modify-phases %standard-phases
11083 (add-after 'unpack 'patch-tests
11084 (lambda _
11085 ;; TypeError: binary() got an unexpected keyword argument
11086 ;; 'average_size'.
11087 (substitute* "tests/test_check.py"
11088 (("average_size=512") ""))
11089 #t)))))
11090 (propagated-inputs
11091 `(("python-chardet" ,python-chardet)
11092 ("python-hypothesis" ,python-hypothesis)))
11093 (home-page "https://github.com/audreyr/binaryornot")
11094 (synopsis "Package to check if a file is binary or text")
11095 (description "Ultra-lightweight pure Python package to check if a file is
11096 binary or text.")
11097 (license license:bsd-3)
11098 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11099
11100 (define-public python2-binaryornot
11101 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11102 (package (inherit base)
11103 (propagated-inputs
11104 `(("python2-enum34" ,python2-enum34)
11105 ,@(package-propagated-inputs base))))))
11106
11107 (define-public python-binwalk
11108 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11109 (revision "0"))
11110 (package
11111 (name "python-binwalk")
11112 (version (git-version "2.1.1" revision commit))
11113 (source
11114 (origin
11115 (method git-fetch)
11116 (uri (git-reference
11117 (url "https://github.com/ReFirmLabs/binwalk")
11118 (commit commit)))
11119 (file-name (git-file-name name version))
11120 (sha256
11121 (base32
11122 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11123 (build-system python-build-system)
11124 (arguments
11125 `(#:phases
11126 (modify-phases %standard-phases
11127 (add-before 'check 'set-pythonpath
11128 (lambda _
11129 (setenv "PYTHONPATH"
11130 (string-append
11131 (getcwd) "/src/"
11132 ":" (getenv "PYTHONPATH")))
11133 (setenv "HOME" "")
11134 #t)))))
11135 (native-inputs
11136 `(("python-coverage" ,python-coverage)
11137 ("python-nose" ,python-nose)))
11138 (home-page "https://github.com/ReFirmLabs/binwalk")
11139 (synopsis "Firmware analysis tool")
11140 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11141 (license license:expat))))
11142
11143 (define-public python-nltk
11144 (package
11145 (name "python-nltk")
11146 (version "3.2.1")
11147 (source (origin
11148 (method url-fetch)
11149 (uri (pypi-uri "nltk" version))
11150 (sha256
11151 (base32
11152 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11153 (build-system python-build-system)
11154 (arguments
11155 '(;; The tests require some extra resources to be downloaded.
11156 ;; TODO Try packaging these resources.
11157 #:tests? #f))
11158 (home-page "http://nltk.org/")
11159 (synopsis "Natural Language Toolkit")
11160 (description "It provides interfaces to over 50 corpora and lexical
11161 resources such as WordNet, along with a suite of text processing libraries
11162 for classification, tokenization, stemming, tagging, parsing, and semantic
11163 reasoning, wrappers for natural language processing libraries.")
11164 (license license:asl2.0)))
11165
11166 (define-public python2-nltk
11167 (package-with-python2 python-nltk))
11168
11169 (define-public python-pymongo
11170 (package
11171 (name "python-pymongo")
11172 (version "3.7.2")
11173 (source (origin
11174 (method url-fetch)
11175 (uri (pypi-uri "pymongo" version))
11176 (sha256
11177 (base32
11178 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11179 (build-system python-build-system)
11180 (propagated-inputs
11181 `(("python-certifi" ,python-certifi)))
11182 (home-page "https://github.com/mongodb/mongo-python-driver")
11183 (synopsis "Python driver for MongoDB")
11184 (description "Python driver for MongoDB.")
11185 (license license:asl2.0)))
11186
11187 (define-public python2-pymongo
11188 (package-with-python2 python-pymongo))
11189
11190 (define-public python-consul
11191 (package
11192 (name "python-consul")
11193 (version "0.6.1")
11194 (source
11195 (origin
11196 (method url-fetch)
11197 (uri (pypi-uri "python-consul" version))
11198 (sha256
11199 (base32
11200 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11201 (build-system python-build-system)
11202 (arguments
11203 '(#:tests? #f)) ; The tests are not distributed
11204 (propagated-inputs
11205 `(("python-requests" ,python-requests)
11206 ("python-six" ,python-six)))
11207 (home-page "https://github.com/cablehead/python-consul")
11208 (synopsis "Python client for Consul")
11209 (description
11210 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11211 discovery, monitoring and configuration.")
11212 (license license:expat)))
11213
11214 (define-public python2-consul
11215 (package-with-python2 python-consul))
11216
11217 (define-public python-schematics
11218 (package
11219 (name "python-schematics")
11220 (version "1.1.1")
11221 (source
11222 (origin
11223 (method git-fetch)
11224 (uri (git-reference
11225 (url "https://github.com/schematics/schematics.git")
11226 (commit (string-append "v" version))))
11227 (file-name (git-file-name name version))
11228 (sha256
11229 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11230 (build-system python-build-system)
11231 (propagated-inputs
11232 `(("python-six" ,python-six)))
11233 (arguments
11234 ;; The tests require a bunch of not very nice packages with fixed
11235 ;; version requirements (e.g. python-coveralls).
11236 `(#:tests? #f))
11237 (home-page "https://github.com/schematics/schematics")
11238 (synopsis "Python Data Structures for Humans")
11239 (description "Python Data Structures for Humans.")
11240 (license license:bsd-3)))
11241
11242 (define-public python2-schematics
11243 (package-with-python2 python-schematics))
11244
11245 (define-public python-odfpy
11246 (package
11247 (name "python-odfpy")
11248 (version "1.3.3")
11249 (source (origin
11250 (method url-fetch)
11251 (uri (pypi-uri "odfpy" version))
11252 (sha256
11253 (base32
11254 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11255 (arguments
11256 `(#:modules ((srfi srfi-1)
11257 (guix build python-build-system)
11258 (guix build utils))
11259 #:phases
11260 (modify-phases %standard-phases
11261 (replace 'check
11262 ;; The test runner invokes python2 and python3 for test*.py.
11263 ;; To avoid having both in inputs, we replicate it here.
11264 (lambda _
11265 (for-each (lambda (test-file) (invoke "python" test-file))
11266 (find-files "tests" "^test.*\\.py$"))
11267 #t)))))
11268 (build-system python-build-system)
11269 (home-page "https://github.com/eea/odfpy")
11270 (synopsis "Python API and tools to manipulate OpenDocument files")
11271 (description "Collection of libraries and utility programs written in
11272 Python to manipulate OpenDocument 1.2 files.")
11273 (license
11274 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11275 ;; number of files with other licenses.
11276 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11277
11278 (define-public python2-odfpy
11279 (package-with-python2 python-odfpy))
11280
11281 (define-public python-natsort
11282 (package
11283 (name "python-natsort")
11284 (version "5.4.1")
11285 (source (origin
11286 (method url-fetch)
11287 (uri (pypi-uri "natsort" version))
11288 (sha256
11289 (base32
11290 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11291 (build-system python-build-system)
11292 (arguments
11293 `(#:modules ((guix build utils)
11294 (guix build python-build-system)
11295 (srfi srfi-1)
11296 (srfi srfi-26)
11297 (ice-9 ftw))
11298 #:phases
11299 (modify-phases %standard-phases
11300 (add-before 'check 'set-cachedir
11301 ;; Tests require write access to $HOME by default
11302 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11303 (replace 'check
11304 (lambda _
11305 (let ((cwd (getcwd)))
11306 (setenv "PYTHONPATH"
11307 (string-append
11308 cwd "/build/"
11309 (find (cut string-prefix? "lib" <>)
11310 (scandir (string-append cwd "/build")))
11311 ":"
11312 (getenv "PYTHONPATH")))
11313 (invoke "pytest" "-v")))))))
11314 (native-inputs
11315 `(("python-hypothesis" ,python-hypothesis)
11316 ("python-pytest-cov" ,python-pytest-cov)
11317 ("python-pytest-mock" ,python-pytest-mock)
11318 ("python-pytest" ,python-pytest)))
11319 (propagated-inputs ; TODO: Add python-fastnumbers.
11320 `(("python-pyicu" ,python-pyicu)))
11321 (home-page "https://github.com/SethMMorton/natsort")
11322 (synopsis "Natural sorting for python and shell")
11323 (description
11324 "Natsort lets you apply natural sorting on lists instead of
11325 lexicographical. If you use the built-in @code{sorted} method in python
11326 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11327 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11328 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11329 identifies numbers and sorts them separately from strings. It can also sort
11330 version numbers, real numbers, mixed types and more, and comes with a shell
11331 command @command{natsort} that exposes this functionality in the command line.")
11332 (license license:expat)
11333 (properties `((python2-variant . ,(delay python2-natsort))))))
11334
11335 (define-public python2-natsort
11336 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11337 (package (inherit base)
11338 (native-inputs
11339 `(("python2-pathlib" ,python2-pathlib)
11340 ,@(package-native-inputs base))))))
11341
11342 (define-public python-glances
11343 (package
11344 (name "python-glances")
11345 (version "3.1.2")
11346 (source
11347 (origin
11348 (method url-fetch)
11349 (uri (pypi-uri "Glances" version))
11350 (sha256
11351 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
11352 (modules '((guix build utils)))
11353 (snippet
11354 '(begin
11355 ;; Glances phones PyPI for weekly update checks by default.
11356 ;; Disable these. The user can re-enable them if desired.
11357 (substitute* "glances/outdated.py"
11358 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11359 (string-append indentation
11360 "self.args.disable_check_update = True\n"
11361 line)))
11362 #t))))
11363 (build-system python-build-system)
11364 (propagated-inputs
11365 `(("python-future" ,python-future)
11366 ("python-psutil" ,python-psutil)))
11367 (home-page "https://github.com/nicolargo/glances")
11368 (synopsis "Cross-platform curses-based monitoring tool")
11369 (description
11370 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11371 Glances uses the PsUtil library to get information from your system. It
11372 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11373 (license license:lgpl3+)))
11374
11375 (define-public python2-glances
11376 (package-with-python2 python-glances))
11377
11378 (define-public python-graphql-core
11379 (package
11380 (name "python-graphql-core")
11381 (version "0.5.3")
11382 (source
11383 (origin
11384 (method url-fetch)
11385 (uri (pypi-uri "graphql-core" version))
11386 (sha256
11387 (base32
11388 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11389 (build-system python-build-system)
11390 (arguments
11391 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11392 #:phases
11393 (modify-phases %standard-phases
11394 (add-after 'unpack 'patch-hardcoded-version
11395 (lambda _ (substitute*
11396 "setup.py"
11397 (("'gevent==1.1rc1'") "'gevent'"))
11398 #t)))))
11399 (native-inputs
11400 `(("python-gevent" ,python-gevent)
11401 ("python-mock" ,python-mock)
11402 ("python-pytest-mock" ,python-pytest-mock)))
11403 (propagated-inputs
11404 `(("python-promise" ,python-promise)
11405 ("python-six" ,python-six)))
11406 (home-page "https://github.com/graphql-python/graphql-core")
11407 (synopsis "GraphQL implementation for Python")
11408 (description
11409 "GraphQL implementation for Python. GraphQL is a data query language and
11410 runtime designed and used to request and deliver data to mobile and web apps.
11411 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11412 to Python.")
11413 (license license:expat)))
11414
11415 (define-public python2-graphql-core
11416 (package-with-python2 python-graphql-core))
11417
11418 (define-public python-graphql-relay
11419 (package
11420 (name "python-graphql-relay")
11421 (version "0.4.5")
11422 (source
11423 (origin
11424 (method url-fetch)
11425 (uri (pypi-uri "graphql-relay" version))
11426 (sha256
11427 (base32
11428 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11429 (build-system python-build-system)
11430 (arguments
11431 '(#:tests? #f)) ; The tests are not distributed
11432 (propagated-inputs
11433 `(("python-graphql-core" ,python-graphql-core)
11434 ("python-promise" ,python-promise)
11435 ("python-six" ,python-six)))
11436 (home-page "https://github.com/graphql-python/graphql-relay-py")
11437 (synopsis "Relay implementation for Python")
11438 (description
11439 "This is a library to allow the easy creation of Relay-compliant servers
11440 using the GraphQL Python reference implementation of a GraphQL server. It
11441 should be noted that the code is a exact port of the original
11442 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11443 from Facebook.")
11444 (license license:expat)))
11445
11446 (define-public python2-graphql-relay
11447 (package-with-python2 python-graphql-relay))
11448
11449 (define-public python-graphene
11450 (package
11451 (name "python-graphene")
11452 (version "0.10.2")
11453 (source
11454 (origin
11455 (method url-fetch)
11456 (uri (pypi-uri "graphene" version))
11457 (sha256
11458 (base32
11459 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11460 (build-system python-build-system)
11461 (propagated-inputs
11462 `(("python-graphql-core" ,python-graphql-core)
11463 ("python-graphql-relay" ,python-graphql-relay)
11464 ("python-iso8601" ,python-iso8601)
11465 ("python-promise" ,python-promise)
11466 ("python-six" ,python-six)))
11467 (arguments
11468 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11469 (home-page "http://graphene-python.org/")
11470 (synopsis "GraphQL Framework for Python")
11471 (description
11472 "Graphene is a Python library for building GraphQL schemas/types.
11473 A GraphQL schema describes your data model, and provides a GraphQL server
11474 with an associated set of resolve methods that know how to fetch data.")
11475 (properties `((python2-variant . ,(delay python2-graphene))))
11476 (license license:expat)))
11477
11478 (define-public python2-graphene
11479 (let ((base (package-with-python2
11480 (strip-python2-variant python-graphene))))
11481 (package (inherit base)
11482 (native-inputs
11483 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11484 ,@(package-native-inputs base))))))
11485
11486 (define-public python-nautilus
11487 (package
11488 (name "python-nautilus")
11489 (version "0.4.9")
11490 (source
11491 (origin
11492 (method url-fetch)
11493 (uri (pypi-uri "nautilus" version))
11494 (sha256
11495 (base32
11496 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11497 (build-system python-build-system)
11498 (arguments `(#:tests? #f)) ; fails to import test modules
11499 (propagated-inputs
11500 `(("python-bcrypt" ,python-bcrypt)
11501 ("python-click" ,python-click)
11502 ("python-consul" ,python-consul)
11503 ("python-graphene" ,python-graphene)
11504 ("python-jinja2" ,python-jinja2)
11505 ("python-peewee" ,python-peewee)
11506 ("python-pika" ,python-pika)
11507 ("python-tornado" ,python-tornado)
11508 ("python-wtforms" ,python-wtforms)))
11509 (native-inputs
11510 `(("python-nose2" ,python-nose2)))
11511 (home-page "https://github.com/AlecAivazis/nautilus")
11512 (synopsis "Library for creating microservice applications")
11513 (description
11514 "Nautilus is a framework for flux based microservices that looks to
11515 provide extendible implementations of common aspects of a cloud so that you can
11516 focus on building massively scalable web applications.")
11517 (license license:expat)))
11518
11519 (define-public python-snowballstemmer
11520 (package
11521 (name "python-snowballstemmer")
11522 (version "1.2.1")
11523 (source (origin
11524 (method url-fetch)
11525 (uri (pypi-uri "snowballstemmer" version))
11526 (sha256
11527 (base32
11528 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11529 (build-system python-build-system)
11530 (arguments
11531 `(;; No tests exist
11532 #:tests? #f))
11533 (home-page "https://github.com/shibukawa/snowball_py")
11534 (synopsis "Snowball stemming library collection for Python")
11535 (description "This package provides 16 word stemmer algorithms generated
11536 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11537 English stemmer.")
11538 (license license:bsd-3)))
11539
11540 (define-public python2-snowballstemmer
11541 (package-with-python2 python-snowballstemmer))
11542
11543 (define-public python-setproctitle
11544 (package
11545 (name "python-setproctitle")
11546 (version "1.1.10")
11547 (source
11548 (origin
11549 (method url-fetch)
11550 (uri (pypi-uri "setproctitle" version))
11551 (sha256
11552 (base32
11553 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11554 (build-system python-build-system)
11555 (arguments
11556 '(#:phases
11557 (modify-phases %standard-phases
11558 (add-before 'check 'patch-Makefile
11559 ;; Stricly this is only required for the python2 variant.
11560 ;; But adding a phase in an inherited package seems to be
11561 ;; cumbersum. So we patch even for python3.
11562 (lambda _
11563 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11564 (when nose
11565 (substitute* "Makefile"
11566 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11567 (string-append nose "/bin/nosetests "))))
11568 #t)))
11569 (replace 'check
11570 (lambda _
11571 (setenv "PYTHON" (or (which "python3") (which "python")))
11572 (setenv "PYCONFIG" (or (which "python3-config")
11573 (which "python-config")))
11574 (setenv "CC" "gcc")
11575 ;; No need to extend PYTHONPATH to find the built package, since
11576 ;; the Makefile will build anyway
11577 (invoke "make" "check"))))))
11578 (native-inputs
11579 `(("procps" ,procps))) ; required for tests
11580 (home-page
11581 "https://github.com/dvarrazzo/py-setproctitle")
11582 (synopsis
11583 "Setproctitle implementation for Python to customize the process title")
11584 (description "The library allows a process to change its title (as displayed
11585 by system tools such as ps and top).
11586
11587 Changing the title is mostly useful in multi-process systems, for
11588 example when a master process is forked: changing the children's title
11589 allows to identify the task each process is busy with. The technique
11590 is used by PostgreSQL and the OpenSSH Server for example.")
11591 (license license:bsd-3)
11592 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11593
11594 (define-public python2-setproctitle
11595 (let ((base (package-with-python2
11596 (strip-python2-variant python-setproctitle))))
11597 (package
11598 (inherit base)
11599 (native-inputs `(("python2-nose" ,python2-nose)
11600 ,@(package-native-inputs base))))))
11601
11602 (define-public python-validictory
11603 (package
11604 (name "python-validictory")
11605 (version "1.0.1")
11606 (source
11607 (origin
11608 (method url-fetch)
11609 (uri (pypi-uri "validictory" version))
11610 (sha256
11611 (base32
11612 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11613 (build-system python-build-system)
11614 (arguments
11615 '(#:phases
11616 (modify-phases %standard-phases
11617 (add-after 'unpack 'bootstrap
11618 ;; Move the tests out of the package directory to avoid
11619 ;; packaging them.
11620 (lambda* _
11621 (rename-file "validictory/tests" "tests")
11622 (delete-file "tests/__init__.py")))
11623 (replace 'check
11624 (lambda _
11625 ;; Extend PYTHONPATH so the built package will be found.
11626 (setenv "PYTHONPATH"
11627 (string-append (getcwd) "/build/lib:"
11628 (getenv "PYTHONPATH")))
11629 (invoke "py.test" "-vv" ))))))
11630 (native-inputs
11631 `(("python-pytest" ,python-pytest)))
11632 (home-page
11633 "https://github.com/jamesturk/validictory")
11634 (synopsis "General purpose Python data validator")
11635 (description "It allows validation of arbitrary Python data structures.
11636
11637 The schema format is based on the JSON Schema
11638 proposal (http://json-schema.org), so combined with json the library is also
11639 useful as a validator for JSON data.")
11640 (license license:expat)))
11641
11642 (define-public python2-validictory
11643 (package-with-python2 python-validictory))
11644
11645 (define-public python-pyelftools
11646 (package
11647 (name "python-pyelftools")
11648 (version "0.25")
11649 (source
11650 (origin
11651 (method url-fetch)
11652 (uri (pypi-uri "pyelftools" version))
11653 (sha256
11654 (base32
11655 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11656 (build-system python-build-system)
11657 (arguments
11658 `(#:phases
11659 (modify-phases %standard-phases
11660 (add-before 'check 'set-pythonpath
11661 (lambda _
11662 (setenv "PYTHONPATH"
11663 (string-append
11664 (getcwd) "/test/"
11665 ":" (getenv "PYTHONPATH")))
11666 #t)))))
11667 (home-page
11668 "https://github.com/eliben/pyelftools")
11669 (synopsis
11670 "Analyze binary and library file information")
11671 (description "This Python library provides interfaces for parsing and
11672 analyzing two binary and library file formats; the Executable and Linking
11673 Format (ELF), and debugging information in the Debugging With Attributed
11674 Record Format (DWARF).")
11675 (license license:public-domain)))
11676
11677 (define-public python-pyev
11678 (package
11679 (name "python-pyev")
11680 (version "0.9.0")
11681 (source
11682 (origin
11683 (method url-fetch)
11684 (uri (pypi-uri "pyev" version))
11685 (sha256
11686 (base32
11687 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11688 (build-system python-build-system)
11689 (arguments
11690 `(#:tests? #f ; no test suite
11691 #:phases
11692 (modify-phases %standard-phases
11693 (add-after 'unpack 'patch
11694 (lambda* (#:key inputs #:allow-other-keys)
11695 (let ((libev (string-append (assoc-ref inputs "libev")
11696 "/lib/libev.so.4")))
11697 (substitute* "setup.py"
11698 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11699 (string-append "libev_dll_name = \"" libev "\"")))))))))
11700 (inputs
11701 `(("libev" ,libev)))
11702 (home-page "http://pythonhosted.org/pyev/")
11703 (synopsis "Python libev interface")
11704 (description "Pyev provides a Python interface to libev.")
11705 (license license:gpl3)))
11706
11707 (define-public python2-pyev
11708 (package-with-python2 python-pyev))
11709
11710 (define-public python-imagesize
11711 (package
11712 (name "python-imagesize")
11713 (version "1.1.0")
11714 (source
11715 (origin
11716 (method url-fetch)
11717 (uri (pypi-uri "imagesize" version))
11718 (sha256
11719 (base32
11720 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11721 (build-system python-build-system)
11722 (home-page "https://github.com/shibukawa/imagesize_py")
11723 (synopsis "Gets image size of files in various formats in Python")
11724 (description
11725 "This package allows determination of image size from
11726 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11727 (license license:expat)))
11728
11729 (define-public python2-imagesize
11730 (package-with-python2 python-imagesize))
11731
11732 (define-public python-termstyle
11733 (package
11734 (name "python-termstyle")
11735 (version "0.1.11")
11736 (source
11737 (origin
11738 (method url-fetch)
11739 (uri (pypi-uri "termstyle" version))
11740 (sha256
11741 (base32
11742 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11743 (build-system python-build-system)
11744 (arguments
11745 '(#:phases
11746 (modify-phases %standard-phases
11747 (replace 'check
11748 (lambda _
11749 (invoke "python" "test3.py"))))))
11750 (home-page "https://github.com/gfxmonk/termstyle")
11751 (synopsis "Console text coloring for Python")
11752 (description "This package provides console text coloring for Python.")
11753 (license license:bsd-3)))
11754
11755 (define-public python-argcomplete
11756 (package
11757 (name "python-argcomplete")
11758 (version "1.10.3")
11759 (source
11760 (origin
11761 (method url-fetch)
11762 (uri (pypi-uri "argcomplete" version))
11763 (sha256
11764 (base32
11765 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
11766 (build-system python-build-system)
11767 (arguments
11768 `(#:phases
11769 (modify-phases %standard-phases
11770 (add-after 'unpack 'embed-tool-references
11771 (lambda _
11772 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11773 ((" grep")
11774 (string-append " " (which "grep")))
11775 ((" egrep")
11776 (string-append " " (which "egrep")))
11777 (("elif which")
11778 (string-append "elif " (which "which")))
11779 (("\\$\\(which")
11780 (string-append "$(" (which "which"))))
11781 #t)))))
11782 (inputs
11783 `(("grep" ,grep)
11784 ("which" ,which)))
11785 (native-inputs
11786 `(("python-coverage" ,python-coverage)
11787 ("python-flake8" ,python-flake8)
11788 ("python-pexpect" ,python-pexpect)
11789 ("python-wheel" ,python-wheel)
11790 ("tcsh" ,tcsh)
11791 ("fish" ,fish)
11792 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11793 (home-page "https://github.com/kislyuk/argcomplete")
11794 (synopsis "Shell tab completion for Python argparse")
11795 (description "argcomplete provides extensible command line tab completion
11796 of arguments and options for Python scripts using @code{argparse}. It's
11797 particularly useful for programs with many options or sub-parsers that can
11798 dynamically suggest completions; for example, when browsing resources over the
11799 network.")
11800 (license license:asl2.0)))
11801
11802 (define-public python2-argcomplete
11803 (package-with-python2 python-argcomplete))
11804
11805 (define-public python-xopen
11806 (package
11807 (name "python-xopen")
11808 (version "0.5.0")
11809 (source
11810 (origin
11811 (method url-fetch)
11812 (uri (pypi-uri "xopen" version))
11813 (sha256
11814 (base32
11815 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11816 (build-system python-build-system)
11817 (propagated-inputs
11818 `(("python-setuptools-scm" ,python-setuptools-scm)))
11819 (home-page "https://github.com/marcelm/xopen/")
11820 (synopsis "Open compressed files transparently")
11821 (description "This module provides an @code{xopen} function that works like
11822 Python's built-in @code{open} function, but can also deal with compressed files.
11823 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11824 recognized by their file extensions. The focus is on being as efficient as
11825 possible on all supported Python versions.")
11826 (license license:expat)))
11827
11828 (define-public python2-xopen
11829 (let ((base (package-with-python2
11830 (strip-python2-variant python-xopen))))
11831 (package
11832 (inherit base)
11833 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11834 ,@(package-propagated-inputs base))))))
11835
11836 (define-public python-cheetah
11837 (package
11838 (name "python-cheetah")
11839 (version "3.1.0")
11840 (source
11841 (origin
11842 (method url-fetch)
11843 (uri (pypi-uri "Cheetah3" version))
11844 (sha256
11845 (base32
11846 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11847 (build-system python-build-system)
11848 (arguments
11849 `(#:modules ((guix build utils)
11850 (guix build python-build-system)
11851 (ice-9 ftw)
11852 (srfi srfi-1)
11853 (srfi srfi-26))
11854 #:phases (modify-phases %standard-phases
11855 (add-after 'unpack 'use-absolute-python
11856 (lambda _
11857 (substitute* "Cheetah/CheetahWrapper.py"
11858 (("#!/usr/bin/env python")
11859 (string-append "#!" (which "python"))))
11860 #t))
11861 (replace 'check
11862 (lambda _
11863 (let ((cwd (getcwd)))
11864 (setenv "PYTHONPATH"
11865 (string-append
11866 cwd "/build/"
11867 (find (cut string-prefix? "lib" <>)
11868 (scandir (string-append cwd "/build")))
11869 ":" (getenv "PYTHONPATH")))
11870 (setenv "PATH"
11871 (string-append (getenv "PATH")
11872 ":" cwd "/bin"))
11873 (setenv "TMPDIR" "/tmp")
11874
11875 (substitute* "Cheetah/Tests/Test.py"
11876 (("unittest.TextTestRunner\\(\\)")
11877 "unittest.TextTestRunner(verbosity=2)"))
11878
11879 (invoke "python" "Cheetah/Tests/Test.py")))))))
11880 (propagated-inputs
11881 `(("python-markdown" ,python-markdown))) ;optional
11882 (home-page "http://cheetahtemplate.org/")
11883 (synopsis "Template engine")
11884 (description "Cheetah is a text-based template engine and Python code
11885 generator.
11886
11887 Cheetah can be used as a standalone templating utility or referenced as
11888 a library from other Python applications. It has many potential uses,
11889 but web developers looking for a viable alternative to ASP, JSP, PHP and
11890 PSP are expected to be its principle user group.
11891
11892 Features:
11893 @enumerate
11894 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11895 text-based format.
11896 @item Cleanly separates content, graphic design, and program code.
11897 @item Blends the power and flexibility of Python with a simple template language
11898 that non-programmers can understand.
11899 @item Gives template writers full access to any Python data structure, module,
11900 function, object, or method in their templates.
11901 @item Makes code reuse easy by providing an object-orientated interface to
11902 templates that is accessible from Python code or other Cheetah templates.
11903 One template can subclass another and selectively reimplement sections of it.
11904 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11905 improve the performance of a dynamic website.
11906 @item Compiles templates into optimized, yet readable, Python code.
11907 @end enumerate")
11908 (license (license:x11-style "file://LICENSE"))))
11909
11910 (define-public python2-cheetah
11911 (package-with-python2 python-cheetah))
11912
11913 (define-public python-dulwich
11914 (package
11915 (name "python-dulwich")
11916 (version "0.18.6")
11917 (source
11918 (origin
11919 (method url-fetch)
11920 (uri (list (string-append "https://www.dulwich.io/releases/"
11921 "dulwich-" version ".tar.gz")
11922 (pypi-uri "dulwich" version)))
11923 (sha256
11924 (base32
11925 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11926 (build-system python-build-system)
11927 (arguments
11928 `(#:phases
11929 (modify-phases %standard-phases
11930 (add-before 'check 'fix-tests
11931 (lambda* (#:key inputs #:allow-other-keys)
11932 ;; The tests use Popen with a custom environment which doesn't
11933 ;; include PATH.
11934 (substitute* "dulwich/tests/compat/utils.py"
11935 (("'git'") (string-append "'"
11936 (which "git")
11937 "'")))
11938 (substitute* '("dulwich/tests/test_repository.py"
11939 "dulwich/tests/test_hooks.py")
11940 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11941 (setenv "TEST_RUNNER" "unittest")
11942 (setenv "PYTHONHASHSEED" "random")
11943 #t)))))
11944 (propagated-inputs
11945 `(("python-fastimport" ,python-fastimport)))
11946 (native-inputs
11947 `(("python-mock" ,python-mock)
11948 ("python-geventhttpclient" ,python-geventhttpclient)
11949 ("git" ,git)))
11950 (home-page "https://www.dulwich.io/")
11951 (synopsis "Git implementation in Python")
11952 (description "Dulwich is an implementation of the Git file formats and
11953 protocols written in pure Python.")
11954 ;; Can be used with either license.
11955 (license (list license:asl2.0 license:gpl2+))))
11956
11957 (define-public python2-dulwich
11958 (package-with-python2 python-dulwich))
11959
11960 (define-public python-pbkdf2
11961 (package
11962 (name "python-pbkdf2")
11963 (version "1.3")
11964 (source
11965 (origin
11966 (method url-fetch)
11967 (uri (pypi-uri "pbkdf2" version))
11968 (sha256
11969 (base32
11970 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11971 (build-system python-build-system)
11972 (arguments
11973 '(#:phases
11974 (modify-phases %standard-phases
11975 (replace 'check
11976 (lambda _
11977 (setenv "PYTHONPATH"
11978 (string-append (getcwd) "/build/lib:"
11979 (getenv "PYTHONPATH")))
11980 (invoke "python" "test/test_pbkdf2.py"))))))
11981 (propagated-inputs
11982 `(("python-pycrypto" ,python-pycrypto))) ; optional
11983 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11984 (synopsis "Password-based key derivation")
11985 (description "This module implements the password-based key derivation
11986 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11987
11988 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11989 is part of the RSA Public Key Cryptography Standards series. The provided
11990 implementation takes a password or a passphrase and a salt value (and
11991 optionally a iteration count, a digest module, and a MAC module) and provides
11992 a file-like object from which an arbitrarly-sized key can be read.")
11993 (license license:expat)))
11994
11995 (define-public python2-pbkdf2
11996 (package-with-python2 python-pbkdf2))
11997
11998 (define-public python-qrcode
11999 (package
12000 (name "python-qrcode")
12001 (version "6.1")
12002 (source
12003 (origin
12004 (method url-fetch)
12005 (uri (pypi-uri "qrcode" version))
12006 (sha256
12007 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12008 (build-system python-build-system)
12009 (arguments
12010 ;; FIXME: Tests require packaging 'pymaging'.
12011 '(#:tests? #f))
12012 (propagated-inputs
12013 `(("python-lxml" ,python-lxml) ; for SVG output
12014 ("python-pillow" ,python-pillow) ; for PNG output
12015 ("python-six" ,python-six)))
12016 (home-page "https://github.com/lincolnloop/python-qrcode")
12017 (synopsis "QR Code image generator")
12018 (description "This package provides a pure Python QR Code generator
12019 module. It uses the Python Imaging Library (PIL) to allow for the generation
12020 of QR Codes.
12021
12022 In addition this package provides a command line tool to generate QR codes and
12023 either write these QR codes to a file or do the output as ascii art at the
12024 console.")
12025 (license license:bsd-3)))
12026
12027 (define-public python2-qrcode
12028 (package-with-python2 python-qrcode))
12029
12030 (define-public python-rst2ansi
12031 (package
12032 (name "python-rst2ansi")
12033 (version "0.1.5")
12034 (source
12035 (origin
12036 (method url-fetch)
12037 (uri (pypi-uri "rst2ansi" version))
12038 (sha256
12039 (base32
12040 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12041 (build-system python-build-system)
12042 (propagated-inputs
12043 `(("python-docutils" ,python-docutils)))
12044 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12045 (synopsis "Convert RST to ANSI-decorated console output")
12046 (description
12047 "Python module dedicated to rendering RST (reStructuredText) documents
12048 to ansi-escaped strings suitable for display in a terminal.")
12049 (license license:expat)))
12050
12051 (define-public python-ansi2html
12052 (package
12053 (name "python-ansi2html")
12054 (version "1.2.0")
12055 (source
12056 (origin
12057 (method url-fetch)
12058 (uri (pypi-uri "ansi2html" version))
12059 (sha256
12060 (base32
12061 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12062 (build-system python-build-system)
12063 (native-inputs
12064 `(("python-mock" ,python-mock)
12065 ("python-nose" ,python-nose)))
12066 (propagated-inputs
12067 `(("python-six" ,python-six)))
12068 (home-page "https://github.com/ralphbean/ansi2html")
12069 (synopsis "Convert ANSI-decorated console output to HTML")
12070 (description
12071 "@command{ansi2html} is a Python library and command line utility for
12072 convering text with ANSI color codes to HTML or LaTeX.")
12073 (license license:gpl3+)))
12074
12075 (define-public python2-ansi2html
12076 (package-with-python2 python-ansi2html))
12077
12078 (define-public python-ddt
12079 (package
12080 (name "python-ddt")
12081 (version "1.1.3")
12082 (source
12083 (origin
12084 (method url-fetch)
12085 (uri (pypi-uri "ddt" version))
12086 (sha256
12087 (base32
12088 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12089 (build-system python-build-system)
12090 (native-inputs
12091 `(("python-mock" ,python-mock)
12092 ("python-nose" ,python-nose)))
12093 (propagated-inputs
12094 `(("python-six" ,python-six)
12095 ("python-pyyaml" ,python-pyyaml)))
12096 (home-page "https://github.com/txels/ddt")
12097 (synopsis "Data-Driven Tests")
12098 (description
12099 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12100 running it with different test data, and make it appear as multiple test
12101 cases.")
12102 (license license:expat)))
12103
12104 (define-public python2-ddt
12105 (package-with-python2 python-ddt))
12106
12107 (define-public python-pycountry
12108 (package
12109 (name "python-pycountry")
12110 (version "18.5.26")
12111 (source
12112 (origin
12113 (method url-fetch)
12114 (uri (pypi-uri "pycountry" version))
12115 (sha256
12116 (base32
12117 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12118 (build-system python-build-system)
12119 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12120 (synopsis "ISO databases for languages, countries, currencies, etc.")
12121 (description
12122 "@code{pycountry} provides the ISO databases for the standards:
12123 @enumerate
12124 @item 639-3 (Languages)
12125 @item 3166 (Countries)
12126 @item 3166-3 (Deleted Countries)
12127 @item 3166-2 (Subdivisions of countries)
12128 @item 4217 (Currencies)
12129 @item 15924 (Scripts)
12130 @end enumerate
12131 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12132 through a Python API.")
12133 (license license:lgpl2.1+)))
12134
12135 (define-public python2-pycountry
12136 (package-with-python2 python-pycountry))
12137
12138 (define-public python-pycosat
12139 (package
12140 (name "python-pycosat")
12141 (version "0.6.1")
12142 (source
12143 (origin
12144 (method url-fetch)
12145 (uri (pypi-uri "pycosat" version))
12146 (sha256
12147 (base32
12148 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12149 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12150 (build-system python-build-system)
12151 (home-page "https://github.com/ContinuumIO/pycosat")
12152 (synopsis "Bindings to picosat (a SAT solver)")
12153 (description
12154 "This package provides efficient Python bindings to @code{picosat} on
12155 the C level. When importing pycosat, the @code{picosat} solver becomes part
12156 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12157 Problem} (SAT) solver.")
12158 (license license:expat)))
12159
12160 (define-public python2-pycosat
12161 (package-with-python2 python-pycosat))
12162
12163 (define-public python2-ruamel.ordereddict
12164 (package
12165 (name "python2-ruamel.ordereddict")
12166 (version "0.4.9")
12167 (source
12168 (origin
12169 (method url-fetch)
12170 (uri (pypi-uri "ruamel.ordereddict" version))
12171 (sha256
12172 (base32
12173 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12174 (build-system python-build-system)
12175 (arguments
12176 `(#:python ,python-2
12177 #:phases
12178 (modify-phases %standard-phases
12179 (delete 'check)
12180 (add-after 'install 'check
12181 (lambda* (#:key inputs outputs #:allow-other-keys)
12182 (add-installed-pythonpath inputs outputs)
12183 (invoke "python" "test/testordereddict.py"))))))
12184 (home-page "https://bitbucket.org/ruamel/ordereddict")
12185 (synopsis "Version of dict that keeps keys in insertion order")
12186 (description
12187 "This is an implementation of an ordered dictionary with @dfn{Key
12188 Insertion Order} (KIO: updates of values do not affect the position of the
12189 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12190 removed and put at the back). The standard library module @code{OrderedDict},
12191 implemented later, implements a subset of @code{ordereddict} functionality.
12192 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12193 Order} (KSO, no sorting function can be specified, but a transform can be
12194 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12195 (license license:expat)))
12196
12197 (define-public python-pypeg2
12198 (package
12199 (name "python-pypeg2")
12200 (version "2.15.2")
12201 (source
12202 (origin
12203 (method url-fetch)
12204 (uri (pypi-uri "pyPEG2" version))
12205 (sha256
12206 (base32
12207 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12208 (build-system python-build-system)
12209 (propagated-inputs `(("python-lxml" ,python-lxml)))
12210 (arguments
12211 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12212 '(#:tests? #f))
12213 (home-page "https://fdik.org/pyPEG/")
12214 (synopsis "Parsering Expression Grammars in Python")
12215 (description "PyPEG is an intrinsic parser interpreter framework for
12216 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12217 parse many formal languages.")
12218 (license license:gpl2)))
12219
12220 (define-public python-incremental
12221 (package
12222 (name "python-incremental")
12223 (version "17.5.0")
12224 (source
12225 (origin
12226 (method url-fetch)
12227 (uri (pypi-uri "incremental" version))
12228 (sha256
12229 (base32
12230 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12231 (build-system python-build-system)
12232 (home-page "https://github.com/hawkowl/incremental")
12233 (synopsis "Library for versioning Python projects")
12234 (description "Incremental is a small library that versions your Python
12235 projects.")
12236 (license license:expat)))
12237
12238 (define-public python2-incremental
12239 (package-with-python2 python-incremental))
12240
12241 (define-public python-invoke
12242 (package
12243 (name "python-invoke")
12244 (home-page "http://www.pyinvoke.org/")
12245 (version "1.3.0")
12246 (source (origin
12247 (method url-fetch)
12248 (uri (pypi-uri "invoke" version))
12249 (sha256
12250 (base32
12251 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12252 (build-system python-build-system)
12253 (arguments
12254 ;; XXX: Requires many dependencies that are not yet in Guix.
12255 `(#:tests? #f))
12256 (synopsis "Pythonic task execution")
12257 (description
12258 "Invoke is a Python task execution tool and library, drawing inspiration
12259 from various sources to arrive at a powerful and clean feature set. It is
12260 evolved from the Fabric project, but focuses on local and abstract concerns
12261 instead of servers and network commands.")
12262 (license license:bsd-3)))
12263
12264 (define-public python2-invoke
12265 (package-with-python2 python-invoke))
12266
12267 (define-public python-automat
12268 (package
12269 (name "python-automat")
12270 (version "0.7.0")
12271 (source (origin
12272 (method url-fetch)
12273 (uri (pypi-uri "Automat" version))
12274 (sha256
12275 (base32
12276 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12277 (build-system python-build-system)
12278 ;; We disable the tests because they require python-twisted, while
12279 ;; python-twisted depends on python-automat. Twisted is optional, but the
12280 ;; tests fail if it is not available. Also see
12281 ;; <https://github.com/glyph/automat/issues/71>.
12282 (arguments '(#:tests? #f))
12283 (native-inputs
12284 `(("python-m2r" ,python-m2r)
12285 ("python-setuptools-scm" ,python-setuptools-scm)
12286 ("python-graphviz" ,python-graphviz)))
12287 (propagated-inputs
12288 `(("python-six" ,python-six)
12289 ("python-attrs" ,python-attrs)))
12290 (home-page "https://github.com/glyph/Automat")
12291 (synopsis "Self-service finite-state machines")
12292 (description "Automat is a library for concise, idiomatic Python
12293 expression of finite-state automata (particularly deterministic finite-state
12294 transducers).")
12295 (license license:expat)))
12296
12297 (define-public python2-automat
12298 (package-with-python2 python-automat))
12299
12300 (define-public python-m2r
12301 (package
12302 (name "python-m2r")
12303 (version "0.2.1")
12304 (source (origin
12305 (method url-fetch)
12306 (uri (pypi-uri "m2r" version))
12307 (sha256
12308 (base32
12309 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12310 (build-system python-build-system)
12311 (propagated-inputs
12312 `(("python-docutils" ,python-docutils)
12313 ("python-mistune" ,python-mistune)))
12314 (native-inputs
12315 `(("python-pygments" ,python-pygments)
12316 ("python-mock" ,python-mock)))
12317 (home-page "https://github.com/miyakogi/m2r")
12318 (synopsis "Markdown to reStructuredText converter")
12319 (description "M2R converts a markdown file including reST markups to valid
12320 reST format.")
12321 (license license:expat)))
12322
12323 (define-public python2-m2r
12324 (package-with-python2 python-m2r))
12325
12326 (define-public python-constantly
12327 (package
12328 (name "python-constantly")
12329 (version "15.1.0")
12330 (source (origin
12331 (method url-fetch)
12332 (uri (pypi-uri "constantly" version))
12333 (sha256
12334 (base32
12335 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12336 (build-system python-build-system)
12337 (home-page "https://github.com/twisted/constantly")
12338 (synopsis "Symbolic constants in Python")
12339 (description "Constantly is a Python library that provides symbolic
12340 constant support. It includes collections and constants with text, numeric,
12341 and bit flag values.")
12342 (license license:expat)))
12343
12344 (define-public python2-constantly
12345 (package-with-python2 python-constantly))
12346
12347 (define-public python-attrs
12348 (package
12349 (name "python-attrs")
12350 (version "19.1.0")
12351 (source (origin
12352 (method url-fetch)
12353 (uri (pypi-uri "attrs" version))
12354 (sha256
12355 (base32
12356 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12357 (build-system python-build-system)
12358 (arguments
12359 `(#:modules ((guix build utils)
12360 (guix build python-build-system)
12361 (ice-9 ftw)
12362 (srfi srfi-1)
12363 (srfi srfi-26))
12364 #:phases (modify-phases %standard-phases
12365 (replace 'check
12366 (lambda _
12367 (let ((cwd (getcwd)))
12368 (setenv "PYTHONPATH"
12369 (string-append
12370 cwd "/build/"
12371 (find (cut string-prefix? "lib" <>)
12372 (scandir (string-append cwd "/build")))
12373 ":"
12374 (getenv "PYTHONPATH")))
12375 (invoke "python" "-m" "pytest")))))))
12376 (native-inputs
12377 `(("python-coverage" ,python-coverage)
12378 ("python-hypothesis" ,python-hypothesis)
12379 ("python-pympler" ,python-pympler)
12380 ("python-pytest" ,python-pytest)
12381 ("python-six" ,python-six)
12382 ("python-sphinx" ,python-sphinx)
12383 ("python-zope-interface" ,python-zope-interface)))
12384 (home-page "https://github.com/python-attrs/attrs/")
12385 (synopsis "Attributes without boilerplate")
12386 (description "@code{attrs} is a Python package with class decorators that
12387 ease the chores of implementing the most common attribute-related object
12388 protocols.")
12389 (license license:expat)))
12390
12391 (define-public python2-attrs
12392 (package-with-python2 python-attrs))
12393
12394 (define-public python-attrs-bootstrap
12395 (package
12396 (inherit python-attrs)
12397 (name "python-attrs-bootstrap")
12398 (native-inputs `())
12399 (arguments `(#:tests? #f))))
12400
12401 (define-public python2-attrs-bootstrap
12402 (package-with-python2 python-attrs-bootstrap))
12403
12404 (define-public python2-cliapp
12405 (package
12406 (name "python2-cliapp")
12407 (version "1.20180812.1")
12408 (source
12409 (origin
12410 (method url-fetch)
12411 (uri (string-append
12412 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12413 version ".tar.gz"))
12414 (sha256
12415 (base32
12416 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12417 (build-system python-build-system)
12418 (arguments
12419 `(#:python ,python-2
12420 #:phases
12421 (modify-phases %standard-phases
12422 ;; check phase needs to be run before the build phase. If not,
12423 ;; coverage-test-runner looks for tests for the built source files,
12424 ;; and fails.
12425 (delete 'check)
12426 (add-before 'build 'check
12427 (lambda _
12428 ;; Disable python3 tests
12429 (substitute* "check"
12430 (("python3") "# python3"))
12431 (invoke "./check"))))))
12432 (native-inputs
12433 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12434 ("python2-pep8" ,python2-pep8)))
12435 (propagated-inputs
12436 `(("python2-pyaml" ,python2-pyaml)))
12437 (home-page "https://liw.fi/cliapp/")
12438 (synopsis "Python framework for command line programs")
12439 (description "@code{python2-cliapp} is a python framework for
12440 command line programs. It contains the typical stuff such programs
12441 need to do, such as parsing the command line for options, and
12442 iterating over input files.")
12443 (license license:gpl2+)))
12444
12445 (define-public python2-ttystatus
12446 (package
12447 (name "python2-ttystatus")
12448 (version "0.36")
12449 (source
12450 (origin
12451 (method url-fetch)
12452 (uri (string-append
12453 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12454 version ".tar.gz"))
12455 (sha256
12456 (base32
12457 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12458 (build-system python-build-system)
12459 (native-inputs
12460 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12461 ("python2-pep8" ,python2-pep8)))
12462 (arguments
12463 `(#:python ,python-2
12464 #:phases
12465 (modify-phases %standard-phases
12466 ;; check phase needs to be run before the build phase. If not,
12467 ;; coverage-test-runner looks for tests for the built source files,
12468 ;; and fails.
12469 (delete 'check)
12470 (add-before 'build 'check
12471 (lambda _ (invoke "make" "check"))))))
12472 (home-page "https://liw.fi/ttystatus/")
12473 (synopsis "Python library for showing progress reporting and
12474 status updates on terminals")
12475 (description "@code{python2-ttystatus} is a python library for
12476 showing progress reporting and status updates on terminals, for
12477 command line programs. Output is automatically adapted to the width
12478 of the terminal: truncated if it does not fit, and resized if the
12479 terminal size changes.")
12480 (license license:gpl3+)))
12481
12482 (define-public python2-tracing
12483 (package
12484 (name "python2-tracing")
12485 (version "0.10")
12486 (source
12487 (origin
12488 (method url-fetch)
12489 (uri (string-append
12490 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12491 version ".tar.gz"))
12492 (sha256
12493 (base32
12494 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12495 (build-system python-build-system)
12496 (arguments
12497 `(#:python ,python-2))
12498 (home-page "https://liw.fi/tracing/")
12499 (synopsis "Python debug logging helper")
12500 (description "@code{python2-tracing} is a python library for
12501 logging debug messages. It provides a way to turn debugging messages
12502 on and off, based on the filename they occur in. It is much faster
12503 than using @code{logging.Filter} to accomplish the same thing, which
12504 matters when code is run in production mode. The actual logging still
12505 happens using the @code{logging} library.")
12506 (license license:gpl3+)))
12507
12508 (define-public python2-larch
12509 (package
12510 (name "python2-larch")
12511 (version "1.20151025")
12512 (source
12513 (origin
12514 (method url-fetch)
12515 (uri (string-append
12516 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12517 version ".tar.gz"))
12518 (patches (search-patches
12519 "python2-larch-coverage-4.0a6-compatibility.patch"))
12520 (sha256
12521 (base32
12522 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12523 (build-system python-build-system)
12524 (arguments
12525 `(#:python ,python-2
12526 #:phases
12527 (modify-phases %standard-phases
12528 ;; check phase needs to be run before the build phase. If not,
12529 ;; coverage-test-runner looks for tests for the built source files,
12530 ;; and fails.
12531 (delete 'check)
12532 (add-before 'build 'check
12533 (lambda _ (invoke "make" "check"))))))
12534 (native-inputs
12535 `(("cmdtest" ,cmdtest)
12536 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12537 (propagated-inputs
12538 `(("python2-tracing" ,python2-tracing)))
12539 (home-page "https://liw.fi/larch/")
12540 (synopsis "Python copy-on-write B-tree library")
12541 (description "@code{python2-larch} is an implementation of
12542 particular kind of B-tree, based on research by Ohad Rodeh. See
12543 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12544 on the data structure.
12545
12546 The distinctive feature of this B-tree is that a node is never
12547 (conceptually) modified. Instead, all updates are done by
12548 copy-on-write. This makes it easy to clone a tree, and modify only the
12549 clone, while other processes access the original tree.")
12550 (license license:gpl3+)))
12551
12552 (define-public python-astroid
12553 (package
12554 (name "python-astroid")
12555 (version "2.3.3")
12556 (source
12557 (origin
12558 (method url-fetch)
12559 (uri (pypi-uri "astroid" version))
12560 (sha256
12561 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
12562 (build-system python-build-system)
12563 (propagated-inputs
12564 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12565 ("python-six" ,python-six)
12566 ("python-typed-ast" ,python-typed-ast)
12567 ("python-wrapt" ,python-wrapt)))
12568 (native-inputs
12569 `(("python-dateutil" ,python-dateutil)
12570 ("python-nose" ,python-nose)
12571 ("python-pytest" ,python-pytest)
12572 ("python-pytest-runner" ,python-pytest-runner)))
12573 (arguments
12574 `(#:phases
12575 (modify-phases %standard-phases
12576 (add-after 'unpack 'remove-spurious-test
12577 (lambda _
12578 ;; This can be removed after upgrading from python-3.7
12579 ;; https://github.com/PyCQA/astroid/issues/593
12580 ;; https://bugs.python.org/issue34056
12581 (delete-file "astroid/tests/unittest_modutils.py")
12582 #t))
12583 (replace 'check
12584 (lambda _
12585 (invoke "pytest" "astroid"))))))
12586 (home-page "https://github.com/PyCQA/astroid")
12587 (synopsis "Common base representation of python source code for pylint and
12588 other projects")
12589 (description "@code{python-astroid} provides a common base representation
12590 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12591
12592 It provides a compatible representation which comes from the _ast module. It
12593 rebuilds the tree generated by the builtin _ast module by recursively walking
12594 down the AST and building an extended ast. The new node classes have
12595 additional methods and attributes for different usages. They include some
12596 support for static inference and local name scopes. Furthermore, astroid
12597 builds partial trees by inspecting living objects.")
12598 (license license:lgpl2.1+)
12599 (properties `((python2-variant . ,(delay python2-astroid))))))
12600
12601 (define-public python2-astroid
12602 (let ((base (package-with-python2
12603 (strip-python2-variant python-astroid))))
12604 (package (inherit base)
12605 ;; Version 2.x removes python2 support.
12606 (version "1.6.5")
12607 (source
12608 (origin
12609 (method url-fetch)
12610 (uri (pypi-uri "astroid" version))
12611 (sha256
12612 (base32
12613 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12614 (arguments
12615 (substitute-keyword-arguments (package-arguments base)
12616 ((#:phases phases)
12617 `(modify-phases ,phases
12618 (add-after 'unpack 'remove-spurious-test
12619 (lambda _
12620 ;; https://github.com/PyCQA/astroid/issues/276
12621 (delete-file "astroid/tests/unittest_brain.py")
12622 #t))
12623 (replace 'check
12624 (lambda _
12625 (invoke"python" "-m" "unittest" "discover"
12626 "-p" "unittest*.py")))))))
12627 (native-inputs `())
12628 (propagated-inputs
12629 `(("python2-backports-functools-lru-cache"
12630 ,python2-backports-functools-lru-cache)
12631 ("python2-enum34" ,python2-enum34)
12632 ("python2-singledispatch" ,python2-singledispatch)
12633 ,@(alist-delete "python-typed-ast"
12634 (package-propagated-inputs base)))))))
12635
12636 (define-public python-isort
12637 (package
12638 (name "python-isort")
12639 (version "4.3.4")
12640 (source
12641 (origin
12642 (method git-fetch)
12643 (uri (git-reference
12644 ;; Tests pass only from the Github sources
12645 (url "https://github.com/timothycrosley/isort")
12646 (commit version)))
12647 (file-name (git-file-name name version))
12648 (sha256
12649 (base32
12650 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12651 (build-system python-build-system)
12652 (native-inputs
12653 `(("python-mock" ,python-mock)
12654 ("python-pytest" ,python-pytest)))
12655 (home-page "https://github.com/timothycrosley/isort")
12656 (synopsis "Python utility/library to sort python imports")
12657 (description "@code{python-isort} is a python utility/library to sort
12658 imports alphabetically, and automatically separated into sections. It
12659 provides a command line utility, a python library and plugins for various
12660 editors.")
12661 (license license:expat)
12662 (properties `((python2-variant . ,(delay python2-isort))))))
12663
12664 (define-public python2-isort
12665 (let ((base (package-with-python2
12666 (strip-python2-variant python-isort))))
12667 (package (inherit base)
12668 (native-inputs
12669 `(("python2-futures" ,python2-futures)
12670 ,@(package-native-inputs base))))))
12671
12672 (define-public python2-backports-functools-lru-cache
12673 (package
12674 (name "python2-backports-functools-lru-cache")
12675 (version "1.5")
12676 (source
12677 (origin
12678 (method url-fetch)
12679 ;; only the pypi tarballs contain the necessary metadata
12680 (uri (pypi-uri "backports.functools_lru_cache" version))
12681 (sha256
12682 (base32
12683 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12684 (build-system python-build-system)
12685 (native-inputs
12686 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12687 (arguments
12688 `(#:python ,python-2))
12689 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12690 (synopsis "Backport of functools.lru_cache from Python 3.3")
12691 (description "@code{python2-backports-functools-lru-cache} is a backport
12692 of @code{functools.lru_cache} from python 3.3.")
12693 (license license:expat)))
12694
12695 (define-public python-configparser
12696 (package
12697 (name "python-configparser")
12698 (version "3.7.1")
12699 (source
12700 (origin
12701 (method url-fetch)
12702 (uri (pypi-uri "configparser" version))
12703 (sha256
12704 (base32
12705 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12706 (build-system python-build-system)
12707 (home-page "https://github.com/jaraco/configparser/")
12708 (synopsis "Backport of configparser from python 3.5")
12709 (description "@code{python-configparser} is a backport of
12710 @code{configparser} from Python 3.5 so that it can be used directly
12711 in other versions.")
12712 (license license:expat)))
12713
12714 (define-public python2-configparser
12715 (package-with-python2 python-configparser))
12716
12717 (define-public python-mando
12718 (package
12719 (name "python-mando")
12720 (version "0.6.4")
12721 (source (origin
12722 (method url-fetch)
12723 (uri (pypi-uri "mando" version))
12724 (sha256
12725 (base32
12726 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12727 (build-system python-build-system)
12728 (propagated-inputs
12729 `(("python-rst2ansi" ,python-rst2ansi)
12730 ("python-six" ,python-six)))
12731 (native-inputs
12732 `(("python-pytest" ,python-pytest)))
12733 (home-page "https://mando.readthedocs.org/")
12734 (synopsis
12735 "Wrapper around argparse, allowing creation of complete CLI applications")
12736 (description
12737 "This package is a wrapper around argparse, allowing you to write complete CLI
12738 applications in seconds while maintaining all the flexibility.")
12739 (license license:expat)))
12740
12741 (define-public python2-mando
12742 (package-with-python2 python-mando))
12743
12744 (define-public python2-argparse
12745 (package
12746 (name "python2-argparse")
12747 (version "1.4.0")
12748 (source
12749 (origin
12750 (method url-fetch)
12751 (uri (pypi-uri "argparse" version))
12752 (sha256
12753 (base32
12754 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12755 (build-system python-build-system)
12756 (arguments
12757 `(#:python ,python-2))
12758 (home-page "https://github.com/ThomasWaldmann/argparse/")
12759 (synopsis "Python command-line parsing library")
12760 (description
12761 "This package is mostly for people who want to have @code{argparse} on
12762 older Pythons because it was not part of the standard library back then.")
12763 (license license:psfl)))
12764
12765 (define-public python-fudge
12766 (package
12767 (name "python-fudge")
12768 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12769 ;; package, which is currently the only use of this package.
12770 (version "0.9.6")
12771 (source
12772 (origin
12773 (method url-fetch)
12774 (uri (pypi-uri "fudge" version))
12775 (sha256
12776 (base32
12777 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12778 (build-system python-build-system)
12779 (arguments
12780 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12781 (home-page "https://github.com/fudge-py/fudge")
12782 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12783 (description
12784 "Fudge is a Python module for using fake objects (mocks and stubs) to
12785 test real ones.
12786
12787 In readable Python code, you declare the methods available on your fake object
12788 and how they should be called. Then you inject that into your application and
12789 start testing. This declarative approach means you don’t have to record and
12790 playback actions and you don’t have to inspect your fakes after running code.
12791 If the fake object was used incorrectly then you’ll see an informative
12792 exception message with a traceback that points to the culprit.")
12793 (license license:expat)))
12794
12795 (define-public python2-fudge
12796 (package-with-python2 python-fudge))
12797
12798 (define-public python-mwclient
12799 (package
12800 (name "python-mwclient")
12801 (version "0.10.0")
12802 (source
12803 (origin
12804 (method git-fetch)
12805 ;; The PyPI version wouldn't contain tests.
12806 (uri (git-reference
12807 (url "https://github.com/mwclient/mwclient")
12808 (commit (string-append "v" version))))
12809 (file-name (git-file-name name version))
12810 (sha256
12811 (base32
12812 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
12813 (build-system python-build-system)
12814 (propagated-inputs
12815 `(("python-requests-oauthlib" ,python-requests-oauthlib)
12816 ("python-six" ,python-six)))
12817 (native-inputs
12818 `(("python-mock" ,python-mock)
12819 ("python-pytest" ,python-pytest)
12820 ("python-pytest-cov" ,python-pytest-cov)
12821 ("python-pytest-runner" ,python-pytest-runner)
12822 ("python-responses" ,python-responses)))
12823 (home-page "https://github.com/btongminh/mwclient")
12824 (synopsis "MediaWiki API client")
12825 (description "This package provides a MediaWiki API client.")
12826 (license license:expat)))
12827
12828 (define-public python2-mwclient
12829 (package-with-python2 python-mwclient))
12830
12831 (define-public python-utils
12832 (package
12833 (name "python-utils")
12834 (version "2.1.0")
12835 (source (origin
12836 (method url-fetch)
12837 (uri (pypi-uri "python-utils" version))
12838 (sha256
12839 (base32
12840 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12841 (build-system python-build-system)
12842 (native-inputs
12843 `(("pytest-runner" ,python-pytest-runner)
12844 ("pytest" ,python-pytest)
12845 ("six" ,python-six)))
12846 (home-page "https://github.com/WoLpH/python-utils")
12847 (synopsis "Convenient utilities not included with the standard Python install")
12848 (description
12849 "Python Utils is a collection of small Python functions and classes which
12850 make common patterns shorter and easier.")
12851 (license license:bsd-2)))
12852
12853 (define-public python2-utils
12854 (package-with-python2 python-utils))
12855
12856 (define-public python-diff-match-patch
12857 (package
12858 (name "python-diff-match-patch")
12859 (version "20121119")
12860 (source
12861 (origin
12862 (method url-fetch)
12863 (uri (pypi-uri "diff-match-patch" version))
12864 (sha256
12865 (base32
12866 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12867 (build-system python-build-system)
12868 (home-page "https://code.google.com/p/google-diff-match-patch")
12869 (synopsis "Synchronize plain text")
12870 (description "Diff Match and Patch libraries offer robust algorithms to
12871 perform the operations required for synchronizing plain text.")
12872 (license license:asl2.0)))
12873
12874 (define-public python2-diff-match-patch
12875 (package-with-python2 python-diff-match-patch))
12876
12877 (define-public python-dirsync
12878 (package
12879 (name "python-dirsync")
12880 (version "2.2.3")
12881 (source
12882 (origin
12883 (method url-fetch)
12884 (uri (pypi-uri "dirsync" version))
12885 (sha256
12886 (base32
12887 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12888 (build-system python-build-system)
12889 (propagated-inputs
12890 `(("six" ,python-six)))
12891 (home-page "https://bitbucket.org/tkhyn/dirsync")
12892 (synopsis "Advanced directory tree synchronisation tool")
12893 (description "Advanced directory tree synchronisation tool.")
12894 (license license:expat)))
12895
12896 (define-public python2-dirsync
12897 (package-with-python2 python-dirsync))
12898
12899 (define-public python-levenshtein
12900 (package
12901 (name "python-levenshtein")
12902 (version "0.12.0")
12903 (source
12904 (origin
12905 (method url-fetch)
12906 (uri (pypi-uri "python-Levenshtein" version))
12907 (sha256
12908 (base32
12909 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12910 (build-system python-build-system)
12911 (home-page "https://github.com/ztane/python-Levenshtein")
12912 (synopsis "Fast computation of Levenshtein distance and string similarity")
12913 (description
12914 "The Levenshtein Python C extension module contains functions for fast computation of
12915 @enumerate
12916 @item Levenshtein (edit) distance, and edit operations
12917 @item string similarity
12918 @item approximate median strings, and generally string averaging
12919 @item string sequence and set similarity
12920 @end enumerate
12921 It supports both normal and Unicode strings.")
12922 (license license:gpl2+)))
12923
12924 (define-public python2-levenshtein
12925 (package-with-python2 python-levenshtein))
12926
12927 (define-public python-scandir
12928 (package
12929 (name "python-scandir")
12930 (version "1.9.0")
12931 (source
12932 (origin
12933 (method url-fetch)
12934 (uri (pypi-uri "scandir" version))
12935 (sha256
12936 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12937 (build-system python-build-system)
12938 (arguments
12939 `(#:phases (modify-phases %standard-phases
12940 (replace 'check
12941 (lambda _
12942 (invoke "python" "test/run_tests.py"))))))
12943 (home-page "https://github.com/benhoyt/scandir")
12944 (synopsis "Directory iteration function")
12945 (description
12946 "Directory iteration function like os.listdir(), except that instead of
12947 returning a list of bare filenames, it yields DirEntry objects that include
12948 file type and stat information along with the name. Using scandir() increases
12949 the speed of os.walk() by 2-20 times (depending on the platform and file
12950 system) by avoiding unnecessary calls to os.stat() in most cases.
12951
12952 This package is part of the Python standard library since version 3.5.")
12953 (license license:bsd-3)))
12954
12955 (define-public python2-scandir
12956 (package-with-python2 python-scandir))
12957
12958 (define-public python2-stemming
12959 (package
12960 (name "python2-stemming")
12961 (version "1.0.1")
12962 (source
12963 (origin
12964 (method url-fetch)
12965 (uri (pypi-uri "stemming" version))
12966 (sha256
12967 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12968 (build-system python-build-system)
12969 (arguments
12970 `(#:python ,python-2))
12971 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12972 (synopsis "Python implementations of various stemming algorithms")
12973 (description
12974 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12975 stemming algorithms for English. These implementations are straightforward and
12976 efficient, unlike some Python versions of the same algorithms available on the
12977 Web. This package is an extraction of the stemming code included in the Whoosh
12978 search engine.")
12979 (license license:public-domain)))
12980
12981 (define-public python-factory-boy
12982 (package
12983 (name "python-factory-boy")
12984 (version "2.8.1")
12985 (source
12986 (origin
12987 (method url-fetch)
12988 (uri (pypi-uri "factory_boy" version))
12989 (sha256
12990 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12991 (build-system python-build-system)
12992 (arguments
12993 ;; Tests are not included in the tarball.
12994 `(#:tests? #f))
12995 (propagated-inputs
12996 `(("faker" ,python-faker)))
12997 (home-page "https://github.com/benhoyt/scandir")
12998 (synopsis "Versatile test fixtures replacement")
12999 (description
13000 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13001
13002 As a fixtures replacement tool, it aims to replace static, hard to maintain
13003 fixtures with easy-to-use factories for complex object.
13004
13005 Instead of building an exhaustive test setup with every possible combination
13006 of corner cases, factory_boy allows you to use objects customized for the
13007 current test, while only declaring the test-specific fields")
13008 (license license:expat)))
13009
13010 (define-public python2-factory-boy
13011 (package-with-python2 python-factory-boy))
13012
13013 (define-public python-translate-toolkit
13014 (package
13015 (name "python-translate-toolkit")
13016 (version "2.1.0")
13017 (source
13018 (origin
13019 (method url-fetch)
13020 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13021 (sha256
13022 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13023 (build-system python-build-system)
13024 (native-inputs
13025 `(("python-pytest" ,python-pytest)
13026 ("python-sphinx" ,python-sphinx)))
13027 (propagated-inputs
13028 `(("python-babel" ,python-babel)
13029 ("python-beautifulsoup4" ,python-beautifulsoup4)
13030 ("python-chardet" ,python-chardet)
13031 ("python-diff-match-patch" ,python-diff-match-patch)
13032 ("python-levenshtein" ,python-levenshtein)
13033 ("python-lxml" ,python-lxml)
13034 ("python-six" ,python-six)
13035 ("python-vobject" ,python-vobject)
13036 ("python-pyyaml" ,python-pyyaml)))
13037 (arguments
13038 ;; TODO: tests are not run, because they end with
13039 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13040 ;; 'parse_funcs'
13041 ;; during test setup.
13042 `(#:tests? #f))
13043 (home-page "https://toolkit.translatehouse.org")
13044 (synopsis "Tools and API for translation and localization engineering")
13045 (description
13046 "Tools and API for translation and localization engineering. It contains
13047 several utilities, as well as an API for building localization tools.")
13048 (license license:gpl2+)))
13049
13050 (define-public python2-translate-toolkit
13051 (package-with-python2 python-translate-toolkit))
13052
13053 (define-public python-packaging
13054 (package
13055 (name "python-packaging")
13056 (version "20.0")
13057 (source
13058 (origin
13059 (method url-fetch)
13060 (uri (pypi-uri "packaging" version))
13061 (patches (search-patches "python-packaging-test-arch.patch"))
13062 (sha256
13063 (base32
13064 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
13065 (build-system python-build-system)
13066 (arguments
13067 `(#:phases (modify-phases %standard-phases
13068 (replace 'check
13069 (lambda _ (invoke "py.test" "-vv"))))))
13070 (native-inputs
13071 `(("python-pretend" ,python-pretend)
13072 ("python-pytest" ,python-pytest)))
13073 (propagated-inputs
13074 `(("python-pyparsing" ,python-pyparsing)
13075 ("python-six" ,python-six)))
13076 (home-page "https://github.com/pypa/packaging")
13077 (synopsis "Core utilities for Python packages")
13078 (description "Packaging is a Python module for dealing with Python packages.
13079 It offers an interface for working with package versions, names, and dependency
13080 information.")
13081 ;; From 'LICENSE': This software is made available under the terms of
13082 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13083 ;; Contributions to this software is made under the terms of *both* these
13084 ;; licenses.
13085 (license (list license:asl2.0 license:bsd-2))))
13086
13087 (define-public python2-packaging
13088 (package-with-python2 python-packaging))
13089
13090 (define-public python-relatorio
13091 (package
13092 (name "python-relatorio")
13093 (version "0.8.0")
13094 (source
13095 (origin
13096 (method url-fetch)
13097 (uri (pypi-uri "relatorio" version))
13098 (sha256
13099 (base32
13100 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13101 (build-system python-build-system)
13102 (propagated-inputs
13103 `(("python-lxml" ,python-lxml)
13104 ("python-genshi" ,python-genshi)))
13105 (native-inputs
13106 `(("python-magic" ,python-magic)))
13107 (home-page "https://relatorio.tryton.org/")
13108 (synopsis "Templating library able to output ODT and PDF files")
13109 (description "Relatorio is a templating library which provides a way to
13110 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13111 for more filetypes can be easily added by creating plugins for them.")
13112 (license license:gpl3+)))
13113
13114 (define-public python2-relatorio
13115 (package-with-python2 python-relatorio))
13116
13117 (define-public python-radon
13118 (package
13119 (name "python-radon")
13120 (version "2.2.0")
13121 (source
13122 (origin
13123 (method url-fetch)
13124 (uri (pypi-uri "radon" version))
13125 (sha256
13126 (base32
13127 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13128 (build-system python-build-system)
13129 (arguments
13130 `(#:phases (modify-phases %standard-phases
13131 (replace 'check
13132 (lambda _
13133 (invoke "python" "radon/tests/run.py"))))))
13134 (propagated-inputs
13135 `(("python-colorama" ,python-colorama)
13136 ("python-flake8-polyfill" ,python-flake8-polyfill)
13137 ("python-mando" ,python-mando)))
13138 (native-inputs
13139 `(("python-pytest" ,python-pytest)
13140 ("python-pytest-mock" ,python-pytest-mock)))
13141 (home-page "https://radon.readthedocs.org/")
13142 (synopsis "Code Metrics in Python")
13143 (description "Radon is a Python tool which computes various code metrics.
13144 Supported metrics are:
13145 @itemize @bullet
13146 @item raw metrics: SLOC, comment lines, blank lines, &c.
13147 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13148 @item Halstead metrics (all of them)
13149 @item the Maintainability Index (a Visual Studio metric)
13150 @end itemize")
13151 (license license:expat)))
13152
13153 (define-public python2-radon
13154 (package-with-python2 python-radon))
13155
13156 (define-public python-sure
13157 (package
13158 (name "python-sure")
13159 (version "1.4.11")
13160 (source
13161 (origin
13162 (method url-fetch)
13163 (uri (pypi-uri "sure" version))
13164 (sha256
13165 (base32
13166 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13167 (build-system python-build-system)
13168 (propagated-inputs
13169 `(("python-mock" ,python-mock)
13170 ("python-six" ,python-six)))
13171 (native-inputs
13172 `(("python-nose" ,python-nose)))
13173 (home-page "https://github.com/gabrielfalcao/sure")
13174 (synopsis "Automated testing library in python for python")
13175 (description
13176 "Sure is a python library that leverages a DSL for writing assertions.
13177 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13178 (license license:gpl3+)))
13179
13180 (define-public python2-sure
13181 (package-with-python2 python-sure))
13182
13183 (define-public python2-couleur
13184 ;; This package does not seem to support python3 at all, hence,
13185 ;; only the python2 variant definition is provided.
13186 (package
13187 (name "python2-couleur")
13188 (version "0.6.2")
13189 (source
13190 (origin
13191 (method url-fetch)
13192 (uri (pypi-uri "couleur" version))
13193 (sha256
13194 (base32
13195 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13196 (build-system python-build-system)
13197 (arguments
13198 `(#:python ,python-2))
13199 (home-page "https://github.com/gabrielfalcao/couleur")
13200 (synopsis
13201 "ANSI terminal tool for python, colored shell and other handy fancy features")
13202 (description
13203 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13204 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13205 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13206 ;; https://github.com/gabrielfalcao/couleur/issues/11
13207 (license license:lgpl3+)))
13208
13209 (define-public python-misaka
13210 (package
13211 (name "python-misaka")
13212 (version "2.1.1")
13213 (source
13214 (origin
13215 (method url-fetch)
13216 (uri (pypi-uri "misaka" version))
13217 (sha256
13218 (base32
13219 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13220 (build-system python-build-system)
13221 (arguments
13222 `(;; Line 37 of setup.py calls self.run_command('develop')
13223 ;; in the 'check' phase. This command seems to be trying
13224 ;; to write to
13225 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13226 ;; for which it does not have the permission to write.
13227 #:tests? #f))
13228 (propagated-inputs
13229 `(("python-cffi" ,python-cffi)))
13230 (home-page "https://github.com/FSX/misaka")
13231 (synopsis "Python binding for Hoedown")
13232 (description
13233 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13234 library written in C. It features a fast HTML renderer and functionality to make custom
13235 renderers (e.g. man pages or LaTeX).")
13236 (license license:expat)))
13237
13238 (define-public python2-misaka
13239 (package-with-python2 python-misaka))
13240
13241 (define-public python2-steadymark
13242 ;; This is forced into being a python2 only variant
13243 ;; due to its dependence on couleur that has no support
13244 ;; for python3
13245 (package
13246 (name "python2-steadymark")
13247 (version "0.7.3")
13248 (source
13249 (origin
13250 (method url-fetch)
13251 (uri (pypi-uri "steadymark" version))
13252 (sha256
13253 (base32
13254 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13255 (build-system python-build-system)
13256 (native-inputs
13257 `(("python-couleur" ,python2-couleur)
13258 ("python-sure" ,python2-sure)
13259 ("python-misaka" ,python2-misaka)))
13260 (arguments
13261 `(#:python ,python-2
13262 #:phases
13263 (modify-phases %standard-phases
13264 (add-before 'build 'patch-setup-py
13265 (lambda _
13266 ;; Update requirements from dependency==version
13267 ;; to dependency>=version
13268 (substitute* "setup.py"
13269 (("==") ">="))
13270 #t)))))
13271 (home-page "https://github.com/gabrielfalcao/steadymark")
13272 (synopsis "Markdown-based test runner for python")
13273 (description
13274 "@code{Steadymark} allows documentation to be written in github-flavoured
13275 markdown. The documentation may contain snippets of code surrounded by python
13276 code blocks and @code{Steadymark} will find these snippets and run them, making
13277 sure that there are no old malfunctional examples in the documentation examples.")
13278 (license license:expat)))
13279
13280 (define-public python-jsonpointer
13281 (package
13282 (name "python-jsonpointer")
13283 (version "1.10")
13284 (source
13285 (origin
13286 (method url-fetch)
13287 (uri (pypi-uri "jsonpointer" version))
13288 (sha256
13289 (base32
13290 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13291 (build-system python-build-system)
13292 (home-page "https://github.com/stefankoegl/python-json-pointer")
13293 (synopsis "Identify specific nodes in a JSON document")
13294 (description "@code{jsonpointer} allows you to access specific nodes
13295 by path in a JSON document (see RFC 6901).")
13296 (license license:bsd-3)))
13297
13298 (define-public python2-jsonpointer
13299 (package-with-python2 python-jsonpointer))
13300
13301 (define-public python-jsonpatch
13302 (package
13303 (name "python-jsonpatch")
13304 (version "1.16")
13305 (source
13306 (origin
13307 (method git-fetch)
13308 ;; pypi version lacks tests.js
13309 (uri (git-reference
13310 (url "https://github.com/stefankoegl/python-json-patch")
13311 (commit (string-append "v" version))))
13312 (file-name (git-file-name name version))
13313 (sha256
13314 (base32
13315 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
13316 (build-system python-build-system)
13317 (native-inputs
13318 `(("python-jsonpointer" ,python-jsonpointer)))
13319 (home-page "https://github.com/stefankoegl/python-json-patch")
13320 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13321 (description "@code{jsonpatch} is a library and program that allows
13322 applying JSON Patches according to RFC 6902.")
13323 (license license:bsd-3)))
13324
13325 (define-public python2-jsonpatch
13326 (package-with-python2 python-jsonpatch))
13327
13328 (define-public python-jsonpatch-0.4
13329 (package (inherit python-jsonpatch)
13330 (name "python-jsonpatch")
13331 (version "0.4")
13332 (source
13333 (origin
13334 (method git-fetch)
13335 (uri (git-reference
13336 (url "https://github.com/stefankoegl/python-json-patch")
13337 (commit (string-append "v" version))))
13338 (file-name (git-file-name name version))
13339 (sha256
13340 (base32
13341 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
13342
13343 (define-public python2-jsonpatch-0.4
13344 (package-with-python2 python-jsonpatch-0.4))
13345
13346 (define-public python-rfc3986
13347 (package
13348 (name "python-rfc3986")
13349 (version "1.1.0")
13350 (source (origin
13351 (method url-fetch)
13352 (uri (pypi-uri "rfc3986" version))
13353 (sha256
13354 (base32
13355 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13356 (build-system python-build-system)
13357 (arguments
13358 `(#:modules ((guix build utils)
13359 (guix build python-build-system)
13360 (ice-9 ftw)
13361 (srfi srfi-1)
13362 (srfi srfi-26))
13363 #:phases
13364 (modify-phases %standard-phases
13365 (replace 'check
13366 (lambda _
13367 (let ((cwd (getcwd)))
13368 (setenv "PYTHONPATH"
13369 (string-append cwd "/build/"
13370 (find (cut string-prefix? "lib" <>)
13371 (scandir (string-append cwd "/build")))
13372 ":"
13373 (getenv "PYTHONPATH")))
13374 (invoke "pytest" "-v")))))))
13375 (native-inputs
13376 `(("python-pytest" ,python-pytest)))
13377 (home-page "https://rfc3986.readthedocs.io/")
13378 (synopsis "Parse and validate URI references")
13379 (description
13380 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13381 validation and authority parsing. This module also supports RFC@tie{}6874
13382 which adds support for zone identifiers to IPv6 addresses.")
13383 (license license:asl2.0)))
13384
13385 (define-public python2-rfc3986
13386 (package-with-python2 python-rfc3986))
13387
13388 (define-public python-rfc3987
13389 (package
13390 (name "python-rfc3987")
13391 (version "1.3.7")
13392 (source
13393 (origin
13394 (method url-fetch)
13395 (uri (pypi-uri "rfc3987" version))
13396 (sha256
13397 (base32
13398 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13399 (build-system python-build-system)
13400 (home-page "https://pypi.python.org/pypi/rfc3987")
13401 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13402 (description "@code{rfc3987} provides routines for parsing and
13403 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13404 (license license:gpl3+)))
13405
13406 (define-public python2-rfc3987
13407 (package-with-python2 python-rfc3987))
13408
13409 (define-public python-validate-email
13410 (package
13411 (name "python-validate-email")
13412 (version "1.3")
13413 (source
13414 (origin
13415 (method url-fetch)
13416 (uri (pypi-uri "validate_email" version))
13417 (sha256
13418 (base32
13419 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13420 (build-system python-build-system)
13421 (home-page "https://github.com/syrusakbary/validate_email")
13422 (synopsis "Verifies if an email address is valid and really exists")
13423 (description "@code{validate_email} can be used to verify if an email
13424 address is valid and really exists.")
13425 (license license:lgpl3+)))
13426
13427 (define-public python2-validate-email
13428 (package-with-python2 python-validate-email))
13429
13430 (define-public python-flex
13431 (package
13432 (name "python-flex")
13433 (version "6.10.0")
13434 (source
13435 (origin
13436 (method url-fetch)
13437 (uri (pypi-uri "flex" version))
13438 (sha256
13439 (base32
13440 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13441 (build-system python-build-system)
13442 (propagated-inputs
13443 `(("python-click" ,python-click)
13444 ("python-iso8601" ,python-iso8601)
13445 ("python-jsonpointer" ,python-jsonpointer)
13446 ("python-pyyaml" ,python-pyyaml)
13447 ("python-requests" ,python-requests)
13448 ("python-rfc3987" ,python-rfc3987)
13449 ("python-six" ,python-six)
13450 ("python-validate-email" ,python-validate-email)))
13451 (home-page "https://github.com/pipermerriam/flex")
13452 (synopsis "Validates Swagger schemata")
13453 (description "@code{flex} can be used to validate Swagger schemata.")
13454 (license license:bsd-3)))
13455
13456 (define-public python2-flex
13457 (package-with-python2 python-flex))
13458
13459 (define-public python-marshmallow
13460 (package
13461 (name "python-marshmallow")
13462 (version "3.0.0b14")
13463 (source
13464 (origin
13465 (method url-fetch)
13466 (uri (pypi-uri "marshmallow" version))
13467 (sha256
13468 (base32
13469 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13470 (build-system python-build-system)
13471 (propagated-inputs
13472 `(("python-dateutil" ,python-dateutil)
13473 ("python-simplejson" ,python-simplejson)))
13474 (native-inputs
13475 `(("python-pytest" ,python-pytest)
13476 ("python-pytz" ,python-pytz)))
13477 (home-page "https://github.com/marshmallow-code/marshmallow")
13478 (synopsis "Convert complex datatypes to and from native
13479 Python datatypes.")
13480 (description "@code{marshmallow} provides a library for converting
13481 complex datatypes to and from native Python datatypes.")
13482 (license license:expat)))
13483
13484 (define-public python2-marshmallow
13485 (package-with-python2 python-marshmallow))
13486
13487 (define-public python-apispec
13488 (package
13489 (name "python-apispec")
13490 (version "0.25.3")
13491 (source
13492 (origin
13493 (method url-fetch)
13494 (uri (pypi-uri "apispec" version))
13495 (sha256
13496 (base32
13497 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13498 (build-system python-build-system)
13499 (propagated-inputs
13500 `(("python-pyyaml" ,python-pyyaml)))
13501 (native-inputs
13502 `(("python-pytest" ,python-pytest)
13503 ("python-flask" ,python-flask)
13504 ("python-marshmallow" ,python-marshmallow)
13505 ("python-tornado" ,python-tornado)
13506 ("python-bottle" ,python-bottle)
13507 ("python-mock" ,python-mock)))
13508 (home-page "https://github.com/marshmallow-code/apispec")
13509 (synopsis "Swagger 2.0 API specification generator")
13510 (description "@code{python-apispec} is a pluggable API specification
13511 generator. Currently supports the OpenAPI specification (f.k.a.
13512 Swagger 2.0).")
13513 (license license:expat)))
13514
13515 (define-public python2-apispec
13516 (package-with-python2 python-apispec))
13517
13518 (define-public python-flasgger
13519 (package
13520 (name "python-flasgger")
13521 (version "0.6.3")
13522 (source
13523 (origin
13524 (method git-fetch)
13525 (uri (git-reference
13526 (url "https://github.com/rochacbruno/flasgger.git")
13527 (commit version)))
13528 (file-name (git-file-name name version))
13529 (sha256
13530 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13531 (build-system python-build-system)
13532 (arguments
13533 `(#:phases
13534 (modify-phases %standard-phases
13535 (replace 'check
13536 (lambda* (#:key inputs outputs #:allow-other-keys)
13537 (substitute* "Makefile"
13538 (("flake8 flasgger --ignore=F403")
13539 "flake8 flasgger --ignore=E731,F403"))
13540 (setenv "PYTHONPATH" (string-append (getcwd)
13541 ":"
13542 (getenv "PYTHONPATH")))
13543 (invoke "py.test"))))))
13544 (propagated-inputs
13545 `(("python-flask" ,python-flask)
13546 ("python-pyyaml" ,python-pyyaml)
13547 ("python-jsonschema" ,python-jsonschema)
13548 ("python-mistune" ,python-mistune)
13549 ("python-six" ,python-six)))
13550 (native-inputs
13551 `(("python-decorator" ,python-decorator)
13552 ("python-flake8" ,python-flake8)
13553 ("python-flask-restful" ,python-flask-restful)
13554 ("python-flex" ,python-flex)
13555 ("python-pytest" ,python-pytest)
13556 ("python-pytest-cov" ,python-pytest-cov)
13557 ("python-marshmallow" ,python-marshmallow)
13558 ("python-apispec" ,python-apispec)))
13559 (home-page "https://github.com/rochacbruno/flasgger/")
13560 (synopsis "Extract Swagger specs from your Flask project")
13561 (description "@code{python-flasgger} allows extracting Swagger specs
13562 from your Flask project. It is a fork of Flask-Swagger.")
13563 (license license:expat)))
13564
13565 (define-public python2-flasgger
13566 (package-with-python2 python-flasgger))
13567
13568 (define-public python-swagger-spec-validator
13569 (package
13570 (name "python-swagger-spec-validator")
13571 (version "2.4.3")
13572 (source
13573 (origin
13574 (method url-fetch)
13575 (uri (pypi-uri "swagger-spec-validator" version))
13576 (sha256
13577 (base32
13578 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13579 (build-system python-build-system)
13580 (propagated-inputs
13581 `(("python-jsonschema" ,python-jsonschema)
13582 ("python-pyyaml" ,python-pyyaml)
13583 ("python-six" ,python-six)))
13584 (home-page
13585 "https://github.com/Yelp/swagger_spec_validator")
13586 (synopsis "Validation of Swagger specifications")
13587 (description "@code{swagger_spec_validator} provides a library for
13588 validating Swagger API specifications.")
13589 (license license:asl2.0)))
13590
13591 (define-public python2-swagger-spec-validator
13592 (package-with-python2 python-swagger-spec-validator))
13593
13594 (define-public python-apache-libcloud
13595 (package
13596 (name "python-apache-libcloud")
13597 (version "2.4.0")
13598 (source
13599 (origin
13600 (method url-fetch)
13601 (uri (pypi-uri "apache-libcloud" version))
13602 (sha256
13603 (base32
13604 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13605 (build-system python-build-system)
13606 (arguments
13607 `(#:phases
13608 (modify-phases %standard-phases
13609 (add-after 'unpack 'patch-ssh
13610 (lambda* (#:key inputs #:allow-other-keys)
13611 (substitute* "libcloud/compute/ssh.py"
13612 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13613 "/bin/ssh" "'")))
13614 #t))
13615 (add-after 'unpack 'patch-tests
13616 (lambda _
13617 (substitute* "./libcloud/test/test_file_fixtures.py"
13618 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13619 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13620 return (httplib.OK,
13621 \"1234abcd\",
13622 {\"test\": \"value\"},
13623 httplib.responses[httplib.OK])
13624 def _ascii"))
13625 (substitute* "libcloud/test/compute/test_ssh_client.py"
13626 (("class ShellOutSSHClientTests")
13627 "@unittest.skip(\"Guix container doesn't have ssh service\")
13628 class ShellOutSSHClientTests")
13629 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13630 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13631 (("'.xF0', '.x90', '.x8D', '.x88'")
13632 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13633 #t))
13634 (add-before 'check 'copy-secret
13635 (lambda _
13636 (copy-file "libcloud/test/secrets.py-dist"
13637 "libcloud/test/secrets.py")
13638 #t)))))
13639 (inputs
13640 `(("openssh" ,openssh)))
13641 (propagated-inputs
13642 `(("python-paramiko" ,python-paramiko)
13643 ("python-requests" ,python-requests)))
13644 (native-inputs
13645 `(("python-lockfile" ,python-lockfile)
13646 ("python-mock" ,python-mock)
13647 ("python-pytest" ,python-pytest)
13648 ("python-pytest-runner" ,python-pytest-runner)
13649 ("python-requests-mock" ,python-requests-mock)))
13650 (home-page "https://libcloud.apache.org/")
13651 (synopsis "Unified Cloud API")
13652 (description "@code{libcloud} is a Python library for interacting with
13653 many of the popular cloud service providers using a unified API.")
13654 (license license:asl2.0)))
13655
13656 (define-public python2-apache-libcloud
13657 (package-with-python2 python-apache-libcloud))
13658
13659 (define-public python-smmap2
13660 (package
13661 (name "python-smmap2")
13662 (version "2.0.5")
13663 (source
13664 (origin
13665 (method url-fetch)
13666 (uri (pypi-uri "smmap2" version))
13667 (sha256
13668 (base32 "16k03pcnxd3lgzwgbd7nl4jwzm1wmahirvd09kljnzvy96hgza99"))))
13669 (build-system python-build-system)
13670 (native-inputs
13671 `(("python-nosexcover" ,python-nosexcover)))
13672 (home-page "https://github.com/Byron/smmap")
13673 (synopsis "Python sliding window memory map manager")
13674 (description "@code{smmap2} is a pure Python implementation of a sliding
13675 window memory map manager.")
13676 (license license:bsd-3)))
13677
13678 (define-public python2-smmap2
13679 (package-with-python2 python-smmap2))
13680
13681 (define-public python-regex
13682 (package
13683 (name "python-regex")
13684 (version "2019.04.14")
13685 (source (origin
13686 (method url-fetch)
13687 (uri (pypi-uri "regex" version))
13688 (sha256
13689 (base32
13690 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13691 ;; TODO: Fix and enable regex_test.py tests that complain about the
13692 ;; test.support module not existing.
13693 (build-system python-build-system)
13694 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13695 (synopsis "Alternative regular expression module")
13696 (description "This regular expression implementation is backwards-
13697 compatible with the standard @code{re} module, but offers additional
13698 functionality like full case-folding for case-insensitive matches in Unicode.")
13699 (license license:psfl)))
13700
13701 (define-public python2-regex
13702 (package-with-python2 python-regex))
13703
13704 (define-public python2-pyopengl
13705 (package
13706 (name "python2-pyopengl")
13707 (version "3.1.0")
13708 (source
13709 (origin
13710 (method url-fetch)
13711 (uri (pypi-uri "PyOpenGL" version))
13712 (sha256
13713 (base32
13714 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13715 (arguments
13716 `(#:python ,python-2))
13717 (build-system python-build-system)
13718 (home-page "http://pyopengl.sourceforge.net")
13719 (synopsis "Standard OpenGL bindings for Python")
13720 (description
13721 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13722 related APIs. The binding is created using the standard @code{ctypes}
13723 library.")
13724 (license license:bsd-3)))
13725
13726 (define-public python2-pyopengl-accelerate
13727 (package
13728 (inherit python2-pyopengl)
13729 (name "python2-pyopengl-accelerate")
13730 (version "3.1.0")
13731 (source
13732 (origin
13733 (method url-fetch)
13734 (uri (pypi-uri "PyOpenGL-accelerate" version))
13735 (sha256
13736 (base32
13737 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13738 (synopsis "Acceleration code for PyOpenGL")
13739 (description
13740 "This is the Cython-coded accelerator module for PyOpenGL.")))
13741
13742 (define-public python-rencode
13743 (package
13744 (name "python-rencode")
13745 (version "1.0.5")
13746 (source
13747 (origin
13748 (method url-fetch)
13749 (uri (pypi-uri "rencode" version))
13750 (sha256
13751 (base32
13752 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13753 (build-system python-build-system)
13754 (arguments
13755 `(#:phases
13756 (modify-phases %standard-phases
13757 (add-before 'check 'delete-bogus-test
13758 ;; This test requires /home/aresch/Downloads, which is not provided by
13759 ;; the build environment.
13760 (lambda _
13761 (delete-file "rencode/t.py")
13762 #t)))))
13763 (native-inputs `(("pkg-config" ,pkg-config)
13764 ("python-cython" ,python-cython)))
13765 (home-page "https://github.com/aresch/rencode")
13766 (synopsis "Serialization of heterogeneous data structures")
13767 (description
13768 "The @code{rencode} module is a data structure serialization library,
13769 similar to @code{bencode} from the BitTorrent project. For complex,
13770 heterogeneous data structures with many small elements, r-encoding stake up
13771 significantly less space than b-encodings. This version of rencode is a
13772 complete rewrite in Cython to attempt to increase the performance over the
13773 pure Python module.")
13774 (license license:bsd-3)))
13775
13776 (define-public python2-rencode
13777 (package-with-python2 python-rencode))
13778
13779 (define-public python-xenon
13780 (package
13781 (name "python-xenon")
13782 (version "0.5.4")
13783 (source
13784 (origin
13785 (method url-fetch)
13786 (uri (pypi-uri "xenon" version))
13787 (sha256
13788 (base32
13789 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13790 (build-system python-build-system)
13791 (native-inputs
13792 `(("python-pyyaml" ,python-pyyaml)
13793 ("python-radon" ,python-radon)
13794 ("python-requests" ,python-requests)
13795 ("python-flake8" ,python-flake8)
13796 ("python-tox" ,python-tox)))
13797 (arguments
13798 `(#:phases
13799 (modify-phases %standard-phases
13800 (add-before 'build 'patch-test-requirements
13801 (lambda _
13802 ;; Remove httpretty dependency for tests.
13803 (substitute* "setup.py"
13804 (("httpretty") ""))
13805 #t)))))
13806 (home-page "https://xenon.readthedocs.org/")
13807 (synopsis "Monitor code metrics for Python on your CI server")
13808 (description
13809 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13810 Ideally, @code{xenon} is run every time code is committed. Through command
13811 line options, various thresholds can be set for the complexity of code. It
13812 will fail (i.e. it will exit with a non-zero exit code) when any of these
13813 requirements is not met.")
13814 (license license:expat)))
13815
13816 (define-public python2-xenon
13817 (package-with-python2 python-xenon))
13818
13819 (define-public python-pysocks
13820 (package
13821 (name "python-pysocks")
13822 (version "1.7.0")
13823 (source
13824 (origin
13825 (method url-fetch)
13826 (uri (pypi-uri "PySocks" version))
13827 (sha256
13828 (base32
13829 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13830 (build-system python-build-system)
13831 (arguments `(#:tests? #f))
13832 (home-page "https://github.com/Anorov/PySocks")
13833 (synopsis "SOCKS client module")
13834 (description "@code{pysocks} is an updated and semi-actively maintained
13835 version of @code{SocksiPy} with bug fixes and extra features.")
13836 (license license:bsd-3)))
13837
13838 (define-public python2-pysocks
13839 (package-with-python2 python-pysocks))
13840
13841 (define-public python-pydiff
13842 (package
13843 (name "python-pydiff")
13844 (version "0.2")
13845 (source
13846 (origin
13847 (method url-fetch)
13848 (uri (pypi-uri "pydiff" version))
13849 (sha256
13850 (base32
13851 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13852 (build-system python-build-system)
13853 (home-page "https://github.com/myint/pydiff")
13854 (synopsis "Library to diff two Python files at the bytecode level")
13855 (description
13856 "@code{pydiff} makes it easy to look for actual code changes while
13857 ignoring formatting changes.")
13858 (license license:expat)))
13859
13860 (define-public python2-pydiff
13861 (package-with-python2 python-pydiff))
13862
13863 (define-public python-tqdm
13864 (package
13865 (name "python-tqdm")
13866 (version "4.19.6")
13867 (source
13868 (origin
13869 (method url-fetch)
13870 (uri (pypi-uri "tqdm" version))
13871 (sha256
13872 (base32
13873 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13874 (build-system python-build-system)
13875 (native-inputs
13876 `(("python-flake8" ,python-flake8)
13877 ("python-nose" ,python-nose)
13878 ("python-coverage" ,python-coverage)))
13879 (home-page "https://github.com/tqdm/tqdm")
13880 (synopsis "Fast, extensible progress meter")
13881 (description
13882 "Make loops show a progress bar on the console by just wrapping any
13883 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13884 design and layout.")
13885 (license (list license:mpl2.0 license:expat))
13886 (properties `((python2-variant . ,(delay python2-tqdm))))))
13887
13888 (define-public python2-tqdm
13889 (let ((tqdm (package-with-python2
13890 (strip-python2-variant python-tqdm))))
13891 (package (inherit tqdm)
13892 (native-inputs `(("python2-functools32" ,python2-functools32)
13893 ,@(package-native-inputs tqdm))))))
13894
13895 (define-public python-pkginfo
13896 (package
13897 (name "python-pkginfo")
13898 (version "1.4.2")
13899 (source
13900 (origin
13901 (method url-fetch)
13902 (uri (pypi-uri "pkginfo" version))
13903 (sha256
13904 (base32
13905 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13906 (build-system python-build-system)
13907 (arguments
13908 ;; The tests are broken upstream.
13909 '(#:tests? #f))
13910 (home-page
13911 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13912 (synopsis
13913 "Query metadatdata from sdists, bdists, and installed packages")
13914 (description
13915 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13916 source distriubtion (an sdist) or a binary distribution (e.g., created by
13917 running bdist_egg). It can also query the EGG-INFO directory of an installed
13918 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13919 created by running @code{python setup.py develop}).")
13920 (license license:expat)))
13921
13922 (define-public python2-pkginfo
13923 (package-with-python2 python-pkginfo))
13924
13925 (define-public python-twine
13926 (package
13927 (name "python-twine")
13928 (version "1.9.1")
13929 (source
13930 (origin
13931 (method url-fetch)
13932 (uri (pypi-uri "twine" version))
13933 (sha256
13934 (base32
13935 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13936 (build-system python-build-system)
13937 (propagated-inputs
13938 `(("python-tqdm" ,python-tqdm)
13939 ("python-pkginfo" ,python-pkginfo)
13940 ("python-requests" ,python-requests)
13941 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13942 (home-page "https://github.com/pypa/twine")
13943 (synopsis "Collection of utilities for interacting with PyPI")
13944 (description
13945 "@code{twine} currently supports registering projects and uploading
13946 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13947 their files and supports any packaging format (including wheels).")
13948 (license license:asl2.0)))
13949
13950 (define-public python2-twine
13951 (package-with-python2 python-twine))
13952
13953 (define-public python-linecache2
13954 (package
13955 (name "python-linecache2")
13956 (version "1.0.0")
13957 (source
13958 (origin
13959 (method url-fetch)
13960 (uri (pypi-uri "linecache2" version))
13961 (sha256
13962 (base32
13963 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13964 (build-system python-build-system)
13965 (arguments
13966 `(;; The tests depend on unittest2, and our version is a bit too old.
13967 #:tests? #f))
13968 (native-inputs
13969 `(("python-pbr" ,python-pbr-minimal)))
13970 (home-page
13971 "https://github.com/testing-cabal/linecache2")
13972 (synopsis "Backports of the linecache module")
13973 (description
13974 "The linecache module allows one to get any line from any file, while
13975 attempting to optimize internally, using a cache, the common case where many
13976 lines are read from a single file.")
13977 (license license:psfl)))
13978
13979 (define-public python2-linecache2
13980 (package-with-python2 python-linecache2))
13981
13982 (define-public python-traceback2
13983 (package
13984 (name "python-traceback2")
13985 (version "1.4.0")
13986 (source
13987 (origin
13988 (method url-fetch)
13989 (uri (pypi-uri "traceback2" version))
13990 (sha256
13991 (base32
13992 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13993 (build-system python-build-system)
13994 (arguments
13995 `(;; python-traceback2 and python-unittest2 depend on one another.
13996 #:tests? #f))
13997 (native-inputs
13998 `(("python-pbr" ,python-pbr-minimal)))
13999 (propagated-inputs
14000 `(("python-linecache2" ,python-linecache2)))
14001 (home-page
14002 "https://github.com/testing-cabal/traceback2")
14003 (synopsis "Backports of the traceback module")
14004 (description
14005 "This module provides a standard interface to extract, format and print
14006 stack traces of Python programs. It exactly mimics the behavior of the Python
14007 interpreter when it prints a stack trace.")
14008 (license license:psfl)))
14009
14010 (define-public python2-traceback2
14011 (package-with-python2 python-traceback2))
14012
14013 (define-public python-ratelimiter
14014 (package
14015 (name "python-ratelimiter")
14016 (version "1.2.0")
14017 (source
14018 (origin
14019 (method url-fetch)
14020 (uri (pypi-uri "ratelimiter" version))
14021 (sha256
14022 (base32
14023 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14024 (build-system python-build-system)
14025 (arguments
14026 '(#:tests? #f)) ; There are no tests in the pypi archive.
14027 (home-page "https://github.com/RazerM/ratelimiter")
14028 (synopsis "Simple rate limiting object")
14029 (description
14030 "The @code{ratelimiter} module ensures that an operation will not be
14031 executed more than a given number of times during a given period.")
14032 (license license:asl2.0)))
14033
14034 (define-public python2-ratelimiter
14035 (package-with-python2 python-ratelimiter))
14036
14037 (define-public python-dukpy
14038 (package
14039 (name "python-dukpy")
14040 (version "0.3")
14041 (source
14042 (origin
14043 (method git-fetch)
14044 (uri (git-reference
14045 (url "https://github.com/kovidgoyal/dukpy.git")
14046 (commit (string-append "v" version))))
14047 (file-name (git-file-name name version))
14048 (sha256
14049 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14050 (build-system python-build-system)
14051 (home-page "https://github.com/kovidgoyal/dukpy")
14052 (synopsis "Run JavaScript in python")
14053 (description
14054 "dukpy is a JavaScript runtime environment for Python using the duktape
14055 embeddable JavaScript engine.")
14056 ;; Dukpy is licensed under MIT like the embedded duktape library,
14057 ;; with 'errors.c' as GPL3.
14058 (license (list license:expat license:gpl3))))
14059
14060 (define-public python2-dukpy
14061 (package-with-python2 python-dukpy))
14062
14063 (define-public python-jsonrpclib-pelix
14064 (package
14065 (name "python-jsonrpclib-pelix")
14066 (version "0.3.2")
14067 (source
14068 (origin
14069 (method url-fetch)
14070 (uri (pypi-uri "jsonrpclib-pelix" version))
14071 (sha256
14072 (base32
14073 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14074 (build-system python-build-system)
14075 (arguments
14076 `(#:tests? #f)) ; no tests in PyPI tarball
14077 (home-page "https://github.com/tcalmant/jsonrpclib/")
14078 (synopsis "JSON-RPC 2.0 client library for Python")
14079 (description
14080 "This library implements the JSON-RPC v2.0
14081 specification (backwards-compatible) as a client library for Python. This
14082 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14083 services.")
14084 (license license:asl2.0)))
14085
14086 (define-public python2-jsonrpclib-pelix
14087 (package-with-python2 python-jsonrpclib-pelix))
14088
14089 (define-public python-setuptools-scm-git-archive
14090 (package
14091 (name "python-setuptools-scm-git-archive")
14092 (version "1.0")
14093 (source
14094 (origin
14095 (method url-fetch)
14096 (uri (pypi-uri "setuptools_scm_git_archive" version))
14097 (sha256
14098 (base32
14099 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14100 (build-system python-build-system)
14101 (native-inputs
14102 `(("python-pytest" ,python-pytest)))
14103 (propagated-inputs
14104 `(("python-setuptools-scm" ,python-setuptools-scm)))
14105 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14106 (synopsis "Setuptools_scm plugin for git archives")
14107 (description
14108 "The setuptools_scm_git_archive package is a plugin to
14109 setuptools_scm, which supports obtaining versions from git archives that
14110 belong to tagged versions.")
14111 (license license:expat)))
14112
14113 (define-public python2-setuptools-scm-git-archive
14114 (package-with-python2 python-setuptools-scm-git-archive))
14115
14116 (define-public python-setuptools-git
14117 (package
14118 (name "python-setuptools-git")
14119 (version "1.2")
14120 (source
14121 (origin
14122 (method url-fetch)
14123 (uri (pypi-uri "setuptools-git" version))
14124 (sha256
14125 (base32
14126 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14127 (build-system python-build-system)
14128 (arguments
14129 `(#:phases
14130 (modify-phases %standard-phases
14131 ;; This is needed for tests.
14132 (add-after 'unpack 'configure-git
14133 (lambda _
14134 (setenv "HOME" "/tmp")
14135 (invoke "git" "config" "--global" "user.email" "guix")
14136 (invoke "git" "config" "--global" "user.name" "guix")
14137 #t)))))
14138 (native-inputs
14139 `(("git" ,git-minimal)))
14140 (home-page "https://github.com/msabramo/setuptools-git")
14141 (synopsis "Setuptools revision control system plugin for Git")
14142 (description
14143 "This package provides a plugin for Setuptools for revision control with
14144 Git.")
14145 (license license:bsd-3)))
14146
14147 (define-public python-pyclipper
14148 (package
14149 (name "python-pyclipper")
14150 (version "1.1.0.post3")
14151 (source
14152 (origin
14153 (method url-fetch)
14154 (uri (pypi-uri "pyclipper" version ".zip"))
14155 (sha256
14156 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14157 (modules '((guix build utils)))
14158 (snippet
14159 '(begin
14160 ;; This file is generated by Cython.
14161 (delete-file "pyclipper/pyclipper.cpp") #t))))
14162 (build-system python-build-system)
14163 (arguments
14164 `(#:phases
14165 (modify-phases %standard-phases
14166 (add-before 'build 'cythonize-sources
14167 (lambda _
14168 (with-directory-excursion "pyclipper"
14169 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14170 (propagated-inputs
14171 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14172 (native-inputs
14173 `(("python-cython" ,python-cython)
14174 ("python-pytest" ,python-pytest)
14175 ("python-pytest-runner" ,python-pytest-runner)
14176 ("python-unittest2" ,python-unittest2)
14177 ("unzip" ,unzip)))
14178 (home-page "https://github.com/greginvm/pyclipper")
14179 (synopsis "Wrapper for Angus Johnson's Clipper library")
14180 (description
14181 "Pyclipper is a Cython wrapper for the C++ translation of the
14182 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14183 (license license:expat)))
14184
14185 (define-public python2-pyclipper
14186 (package-with-python2 python-pyclipper))
14187
14188 (define-public python2-booleanoperations
14189 (package
14190 (name "python2-booleanoperations")
14191 (version "0.7.1")
14192 (source
14193 (origin
14194 (method url-fetch)
14195 (uri (pypi-uri "booleanOperations" version ".zip"))
14196 (sha256
14197 (base32
14198 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14199 (build-system python-build-system)
14200 (arguments
14201 `(#:python ,python-2))
14202 (native-inputs
14203 `(("unzip" ,unzip)
14204 ("python2-pytest" ,python2-pytest)
14205 ("python2-pytest-runner" ,python2-pytest-runner)))
14206 (propagated-inputs
14207 `(("python-fonttools" ,python2-fonttools)
14208 ("python-pyclipper" ,python2-pyclipper)
14209 ("python-ufolib" ,python2-ufolib)))
14210 (home-page "https://github.com/typemytype/booleanOperations")
14211 (synopsis "Boolean operations on paths")
14212 (description
14213 "BooleanOperations provides a Python library that enables
14214 boolean operations on paths.")
14215 (license license:expat)))
14216
14217 (define-public python-tempdir
14218 (package
14219 (name "python-tempdir")
14220 (version "0.7.1")
14221 (source
14222 (origin
14223 (method url-fetch)
14224 (uri (pypi-uri "tempdir" version))
14225 (sha256
14226 (base32
14227 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14228 (build-system python-build-system)
14229 (home-page "https://pypi.org/project/tempdir/")
14230 (arguments
14231 ;; the package has no tests
14232 '(#:tests? #f))
14233 (synopsis "Python library for managing temporary directories")
14234 (description
14235 "This library manages temporary directories that are automatically
14236 deleted with all their contents when they are no longer needed. It is
14237 particularly convenient for use in tests.")
14238 (license license:expat)))
14239
14240 (define-public python2-tempdir
14241 (package-with-python2 python-tempdir))
14242
14243 (define-public python-activepapers
14244 (package
14245 (name "python-activepapers")
14246 (version "0.2.2")
14247 (source
14248 (origin
14249 (method url-fetch)
14250 (uri (pypi-uri "ActivePapers.Py" version))
14251 (sha256
14252 (base32
14253 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14254 (build-system python-build-system)
14255 (arguments
14256 `(#:modules ((ice-9 ftw)
14257 (srfi srfi-1)
14258 (guix build utils)
14259 (guix build python-build-system))
14260
14261 #:phases
14262 (modify-phases %standard-phases
14263 (add-after 'unpack 'delete-python2-code
14264 (lambda _
14265 (for-each delete-file
14266 '("lib/activepapers/builtins2.py"
14267 "lib/activepapers/standardlib2.py"
14268 "lib/activepapers/utility2.py"))))
14269 (replace 'check
14270 (lambda _
14271 ;; Deactivate the test cases that download files
14272 (setenv "NO_NETWORK_ACCESS" "1")
14273 ;; For some strange reason, some tests fail if nosetests runs all
14274 ;; test modules in a single execution. They pass if each test
14275 ;; module is run individually.
14276 (for-each (lambda (filename)
14277 (invoke "nosetests"
14278 (string-append "tests/" filename)))
14279 (scandir "tests"
14280 (lambda (filename)
14281 (string-suffix? ".py" filename)))))))))
14282 (native-inputs
14283 `(("python-tempdir" ,python-tempdir)
14284 ("python-nose" ,python-nose)))
14285 (propagated-inputs
14286 `(("python-h5py" ,python-h5py)))
14287 (home-page "http://www.activepapers.org/")
14288 (synopsis "Executable papers for scientific computing")
14289 (description
14290 "ActivePapers is a tool for working with executable papers, which
14291 combine data, code, and documentation in single-file packages,
14292 suitable for publication as supplementary material or on repositories
14293 such as figshare or Zenodo.")
14294 (properties `((python2-variant . ,(delay python2-activepapers))))
14295 (license license:bsd-3)))
14296
14297 (define-public python2-activepapers
14298 (let ((base (package-with-python2
14299 (strip-python2-variant python-activepapers))))
14300 (package
14301 (inherit base)
14302 (arguments
14303 (substitute-keyword-arguments (package-arguments base)
14304 ((#:phases phases)
14305 `(modify-phases ,phases
14306 (delete 'delete-python2-code)
14307 (add-after 'unpack 'delete-python3-code
14308 (lambda _
14309 (for-each delete-file
14310 '("lib/activepapers/builtins3.py"
14311 "lib/activepapers/standardlib3.py"
14312 "lib/activepapers/utility3.py")))))))))))
14313
14314 (define-public python-semver
14315 (package
14316 (name "python-semver")
14317 (version "2.9.0")
14318 (source
14319 (origin
14320 (method url-fetch)
14321 (uri (pypi-uri "semver" version))
14322 (sha256
14323 (base32
14324 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
14325 (build-system python-build-system)
14326 (native-inputs
14327 `(("python-tox" ,python-tox)
14328 ("python-virtualenv" ,python-virtualenv)))
14329 (home-page "https://github.com/k-bx/python-semver")
14330 (synopsis "Python helper for Semantic Versioning")
14331 (description "This package provides a Python library for
14332 @url{Semantic Versioning, http://semver.org/}.")
14333 (license license:bsd-3)))
14334
14335 (define-public python2-semver
14336 (package-with-python2 python-semver))
14337
14338 (define-public python-pyro4
14339 (package
14340 (name "python-pyro4")
14341 (version "4.77")
14342 (source
14343 (origin
14344 (method url-fetch)
14345 (uri (pypi-uri "Pyro4" version))
14346 (sha256
14347 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14348 (build-system python-build-system)
14349 (arguments
14350 '(#:tests? #f)) ;FIXME: Some tests require network access.
14351 (native-inputs
14352 `(("python-cloudpickle" ,python-cloudpickle)
14353 ("python-dill" ,python-dill)
14354 ("python-msgpack" ,python-msgpack)))
14355 (propagated-inputs
14356 `(("python-serpent" ,python-serpent)))
14357 (home-page "https://pyro4.readthedocs.io")
14358 (synopsis "Distributed object middleware for Python")
14359 (description
14360 "Pyro enables you to build applications in which objects can talk to each
14361 other over the network. You can just use normal Python method calls to call
14362 objects on other machines, also known as remote procedure calls (RPC).")
14363 (license license:expat)))
14364
14365 (define-public python2-pyro
14366 (package
14367 (name "python2-pyro")
14368 (version "3.16")
14369 (source
14370 (origin
14371 (method url-fetch)
14372 (uri (pypi-uri "Pyro" version))
14373 (file-name (string-append "Pyro-" version ".tar.gz"))
14374 (sha256
14375 (base32
14376 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14377 (build-system python-build-system)
14378 (arguments
14379 ;; Pyro is not compatible with Python 3
14380 `(#:python ,python-2
14381 ;; Pyro has no test cases for automatic execution
14382 #:tests? #f))
14383 (home-page "http://pythonhosted.org/Pyro/")
14384 (synopsis "Distributed object manager for Python")
14385 (description "Pyro is a Distributed Object Technology system
14386 written in Python that is designed to be easy to use. It resembles
14387 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14388 which is a system and language independent Distributed Object Technology
14389 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14390 longer maintained. New projects should use Pyro4 instead, which
14391 is the new Pyro version that is actively developed.")
14392 (license license:expat)))
14393
14394 (define-public python2-scientific
14395 (package
14396 (name "python2-scientific")
14397 (version "2.9.4")
14398 (source
14399 (origin
14400 (method git-fetch)
14401 (uri (git-reference
14402 (url "https://github.com/khinsen/ScientificPython")
14403 (commit (string-append "rel" version))))
14404 (file-name (git-file-name name version))
14405 (sha256
14406 (base32
14407 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
14408 (build-system python-build-system)
14409 (inputs
14410 `(("netcdf" ,netcdf)))
14411 (propagated-inputs
14412 `(("python-numpy" ,python2-numpy-1.8)
14413 ("python-pyro" ,python2-pyro)))
14414 (arguments
14415 ;; ScientificPython is not compatible with Python 3
14416 `(#:python ,python-2
14417 #:tests? #f ; No test suite
14418 #:phases
14419 (modify-phases %standard-phases
14420 (replace 'build
14421 (lambda* (#:key inputs #:allow-other-keys)
14422 (invoke "python" "setup.py" "build"
14423 (string-append "--netcdf_prefix="
14424 (assoc-ref inputs "netcdf"))))))))
14425 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
14426 (synopsis "Python modules for scientific computing")
14427 (description "ScientificPython is a collection of Python modules that are
14428 useful for scientific computing. Most modules are rather general (Geometry,
14429 physical units, automatic derivatives, ...) whereas others are more
14430 domain-specific (e.g. netCDF and PDB support). The library is currently
14431 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14432 (license license:cecill-c)))
14433
14434 (define-public python2-mmtk
14435 (package
14436 (name "python2-mmtk")
14437 (version "2.7.12")
14438 (source
14439 (origin
14440 (method git-fetch)
14441 (uri (git-reference
14442 (url "https://github.com/khinsen/MMTK")
14443 (commit (string-append "rel" version))))
14444 (file-name (git-file-name name version))
14445 (sha256
14446 (base32
14447 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
14448 (build-system python-build-system)
14449 (native-inputs
14450 `(("netcdf" ,netcdf)))
14451 (propagated-inputs
14452 `(("python-scientific" ,python2-scientific)
14453 ("python-tkinter" ,python-2 "tk")))
14454 (arguments
14455 `(#:python ,python-2
14456 #:tests? #f
14457 #:phases
14458 (modify-phases %standard-phases
14459 (add-before 'build 'includes-from-scientific
14460 (lambda* (#:key inputs #:allow-other-keys)
14461 (mkdir-p "Include/Scientific")
14462 (copy-recursively
14463 (string-append
14464 (assoc-ref inputs "python-scientific")
14465 "/include/python2.7/Scientific")
14466 "Include/Scientific"))))))
14467 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14468 (synopsis "Python library for molecular simulation")
14469 (description "MMTK is a library for molecular simulations with an emphasis
14470 on biomolecules. It provides widely used methods such as Molecular Dynamics
14471 and normal mode analysis, but also basic routines for implementing new methods
14472 for simulation and analysis. The library is currently not actively maintained
14473 and works only with Python 2 and NumPy < 1.9.")
14474 (license license:cecill-c)))
14475
14476 (define-public python-phonenumbers
14477 (package
14478 (name "python-phonenumbers")
14479 (version "8.9.1")
14480 (source
14481 (origin
14482 (method url-fetch)
14483 (uri (pypi-uri "phonenumbers" version))
14484 (sha256
14485 (base32
14486 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14487 (build-system python-build-system)
14488 (home-page
14489 "https://github.com/daviddrysdale/python-phonenumbers")
14490 (synopsis
14491 "Python library for dealing with international phone numbers")
14492 (description
14493 "This package provides a Python port of Google's libphonenumber library.")
14494 (license license:asl2.0)))
14495
14496 (define-public python2-phonenumbers
14497 (package-with-python2 python-phonenumbers))
14498
14499 (define-public python-send2trash
14500 (package
14501 (name "python-send2trash")
14502 (version "1.5.0")
14503 (source
14504 (origin (method git-fetch)
14505 ;; Source tarball on PyPI doesn't include tests.
14506 (uri (git-reference
14507 (url "https://github.com/hsoft/send2trash.git")
14508 (commit version)))
14509 (file-name (git-file-name name version))
14510 (sha256
14511 (base32
14512 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14513 (build-system python-build-system)
14514 (arguments
14515 '(#:phases
14516 (modify-phases %standard-phases
14517 (add-before 'check 'pre-check
14518 (lambda _
14519 (mkdir-p "/tmp/foo")
14520 (setenv "HOME" "/tmp/foo")
14521 #t)))))
14522 (home-page "https://github.com/hsoft/send2trash")
14523 (synopsis "Send files to the user's @file{~/Trash} directory")
14524 (description "This package provides a Python library to send files to the
14525 user's @file{~/Trash} directory.")
14526 (properties `((python2-variant . ,(delay python2-send2trash))))
14527 (license license:bsd-3)))
14528
14529 (define-public python2-send2trash
14530 (package
14531 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14532 (arguments
14533 (substitute-keyword-arguments (package-arguments python-send2trash)
14534 ((#:phases phases)
14535 `(modify-phases ,phases
14536 (add-before 'check 'setenv
14537 (lambda _
14538 (setenv "PYTHONPATH"
14539 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14540 #t))))))))
14541
14542 (define-public python-yapf
14543 (package
14544 (name "python-yapf")
14545 (version "0.29.0")
14546 (source
14547 (origin
14548 (method url-fetch)
14549 (uri (pypi-uri "yapf" version))
14550 (sha256
14551 (base32
14552 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
14553 (build-system python-build-system)
14554 (home-page "https://github.com/google/yapf")
14555 (synopsis "Formatter for Python code")
14556 (description "YAPF is a formatter for Python code. It's based off of
14557 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14558 takes the code and reformats it to the best formatting that conforms to the
14559 style guide, even if the original code didn't violate the style guide.")
14560 (license license:asl2.0)))
14561
14562 (define-public python2-yapf
14563 (package-with-python2 python-yapf))
14564
14565 (define-public python-gyp
14566 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14567 (revision "0"))
14568 (package
14569 (name "python-gyp")
14570 ;; Google does not release versions,
14571 ;; based on second most recent commit date.
14572 (version (git-version "0.0.0" revision commit))
14573 (source
14574 (origin
14575 ;; Google does not release tarballs,
14576 ;; git checkout is needed.
14577 (method git-fetch)
14578 (uri (git-reference
14579 (url "https://chromium.googlesource.com/external/gyp")
14580 (commit commit)))
14581 (file-name (git-file-name name version))
14582 (sha256
14583 (base32
14584 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14585 (build-system python-build-system)
14586 (home-page "https://gyp.gsrc.io/")
14587 (synopsis "GYP is a Meta-Build system")
14588 (description
14589 "GYP builds build systems for large, cross platform applications.
14590 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14591 files, and Makefiles.")
14592 (license license:bsd-3))))
14593
14594 (define-public python2-gyp
14595 (package-with-python2 python-gyp))
14596
14597 (define-public python-whatever
14598 (package
14599 (name "python-whatever")
14600 (version "0.6")
14601 (source
14602 (origin
14603 (method git-fetch)
14604 (uri (git-reference
14605 (url "https://github.com/Suor/whatever")
14606 (commit version)))
14607 (file-name (git-file-name name version))
14608 (sha256
14609 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
14610 (build-system python-build-system)
14611 (arguments
14612 `(#:phases
14613 (modify-phases %standard-phases
14614 (replace 'check
14615 (lambda _
14616 (invoke "py.test"))))))
14617 (native-inputs
14618 `(("python-pytest" ,python-pytest)))
14619 (home-page "http://github.com/Suor/whatever")
14620 (synopsis "Make anonymous functions by partial application of operators")
14621 (description "@code{whatever} provides an easy way to make anonymous
14622 functions by partial application of operators.")
14623 (license license:bsd-3)))
14624
14625 (define-public python2-whatever
14626 (package-with-python2 python-whatever))
14627
14628 (define-public python-funcy
14629 (package
14630 (name "python-funcy")
14631 (version "1.11")
14632 (source
14633 (origin
14634 (method git-fetch)
14635 (uri (git-reference
14636 (url "https://github.com/Suor/funcy.git")
14637 (commit version)))
14638 (sha256
14639 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14640 (file-name (git-file-name name version))))
14641 (build-system python-build-system)
14642 (arguments
14643 `(#:phases
14644 (modify-phases %standard-phases
14645 (replace 'check
14646 (lambda _
14647 (invoke "py.test"))))))
14648 (native-inputs
14649 `(("python-pytest" ,python-pytest)
14650 ("python-whatever" ,python-whatever)))
14651 (home-page "http://github.com/Suor/funcy")
14652 (synopsis "Functional tools")
14653 (description "@code{funcy} is a library that provides functional tools.
14654 Examples are:
14655 @enumerate
14656 @item merge - Merges collections of the same type
14657 @item walk - Type-preserving map
14658 @item select - Selects a part of a collection
14659 @item take - Takes the first n items of a collection
14660 @item first - Takes the first item of a collection
14661 @item remove - Predicated-removes items of a collection
14662 @item concat - Concatenates two collections
14663 @item flatten - Flattens a collection with subcollections
14664 @item distinct - Returns only distinct items
14665 @item split - Predicated-splits a collection
14666 @item split_at - Splits a collection at a given item
14667 @item group_by - Groups items by group
14668 @item pairwise - Pairs off adjacent items
14669 @item partial - Partially-applies a function
14670 @item curry - Curries a function
14671 @item compose - Composes functions
14672 @item complement - Complements a predicate
14673 @item all_fn - \"all\" with predicate
14674 @end enumerate")
14675 (license license:bsd-3)))
14676
14677 (define-public python2-funcy
14678 (package-with-python2 python-funcy))
14679
14680 (define-public python-isoweek
14681 (package
14682 (name "python-isoweek")
14683 (version "1.3.3")
14684 (source
14685 (origin
14686 (method url-fetch)
14687 (uri (pypi-uri "isoweek" version))
14688 (sha256
14689 (base32
14690 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14691 (build-system python-build-system)
14692 (home-page "https://github.com/gisle/isoweek")
14693 (synopsis "Objects representing a week")
14694 (description "The @code{isoweek} module provide the class Week that
14695 implements the week definition of ISO 8601. This standard also defines
14696 a notation for identifying weeks; yyyyWww (where the W is a literal).
14697 Week instances stringify to this form.")
14698 (license license:bsd-3)))
14699
14700 (define-public python2-isoweek
14701 (package-with-python2 python-isoweek))
14702
14703 (define-public python-tokenize-rt
14704 (package
14705 (name "python-tokenize-rt")
14706 (version "2.0.1")
14707 (source
14708 (origin
14709 (method url-fetch)
14710 (uri (pypi-uri "tokenize-rt" version))
14711 (sha256
14712 (base32
14713 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14714 (build-system python-build-system)
14715 (home-page "https://github.com/asottile/tokenize-rt")
14716 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14717 (description
14718 "This Python library is a wrapper around @code{tokenize} from the Python
14719 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14720 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14721 and @code{tokens_to_src} to roundtrip.")
14722 (license license:expat)))
14723
14724 (define-public python-future-fstrings
14725 (package
14726 (name "python-future-fstrings")
14727 (version "0.4.1")
14728 (source
14729 (origin
14730 (method url-fetch)
14731 (uri (pypi-uri "future_fstrings" version))
14732 (sha256
14733 (base32
14734 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14735 (build-system python-build-system)
14736 (propagated-inputs
14737 `(("python-tokenize-rt" ,python-tokenize-rt)))
14738 (home-page "https://github.com/asottile/future-fstrings")
14739 (synopsis "Backport of fstrings to Python < 3.6")
14740 (description
14741 "This package provides a UTF-8 compatible encoding
14742 @code{future_fstrings}, which performs source manipulation. It decodes the
14743 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14744 @code{f} strings.")
14745 (license license:expat)))
14746
14747 (define-public python-typed-ast
14748 (package
14749 (name "python-typed-ast")
14750 (version "1.4.0")
14751 (source
14752 (origin
14753 (method git-fetch)
14754 (uri (git-reference
14755 (url "https://github.com/python/typed_ast.git")
14756 (commit version)))
14757 (sha256
14758 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14759 (file-name (git-file-name name version))))
14760 (build-system python-build-system)
14761 (arguments
14762 `(#:modules ((guix build utils)
14763 (guix build python-build-system)
14764 (ice-9 ftw)
14765 (srfi srfi-1)
14766 (srfi srfi-26))
14767 #:phases
14768 (modify-phases %standard-phases
14769 (replace 'check
14770 (lambda _
14771 (let ((cwd (getcwd)))
14772 (setenv "PYTHONPATH"
14773 (string-append cwd "/build/"
14774 (find (cut string-prefix? "lib" <>)
14775 (scandir (string-append cwd "/build")))
14776 ":"
14777 (getenv "PYTHONPATH"))))
14778 (invoke "pytest")
14779 #t)))))
14780 (native-inputs `(("python-pytest" ,python-pytest)))
14781 (home-page "https://github.com/python/typed_ast")
14782 (synopsis "Fork of Python @code{ast} modules with type comment support")
14783 (description "This package provides a parser similar to the standard
14784 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14785 include PEP 484 type comments and are independent of the version of Python
14786 under which they are run. The @code{typed_ast} parsers produce the standard
14787 Python AST (plus type comments), and are both fast and correct, as they are
14788 based on the CPython 2.7 and 3.7 parsers.")
14789 ;; See the file "LICENSE" for the details.
14790 (license (list license:psfl
14791 license:asl2.0
14792 license:expat)))) ;ast27/Parser/spark.py
14793
14794 (define-public python-typing
14795 (package
14796 (name "python-typing")
14797 (version "3.6.6")
14798 (source
14799 (origin
14800 (method url-fetch)
14801 (uri (pypi-uri "typing" version))
14802 (sha256
14803 (base32
14804 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14805 (build-system python-build-system)
14806 (home-page "https://docs.python.org/3/library/typing.html")
14807 (synopsis "Type hints for Python")
14808 (description "This is a backport of the standard library @code{typing}
14809 module to Python versions older than 3.5. Typing defines a standard notation
14810 for Python function and variable type annotations. The notation can be used
14811 for documenting code in a concise, standard format, and it has been designed
14812 to also be used by static and runtime type checkers, static analyzers, IDEs
14813 and other tools.")
14814 (license license:psfl)))
14815
14816 (define-public python2-typing
14817 (package-with-python2 python-typing))
14818
14819 (define-public python-typing-extensions
14820 (package
14821 (name "python-typing-extensions")
14822 (version "3.7.2")
14823 (source
14824 (origin
14825 (method url-fetch)
14826 (uri (pypi-uri "typing_extensions" version))
14827 (sha256
14828 (base32
14829 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14830 (build-system python-build-system)
14831 (home-page
14832 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14833 (synopsis "Experimental type hints for Python")
14834 (description
14835 "The typing_extensions module contains additional @code{typing} hints not
14836 yet present in the of the @code{typing} standard library.
14837 Included are implementations of:
14838 @enumerate
14839 @item ClassVar
14840 @item ContextManager
14841 @item Counter
14842 @item DefaultDict
14843 @item Deque
14844 @item NewType
14845 @item NoReturn
14846 @item overload
14847 @item Protocol
14848 @item runtime
14849 @item Text
14850 @item Type
14851 @item TYPE_CHECKING
14852 @item AsyncGenerator
14853 @end enumerate\n")
14854 (license license:psfl)))
14855
14856 (define-public bpython
14857 (package
14858 (name "bpython")
14859 (version "0.18")
14860 (source
14861 (origin
14862 (method url-fetch)
14863 (uri (pypi-uri "bpython" version))
14864 (sha256
14865 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
14866 (build-system python-build-system)
14867 (arguments
14868 `(#:phases
14869 (modify-phases %standard-phases
14870 (add-after 'unpack 'remove-failing-test
14871 (lambda _
14872 ;; Remove failing test. FIXME: make it pass
14873 (delete-file "bpython/test/test_args.py")
14874 #t))
14875 (add-after 'wrap 'add-aliases
14876 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14877 (lambda* (#:key outputs #:allow-other-keys)
14878 (let ((out (assoc-ref outputs "out")))
14879 (for-each
14880 (lambda (old new)
14881 (symlink old (string-append out "/bin/" new)))
14882 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14883 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14884 #t)))))
14885 (propagated-inputs
14886 `(("python-pygments" ,python-pygments)
14887 ("python-requests" ,python-requests)
14888 ("python-babel" ,python-babel) ; optional, for internationalization
14889 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14890 ("python-greenlet" ,python-greenlet)
14891 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14892 ("python-six" ,python-six)))
14893 (native-inputs
14894 `(("python-sphinx" ,python-sphinx)
14895 ("python-mock" ,python-mock)))
14896 (home-page "https://bpython-interpreter.org/")
14897 (synopsis "Fancy interface to the Python interpreter")
14898 (description "Bpython is a fancy interface to the Python
14899 interpreter. bpython's main features are
14900
14901 @enumerate
14902 @item in-line syntax highlighting,
14903 @item readline-like autocomplete with suggestions displayed as you type,
14904 @item expected parameter list for any Python function,
14905 @item \"rewind\" function to pop the last line of code from memory and
14906 re-evaluate,
14907 @item send the code you've entered off to a pastebin,
14908 @item save the code you've entered to a file, and
14909 @item auto-indentation.
14910 @end enumerate")
14911 (license license:expat)))
14912
14913 (define-public bpython2
14914 (let ((base (package-with-python2
14915 (strip-python2-variant bpython))))
14916 (package (inherit base)
14917 (name "bpython2")
14918 (arguments
14919 `(#:python ,python-2
14920 #:phases
14921 (modify-phases %standard-phases
14922 (add-after 'unpack 'remove-failing-test
14923 (lambda _
14924 ;; Remove failing test. FIXME: make it pass
14925 (delete-file "bpython/test/test_args.py")
14926 ;; Disable failing test-cases (renaming inhibits they are
14927 ;; discovered)
14928 (substitute* "bpython/test/test_curtsies_repl.py"
14929 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14930 (string-append a "xxx_off_" b))
14931 (("^(\\s*def )(test_complex\\W)" _ a b)
14932 (string-append a "xxx_off_" b)))
14933 #t))
14934 (add-before 'build 'rename-scripts
14935 ;; rename the scripts to bypthon2, bpdb2, etc.
14936 (lambda _
14937 (substitute* "setup.py"
14938 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14939 (string-append name "2" rest "\n"))
14940 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14941 (string-append name "2" (or sub "") rest "\n")))
14942 #t))))))))
14943
14944 (define-public python-pyinotify
14945 (package
14946 (name "python-pyinotify")
14947 (version "0.9.6")
14948 (source (origin
14949 (method url-fetch)
14950 (uri (pypi-uri "pyinotify" version))
14951 (sha256
14952 (base32
14953 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14954 (build-system python-build-system)
14955 (arguments `(#:tests? #f)) ;no tests
14956 (home-page "https://github.com/seb-m/pyinotify")
14957 (synopsis "Python library for monitoring inotify events")
14958 (description
14959 "@code{pyinotify} provides a Python interface for monitoring
14960 file system events on Linux.")
14961 (license license:expat)))
14962
14963 (define-public python2-pyinotify
14964 (package-with-python2 python-pyinotify))
14965
14966 ;; Ada parser uses this version.
14967 (define-public python2-quex-0.67.3
14968 (package
14969 (name "python2-quex")
14970 (version "0.67.3")
14971 (source
14972 (origin
14973 (method url-fetch)
14974 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14975 (version-major+minor version)
14976 "/quex-" version ".zip"))
14977 (sha256
14978 (base32
14979 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14980 (build-system python-build-system)
14981 (native-inputs
14982 `(("unzip" ,unzip)))
14983 (arguments
14984 `(#:python ,python-2
14985 #:tests? #f
14986 #:phases
14987 (modify-phases %standard-phases
14988 (delete 'configure)
14989 (delete 'build)
14990 (replace 'install
14991 (lambda* (#:key outputs #:allow-other-keys)
14992 (let* ((out (assoc-ref outputs "out"))
14993 (share/quex (string-append out "/share/quex"))
14994 (bin (string-append out "/bin")))
14995 (copy-recursively "." share/quex)
14996 (mkdir-p bin)
14997 (symlink (string-append share/quex "/quex-exe.py")
14998 (string-append bin "/quex"))
14999 #t))))))
15000 (native-search-paths
15001 (list (search-path-specification
15002 (variable "QUEX_PATH")
15003 (files '("share/quex")))))
15004 (home-page "http://quex.sourceforge.net/")
15005 (synopsis "Lexical analyzer generator in Python")
15006 (description "@code{quex} is a lexical analyzer generator in Python.")
15007 (license license:lgpl2.1+))) ; Non-military
15008
15009 (define-public python2-quex
15010 (package (inherit python2-quex-0.67.3)
15011 (name "python2-quex")
15012 (version "0.68.1")
15013 (source
15014 (origin
15015 (method url-fetch)
15016 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15017 (sha256
15018 (base32
15019 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15020 (file-name (string-append name "-" version ".tar.gz"))))))
15021
15022 (define-public python-more-itertools
15023 (package
15024 (name "python-more-itertools")
15025 (version "7.1.0")
15026 (source
15027 (origin
15028 (method url-fetch)
15029 (uri (pypi-uri "more-itertools" version))
15030 (sha256
15031 (base32
15032 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15033 (build-system python-build-system)
15034 (home-page "https://github.com/erikrose/more-itertools")
15035 (synopsis "More routines for operating on iterables, beyond itertools")
15036 (description "Python's built-in @code{itertools} module implements a
15037 number of iterator building blocks inspired by constructs from APL, Haskell,
15038 and SML. @code{more-itertools} includes additional building blocks for
15039 working with iterables.")
15040 (properties `((python2-variant . ,(delay python2-more-itertools))))
15041 (license license:expat)))
15042
15043 ;; The 5.x series are the last versions supporting Python 2.7.
15044 (define-public python2-more-itertools
15045 (package
15046 (inherit python-more-itertools)
15047 (name "python2-more-itertools")
15048 (version "5.0.0")
15049 (source (origin
15050 (method url-fetch)
15051 (uri (pypi-uri "more-itertools" version))
15052 (sha256
15053 (base32
15054 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15055 (arguments
15056 `(#:python ,python2-minimal))
15057 (propagated-inputs
15058 `(("python2-six" ,python2-six-bootstrap)))))
15059
15060 (define-public python-latexcodec
15061 (package
15062 (name "python-latexcodec")
15063 (version "1.0.7")
15064 (source
15065 (origin
15066 (method url-fetch)
15067 (uri (pypi-uri "latexcodec" version))
15068 (sha256
15069 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15070 (build-system python-build-system)
15071 (inputs
15072 `(("python-six" ,python-six)))
15073 (home-page "https://readthedocs.org/projects/latexcodec/")
15074 (synopsis "Work with LaTeX code in Python")
15075 (description "Lexer and codec to work with LaTeX code in Python.")
15076 (license license:expat)))
15077
15078 (define-public python-pybtex
15079 (package
15080 (name "python-pybtex")
15081 (version "0.22.2")
15082 (source
15083 (origin
15084 (method url-fetch)
15085 (uri (pypi-uri "pybtex" version))
15086 (sha256
15087 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15088 (build-system python-build-system)
15089 (native-inputs
15090 `(("python-nose" ,python-nose)))
15091 (inputs
15092 `(("python-latexcodec" ,python-latexcodec)
15093 ("python-pyyaml" ,python-pyyaml)
15094 ("python-six" ,python-six)))
15095 (arguments
15096 `(#:test-target "nosetests"))
15097 (home-page "https://pybtex.org/")
15098 (synopsis "BibTeX-compatible bibliography processor")
15099 (description "Pybtex is a BibTeX-compatible bibliography processor written
15100 in Python. You can simply type pybtex instead of bibtex.")
15101 (license license:expat)))
15102
15103 (define-public python-onetimepass
15104 (package
15105 (name "python-onetimepass")
15106 (version "1.0.1")
15107 (source
15108 (origin
15109 (method url-fetch)
15110 (uri (pypi-uri "onetimepass" version))
15111 (sha256
15112 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15113 (build-system python-build-system)
15114 (propagated-inputs `(("python-six" ,python-six)))
15115 (home-page "https://github.com/tadeck/onetimepass/")
15116 (synopsis "One-time password library")
15117 (description "Python one-time password library for HMAC-based (HOTP) and
15118 time-based (TOTP) passwords.")
15119 (license license:expat)))
15120
15121 (define-public python-parso
15122 (package
15123 (name "python-parso")
15124 (version "0.5.1")
15125 (source
15126 (origin
15127 (method url-fetch)
15128 (uri (pypi-uri "parso" version))
15129 (sha256
15130 (base32
15131 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15132 (native-inputs
15133 `(("python-pytest" ,python-pytest)))
15134 (build-system python-build-system)
15135 (arguments
15136 `(#:phases (modify-phases %standard-phases
15137 (replace 'check
15138 (lambda _ (invoke "pytest" "-vv"))))))
15139 (home-page "https://github.com/davidhalter/parso")
15140 (synopsis "Python Parser")
15141 (description "Parso is a Python parser that supports error recovery and
15142 round-trip parsing for different Python versions (in multiple Python versions).
15143 Parso is also able to list multiple syntax errors in your Python file.")
15144 (license license:expat)))
15145
15146 (define-public python2-parso
15147 (package-with-python2 python-parso))
15148
15149 (define-public python-async-generator
15150 (package
15151 (name "python-async-generator")
15152 (version "1.10")
15153 (source
15154 (origin
15155 (method url-fetch)
15156 (uri (pypi-uri "async_generator" version))
15157 (sha256
15158 (base32
15159 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15160 (build-system python-build-system)
15161 (native-inputs
15162 `(("python-pytest" ,python-pytest)))
15163 (home-page "https://github.com/python-trio/async_generator")
15164 (synopsis "Async generators and context managers for Python 3.5+")
15165 (description "@code{async_generator} back-ports Python 3.6's native async
15166 generators and Python 3.7's context managers into Python 3.5.")
15167 ;; Dual licensed.
15168 (license (list license:expat license:asl2.0))))
15169
15170 (define-public python-async-timeout
15171 (package
15172 (name "python-async-timeout")
15173 (version "3.0.1")
15174 (source
15175 (origin
15176 (method url-fetch)
15177 (uri (pypi-uri "async-timeout" version))
15178 (sha256
15179 (base32
15180 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15181 (build-system python-build-system)
15182 (home-page "https://github.com/aio-libs/async_timeout/")
15183 (synopsis "Timeout context manager for asyncio programs")
15184 (description "@code{async-timeout} provides a timeout timeout context
15185 manager compatible with @code{asyncio}.")
15186 (license license:asl2.0)))
15187
15188 (define-public python-glob2
15189 (package
15190 (name "python-glob2")
15191 (version "0.7")
15192 (source
15193 (origin
15194 (method git-fetch)
15195 (uri (git-reference
15196 (url "https://github.com/miracle2k/python-glob2.git")
15197 (commit (string-append "v" version))))
15198 (file-name (git-file-name name version))
15199 (sha256
15200 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15201 (build-system python-build-system)
15202 (home-page "https://github.com/miracle2k/python-glob2/")
15203 (synopsis "Extended Version of the python buildin glob module")
15204 (description "This is an extended version of the Python
15205 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15206 adds:
15207
15208 @itemize
15209 @item The ability to capture the text matched by glob patterns, and return
15210 those matches alongside the file names.
15211 @item A recursive @code{**} globbing syntax, akin for example to the
15212 @code{globstar} option of Bash.
15213 @item The ability to replace the file system functions used, in order to glob
15214 on virtual file systems.
15215 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15216 @end itemize
15217
15218 Glob2 currently based on the glob code from Python 3.3.1.")
15219 (license license:bsd-2)))
15220
15221 (define-public python2-glob2
15222 (package-with-python2 python-glob2))
15223
15224 (define-public python-gipc
15225 (package
15226 (name "python-gipc")
15227 (version "0.6.0")
15228 (source
15229 (origin
15230 (method url-fetch)
15231 (uri (pypi-uri "gipc" version ".zip"))
15232 (sha256
15233 (base32
15234 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15235 (build-system python-build-system)
15236 (native-inputs
15237 `(("unzip" ,unzip)))
15238 (propagated-inputs
15239 `(("python-gevent" ,python-gevent)))
15240 (home-page "http://gehrcke.de/gipc")
15241 (synopsis "Child process management in the context of gevent")
15242 (description "Usage of Python's multiprocessing package in a
15243 gevent-powered application may raise problems. With @code{gipc},
15244 process-based child processes can safely be created anywhere within a
15245 gevent-powered application.")
15246 (license license:expat)))
15247
15248 (define-public python2-gipc
15249 (package-with-python2 python-gipc))
15250
15251 (define-public python-fusepy
15252 (package
15253 (name "python-fusepy")
15254 (version "2.0.4")
15255 (source
15256 (origin
15257 (method url-fetch)
15258 (uri (pypi-uri "fusepy" version))
15259 (sha256
15260 (base32
15261 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15262 (build-system python-build-system)
15263 (arguments
15264 `(#:phases
15265 (modify-phases %standard-phases
15266 (add-before 'build 'set-library-file-name
15267 (lambda* (#:key inputs #:allow-other-keys)
15268 (let ((fuse (assoc-ref inputs "fuse")))
15269 (substitute* "fuse.py"
15270 (("find_library\\('fuse'\\)")
15271 (string-append "'" fuse "/lib/libfuse.so'")))
15272 #t))))))
15273 (propagated-inputs
15274 `(("fuse" ,fuse)))
15275 (home-page "https://github.com/fusepy/fusepy")
15276 (synopsis "Simple ctypes bindings for FUSE")
15277 (description "Python module that provides a simple interface to FUSE and
15278 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15279 (license license:isc)))
15280
15281 (define-public python2-fusepy
15282 (package-with-python2 python-fusepy))
15283
15284 (define-public python2-gdrivefs
15285 (package
15286 (name "python2-gdrivefs")
15287 (version "0.14.9")
15288 (source
15289 (origin
15290 (method url-fetch)
15291 (uri (pypi-uri "gdrivefs" version))
15292 (sha256
15293 (base32
15294 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15295 (build-system python-build-system)
15296 (arguments
15297 `(#:python ,python-2
15298 #:phases
15299 (modify-phases %standard-phases
15300 (add-before 'build 'patch-setup-py
15301 (lambda _
15302 ;; Update requirements from dependency==version
15303 ;; to dependency>=version
15304 (substitute* "gdrivefs/resources/requirements.txt"
15305 (("==") ">="))
15306 #t)))))
15307 (native-inputs
15308 `(("python2-gipc" ,python2-gipc)
15309 ("python2-gevent" ,python2-gevent)
15310 ("python2-greenlet" ,python2-greenlet)
15311 ("python2-httplib2" ,python2-httplib2)
15312 ("python2-uritemplate" ,python2-uritemplate)
15313 ("python2-oauth2client" ,python2-oauth2client)
15314 ("python2-six" ,python2-six)))
15315 (propagated-inputs
15316 `(("python2-dateutil" ,python2-dateutil)
15317 ("python2-fusepy" ,python2-fusepy)
15318 ("python2-google-api-client" ,python2-google-api-client)))
15319 (home-page "https://github.com/dsoprea/GDriveFS")
15320 (synopsis "Mount Google Drive as a local file system")
15321 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15322 under Python 2.7.")
15323 (license license:gpl2)))
15324
15325 (define-public pybind11
15326 (package
15327 (name "pybind11")
15328 (version "2.3.0")
15329 (source (origin
15330 (method git-fetch)
15331 (uri (git-reference
15332 (url "https://github.com/pybind/pybind11.git")
15333 (commit (string-append "v" version))))
15334 (sha256
15335 (base32
15336 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15337 (file-name (git-file-name name version))))
15338 (build-system cmake-build-system)
15339 (native-inputs
15340 `(("python" ,python)
15341 ("python-pytest" ,python-pytest)))
15342 (arguments
15343 `(#:test-target "check"))
15344 (home-page "https://github.com/pybind/pybind11/")
15345 (synopsis "Seamless operability between C++11 and Python")
15346 (description "pybind11 is a lightweight header-only library that exposes
15347 C++ types in Python and vice versa, mainly to create Python bindings of
15348 existing C++ code. Its goals and syntax are similar to the excellent
15349 Boost.Python library by David Abrahams: to minimize boilerplate code in
15350 traditional extension modules by inferring type information using compile-time
15351 introspection.")
15352 (license license:expat)))
15353
15354 (define-public python-fasteners
15355 (package
15356 (name "python-fasteners")
15357 (version "0.14.1")
15358 (source
15359 (origin
15360 (method url-fetch)
15361 (uri (pypi-uri "fasteners" version))
15362 (sha256
15363 (base32
15364 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15365 (build-system python-build-system)
15366 (propagated-inputs
15367 `(("python-monotonic" ,python-monotonic)
15368 ("python-six" ,python-six)
15369 ("python-testtools" ,python-testtools)))
15370 (home-page "https://github.com/harlowja/fasteners")
15371 (synopsis "Python package that provides useful locks")
15372 (description
15373 "This package provides a Python program that provides following locks:
15374
15375 @itemize
15376 @item Locking decorator
15377 @item Reader-writer locks
15378 @item Inter-process locks
15379 @item Generic helpers
15380 @end itemize\n")
15381 (properties `((python2-variant . ,(delay python2-fasteners))))
15382 (license license:asl2.0)))
15383
15384 (define-public python2-fasteners
15385 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15386 (package
15387 (inherit base)
15388 (propagated-inputs
15389 `(("python2-futures" ,python2-futures)
15390 ,@(package-propagated-inputs base))))))
15391
15392 (define-public python-requests-file
15393 (package
15394 (name "python-requests-file")
15395 (version "1.4.3")
15396 (source
15397 (origin
15398 (method url-fetch)
15399 (uri (pypi-uri "requests-file" version))
15400 (sha256
15401 (base32
15402 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15403 (build-system python-build-system)
15404 (propagated-inputs
15405 `(("python-requests" ,python-requests)
15406 ("python-six" ,python-six)))
15407 (home-page
15408 "https://github.com/dashea/requests-file")
15409 (synopsis "File transport adapter for Requests")
15410 (description
15411 "Requests-File is a transport adapter for use with the Requests Python
15412 library to allow local file system access via @code{file://} URLs.")
15413 (license license:asl2.0)))
15414
15415 (define-public python2-requests-file
15416 (package-with-python2 python-requests-file))
15417
15418 (define-public python-tldextract
15419 (package
15420 (name "python-tldextract")
15421 (version "2.2.0")
15422 (source
15423 (origin
15424 (method url-fetch)
15425 (uri (pypi-uri "tldextract" version))
15426 (sha256
15427 (base32
15428 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15429 (build-system python-build-system)
15430 (native-inputs
15431 `(("python-pytest" ,python-pytest)
15432 ("python-responses" ,python-responses)))
15433 (propagated-inputs
15434 `(("python-idna" ,python-idna)
15435 ("python-requests" ,python-requests)
15436 ("python-requests-file" ,python-requests-file)))
15437 (home-page
15438 "https://github.com/john-kurkowski/tldextract")
15439 (synopsis
15440 "Separate the TLD from the registered domain and subdomains of a URL")
15441 (description
15442 "TLDExtract accurately separates the TLD from the registered domain and
15443 subdomains of a URL, using the Public Suffix List. By default, this includes
15444 the public ICANN TLDs and their exceptions. It can optionally support the
15445 Public Suffix List's private domains as well.")
15446 (license license:bsd-3)))
15447
15448 (define-public python2-tldextract
15449 (package-with-python2 python-tldextract))
15450
15451 (define-public python-pynamecheap
15452 (package
15453 (name "python-pynamecheap")
15454 (version "0.0.3")
15455 (source
15456 (origin
15457 (method url-fetch)
15458 (uri (pypi-uri "PyNamecheap" version))
15459 (sha256
15460 (base32
15461 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15462 (build-system python-build-system)
15463 (propagated-inputs
15464 `(("python-requests" ,python-requests)))
15465 (home-page
15466 "https://github.com/Bemmu/PyNamecheap")
15467 (synopsis
15468 "Namecheap API client in Python")
15469 (description
15470 "PyNamecheap is a Namecheap API client in Python.")
15471 (license license:expat)))
15472
15473 (define-public python2-pynamecheap
15474 (package-with-python2 python-pynamecheap))
15475
15476 (define-public python-dns-lexicon
15477 (package
15478 (name "python-dns-lexicon")
15479 (version "2.4.0")
15480 (source
15481 (origin
15482 (method url-fetch)
15483 (uri (pypi-uri "dns-lexicon" version))
15484 (sha256
15485 (base32
15486 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15487 (build-system python-build-system)
15488 (arguments
15489 `(#:tests? #f)) ;requires internet access
15490 (propagated-inputs
15491 `(("python-future" ,python-future)
15492 ("python-pynamecheap" ,python-pynamecheap)
15493 ("python-requests" ,python-requests)
15494 ("python-tldextract" ,python-tldextract)
15495 ("python-urllib3" ,python-urllib3)))
15496 (home-page "https://github.com/AnalogJ/lexicon")
15497 (synopsis
15498 "Manipulate DNS records on various DNS providers")
15499 (description
15500 "Lexicon provides a way to manipulate DNS records on multiple DNS
15501 providers in a standardized way. It has a CLI but it can also be used as a
15502 Python library. It was designed to be used in automation, specifically with
15503 Let's Encrypt.")
15504 (license license:expat)))
15505
15506 (define-public python2-dns-lexicon
15507 (package-with-python2 python-dns-lexicon))
15508
15509 (define-public python-commandlines
15510 (package
15511 (name "python-commandlines")
15512 (version "0.4.1")
15513 (source
15514 (origin
15515 (method url-fetch)
15516 (uri (pypi-uri "commandlines" version))
15517 (sha256
15518 (base32
15519 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15520 (build-system python-build-system)
15521 (home-page "https://github.com/chrissimpkins/commandlines")
15522 (synopsis "Command line argument to object parsing library")
15523 (description
15524 "@code{Commandlines} is a Python library for command line application
15525 development that supports command line argument parsing, command string
15526 validation testing and application logic.")
15527 (license license:expat)))
15528
15529 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15530 ;; python-numba. They have a very unflexible relationship.
15531 (define-public python-numba
15532 (package
15533 (name "python-numba")
15534 (version "0.46.0")
15535 (source
15536 (origin
15537 (method url-fetch)
15538 (uri (pypi-uri "numba" version))
15539 (sha256
15540 (base32
15541 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
15542 (build-system python-build-system)
15543 (arguments
15544 `(#:modules ((guix build utils)
15545 (guix build python-build-system)
15546 (ice-9 ftw)
15547 (srfi srfi-1)
15548 (srfi srfi-26))
15549 #:phases
15550 (modify-phases %standard-phases
15551 (add-after 'unpack 'disable-proprietary-features
15552 (lambda _
15553 (setenv "NUMBA_DISABLE_HSA" "1")
15554 (setenv "NUMBA_DISABLE_CUDA" "1")
15555 #t))
15556 (add-after 'unpack 'remove-failing-tests
15557 (lambda _
15558 ;; FIXME: These tests fail for unknown reasons:
15559 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15560 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15561 (substitute* "numba/tests/test_dispatcher.py"
15562 (("def test(_non_writable_pycache)" _ m)
15563 (string-append "def guix_skip" m))
15564 (("def test(_non_creatable_pycache)" _ m)
15565 (string-append "def guix_skip" m))
15566 (("def test(_frozen)" _ m)
15567 (string-append "def guix_skip" m)))
15568
15569 ;; These tests fail because we don't run the tests from the build
15570 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15571 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
15572 (substitute* "numba/tests/test_pycc.py"
15573 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15574 (string-append "def guix_skip" m)))
15575
15576 ;; These tests fail because our version of Python does not have
15577 ;; a recognizable front-end for the Numba distribution to use
15578 ;; to check against.
15579 (substitute* "numba/tests/test_entrypoints.py"
15580 (("def test(_init_entrypoint)" _ m)
15581 (string-append "def guix_skip" m)))
15582 (substitute* "numba/tests/test_jitclasses.py"
15583 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15584 (string-append "def guix_skip" m)))
15585 #t))
15586 (replace 'check
15587 (lambda _
15588 (let ((cwd (getcwd)))
15589 (setenv "PYTHONPATH"
15590 (string-append cwd "/build/"
15591 (find (cut string-prefix? "lib" <>)
15592 (scandir (string-append cwd "/build")))
15593 ":"
15594 (getenv "PYTHONPATH")))
15595 ;; Something is wrong with the PYTHONPATH when running the
15596 ;; tests from the build directory, as it complains about not being
15597 ;; able to import certain modules.
15598 (with-directory-excursion "/tmp"
15599 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15600 #t)))))
15601 (propagated-inputs
15602 `(("python-llvmlite" ,python-llvmlite)
15603 ("python-numpy" ,python-numpy)
15604 ("python-singledispatch" ,python-singledispatch)))
15605 ;; Needed for tests.
15606 (inputs
15607 `(("python-jinja2" ,python-jinja2)
15608 ("python-pygments" ,python-pygments)))
15609 (home-page "https://numba.pydata.org")
15610 (synopsis "Compile Python code using LLVM")
15611 (description "Numba gives you the power to speed up your applications with
15612 high performance functions written directly in Python. With a few
15613 annotations, array-oriented and math-heavy Python code can be just-in-time
15614 compiled to native machine instructions, similar in performance to C, C++ and
15615 Fortran, without having to switch languages or Python interpreters.
15616
15617 Numba works by generating optimized machine code using the LLVM compiler
15618 infrastructure at import time, runtime, or statically (using the included pycc
15619 tool).")
15620 (license license:bsd-3)))
15621
15622 (define-public python-anndata
15623 (package
15624 (name "python-anndata")
15625 (version "0.6.18")
15626 (source
15627 (origin
15628 (method url-fetch)
15629 (uri (pypi-uri "anndata" version))
15630 (sha256
15631 (base32
15632 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15633 (build-system python-build-system)
15634 (propagated-inputs
15635 `(("python-h5py" ,python-h5py)
15636 ("python-natsort" ,python-natsort)
15637 ("python-pandas" ,python-pandas)
15638 ("python-scipy" ,python-scipy)))
15639 (home-page "https://github.com/theislab/anndata")
15640 (synopsis "Annotated data for data analysis pipelines")
15641 (description "Anndata is a package for simple (functional) high-level APIs
15642 for data analysis pipelines. In this context, it provides an efficient,
15643 scalable way of keeping track of data together with learned annotations and
15644 reduces the code overhead typically encountered when using a mostly
15645 object-oriented library such as @code{scikit-learn}.")
15646 (license license:bsd-3)))
15647
15648 (define-public python-dill
15649 (package
15650 (name "python-dill")
15651 (version "0.3.1.1")
15652 (source
15653 (origin
15654 (method url-fetch)
15655 (uri (pypi-uri "dill" version))
15656 (sha256
15657 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
15658 (build-system python-build-system)
15659 (arguments
15660 `(#:phases
15661 (modify-phases %standard-phases
15662 (replace 'check
15663 (lambda _
15664 (with-directory-excursion "/tmp"
15665 (invoke "nosetests" "-v"))
15666 #t)))))
15667 (native-inputs
15668 `(("python-nose" ,python-nose)))
15669 (home-page "https://pypi.org/project/dill/")
15670 (synopsis "Serialize all of Python")
15671 (description "Dill extends Python's @code{pickle} module for serializing
15672 and de-serializing Python objects to the majority of the built-in Python
15673 types. Dill provides the user the same interface as the @code{pickle} module,
15674 and also includes some additional features. In addition to pickling Python
15675 objects, @code{dill} provides the ability to save the state of an interpreter
15676 session in a single command. Hence, it would be feasible to save a
15677 interpreter session, close the interpreter, ship the pickled file to another
15678 computer, open a new interpreter, unpickle the session and thus continue from
15679 the saved state of the original interpreter session.")
15680 (license license:bsd-3)))
15681
15682 (define-public python-multiprocess
15683 (package
15684 (name "python-multiprocess")
15685 (version "0.70.9")
15686 (source
15687 (origin
15688 (method url-fetch)
15689 (uri (pypi-uri "multiprocess" version))
15690 (sha256
15691 (base32
15692 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
15693 (build-system python-build-system)
15694 (arguments
15695 `(#:phases
15696 (modify-phases %standard-phases
15697 (add-after 'unpack 'disable-broken-tests
15698 (lambda _
15699 ;; This test is broken as there is no keyboard interrupt.
15700 (substitute* "py3.7/multiprocess/tests/__init__.py"
15701 (("^(.*)def test_wait_result"
15702 line indent)
15703 (string-append indent
15704 "@unittest.skip(\"Disabled by Guix\")\n"
15705 line)))
15706 #t))
15707 ;; Tests must be run after installation.
15708 (delete 'check)
15709 (add-after 'install 'check
15710 (lambda* (#:key inputs outputs #:allow-other-keys)
15711 (add-installed-pythonpath inputs outputs)
15712 (invoke "python" "-m" "multiprocess.tests")
15713 #t)))))
15714 (propagated-inputs
15715 `(("python-dill" ,python-dill)))
15716 (home-page "https://pypi.org/project/multiprocess/")
15717 (synopsis "Multiprocessing and multithreading in Python")
15718 (description
15719 "This package is a fork of the multiprocessing Python package, a package
15720 which supports the spawning of processes using the API of the standard
15721 library's @code{threading} module.")
15722 (license license:bsd-3)))
15723
15724 (define-public python-toolz
15725 (package
15726 (name "python-toolz")
15727 (version "0.9.0")
15728 (source
15729 (origin
15730 (method url-fetch)
15731 (uri (pypi-uri "toolz" version))
15732 (sha256
15733 (base32
15734 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15735 (build-system python-build-system)
15736 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15737 ;; unregistered loader type"
15738 (arguments '(#:tests? #f))
15739 (home-page "https://github.com/pytoolz/toolz/")
15740 (synopsis "List processing tools and functional utilities")
15741 (description
15742 "This package provides a set of utility functions for iterators,
15743 functions, and dictionaries.")
15744 (license license:bsd-3)))
15745
15746 (define-public python2-toolz
15747 (package-with-python2 python-toolz))
15748
15749 (define-public python-cytoolz
15750 (package
15751 (name "python-cytoolz")
15752 (version "0.9.0.1")
15753 (source
15754 (origin
15755 (method url-fetch)
15756 (uri (pypi-uri "cytoolz" version))
15757 (sha256
15758 (base32
15759 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15760 (build-system python-build-system)
15761 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15762 ;; 'exceptions'"
15763 (arguments '(#:tests? #f))
15764 (propagated-inputs
15765 `(("python-toolz" ,python-toolz)))
15766 (native-inputs
15767 `(("python-cython" ,python-cython)))
15768 (home-page "https://github.com/pytoolz/cytoolz")
15769 (synopsis "High performance functional utilities")
15770 (description
15771 "The cytoolz package implements the same API as provided by toolz. The
15772 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15773 that is accessible to other projects developed in Cython.")
15774 (license license:bsd-3)))
15775
15776 (define-public python-sortedcontainers
15777 (package
15778 (name "python-sortedcontainers")
15779 (version "2.1.0")
15780 (source
15781 (origin
15782 (method url-fetch)
15783 (uri (pypi-uri "sortedcontainers" version))
15784 (sha256
15785 (base32
15786 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
15787 (build-system python-build-system)
15788 (native-inputs
15789 `(("python-tox" ,python-tox)))
15790 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15791 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15792 (description
15793 "This package provides a sorted collections library, written in
15794 pure-Python.")
15795 (license license:asl2.0)))
15796
15797 (define-public python-cloudpickle
15798 (package
15799 (name "python-cloudpickle")
15800 (version "0.6.1")
15801 (source
15802 (origin
15803 (method url-fetch)
15804 (uri (pypi-uri "cloudpickle" version))
15805 (sha256
15806 (base32
15807 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15808 (build-system python-build-system)
15809 ;; FIXME: there are 5 errors in 122 tests:
15810 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15811 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15812 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15813 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15814 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15815 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15816 (arguments '(#:tests? #f))
15817 (native-inputs
15818 `(("python-pytest" ,python-pytest)
15819 ("python-mock" ,python-mock)
15820 ("python-tornado" ,python-tornado)))
15821 (home-page "https://github.com/cloudpipe/cloudpickle")
15822 (synopsis "Extended pickling support for Python objects")
15823 (description
15824 "Cloudpickle makes it possible to serialize Python constructs not
15825 supported by the default pickle module from the Python standard library. It
15826 is especially useful for cluster computing where Python expressions are
15827 shipped over the network to execute on remote hosts, possibly close to the
15828 data.")
15829 (license license:bsd-3)))
15830
15831 (define-public python2-cloudpickle
15832 (package-with-python2 python-cloudpickle))
15833
15834 (define-public python-locket
15835 (package
15836 (name "python-locket")
15837 (version "0.2.0")
15838 (source
15839 (origin
15840 (method url-fetch)
15841 (uri (pypi-uri "locket" version))
15842 (sha256
15843 (base32
15844 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15845 (build-system python-build-system)
15846 (home-page "https://github.com/mwilliamson/locket.py")
15847 (synopsis "File-based locks for Python")
15848 (description
15849 "Locket implements a lock that can be used by multiple processes provided
15850 they use the same path.")
15851 (license license:bsd-2)))
15852
15853 (define-public python2-locket
15854 (package-with-python2 python-locket))
15855
15856 (define-public python-blosc
15857 (package
15858 (name "python-blosc")
15859 (version "1.5.1")
15860 (source
15861 (origin
15862 (method url-fetch)
15863 (uri (pypi-uri "blosc" version))
15864 (sha256
15865 (base32
15866 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15867 (build-system python-build-system)
15868 ;; FIXME: all tests pass, but then this error is printed:
15869 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15870 (arguments '(#:tests? #f))
15871 (propagated-inputs
15872 `(("python-numpy" ,python-numpy)))
15873 (home-page "https://github.com/blosc/python-blosc")
15874 (synopsis "Python wrapper for the Blosc data compressor library")
15875 (description "Blosc is a high performance compressor optimized for binary
15876 data. It has been designed to transmit data to the processor cache faster
15877 than the traditional, non-compressed, direct memory fetch approach via a
15878 @code{memcpy()} system call.
15879
15880 Blosc works well for compressing numerical arrays that contains data with
15881 relatively low entropy, like sparse data, time series, grids with
15882 regular-spaced values, etc.
15883
15884 This Python package wraps the Blosc library.")
15885 (license license:bsd-3)))
15886
15887 (define-public python2-blosc
15888 (package-with-python2 python-blosc))
15889
15890 (define-public python-partd
15891 (package
15892 (name "python-partd")
15893 (version "0.3.9")
15894 (source
15895 (origin
15896 (method url-fetch)
15897 (uri (pypi-uri "partd" version))
15898 (sha256
15899 (base32
15900 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15901 (build-system python-build-system)
15902 (propagated-inputs
15903 `(("python-blosc" ,python-blosc)
15904 ("python-locket" ,python-locket)
15905 ("python-numpy" ,python-numpy)
15906 ("python-pandas" ,python-pandas)
15907 ("python-pyzmq" ,python-pyzmq)
15908 ("python-toolz" ,python-toolz)))
15909 (home-page "https://github.com/dask/partd/")
15910 (synopsis "Appendable key-value storage")
15911 (description "Partd stores key-value pairs. Values are raw bytes. We
15912 append on old values. Partd excels at shuffling operations.")
15913 (license license:bsd-3)))
15914
15915 (define-public python2-partd
15916 (package-with-python2 python-partd))
15917
15918 (define-public python-fsspec
15919 (package
15920 (name "python-fsspec")
15921 (version "0.6.1")
15922 (source
15923 (origin
15924 (method url-fetch)
15925 (uri (pypi-uri "fsspec" version))
15926 (sha256
15927 (base32
15928 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
15929 (build-system python-build-system)
15930 (arguments '(#:tests? #f)) ; there are none
15931 (home-page "https://github.com/intake/filesystem_spec")
15932 (synopsis "File-system specification")
15933 (description "The purpose of this package is to produce a template or
15934 specification for a file-system interface, that specific implementations
15935 should follow, so that applications making use of them can rely on a common
15936 behavior and not have to worry about the specific internal implementation
15937 decisions with any given backend.")
15938 (license license:bsd-3)))
15939
15940 (define-public python-dask
15941 (package
15942 (name "python-dask")
15943 (version "2.9.0")
15944 (source
15945 (origin
15946 (method url-fetch)
15947 (uri (pypi-uri "dask" version))
15948 (sha256
15949 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
15950 (build-system python-build-system)
15951 (arguments
15952 `(#:phases
15953 (modify-phases %standard-phases
15954 (add-after 'unpack 'disable-broken-tests
15955 (lambda _
15956 ;; This test is marked as xfail when pytest-xdist is used.
15957 (substitute* "dask/tests/test_threaded.py"
15958 (("def test_interrupt\\(\\)" m)
15959 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15960 m)))
15961 ;; This one fails with a type error:
15962 ;; TypeError: Already tz-aware, use tz_convert to convert.
15963 (substitute* "dask/dataframe/tests/test_shuffle.py"
15964 (("def test_set_index_timestamp\\(\\)" m)
15965 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15966 m)))
15967 #t))
15968 (replace 'check
15969 (lambda _ (invoke "pytest" "-vv"))))))
15970 (propagated-inputs
15971 `(("python-cloudpickle" ,python-cloudpickle)
15972 ("python-fsspec" ,python-fsspec)
15973 ("python-numpy" ,python-numpy)
15974 ("python-packaging" ,python-packaging)
15975 ("python-pandas" ,python-pandas)
15976 ("python-partd" ,python-partd)
15977 ("python-toolz" ,python-toolz)
15978 ("python-pyyaml" ,python-pyyaml)))
15979 (native-inputs
15980 `(("python-pytest" ,python-pytest)
15981 ("python-pytest-runner" ,python-pytest-runner)))
15982 (home-page "https://github.com/dask/dask/")
15983 (synopsis "Parallel computing with task scheduling")
15984 (description
15985 "Dask is a flexible parallel computing library for analytics. It
15986 consists of two components: dynamic task scheduling optimized for computation,
15987 and large data collections like parallel arrays, dataframes, and lists that
15988 extend common interfaces like NumPy, Pandas, or Python iterators to
15989 larger-than-memory or distributed environments. These parallel collections
15990 run on top of the dynamic task schedulers. ")
15991 (license license:bsd-3)))
15992
15993 (define-public python-ilinkedlist
15994 (package
15995 (name "python-ilinkedlist")
15996 (version "0.4.0")
15997 (source
15998 (origin
15999 (method url-fetch)
16000 (uri (pypi-uri "ilinkedlist" version))
16001 (sha256
16002 (base32
16003 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16004 (build-system python-build-system)
16005 (native-inputs `(("python-pytest" ,python-pytest)))
16006 (inputs `(("python" ,python)))
16007 (home-page "https://github.com/luther9/ilinkedlist-py")
16008 (synopsis "Immutable linked list library")
16009 (description
16010 "This is a implementation of immutable linked lists for Python. It
16011 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16012 Since a linked list is treated as immutable, it is hashable, and its length
16013 can be retrieved in constant time. Some of the terminology is inspired by
16014 LISP. It is possible to create an improper list by creating a @code{Pair}
16015 with a non-list @code{cdr}.")
16016 (license license:gpl3+)))
16017
16018 (define-public python-readlike
16019 (package
16020 (name "python-readlike")
16021 (version "0.1.3")
16022 (source
16023 (origin
16024 (method url-fetch)
16025 (uri (pypi-uri "readlike" version))
16026 (sha256
16027 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16028 (build-system python-build-system)
16029 (home-page "https://github.com/jangler/readlike")
16030 (synopsis "GNU Readline-like line editing module")
16031 (description
16032 "This Python module provides line editing functions similar to the default
16033 Emacs-style ones of GNU Readline. Unlike the Python standard library's
16034 @code{readline} package, this one allows access to those capabilties in settings
16035 outside of a standard command-line interface. It is especially well-suited to
16036 interfacing with Urwid, due to a shared syntax for describing key inputs.
16037
16038 Currently, all stateless Readline commands are implemented. Yanking and history
16039 are not supported.")
16040 (license license:expat)))
16041
16042 (define-public python2-readlike
16043 (package-with-python2 python-readlike))
16044
16045 (define-public python-reparser
16046 (package
16047 (name "python-reparser")
16048 (version "1.4.3")
16049 (source
16050 (origin
16051 (method url-fetch)
16052 (uri (pypi-uri "ReParser" version))
16053 (sha256
16054 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16055 (build-system python-build-system)
16056 (home-page "https://github.com/xmikos/reparser")
16057 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16058 (description
16059 "This Python library provides a simple lexer/parser for inline markup based
16060 on regular expressions.")
16061 (license license:expat)))
16062
16063 (define-public python2-reparser
16064 (let ((reparser (package-with-python2
16065 (strip-python2-variant python-reparser))))
16066 (package (inherit reparser)
16067 (propagated-inputs
16068 `(("python2-enum34" ,python2-enum34)
16069 ,@(package-propagated-inputs reparser))))))
16070
16071 (define-public python-precis-i18n
16072 (package
16073 (name "python-precis-i18n")
16074 (version "1.0.0")
16075 (source
16076 (origin
16077 (method url-fetch)
16078 (uri (pypi-uri "precis_i18n" version))
16079 (sha256
16080 (base32
16081 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16082 (build-system python-build-system)
16083 (home-page "https://github.com/byllyfish/precis_i18n")
16084 (synopsis "Implementation of the PRECIS framework")
16085 (description
16086 "This module implements the PRECIS Framework as described in RFC 8264,
16087 RFC 8265 and RFC 8266.")
16088 (license license:expat)))
16089
16090 (define-public python-absl-py
16091 (package
16092 (name "python-absl-py")
16093 (version "0.6.1")
16094 (source
16095 (origin
16096 (method url-fetch)
16097 (uri (pypi-uri "absl-py" version))
16098 (sha256
16099 (base32
16100 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16101 (build-system python-build-system)
16102 (propagated-inputs
16103 `(("python-six" ,python-six)))
16104 (home-page "https://github.com/abseil/abseil-py")
16105 (synopsis "Abseil Python common libraries")
16106 (description
16107 "This package provides the Abseil Python Common Libraries, a collection
16108 of Python libraries for building Python applications.")
16109 (license license:asl2.0)))
16110
16111 (define-public python-astor
16112 (package
16113 (name "python-astor")
16114 (version "0.7.1")
16115 (source
16116 (origin
16117 (method url-fetch)
16118 (uri (pypi-uri "astor" version))
16119 (sha256
16120 (base32
16121 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16122 (build-system python-build-system)
16123 ;; FIXME: There are two errors and two test failures.
16124 (arguments `(#:tests? #f))
16125 (home-page "https://github.com/berkerpeksag/astor")
16126 (synopsis "Read and write Python ASTs")
16127 (description "Astor is designed to allow easy manipulation of Python
16128 source via the Abstract Syntax Tree.")
16129 (license license:bsd-3)))
16130
16131 (define-public python2-astor
16132 (package-with-python2 python-astor))
16133
16134 (define-public python-grpcio
16135 (package
16136 (name "python-grpcio")
16137 (version "1.17.1")
16138 (source
16139 (origin
16140 (method url-fetch)
16141 (uri (pypi-uri "grpcio" version))
16142 (sha256
16143 (base32
16144 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16145 (build-system python-build-system)
16146 (propagated-inputs
16147 `(("python-six" ,python-six)))
16148 (home-page "https://grpc.io")
16149 (synopsis "HTTP/2-based RPC framework")
16150 (description "This package provides a Python library for communicating
16151 with the HTTP/2-based RPC framework gRPC.")
16152 (license license:asl2.0)))
16153
16154 (define-public python-astunparse
16155 (package
16156 (name "python-astunparse")
16157 (version "1.6.2")
16158 (source
16159 (origin
16160 (method url-fetch)
16161 (uri (pypi-uri "astunparse" version))
16162 (sha256
16163 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16164 (build-system python-build-system)
16165 (arguments '(#:tests? #f)) ; there are none
16166 (propagated-inputs
16167 `(("python-six" ,python-six)
16168 ("python-wheel" ,python-wheel)))
16169 (home-page "https://github.com/simonpercivall/astunparse")
16170 (synopsis "AST unparser for Python")
16171 (description "This package provides an AST unparser for Python. It is a
16172 factored out version of @code{unparse} found in the Python source
16173 distribution.")
16174 (license license:bsd-3)))
16175
16176 (define-public python-gast
16177 (package
16178 (name "python-gast")
16179 (version "0.2.2")
16180 (source
16181 (origin
16182 (method url-fetch)
16183 (uri (pypi-uri "gast" version))
16184 (sha256
16185 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16186 (build-system python-build-system)
16187 (propagated-inputs
16188 `(("python-astunparse" ,python-astunparse)))
16189 (home-page "https://pypi.org/project/gast/")
16190 (synopsis "Generic Python AST that abstracts the underlying Python version")
16191 (description
16192 "GAST provides a compatibility layer between the AST of various Python
16193 versions, as produced by @code{ast.parse} from the standard @code{ast}
16194 module.")
16195 (license license:bsd-3)))
16196
16197 (define-public python-wikidata
16198 (package
16199 (name "python-wikidata")
16200 (version "0.6.1")
16201 (source
16202 (origin
16203 (method url-fetch)
16204 (uri (pypi-uri "Wikidata" version))
16205 (sha256
16206 (base32
16207 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16208 (build-system python-build-system)
16209 (propagated-inputs
16210 `(("python-babel" ,python-babel)))
16211 (home-page "https://github.com/dahlia/wikidata")
16212 (synopsis "Wikidata client library")
16213 (description
16214 "This package provides a Python interface to
16215 @url{https://www.wikidata.org/, Wikidata}.")
16216 (properties '((upstream-name . "Wikidata")))
16217 (license license:gpl3+)))
16218
16219 (define-public python-doctest-ignore-unicode
16220 (package
16221 (name "python-doctest-ignore-unicode")
16222 (version "0.1.2")
16223 (source
16224 (origin
16225 (method url-fetch)
16226 (uri (pypi-uri "doctest-ignore-unicode" version))
16227 (sha256
16228 (base32
16229 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16230 (build-system python-build-system)
16231 (native-inputs
16232 `(("python-nose" ,python-nose)))
16233 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16234 (synopsis "Ignore Unicode literal prefixes in doctests")
16235 (description
16236 "This package adds support for a flag to ignore Unicode literal prefixes
16237 in doctests.")
16238 (license license:asl2.0)))
16239
16240 (define-public python-attr
16241 (package
16242 (name "python-attr")
16243 (version "0.3.1")
16244 (source
16245 (origin
16246 (method url-fetch)
16247 (uri (pypi-uri "attr" version))
16248 (sha256
16249 (base32
16250 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16251 (build-system python-build-system)
16252 (home-page "https://github.com/denis-ryzhkov/attr")
16253 (synopsis "Decorator for attributes of target function or class")
16254 (description "Simple decorator to set attributes of target function or
16255 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16256 (license license:expat)))
16257
16258 (define-public python-construct
16259 (package
16260 (name "python-construct")
16261 (version "2.9.45")
16262 (source
16263 (origin
16264 (method url-fetch)
16265 (uri (pypi-uri "construct" version))
16266 (sha256
16267 (base32
16268 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16269 (build-system python-build-system)
16270 (arguments
16271 `(#:tests? #f)) ; No tests exist.
16272 (propagated-inputs
16273 `(("python-extras" ,python-extras)
16274 ("python-arrow" ,python-arrow)
16275 ("python-numpy" ,python-numpy)
16276 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16277 (home-page "http://construct.readthedocs.io")
16278 (synopsis "Declarative and symmetrical parser and builder for binary data")
16279 (description
16280 "This package provides both simple, atomic constructs (such as
16281 integers of various sizes), as well as composite ones which allow you
16282 form hierarchical and sequential structures of increasing complexity.
16283 It features bit and byte granularity, easy debugging and testing, an
16284 easy-to-extend subclass system, and lots of primitive constructs to
16285 make your work easier.")
16286 (license license:expat)))
16287
16288 (define-public python-humanize
16289 (package
16290 (name "python-humanize")
16291 (version "0.5.1")
16292 (source
16293 (origin
16294 (method url-fetch)
16295 (uri (pypi-uri "humanize" version))
16296 (sha256
16297 (base32
16298 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16299 (arguments
16300 '(#:tests? #f)) ; tests not in pypi archive
16301 (build-system python-build-system)
16302 (home-page "https://github.com/jmoiron/humanize")
16303 (synopsis "Print numerical information in a human-readable form")
16304 (description "This package provides a Python module that displays numbers
16305 and dates in \"human readable\" forms. For example, it would display
16306 \"12345591313\" as \"12.3 billion\".")
16307 (license license:expat)))
16308
16309 (define-public python-txaio
16310 (package
16311 (name "python-txaio")
16312 (version "18.8.1")
16313 (source
16314 (origin
16315 (method url-fetch)
16316 (uri (pypi-uri "txaio" version))
16317 (sha256
16318 (base32
16319 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16320 (build-system python-build-system)
16321 (propagated-inputs
16322 `(("python-twisted" ,python-twisted)
16323 ("python-six" ,python-six)))
16324 (home-page "https://github.com/crossbario/txaio")
16325 (synopsis "Compatibility layer between Python asyncio and Twisted")
16326 (description "Txaio provides a compatibility layer between the Python
16327 @code{asyncio} module and @code{Twisted}.")
16328 (license license:expat)))
16329
16330 (define-public python-toolshed
16331 (package
16332 (name "python-toolshed")
16333 (version "0.4.6")
16334 (source
16335 (origin
16336 (method url-fetch)
16337 (uri (pypi-uri "toolshed" version))
16338 (sha256
16339 (base32
16340 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16341 (build-system python-build-system)
16342 (native-inputs
16343 `(("python-nose" ,python-nose)))
16344 (home-page "https://github.com/brentp/toolshed/")
16345 (synopsis "Collection of modules and functions for working with data")
16346 (description "This is a collection of well-tested, simple modules and
16347 functions that aim to reduce boilerplate when working with data.")
16348 (license license:bsd-2)))
16349
16350 (define-public python-annoy
16351 (package
16352 (name "python-annoy")
16353 (version "1.15.1")
16354 (source
16355 (origin
16356 (method url-fetch)
16357 (uri (pypi-uri "annoy" version))
16358 (sha256
16359 (base32
16360 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16361 (build-system python-build-system)
16362 (native-inputs
16363 `(("python-nose" ,python-nose)))
16364 (home-page "https://github.com/spotify/annoy/")
16365 (synopsis "Approximate nearest neighbors library")
16366 (description
16367 "Annoy is a C++ library with Python bindings to search for points in
16368 space that are close to a given query point. It also creates large read-only
16369 file-based data structures that are @code{mmap}ped into memory so that many
16370 processes may share the same data.")
16371 (license license:asl2.0)))
16372
16373 (define-public python-pylzma
16374 (package
16375 (name "python-pylzma")
16376 (version "0.5.0")
16377 (source
16378 (origin
16379 (method url-fetch)
16380 (uri (pypi-uri "pylzma" version))
16381 (sha256
16382 (base32
16383 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16384 (build-system python-build-system)
16385 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16386 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16387 (description "This package provides Python bindings for the LZMA library
16388 by Igor Pavlov.")
16389 (license license:lgpl2.1+)))
16390
16391 (define-public python2-pylzma
16392 (package-with-python2 python-pylzma))
16393
16394 (define-public python2-zeroconf
16395 (package
16396 (name "python2-zeroconf")
16397
16398 ;; This is the last version that supports Python 2.x.
16399 (version "0.19.1")
16400 (source
16401 (origin
16402 (method url-fetch)
16403 (uri (pypi-uri "zeroconf" version))
16404 (sha256
16405 (base32
16406 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16407 (build-system python-build-system)
16408 (arguments
16409 `(#:python ,python-2
16410 #:phases
16411 (modify-phases %standard-phases
16412 (add-after 'unpack 'patch-requires
16413 (lambda* (#:key inputs #:allow-other-keys)
16414 (substitute* "setup.py"
16415 (("enum-compat")
16416 "enum34"))
16417 #t)))))
16418 (native-inputs
16419 `(("python2-six" ,python2-six)
16420 ("python2-enum32" ,python2-enum34)
16421 ("python2-netifaces" ,python2-netifaces)
16422 ("python2-typing" ,python2-typing)))
16423 (home-page "https://github.com/jstasiak/python-zeroconf")
16424 (synopsis "Pure Python mDNS service discovery")
16425 (description
16426 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16427 compatible).")
16428 (license license:lgpl2.1+)))
16429
16430 (define-public python-bsddb3
16431 (package
16432 (name "python-bsddb3")
16433 (version "6.2.6")
16434 (source
16435 (origin
16436 (method url-fetch)
16437 (uri (pypi-uri "bsddb3" version))
16438 (sha256
16439 (base32
16440 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16441 (build-system python-build-system)
16442 (inputs
16443 `(("bdb" ,bdb)))
16444 (arguments
16445 '(#:phases
16446 (modify-phases %standard-phases
16447 (add-after 'unpack 'configure-locations
16448 (lambda* (#:key inputs #:allow-other-keys)
16449 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16450 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16451 #t))
16452 (replace 'check
16453 (lambda _
16454 (invoke "python3" "test3.py" "-v"))))))
16455 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16456 (synopsis "Python bindings for Oracle Berkeley DB")
16457 (description
16458 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16459 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16460 Transaction objects, and each of these is exposed as a Python type in the
16461 bsddb3.db module. The database objects can use various access methods: btree,
16462 hash, recno, and queue. Complete support of Berkeley DB distributed
16463 transactions. Complete support for Berkeley DB Replication Manager.
16464 Complete support for Berkeley DB Base Replication. Support for RPC.")
16465 (license license:bsd-3)))
16466
16467 (define-public python-dbfread
16468 (package
16469 (name "python-dbfread")
16470 (version "2.0.7")
16471 (source (origin
16472 (method url-fetch)
16473 (uri (pypi-uri "dbfread" version))
16474 (sha256
16475 (base32
16476 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16477 (build-system python-build-system)
16478 (native-inputs
16479 `(("python-pytest" ,python-pytest)))
16480 (home-page "https://dbfread.readthedocs.io")
16481 (synopsis "Read DBF Files with Python")
16482 (description
16483 "This library reads DBF files and returns the data as native Python data
16484 types for further processing. It is primarily intended for batch jobs and
16485 one-off scripts.")
16486 (license license:expat)))
16487
16488 (define-public python-cached-property
16489 (package
16490 (name "python-cached-property")
16491 (version "1.5.1")
16492 (source
16493 (origin
16494 (method url-fetch)
16495 (uri (pypi-uri "cached-property" version))
16496 (sha256
16497 (base32
16498 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16499 (build-system python-build-system)
16500 (arguments
16501 `(#:phases
16502 (modify-phases %standard-phases
16503 ;; https://github.com/pydanny/cached-property/issues/131
16504 ;; recent versions of freezegun break one test
16505 (add-after 'unpack 'disable-broken-test
16506 (lambda _
16507 (substitute* "tests/test_cached_property.py"
16508 (("def test_threads_ttl_expiry\\(self\\)" m)
16509 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16510 " " m)))
16511 #t)))))
16512 (native-inputs
16513 `(("python-freezegun" ,python-freezegun)))
16514 (home-page
16515 "https://github.com/pydanny/cached-property")
16516 (synopsis
16517 "Decorator for caching properties in classes")
16518 (description
16519 "This package provides a decorator which makes caching
16520 time-or-computationally-expensive properties quick and easy and works in Python
16521 2 or 3.")
16522 (license license:bsd-3)))
16523
16524 (define-public python-folium
16525 (package
16526 (name "python-folium")
16527 (version "0.10.1")
16528 (source
16529 (origin
16530 (method url-fetch)
16531 (uri (pypi-uri "folium" version))
16532 (sha256
16533 (base32
16534 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
16535 (build-system python-build-system)
16536 (propagated-inputs
16537 `(("python-branca" ,python-branca)
16538 ("python-jinja2" ,python-jinja2)
16539 ("python-numpy" ,python-numpy)
16540 ("python-requests" ,python-requests)))
16541 (native-inputs
16542 `(("python-pytest" ,python-pytest)))
16543 (home-page "https://github.com/python-visualization/folium")
16544 (synopsis "Make beautiful maps with Leaflet.js & Python")
16545 (description "@code{folium} makes it easy to visualize data that’s been
16546 manipulated in Python on an interactive leaflet map. It enables both the
16547 binding of data to a map for @code{choropleth} visualizations as well as
16548 passing rich vector/raster/HTML visualizations as markers on the map.
16549
16550 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16551 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16552 supports Image, Video, GeoJSON and TopoJSON overlays.")
16553 (license license:expat)))
16554
16555 (define-public jube
16556 (package
16557 ;; This is a command-line tool, so no "python-" prefix.
16558 (name "jube")
16559 (version "2.2.2")
16560 (source (origin
16561 (method url-fetch)
16562 (uri (string-append
16563 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16564 version))
16565 (sha256
16566 (base32
16567 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16568 (file-name (string-append "jube-" version ".tar.gz"))))
16569 (build-system python-build-system)
16570 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16571 (synopsis "Benchmarking environment")
16572 (description
16573 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16574 benchmarked application, benchmark data is stored in a format that allows JUBE
16575 to deduct the desired information. This data can be parsed by automatic pre-
16576 and post-processing scripts that draw information and store it more densely
16577 for manual interpretation.")
16578 (license license:gpl3+)))
16579
16580 (define-public python-pyroutelib3
16581 (package
16582 (name "python-pyroutelib3")
16583 (version "1.3.post1")
16584 (source
16585 (origin
16586 (method url-fetch)
16587 (uri (pypi-uri "pyroutelib3" version))
16588 (sha256
16589 (base32
16590 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16591 (build-system python-build-system)
16592 (propagated-inputs
16593 `(("python-dateutil" ,python-dateutil)))
16594 (home-page "https://github.com/MKuranowski/pyroutelib3")
16595 (synopsis "Library for simple routing on OSM data")
16596 (description "Library for simple routing on OSM data")
16597 (license license:gpl3+)))
16598
16599 (define-public python-bibtexparser
16600 (package
16601 (name "python-bibtexparser")
16602 (version "1.1.0")
16603 (source
16604 (origin
16605 (method url-fetch)
16606 (uri (pypi-uri "bibtexparser" version))
16607 (sha256
16608 (base32
16609 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16610 (build-system python-build-system)
16611 (propagated-inputs
16612 `(("python-pyparsing" ,python-pyparsing)))
16613 (native-inputs
16614 `(("python-future" ,python-future)))
16615 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16616 (synopsis "Python library to parse BibTeX files")
16617 (description "BibtexParser is a Python library to parse BibTeX files.")
16618 (license (list license:bsd-3 license:lgpl3))))
16619
16620 (define-public python-distro
16621 (package
16622 (name "python-distro")
16623 (version "1.4.0")
16624 (source
16625 (origin
16626 (method url-fetch)
16627 (uri (pypi-uri "distro" version))
16628 (sha256
16629 (base32
16630 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16631 (build-system python-build-system)
16632 (native-inputs
16633 `(("python-pytest" ,python-pytest)))
16634 (home-page "https://github.com/nir0s/distro")
16635 (synopsis
16636 "OS platform information API")
16637 (description
16638 "@code{distro} provides information about the OS distribution it runs on,
16639 such as a reliable machine-readable ID, or version information.
16640
16641 It is the recommended replacement for Python's original
16642 `platform.linux_distribution` function (which will be removed in Python 3.8).
16643 @code{distro} also provides a command-line interface to output the platform
16644 information in various formats.")
16645 (license license:asl2.0)))
16646
16647 (define-public python-cairosvg
16648 (package
16649 (name "python-cairosvg")
16650 (version "2.4.2")
16651 (source
16652 (origin
16653 (method url-fetch)
16654 (uri (pypi-uri "CairoSVG" version))
16655 (sha256
16656 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16657 (build-system python-build-system)
16658 (arguments
16659 `(#:phases
16660 (modify-phases %standard-phases
16661 (replace 'check
16662 (lambda _ (invoke "pytest"))))))
16663 (propagated-inputs
16664 `(("python-cairocffi" ,python-cairocffi)
16665 ("python-cssselect2" ,python-cssselect2)
16666 ("python-defusedxml" ,python-defusedxml)
16667 ("python-pillow" ,python-pillow)
16668 ("python-tinycss2" ,python-tinycss2)))
16669 (native-inputs
16670 `(("python-pytest-flake8" ,python-pytest-flake8)
16671 ("python-pytest-isort" ,python-pytest-isort)
16672 ("python-pytest-runner" ,python-pytest-runner)))
16673 (home-page "https://cairosvg.org/")
16674 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16675 (description "CairoSVG is a SVG converter based on Cairo. It can export
16676 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16677 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16678 parsed, the result is drawn to a Cairo surface that can be exported to
16679 qvarious formats: PDF, PostScript, PNG and even SVG.")
16680 (license license:lgpl3+)))
16681
16682 (define-public python-pyphen
16683 (package
16684 (name "python-pyphen")
16685 (version "0.9.5")
16686 (source
16687 (origin
16688 (method url-fetch)
16689 (uri (pypi-uri "Pyphen" version))
16690 (sha256
16691 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16692 (build-system python-build-system)
16693 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16694 ;; embedded set provided by upstream - like Debian does.
16695 (home-page "https://github.com/Kozea/Pyphen")
16696 (synopsis "Pure Python module to hyphenate text")
16697 (description "Pyphen is a pure Python module to hyphenate text using
16698 existing Hunspell hyphenation dictionaries.")
16699 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
16700
16701 (define-public python-intelhex
16702 (package
16703 (name "python-intelhex")
16704 (version "2.2.1")
16705 (source
16706 (origin
16707 (method url-fetch)
16708 (uri (pypi-uri "intelhex" version))
16709 (sha256
16710 (base32
16711 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16712 (build-system python-build-system)
16713 (arguments '(#:tests? #f)) ;issue with version
16714 (home-page "https://pypi.org/project/IntelHex/")
16715 (synopsis "Python library for Intel HEX files manipulations")
16716 (description "The Intel HEX file format is widely used in microprocessors
16717 and microcontrollers area (embedded systems etc.) as the de facto standard for
16718 representation of code to be programmed into microelectronic devices. This
16719 package provides an intelhex Python library to read, write, create from
16720 scratch and manipulate data from Intel HEX file format. It also includes
16721 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16722 converters and more, those based on the library itself.")
16723 (license license:bsd-3)))
16724
16725 (define-public python-pykwalify
16726 (package
16727 (name "python-pykwalify")
16728 (version "1.7.0")
16729 (source
16730 (origin
16731 (method url-fetch)
16732 (uri (pypi-uri "pykwalify" version))
16733 (sha256
16734 (base32
16735 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16736 (build-system python-build-system)
16737 (arguments '(#:tests? #f)) ;missing dependencies
16738 (propagated-inputs
16739 `(("python-dateutil" ,python-dateutil)
16740 ("python-docopt" ,python-docopt)
16741 ("python-pyyaml" ,python-pyyaml)))
16742 (home-page "https://github.com/grokzen/pykwalify")
16743 (synopsis
16744 "Python lib/cli for JSON/YAML schema validation")
16745 (description
16746 "This package provides a parser, schema validator, and data binding tool
16747 for YAML and JSON.")
16748 (license license:expat)))
16749
16750 (define-public python-dbusmock
16751 (package
16752 (name "python-dbusmock")
16753 (version "0.18.3")
16754 (source
16755 (origin
16756 (method url-fetch)
16757 (uri (pypi-uri "python-dbusmock" version))
16758 (sha256
16759 (base32
16760 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16761 (build-system python-build-system)
16762 (arguments
16763 '(#:phases
16764 (modify-phases %standard-phases
16765 (add-after 'unpack 'patch-shell-path
16766 (lambda _
16767 (substitute* "tests/test_code.py"
16768 (("/bin/bash") (which "bash")))
16769 #t)))))
16770 (native-inputs
16771 `(;; For tests.
16772 ("dbus" ,dbus) ; for dbus-daemon
16773 ("python-nose" ,python-nose)
16774 ("which" ,which)))
16775 (propagated-inputs
16776 `(("python-dbus" ,python-dbus)
16777 ("python-pygobject" ,python-pygobject)))
16778 (home-page "https://github.com/martinpitt/python-dbusmock")
16779 (synopsis "Python library for mock D-Bus objects")
16780 (description "python-dbusmock allows for the easy creation of mock objects on
16781 D-Bus. This is useful for writing tests for software which talks to D-Bus
16782 services such as upower, systemd, logind, gnome-session or others, and it is
16783 hard (or impossible without root privileges) to set the state of the real
16784 services to what you expect in your tests.")
16785 (license license:lgpl3+)))
16786
16787 (define-public python-ujson
16788 (package
16789 (name "python-ujson")
16790 (version "1.35")
16791 (source
16792 (origin
16793 (method url-fetch)
16794 (uri (pypi-uri "ujson" version))
16795 (sha256
16796 (base32
16797 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16798 (build-system python-build-system)
16799 (home-page "http://www.esn.me")
16800 (synopsis
16801 "Ultra fast JSON encoder and decoder for Python")
16802 (description
16803 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16804 bindings for Python 2.5+ and 3.")
16805 (license license:bsd-3)))
16806
16807 (define-public python2-ujson
16808 (package-with-python2 python-ujson))
16809
16810 (define-public python-iocapture
16811 ;; The latest release is more than a year older than this commit.
16812 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16813 (revision "1"))
16814 (package
16815 (name "python-iocapture")
16816 (version "0.1.2")
16817 (source
16818 (origin
16819 (method git-fetch)
16820 (uri (git-reference
16821 (url "https://github.com/oinume/iocapture.git")
16822 (commit commit)))
16823 (file-name (git-file-name name version))
16824 (sha256
16825 (base32
16826 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16827 (build-system python-build-system)
16828 (arguments
16829 `(#:phases
16830 (modify-phases %standard-phases
16831 (delete 'check)
16832 (add-after 'install 'check
16833 (lambda* (#:key inputs outputs #:allow-other-keys)
16834 (add-installed-pythonpath inputs outputs)
16835 (invoke "py.test" "-v" "tests")
16836 #t)))))
16837 (propagated-inputs
16838 `(("python-flexmock" ,python-flexmock)
16839 ("python-pytest" ,python-pytest)
16840 ("python-pytest-cov" ,python-pytest-cov)
16841 ("python-six" ,python-six)))
16842 (home-page "https://github.com/oinume/iocapture")
16843 (synopsis "Python capturing tool for stdout and stderr")
16844 (description
16845 "This package helps you to capture the standard out (stdout) and the
16846 standard error channel (stderr) in your program.")
16847 (license license:expat))))
16848
16849 (define-public python-argh
16850 ;; There are 21 commits since the latest release containing important
16851 ;; improvements.
16852 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16853 (revision "1"))
16854 (package
16855 (name "python-argh")
16856 (version (git-version "0.26.2" revision commit))
16857 (source
16858 (origin
16859 (method git-fetch)
16860 (uri (git-reference
16861 (url "https://github.com/neithere/argh.git")
16862 (commit commit)))
16863 (file-name (git-file-name name version))
16864 (sha256
16865 (base32
16866 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16867 (build-system python-build-system)
16868 (propagated-inputs
16869 `(("python-iocapture" ,python-iocapture)
16870 ("python-mock" ,python-mock)
16871 ("python-pytest" ,python-pytest)
16872 ("python-pytest-cov" ,python-pytest-cov)
16873 ("python-pytest-xdist" ,python-pytest-xdist)
16874 ("python-tox" ,python-tox)))
16875 (home-page "https://github.com/neithere/argh/")
16876 (synopsis "Argparse wrapper with natural syntax")
16877 (description
16878 "python-argh is a small library that provides several layers of
16879 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
16880 always possible to declare a command with the highest possible (and least
16881 flexible) layer and then tune the behaviour with any of the lower layers
16882 including the native API of @code{python-argparse}.")
16883 (license license:lgpl3+))))
16884
16885 (define-public python-ppft
16886 (package
16887 (name "python-ppft")
16888 (version "1.6.6.1")
16889 (source
16890 (origin
16891 (method url-fetch)
16892 (uri (pypi-uri "ppft" version))
16893 (sha256
16894 (base32
16895 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
16896 (build-system python-build-system)
16897 (arguments '(#:tests? #f)) ; there are none
16898 (propagated-inputs
16899 `(("python-six" ,python-six)))
16900 (home-page "https://pypi.org/project/ppft/")
16901 (synopsis "Fork of Parallel Python")
16902 (description
16903 "This package is a fork of Parallel Python. The Parallel Python
16904 module (@code{pp}) provides an easy and efficient way to create
16905 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
16906 computers and clusters. It features cross-platform portability and dynamic
16907 load balancing.")
16908 (license license:bsd-3)))
16909
16910 (define-public python-pox
16911 (package
16912 (name "python-pox")
16913 (version "0.2.7")
16914 (source
16915 (origin
16916 (method url-fetch)
16917 (uri (pypi-uri "pox" version))
16918 (sha256
16919 (base32
16920 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
16921 (build-system python-build-system)
16922 (arguments
16923 `(#:phases
16924 (modify-phases %standard-phases
16925 (replace 'check
16926 (lambda _
16927 (mkdir-p "/tmp/guix")
16928 (setenv "SHELL" "bash")
16929 (setenv "USERNAME" "guix")
16930 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
16931 (invoke "py.test" "-vv")
16932 #t)))))
16933 (native-inputs
16934 `(("python-pytest" ,python-pytest)
16935 ("which" ,which)))
16936 (home-page "https://pypi.org/project/pox/")
16937 (synopsis "Python utilities for filesystem exploration and automated builds")
16938 (description
16939 "Pox provides a collection of utilities for navigating and manipulating
16940 filesystems. This module is designed to facilitate some of the low level
16941 operating system interactions that are useful when exploring a filesystem on a
16942 remote host. Pox provides Python equivalents of several shell commands such
16943 as @command{which} and @command{find}. These commands allow automated
16944 discovery of what has been installed on an operating system, and where the
16945 essential tools are located.")
16946 (license license:bsd-3)))
16947
16948 (define-public python-pathos
16949 (package
16950 (name "python-pathos")
16951 (version "0.2.5")
16952 (source
16953 (origin
16954 (method url-fetch)
16955 (uri (pypi-uri "pathos" version))
16956 (sha256
16957 (base32
16958 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
16959 (build-system python-build-system)
16960 (arguments
16961 '(#:phases
16962 (modify-phases %standard-phases
16963 (replace 'check
16964 (lambda _
16965 (setenv "PYTHONPATH"
16966 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
16967 (invoke "python" "./tests/__main__.py"))))))
16968 (propagated-inputs
16969 `(("python-dill" ,python-dill)
16970 ("python-multiprocess" ,python-multiprocess)
16971 ("python-pox" ,python-pox)
16972 ("python-ppft" ,python-ppft)))
16973 (native-inputs
16974 `(("python-pytest" ,python-pytest)))
16975 (home-page "https://pypi.org/project/pathos/")
16976 (synopsis
16977 "Parallel graph management and execution in heterogeneous computing")
16978 (description
16979 "Python-pathos is a framework for heterogenous computing. It provides a
16980 consistent high-level interface for configuring and launching parallel
16981 computations across heterogenous resources. Python-pathos provides configurable
16982 launchers for parallel and distributed computing, where each launcher contains
16983 the syntactic logic to configure and launch jobs in an execution environment.")
16984 (license license:bsd-3)))
16985
16986 (define-public python-flit
16987 (package
16988 (name "python-flit")
16989 (version "2.1.0")
16990 (source
16991 (origin
16992 (method url-fetch)
16993 (uri (pypi-uri "flit" version))
16994 (sha256
16995 (base32
16996 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
16997 (build-system python-build-system)
16998 (arguments
16999 `(#:tests? #f)) ; XXX: Check requires network access.
17000 (home-page "https://flit.readthedocs.io/")
17001 (synopsis
17002 "Simple packaging tool for simple packages")
17003 (description
17004 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17005 packages a single importable module or package at a time, using the import
17006 name as the name on PyPI. All subpackages and data files within a package
17007 are included automatically.")
17008 (license license:bsd-3)))
17009
17010 (define-public python-pathtools
17011 (package
17012 (name "python-pathtools")
17013 (version "0.1.2")
17014 (source
17015 (origin
17016 (method url-fetch)
17017 (uri (pypi-uri "pathtools" version))
17018 (sha256
17019 (base32
17020 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17021 (build-system python-build-system)
17022 (home-page
17023 "https://github.com/gorakhargosh/pathtools")
17024 (synopsis "Path utilities for Python")
17025 (description "Pattern matching and various utilities for file systems
17026 paths.")
17027 (license license:expat)))
17028
17029 (define-public python-fastentrypoints
17030 (package
17031 (name "python-fastentrypoints")
17032 (version "0.12")
17033 (source
17034 (origin
17035 (method url-fetch)
17036 (uri (pypi-uri "fastentrypoints" version))
17037 (sha256
17038 (base32
17039 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17040 (build-system python-build-system)
17041 (home-page
17042 "https://github.com/ninjaaron/fast-entry_points")
17043 (synopsis
17044 "Makes entry_points specified in setup.py load more quickly")
17045 (description
17046 "Using entry_points in your setup.py makes scripts that start really
17047 slowly because it imports pkg_resources. This package allows such setup
17048 scripts to load entry points more quickly.")
17049 (license license:bsd-3)))
17050
17051 (define-public python-funcparserlib
17052 (package
17053 (name "python-funcparserlib")
17054 (version "0.3.6")
17055 (source
17056 (origin
17057 (method url-fetch)
17058 (uri (pypi-uri "funcparserlib" version))
17059 (sha256
17060 (base32
17061 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17062 (native-inputs
17063 `(("python-tox" ,python-tox)))
17064 (arguments
17065 `(#:phases
17066 (modify-phases %standard-phases
17067 (replace 'check
17068 (lambda _
17069 (invoke "tox"))))))
17070 (build-system python-build-system)
17071 (home-page
17072 "https://github.com/vlasovskikh/funcparserlib")
17073 (synopsis
17074 "Recursive descent parsing library based on functional combinators")
17075 (description
17076 "This package is a recursive descent parsing library for Python based on
17077 functional combinators. Parser combinators are just higher-order functions
17078 that take parsers as their arguments and return them as result values.")
17079 (license license:expat)))
17080
17081 (define-public python-speg
17082 (package
17083 (name "python-speg")
17084 (version "0.3")
17085 (source
17086 (origin
17087 (method url-fetch)
17088 (uri (pypi-uri "speg" version ".zip"))
17089 (sha256
17090 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17091 (arguments
17092 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17093 (native-inputs
17094 `(("unzip" ,unzip)))
17095 (build-system python-build-system)
17096 (home-page "https://github.com/avakar/speg")
17097 (synopsis "PEG-based parser interpreter with memoization")
17098 (description "This package is a PEG-based parser and interpreter with
17099 memoization.")
17100 (license license:expat)))
17101
17102 (define-public python-cson
17103 (package
17104 (name "python-cson")
17105 (version "0.8")
17106 (source
17107 (origin
17108 (method url-fetch)
17109 (uri (pypi-uri "cson" version))
17110 (sha256
17111 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17112 (build-system python-build-system)
17113 (propagated-inputs
17114 `(("python-speg" ,python-speg)))
17115 (home-page "https://github.com/avakar/pycson")
17116 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17117 (description "This package is a parser for Coffeescript Object
17118 Notation (CSON).")
17119 (license license:expat)))
17120
17121 (define-public python-asynctest
17122 (package
17123 (name "python-asynctest")
17124 (version "0.13.0")
17125 (source
17126 (origin
17127 (method url-fetch)
17128 (uri (pypi-uri "asynctest" version))
17129 (sha256
17130 (base32
17131 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17132 (build-system python-build-system)
17133 (arguments
17134 '(#:phases
17135 (modify-phases %standard-phases
17136 (replace 'check
17137 (lambda _
17138 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17139 (add-after 'unpack 'disable-tests
17140 (lambda* _
17141 (substitute* "test/test_selector.py"
17142 ;; XXX: This test fails for unknown reason inside the build
17143 ;; environment.
17144 (("def test_events_watched_outside_test_are_ignored")
17145 "@unittest.skip('disabled by guix')
17146 def test_events_watched_outside_test_are_ignored")))))))
17147 (home-page "https://github.com/Martiusweb/asynctest")
17148 (synopsis "Extension of unittest for testing asyncio libraries")
17149 (description
17150 "The package asynctest is built on top of the standard unittest module
17151 and cuts down boilerplate code when testing libraries for asyncio.")
17152 (license license:asl2.0)))
17153
17154 (define-public python-aionotify
17155 (package
17156 (name "python-aionotify")
17157 (version "0.2.0")
17158 (source
17159 (origin
17160 ;; Source tarball on PyPi lacks tests
17161 (method git-fetch)
17162 (uri (git-reference
17163 (url "https://github.com/rbarrois/aionotify")
17164 (commit (string-append "v" version))))
17165 (file-name (git-file-name name version))
17166 (sha256
17167 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17168 (build-system python-build-system)
17169 (native-inputs `(("python-asynctest" ,python-asynctest)))
17170 (home-page "https://github.com/rbarrois/aionotify")
17171 (synopsis "Asyncio-powered inotify library")
17172 (description
17173 "@code{aionotify} is a simple, asyncio-based inotify library.")
17174 (license license:bsd-3)))
17175
17176 (define-public python-forbiddenfruit
17177 (package
17178 (name "python-forbiddenfruit")
17179 (version "0.1.3")
17180 (source
17181 (origin
17182 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17183 (method git-fetch)
17184 (uri (git-reference
17185 (url "https://github.com/clarete/forbiddenfruit")
17186 (commit version)))
17187 (file-name (git-file-name name version))
17188 (sha256
17189 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17190 (build-system python-build-system)
17191 (arguments
17192 '(#:phases
17193 (modify-phases %standard-phases
17194 (replace 'check
17195 (lambda _
17196 (invoke "make" "SKIP_DEPS=1"))))))
17197 (native-inputs
17198 `(("python-nose" ,python-nose)
17199 ("python-coverage" ,python-coverage)))
17200 (home-page "https://github.com/clarete/forbiddenfruit")
17201 (synopsis "Patch python built-in objects")
17202 (description "This project allows Python code to extend built-in types.")
17203 (license (list license:gpl3+ license:expat))))
17204
17205 (define-public python-shouldbe
17206 (package
17207 (name "python-shouldbe")
17208 (version "0.1.2")
17209 (source
17210 (origin
17211 (method url-fetch)
17212 (uri (pypi-uri "shouldbe" version))
17213 (sha256
17214 (base32
17215 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17216 (build-system python-build-system)
17217 (propagated-inputs
17218 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17219 (native-inputs
17220 `(("python-nose" ,python-nose)))
17221 (home-page "https://github.com/directxman12/should_be")
17222 (synopsis "Python Assertion Helpers inspired by Shouldly")
17223 (description
17224 "Python Assertion Helpers inspired by Shouldly.")
17225 (license license:isc)))