pythonPackages.isort: Add explicit setuptools dep and bin test
This commit is contained in:
parent
753ab3ce84
commit
94a80621ac
1 changed files with 16 additions and 3 deletions
|
@ -1,4 +1,6 @@
|
||||||
{ lib, buildPythonPackage, fetchPypi, isPy27, futures, backports_functools_lru_cache, mock, pytest }:
|
{ lib, buildPythonPackage, fetchPypi, setuptools, isPy27, futures
|
||||||
|
, backports_functools_lru_cache, mock, pytest
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
skipTests = [ "test_requirements_finder" "test_pipfile_finder" ] ++ lib.optional isPy27 "test_standard_library_deprecates_user_issue_778";
|
skipTests = [ "test_requirements_finder" "test_pipfile_finder" ] ++ lib.optional isPy27 "test_standard_library_deprecates_user_issue_778";
|
||||||
|
@ -12,13 +14,24 @@ in buildPythonPackage rec {
|
||||||
sha256 = "54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1";
|
sha256 = "54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = lib.optionals isPy27 [ futures backports_functools_lru_cache ];
|
propagatedBuildInputs = [
|
||||||
|
setuptools
|
||||||
|
] ++ lib.optionals isPy27 [ futures backports_functools_lru_cache ];
|
||||||
|
|
||||||
checkInputs = [ mock pytest ];
|
checkInputs = [ mock pytest ];
|
||||||
|
|
||||||
# isort excludes paths that contain /build/, so test fixtures don't work with TMPDIR=/build/
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
|
# isort excludes paths that contain /build/, so test fixtures don't work
|
||||||
|
# with TMPDIR=/build/
|
||||||
PATH=$out/bin:$PATH TMPDIR=/tmp/ pytest ${testOpts}
|
PATH=$out/bin:$PATH TMPDIR=/tmp/ pytest ${testOpts}
|
||||||
|
|
||||||
|
# Confirm that the produced executable script is wrapped correctly and runs
|
||||||
|
# OK, by launching it in a subshell without PYTHONPATH
|
||||||
|
(
|
||||||
|
unset PYTHONPATH
|
||||||
|
echo "Testing that `isort --version-number` returns OK..."
|
||||||
|
$out/bin/isort --version-number
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue