You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15715 lines
558 KiB
15715 lines
558 KiB
;;; GNU Guix --- Functional package management for GNU
|
|
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
|
|
;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
|
;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
|
|
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
|
|
;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
|
|
;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
|
|
;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
|
|
;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
|
|
;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
|
|
;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
|
|
;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
|
|
;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
|
|
;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
|
|
;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
|
|
;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
|
|
;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
|
|
;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
|
|
;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
|
|
;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
|
|
;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
|
|
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
|
|
;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
|
|
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
|
|
;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
|
|
;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
|
|
;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
|
|
;;; Copyright © 2016 David Craven <david@craven.ch>
|
|
;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
|
|
;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
|
|
;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
|
|
;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
|
|
;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
|
|
;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
|
|
;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
|
|
;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
|
|
;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
|
|
;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
|
|
;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
|
|
;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
|
|
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
|
;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
|
|
;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
|
|
;;; Copyright © 2017 Kei Kebreau <kei@openmailbox.org>
|
|
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
|
|
;;;
|
|
;;; This file is part of GNU Guix.
|
|
;;;
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
|
;;; under the terms of the GNU General Public License as published by
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
;;; your option) any later version.
|
|
;;;
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
;;; GNU General Public License for more details.
|
|
;;;
|
|
;;; You should have received a copy of the GNU General Public License
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
(define-module (gnu packages python)
|
|
#:use-module ((guix licenses) #:prefix license:)
|
|
#:use-module (gnu packages)
|
|
#:use-module (gnu packages algebra)
|
|
#:use-module (gnu packages adns)
|
|
#:use-module (gnu packages attr)
|
|
#:use-module (gnu packages backup)
|
|
#:use-module (gnu packages bash)
|
|
#:use-module (gnu packages compression)
|
|
#:use-module (gnu packages crypto)
|
|
#:use-module (gnu packages databases)
|
|
#:use-module (gnu packages django)
|
|
#:use-module (gnu packages file)
|
|
#:use-module (gnu packages fontutils)
|
|
#:use-module (gnu packages gcc)
|
|
#:use-module (gnu packages ghostscript)
|
|
#:use-module (gnu packages gl)
|
|
#:use-module (gnu packages glib)
|
|
#:use-module (gnu packages graphviz)
|
|
#:use-module (gnu packages gstreamer)
|
|
#:use-module (gnu packages gtk)
|
|
#:use-module (gnu packages icu4c)
|
|
#:use-module (gnu packages image)
|
|
#:use-module (gnu packages imagemagick)
|
|
#:use-module (gnu packages libevent)
|
|
#:use-module (gnu packages libffi)
|
|
#:use-module (gnu packages linux)
|
|
#:use-module (gnu packages man)
|
|
#:use-module (gnu packages maths)
|
|
#:use-module (gnu packages multiprecision)
|
|
#:use-module (gnu packages networking)
|
|
#:use-module (gnu packages ncurses)
|
|
#:use-module (gnu packages openstack)
|
|
#:use-module (gnu packages password-utils)
|
|
#:use-module (gnu packages pcre)
|
|
#:use-module (gnu packages perl)
|
|
#:use-module (gnu packages pkg-config)
|
|
#:use-module (gnu packages protobuf)
|
|
#:use-module (gnu packages qt)
|
|
#:use-module (gnu packages readline)
|
|
#:use-module (gnu packages sdl)
|
|
#:use-module (gnu packages shells)
|
|
#:use-module (gnu packages ssh)
|
|
#:use-module (gnu packages statistics)
|
|
#:use-module (gnu packages tex)
|
|
#:use-module (gnu packages texinfo)
|
|
#:use-module (gnu packages tls)
|
|
#:use-module (gnu packages version-control)
|
|
#:use-module (gnu packages video)
|
|
#:use-module (gnu packages web)
|
|
#:use-module (gnu packages base)
|
|
#:use-module (gnu packages xml)
|
|
#:use-module (gnu packages xorg)
|
|
#:use-module (gnu packages xdisorg)
|
|
#:use-module (gnu packages tcl)
|
|
#:use-module (gnu packages bdw-gc)
|
|
#:use-module (guix packages)
|
|
#:use-module (guix download)
|
|
#:use-module (guix git-download)
|
|
#:use-module (guix utils)
|
|
#:use-module (guix build-system gnu)
|
|
#:use-module (guix build-system cmake)
|
|
#:use-module (guix build-system python)
|
|
#:use-module (guix build-system trivial)
|
|
#:use-module (srfi srfi-1))
|
|
|
|
(define-public python-2.7
|
|
(package
|
|
(name "python")
|
|
(version "2.7.13")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append "https://www.python.org/ftp/python/"
|
|
version "/Python-" version ".tar.xz"))
|
|
(sha256
|
|
(base32
|
|
"0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
|
|
(patches (search-patches "python-2.7-search-paths.patch"
|
|
"python-2-deterministic-build-info.patch"
|
|
"python-2.7-site-prefixes.patch"
|
|
"python-2.7-source-date-epoch.patch"
|
|
"python-2.7-getentropy-on-old-kernels.patch"))
|
|
(modules '((guix build utils)))
|
|
;; suboptimal to delete failing tests here, but if we delete them in the
|
|
;; arguments then we need to make sure to strip out that phase when it
|
|
;; gets inherited by python and python-minimal.
|
|
(snippet
|
|
'(begin
|
|
(for-each delete-file
|
|
'("Lib/test/test_compileall.py"
|
|
"Lib/test/test_ctypes.py" ; fails on mips64el
|
|
"Lib/test/test_distutils.py"
|
|
"Lib/test/test_import.py"
|
|
"Lib/test/test_shutil.py"
|
|
"Lib/test/test_socket.py"
|
|
"Lib/test/test_subprocess.py"))
|
|
#t))))
|
|
(outputs '("out"
|
|
"tk")) ;tkinter; adds 50 MiB to the closure
|
|
(build-system gnu-build-system)
|
|
(arguments
|
|
`(;; 356 tests OK.
|
|
;; 6 tests failed:
|
|
;; test_compileall test_distutils test_import test_shutil test_socket
|
|
;; test_subprocess
|
|
;; 39 tests skipped:
|
|
;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
|
|
;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
|
|
;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
|
|
;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
|
|
;; test_kqueue test_linuxaudiodev test_macos test_macostools
|
|
;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
|
|
;; test_socketserver test_startfile test_sunaudiodev test_timeout
|
|
;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
|
|
;; test_winreg test_winsound test_zipfile64
|
|
;; 4 skips unexpected on linux2:
|
|
;; test_bsddb test_bsddb3 test_gdb test_ioctl
|
|
#:test-target "test"
|
|
#:configure-flags
|
|
(list "--enable-shared" ;allow embedding
|
|
"--with-system-ffi" ;build ctypes
|
|
"--with-ensurepip=install" ;install pip and setuptools
|
|
"--enable-unicode=ucs4"
|
|
(string-append "LDFLAGS=-Wl,-rpath="
|
|
(assoc-ref %outputs "out") "/lib"))
|
|
|
|
#:modules ((ice-9 ftw) (ice-9 match)
|
|
(guix build utils) (guix build gnu-build-system))
|
|
#:phases
|
|
(modify-phases %standard-phases
|
|
(add-before
|
|
'configure 'patch-lib-shells
|
|
(lambda _
|
|
;; Filter for existing files, since some may not exist in all
|
|
;; versions of python that are built with this recipe.
|
|
(substitute* (filter file-exists?
|
|
'("Lib/subprocess.py"
|
|
"Lib/popen2.py"
|
|
"Lib/distutils/tests/test_spawn.py"
|
|
"Lib/test/test_subprocess.py"))
|
|
(("/bin/sh") (which "sh")))
|
|
|
|
;; Use zero as the timestamp in .pyc files so that builds are
|
|
;; deterministic. TODO: Remove it when this variable is set in
|
|
;; gnu-build-system.scm.
|
|
(setenv "SOURCE_DATE_EPOCH" "1")
|
|
#t))
|
|
(add-before 'configure 'do-not-record-configure-flags
|
|
(lambda* (#:key configure-flags #:allow-other-keys)
|
|
;; Remove configure flags from the installed '_sysconfigdata.py'
|
|
;; and 'Makefile' so we don't end up keeping references to the
|
|
;; build tools.
|
|
;;
|
|
;; Preserve at least '--with-system-ffi' since otherwise the
|
|
;; thing tries to build libffi, fails, and we end up with a
|
|
;; Python that lacks ctypes.
|
|
(substitute* "configure"
|
|
(("^CONFIG_ARGS=.*$")
|
|
(format #f "CONFIG_ARGS='~a'\n"
|
|
(if (member "--with-system-ffi" configure-flags)
|
|
"--with-system-ffi"
|
|
""))))
|
|
#t))
|
|
(add-before
|
|
'check 'pre-check
|
|
(lambda _
|
|
;; 'Lib/test/test_site.py' needs a valid $HOME
|
|
(setenv "HOME" (getcwd))
|
|
#t))
|
|
(add-after
|
|
'unpack 'set-source-file-times-to-1980
|
|
;; XXX One of the tests uses a ZIP library to pack up some of the
|
|
;; source tree, and fails with "ZIP does not support timestamps
|
|
;; before 1980". Work around this by setting the file times in the
|
|
;; source tree to sometime in early 1980.
|
|
(lambda _
|
|
(let ((circa-1980 (* 10 366 24 60 60)))
|
|
(ftw "." (lambda (file stat flag)
|
|
(utime file circa-1980 circa-1980)
|
|
#t))
|
|
#t)))
|
|
(add-after 'install 'remove-tests
|
|
;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
|
|
;; because these files are used by some libraries out there.
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
(let ((out (assoc-ref outputs "out")))
|
|
(match (scandir (string-append out "/lib")
|
|
(lambda (name)
|
|
(string-prefix? "python" name)))
|
|
((pythonX.Y)
|
|
(let ((testdir (string-append out "/lib/" pythonX.Y
|
|
"/test")))
|
|
(with-directory-excursion testdir
|
|
(for-each delete-file-recursively
|
|
(scandir testdir
|
|
(match-lambda
|
|
((or "." "..") #f)
|
|
(file
|
|
(not
|
|
(string-prefix? "test_support."
|
|
file))))))
|
|
(call-with-output-file "__init__.py" (const #t))
|
|
#t)))))))
|
|
(add-before 'strip 'make-libraries-writable
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
;; Make .so files writable so they can be stripped.
|
|
(let ((out (assoc-ref outputs "out")))
|
|
(for-each (lambda (file)
|
|
(chmod file #o755))
|
|
(find-files (string-append out "/lib")
|
|
"\\.so"))
|
|
#t)))
|
|
(add-after 'install 'move-tk-inter
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
;; When Tkinter support is built move it to a separate output so
|
|
;; that the main output doesn't contain a reference to Tcl/Tk.
|
|
(let ((out (assoc-ref outputs "out"))
|
|
(tk (assoc-ref outputs "tk")))
|
|
(when tk
|
|
(match (find-files out "tkinter.*\\.so")
|
|
((tkinter.so)
|
|
;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
|
|
;; want it under TK/lib/pythonX.Y/site-packages.
|
|
(let* ((len (string-length out))
|
|
(target (string-append
|
|
tk "/"
|
|
(string-drop
|
|
(dirname (dirname tkinter.so))
|
|
len)
|
|
"/site-packages")))
|
|
(install-file tkinter.so target)
|
|
(delete-file tkinter.so)))))
|
|
#t))))))
|
|
(inputs
|
|
`(("bzip2" ,bzip2)
|
|
("gdbm" ,gdbm)
|
|
("libffi" ,libffi) ; for ctypes
|
|
("sqlite" ,sqlite) ; for sqlite extension
|
|
("openssl" ,openssl)
|
|
("readline" ,readline)
|
|
("zlib" ,zlib)
|
|
("tcl" ,tcl)
|
|
("tk" ,tk))) ; for tkinter
|
|
(native-inputs
|
|
`(("pkg-config" ,pkg-config)))
|
|
(native-search-paths
|
|
(list (search-path-specification
|
|
(variable "PYTHONPATH")
|
|
(files '("lib/python2.7/site-packages")))))
|
|
(home-page "https://www.python.org")
|
|
(synopsis "High-level, dynamically-typed programming language")
|
|
(description
|
|
"Python is a remarkably powerful dynamic programming language that
|
|
is used in a wide variety of application domains. Some of its key
|
|
distinguishing features include: clear, readable syntax; strong
|
|
introspection capabilities; intuitive object orientation; natural
|
|
expression of procedural code; full modularity, supporting hierarchical
|
|
packages; exception-based error handling; and very high level dynamic
|
|
data types.")
|
|
(license license:psfl)))
|
|
|
|
;; Current 2.x version.
|
|
(define-public python-2 python-2.7)
|
|
|
|
(define-public python-3.5
|
|
(package (inherit python-2)
|
|
(version "3.5.3")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (string-append "https://www.python.org/ftp/python/"
|
|
version "/Python-" version ".tar.xz"))
|
|
(patches (search-patches
|
|
"python-fix-tests.patch"
|
|
"python-3.5-fix-tests.patch"
|
|
"python-3.5-getentropy-on-old-kernels.patch"
|
|
"python-3-deterministic-build-info.patch"
|
|
"python-3-search-paths.patch"))
|
|
(patch-flags '("-p0"))
|
|
(sha256
|
|
(base32
|
|
"1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
|
|
(snippet
|
|
'(delete-file
|
|
"Lib/ctypes/test/test_win32.py")))) ; fails on aarch64
|
|
(arguments (substitute-keyword-arguments (package-arguments python-2)
|
|
((#:tests? _) #t)))
|
|
(native-search-paths
|
|
(list (search-path-specification
|
|
(variable "PYTHONPATH")
|
|
(files (list (string-append "lib/python"
|
|
(version-major+minor version)
|
|
"/site-packages"))))))))
|
|
|
|
;; Current 3.x version.
|
|
(define-public python-3 python-3.5)
|
|
|
|
;; Current major version.
|
|
(define-public python python-3)
|
|
|
|
;; Minimal variants of Python, mostly used to break the cycle between Tk and
|
|
;; Python (Tk -> libxcb -> Python.)
|
|
|
|
(define-public python2-minimal
|
|
(package (inherit python-2)
|
|
(name "python-minimal")
|
|
(outputs '("out"))
|
|
|
|
;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
|
|
;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
|
|
;; libffi.
|
|
(inputs `(("libffi" ,libffi)
|
|
("zlib" ,zlib)))))
|
|
|
|
(define-public python-minimal
|
|
(package (inherit python)
|
|
(name "python-minimal")
|
|
(outputs '("out"))
|
|
|
|
;; Build fails due to missing ctypes without libffi.
|
|
;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
|
|
;; zlib is required by 'zipimport', used by pip.
|
|
(inputs `(("libffi" ,libffi)
|
|
("openssl" ,openssl)
|
|
("zlib" ,zlib)))))
|
|
|
|
(define* (wrap-python3 python
|
|
#:optional
|
|
(name (string-append (package-name python) "-wrapper")))
|
|
(package (inherit python)
|
|
(name name)
|
|
(source #f)
|
|
(build-system trivial-build-system)
|
|
(outputs '("out"))
|
|
(inputs `(("bash" ,bash)))
|
|
(propagated-inputs `(("python" ,python)))
|
|
(arguments
|
|
`(#:modules ((guix build utils))
|
|
#:builder
|
|
(begin
|
|
(use-modules (guix build utils))
|
|
(let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
|
|
(python (string-append (assoc-ref %build-inputs "python") "/bin/")))
|
|
(mkdir-p bin)
|
|
(for-each
|
|
(lambda (old new)
|
|
(symlink (string-append python old)
|
|
(string-append bin "/" new)))
|
|
`("python3" ,"pydoc3" ,"idle3" ,"pip3")
|
|
`("python" ,"pydoc" ,"idle" ,"pip"))
|
|
;; python-config outputs search paths based upon its location,
|
|
;; use a bash wrapper to avoid changing its outputs.
|
|
(let ((bash (string-append (assoc-ref %build-inputs "bash")
|
|
"/bin/bash"))
|
|
(old (string-append python "python3-config"))
|
|
(new (string-append bin "/python-config")))
|
|
(with-output-to-file new
|
|
(lambda ()
|
|
(format #t "#!~a~%" bash)
|
|
(format #t "exec \"~a\" \"$@\"~%" old)
|
|
(chmod new #o755)
|
|
#t)))))))
|
|
(synopsis "Wrapper for the Python 3 commands")
|
|
(description
|
|
"This package provides wrappers for the commands of Python@tie{}3.x such
|
|
that they can be invoked under their usual name---e.g., @command{python}
|
|
instead of @command{python3}.")))
|
|
|
|
(define-public python-wrapper (wrap-python3 python))
|
|
(define-public python-minimal-wrapper (wrap-python3 python-minimal))
|
|
|
|
(define-public python-psutil
|
|
(package
|
|
(name "python-psutil")
|
|
(version "4.3.0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "psutil" version))
|
|
(sha256
|
|
(base32
|
|
"1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
;; FIXME: some tests does not return and times out.
|
|
'(#:tests? #f))
|
|
(home-page "https://www.github.com/giampaolo/psutil")
|
|
(synopsis "Library for retrieving information on running processes")
|
|
(description
|
|
"psutil (Python system and process utilities) is a library for retrieving
|
|
information on running processes and system utilization (CPU, memory, disks,
|
|
network) in Python. It is useful mainly for system monitoring, profiling and
|
|
limiting process resources and management of running processes. It implements
|
|
many functionalities offered by command line tools such as: ps, top, lsof,
|
|
netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
|
|
pidof, tty, taskset, pmap.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public python2-psutil
|
|
(package-with-python2 python-psutil))
|
|
|
|
(define-public python-passlib
|
|
(package
|
|
(name "python-passlib")
|
|
(version "1.7.1")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "passlib" version))
|
|
(sha256
|
|
(base32
|
|
"1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
|
|
(build-system python-build-system)
|
|
(native-inputs
|
|
`(("python-nose" ,python-nose)))
|
|
(propagated-inputs
|
|
`(("python-py-bcrypt" ,python-py-bcrypt)))
|
|
(arguments
|
|
`(#:phases
|
|
(alist-cons-before
|
|
'check 'set-PYTHON_EGG_CACHE
|
|
;; some tests require access to "$HOME/.cython"
|
|
(lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
|
|
%standard-phases)))
|
|
(home-page "https://bitbucket.org/ecollins/passlib")
|
|
(synopsis
|
|
"Comprehensive password hashing framework")
|
|
(description
|
|
"Passlib is a password hashing library for Python 2 & 3, which provides
|
|
cross-platform implementations of over 30 password hashing algorithms, as well
|
|
as a framework for managing existing password hashes. It's designed to be
|
|
useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
|
|
to providing full-strength password hashing for multi-user application.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public python2-passlib
|
|
(package-with-python2 python-passlib))
|
|
|
|
(define-public python-py-bcrypt
|
|
(package
|
|
(name "python-py-bcrypt")
|
|
(version "0.4")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
|
|
version
|
|
".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
|
|
(build-system python-build-system)
|
|
(home-page "https://code.google.com/p/py-bcrypt")
|
|
(synopsis
|
|
"Bcrypt password hashing and key derivation")
|
|
(description
|
|
"A python wrapper of OpenBSD's Blowfish password hashing code. This
|
|
system hashes passwords using a version of Bruce Schneier's Blowfish block
|
|
cipher with modifications designed to raise the cost of off-line password
|
|
cracking and frustrate fast hardware implementation. The computation cost of
|
|
the algorithm is parametised, so it can be increased as computers get faster.
|
|
The intent is to make a compromise of a password database less likely to
|
|
result in an attacker gaining knowledge of the plaintext passwords (e.g. using
|
|
John the Ripper).")
|
|
;; "sha2.c" is under BSD-3;
|
|
;; "blowfish.c" and "bcrypt.c" are under BSD-4;
|
|
;; the rest is under ISC.
|
|
(license (list license:isc license:bsd-3 license:bsd-4))))
|
|
|
|
(define-public python2-py-bcrypt
|
|
(package-with-python2 python-py-bcrypt))
|
|
|
|
|
|
(define-public python-paramiko
|
|
(package
|
|
(name "python-paramiko")
|
|
(version "2.1.2")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "paramiko" version))
|
|
(sha256
|
|
(base32
|
|
"04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
'(#:phases
|
|
(modify-phases %standard-phases
|
|
(replace 'check
|
|
(lambda _
|
|
(zero? (system* "python" "test.py")))))))
|
|
(propagated-inputs
|
|
`(("python-pyasn1" ,python-pyasn1)
|
|
("python-cryptography" ,python-cryptography)))
|
|
(home-page "http://www.paramiko.org/")
|
|
(synopsis "SSHv2 protocol library")
|
|
(description "Paramiko is a python implementation of the SSHv2 protocol,
|
|
providing both client and server functionality. While it leverages a Python C
|
|
extension for low level cryptography (PyCrypto), Paramiko itself is a pure
|
|
Python interface around SSH networking concepts.")
|
|
(license license:lgpl2.1+)))
|
|
|
|
(define-public python2-paramiko
|
|
(package-with-python2 python-paramiko))
|
|
|
|
|
|
(define-public python-httplib2
|
|
(package
|
|
(name "python-httplib2")
|
|
(version "0.9.2")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "httplib2" version))
|
|
(sha256
|
|
(base32
|
|
"126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
|
|
(build-system python-build-system)
|
|
(home-page "https://github.com/jcgregorio/httplib2")
|
|
(synopsis "Comprehensive HTTP client library")
|
|
(description
|
|
"A comprehensive HTTP client library supporting many features left out of
|
|
other HTTP libraries.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-httplib2
|
|
(package-with-python2 python-httplib2))
|
|
|
|
(define-public python-ecdsa
|
|
(package
|
|
(name "python-ecdsa")
|
|
(version "0.13")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
|
|
version
|
|
".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
|
|
(build-system python-build-system)
|
|
(inputs
|
|
`(("openssl" ,openssl)))
|
|
(home-page
|
|
"https://github.com/warner/python-ecdsa")
|
|
(synopsis
|
|
"ECDSA cryptographic signature library (pure python)")
|
|
(description
|
|
"This is an easy-to-use implementation of ECDSA cryptography (Elliptic
|
|
Curve Digital Signature Algorithm), implemented purely in Python. With this
|
|
library, you can quickly create keypairs (signing key and verifying key), sign
|
|
messages, and verify the signatures. The keys and signatures are very short,
|
|
making them easy to handle and incorporate into other protocols.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-ecdsa
|
|
(package-with-python2 python-ecdsa))
|
|
|
|
(define-public python-ccm
|
|
(package
|
|
(name "python-ccm")
|
|
(version "2.1.6")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "ccm" version))
|
|
(sha256
|
|
(base32
|
|
"177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
|
|
(build-system python-build-system)
|
|
(propagated-inputs
|
|
`(("python-pyyaml" ,python-pyyaml)
|
|
;; Not listed in setup.py, but used in ccmlib/node.py for full
|
|
;; functionality
|
|
("python-psutil" ,python-psutil)
|
|
("python-six" ,python-six)))
|
|
(home-page "https://github.com/pcmanus/ccm")
|
|
(synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
|
|
localhost")
|
|
(description "Cassandra Cluster Manager is a development tool for testing
|
|
local Cassandra clusters. It creates, launches and removes Cassandra clusters
|
|
on localhost.")
|
|
(license license:asl2.0)))
|
|
|
|
(define-public python2-ccm
|
|
(package-with-python2 python-ccm))
|
|
|
|
(define-public python-pytz
|
|
(package
|
|
(name "python-pytz")
|
|
(version "2016.10")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "pytz" version ".tar.bz2"))
|
|
(sha256
|
|
(base32
|
|
"0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
|
|
(build-system python-build-system)
|
|
(arguments `(#:tests? #f)) ; no test target
|
|
(home-page "http://pythonhosted.org/pytz")
|
|
(synopsis "Python timezone library")
|
|
(description
|
|
"This library allows accurate and cross platform timezone calculations
|
|
using Python 2.4 or higher and provides access to the Olson timezone database.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-pytz
|
|
(package-with-python2 python-pytz))
|
|
|
|
|
|
(define-public python-babel
|
|
(package
|
|
(name "python-babel")
|
|
(version "2.3.4")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "Babel" version))
|
|
(sha256
|
|
(base32
|
|
"0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
|
|
(build-system python-build-system)
|
|
(propagated-inputs
|
|
`(("python-pytz" ,python-pytz)))
|
|
(arguments `(#:tests? #f)) ; no test target
|
|
(home-page "http://babel.pocoo.org/")
|
|
(synopsis
|
|
"Tools for internationalizing Python applications")
|
|
(description
|
|
"Babel is composed of two major parts:
|
|
- tools to build and work with gettext message catalogs
|
|
- a Python interface to the CLDR (Common Locale Data Repository), providing
|
|
access to various locale display names, localized number and date formatting,
|
|
etc. ")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public python2-babel
|
|
(package-with-python2 python-babel))
|
|
|
|
(define-public python2-backport-ssl-match-hostname
|
|
(package
|
|
(name "python2-backport-ssl-match-hostname")
|
|
(version "3.5.0.1")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://pypi.python.org/packages/source/b/"
|
|
"backports.ssl_match_hostname/backports.ssl_match_hostname-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
`(#:python ,python-2
|
|
#:tests? #f)) ; no test target
|
|
(home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
|
|
(synopsis "Backport of ssl.match_hostname() function from Python 3.5")
|
|
(description
|
|
"This backport brings the ssl.match_hostname() function to users of
|
|
earlier versions of Python. The function checks the hostname in the
|
|
certificate returned by the server to which a connection has been established,
|
|
and verifies that it matches the intended target hostname.")
|
|
(license license:psfl)))
|
|
|
|
(define-public python-hdf4
|
|
(package
|
|
(name "python-hdf4")
|
|
(version "0.9")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri name version))
|
|
(sha256
|
|
(base32
|
|
"1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
|
|
(build-system python-build-system)
|
|
(native-inputs `(("nose" ,python-nose)))
|
|
(propagated-inputs `(("numpy" ,python-numpy)))
|
|
(inputs
|
|
`(("hdf4" ,hdf4)
|
|
("libjpeg" ,libjpeg)
|
|
("zlib" ,zlib)))
|
|
(arguments
|
|
`(#:phases
|
|
(modify-phases %standard-phases
|
|
(replace 'check
|
|
(lambda _
|
|
;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
|
|
;; on to import numpy. Somehow this works on their CI system.
|
|
;; Let's just manage PYTHONPATH here instead.
|
|
(substitute* "runexamples.sh"
|
|
(("export PYTHONPATH=.*") ""))
|
|
(setenv "PYTHONPATH"
|
|
(string-append (getcwd) ":"
|
|
(getenv "PYTHONPATH")))
|
|
(and (zero? (system* "./runexamples.sh"))
|
|
(zero? (system* "nosetests" "-v"))))))))
|
|
(home-page "https://github.com/fhs/python-hdf4")
|
|
(synopsis "Python interface to the NCSA HDF4 library")
|
|
(description
|
|
"Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
|
|
which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
|
|
NetCDF files can also be read and modified. Python-HDF4 is a fork of
|
|
@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-hdf4
|
|
(package-with-python2 python-hdf4))
|
|
|
|
(define-public python-h5py
|
|
(package
|
|
(name "python-h5py")
|
|
(version "2.6.0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "h5py" version))
|
|
(sha256
|
|
(base32
|
|
"0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
`(#:tests? #f ; no test target
|
|
#:phases
|
|
(modify-phases %standard-phases
|
|
(add-after 'unpack 'fix-hdf5-paths
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
(let ((prefix (assoc-ref inputs "hdf5")))
|
|
(substitute* "setup_build.py"
|
|
(("\\['/opt/local/lib', '/usr/local/lib'\\]")
|
|
(string-append "['" prefix "/lib" "']"))
|
|
(("'/opt/local/include', '/usr/local/include'")
|
|
(string-append "'" prefix "/include" "'")))
|
|
(substitute* "setup_configure.py"
|
|
(("\\['/usr/local/lib', '/opt/local/lib'\\]")
|
|
(string-append "['" prefix "/lib" "']")))
|
|
#t))))))
|
|
(propagated-inputs
|
|
`(("python-six" ,python-six)
|
|
("python-numpy" ,python-numpy)))
|
|
(inputs
|
|
`(("hdf5" ,hdf5)))
|
|
(native-inputs
|
|
`(("python-cython" ,python-cython)
|
|
("python-pkgconfig" ,python-pkgconfig)))
|
|
(home-page "http://www.h5py.org/")
|
|
(synopsis "Read and write HDF5 files from Python")
|
|
(description
|
|
"The h5py package provides both a high- and low-level interface to the
|
|
HDF5 library from Python. The low-level interface is intended to be a
|
|
complete wrapping of the HDF5 API, while the high-level component supports
|
|
access to HDF5 files, datasets and groups using established Python and NumPy
|
|
concepts.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public python2-h5py
|
|
(package-with-python2 python-h5py))
|
|
|
|
(define-public python-netcdf4
|
|
(package
|
|
(name "python-netcdf4")
|
|
(version "1.2.7")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "netCDF4" version))
|
|
(sha256
|
|
(base32
|
|
"1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
|
|
(build-system python-build-system)
|
|
(native-inputs
|
|
`(("python-cython" ,python-cython)))
|
|
(propagated-inputs
|
|
`(("python-numpy" ,python-numpy)))
|
|
(inputs
|
|
`(("netcdf" ,netcdf)
|
|
("hdf4" ,hdf4)
|
|
("hdf5" ,hdf5)))
|
|
(arguments
|
|
'(#:phases
|
|
(modify-phases %standard-phases
|
|
(replace 'check
|
|
(lambda _
|
|
(setenv "NO_NET" "1") ; disable opendap tests
|
|
(with-directory-excursion "test"
|
|
(setenv "PYTHONPATH" ; find and add the library we just built
|
|
(string-append
|
|
(car (find-files "../build" "lib.*"
|
|
#:directories? #:t
|
|
#:fail-on-error? #:t))
|
|
":" (getenv "PYTHONPATH")))
|
|
(zero? (system* "python" "run_all.py"))))))))
|
|
(home-page
|
|
"https://github.com/Unidata/netcdf4-python")
|
|
(synopsis "Python/numpy interface to the netCDF library")
|
|
(description "Netcdf4-python is a Python interface to the netCDF C
|
|
library. netCDF version 4 has many features not found in earlier
|
|
versions of the library and is implemented on top of HDF5. This module
|
|
can read and write files in both the new netCDF 4 and the old netCDF 3
|
|
format, and can create files that are readable by HDF5 clients. The
|
|
API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
|
|
to users of that module.")
|
|
;; The software is mainly ISC, but includes some files covered
|
|
;; by the Expat license.
|
|
(license (list license:isc license:expat))))
|
|
|
|
(define-public python2-netcdf4
|
|
(package-with-python2 python-netcdf4))
|
|
|
|
(define-public python-lockfile
|
|
(package
|
|
(name "python-lockfile")
|
|
(version "0.12.2")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
|
|
"lockfile-" version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
|
|
(build-system python-build-system)
|
|
(arguments '(#:test-target "check"))
|
|
(native-inputs
|
|
`(("python-pbr" ,python-pbr)))
|
|
(home-page "https://launchpad.net/pylockfile")
|
|
(synopsis "Platform-independent file locking module")
|
|
(description
|
|
"The lockfile package exports a LockFile class which provides a simple
|
|
API for locking files.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-lockfile
|
|
(package-with-python2 python-lockfile))
|
|
|
|
(define-public python-mock
|
|
(package
|
|
(name "python-mock")
|
|
(version "1.0.1")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "mock" version))
|
|
(sha256
|
|
(base32
|
|
"0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
|
|
(build-system python-build-system)
|
|
(arguments '(#:test-target "check"))
|
|
(home-page "https://github.com/testing-cabal/mock")
|
|
(synopsis "Python mocking and patching library for testing")
|
|
(description
|
|
"Mock is a library for testing in Python. It allows you to replace parts
|
|
of your system under test with mock objects and make assertions about how they
|
|
have been used.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-mock
|
|
(package-with-python2 python-mock))
|
|
|
|
;;; Some packages (notably, certbot and python-acme) rely on this newer version
|
|
;;; of python-mock. However, a large number of packages fail to build with
|
|
;;; mock@2, so we add a new variable for now. Also, there may be a dependency
|
|
;;; cycle between mock and six, so we avoid creating python2-mock@2 for now.
|
|
(define-public python-mock-2
|
|
(package
|
|
(inherit python-mock)
|
|
(version "2.0.0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "mock" version))
|
|
(sha256
|
|
(base32
|
|
"1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
|
|
(propagated-inputs
|
|
`(("python-pbr" ,python-pbr-minimal)
|
|
,@(package-propagated-inputs python-mock)))))
|
|
|
|
(define-public python-setuptools
|
|
(package
|
|
(name "python-setuptools")
|
|
(version "31.0.0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "setuptools" version))
|
|
(sha256
|
|
(base32
|
|
"0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
|
|
(modules '((guix build utils)))
|
|
(snippet
|
|
'(begin
|
|
;; Remove included binaries which are used to build self-extracting
|
|
;; installers for Windows.
|
|
;; TODO: Find some way to build them ourself so we can include them.
|
|
(for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
|
|
#t))))
|
|
(build-system python-build-system)
|
|
;; FIXME: Tests require pytest, which itself relies on setuptools.
|
|
;; One could bootstrap with an internal untested setuptools.
|
|
(arguments
|
|
`(#:tests? #f))
|
|
(home-page "https://pypi.python.org/pypi/setuptools")
|
|
(synopsis
|
|
"Library designed to facilitate packaging Python projects")
|
|
(description
|
|
"Setuptools is a fully-featured, stable library designed to facilitate
|
|
packaging Python projects, where packaging includes:
|
|
Python package and module definitions,
|
|
distribution package metadata,
|
|
test hooks,
|
|
project installation,
|
|
platform-specific details,
|
|
Python 3 support.")
|
|
;; TODO: setuptools now bundles the following libraries:
|
|
;; packaging, pyparsing, six and appdirs. How to unbundle?
|
|
(license (list license:psfl ; setuptools itself
|
|
license:expat ; six, appdirs, pyparsing
|
|
license:asl2.0 ; packaging is dual ASL2/BSD-2
|
|
license:bsd-2))))
|
|
|
|
(define-public python2-setuptools
|
|
(package-with-python2 python-setuptools))
|
|
|
|
(define-public python-uniseg
|
|
(package
|
|
(name "python-uniseg")
|
|
(version "0.7.1")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append "https://bitbucket.org/emptypage/uniseg-python/"
|
|
"get/rel-" version ".tar.gz"))
|
|
(file-name (string-append name "-" version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"1df4gddnj2a0v8z35wb2ra5vvh1f1qyxs8fgd25c8g64031mna6x"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
'(#:tests? #f)) ; The test suite requires network access.
|
|
(home-page
|
|
"https://bitbucket.org/emptypage/uniseg-python")
|
|
(synopsis
|
|
"Python library to determine Unicode text segmentations")
|
|
(description
|
|
"Uniseg is a Python package used to determine Unicode text segmentations.
|
|
Supported segmentations include:
|
|
@enumerate
|
|
@item @dfn{Code point} (any value in the Unicode codespace)
|
|
@item @dfn{Grapheme cluster} (user-perceived character made of a single or
|
|
multiple Unicode code points, e.g. \"G\" + acute-accent)
|
|
@item Word break
|
|
@item Sentence break
|
|
@item Line break
|
|
@end enumerate")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-uniseg
|
|
(package-with-python2 python-uniseg))
|
|
|
|
;;; Pycrypto is abandoned upstream:
|
|
;;;
|
|
;;; https://github.com/dlitz/pycrypto/issues/173
|
|
;;;
|
|
;;; TODO Remove this package from GNU Guix.
|
|
(define-public python-pycrypto
|
|
(package
|
|
(name "python-pycrypto")
|
|
(version "2.6.1")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "pycrypto" version))
|
|
(patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
|
|
(sha256
|
|
(base32
|
|
"0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
|
|
(build-system python-build-system)
|
|
(inputs
|
|
`(("python" ,python)
|
|
("gmp" ,gmp)))
|
|
(arguments
|
|
`(#:phases
|
|
(alist-cons-before
|
|
'build 'set-build-env
|
|
;; pycrypto runs an autoconf configure script behind the scenes
|
|
(lambda _
|
|
(setenv "CONFIG_SHELL" (which "bash")))
|
|
%standard-phases)))
|
|
(home-page "http://www.pycrypto.org/")
|
|
(synopsis "Cryptographic modules for Python")
|
|
(description
|
|
"Pycrypto is a collection of both secure hash functions (such as SHA256
|
|
and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
|
|
etc.). The package is structured to make adding new modules easy.")
|
|
(license license:public-domain)))
|
|
|
|
(define-public python2-pycrypto
|
|
(let ((pycrypto (package-with-python2 python-pycrypto)))
|
|
(package (inherit pycrypto)
|
|
(inputs
|
|
`(("python" ,python-2)
|
|
,@(alist-delete
|
|
"python"
|
|
(package-inputs pycrypto)))))))
|
|
|
|
(define-public python-eventlet
|
|
(package
|
|
(name "python-eventlet")
|
|
(version "0.20.1")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "eventlet" version))
|
|
(sha256
|
|
(base32
|
|
"0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
|
|
(build-system python-build-system)
|
|
(propagated-inputs
|
|
`(("python-greenlet" ,python-greenlet)))
|
|
(arguments
|
|
;; TODO: Requires unpackaged 'enum-compat'.
|
|
'(#:tests? #f))
|
|
(home-page "http://eventlet.net")
|
|
(synopsis "Concurrent networking library for Python")
|
|
(description
|
|
"Eventlet is a concurrent networking library for Python that
|
|
allows you to change how you run your code, not how you write it.
|
|
It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
|
|
Coroutines ensure that the developer uses a blocking style of programming
|
|
that is similar to threading, but provide the benefits of non-blocking I/O.
|
|
The event dispatch is implicit, which means you can easily use @code{Eventlet}
|
|
from the Python interpreter, or as a small part of a larger application.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-eventlet
|
|
(let ((base (package-with-python2
|
|
(strip-python2-variant python-eventlet))))
|
|
(package (inherit base)
|
|
(propagated-inputs
|
|
`(("python2-enum34" ,python2-enum34)
|
|
,@(package-propagated-inputs base))))))
|
|
|
|
(define-public python-keyring
|
|
(package
|
|
(name "python-keyring")
|
|
(version "8.7")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "keyring" version))
|
|
(sha256
|
|
(base32
|
|
"0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
|
|
(build-system python-build-system)
|
|
(native-inputs
|
|
`(("python-setuptools-scm" ,python-setuptools-scm)))
|
|
(propagated-inputs
|
|
`(("python-pycrypto" ,python-pycrypto)))
|
|
(arguments
|
|
`(#:tests? #f)) ;TODO: tests require pytest
|
|
(home-page "https://github.com/jaraco/keyring")
|
|
(synopsis "Store and access your passwords safely")
|
|
(description
|
|
"The Python keyring lib provides a easy way to access the system keyring
|
|
service from python. It can be used in any application that needs safe
|
|
password storage.")
|
|
;; "MIT" and PSF dual license
|
|
(license license:x11)))
|
|
|
|
(define-public python2-keyring
|
|
(package-with-python2 python-keyring))
|
|
|
|
(define-public python-six
|
|
(package
|
|
(name "python-six")
|
|
(version "1.10.0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "six" version))
|
|
(sha256
|
|
(base32
|
|
"0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
|
|
(build-system python-build-system)
|
|
(native-inputs
|
|
`(("python-py" ,python-py)
|
|
("python-pytest" ,python-pytest)))
|
|
(home-page "http://pypi.python.org/pypi/six/")
|
|
(synopsis "Python 2 and 3 compatibility utilities")
|
|
(description
|
|
"Six is a Python 2 and 3 compatibility library. It provides utility
|
|
functions for smoothing over the differences between the Python versions with
|
|
the goal of writing Python code that is compatible on both Python versions.
|
|
Six supports every Python version since 2.5. It is contained in only one
|
|
Python file, so it can be easily copied into your project.")
|
|
(license license:x11)))
|
|
|
|
(define-public python2-six
|
|
(package-with-python2 python-six))
|
|
|
|
(define-public python-dateutil
|
|
(package
|
|
(name "python-dateutil")
|
|
(version "2.6.0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "python-dateutil" version))
|
|
(sha256
|
|
(base32
|
|
"1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
|
|
(build-system python-build-system)
|
|
(propagated-inputs
|
|
`(("python-six" ,python-six)))
|
|
(home-page "https://dateutil.readthedocs.io/en/stable/")
|
|
(synopsis "Extensions to the standard datetime module")
|
|
(description
|
|
"The dateutil module provides powerful extensions to the standard
|
|
datetime module, available in Python 2.3+.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public python2-dateutil
|
|
(package-with-python2 python-dateutil))
|
|
|
|
(define-public python-parsedatetime
|
|
(package
|
|
(name "python-parsedatetime")
|
|
(version "2.4")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "parsedatetime" version))
|
|
(sha256
|
|
(base32
|
|
"0jxqkjks7z9dn222cqgvskp4wr6d92aglinxq7pd2w4mzdc7r09x"))))
|
|
(build-system python-build-system)
|
|
(native-inputs
|
|
`(("python-nose" ,python-nose)
|
|
("python-pyicu" ,python-pyicu)
|
|
("python-pytest" ,python-pytest)
|
|
("python-pytest-runner" ,python-pytest-runner)))
|
|
(propagated-inputs
|
|
`(("python-future" ,python-future)))
|
|
(home-page "https://github.com/bear/parsedatetime/")
|
|
(synopsis
|
|
"Parse human-readable date/time text")
|
|
(description
|
|
"Parse human-readable date/time text.")
|
|
(license license:asl2.0)))
|
|
|
|
(define-public python2-parsedatetime
|
|
(package-with-python2 python-parsedatetime))
|
|
|
|
(define-public python-pandas
|
|
(package
|
|
(name "python-pandas")
|
|
(version "0.19.2")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "pandas" version))
|
|
(sha256
|
|
(base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
|
|
(patches
|
|
(search-patches "python-pandas-skip-failing-tests.patch"))))
|
|
(build-system python-build-system)
|
|
(propagated-inputs
|
|
`(("python-numpy" ,python-numpy)
|
|
("python-pytz" ,python-pytz)
|
|
("python-dateutil" ,python-dateutil)))
|
|
(native-inputs
|
|
`(("python-nose" ,python-nose)
|
|
("python-cython" ,python-cython)))
|
|
(home-page "http://pandas.pydata.org")
|
|
(synopsis "Data structures for data analysis, time series, and statistics")
|
|
(description
|
|
"Pandas is a Python package providing fast, flexible, and expressive data
|
|
structures designed to make working with structured (tabular,
|
|
multidimensional, potentially heterogeneous) and time series data both easy
|
|
and intuitive. It aims to be the fundamental high-level building block for
|
|
doing practical, real world data analysis in Python.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public python2-pandas
|
|
(package-with-python2 python-pandas))
|
|
|
|
(define-public python-tzlocal
|
|
(package
|
|
(name "python-tzlocal")
|
|
(version "1.2.2")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "tzlocal" version))
|
|
(sha256
|
|
(base32
|
|
"0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
|
|
(build-system python-build-system)
|
|
(propagated-inputs
|
|
`(("python-pytz" ,python-pytz)))
|
|
(home-page "https://github.com/regebro/tzlocal")
|
|
(synopsis
|
|
"Local timezone information for Python")
|
|
(description
|
|
"Tzlocal returns a tzinfo object with the local timezone information.
|
|
This module attempts to fix a glaring hole in pytz, that there is no way to
|
|
get the local timezone information, unless you know the zoneinfo name, and
|
|
under several distributions that's hard or impossible to figure out.")
|
|
(license license:cc0)))
|
|
|
|
(define-public python2-pysqlite
|
|
(package
|
|
(name "python2-pysqlite")
|
|
(version "2.8.3")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "pysqlite" version))
|
|
(sha256
|
|
(base32
|
|
"1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
|
|
(build-system python-build-system)
|
|
(inputs
|
|
`(("sqlite" ,sqlite)))
|
|
(arguments
|
|
`(#:python ,python-2 ; incompatible with Python 3
|
|
#:tests? #f)) ; no test target
|
|
(home-page "https://github.com/ghaering/pysqlite")
|
|
(synopsis "SQLite bindings for Python")
|
|
(description
|
|
"Pysqlite provides SQLite bindings for Python that comply to the
|
|
Database API 2.0T.")
|
|
(license license:zlib)))
|
|
|
|
|
|
(define-public python2-mechanize
|
|
(package
|
|
(name "python2-mechanize")
|
|
(version "0.2.5")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
`(#:python ,python-2 ; apparently incompatible with Python 3
|
|
#:tests? #f))
|
|
;; test fails with message
|
|
;; AttributeError: 'module' object has no attribute 'test_pullparser'
|
|
;; (python-3.3.2) or
|
|
;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
|
|
;; (python-2.7.5).
|
|
;; The source code is from March 2011 and probably not up-to-date
|
|
;; with respect to python unit tests.
|
|
(home-page "http://wwwsearch.sourceforge.net/mechanize/")
|
|
(synopsis
|
|
"Stateful programmatic web browsing in Python")
|
|
(description
|
|
"Mechanize implements stateful programmatic web browsing in Python,
|
|
after Andy Lester’s Perl module WWW::Mechanize.")
|
|
(license (license:non-copyleft
|
|
"file://COPYING"
|
|
"See COPYING in the distribution."))))
|
|
|
|
|
|
(define-public python-simplejson
|
|
(package
|
|
(name "python-simplejson")
|
|
(version "3.10.0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "simplejson" version))
|
|
(sha256
|
|
(base32
|
|
"1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
|
|
(build-system python-build-system)
|
|
(home-page "http://simplejson.readthedocs.org/en/latest/")
|
|
(synopsis
|
|
"Json library for Python")
|
|
(description
|
|
"JSON (JavaScript Object Notation) is a subset of JavaScript
|
|
syntax (ECMA-262 3rd edition) used as a lightweight data interchange
|
|
format.
|
|
|
|
Simplejson exposes an API familiar to users of the standard library marshal
|
|
and pickle modules. It is the externally maintained version of the json
|
|
library contained in Python 2.6, but maintains compatibility with Python 2.5
|
|
and (currently) has significant performance advantages, even without using
|
|
the optional C extension for speedups. Simplejson is also supported on
|
|
Python 3.3+.")
|
|
(license license:x11)))
|
|
|
|
(define-public python2-simplejson
|
|
(package-with-python2 python-simplejson))
|
|
|
|
|
|
(define-public python-pyicu
|
|
(package
|
|
(name "python-pyicu")
|
|
(version "1.9.5")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "PyICU" version))
|
|
(sha256
|
|
(base32
|
|
"16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
'(#:phases
|
|
(modify-phases %standard-phases
|
|
(add-before 'check 'delete-failing-test
|
|
(lambda _
|
|
;; XXX: These tests require locales that are unavailable
|
|
;; in the build environment.
|
|
(delete-file "test/test_DateTimeParserGenerator.py")
|
|
#t)))))
|
|
(inputs
|
|
`(("icu4c" ,icu4c)))
|
|
(home-page "http://pyicu.osafoundation.org/")
|
|
(synopsis "Python extension wrapping the ICU C++ API")
|
|
(description
|
|
"PyICU is a python extension wrapping the ICU C++ API.")
|
|
(license license:x11)))
|
|
|
|
(define-public python2-pyicu
|
|
(package-with-python2 python-pyicu))
|
|
|
|
(define-public python2-dogtail
|
|
;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
|
|
;; spaces in indentation" with Python 3.
|
|
(package
|
|
(name "python2-dogtail")
|
|
(version "0.9.9")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "dogtail" version))
|
|
(sha256
|
|
(base32
|
|
"0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
|
|
(build-system python-build-system)
|
|
(arguments `(#:python ,python-2
|
|
#:tests? #f)) ; invalid command "test"
|
|
;; Currently no offical homepage.
|
|
(home-page "https://pypi.python.org/pypi/dogtail/")
|
|
(synopsis "GUI test tool and automation framework written in Python")
|
|
(description
|
|
"Dogtail is a GUI test tool and automation framework written in Python.
|
|
It uses Accessibility (a11y) technologies to communicate with desktop
|
|
applications. dogtail scripts are written in Python and executed like any
|
|
other Python program.")
|
|
(license license:gpl2+)))
|
|
|
|
(define-public python2-empy
|
|
(package
|
|
(name "python2-empy")
|
|
(version "3.3")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (string-append "http://www.alcyone.com/software/empy/empy-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
`(#:python ,python-2
|
|
#:phases (alist-replace
|
|
'check
|
|
(lambda _
|
|
(zero? (system* "./test.sh")))
|
|
%standard-phases)))
|
|
(home-page "http://www.alcyone.com/software/empy/")
|
|
(synopsis "Templating system for Python")
|
|
(description
|
|
"EmPy is a system for embedding Python expressions and statements in
|
|
template text; it takes an EmPy source file, processes it, and produces
|
|
output. This is accomplished via expansions, which are special signals to the
|
|
EmPy system and are set off by a special prefix (by default the at sign, @@).
|
|
EmPy can expand arbitrary Python expressions and statements in this way, as
|
|
well as a variety of special forms. Textual data not explicitly delimited in
|
|
this way is sent unaffected to the output, allowing Python to be used in
|
|
effect as a markup language. Also supported are callbacks via hooks,
|
|
recording and playback via diversions, and dynamic, chainable filters. The
|
|
system is highly configurable via command line options and embedded
|
|
commands.")
|
|
(license license:lgpl2.1+)))
|
|
|
|
(define-public python2-element-tree
|
|
(package
|
|
(name "python2-element-tree")
|
|
(version "1.2.6")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"http://effbot.org/media/downloads/elementtree-"
|
|
version "-20050316.tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
`(#:python ,python-2 ; seems to be part of Python 3
|
|
#:tests? #f)) ; no 'test' sub-command
|
|
(synopsis "Toolkit for XML processing in Python")
|
|
(description
|
|
"ElementTree is a Python library supporting lightweight XML processing.")
|
|
(home-page "http://effbot.org/zone/element-index.htm")
|
|
(license (license:x11-style
|
|
"http://docs.python.org/2/license.html"
|
|
"Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
|
|
|
|
(define-public python2-pybugz
|
|
(package
|
|
(name "python2-pybugz")
|
|
(version "0.6.11")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"http://bits.liquidx.net/projects/pybugz/pybugz-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
|
|
(patches (search-patches "pybugz-stty.patch"
|
|
"pybugz-encode-error.patch"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
`(#:python ,python-2 ; SyntaxError with Python 3
|
|
#:tests? #f)) ; no 'test' sub-command
|
|
(propagated-inputs
|
|
`(("element-tree" ,python2-element-tree)))
|
|
(synopsis "Python and command-line interface to Bugzilla")
|
|
(description
|
|
"PyBugz is a Python library and command-line tool to query the Bugzilla
|
|
bug tracking system. It is meant as an aid to speed up interaction with the
|
|
bug tracker.")
|
|
(home-page "http://www.liquidx.net/pybugz/")
|
|
(license license:gpl2)))
|
|
|
|
(define-public python-enum34
|
|
(package
|
|
(name "python-enum34")
|
|
(version "1.1.6")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "enum34" version))
|
|
(sha256
|
|
(base32
|
|
"1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
|
|
(build-system python-build-system)
|
|
(home-page "https://pypi.python.org/pypi/enum34")
|
|
(synopsis "Backported Python 3.4 Enum")
|
|
(description
|
|
"Enum34 is the new Python stdlib enum module available in Python 3.4
|
|
backported for previous versions of Python from 2.4 to 3.3.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public python2-enum34
|
|
(package-with-python2 python-enum34))
|
|
|
|
(define-public python-parse-type
|
|
(package
|
|
(name "python-parse-type")
|
|
(version "0.3.4")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append "https://pypi.python.org/packages/source/p/"
|
|
"parse_type/parse_type-" version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
`(#:phases
|
|
(modify-phases %standard-phases
|
|
(add-after 'unpack 'patch-tests
|
|
(lambda _
|
|
(substitute* "tests/test_parse_type_parse.py"
|
|
;; Newer Python versions don't have the problem this test tests.
|
|
(("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
|
|
""))
|
|
#t)))))
|
|
(propagated-inputs
|
|
`(("python-six" ,python-six)
|
|
("python-parse" ,python-parse)))
|
|
(native-inputs
|
|
`(("python-pytest" ,python-pytest)
|
|
("python-pytest-runner" ,python-pytest-runner)))
|
|
(home-page "https://github.com/jenisys/parse_type")
|
|
(synopsis "Extended parse module")
|
|
(description
|
|
"Parse_type extends the python parse module.")
|
|
(properties
|
|
`((python2-variant . ,(delay python2-parse-type))))
|
|
(license license:bsd-3)))
|
|
|
|
(define-public python2-parse-type
|
|
(let ((base (package-with-python2
|
|
(strip-python2-variant python-parse-type))))
|
|
(package (inherit base)
|
|
(propagated-inputs
|
|
`(("python2-enum34" ,python2-enum34)
|
|
,@(package-propagated-inputs base))))))
|
|
|
|
(define-public python-parse
|
|
(package
|
|
(name "python-parse")
|
|
(version "1.6.6")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "parse" version))
|
|
(sha256
|
|
(base32
|
|
"0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
|
|
(patches (search-patches "python-parse-too-many-fields.patch"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
`(#:phases
|
|
(modify-phases %standard-phases
|
|
(replace 'check
|
|
(lambda _ (zero? (system* "python" "test_parse.py")))))))
|
|
(home-page "https://github.com/r1chardj0n3s/parse")
|
|
(synopsis "Parse strings")
|
|
(description
|
|
"Parse strings using a specification based on the Python format()
|
|
syntax.")
|
|
(license license:x11)))
|
|
|
|
(define-public python-polib
|
|
(package
|
|
(name "python-polib")
|
|
(version "1.0.8")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "polib" version))
|
|
(sha256
|
|
(base32
|
|
"1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
|
|
(build-system python-build-system)
|
|
(home-page "https://bitbucket.org/izi/polib/wiki/Home")
|
|
(synopsis "Manipulate, create and modify gettext files")
|
|
(description "Polib can manipulate any gettext format (po, pot and mo)
|
|
files. It can be used to create po files from scratch or to modify
|
|
existing ones.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-polib
|
|
(let ((base (package-with-python2 (strip-python2-variant python-polib))))
|
|
(package
|
|
(inherit base)
|
|
(arguments `(,@(package-arguments base)
|
|
;; Tests don't work with python2.
|
|
#:tests? #f)))))
|
|
|
|
(define-public scons
|
|
(package
|
|
(name "scons")
|
|
(version "2.5.1")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (string-append "mirror://sourceforge/scons/scons/" version
|
|
"/scons-" version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
;; With Python 3.x, fails to build with a syntax error.
|
|
`(#:python ,python-2
|
|
#:use-setuptools? #f ; still relies on distutils
|
|
#:tests? #f)) ; no 'python setup.py test' command
|
|
(home-page "http://scons.org/")
|
|
(synopsis "Software construction tool written in Python")
|
|
(description
|
|
"SCons is a software construction tool. Think of SCons as an improved,
|
|
cross-platform substitute for the classic Make utility with integrated
|
|
functionality similar to autoconf/automake and compiler caches such as ccache.
|
|
In short, SCons is an easier, more reliable and faster way to build
|
|
software.")
|
|
(license license:x11)))
|
|
|
|
(define-public python-extras
|
|
(package
|
|
(name "python-extras")
|
|
(version "0.0.3")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://pypi.python.org/packages/source/e/extras/extras-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
;; error in setup.cfg: command 'test' has no such option 'buffer'
|
|
'(#:tests? #f))
|
|
(home-page "https://github.com/testing-cabal/extras")
|
|
(synopsis "Useful extensions to the Python standard library")
|
|
(description
|
|
"Extras is a set of extensions to the Python standard library.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-extras
|
|
(package-with-python2 python-extras))
|
|
|
|
(define-public python-mimeparse
|
|
(package
|
|
(name "python-mimeparse")
|
|
(version "0.1.4")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
'(#:tests? #f)) ; no setup.py test command
|
|
(home-page
|
|
"https://github.com/dbtsai/python-mimeparse")
|
|
(synopsis "Python library for parsing MIME types")
|
|
(description
|
|
"Mimeparse provides basic functions for parsing MIME type names and
|
|
matching them against a list of media-ranges.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-mimeparse
|
|
(package-with-python2 python-mimeparse))
|
|
|
|
(define-public python-nose
|
|
(package
|
|
(name "python-nose")
|
|
(version "1.3.7")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "nose" version))
|
|
(sha256
|
|
(base32
|
|
"164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
'(#:tests? #f)) ; FIXME: test suite fails
|
|
(home-page "http://readthedocs.org/docs/nose/")
|
|
(synopsis "Python testing library")
|
|
(description
|
|
"Nose extends the unittest library to make testing easier.")
|
|
(license license:lgpl2.0+)))
|
|
|
|
(define-public python2-nose
|
|
(package-with-python2 python-nose))
|
|
|
|
(define-public python-nose2
|
|
(package
|
|
(name "python-nose2")
|
|
(version "0.6.5")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "nose2" version))
|
|
(sha256
|
|
(base32
|
|
"1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
|
|
(build-system python-build-system)
|
|
(arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
|
|
(propagated-inputs
|
|
`(("python-cov-core" ,python-cov-core)
|
|
("python-pytest-cov" ,python-pytest-cov)
|
|
("python-six" ,python-six)))
|
|
(home-page "https://github.com/nose-devs/nose2")
|
|
(synopsis "Next generation of nicer testing for Python")
|
|
(description
|
|
"Nose2 is the next generation of nicer testing for Python, based on the
|
|
plugins branch of unittest2. Nose2 aims to improve on nose by providing a
|
|
better plugin api, being easier for users to configure, and simplifying internal
|
|
interfaces and processes.")
|
|
(license license:bsd-2)))
|
|
|
|
(define-public python2-nose2
|
|
(package-with-python2 python-nose2))
|
|
|
|
(define-public python-unittest2
|
|
(package
|
|
(name "python-unittest2")
|
|
(version "0.5.1")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
|
|
(build-system python-build-system)
|
|
(home-page "http://pypi.python.org/pypi/unittest2")
|
|
(synopsis "Python unit testing library")
|
|
(description
|
|
"Unittest2 is a replacement for the unittest module in the Python
|
|
standard library.")
|
|
(license license:psfl)))
|
|
|
|
(define-public python2-unittest2
|
|
(package (inherit python-unittest2)
|
|
(name "python2-unittest2")
|
|
(version "0.5.1")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://pypi.python.org/packages/source/u/unittest2/unittest2-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
|
|
(arguments
|
|
`(#:python ,python-2
|
|
#:tests? #f)))) ; no setup.py test command
|
|
|
|
(define-public python-pafy
|
|
(package
|
|
(name "python-pafy")
|
|
(version "0.5.3.1")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "pafy" version))
|
|
(sha256
|
|
(base32
|
|
"1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
`(#:tests? #f)) ; Currently pafy can not find itself in the tests
|
|
(propagated-inputs
|
|
;; Youtube-dl is a python package which is imported in the file
|
|
;; "backend_youtube_dl.py", therefore it needs to be propagated.
|
|
`(("youtube-dl" ,youtube-dl)))
|
|
(home-page "https://np1.github.io/pafy/")
|
|
(synopsis "Retrieve YouTube content and metadata")
|
|
(description
|
|
"@code{pafy} is a python library to retrieve YouTube content and metadata.")
|
|
(license license:lgpl3+)))
|
|
|
|
(define-public python-py
|
|
(package
|
|
(name "python-py")
|
|
(version "1.4.32")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "py" version))
|
|
(sha256
|
|
(base32
|
|
"19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
;; FIXME: "ImportError: 'test' module incorrectly imported from
|
|
;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
|
|
;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
|
|
;; Is this module globally installed?"
|
|
'(#:tests? #f))
|
|
(home-page "http://pylib.readthedocs.org/")
|
|
(synopsis "Python library for parsing, I/O, instrospection, and logging")
|
|
(description
|
|
"Py is a Python library for file name parsing, .ini file parsing, I/O,
|
|
code introspection, and logging.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-py
|
|
(package-with-python2 python-py))
|
|
|
|
(define-public python-pytest
|
|
(package
|
|
(name "python-pytest")
|
|
(version "2.7.3")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://pypi.python.org/packages/source/p/pytest/pytest-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
|
|
(modules '((guix build utils)))
|
|
(snippet
|
|
;; One of the tests involves the /usr directory, so it fails.
|
|
'(substitute* "testing/test_argcomplete.py"
|
|
(("def test_remove_dir_prefix\\(self\\):")
|
|
"@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
|
|
(build-system python-build-system)
|
|
(propagated-inputs
|
|
`(("python-py" ,python-py)))
|
|
(native-inputs
|
|
`(("python-nose" ,python-nose)
|
|
("python-mock" ,python-mock)))
|
|
(home-page "http://pytest.org")
|
|
(synopsis "Python testing library")
|
|
(description
|
|
"Pytest is a testing tool that provides auto-discovery of test modules
|
|
and functions, detailed info on failing assert statements, modular fixtures,
|
|
and many external plugins.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-pytest
|
|
(package-with-python2 python-pytest))
|
|
|
|
;; Some packages require a newer pytest.
|
|
(define-public python-pytest-3.0
|
|
(package
|
|
(inherit python-pytest)
|
|
(name "python-pytest")
|
|
(version "3.0.7")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "pytest" version))
|
|
(sha256
|
|
(base32
|
|
"1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
|
|
(arguments
|
|
`(#:phases
|
|
(modify-phases %standard-phases
|
|
(add-before 'check 'disable-invalid-test
|
|
(lambda _
|
|
(substitute* "testing/test_argcomplete.py"
|
|
(("def test_remove_dir_prefix" line)
|
|
(string-append "@pytest.mark.skip"
|
|
"(reason=\"Assumes that /usr exists.\")\n "
|
|
line)))
|
|
#t)))))
|
|
(native-inputs
|
|
`(("python-nose" ,python-nose)
|
|
("python-mock" ,python-mock)
|
|
("python-hypothesis" ,python-hypothesis)))
|
|
(properties `((python2-variant . ,(delay python2-pytest-3.0))))))
|
|
|
|
(define-public python2-pytest-3.0
|
|
(let ((base (package-with-python2
|
|
(strip-python2-variant python-pytest-3.0))))
|
|
(package (inherit base)
|
|
(native-inputs
|
|
`(("python2-enum34" ,python2-enum34)
|
|
,@(package-native-inputs base))))))
|
|
|
|
(define-public python-pytest-cov
|
|
(package
|
|
(name "python-pytest-cov")
|
|
(version "2.4.0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "pytest-cov" version))
|
|
(sha256
|
|
(base32
|
|
"03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
`(#:phases
|
|
(modify-phases %standard-phases
|
|
(replace 'check
|
|
(lambda _
|
|
;; options taken from tox.ini
|
|
;; TODO: make "--restructuredtext" tests pass. They currently fail
|
|
;; with "Duplicate implicit target name"
|
|
(zero? (system* "python" "./setup.py" "check"
|
|
"--strict" "--metadata")))))))
|
|
(propagated-inputs
|
|
`(("python-coverage" ,python-coverage)
|
|
("python-pytest" ,python-pytest)))
|
|
(home-page "https://github.com/pytest-dev/pytest-cov")
|
|
(synopsis "Pytest plugin for measuring coverage")
|
|
(description
|
|
"Pytest-cov produces coverage reports. It supports centralised testing and
|
|
distributed testing in both @code{load} and @code{each} modes. It also
|
|
supports coverage of subprocesses.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-pytest-cov
|
|
(package-with-python2 python-pytest-cov))
|
|
|
|
(define-public python-pytest-runner
|
|
(package
|
|
(name "python-pytest-runner")
|
|
(version "2.11.1")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "pytest-runner" version))
|
|
(sha256
|
|
(base32
|
|
"1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
`(#:phases
|
|
(modify-phases %standard-phases
|
|
;; The fancy way of setting the version with setuptools_scm does not
|
|
;; seem to work here.
|
|
(add-after 'unpack 'set-version
|
|
(lambda _
|
|
(substitute* "docs/conf.py"
|
|
(("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
|
|
(string-append "version = \"" ,version "\"")))
|
|
#t)))))
|
|
(native-inputs
|
|
`(("python-pytest" ,python-pytest)
|
|
("python-setuptools-scm" ,python-setuptools-scm)))
|
|
(home-page "https://github.com/pytest-dev/pytest-runner")
|
|
(synopsis "Invoke py.test as a distutils command")
|
|
(description
|
|
"This package provides a @command{pytest-runner} command that
|
|
@file{setup.py} files can use to run tests.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-pytest-runner
|
|
(package-with-python2 python-pytest-runner))
|
|
|
|
(define-public python-pytest-mock
|
|
(package
|
|
(name "python-pytest-mock")
|
|
(version "1.2")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "pytest-mock" version ".zip"))
|
|
(sha256
|
|
(base32
|
|
"03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
|
|
(build-system python-build-system)
|
|
(native-inputs
|
|
`(("unzip" ,unzip)))
|
|
(propagated-inputs
|
|
`(("python-pytest" ,python-pytest)))
|
|
(home-page "https://github.com/pytest-dev/pytest-mock/")
|
|
(synopsis "Thin-wrapper around the mock package for easier use with py.test")
|
|
(description
|
|
"This plugin installs a @code{mocker} fixture which is a thin-wrapper
|
|
around the patching API provided by the @code{mock} package, but with the
|
|
benefit of not having to worry about undoing patches at the end of a test.
|
|
The mocker fixture has the same API as @code{mock.patch}, supporting the
|
|
same arguments.")
|
|
(properties `((python2-variant . ,(delay python2-pytest-mock))))
|
|
(license license:expat)))
|
|
|
|
(define-public python2-pytest-mock
|
|
(let ((base (package-with-python2
|
|
(strip-python2-variant python-pytest-mock))))
|
|
(package (inherit base)
|
|
(propagated-inputs
|
|
`(("python2-mock" ,python2-mock)
|
|
,@(package-propagated-inputs base))))))
|
|
|
|
(define-public python-pytest-xdist
|
|
(package
|
|
(name "python-pytest-xdist")
|
|
(version "1.14")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "pytest-xdist" version ".zip"))
|
|
(sha256
|
|
(base32
|
|
"08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
|
|
(modules '((guix build utils)))
|
|
(snippet
|
|
'(begin
|
|
;; Remove pre-compiled .pyc files from source.
|
|
(for-each delete-file-recursively
|
|
(find-files "." "__pycache__" #:directories? #t))
|
|
(for-each delete-file (find-files "." "\\.pyc$"))
|
|
#t))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
'(#:tests? #f)) ;FIXME: Some tests are failing.
|
|
;; #:phases
|
|
;; (modify-phases %standard-phases
|
|
;; (delete 'check)
|
|
;; (add-after 'install 'check
|
|
;; (lambda* (#:key inputs outputs #:allow-other-keys)
|
|
;; (add-installed-pythonpath inputs outputs)
|
|
;; (zero? (system* "py.test" "-v")))))
|
|
(native-inputs
|
|
`(("unzip" ,unzip)
|
|
("python-setuptools-scm" ,python-setuptools-scm)))
|
|
(propagated-inputs
|
|
`(("python-execnet" ,python-execnet)
|
|
("python-pytest" ,python-pytest)
|
|
("python-py" ,python-py)))
|
|
(home-page
|
|
"https://github.com/pytest-dev/pytest-xdist")
|
|
(synopsis
|
|
"Plugin for py.test with distributed testing and loop-on-failing modes")
|
|
(description
|
|
"The pytest-xdist plugin extends py.test with some unique test execution
|
|
modes: parallelization, running tests in boxed subprocesses, the ability
|
|
to run tests repeatedly when failed, and the ability to run tests on multiple
|
|
Python interpreters or platforms. It uses rsync to copy the existing
|
|
program code to a remote location, executes there, and then syncs the
|
|
result back.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-pytest-xdist
|
|
(package-with-python2 python-pytest-xdist))
|
|
|
|
(define-public python-scripttest
|
|
(package
|
|
(name "python-scripttest")
|
|
(version "1.3")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://pypi.python.org/packages/source/s/scripttest/scripttest-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
|
|
(build-system python-build-system)
|
|
(native-inputs
|
|
`(("python-pytest" ,python-pytest)))
|
|
(home-page "http://pythonpaste.org/scripttest/")
|
|
(synopsis "Python library to test command-line scripts")
|
|
(description "Scripttest is a Python helper library for testing
|
|
interactive command-line applications. With it you can run a script in a
|
|
subprocess and see the output as well as any file modifications.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-scripttest
|
|
(package-with-python2 python-scripttest))
|
|
|
|
(define-public python-testtools
|
|
(package
|
|
(name "python-testtools")
|
|
(version "1.4.0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "testtools" version))
|
|
(sha256
|
|
(base32
|
|
"1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
`(#:phases
|
|
(modify-phases %standard-phases
|
|
(add-after 'unpack 'fix-module-imports
|
|
(lambda _
|
|
(substitute* "setup.py"
|
|
(("'unittest2>=0.8.0',") ""))
|
|
(substitute* '("testtools/testcase.py"
|
|
"testtools/testsuite.py"
|
|
"testtools/run.py"
|
|
"testtools/tests/test_run.py"
|
|
"testtools/tests/test_testsuite.py"
|
|
"testtools/tests/test_deferredruntest.py")
|
|
;; unittest2 is a backport of Python2.7 features to Python 2.4.
|
|
(("import unittest2 as unittest") "import unittest")
|
|
(("import unittest2") "import unittest as unittest2")
|
|
(("from unittest2 import") "from unittest import"))
|
|
(substitute* "testtools/tests/test_testresult.py"
|
|
;; NUL in source code is not allowed (raises ValueError).
|
|
(("\\x00\\x04") "\\x04"))
|
|
#t)))))
|
|
(propagated-inputs
|
|
`(("python-mimeparse" ,python-mimeparse)
|
|
("python-extras" ,python-extras)))
|
|
(home-page "https://github.com/testing-cabal/testtools")
|
|
(synopsis
|
|
"Extensions to the Python standard library unit testing framework")
|
|
(description
|
|
"Testtools extends the Python standard library unit testing framework to
|
|
provide matchers, more debugging information, and cross-Python
|
|
compatibility.")
|
|
(license license:psfl)))
|
|
|
|
(define-public python2-testtools
|
|
(package-with-python2 python-testtools))
|
|
|
|
(define-public python-testscenarios
|
|
(package
|
|
(name "python-testscenarios")
|
|
(version "0.4")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
|
|
(build-system python-build-system)
|
|
(propagated-inputs
|
|
`(("python-testtools" ,python-testtools)))
|
|
(home-page "https://launchpad.net/testscenarios")
|
|
(synopsis "Pyunit extension for dependency injection")
|
|
(description
|
|
"Testscenarios provides clean dependency injection for Python unittest
|
|
style tests.")
|
|
(license (list license:bsd-3 license:asl2.0)))) ; at the user's option
|
|
|
|
(define-public python2-testscenarios
|
|
(package-with-python2 python-testscenarios))
|
|
|
|
(define-public python-testresources
|
|
(package
|
|
(name "python-testresources")
|
|
(version "0.2.7")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://pypi.python.org/packages/source/t/testresources/testresources-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
|
|
(build-system python-build-system)
|
|
(home-page "https://launchpad.net/testresources")
|
|
(synopsis
|
|
"Pyunit extension for managing test resources")
|
|
(description
|
|
"Testresources is an extension to Python's unittest to allow declarative
|
|
use of resources by test cases.")
|
|
(license (list license:bsd-3 license:asl2.0)))) ; at the user's option
|
|
|
|
(define-public python2-testresources
|
|
(package-with-python2 python-testresources))
|
|
|
|
(define-public python-subunit
|
|
(package
|
|
(name "python-subunit")
|
|
(version "0.0.21")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
|
|
(build-system python-build-system)
|
|
(propagated-inputs
|
|
`(("python-extras" ,python-extras)
|
|
("python-mimeparse" ,python-mimeparse)))
|
|
(native-inputs
|
|
`(("python-testscenarios" ,python-testscenarios)))
|
|
(home-page "http://launchpad.net/subunit")
|
|
(synopsis "Python implementation of the subunit protocol")
|
|
(description
|
|
"Python-subunit is a Python implementation of the subunit test streaming
|
|
protocol.")
|
|
(license (list license:bsd-3 license:asl2.0)))) ; at the user's option
|
|
|
|
(define-public python2-subunit
|
|
(package-with-python2 python-subunit))
|
|
|
|
;; Recent versions of python-fixtures and python-testrepository need
|
|
;; python-pbr for packaging, which itself needs these two packages for
|
|
;; testing.
|
|
;; To fix this circular dependency, we use a build of python-pbr, based on the
|
|
;; same source, just without any test dependencies and with tests disabled.
|
|
;; python-pbr-minmal is then used to package python-fixtures and
|
|
;; python-testrepository.
|
|
;; Strictly speaking we currently could remove the test-requirements from the
|
|
;; normal python-pbr package (and save this package) since test are disabled
|
|
;; there anyway. But this may change in future.
|
|
(define python-pbr-minimal
|
|
(package
|
|
(name "python-pbr-minimal")
|
|
(version "1.10.0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "pbr" version))
|
|
(sha256
|
|
(base32
|
|
"177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
|
|
(patches (search-patches "python-pbr-fix-man-page-support.patch"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
`(#:tests? #f))
|
|
(home-page "http://docs.openstack.org/developer/pbr/")
|
|
(synopsis "Minimal build of python-pbr used for bootstrapping")
|
|
(description
|
|
"Used only for bootstrapping python2-pbr, you should not need this.")
|
|
(license license:asl2.0)))
|
|
|
|
(define python2-pbr-minimal
|
|
(package-with-python2 python-pbr-minimal))
|
|
|
|
(define-public python-pbr
|
|
(package
|
|
(inherit python-pbr-minimal)
|
|
(name "python-pbr")
|
|
(arguments
|
|
`(#:tests? #f)) ;; Most tests seem to use the Internet.
|
|
(propagated-inputs
|
|
`(("git" ,git))) ;; pbr actually uses the "git" binary.
|
|
(native-inputs
|
|
`(("python-fixtures" ,python-fixtures)
|
|
;; discover, coverage, hacking, subunit
|
|
("python-mock" ,python-mock)
|
|
("python-six" ,python-six)
|
|
("python-sphinx" ,python-sphinx)
|
|
("python-testrepository" ,python-testrepository)
|
|
("python-testresources" ,python-testresources)
|
|
("python-testscenarios" ,python-testscenarios)
|
|
("python-testtools" ,python-testtools)
|
|
("python-virtualenv" ,python-virtualenv)))
|
|
(synopsis "Enhance the default behavior of Python’s setuptools")
|
|
(description
|
|
"Python Build Reasonableness (PBR) is a library that injects some useful
|
|
and sensible default behaviors into your setuptools run. It will set
|
|
versions, process requirements files and generate AUTHORS and ChangeLog file
|
|
from git information.
|
|
")))
|
|
|
|
(define-public python2-pbr
|
|
(package-with-python2 python-pbr))
|
|
|
|
(define-public python-fixtures
|
|
(package
|
|
(name "python-fixtures")
|
|
(version "1.4.0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "fixtures" version))
|
|
(sha256
|
|
(base32
|
|
"0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
'(#:phases
|
|
(modify-phases %standard-phases
|
|
(replace 'check
|
|
(lambda _
|
|
(zero? (system* "python" "-m" "testtools.run"
|
|
"fixtures.test_suite")))))))
|
|
(propagated-inputs
|
|
`(("python-six" ,python-six)))
|
|
(native-inputs
|
|
`(("python-mock" ,python-mock)
|
|
("python-pbr-minimal" ,python-pbr-minimal)
|
|
("python-testtools" ,python-testtools)))
|
|
(home-page "https://launchpad.net/python-fixtures")
|
|
(synopsis "Python test fixture library")
|
|
(description
|
|
"Fixtures provides a way to create reusable state, useful when writing
|
|
Python tests.")
|
|
(license (list license:bsd-3 license:asl2.0)))) ; at user's option
|
|
|
|
(define-public python2-fixtures
|
|
(package-with-python2 python-fixtures))
|
|
|
|
(define-public python-testrepository
|
|
(package
|
|
(name "python-testrepository")
|
|
(version "0.0.20")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://pypi.python.org/packages/source/t/testrepository/testrepository-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
;; FIXME: Many tests are failing.
|
|
'(#:tests? #f))
|
|
(propagated-inputs
|
|
`(("python-fixtures" ,python-fixtures)
|
|
("python-subunit" ,python-subunit)
|
|
("python-testtools" ,python-testtools)))
|
|
(native-inputs
|
|
`(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
|
|
("python-mimeparse" ,python-mimeparse)))
|
|
(home-page "https://launchpad.net/testrepository")
|
|
(synopsis "Database for Python test results")
|
|
(description "Testrepository provides a database of test results which can
|
|
be used as part of a developer's workflow to check things such as what tests
|
|
have failed since the last commit or what tests are currently failing.")
|
|
(license (list license:bsd-3 license:asl2.0)))) ; at user's option
|
|
|
|
(define-public python2-testrepository
|
|
(package-with-python2 python-testrepository))
|
|
|
|
(define-public python-coverage
|
|
(package
|
|
(name "python-coverage")
|
|
(version "4.1")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "coverage" version))
|
|
(sha256
|
|
(base32
|
|
"01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
|
|
'(#:tests? #f))
|
|
(home-page "http://nedbatchelder.com/code/coverage")
|
|
(synopsis "Code coverage measurement for Python")
|
|
(description
|
|
"Coverage measures code coverage, typically during test execution. It
|
|
uses the code analysis tools and tracing hooks provided in the Python standard
|
|
library to determine which lines are executable, and which have been
|
|
executed.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public python2-coverage
|
|
(package-with-python2 python-coverage))
|
|
|
|
(define-public python-cov-core
|
|
(package
|
|
(name "python-cov-core")
|
|
(version "1.15.0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "cov-core" version))
|
|
(sha256
|
|
(base32
|
|
"0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
|
|
(build-system python-build-system)
|
|
(propagated-inputs
|
|
`(("python-coverage" ,python-coverage)))
|
|
(home-page "https://github.com/schlamar/cov-core")
|
|
(synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
|
|
(description
|
|
"This is a library package for use by @code{pytest-cov}, @code{nose-cov}
|
|
and @code{nose2-cov}. It is useful for developing coverage plugins for these
|
|
testing frameworks.")
|
|
(license license:expat)))
|
|
|
|
(define-public python2-cov-core
|
|
(package-with-python2 python-cov-core))
|
|
|
|
(define-public python-discover
|
|
(package
|
|
(name "python-discover")
|
|
(version "0.4.0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://pypi.python.org/packages/source/d/discover/discover-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
|
|
(build-system python-build-system)
|
|
(home-page "http://pypi.python.org/pypi/discover/")
|
|
(synopsis
|
|
"Python test discovery for unittest")
|
|
(description
|
|
"Discover provides test discovery for unittest, a feature that has been
|
|
backported from Python 2.7 for Python 2.4+.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public python2-discover
|
|
(package-with-python2 python-discover))
|
|
|
|
(define-public behave
|
|
(package
|
|
(name "behave")
|
|
(version "1.2.5")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "behave" version ".tar.bz2"))
|
|
(sha256
|
|
(base32
|
|
"1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
|
|
(build-system python-build-system)
|
|
(propagated-inputs
|
|
`(("python-six" ,python-six)
|
|
("python-parse" ,python-parse)
|
|
("python-parse-type" ,python-parse-type)))
|
|
(arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
|
|
;PyHamcrest>=1.8
|
|
(home-page "https://github.com/behave/behave")
|
|
(synopsis "Python behavior-driven development")
|
|
(description
|
|
"Behave is a tool for behavior-driven development in python.
|
|
Behavior-driven development (or BDD) is an agile software development
|
|
technique that encourages collaboration between developers, QA and
|
|
non-technical or business participants in a software project. Behave uses
|
|
tests written in a natural language style, backed up by Python code.")
|
|
(license license:x11)))
|
|
|
|
(define-public python-exif-read
|
|
(package
|
|
(name "python-exif-read")
|
|
(version "2.1.2")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "ExifRead" version))
|
|
(sha256
|
|
(base32
|
|
"1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
|
|
(build-system python-build-system)
|
|
(arguments `(#:tests? #f)) ; no tests
|
|
(home-page "https://github.com/ianare/exif-py")
|
|
(synopsis "Python library to extract EXIF data from image files")
|
|
(description
|
|
"ExifRead is a Python library to extract EXIF data from tiff and jpeg
|
|
files.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public python2-exif-read
|
|
(package-with-python2 python-exif-read))
|
|
|
|
(define-public python-pyld
|
|
(package
|
|
(name "python-pyld")
|
|
(version "0.7.1")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "PyLD" version))
|
|
(sha256
|
|
(base32
|
|
"1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
|
|
(build-system python-build-system)
|
|
(arguments `(#:tests? #f)) ; no tests
|
|
(home-page "https://github.com/digitalbazaar/pyld")
|
|
(synopsis "Python implementation of the JSON-LD specification")
|
|
(description
|
|
"PyLD is an implementation of the JSON-LD specification.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public python2-pyld
|
|
(package-with-python2 python-pyld))
|
|
|
|
(define-public python-certifi
|
|
(package
|
|
(name "python-certifi")
|
|
(version "2017.1.23")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "certifi" version))
|
|
(sha256
|
|
(base32
|
|
"1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
|
|
(build-system python-build-system)
|
|
(home-page "https://certifi.io/")
|
|
(synopsis "Python CA certificate bundle")
|
|
(description
|
|
"Certifi is a Python library that contains a CA certificate bundle, which
|
|
is used by the Requests library to verify HTTPS requests.")
|
|
(license license:asl2.0)))
|
|
|
|
(define-public python2-certifi
|
|
(package-with-python2 python-certifi))
|
|
|
|
(define-public python-click
|
|
(package
|
|
(name "python-click")
|
|
(version "6.7")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "click" version))
|
|
(sha256
|
|
(base32
|
|
"02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
`(#:phases
|
|
(modify-phases %standard-phases
|
|
(add-after 'unpack 'fix-paths
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
(let ((glibc (assoc-ref inputs ,(if (%current-target-system)
|
|
"cross-libc" "libc"))))
|
|
(substitute* "click/_unicodefun.py"
|
|
(("'locale'")
|
|
(string-append "'" glibc "/bin/locale'"))))
|
|
#t))
|
|
(replace 'check
|
|
(lambda _
|
|
(zero? (system* "make" "test")))))))
|
|
(native-inputs
|
|
`(("python-pytest" ,python-pytest)))
|
|
(home-page "http://click.pocoo.org")
|
|
(synopsis "Command line library for Python")
|
|
(description
|
|
"Click is a Python package for creating command line interfaces in a
|
|
composable way with as little code as necessary. Its name stands for
|
|
\"Command Line Interface Creation Kit\". It's highly configurable but comes
|
|
with sensible defaults out of the box.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public python2-click
|
|
(package-with-python2 python-click))
|
|
|
|
(define-public python-wheel
|
|
(package
|
|
(name "python-wheel")
|
|
(version "0.30.0a0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "wheel" version))
|
|
(sha256
|
|
(base32
|
|
"1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
|
|
(build-system python-build-system)
|
|
(native-inputs
|
|
`(("python-jsonschema" ,python-jsonschema)
|
|
("python-pytest-cov" ,python-pytest-cov)))
|
|
(home-page "https://bitbucket.org/pypa/wheel/")
|
|
(synopsis "Format for built Python packages")
|
|
(description
|
|
"A wheel is a ZIP-format archive with a specially formatted filename and
|
|
the @code{.whl} extension. It is designed to contain all the files for a PEP
|
|
376 compatible install in a way that is very close to the on-disk format. Many
|
|
packages will be properly installed with only the @code{Unpack} step and the
|
|
unpacked archive preserves enough information to @code{Spread} (copy data and
|
|
scripts to their final locations) at any later time. Wheel files can be
|
|
installed with a newer @code{pip} or with wheel's own command line utility.")
|
|
(license license:expat)
|
|
(properties `((python2-variant . ,(delay python2-wheel))))))
|
|
|
|
(define-public python2-wheel
|
|
(let ((wheel (package-with-python2
|
|
(strip-python2-variant python-wheel))))
|
|
(package (inherit wheel)
|
|
(native-inputs `(("python2-functools32" ,python2-functools32)
|
|
,@(package-native-inputs wheel))))))
|
|
|
|
|
|
(define-public python-requests
|
|
(package
|
|
(name "python-requests")
|
|
(version "2.13.0")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "requests" version))
|
|
(sha256
|
|
(base32
|
|
"1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
|
|
;; TODO: unbundle urllib3 and chardet.
|
|
(build-system python-build-system)
|
|
(arguments
|
|
;; FIXME: Some tests require network access.
|
|
'(#:tests? #f))
|
|
(home-page "http://python-requests.org/")
|
|
(synopsis "Python HTTP library")
|
|
(description
|
|
"Requests is a Python HTTP client library. It aims to be easier to use
|
|
than Python’s urllib2 library.")
|
|
(license license:asl2.0)))
|
|
|
|
;; Some software requires an older version of Requests, notably Docker
|
|
;; Compose.
|
|
(define-public python-requests-2.7
|
|
(package (inherit python-requests)
|
|
(version "2.7.0")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "requests" version))
|
|
(sha256
|
|
(base32
|
|
"0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
|
|
|
|
(define-public python2-requests
|
|
(package-with-python2 python-requests))
|
|
|
|
(define-public python-vcversioner
|
|
(package
|
|
(name "python-vcversioner")
|
|
(version "2.16.0.0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "vcversioner" version))
|
|
(sha256
|
|
(base32
|
|
"16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
|
|
(build-system python-build-system)
|
|
(synopsis "Python library for version number discovery")
|
|
(description "Vcversioner is a Python library that inspects tagging
|
|
information in a variety of version control systems in order to discover
|
|
version numbers.")
|
|
(home-page "https://github.com/habnabit/vcversioner")
|
|
(license license:isc)))
|
|
|
|
(define-public python2-vcversioner
|
|
(package-with-python2 python-vcversioner))
|
|
|
|
(define-public python-jsonschema
|
|
(package
|
|
(name "python-jsonschema")
|
|
(version "2.5.1")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri
|
|
(string-append
|
|
"https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
|
|
version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
|
|
(build-system python-build-system)
|
|
(arguments
|
|
'(#:phases
|
|
(modify-phases %standard-phases
|
|
(replace 'check (lambda _ (zero? (system* "nosetests")))))))
|
|
(native-inputs
|
|
`(("python-nose" ,python-nose)
|
|
("python-vcversioner" ,python-vcversioner)))
|
|
(home-page "https://github.com/Julian/jsonschema")
|
|
(synopsis "Implementation of JSON Schema for Python")
|
|
(description
|
|
"Jsonschema is an implementation of JSON Schema for Python.")
|
|
(license license:expat)
|
|
(properties `((python2-variant . ,(delay python2-jsonschema))))))
|
|
|
|
(define-public python2-jsonschema
|
|
(let ((jsonschema (package-with-python2
|
|
(strip-python2-variant python-jsonschema))))
|
|
(package (inherit jsonschema)
|
|
(native-inputs
|
|
`(("python2-mock" ,python2-mock)
|
|
,@(package-native-inputs jsonschema)))
|
|
(propagated-inputs
|
|
`(("python2-functools32" ,python2-functools32))))))
|
|
|
|
(define-public python-schema
|
|
(package
|
|
(name "python-schema")
|
|
(version "0.6.6")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "schema" version))
|
|
(sha256
|
|
(base32
|
|
"1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
|
|
(build-system python-build-system)
|
|
(native-inputs
|
|
`(("python-pytest" ,python-pytest)))
|
|
(home-page "https://github.com/keleshev/schema")
|
|
(synopsis "Simple data validation library")
|
|
(description
|
|
"@code{python-schema} is a library for validating Python data
|
|
structures, such as those obtained from config-files, forms, external
|
|
services or command-line parsing, converted from JSON/YAML (or
|
|
something else) to Python data-types.")
|
|
(license license:psfl)))
|
|
|
|
(define-public python2-schema
|
|
(package-with-python2 python-schema))
|
|
|
|
(define-public python-schema-0.5
|
|
(package (inherit python-schema)
|
|
(version "0.5.0")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "schema" version))
|
|
(sha256
|
|
(base32
|
|
"10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
|
|
|
|
(define-public python2-schema-0.5
|
|
(package-with-python2 python-schema-0.5))
|
|
|
|
(define-public python-kitchen
|
|
(package
|
|
(name "python-kitchen")
|
|
(version "1.2.4")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (pypi-uri "kitchen" version))
|
|
(sha256
|
|
(base32
|
|
"0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
|
|
(build-system python-build-system)
|
|
(propagated-inputs
|
|
`(("python-chardet" ,python-chardet)))
|
|
(home-page "https://github.com/fedora-infra/kitchen")
|
|
(synopsis "Python API for snippets")
|
|
(description "@code{kitchen} module provides a python API for all sorts of
|
|
little useful snippets of code that everybody ends up writing for their projects
|
|
but never seem big enough to build an independent release. Use kitchen and stop
|
|