python3Packages.flitBuildHook: remove

This commit is contained in:
Peder Bergebakken Sundt 2023-09-10 00:55:30 +02:00
parent 175f10a559
commit bdda7b0a53
6 changed files with 5 additions and 34 deletions

View File

@ -459,7 +459,6 @@ are used in `buildPythonPackage`.
with the `eggInstallHook`
- `eggBuildHook` to skip building for eggs.
- `eggInstallHook` to install eggs.
- `flitBuildHook` to build a wheel using `flit`.
- `pipBuildHook` to build a wheel using `pip` and PEP 517. Note a build system
(e.g. `setuptools` or `flit`) should still be added as `nativeBuildInput`.
- `pypaBuildHook` to build a wheel using

View File

@ -336,4 +336,6 @@ The module update takes care of the new config syntax and the data itself (user
can automatically format the root device by setting
`virtualisation.fileSystems."/".autoFormat = true;`.
- `python3.pkgs.flitBuildHook` has been removed. Use `flit-core` and `format = "pyproject"` instead.
- The `electron` packages now places its application files in `$out/libexec/electron` instead of `$out/lib/electron`. Packages using electron-builder will fail to build and need to be adjusted by changing `lib` to `libexec`.

View File

@ -45,15 +45,6 @@ in {
propagatedBuildInputs = [ ];
} ./egg-unpack-hook.sh) {};
flitBuildHook = callPackage ({ makePythonHook, flit }:
makePythonHook {
name = "flit-build-hook";
propagatedBuildInputs = [ flit ];
substitutions = {
inherit pythonInterpreter;
};
} ./flit-build-hook.sh) {};
pipBuildHook = callPackage ({ makePythonHook, pip, wheel }:
makePythonHook {
name = "pip-build-hook.sh";

View File

@ -1,15 +0,0 @@
# Setup hook for flit
echo "Sourcing flit-build-hook"
flitBuildPhase () {
echo "Executing flitBuildPhase"
runHook preBuild
@pythonInterpreter@ -m flit build --format wheel
runHook postBuild
echo "Finished executing flitBuildPhase"
}
if [ -z "${dontUseFlitBuild-}" ] && [ -z "${buildPhase-}" ]; then
echo "Using flitBuildPhase"
buildPhase=flitBuildPhase
fi

View File

@ -11,7 +11,6 @@
, namePrefix
, update-python-libraries
, setuptools
, flitBuildHook
, pypaBuildHook
, pypaInstallHook
, pythonCatchConflictsHook
@ -90,7 +89,6 @@
# Several package formats are supported.
# "setuptools" : Install a common setuptools/distutils based package. This builds a wheel.
# "wheel" : Install from a pre-compiled wheel.
# "flit" : Install a flit package. This builds a wheel.
# "pyproject": Install a package using a ``pyproject.toml`` file (PEP517). This builds a wheel.
# "egg": Install a package from an egg.
# "other" : Provide your own buildPhase and installPhase.
@ -122,7 +120,7 @@ let
else
"setuptools";
withDistOutput = lib.elem format' ["pyproject" "setuptools" "flit" "wheel"];
withDistOutput = lib.elem format' ["pyproject" "setuptools" "wheel"];
name_ = name;
@ -222,8 +220,6 @@ let
unzip
] ++ lib.optionals (format' == "setuptools") [
setuptoolsBuildHook
] ++ lib.optionals (format' == "flit") [
flitBuildHook
] ++ lib.optionals (format' == "pyproject") [(
if isBootstrapPackage then
pypaBuildHook.override {

View File

@ -98,12 +98,10 @@
, ... } @ attrs:
assert lib.assertMsg (format != "flit") "flit is not a supported Python 2 format";
let
inherit (python) stdenv;
withDistOutput = lib.elem format ["pyproject" "setuptools" "flit" "wheel"];
withDistOutput = lib.elem format ["pyproject" "setuptools" "wheel"];
name_ = name;
@ -171,7 +169,7 @@ let
nativeBuildInputs = [
python
wrapPython
ensureNewerSourcesForZipFilesHook # move to wheel installer (pip) or builder (setuptools, flit, ...)?
ensureNewerSourcesForZipFilesHook # move to wheel installer (pip) or builder (setuptools, ...)?
pythonRemoveTestsDirHook
] ++ lib.optionals catchConflicts [
pythonCatchConflictsHook