Python Flit: run tests by default
This commit is contained in:
parent
61c48d9c45
commit
7b6b7f6b78
@ -1,6 +1,7 @@
|
|||||||
# This function provides specific bits for building a flit-based Python package.
|
# This function provides specific bits for building a flit-based Python package.
|
||||||
|
|
||||||
{ flit
|
{ python
|
||||||
|
, flit
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{ ... } @ attrs:
|
{ ... } @ attrs:
|
||||||
@ -13,7 +14,9 @@ attrs // {
|
|||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Flit packages do not come with tests.
|
# Flit packages, like setuptools packages, might have tests.
|
||||||
installCheckPhase = attrs.checkPhase or ":";
|
installCheckPhase = attrs.checkPhase or ''
|
||||||
doCheck = attrs.doCheck or false;
|
${python.interpreter} -m unittest discover
|
||||||
|
'';
|
||||||
|
doCheck = attrs.doCheck or true;
|
||||||
}
|
}
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
setuptools-specific = import ./build-python-package-setuptools.nix { inherit lib python bootstrapped-pip; };
|
setuptools-specific = import ./build-python-package-setuptools.nix { inherit lib python bootstrapped-pip; };
|
||||||
flit-specific = import ./build-python-package-flit.nix { inherit flit; };
|
flit-specific = import ./build-python-package-flit.nix { inherit python flit; };
|
||||||
wheel-specific = import ./build-python-package-wheel.nix { };
|
wheel-specific = import ./build-python-package-wheel.nix { };
|
||||||
common = import ./build-python-package-common.nix { inherit python bootstrapped-pip; };
|
common = import ./build-python-package-common.nix { inherit python bootstrapped-pip; };
|
||||||
in
|
in
|
||||||
|
Loading…
Reference in New Issue
Block a user