3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/interpreters/python/build-python-package-flit.nix
2018-04-08 11:36:07 +02:00

23 lines
473 B
Nix

# This function provides specific bits for building a flit-based Python package.
{ python
, flit
}:
{ ... } @ attrs:
attrs // {
buildInputs = [ 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;
}