1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-01 21:39:21 +03:00

Revert "buildPythonPackage: add support for setupPyDistFlags"

I merged this a bit too quick. We need to have a closer look at it.
See the points brought up in https://github.com/NixOS/nixpkgs/pull/64682.

This reverts commit 1e0ebdb8a4.
This commit is contained in:
Frederik Rietdijk 2019-07-13 13:25:32 +02:00
parent b1375da4d0
commit 271b57c219
3 changed files with 5 additions and 14 deletions

View file

@ -5,12 +5,10 @@
}:
{
# passed to "python setup.py"
setupPyDistFlags ? []
# passed to "python setup.py build_ext"
# https://github.com/pypa/pip/issues/881
# Rename to `buildOptions` because it is not setuptools specific?
, setupPyBuildFlags ? []
setupPyBuildFlags ? []
# Execute before shell hook
, preShellHook ? ""
# Execute after shell hook
@ -18,14 +16,13 @@
, ... } @ attrs:
let
installOptions = lib.concatMapStringsSep " " (option: "--install-option ${option}") setupPyDistFlags;
options = lib.concatMapStringsSep " " (option: "--global-option ${option}") setupPyBuildFlags;
in attrs // {
buildPhase = attrs.buildPhase or ''
runHook preBuild
mkdir -p dist
echo "Creating a wheel..."
${python.pythonForBuild.interpreter} -m pip wheel --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist ${installOptions} ${options} .
${python.pythonForBuild.interpreter} -m pip wheel --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist ${options} .
echo "Finished creating a wheel..."
runHook postBuild
'';
@ -53,4 +50,4 @@ in attrs // {
${postShellHook}
'';
}
}