From 762049e5038df3b46aee82879f28598cbd4d4393 Mon Sep 17 00:00:00 2001 From: Florian Friesdorf <flo@chaoflow.net> Date: Tue, 28 Feb 2012 00:06:42 +0000 Subject: [PATCH] Revert "python packages cleanup" This reverts commit 632873d81fcf9b1f85d4b2f990f92bc65dcd261a. svn path=/nixpkgs/branches/stdenv-updates/; revision=32641 --- pkgs/top-level/python-packages.nix | 161 ++++++++++++----------------- 1 file changed, 68 insertions(+), 93 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bdd366f7a5f9..81f3783eadfc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6,18 +6,12 @@ let pythonPackages = python.modules // rec { inherit (pkgs) fetchurl fetchsvn stdenv; + buildPythonPackage = import ../development/python-modules/generic { inherit (pkgs) lib unzip; inherit python wrapPython setuptools site offlineDistutils; }; - wrapPython = pkgs.makeSetupHook - { deps = pkgs.makeWrapper; - substitutions.libPrefix = python.libPrefix; - } - ../development/python-modules/generic/wrap.sh; - - ### real packages below here setuptools = import ../development/python-modules/setuptools { inherit (pkgs) stdenv fetchurl; @@ -30,19 +24,24 @@ let pythonPackages = python.modules // rec { inherit python; }; - offlineDistutils = import ../development/python-modules/offline-distutils { inherit (pkgs) stdenv; inherit python; }; - ipython = import ../shells/ipython { inherit (pkgs) stdenv fetchurl; inherit buildPythonPackage pythonPackages; }; + wrapPython = pkgs.makeSetupHook + { deps = pkgs.makeWrapper; + substitutions.libPrefix = python.libPrefix; + } + ../development/python-modules/generic/wrap.sh; + + anyjson = buildPythonPackage rec { name = "anyjson-0.3.1"; @@ -68,7 +67,7 @@ let pythonPackages = python.modules // rec { sha1 = "f124e5e4a6644bf6d1734032a01ac44db1b25a29"; }; - checkPhase = "cd tests/client_0_8/ && python run_all.py"; + doCheck = false; meta = { homepage = http://code.google.com/p/py-amqplib/; @@ -87,9 +86,7 @@ let pythonPackages = python.modules // rec { buildInputs = [ pkgs.sqlite ]; - # XXX: currently fails doCheck = false; - checkPhase = "python setup.py test"; meta = { description = "A Python wrapper for the SQLite embedded relational database engine"; @@ -106,7 +103,8 @@ let pythonPackages = python.modules // rec { sha256 = "ee6da1aaad8b08a74a33eb82264b1a2bf12a7d5aefc7e9d7d40a8f8fa9912e62"; }; - checkPhase = "python test/test_argparse.py"; + # How do we run the tests? + doCheck = false; meta = { homepage = http://code.google.com/p/argparse/; @@ -144,7 +142,8 @@ let pythonPackages = python.modules // rec { sha256 = "1gasiy5lwbhsxw27g36d88n36xbj52434klisvqhljgckd4xqcy7"; }; - checkPhase = "python BeautifulSoupTests.py"; + # No tests implemented + doCheck = false; meta = { homepage = http://www.crummy.com/software/BeautifulSoup/; @@ -215,7 +214,9 @@ let pythonPackages = python.modules // rec { md5 = "530a0614de3a669314c3acd4995c54d5"; }; - buildInputs = [ nose amqplib anyjson ]; + buildInputs = [ nose ]; + + propagatedBuildInputs = [ amqplib anyjson ]; doCheck = false; # depends on the network @@ -226,22 +227,6 @@ let pythonPackages = python.modules // rec { }; - chardet = buildPythonPackage rec { - version = "1.0.1"; - name = "chardet-${version}"; - - src = fetchurl { - url = "http://pypi.python.org/packages/source/c/chardet/${name}.tar.gz"; - md5 = "7c28b02bca7847c13bebedaf4df6c5a3"; - }; - - meta = { - homepage = http://pypi.python.org/pypi/chardet; - description = "Universal encoding detector"; - }; - }; - - cheetah = buildPythonPackage rec { version = "2.4.4"; name = "cheetah-${version}"; @@ -251,7 +236,7 @@ let pythonPackages = python.modules // rec { md5 = "853917116e731afbc8c8a43c37e6ddba"; }; - buildInputs = [ markdown ]; + propagatedBuildInputs = [ markdown ]; meta = { homepage = http://www.cheetahtemplate.org/; @@ -261,18 +246,14 @@ let pythonPackages = python.modules // rec { cherrypy = buildPythonPackage (rec { - name = "cherrypy-3.2.2"; + name = "cherrypy-3.1.2"; src = fetchurl { - url = "http://download.cherrypy.org/cherrypy/3.2.2/CherryPy-3.2.2.tar.gz"; - sha256 = "14dn129h69wj0h8yr0bjwbrk8kygl6mkfnxc5m3fxhlm4xb8hnnw"; + url = "http://download.cherrypy.org/cherrypy/3.1.2/CherryPy-3.1.2.tar.gz"; + sha256 = "1xlvanhnxgvwd7vvypbafyl6yqfkpnwa9rs9k3058z84gd86bz8d"; }; - buildInputs = [ markdown nose ]; - - # XXX: tests hang doCheck = false; - checkPhase = "cd cherrypy && nosetests -s test/"; meta = { homepage = "http://www.cherrypy.org"; @@ -298,15 +279,13 @@ let pythonPackages = python.modules // rec { }); cssutils = buildPythonPackage (rec { - name = "cssutils-0.9.9"; + name = "cssutils-0.9.7a6"; src = fetchurl { - url = "http://pypi.python.org/packages/source/c/cssutils/${name}.zip"; - md5 = "5f8ea824cc0e0518b574da20e895be08"; + url = http://cssutils.googlecode.com/files/cssutils-0.9.7a6.zip; + sha256 = "1i5n97l20kn2w9v6x8ybcdnl323vy8lcc5qlxz5l89di36a2skgw"; }; - buildInputs = [ chardet mock ]; - # The tests fail - I don't know why doCheck = false; @@ -320,11 +299,11 @@ let pythonPackages = python.modules // rec { }); darcsver = buildPythonPackage (rec { - name = "darcsver-1.7.4"; + name = "darcsver-1.7.2"; src = fetchurl { url = "http://pypi.python.org/packages/source/d/darcsver/${name}.tar.gz"; - md5 = "e38aecd1343ab8447888a479ab12cb59"; + md5 = "94ca7e8c9ea0f69c0f3fc6f9fc88f65a"; }; buildInputs = [ mock ]; @@ -334,7 +313,7 @@ let pythonPackages = python.modules // rec { # http://thread.gmane.org/gmane.comp.file-systems.tahoe.devel/3200 for a # discussion. - # Gives: AttributeError: 'module' object has no attribute 'test_darcsver' + # Gives "ValueError: Empty module name" with no clue as to why. doCheck = false; meta = { @@ -401,8 +380,7 @@ let pythonPackages = python.modules // rec { sha256 = "0wfz4nxl95jcr2f2mc5gijgighavcghg33plzbz5jyi531jpffss"; }; - doCheck = false; # has two failing tests - checkPhase = "./test/alltests.py"; + doCheck = false; meta = { homepage = http://docutils.sourceforge.net/; @@ -434,6 +412,10 @@ let pythonPackages = python.modules // rec { md5 = "ce75c7c3c86741175a84456cc5bd531e"; }; + buildInputs = [ ]; + + propagatedBuildInputs = [ ]; + meta = { homepage = http://pypi.python.org/pypi/enum/; description = "Robust enumerated type support in Python."; @@ -449,7 +431,9 @@ let pythonPackages = python.modules // rec { md5 = "4728e3bd7f72763c1e5dccac0296f8ea"; }; - buildInputs = [ nose httplib2 greenlet ]; + buildInputs = [ nose httplib2 ]; + + propagatedBuildInputs = [ greenlet ]; PYTHON_EGG_CACHE = "`pwd`/.egg-cache"; @@ -484,11 +468,10 @@ let pythonPackages = python.modules // rec { sha256 = "8b3e4fc678c5c41483b3130666583a1c3909713adcd325204daded7b67171ed5"; }; - buildInputs = [ twisted ]; - propagatedBuildInputs = [ pkgs.pyopenssl ]; + propagatedBuildInputs = [ twisted pkgs.pyopenssl ]; # For some reason "python setup.py test" doesn't work with Python 2.6. - #doCheck = false; + doCheck = false; meta = { homepage = http://foolscap.lothar.com/; @@ -660,14 +643,14 @@ let pythonPackages = python.modules // rec { libcloud = buildPythonPackage (rec { - name = "libcloud-0.8.0"; + name = "libcloud-0.3.1"; src = fetchurl { - url = "http://pypi.python.org/packages/source/a/apache-libcloud/apache-${name}.tar.bz2"; - md5 = "b0ed4698b2be329f2339a77fd40ca7ff"; + url = mirror://apache/incubator/libcloud/apache-libcloud-incubating-0.3.1.tar.bz2; + sha256 = "11qilrs4sd4c1mkd64ikrjsc2vwrshhc54n5mh4xrark9c7ayp0y"; }; - buildInputs = [ mock zopeInterface ]; + buildInputs = [ zopeInterface ]; preConfigure = "cp test/secrets.py-dist test/secrets.py"; @@ -852,24 +835,6 @@ let pythonPackages = python.modules // rec { }); - # minimock = buildPythonPackage (rec { - # name = "minimock-1.2.7"; - - # src = fetchurl { - # url = "http://pypi.python.org/packages/source/M/MiniMock/MiniMock-1.2.7.tar.gz"; - # md5 = "31e813667ed46b6990630a0f5bd62d94"; - # }; - - # meta = { - # description = "The simplest possible mock library"; - - # homepage = http://pypi.python.org/pypi/MiniMock/; - - # license = "MIT-style"; - # }; - # }); - - mock = buildPythonPackage (rec { name = "mock-0.7.0"; @@ -1368,7 +1333,7 @@ let pythonPackages = python.modules // rec { name = "pycurl-7.19.0"; src = fetchurl { - url = "http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar.gz"; + url = "http://pypi.python.org/packages/source/p/pycryptopp/${name}.tar.gz"; sha256 = "0hh6icdbp7svcq0p57zf520ifzhn7jw64x07k99j7h57qpy2sy7b"; }; @@ -1376,6 +1341,11 @@ let pythonPackages = python.modules // rec { doCheck = false; + postInstall = '' + find $out -name easy-install.pth | xargs rm -v + find $out -name 'site.py*' | xargs rm -v + ''; + meta = { homepage = http://pycurl.sourceforge.net/; @@ -1441,13 +1411,13 @@ let pythonPackages = python.modules // rec { }; pylint = buildPythonPackage rec { - name = "pylint-0.25.1"; + name = "pylint-0.23.0"; src = fetchurl { - url = "http://pypi.python.org/packages/source/p/pylint/${name}.tar.gz"; - md5 = "728bbc2b339bc3749af013709a7f87a5"; + url = "http://ftp.logilab.org/pub/pylint/${name}.tar.gz"; + sha256 = "07091avcc2b374i5f3blszmawjcin8xssjfryz91qbxybb8r7c6d"; }; - propagatedBuildInputs = [ astng ]; + propagatedBuildInputs = [astng]; }; pymacs = pkgs.stdenv.mkDerivation rec { @@ -1578,13 +1548,13 @@ let pythonPackages = python.modules // rec { }; }); - # XXX: currently fails to build + pysvn = pkgs.stdenv.mkDerivation { - name = "pysvn-1.7.5"; + name = "pysvn-1.7.2"; src = fetchurl { - url = "http://pysvn.barrys-emacs.org/source_kits/pysvn-1.7.5.tar.gz"; - sha256 = "cb9664de62a85adba8471eda1894c3831d3400131feeea0e7b9cdd7c15d671ef"; + url = "http://pysvn.barrys-emacs.org/source_kits/pysvn-1.7.2.tar.gz"; + sha256 = "2b2980d200515e754e00a12d99dbce25c1ea90fddf8cba2bfa354c9305c5e455"; }; buildInputs = [ python pkgs.subversion pkgs.apr pkgs.aprutil pkgs.expat pkgs.neon pkgs.openssl ] @@ -1593,9 +1563,9 @@ let pythonPackages = python.modules // rec { # There seems to be no way to pass that path to configure. NIX_CFLAGS_COMPILE="-I${pkgs.aprutil}/include/apr-1"; - # XXX: sort out setting of PYTHONPATH with custom configurePhase configurePhase = '' cd Source + python setup.py backport python setup.py configure \ --apr-inc-dir=${pkgs.apr}/include/apr-1 \ --apr-lib-dir=${pkgs.apr}/lib \ @@ -1704,9 +1674,12 @@ let pythonPackages = python.modules // rec { sha256 = "1c7ipk5vwqnln83rmai5jzyxkjdajdzbk5cgy1z83nyr5hbkgkqr"; }; - buildInputs = [ python.modules.bsddb nose ]; - doCheck = false; # failing tests involving network - checkPhase = "python run_tests.py"; + doCheck = false; + + postInstall = '' + find $out -name easy-install.pth | xargs rm -v + find $out -name 'site.py*' | xargs rm -v + ''; meta = { description = "RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information."; @@ -2267,13 +2240,15 @@ let pythonPackages = python.modules // rec { }; hgsvn = buildPythonPackage rec { - name = "hgsvn-0.1.9"; - src = fetchurl { - url = "http://pypi.python.org/packages/source/h/hgsvn/${name}.tar.gz"; - md5 = "901f2fb04faad5a1e7cf84abfad564fd"; + name = "hgsvn-0.1.8"; + src = fetchurl rec { + name = "hgsvn-0.1.8.tar.gz"; + url = "http://pypi.python.org/packages/source/h/hgsvn/${name}.tar.gz#md5=56209eae48b955754e09185712123428"; + sha256 = "18a7bj1i0m4shkxmdvw1ci5i0isq5vqf0bpwgrhnk305rijvbpch"; }; - buildInputs = [ nose pkgs.subversion pkgs.mercurial ]; + buildInputs = [ pkgs.setuptools ]; + doCheck = false; meta = { description = "HgSVN";