diff options
author | Domen Kozar <domen@dev.si> | 2013-07-29 14:52:19 +0200 |
---|---|---|
committer | Domen Kozar <domen@dev.si> | 2013-07-29 14:52:19 +0200 |
commit | 918e5efb99a790362c8aa8fc70edc39f2b284575 (patch) | |
tree | 1777adbe68ea539133390f8982aefc0459d6ab7c | |
parent | 4993f07feecc5650f58713866cbec57fa4c4d0a0 (diff) | |
download | nixlib-918e5efb99a790362c8aa8fc70edc39f2b284575.tar nixlib-918e5efb99a790362c8aa8fc70edc39f2b284575.tar.gz nixlib-918e5efb99a790362c8aa8fc70edc39f2b284575.tar.bz2 nixlib-918e5efb99a790362c8aa8fc70edc39f2b284575.tar.lz nixlib-918e5efb99a790362c8aa8fc70edc39f2b284575.tar.xz nixlib-918e5efb99a790362c8aa8fc70edc39f2b284575.tar.zst nixlib-918e5efb99a790362c8aa8fc70edc39f2b284575.zip |
recurse into python33 and pypy packages
-rw-r--r-- | pkgs/development/interpreters/pypy/2.0/default.nix | 15 | ||||
-rw-r--r-- | pkgs/development/interpreters/python/3.2/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/interpreters/python/3.3/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/python-modules/generic/default.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 11 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 61 |
6 files changed, 57 insertions, 36 deletions
diff --git a/pkgs/development/interpreters/pypy/2.0/default.nix b/pkgs/development/interpreters/pypy/2.0/default.nix index f3d1e4e9ade7..2dd681239a60 100644 --- a/pkgs/development/interpreters/pypy/2.0/default.nix +++ b/pkgs/development/interpreters/pypy/2.0/default.nix @@ -7,6 +7,8 @@ let majorVersion = "2.0"; version = "${majorVersion}.2"; + pythonVersion = "2.7"; + libPrefix = "pypy${majorVersion}"; pypy = stdenv.mkDerivation rec { name = "pypy-${version}"; @@ -57,18 +59,21 @@ let ''; installPhase = '' - mkdir -p $out/bin - mkdir -p $out/pypy-c - # TODO: make libPrefix work + mkdir -p $out/{bin,include,lib,pypy-c} + cp -R {include,lib_pypy,lib-python,pypy-c} $out/pypy-c ln -s $out/pypy-c/pypy-c $out/bin/pypy chmod +x $out/bin/pypy + + # other packages expect to find stuff according to libPrefix + ln -s $out/pypy-c/include $out/include/${libPrefix} + ln -s $out/pypy-c/lib-python/${pythonVersion} $out/lib/${libPrefix} + # TODO: compile python files? ''; passthru = { - inherit zlibSupport; - libPrefix = "pypy${majorVersion}"; + inherit zlibSupport libPrefix; executable = "pypy"; }; diff --git a/pkgs/development/interpreters/python/3.2/default.nix b/pkgs/development/interpreters/python/3.2/default.nix index 4c858c992729..e09602e7381e 100644 --- a/pkgs/development/interpreters/python/3.2/default.nix +++ b/pkgs/development/interpreters/python/3.2/default.nix @@ -51,6 +51,7 @@ stdenv.mkDerivation { postInstall = '' rm -rf "$out/lib/python${majorVersion}/test" + ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}" ''; passthru = { @@ -62,6 +63,7 @@ stdenv.mkDerivation { tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null); libPrefix = "python${majorVersion}"; executable = "python3.2m"; + is_py3k = true; }; enableParallelBuilding = true; diff --git a/pkgs/development/interpreters/python/3.3/default.nix b/pkgs/development/interpreters/python/3.3/default.nix index 7d3ede6594f8..509249b7f240 100644 --- a/pkgs/development/interpreters/python/3.3/default.nix +++ b/pkgs/development/interpreters/python/3.3/default.nix @@ -51,6 +51,7 @@ stdenv.mkDerivation { postInstall = '' rm -rf "$out/lib/python${majorVersion}/test" + ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}" ''; passthru = { @@ -62,6 +63,7 @@ stdenv.mkDerivation { tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null); libPrefix = "python${majorVersion}"; executable = "python3.3m"; + is_py3k = true; }; enableParallelBuilding = true; diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix index cc80388e6899..6a7d5e5f3d5e 100644 --- a/pkgs/development/python-modules/generic/default.nix +++ b/pkgs/development/python-modules/generic/default.nix @@ -55,7 +55,7 @@ python.stdenv.mkDerivation (attrs // { meta = { platforms = python.meta.platforms; } // meta // { - maintainers = (meta.maintainers or []) ++ [ lib.maintainers.chaoflow ]; + maintainers = (meta.maintainers or []) ++ [ lib.maintainers.chaoflow lib.maintainers.iElectric ]; }; # checkPhase after installPhase to run tests on installed packages diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 90102796ccb1..43f0af27ab07 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5736,6 +5736,7 @@ let ### DEVELOPMENT / PYTHON MODULES + # python function with default python interpreter buildPythonPackage = pythonPackages.buildPythonPackage; pythonPackages = python27Packages; @@ -5752,11 +5753,11 @@ let python3Packages = python33Packages; - python33Packages = import ./python-packages.nix { + python33Packages = recurseIntoAttrs (import ./python-packages.nix { inherit pkgs; inherit (lib) lowPrio; python = python33; - }; + }); python32Packages = import ./python-packages.nix { inherit pkgs; @@ -5770,6 +5771,12 @@ let python = python27; }); + pypyPackages = recurseIntoAttrs (import ./python-packages.nix { + inherit pkgs; + inherit (lib) lowPrio; + python = pypy; + }); + plone41Packages = recurseIntoAttrs (import ../development/web/plone/4.1.nix { inherit pkgs; pythonPackages = python26Packages; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b5b64843faf2..d455a68e9b29 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -302,8 +302,6 @@ pythonPackages = modules // rec { sha256 = "b0c12b8c48ed9180c7475fab18de50d63e1b517cfb46da4d2c66fc406fe902bc"; }; - installCommand = "python setup.py install --prefix=$out"; - # error: invalid command 'test' doCheck = false; @@ -501,10 +499,10 @@ pythonPackages = modules // rec { }; bpython = buildPythonPackage rec { - name = "bpython-0.11"; + name = "bpython-0.12"; src = fetchurl { - url = "http://www.bpython-interpreter.org/releases/bpython-0.11.tar.gz"; - sha256 = "02dkmsmgy04l33nyw54rlxkjwff0yf3cy2kvdx8s5w344mqkkkv0"; + url = "http://www.bpython-interpreter.org/releases/bpython-0.12.tar.gz"; + sha256 = "1ilf58qq7sazmcgg4f1wswbhcn2gb8qbbrpgm6gf0j2lbm60gabl"; }; propagatedBuildInputs = [ modules.curses pygments ]; @@ -1491,7 +1489,7 @@ pythonPackages = modules // rec { PYTHONPATH="${offlineDistutils}/lib/${python.libPrefix}/site-packages:$PYTHONPATH" export PYTHONPATH="$dst:$PYTHONPATH" - python setup.py install --prefix="$out" + ${python}/bin/${python.executable} setup.py install --prefix="$out" eapth="$out/lib/${python.libPrefix}"/site-packages/easy-install.pth if [ -e "$eapth" ]; then @@ -1692,7 +1690,7 @@ pythonPackages = modules // rec { buildPhase = "make build"; installCommand = '' - python setup.py install --prefix="$out" --root=/ --record="$out/lib/${python.libPrefix}/site-packages/dulwich/list.txt" --single-version-externally-managed + ${python}/bin/${python.executable} setup.py install --prefix="$out" --root=/ --record="$out/lib/${python.libPrefix}/site-packages/dulwich/list.txt" --single-version-externally-managed ''; # For some reason "python setup.py test" doesn't work with Python 2.6. @@ -2477,10 +2475,10 @@ pythonPackages = modules // rec { configurePhase = "cd python"; - buildPhase = "python setup.py build"; + buildPhase = "${python}/bin/${python.executable} setup.py build"; installPhase = '' - python setup.py install --prefix=$out + ${python}/bin/${python.executable} setup.py install --prefix=$out ''; meta = { @@ -2501,7 +2499,7 @@ pythonPackages = modules // rec { buildInputs = [ pkgs.swig pkgs.openssl ]; - buildPhase = "python setup.py build_ext --openssl=${pkgs.openssl}"; + buildPhase = "${python}/bin/${python.executable} setup.py build_ext --openssl=${pkgs.openssl}"; doCheck = false; # another test that depends on the network. @@ -3125,8 +3123,8 @@ pythonPackages = modules // rec { # TODO: add ATLAS=${pkgs.atlas} installCommand = '' export BLAS=${pkgs.blas} LAPACK=${pkgs.liblapack} - python setup.py build --fcompiler="gnu95" - python setup.py install --prefix=$out + ${python}/bin/${python.executable} setup.py build --fcompiler="gnu95" + ${python}/bin/${python.executable} setup.py install --prefix=$out ''; # error: invalid command 'test' @@ -3704,12 +3702,12 @@ pythonPackages = modules // rec { buildInputs = [ python pkgs.portaudio ]; buildPhase = if stdenv.isDarwin then '' - PORTAUDIO_PATH="${pkgs.portaudio}" python setup.py build --static-link + PORTAUDIO_PATH="${pkgs.portaudio}" ${python}/bin/${python.executable} setup.py build --static-link '' else '' - python setup.py build + ${python}/bin/${python.executable} setup.py build ''; - installPhase = "python setup.py install --prefix=$out"; + installPhase = "${python}/bin/${python.executable} setup.py install --prefix=$out"; meta = { description = "Python bindings for PortAudio"; @@ -3965,7 +3963,7 @@ pythonPackages = modules // rec { buildInputs = [ python ]; installPhase = '' - python setup.py install --prefix=$out + ${python}/bin/${python.executable} setup.py install --prefix=$out ''; meta = { @@ -3994,7 +3992,7 @@ pythonPackages = modules // rec { propagatedBuildInputs = [ urlgrabber ]; checkPhase = '' - python tests/baseclass.py -vv + ${python}/bin/${python.executable} tests/baseclass.py -vv ''; meta = { @@ -4072,7 +4070,7 @@ pythonPackages = modules // rec { propagatedBuildInputs = [ pkgs.parted ]; checkPhase = '' - python -m unittest discover -v + ${python}/bin/${python.executable} -m unittest discover -v ''; meta = { @@ -4744,8 +4742,8 @@ pythonPackages = modules // rec { # TODO: add ATLAS=${pkgs.atlas} installCommand = '' export BLAS=${pkgs.blas} LAPACK=${pkgs.liblapack} - python setup.py build --fcompiler="gnu95" - python setup.py install --prefix=$out + ${python}/bin/${python.executable} setup.py build --fcompiler="gnu95" + ${python}/bin/${python.executable} setup.py install --prefix=$out ''; meta = { @@ -5323,12 +5321,18 @@ pythonPackages = modules // rec { unittest2 = buildPythonPackage rec { - name = "unittest2-0.5.1"; + version = "0.5.1"; + name = "unittest2-${version}"; - src = fetchurl { - url = "http://pypi.python.org/packages/source/u/unittest2/${name}.tar.gz"; - md5 = "a0af5cac92bbbfa0c3b0e99571390e0f"; - }; + src = if python.is_py3k or false + then fetchurl { + url = "http://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-${version}.tar.gz"; + sha256 = "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"; + } + else fetchurl { + url = "http://pypi.python.org/packages/source/u/unittest2/unittest2-${version}.tar.gz"; + md5 = "a0af5cac92bbbfa0c3b0e99571390e0f"; + }; meta = { description = "A backport of the new features added to the unittest testing framework in Python 2.7"; @@ -6104,13 +6108,14 @@ pythonPackages = modules // rec { zope_testing = buildPythonPackage rec { name = "zope.testing-${version}"; - version = "4.1.1"; + version = "4.1.2"; src = fetchurl { - url = "http://pypi.python.org/packages/source/z/zope.testing/${name}.tar.gz"; - md5 = "2e3829841090d6adff718b8b73c87b6b"; + url = "http://pypi.python.org/packages/source/z/zope.testing/${name}.zip"; + md5 = "01c30c342c6a18002a762bd5d320a6e9"; }; + buildInputs = [ pkgs.unzip ]; propagatedBuildInputs = [ zope_interface zope_exceptions zope_location ]; meta = { |