mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 19:02:57 +00:00
buildPythonPackage: sadly, checkPhase is too often installPhase in python
This commit is contained in:
parent
6ba529277a
commit
127a20f8da
@ -53,7 +53,6 @@ let
|
||||
setuppy = ./run_setup.py;
|
||||
in
|
||||
python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled"] // {
|
||||
inherit doCheck;
|
||||
|
||||
name = namePrefix + name;
|
||||
|
||||
@ -82,12 +81,6 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled"] // {
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
checkPhase = attrs.checkPhase or ''
|
||||
runHook preCheck
|
||||
${python.interpreter} nix_run_setup.py test
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
installPhase = attrs.installPhase or ''
|
||||
runHook preInstall
|
||||
|
||||
@ -101,12 +94,20 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled"] // {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
doInstallCheck = doCheck;
|
||||
doCheck = false;
|
||||
installCheckPhase = attrs.checkPhase or ''
|
||||
runHook preCheck
|
||||
${python.interpreter} nix_run_setup.py test
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
postFixup = attrs.postFixup or ''
|
||||
wrapPythonPrograms
|
||||
|
||||
# check if we have two packagegs with the same name in closure and fail
|
||||
# this shouldn't happen, something went wrong with dependencies specs
|
||||
${python.interpreter} ${./do_conflict.py}
|
||||
${python.interpreter} ${./catch_conflicts.py}
|
||||
'';
|
||||
|
||||
shellHook = attrs.shellHook or ''
|
||||
|
@ -10988,10 +10988,7 @@ let
|
||||
sed -i 's@python@${python.interpreter}@' os_testr/tests/files/testr-conf
|
||||
'';
|
||||
|
||||
# since tests depend on install results, let's do it so
|
||||
doInstallCheck = true;
|
||||
doCheck = false;
|
||||
installCheckPhase = ''
|
||||
checkPhase = ''
|
||||
export PATH=$PATH:$out/bin
|
||||
${python.interpreter} setup.py test
|
||||
'';
|
||||
@ -11560,9 +11557,7 @@ let
|
||||
sha256 = "1nw827iz5g9jlfnfbdi8kva565v0kdjzba2lccziimj09r71w900";
|
||||
};
|
||||
|
||||
doInstallCheck = true;
|
||||
doCheck = false;
|
||||
installCheckPhase = ''
|
||||
checkPhase = ''
|
||||
# remove turbogears tests as we don't have it packaged
|
||||
rm tests/test_tg*
|
||||
# remove flask since we don't have flask-restful
|
||||
@ -11604,9 +11599,7 @@ let
|
||||
rm taskflow/tests/unit/test_engines.py
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
doCheck = false;
|
||||
installCheckPhase = ''
|
||||
checkPhase = ''
|
||||
sed -i '/doc8/d' test-requirements.txt
|
||||
${python.interpreter} setup.py test
|
||||
'';
|
||||
@ -15998,9 +15991,7 @@ let
|
||||
sha256 = "05qf0m32isflln1zjgxlpw0wf469lj86vdwwqyizp1h94x5l22ji";
|
||||
};
|
||||
|
||||
doInstallCheck = true;
|
||||
doCheck = false;
|
||||
installCheckPhase = ''
|
||||
checkPhase = ''
|
||||
# this test takes too long
|
||||
sed -i 's/test_big_file/noop/' test/test_sendfile.py
|
||||
${self.python.executable} test/test_sendfile.py
|
||||
@ -16908,9 +16899,7 @@ let
|
||||
--replace '/usr/' '${pkgs.bash}/'
|
||||
'';
|
||||
|
||||
doInstallCheck = !isPyPy;
|
||||
doCheck = false;
|
||||
installCheckPhase = ''
|
||||
checkPhase = ''
|
||||
python test_subprocess32.py
|
||||
'';
|
||||
|
||||
@ -17149,9 +17138,7 @@ let
|
||||
buildInputs = with self; [ unittest2 scripttest pytz pkgs.pylint tempest-lib mock testtools ];
|
||||
propagatedBuildInputs = with self; [ pbr tempita decorator sqlalchemy_1_0 six sqlparse ];
|
||||
|
||||
doInstallCheck = true;
|
||||
doCheck = false;
|
||||
installCheckPhase = ''
|
||||
checkPhase = ''
|
||||
export PATH=$PATH:$out/bin
|
||||
echo sqlite:///__tmp__ > test_db.cfg
|
||||
# depends on ibm_db_sa
|
||||
|
Loading…
Reference in New Issue
Block a user