Revert "prevent distutils during module install from downloading and load pth files"
This reverts commit 2a151d9df99f68c555a9f1fd2c80b8889561e9e3. svn path=/nixpkgs/branches/stdenv-updates/; revision=32659
This commit is contained in:
parent
9159a78807
commit
43e16d04b9
@ -3,7 +3,7 @@
|
|||||||
(http://pypi.python.org/pypi/setuptools/), which represents a large
|
(http://pypi.python.org/pypi/setuptools/), which represents a large
|
||||||
number of Python packages nowadays. */
|
number of Python packages nowadays. */
|
||||||
|
|
||||||
{ python, setuptools, wrapPython, lib, site, offlineDistutils }:
|
{ python, setuptools, wrapPython, lib, site }:
|
||||||
|
|
||||||
{ name, namePrefix ? "python-"
|
{ name, namePrefix ? "python-"
|
||||||
|
|
||||||
@ -69,15 +69,6 @@ python.stdenv.mkDerivation (attrs // {
|
|||||||
|
|
||||||
buildInputs = [ python wrapPython setuptools ] ++ buildInputs ++ pythonPath;
|
buildInputs = [ python wrapPython setuptools ] ++ buildInputs ++ pythonPath;
|
||||||
|
|
||||||
configurePhase = ''
|
|
||||||
# do not allow distutils to make downloads, whatever install command is used
|
|
||||||
export PYTHONPATH="${setuptools}/lib/${python.libPrefix}:$PYTHONPATH"
|
|
||||||
export PYTHONPATH="${offlineDistutils}/lib/${python.libPrefix}:$PYTHONPATH"
|
|
||||||
|
|
||||||
# enable pth files for dependencies
|
|
||||||
export PYTHONPATH="${site}/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# XXX: I think setuptools is not needed here
|
# XXX: I think setuptools is not needed here
|
||||||
pythonPath = [ setuptools site ] ++ pythonPath;
|
pythonPath = [ setuptools site ] ++ pythonPath;
|
||||||
|
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
# Used during module installation to prevent easy_install and python
|
|
||||||
# setup.py install/test from downloading
|
|
||||||
|
|
||||||
{ stdenv, python }:
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "python-offline-distutils-${python.version}";
|
|
||||||
|
|
||||||
buildInputs = [ python ];
|
|
||||||
|
|
||||||
unpackPhase = "true";
|
|
||||||
installPhase = ''
|
|
||||||
dst="$out/lib/${python.libPrefix}"
|
|
||||||
ensureDir $dst/distutils
|
|
||||||
ln -s ${python}/lib/${python.libPrefix}/distutils/* $dst/distutils/
|
|
||||||
cat <<EOF > $dst/distutils/distutils.cfg
|
|
||||||
[easy_install]
|
|
||||||
allow-hosts = None
|
|
||||||
EOF
|
|
||||||
'';
|
|
||||||
}
|
|
@ -9,7 +9,7 @@ let pythonPackages = python.modules // rec {
|
|||||||
|
|
||||||
buildPythonPackage = import ../development/python-modules/generic {
|
buildPythonPackage = import ../development/python-modules/generic {
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
inherit python wrapPython setuptools site offlineDistutils;
|
inherit python wrapPython setuptools site;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -24,10 +24,6 @@ let pythonPackages = python.modules // rec {
|
|||||||
inherit python;
|
inherit python;
|
||||||
};
|
};
|
||||||
|
|
||||||
offlineDistutils = import ../development/python-modules/offline-distutils {
|
|
||||||
inherit (pkgs) stdenv;
|
|
||||||
inherit python;
|
|
||||||
};
|
|
||||||
|
|
||||||
ipython = import ../shells/ipython {
|
ipython = import ../shells/ipython {
|
||||||
inherit (pkgs) stdenv fetchurl;
|
inherit (pkgs) stdenv fetchurl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user