diff options
Diffstat (limited to 'pkgs/development/python-modules')
37 files changed, 476 insertions, 147 deletions
diff --git a/pkgs/development/python-modules/blivet/default.nix b/pkgs/development/python-modules/blivet/default.nix index c1b36bf909de..f84c836c056f 100644 --- a/pkgs/development/python-modules/blivet/default.nix +++ b/pkgs/development/python-modules/blivet/default.nix @@ -1,52 +1,42 @@ -{ stdenv, fetchurl, buildPythonPackage, pykickstart, pyparted, pyblock -, libselinux, cryptsetup, multipath_tools, lsof, utillinux -, useNixUdev ? true, udev ? null -# This is only used when useNixUdev is false -, udevSoMajor ? 1 +{ stdenv, fetchFromGitHub, buildPythonPackage, pykickstart, pyparted, pyblock +, pyudev, six, libselinux, cryptsetup, multipath_tools, lsof, utillinux }: -assert useNixUdev -> udev != null; - let pyenable = { enablePython = true; }; selinuxWithPython = libselinux.override pyenable; cryptsetupWithPython = cryptsetup.override pyenable; in buildPythonPackage rec { name = "blivet-${version}"; - version = "0.17-1"; + version = "0.67"; - src = fetchurl { - url = "https://git.fedorahosted.org/cgit/blivet.git/snapshot/" - + "${name}.tar.bz2"; - sha256 = "1k3mws2q0ryb7422mml6idmaasz2i2v6ngyvg6d976dx090qnmci"; + src = fetchFromGitHub { + owner = "dwlehman"; + repo = "blivet"; + rev = name; + sha256 = "1gk94ghjrxfqnx53hph1j2s7qcv86fjz48is7l099q9c24rjv8ky"; }; postPatch = '' - sed -i -e 's|"multipath"|"${multipath_tools}/sbin/multipath"|' \ - blivet/devicelibs/mpath.py blivet/devices.py + sed -i \ + -e 's|"multipath"|"${multipath_tools}/sbin/multipath"|' \ + -e '/^def set_friendly_names/a \ return False' \ + blivet/devicelibs/mpath.py sed -i -e '/"wipefs"/ { s|wipefs|${utillinux}/sbin/wipefs| s/-f/--force/ }' blivet/formats/__init__.py sed -i -e 's|"lsof"|"${lsof}/bin/lsof"|' blivet/formats/fs.py sed -i -r -e 's|"(u?mount)"|"${utillinux}/bin/\1"|' blivet/util.py - sed -i '/pvscan/s/, *"--cache"//' blivet/devicelibs/lvm.py - '' + (if useNixUdev then '' - sed -i -e '/find_library/,/find_library/ { - c libudev = "${udev}/lib/libudev.so.1" - }' blivet/pyudev.py - '' else '' - sed -i \ - -e '/^somajor *=/s/=.*/= ${toString udevSoMajor}/p' \ - -e 's|common =.*|& + ["/lib/x86_64-linux-gnu", "/lib/i686-linux-gnu"]|' \ - blivet/pyudev.py - ''); + sed -i -e '/pvscan/s/, *"--cache"//' blivet/devicelibs/lvm.py + ''; propagatedBuildInputs = [ - pykickstart pyparted pyblock selinuxWithPython cryptsetupWithPython - ] ++ stdenv.lib.optional useNixUdev udev; + pykickstart pyparted pyblock pyudev selinuxWithPython cryptsetupWithPython + six + ]; - # tests are currently _heavily_ broken upstream + # Tests are in <nixos/tests/blivet.nix>. doCheck = false; meta = { diff --git a/pkgs/development/python-modules/boto-1.9-python-2.7.patch b/pkgs/development/python-modules/boto-1.9-python-2.7.patch deleted file mode 100644 index 79ff9a7e4afa..000000000000 --- a/pkgs/development/python-modules/boto-1.9-python-2.7.patch +++ /dev/null @@ -1,19 +0,0 @@ -Fix Boto 1.9 on Python 2.7. - -https://github.com/boto/boto/commit/6760075073c34d6dddb7e13b80dfa8d09f0f4f79 - -diff --git a/boto/connection.py b/boto/connection.py -index c5779e2..71942f1 100644 ---- a/boto/connection.py -+++ b/boto/connection.py -@@ -252,8 +252,9 @@ class AWSAuthConnection(object): - # versions, it would append ":443" to the hostname sent - # in the Host header and so we needed to make sure we - # did the same when calculating the V2 signature. In 2.6 -+ # (and higher!) - # it no longer does that. Hence, this kludge. -- if sys.version[:3] == "2.6" and port == 443: -+ if sys.version[:3] in ('2.6', '2.7') and port == 443: - signature_host = self.host - else: - signature_host = '%s:%d' % (self.host, port) diff --git a/pkgs/development/python-modules/boto/content-length-str.patch b/pkgs/development/python-modules/boto/content-length-str.patch new file mode 100644 index 000000000000..7895e223c6b5 --- /dev/null +++ b/pkgs/development/python-modules/boto/content-length-str.patch @@ -0,0 +1,16 @@ +Cherry-picked from https://github.com/boto/boto/pull/2932 + +This fix is required for things like docker-registry to interact with S3. Will +be obsolete after the next boto release (> 2.36.0) + +--- a/boto/connection.py ++++ b/boto/connection.py +@@ -381,7 +381,7 @@ class HTTPRequest(object): + if 'Content-Length' not in self.headers: + if 'Transfer-Encoding' not in self.headers or \ + self.headers['Transfer-Encoding'] != 'chunked': +- self.headers['Content-Length'] = len(self.body) ++ self.headers['Content-Length'] = str(len(self.body)) + + + class HTTPResponse(http_client.HTTPResponse): diff --git a/pkgs/development/python-modules/box2d/disable-test.patch b/pkgs/development/python-modules/box2d/disable-test.patch new file mode 100644 index 000000000000..bc2897a8b100 --- /dev/null +++ b/pkgs/development/python-modules/box2d/disable-test.patch @@ -0,0 +1,14 @@ +Common subdirectories: Box2D-2.3b0/Box2D and Box2D-2.3b0.new/Box2D +Common subdirectories: Box2D-2.3b0/examples and Box2D-2.3b0.new/examples +Common subdirectories: Box2D-2.3b0/library and Box2D-2.3b0.new/library +diff -u Box2D-2.3b0/setup.py Box2D-2.3b0.new/setup.py +--- Box2D-2.3b0/setup.py 2013-02-02 18:09:34.000000000 +0100 ++++ Box2D-2.3b0.new/setup.py 2014-10-25 13:32:07.136922343 +0200 +@@ -176,7 +176,6 @@ + package_dir = {'Box2D': library_path, + 'Box2D.b2': os.path.join(library_path, 'b2'), + 'Box2D.tests' : 'tests'}, +- test_suite = 'tests', + options = { 'build_ext': { 'swig_opts' : swig_arguments }, + 'egg_info' : { 'egg_base' : library_base }, + }, diff --git a/pkgs/development/python-modules/bsddb3/default.nix b/pkgs/development/python-modules/bsddb3/default.nix index 574796e2c681..bd5b953f048a 100644 --- a/pkgs/development/python-modules/bsddb3/default.nix +++ b/pkgs/development/python-modules/bsddb3/default.nix @@ -1,10 +1,10 @@ {stdenv, fetchurl, python, db}: stdenv.mkDerivation rec { - name = "bsddb3-6.0.1"; + name = "bsddb3-6.1.0"; src = fetchurl { url = "https://pypi.python.org/packages/source/b/bsddb3/${name}.tar.gz"; - md5 = "2b22ab1b4d896961c30e4106660e9139"; + sha256 = "05gx3rfgq1qrgdmpd6hri6y5l97bh1wczvb6x853jchwi7in6cdi"; }; buildInputs = [python]; buildPhase = "true"; diff --git a/pkgs/development/python-modules/bugzilla/checkPhase-fix-cookie-compare.patch b/pkgs/development/python-modules/bugzilla/checkPhase-fix-cookie-compare.patch new file mode 100644 index 000000000000..63c0fdc3c502 --- /dev/null +++ b/pkgs/development/python-modules/bugzilla/checkPhase-fix-cookie-compare.patch @@ -0,0 +1,30 @@ +From e7ed770363e8769727a915b2390c0ce1ab2ce964 Mon Sep 17 00:00:00 2001 +From: Michal Hlavinka <mhlavink@redhat.com> +Date: Wed, 18 Jun 2014 20:07:24 -0400 +Subject: tests: Fix cookie comparison on rawhide + +Cookie comments changed, so just strip them out + +(crobinso: Add commit message, make change more readable) + +diff --git a/tests/misc.py b/tests/misc.py +index 4b4f99d..12da806 100644 +--- a/tests/misc.py ++++ b/tests/misc.py +@@ -83,7 +83,12 @@ class MiscAPI(unittest.TestCase): + + # Mozilla should be converted inplace to LWP + bugzilla.Bugzilla3(url=None, cookiefile=cookiesnew) +- self.assertEquals(open(cookiesmoz).read(), open(cookiesnew).read()) ++ ++ def strip_comments(content): ++ return [l for l in content.split("\n") if not l.startswith("#")] ++ self.assertEquals( ++ strip_comments(open(cookiesmoz).read()), ++ strip_comments(open(cookiesnew).read())) + + # Make sure bad cookies raise an error + try: +-- +cgit v0.10.2 + diff --git a/pkgs/development/python-modules/dbus/default.nix b/pkgs/development/python-modules/dbus/default.nix index d88504379ed0..bc386e7e5ac2 100644 --- a/pkgs/development/python-modules/dbus/default.nix +++ b/pkgs/development/python-modules/dbus/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchurl, python, pkgconfig, dbus, dbus_glib, dbus_tools }: +{ stdenv, fetchurl, python, pkgconfig, dbus, dbus_glib, dbus_tools, isPyPy }: -stdenv.mkDerivation rec { +if isPyPy then throw "dbus-python not supported for interpreter ${python.executable}" else stdenv.mkDerivation rec { name = "dbus-python-1.2.0"; src = fetchurl { diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix index 4c9c53aab834..20fb2ec496b4 100644 --- a/pkgs/development/python-modules/generic/default.nix +++ b/pkgs/development/python-modules/generic/default.nix @@ -57,12 +57,13 @@ if disabled then throw "${name} not supported for interpreter ${python.executabl name = namePrefix + name; buildInputs = [ - python wrapPython setuptools + wrapPython setuptools (distutils-cfg.override { extraCfg = distutilsExtraCfg; }) ] ++ buildInputs ++ pythonPath ++ (lib.optional (lib.hasSuffix "zip" attrs.src.name or "") unzip); - propagatedBuildInputs = propagatedBuildInputs ++ [ recursivePthLoader ]; + # propagate python to active setup-hook in nix-shell + propagatedBuildInputs = propagatedBuildInputs ++ [ recursivePthLoader python ]; pythonPath = [ setuptools ] ++ pythonPath; @@ -117,7 +118,7 @@ if disabled then throw "${name} not supported for interpreter ${python.executabl # work as expected # --old-and-unmanagable: - # instruct setuptools not to use eggs but fallback to plan package install + # instruct setuptools not to use eggs but fallback to plan package install # this also reduces one .pth file in the chain, but the main reason is to # force install process to install only scripts for the package we are # installing (otherwise it will install scripts also for dependencies) @@ -142,14 +143,6 @@ if disabled then throw "${name} not supported for interpreter ${python.executabl postFixup = attrs.postFixup or '' wrapPythonPrograms - # If a user installs a Python package, they probably also wants its - # dependencies in the user environment profile (only way to find the - # dependencies is to have them in the PYTHONPATH variable). - # Allows you to do: $ PYTHONPATH=~/.nix-profile/lib/python2.7/site-packages python - if test -e $out/nix-support/propagated-build-inputs; then - ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages - fi - # TODO: document createBuildInputsPth build-inputs "$buildInputStrings" for inputsfile in propagated-build-inputs propagated-native-build-inputs; do @@ -161,11 +154,12 @@ if disabled then throw "${name} not supported for interpreter ${python.executabl shellHook = attrs.shellHook or '' if test -e setup.py; then - mkdir -p /tmp/$name/lib/${python.libPrefix}/site-packages + tmp_path=/tmp/`pwd | md5sum | cut -f 1 -d " "`-$name + mkdir -p $tmp_path/lib/${python.libPrefix}/site-packages ${preShellHook} - export PATH="/tmp/$name/bin:$PATH" - export PYTHONPATH="/tmp/$name/lib/${python.libPrefix}/site-packages:$PYTHONPATH" - ${python}/bin/${python.executable} setup.py develop --prefix /tmp/$name + export PATH="$tmp_path/bin:$PATH" + export PYTHONPATH="$tmp_path/lib/${python.libPrefix}/site-packages:$PYTHONPATH" + ${python}/bin/${python.executable} setup.py develop --prefix $tmp_path ${postShellHook} fi ''; diff --git a/pkgs/development/python-modules/generic/wrap.sh b/pkgs/development/python-modules/generic/wrap.sh index 857f002cace9..e343536b8fa8 100644 --- a/pkgs/development/python-modules/generic/wrap.sh +++ b/pkgs/development/python-modules/generic/wrap.sh @@ -16,13 +16,13 @@ wrapPythonProgramsIn() { done for i in $(find "$dir" -type f -perm +0100); do - # Rewrite "#! .../env python" to "#! /nix/store/.../python". if head -n1 "$i" | grep -q '#!.*/env.*\(python\|pypy\)'; then sed -i "$i" -e "1 s^.*/env[ ]*\(python\|pypy\)^#! $python^" fi - if head -n1 "$i" | grep -q '/python\|/pypy'; then + # catch /python and /.python-wrapped + if head -n1 "$i" | grep -q '/\.\?\(python\|pypy\)'; then # dont wrap EGG-INFO scripts since they are called from python if echo "$i" | grep -v EGG-INFO/scripts; then echo "wrapping \`$i'..." diff --git a/pkgs/development/python-modules/gevent_sslwrap.patch b/pkgs/development/python-modules/gevent_sslwrap.patch new file mode 100644 index 000000000000..a9bb0eab5de9 --- /dev/null +++ b/pkgs/development/python-modules/gevent_sslwrap.patch @@ -0,0 +1,49 @@ +From 485cebc4d9bab2dae51cf29f91fad2f1cf157fec Mon Sep 17 00:00:00 2001 +From: Eugene Pankov <john.pankov@gmail.com> +Date: Sun, 21 Sep 2014 12:04:13 +0300 +Subject: [PATCH] Work around missing sslwrap in Python 2.7.9 (fixes #477) + +--- + gevent/_ssl2.py | 28 ++++++++++++++++++++-------- + 1 file changed, 20 insertions(+), 8 deletions(-) + +diff --git a/gevent/ssl.py b/gevent/ssl.py +index 21491b7..85e6a86 100644 +--- a/gevent/ssl.py ++++ b/gevent/ssl.py +@@ -80,15 +80,27 @@ def __init__(self, sock, keyfile=None, certfile=None, + self._sslobj = None + else: + # yes, create the SSL object +- if ciphers is None: +- self._sslobj = _ssl.sslwrap(self._sock, server_side, +- keyfile, certfile, +- cert_reqs, ssl_version, ca_certs) ++ if hasattr(_ssl, 'sslwrap'): ++ if ciphers is None: ++ self._sslobj = _ssl.sslwrap(self._sock, server_side, ++ keyfile, certfile, ++ cert_reqs, ssl_version, ca_certs) ++ else: ++ self._sslobj = _ssl.sslwrap(self._sock, server_side, ++ keyfile, certfile, ++ cert_reqs, ssl_version, ca_certs, ++ ciphers) + else: +- self._sslobj = _ssl.sslwrap(self._sock, server_side, +- keyfile, certfile, +- cert_reqs, ssl_version, ca_certs, +- ciphers) ++ self.context = __ssl__.SSLContext(ssl_version) ++ self.context.verify_mode = cert_reqs ++ if ca_certs: ++ self.context.load_verify_locations(ca_certs) ++ if certfile: ++ self.context.load_cert_chain(certfile, keyfile) ++ if ciphers: ++ self.context.set_ciphers(ciphers) ++ self._sslobj = self.context._wrap_socket(self._sock, server_side=server_side, ssl_sock=self) ++ + if do_handshake_on_connect: + self.do_handshake() + self.keyfile = keyfile diff --git a/pkgs/development/python-modules/graph-tool/2.x.x.nix b/pkgs/development/python-modules/graph-tool/2.x.x.nix new file mode 100644 index 000000000000..aa5deb6d6db4 --- /dev/null +++ b/pkgs/development/python-modules/graph-tool/2.x.x.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchurl, python, cairomm, sparsehash, pycairo, automake, m4, +pkgconfig, boost, expat, scipy, numpy, cgal, gmp, mpfr, lndir, makeWrapper, +gobjectIntrospection, pygobject3, gtk3, matplotlib }: + +stdenv.mkDerivation rec { + version = "2.2.36"; + name = "${python.libPrefix}-graph-tool-${version}"; + + meta = with stdenv.lib; { + description = "Python module for manipulation and statistical analysis of graphs"; + homepage = http://graph-tool.skewed.de/; + license = licenses.gpl3; + platforms = platforms.all; + maintainer = [ stdenv.lib.maintainers.joelmo ]; + }; + + src = fetchurl { + url = "http://downloads.skewed.de/graph-tool/graph-tool-${version}.tar.bz2"; + sha256 = "0wp81dp2kd4bzsl6f3gxjmf11hiqr7rz7g0wa1j38fc0chq31q71"; + }; + + preConfigure = '' + configureFlags="--with-python-module-path=$out/${python.sitePackages}" + ''; + + buildInputs = [ automake m4 pkgconfig makeWrapper ]; + + propagatedBuildInputs = [ + boost + cgal + expat + gmp + mpfr + python + scipy + # optional + sparsehash + # drawing + cairomm + gobjectIntrospection + gtk3 + pycairo + matplotlib + pygobject3 + ]; + + enableParallelBuilding = false; +} diff --git a/pkgs/development/python-modules/h5py/default.nix b/pkgs/development/python-modules/h5py/default.nix index 9ab68ac4cd2b..39a35ad49c6e 100644 --- a/pkgs/development/python-modules/h5py/default.nix +++ b/pkgs/development/python-modules/h5py/default.nix @@ -34,9 +34,8 @@ buildPythonPackage rec { ; meta = { - description = " - The h5py package is a Pythonic interface to the HDF5 binary data format. - "; + description = + "Pythonic interface to the HDF5 binary data format"; homepage = "http://www.h5py.org/"; license = stdenv.lib.licenses.bsd2; }; diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix new file mode 100644 index 000000000000..d22c8cf32313 --- /dev/null +++ b/pkgs/development/python-modules/matplotlib/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, python, buildPythonPackage, pycairo +, which, dateutil, nose, numpy, pyparsing, tornado +, freetype, libpng, pkgconfig, mock, pytz, pygobject3 +, enableGhostscript ? false, ghostscript ? null, gtk3 +, enableGtk2 ? false, pygtk ? null, gobjectIntrospection +, enableGtk3 ? false, cairo +}: + +assert enableGhostscript -> ghostscript != null; +assert enableGtk2 -> pygtk != null; + +buildPythonPackage rec { + name = "matplotlib-1.4.2"; + + src = fetchurl { + url = "mirror://sourceforge/matplotlib/${name}.tar.gz"; + sha256 = "0m6v9nwdldlwk22gcd339zg6mny5m301fxgks7z8sb8m9wawg8qp"; + }; + + XDG_RUNTIME_DIR = "/tmp"; + + buildInputs = [ python which stdenv ] + ++ stdenv.lib.optional enableGhostscript ghostscript; + + propagatedBuildInputs = + [ dateutil nose numpy pyparsing tornado freetype + libpng pkgconfig mock pytz + ] + ++ stdenv.lib.optional enableGtk2 pygtk + ++ stdenv.lib.optionals enableGtk3 [ cairo pycairo gtk3 gobjectIntrospection pygobject3 ]; + + meta = with stdenv.lib; { + description = "python plotting library, making publication quality plots"; + homepage = "http://matplotlib.sourceforge.net/"; + maintainers = with maintainers; [ lovek323 ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/development/python-modules/mpi4py/default.nix b/pkgs/development/python-modules/mpi4py/default.nix index 74d46def9074..c38d948dd6be 100644 --- a/pkgs/development/python-modules/mpi4py/default.nix +++ b/pkgs/development/python-modules/mpi4py/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, python, buildPythonPackage, mpi, openssh }: +{ stdenv, fetchurl, python, buildPythonPackage, mpi, openssh, isPy3k, isPyPy }: buildPythonPackage rec { name = "mpi4py-1.3.1"; @@ -12,6 +12,16 @@ buildPythonPackage rec { inherit mpi; }; + # The tests in the `test_spawn` module fail in the chroot build environment. + # However, they do pass in a pure, or non-pure nix-shell. Hence, we + # deactivate these particular tests. + # Unfortunately, the command-line arguments to `./setup.py test` are not + # correctly passed to the test-runner. Hence, these arguments are patched + # directly into `setup.py`. + patchPhase = '' + sed 's/err = main(cmd.args or \[\])/err = main(cmd.args or ["-v", "-e", "test_spawn"])/' -i setup.py + ''; + configurePhase = ""; installPhase = '' @@ -35,10 +45,11 @@ buildPythonPackage rec { # if openssh is not present. E.g. h5py with mpi support. propagatedBuildInputs = [ openssh ]; + disabled = isPy3k || isPyPy; + meta = { - description = " - Provides Python bindings for the Message Passing Interface standard. - "; + description = + "Python bindings for the Message Passing Interface standard"; homepage = "http://code.google.com/p/mpi4py/"; license = stdenv.lib.licenses.bsd3; }; diff --git a/pkgs/development/python-modules/mygpoclient/default.nix b/pkgs/development/python-modules/mygpoclient/default.nix index d44617883818..e83cc9ad1f4c 100644 --- a/pkgs/development/python-modules/mygpoclient/default.nix +++ b/pkgs/development/python-modules/mygpoclient/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { to the gpodder.net web services. ''; homepage = "https://thp.io/2010/mygpoclient/"; - license = "GPLv3"; + license = stdenv.lib.licenses.gpl3; platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; maintainers = [ stdenv.lib.maintainers.skeidel ]; }; diff --git a/pkgs/development/python-modules/pyacoustid-py3.patch b/pkgs/development/python-modules/pyacoustid-py3.patch new file mode 100644 index 000000000000..f79b35fd345e --- /dev/null +++ b/pkgs/development/python-modules/pyacoustid-py3.patch @@ -0,0 +1,32 @@ +From 19209469a709ec0914f82c9de23137e360e5e804 Mon Sep 17 00:00:00 2001 +From: Simon Chopin <chopin.simon@gmail.com> +Date: Mon, 29 Sep 2014 10:38:20 +0200 +Subject: [PATCH] Explicit the UTF-8 encoding also when installing using Python + 3 + +If the locale isn't UTF-8, or for some reason Python doesn't pick up on +it, it will try to decode using ASCII, which will of course cause +mayhem, crash and despair. + +This patch will be shipped with the Debian package 1.1.0-1 +--- + setup.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/setup.py b/setup.py +index eafe5ea..0732fe3 100644 +--- a/setup.py ++++ b/setup.py +@@ -18,9 +18,10 @@ + + def _read(fn): + path = os.path.join(os.path.dirname(__file__), fn) +- data = open(path).read() + if sys.version_info[0] < 3: +- data = data.decode('utf8') ++ data = open(path).read().decode('utf8') ++ else: ++ data = open(path, encoding='utf8').read() + # Special case some Unicode characters; PyPI seems to only like ASCII. + data = data.replace(u'\xe1', u'a') + data = data.replace(u'\u0161', u's') diff --git a/pkgs/development/python-modules/pycairo/default.nix b/pkgs/development/python-modules/pycairo/default.nix index 3dc64f681294..0589bec36b95 100644 --- a/pkgs/development/python-modules/pycairo/default.nix +++ b/pkgs/development/python-modules/pycairo/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchurl, fetchpatch, python, pkgconfig, cairo, x11 }: +{ stdenv, fetchurl, fetchpatch, python, pkgconfig, cairo, x11, isPyPy }: -stdenv.mkDerivation rec { +if isPyPy then throw "pycairo not supported for interpreter ${python.executable}" else stdenv.mkDerivation rec { version = "1.10.0"; name = "pycairo-${version}"; src = if python.is_py3k or false diff --git a/pkgs/development/python-modules/pycdio/add-cdtext-toc.patch b/pkgs/development/python-modules/pycdio/add-cdtext-toc.patch new file mode 100644 index 000000000000..4e36612d80d0 --- /dev/null +++ b/pkgs/development/python-modules/pycdio/add-cdtext-toc.patch @@ -0,0 +1,52 @@ +diff -Nurp pycdio-0.20-orig/test/cdtext.toc pycdio-0.20/test/cdtext.toc +--- pycdio-0.20-orig/test/cdtext.toc 1970-01-01 01:00:00.000000000 +0100 ++++ pycdio-0.20/test/cdtext.toc 2014-11-06 23:36:12.520708320 +0100 +@@ -0,0 +1,48 @@ ++CD_DA ++ ++// global CD-TEXT data ++ ++CD_TEXT { ++ ++ // Mapping from language number (0..7) used in 'LANGUAGE' statements ++ // to language code. ++/// LANGUAGE_MAP { ++/// 0 : EN // 9 is the code for ENGLISH, ++/// // I don't know any other language code, yet ++/// } ++ ++ // Language number should always start with 0 ++ LANGUAGE 0 { ++ // Required fields - at least all CD-TEXT CDs I've seen so far have them. ++ TITLE "CD Title" ++ PERFORMER "Performer" ++ DISC_ID "XY12345" ++ UPC_EAN "" // usually empty ++ ++ // Further possible items, all of them are optional ++ ARRANGER "" ++ SONGWRITER "" ++ MESSAGE "" ++ GENRE "" // I'm not sure if this should be really ascii data ++ } ++} ++ ++ ++TRACK AUDIO ++// track specific CD-TEXT data ++CD_TEXT { ++ LANGUAGE 0 { ++ // if an item is defined for one track it should be defined for all tracks ++ TITLE "Track Title" ++ ++ PERFORMER "Performer" ++ ISRC "US-XX1-98-01234" ++ ++ ARRANGER "" ++ SONGWRITER "" ++ MESSAGE "" ++ } ++} ++ ++SILENCE 1:0:0 ++ diff --git a/pkgs/development/python-modules/pycrypto/default.nix b/pkgs/development/python-modules/pycrypto/default.nix index 59bd9affef67..4faaf20d29c3 100644 --- a/pkgs/development/python-modules/pycrypto/default.nix +++ b/pkgs/development/python-modules/pycrypto/default.nix @@ -9,6 +9,11 @@ buildPythonPackage rec { sha256 = "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"; }; + preConfigure = '' + sed -i 's,/usr/include,/no-such-dir,' configure + sed -i "s!,'/usr/include/'!!" setup.py + ''; + buildInputs = stdenv.lib.optional (!python.isPypy or false) gmp; # optional for pypy doCheck = !(python.isPypy or stdenv.isDarwin); # error: AF_UNIX path too long diff --git a/pkgs/development/python-modules/pycups/default.nix b/pkgs/development/python-modules/pycups/default.nix index a61106f476d7..766dcaa58f79 100644 --- a/pkgs/development/python-modules/pycups/default.nix +++ b/pkgs/development/python-modules/pycups/default.nix @@ -1,13 +1,13 @@ { stdenv, fetchurl, python, cups }: -let version = "1.9.57"; in +let version = "1.9.68"; in stdenv.mkDerivation { name = "pycups-${version}"; src = fetchurl { url = "http://cyberelk.net/tim/data/pycups/pycups-${version}.tar.bz2"; - sha256 = "12m3lh4nmfp6yn6sqlskl9gb1mfiwx42m8dnms6j6xc2nimn5k14"; + sha256 = "1i1ph9k1wampa7r6mgc30a99w0zjmxhvcxjxrgjqa5vdknynqd24"; }; installPhase = '' diff --git a/pkgs/development/python-modules/pygame/default.nix b/pkgs/development/python-modules/pygame/default.nix index 93fa70e44bcf..3a24767ae4ee 100644 --- a/pkgs/development/python-modules/pygame/default.nix +++ b/pkgs/development/python-modules/pygame/default.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchurl, python, pkgconfig -, SDL, SDL_image, SDL_mixer, SDL_ttf, libpng, libjpeg +{ stdenv, fetchurl, buildPythonPackage, pkgconfig, smpeg, libX11 +, SDL, SDL_image, SDL_mixer, SDL_ttf, libpng, libjpeg, portmidi }: -stdenv.mkDerivation { +buildPythonPackage { name = "pygame-1.9.1"; src = fetchurl { @@ -11,24 +11,21 @@ stdenv.mkDerivation { }; buildInputs = [ - python pkgconfig SDL SDL_image SDL_mixer SDL_ttf libpng libjpeg + pkgconfig SDL SDL_image SDL_mixer SDL_ttf libpng libjpeg + smpeg portmidi libX11 ]; patches = [ ./pygame-v4l.patch ]; - configurePhase = '' - for i in ${SDL_image} ${SDL_mixer} ${SDL_ttf} ${libpng} ${libjpeg}; do + preConfigure = '' + for i in ${SDL_image} ${SDL_mixer} ${SDL_ttf} ${libpng} ${libjpeg} ${portmidi} ${libX11}; do sed -e "/origincdirs =/a'$i/include'," -i config_unix.py sed -e "/origlibdirs =/aoriglibdirs += '$i/lib'," -i config_unix.py done - yes Y | LOCALBASE=/ python config.py + LOCALBASE=/ python config.py ''; - buildPhase = "python setup.py build"; - - installPhase = "python setup.py install --prefix=$out"; - meta = { description = "Python library for games"; homepage = "http://www.pygame.org/"; diff --git a/pkgs/development/python-modules/pygobject/3.nix b/pkgs/development/python-modules/pygobject/3.nix index 94de33f0d509..14b7bd34eae0 100644 --- a/pkgs/development/python-modules/pygobject/3.nix +++ b/pkgs/development/python-modules/pygobject/3.nix @@ -8,7 +8,8 @@ stdenv.mkDerivation rec { sha256 = "0dfsjsa95ix8bx3h8w4bhnz7rymgl2paclvbn93x6qp8b53y0pys"; }; - buildInputs = [ python pkgconfig glib gobjectIntrospection pycairo cairo ]; + buildInputs = [ python pkgconfig glib gobjectIntrospection ]; + propagatedBuildInputs = [ pycairo cairo ]; meta = { homepage = http://live.gnome.org/PyGObject; diff --git a/pkgs/development/python-modules/pygtksourceview/codegendir.patch b/pkgs/development/python-modules/pygtksourceview/codegendir.patch new file mode 100644 index 000000000000..783c5e2d4671 --- /dev/null +++ b/pkgs/development/python-modules/pygtksourceview/codegendir.patch @@ -0,0 +1,25 @@ +diff -Nur pygtksourceview-2.10.1-orig/configure pygtksourceview-2.10.1/configure +--- pygtksourceview-2.10.1-orig/configure 2010-04-18 15:29:55.000000000 +0200 ++++ pygtksourceview-2.10.1/configure 2015-01-30 20:36:31.784541887 +0100 +@@ -12950,7 +12950,7 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pygtk codegen" >&5 + $as_echo_n "checking for pygtk codegen... " >&6; } +-CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygtk-2.0` ++CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygobject-2.0` + echo $CODEGENDIR + if test -f $CODEGENDIR/codegen.py; then + CODEGEN=$CODEGENDIR/codegen.py +diff -Nur pygtksourceview-2.10.1-orig/configure.ac pygtksourceview-2.10.1/configure.ac +--- pygtksourceview-2.10.1-orig/configure.ac 2010-04-18 15:28:39.000000000 +0200 ++++ pygtksourceview-2.10.1/configure.ac 2015-01-30 20:36:42.781648830 +0100 +@@ -116,7 +116,7 @@ + + dnl codegen + AC_MSG_CHECKING(for pygtk codegen) +-CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygtk-2.0` ++CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygobject-2.0` + echo $CODEGENDIR + if test -f $CODEGENDIR/codegen.py; then + CODEGEN=$CODEGENDIR/codegen.py + diff --git a/pkgs/development/python-modules/pygtksourceview/default.nix b/pkgs/development/python-modules/pygtksourceview/default.nix new file mode 100644 index 000000000000..f282d3d36972 --- /dev/null +++ b/pkgs/development/python-modules/pygtksourceview/default.nix @@ -0,0 +1,16 @@ +{ stdenv, fetchurl, python, pkgconfig, pygobject, glib, pygtk, gnome2 }: + +let version = "2.10.1"; in + +stdenv.mkDerivation { + name = "pygtksourceview-${version}"; + + src = fetchurl { + url = "http://ftp.gnome.org/pub/gnome/sources/pygtksourceview/2.10/pygtksourceview-${version}.tar.bz2"; + sha256 = "0x2r9k547ad68sfddr5am341ap6zvy8k0rh3rd0n38k7xdd7rd5l"; + }; + + patches = [ ./codegendir.patch ]; + + buildInputs = [ python pkgconfig pygobject glib pygtk gnome2.gtksourceview ]; +} diff --git a/pkgs/development/python-modules/pylint/default.nix b/pkgs/development/python-modules/pylint/default.nix index 552def7241b3..7f4584f9c73e 100644 --- a/pkgs/development/python-modules/pylint/default.nix +++ b/pkgs/development/python-modules/pylint/default.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, pythonPackages }: pythonPackages.buildPythonPackage rec { - name = "pylint-1.2.1"; + name = "pylint-1.4.1"; namePrefix = ""; src = fetchurl { url = "https://pypi.python.org/packages/source/p/pylint/${name}.tar.gz"; - sha256 = "0q7zj5hgmz27wifhcqyaddc9yc5b2q6p16788zzm3da6qshv7xk3"; + sha256 = "0c7hw1pcp5sqmc0v86zygw21isfgzbsqdmlb1sywncnlxmh30f1y"; }; propagatedBuildInputs = with pythonPackages; [ astroid ]; diff --git a/pkgs/development/python-modules/pyopenssl/default.nix b/pkgs/development/python-modules/pyopenssl/default.nix deleted file mode 100644 index 5f92e2cf2025..000000000000 --- a/pkgs/development/python-modules/pyopenssl/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -a : -let - fetchurl = a.fetchurl; - - version = a.lib.attrByPath ["version"] "0.13.1" a; - propagatedBuildInputs = with a; [ - openssl python - ]; -in -rec { - src = fetchurl { - url = "http://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-${version}.tar.gz"; - sha256 = "1nrg2kas0wsv65j8sia8zkkc6ir5i20lrhkfavjxzxhl0iqyq1ms"; - }; - - inherit propagatedBuildInputs; - configureFlags = []; - - /* doConfigure should be removed if not needed */ - phaseNames = ["installPythonPackage"]; - - name = "pyOpenSSL-" + version; - meta = { - description = "Python OpenSSL wrapper capable of checking certificates"; - }; -} diff --git a/pkgs/development/python-modules/pyqt/4.x.nix b/pkgs/development/python-modules/pyqt/4.x.nix index 92a5fd2dc07f..92b74c952fac 100644 --- a/pkgs/development/python-modules/pyqt/4.x.nix +++ b/pkgs/development/python-modules/pyqt/4.x.nix @@ -1,13 +1,13 @@ -{ stdenv, fetchurl, python, sip, qt4, pythonDBus, pkgconfig, lndir, makeWrapper }: +{ stdenv, fetchurl, python, pythonPackages, qt4, pythonDBus, pkgconfig, lndir, makeWrapper }: -let version = "4.10.2"; # kde410.pykde4 doesn't build with 4.10.3 +let version = "4.11.3"; in stdenv.mkDerivation { name = "PyQt-x11-gpl-${version}"; src = fetchurl { url = "mirror://sourceforge/pyqt/PyQt4/PyQt-${version}/PyQt-x11-gpl-${version}.tar.gz"; - sha256 = "1zp69caqq195ymp911d0cka8619q78hzmfxvj7c51w2y53zg4z3l"; + sha256 = "11jnfjw79s0b0qdd9s6kd69w87vf16dhagbhbmwbmrp2vgf80dw5"; }; configurePhase = '' @@ -30,7 +30,7 @@ stdenv.mkDerivation { buildInputs = [ python pkgconfig makeWrapper qt4 lndir ]; - propagatedBuildInputs = [ sip ]; + propagatedBuildInputs = [ pythonPackages.sip_4_16 ]; postInstall = '' for i in $out/bin/*; do diff --git a/pkgs/development/python-modules/pyqt/5.x.nix b/pkgs/development/python-modules/pyqt/5.x.nix index 2d2a2ed51511..83dac459284c 100644 --- a/pkgs/development/python-modules/pyqt/5.x.nix +++ b/pkgs/development/python-modules/pyqt/5.x.nix @@ -29,7 +29,8 @@ in stdenv.mkDerivation { export PYTHONPATH=$PYTHONPATH:$out/lib/${python.libPrefix}/site-packages substituteInPlace configure.py \ - --replace 'install_dir=pydbusmoddir' "install_dir='$out/lib/${python.libPrefix}/site-packages/dbus/mainloop'" + --replace 'install_dir=pydbusmoddir' "install_dir='$out/lib/${python.libPrefix}/site-packages/dbus/mainloop'" \ + --replace "ModuleMetadata(qmake_QT=['webkitwidgets'])" "ModuleMetadata(qmake_QT=['webkitwidgets', 'printsupport'])" ${python.executable} configure.py -w \ --confirm-license \ diff --git a/pkgs/development/python-modules/rbtools/default.nix b/pkgs/development/python-modules/rbtools/default.nix index 7d82ef9adf2e..889f3df52aef 100644 --- a/pkgs/development/python-modules/rbtools/default.nix +++ b/pkgs/development/python-modules/rbtools/default.nix @@ -1,13 +1,13 @@ -{ stdenv, fetchurl, pythonPackages }: +{ stdenv, fetchurl, pythonPackages, python }: pythonPackages.buildPythonPackage rec { - name = "rbtools-0.4.1"; + name = "rbtools-0.7.1"; namePrefix = ""; src = fetchurl { - url = "http://downloads.reviewboard.org/releases/RBTools/0.4/RBTools-0.4.1.tar.gz"; - sha256 = "1v0r7rfzrasj56s53mib51wl056g7ykh2y1c6dwv12r6hzqsycgv"; + url = "http://downloads.reviewboard.org/releases/RBTools/0.7/RBTools-0.7.1.tar.gz"; + sha256 = "0axi4jf19ia2jwrs3b0xni7v317v03wj35richi111cm3pw6p2gb"; }; - propagatedBuildInputs = [ pythonPackages.setuptools ]; + propagatedBuildInputs = [ python.modules.sqlite3 pythonPackages.six ]; } diff --git a/pkgs/development/python-modules/rhpl/builder.sh b/pkgs/development/python-modules/rhpl/builder.sh index b37e9081832f..dc93effe802f 100644 --- a/pkgs/development/python-modules/rhpl/builder.sh +++ b/pkgs/development/python-modules/rhpl/builder.sh @@ -1,6 +1,6 @@ source $stdenv/setup -rpm2cpio $src | cpio -idv +rpmextract $src tar xfvj rhpl-*.tar.bz2 rm rhpl-*.tar.bz2 cd rhpl-* diff --git a/pkgs/development/python-modules/rhpl/default.nix b/pkgs/development/python-modules/rhpl/default.nix index 92330a378c89..ee1d0ec1738b 100644 --- a/pkgs/development/python-modules/rhpl/default.nix +++ b/pkgs/development/python-modules/rhpl/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, rpm, cpio, python, wirelesstools, gettext}: +{stdenv, fetchurl, rpmextract, python, wirelesstools, gettext}: stdenv.mkDerivation { name = "rhpl-0.218"; @@ -12,5 +12,5 @@ stdenv.mkDerivation { builder = ./builder.sh; - buildInputs = [ rpm cpio python wirelesstools gettext ]; + buildInputs = [ rpmextract python wirelesstools gettext ]; } diff --git a/pkgs/development/python-modules/setuptools/default.nix b/pkgs/development/python-modules/setuptools/default.nix index e33c815d23bc..01fe46686797 100644 --- a/pkgs/development/python-modules/setuptools/default.nix +++ b/pkgs/development/python-modules/setuptools/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { shortName = "setuptools-${version}"; name = "${python.executable}-${shortName}"; - version = "2.1"; + version = "7.0"; src = fetchurl { url = "http://pypi.python.org/packages/source/s/setuptools/${shortName}.tar.gz"; - sha256 = "1m8qjvj5bfbphdags5s6pgmvk3xnw509lgdlq9whkq5a9mgxf8m7"; + sha256 = "0qg07f035agwcz9m0p3kgdjs18xpl3h00rv28aqsfdyz1wm1m76x"; }; buildInputs = [ python wrapPython distutils-cfg ]; @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { wrapPythonPrograms ''; - doCheck = stdenv.system != "x86_64-darwin"; + doCheck = false; # requires pytest checkPhase = '' ${python}/bin/${python.executable} setup.py test diff --git a/pkgs/development/python-modules/sip/4.16.nix b/pkgs/development/python-modules/sip/4.16.nix index aa1fb1984385..b10852d17f39 100644 --- a/pkgs/development/python-modules/sip/4.16.nix +++ b/pkgs/development/python-modules/sip/4.16.nix @@ -1,11 +1,11 @@ -{ stdenv, fetchurl, python }: +{ stdenv, fetchurl, python, isPyPy }: -stdenv.mkDerivation rec { - name = "sip-4.16.1"; +if isPyPy then throw "sip not supported for interpreter ${python.executable}" else stdenv.mkDerivation rec { + name = "sip-4.16.4"; src = fetchurl { url = "mirror://sourceforge/pyqt/sip/${name}/${name}.tar.gz"; - sha256 = "1hknl71ij924syc9ik9nk4z051q3n75y7w27q9i07awpd39sp7m4"; + sha256 = "1xapklcz5ndilax0gr2h1fqzhdzh7yvxfb3y0rxfcag1qlzl9nnf"; }; configurePhase = '' diff --git a/pkgs/development/python-modules/sip/default.nix b/pkgs/development/python-modules/sip/default.nix index db397f959448..cf3a0149844b 100644 --- a/pkgs/development/python-modules/sip/default.nix +++ b/pkgs/development/python-modules/sip/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchurl, python }: +{ stdenv, fetchurl, python, isPyPy }: -stdenv.mkDerivation rec { +if isPyPy then throw "sip not supported for interpreter ${python.executable}" else stdenv.mkDerivation rec { name = "sip-4.14.7"; # kde410.pykde4 doesn't build with 4.15 src = fetchurl { diff --git a/pkgs/development/python-modules/taskw/use-template-for-taskwarrior-install-path.patch b/pkgs/development/python-modules/taskw/use-template-for-taskwarrior-install-path.patch new file mode 100644 index 000000000000..006d964d4016 --- /dev/null +++ b/pkgs/development/python-modules/taskw/use-template-for-taskwarrior-install-path.patch @@ -0,0 +1,48 @@ +commit 4de021d049a9b194da93d7e96ff12cc1cbabac83 +Author: Nicolas B. Pierron <nixos@nbp.name> +Date: Sun Nov 16 15:19:38 2014 +0100 + + Use a template for taskwarrior install path. + +diff --git a/taskw/warrior.py b/taskw/warrior.py +index 21dde88..e0509f2 100644 +--- a/taskw/warrior.py ++++ b/taskw/warrior.py +@@ -451,17 +451,17 @@ class TaskWarriorShellout(TaskWarriorBase): + def _execute(self, *args): + """ Execute a given taskwarrior command with arguments + + Returns a 2-tuple of stdout and stderr (respectively). + + """ + command = ( + [ +- 'task', ++ '@@taskwarrior@@/bin/task', + 'rc:%s' % self.config_filename, + ] + + self.get_configuration_override_args() + + [six.text_type(arg) for arg in args] + ) + + # subprocess is expecting bytestrings only, so nuke unicode if present + for i in range(len(command)): +@@ -525,17 +525,17 @@ class TaskWarriorShellout(TaskWarriorBase): + except OSError: + # OSError is raised if subprocess.Popen fails to find + # the executable. + return False + + @classmethod + def get_version(cls): + taskwarrior_version = subprocess.Popen( +- ['task', '--version'], ++ ['@@taskwarrior@@/bin/task', '--version'], + stdout=subprocess.PIPE + ).communicate()[0] + return LooseVersion(taskwarrior_version.decode()) + + def sync(self, init=False): + if self.get_version() < LooseVersion('2.3'): + raise UnsupportedVersionException( + "'sync' requires version 2.3 of taskwarrior or later." diff --git a/pkgs/development/python-modules/wxPython/2.8.nix b/pkgs/development/python-modules/wxPython/2.8.nix index 8819605528d6..a6fd0100f587 100644 --- a/pkgs/development/python-modules/wxPython/2.8.nix +++ b/pkgs/development/python-modules/wxPython/2.8.nix @@ -1,10 +1,10 @@ -{ stdenv, fetchurl, pkgconfig, wxGTK, pythonPackages }: +{ stdenv, fetchurl, pkgconfig, wxGTK, pythonPackages, python, isPyPy }: assert wxGTK.unicode; let version = "2.8.12.1"; in -stdenv.mkDerivation { +if isPyPy then throw "wxPython-${version} not supported for interpreter ${python.executable}" else stdenv.mkDerivation { name = "wxPython-${version}"; builder = ./builder.sh; @@ -17,4 +17,8 @@ stdenv.mkDerivation { buildInputs = [ pkgconfig wxGTK (wxGTK.gtk) pythonPackages.python pythonPackages.wrapPython ]; passthru = { inherit wxGTK; }; + + meta = { + platforms = stdenv.lib.platforms.all; + }; } diff --git a/pkgs/development/python-modules/wxPython/3.0.nix b/pkgs/development/python-modules/wxPython/3.0.nix index 9aa6148643bd..4974daebb2bb 100644 --- a/pkgs/development/python-modules/wxPython/3.0.nix +++ b/pkgs/development/python-modules/wxPython/3.0.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, wxGTK, pythonPackages, openglSupport ? true }: +{ stdenv, fetchurl, pkgconfig, wxGTK, pythonPackages, openglSupport ? true, python, isPyPy }: assert wxGTK.unicode; @@ -6,7 +6,7 @@ with stdenv.lib; let version = "3.0.0.0"; in -stdenv.mkDerivation { +if isPyPy then throw "wxPython-${version} not supported for interpreter ${python.executable}" else stdenv.mkDerivation { name = "wxPython-${version}"; builder = ./builder3.0.sh; @@ -22,4 +22,8 @@ stdenv.mkDerivation { inherit openglSupport; passthru = { inherit wxGTK openglSupport; }; -} + + meta = { + platforms = stdenv.lib.platforms.all; + }; +} \ No newline at end of file |