git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.isort: Add explicit setuptools dep and bin test
commit94a80621ac1d12671593074de88f1ee8012a7f82 authorAlexei Robyn <shados@shados.net> dateTue 29 Oct 2019, 11:13 (7 years ago) parent753ab3c
1 file changed+16−3
pkgs/development/python-modules/isort/default.nix+16−3
pkgs/development/python-modules/isort/default.nix+16−3
@@ -1,4 +1,6 @@
1−{ lib, buildPythonPackage, fetchPypi, isPy27, futures, backports_functools_lru_cache, mock, pytest }:
1+{ lib, buildPythonPackage, fetchPypi, setuptools, isPy27, futures
2+, backports_functools_lru_cache, mock, pytest
3+}:
24
35let
46 skipTests = [ "test_requirements_finder" "test_pipfile_finder" ] ++ lib.optional isPy27 "test_standard_library_deprecates_user_issue_778";
@@ -12,13 +14,24 @@ in buildPythonPackage rec {
1214 sha256 = "54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1";
1315 };
1416
15− propagatedBuildInputs = lib.optionals isPy27 [ futures backports_functools_lru_cache ];
17+ propagatedBuildInputs = [
18+ setuptools
19+ ] ++ lib.optionals isPy27 [ futures backports_functools_lru_cache ];
1620
1721 checkInputs = [ mock pytest ];
1822
19− # isort excludes paths that contain /build/, so test fixtures don't work with TMPDIR=/build/
2023 checkPhase = ''
24+ # isort excludes paths that contain /build/, so test fixtures don't work
25+ # with TMPDIR=/build/
2126 PATH=$out/bin:$PATH TMPDIR=/tmp/ pytest ${testOpts}
27+
28+ # Confirm that the produced executable script is wrapped correctly and runs
29+ # OK, by launching it in a subshell without PYTHONPATH
30+ (
31+ unset PYTHONPATH
32+ echo "Testing that `isort --version-number` returns OK..."
33+ $out/bin/isort --version-number
34+ )
2235 '';
2336
2437 meta = with lib; {