1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-14 08:34:50 +00:00
nixpkgs/pkgs/development/interpreters/python/build-python-package-flit.nix
2019-03-06 13:42:46 +01:00

23 lines
479 B
Nix

# This function provides specific bits for building a flit-based Python package.
{ python
, flit
}:
{ ... } @ attrs:
attrs // {
nativeBuildInputs = [ flit ];
buildPhase = attrs.buildPhase or ''
runHook preBuild
flit build --format wheel
runHook postBuild
'';
# Flit packages, like setuptools packages, might have tests.
installCheckPhase = attrs.checkPhase or ''
${python.interpreter} -m unittest discover
'';
doCheck = attrs.doCheck or true;
}