recurse into python33 and pypy packages

This commit is contained in:
Domen Kozar 2013-07-29 14:52:19 +02:00
parent 4993f07fee
commit 918e5efb99
6 changed files with 57 additions and 36 deletions

View file

@ -7,6 +7,8 @@ let
majorVersion = "2.0"; majorVersion = "2.0";
version = "${majorVersion}.2"; version = "${majorVersion}.2";
pythonVersion = "2.7";
libPrefix = "pypy${majorVersion}";
pypy = stdenv.mkDerivation rec { pypy = stdenv.mkDerivation rec {
name = "pypy-${version}"; name = "pypy-${version}";
@ -57,18 +59,21 @@ let
''; '';
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/{bin,include,lib,pypy-c}
mkdir -p $out/pypy-c
# TODO: make libPrefix work
cp -R {include,lib_pypy,lib-python,pypy-c} $out/pypy-c cp -R {include,lib_pypy,lib-python,pypy-c} $out/pypy-c
ln -s $out/pypy-c/pypy-c $out/bin/pypy ln -s $out/pypy-c/pypy-c $out/bin/pypy
chmod +x $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? # TODO: compile python files?
''; '';
passthru = { passthru = {
inherit zlibSupport; inherit zlibSupport libPrefix;
libPrefix = "pypy${majorVersion}";
executable = "pypy"; executable = "pypy";
}; };

View file

@ -51,6 +51,7 @@ stdenv.mkDerivation {
postInstall = '' postInstall = ''
rm -rf "$out/lib/python${majorVersion}/test" rm -rf "$out/lib/python${majorVersion}/test"
ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}"
''; '';
passthru = { passthru = {
@ -62,6 +63,7 @@ stdenv.mkDerivation {
tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null); tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
libPrefix = "python${majorVersion}"; libPrefix = "python${majorVersion}";
executable = "python3.2m"; executable = "python3.2m";
is_py3k = true;
}; };
enableParallelBuilding = true; enableParallelBuilding = true;

View file

@ -51,6 +51,7 @@ stdenv.mkDerivation {
postInstall = '' postInstall = ''
rm -rf "$out/lib/python${majorVersion}/test" rm -rf "$out/lib/python${majorVersion}/test"
ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}"
''; '';
passthru = { passthru = {
@ -62,6 +63,7 @@ stdenv.mkDerivation {
tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null); tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
libPrefix = "python${majorVersion}"; libPrefix = "python${majorVersion}";
executable = "python3.3m"; executable = "python3.3m";
is_py3k = true;
}; };
enableParallelBuilding = true; enableParallelBuilding = true;

View file

@ -55,7 +55,7 @@ python.stdenv.mkDerivation (attrs // {
meta = { meta = {
platforms = python.meta.platforms; platforms = python.meta.platforms;
} // meta // { } // 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 # checkPhase after installPhase to run tests on installed packages

View file

@ -5736,6 +5736,7 @@ let
### DEVELOPMENT / PYTHON MODULES ### DEVELOPMENT / PYTHON MODULES
# python function with default python interpreter
buildPythonPackage = pythonPackages.buildPythonPackage; buildPythonPackage = pythonPackages.buildPythonPackage;
pythonPackages = python27Packages; pythonPackages = python27Packages;
@ -5752,11 +5753,11 @@ let
python3Packages = python33Packages; python3Packages = python33Packages;
python33Packages = import ./python-packages.nix { python33Packages = recurseIntoAttrs (import ./python-packages.nix {
inherit pkgs; inherit pkgs;
inherit (lib) lowPrio; inherit (lib) lowPrio;
python = python33; python = python33;
}; });
python32Packages = import ./python-packages.nix { python32Packages = import ./python-packages.nix {
inherit pkgs; inherit pkgs;
@ -5770,6 +5771,12 @@ let
python = python27; python = python27;
}); });
pypyPackages = recurseIntoAttrs (import ./python-packages.nix {
inherit pkgs;
inherit (lib) lowPrio;
python = pypy;
});
plone41Packages = recurseIntoAttrs (import ../development/web/plone/4.1.nix { plone41Packages = recurseIntoAttrs (import ../development/web/plone/4.1.nix {
inherit pkgs; inherit pkgs;
pythonPackages = python26Packages; pythonPackages = python26Packages;

View file

@ -302,8 +302,6 @@ pythonPackages = modules // rec {
sha256 = "b0c12b8c48ed9180c7475fab18de50d63e1b517cfb46da4d2c66fc406fe902bc"; sha256 = "b0c12b8c48ed9180c7475fab18de50d63e1b517cfb46da4d2c66fc406fe902bc";
}; };
installCommand = "python setup.py install --prefix=$out";
# error: invalid command 'test' # error: invalid command 'test'
doCheck = false; doCheck = false;
@ -501,10 +499,10 @@ pythonPackages = modules // rec {
}; };
bpython = buildPythonPackage rec { bpython = buildPythonPackage rec {
name = "bpython-0.11"; name = "bpython-0.12";
src = fetchurl { src = fetchurl {
url = "http://www.bpython-interpreter.org/releases/bpython-0.11.tar.gz"; url = "http://www.bpython-interpreter.org/releases/bpython-0.12.tar.gz";
sha256 = "02dkmsmgy04l33nyw54rlxkjwff0yf3cy2kvdx8s5w344mqkkkv0"; sha256 = "1ilf58qq7sazmcgg4f1wswbhcn2gb8qbbrpgm6gf0j2lbm60gabl";
}; };
propagatedBuildInputs = [ modules.curses pygments ]; propagatedBuildInputs = [ modules.curses pygments ];
@ -1491,7 +1489,7 @@ pythonPackages = modules // rec {
PYTHONPATH="${offlineDistutils}/lib/${python.libPrefix}/site-packages:$PYTHONPATH" PYTHONPATH="${offlineDistutils}/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
export PYTHONPATH="$dst:$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 eapth="$out/lib/${python.libPrefix}"/site-packages/easy-install.pth
if [ -e "$eapth" ]; then if [ -e "$eapth" ]; then
@ -1692,7 +1690,7 @@ pythonPackages = modules // rec {
buildPhase = "make build"; buildPhase = "make build";
installCommand = '' 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. # For some reason "python setup.py test" doesn't work with Python 2.6.
@ -2477,10 +2475,10 @@ pythonPackages = modules // rec {
configurePhase = "cd python"; configurePhase = "cd python";
buildPhase = "python setup.py build"; buildPhase = "${python}/bin/${python.executable} setup.py build";
installPhase = '' installPhase = ''
python setup.py install --prefix=$out ${python}/bin/${python.executable} setup.py install --prefix=$out
''; '';
meta = { meta = {
@ -2501,7 +2499,7 @@ pythonPackages = modules // rec {
buildInputs = [ pkgs.swig pkgs.openssl ]; 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. doCheck = false; # another test that depends on the network.
@ -3125,8 +3123,8 @@ pythonPackages = modules // rec {
# TODO: add ATLAS=${pkgs.atlas} # TODO: add ATLAS=${pkgs.atlas}
installCommand = '' installCommand = ''
export BLAS=${pkgs.blas} LAPACK=${pkgs.liblapack} export BLAS=${pkgs.blas} LAPACK=${pkgs.liblapack}
python setup.py build --fcompiler="gnu95" ${python}/bin/${python.executable} setup.py build --fcompiler="gnu95"
python setup.py install --prefix=$out ${python}/bin/${python.executable} setup.py install --prefix=$out
''; '';
# error: invalid command 'test' # error: invalid command 'test'
@ -3704,12 +3702,12 @@ pythonPackages = modules // rec {
buildInputs = [ python pkgs.portaudio ]; buildInputs = [ python pkgs.portaudio ];
buildPhase = if stdenv.isDarwin then '' 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 '' '' 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 = { meta = {
description = "Python bindings for PortAudio"; description = "Python bindings for PortAudio";
@ -3965,7 +3963,7 @@ pythonPackages = modules // rec {
buildInputs = [ python ]; buildInputs = [ python ];
installPhase = '' installPhase = ''
python setup.py install --prefix=$out ${python}/bin/${python.executable} setup.py install --prefix=$out
''; '';
meta = { meta = {
@ -3994,7 +3992,7 @@ pythonPackages = modules // rec {
propagatedBuildInputs = [ urlgrabber ]; propagatedBuildInputs = [ urlgrabber ];
checkPhase = '' checkPhase = ''
python tests/baseclass.py -vv ${python}/bin/${python.executable} tests/baseclass.py -vv
''; '';
meta = { meta = {
@ -4072,7 +4070,7 @@ pythonPackages = modules // rec {
propagatedBuildInputs = [ pkgs.parted ]; propagatedBuildInputs = [ pkgs.parted ];
checkPhase = '' checkPhase = ''
python -m unittest discover -v ${python}/bin/${python.executable} -m unittest discover -v
''; '';
meta = { meta = {
@ -4744,8 +4742,8 @@ pythonPackages = modules // rec {
# TODO: add ATLAS=${pkgs.atlas} # TODO: add ATLAS=${pkgs.atlas}
installCommand = '' installCommand = ''
export BLAS=${pkgs.blas} LAPACK=${pkgs.liblapack} export BLAS=${pkgs.blas} LAPACK=${pkgs.liblapack}
python setup.py build --fcompiler="gnu95" ${python}/bin/${python.executable} setup.py build --fcompiler="gnu95"
python setup.py install --prefix=$out ${python}/bin/${python.executable} setup.py install --prefix=$out
''; '';
meta = { meta = {
@ -5323,12 +5321,18 @@ pythonPackages = modules // rec {
unittest2 = buildPythonPackage rec { unittest2 = buildPythonPackage rec {
name = "unittest2-0.5.1"; version = "0.5.1";
name = "unittest2-${version}";
src = fetchurl { src = if python.is_py3k or false
url = "http://pypi.python.org/packages/source/u/unittest2/${name}.tar.gz"; then fetchurl {
md5 = "a0af5cac92bbbfa0c3b0e99571390e0f"; 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 = { meta = {
description = "A backport of the new features added to the unittest testing framework in Python 2.7"; 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 { zope_testing = buildPythonPackage rec {
name = "zope.testing-${version}"; name = "zope.testing-${version}";
version = "4.1.1"; version = "4.1.2";
src = fetchurl { src = fetchurl {
url = "http://pypi.python.org/packages/source/z/zope.testing/${name}.tar.gz"; url = "http://pypi.python.org/packages/source/z/zope.testing/${name}.zip";
md5 = "2e3829841090d6adff718b8b73c87b6b"; md5 = "01c30c342c6a18002a762bd5d320a6e9";
}; };
buildInputs = [ pkgs.unzip ];
propagatedBuildInputs = [ zope_interface zope_exceptions zope_location ]; propagatedBuildInputs = [ zope_interface zope_exceptions zope_location ];
meta = { meta = {