summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeder Bergebakken Sundt <pbsds@hotmail.com>2023-09-10 00:55:30 +0200
committerPeder Bergebakken Sundt <pbsds@hotmail.com>2023-09-22 21:11:24 +0200
commitbdda7b0a538857f34a413076e06c3a4353efc70a (patch)
tree2b63e237cb5f09c9a74814f870944f4ac3b1ed76
parent175f10a559cd9dd65b096b0ea1a776ce4d746b23 (diff)
downloadnixpkgs-bdda7b0a538857f34a413076e06c3a4353efc70a.tar
nixpkgs-bdda7b0a538857f34a413076e06c3a4353efc70a.tar.gz
nixpkgs-bdda7b0a538857f34a413076e06c3a4353efc70a.tar.bz2
nixpkgs-bdda7b0a538857f34a413076e06c3a4353efc70a.tar.lz
nixpkgs-bdda7b0a538857f34a413076e06c3a4353efc70a.tar.xz
nixpkgs-bdda7b0a538857f34a413076e06c3a4353efc70a.tar.zst
nixpkgs-bdda7b0a538857f34a413076e06c3a4353efc70a.zip
python3Packages.flitBuildHook: remove
-rw-r--r--doc/languages-frameworks/python.section.md1
-rw-r--r--nixos/doc/manual/release-notes/rl-2311.section.md2
-rw-r--r--pkgs/development/interpreters/python/hooks/default.nix9
-rw-r--r--pkgs/development/interpreters/python/hooks/flit-build-hook.sh15
-rw-r--r--pkgs/development/interpreters/python/mk-python-derivation.nix6
-rw-r--r--pkgs/development/interpreters/python/python2/mk-python-derivation.nix6
6 files changed, 5 insertions, 34 deletions
diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md
index ca0513fbde8..818edff64c2 100644
--- a/doc/languages-frameworks/python.section.md
+++ b/doc/languages-frameworks/python.section.md
@@ -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
diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md
index baf3b4d9022..457311f1fcb 100644
--- a/nixos/doc/manual/release-notes/rl-2311.section.md
+++ b/nixos/doc/manual/release-notes/rl-2311.section.md
@@ -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`.
diff --git a/pkgs/development/interpreters/python/hooks/default.nix b/pkgs/development/interpreters/python/hooks/default.nix
index 306c33a91fd..700276e77af 100644
--- a/pkgs/development/interpreters/python/hooks/default.nix
+++ b/pkgs/development/interpreters/python/hooks/default.nix
@@ -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";
diff --git a/pkgs/development/interpreters/python/hooks/flit-build-hook.sh b/pkgs/development/interpreters/python/hooks/flit-build-hook.sh
deleted file mode 100644
index 45893aae00f..00000000000
--- a/pkgs/development/interpreters/python/hooks/flit-build-hook.sh
+++ /dev/null
@@ -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
diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix
index e9c783116b6..fbacf6bb233 100644
--- a/pkgs/development/interpreters/python/mk-python-derivation.nix
+++ b/pkgs/development/interpreters/python/mk-python-derivation.nix
@@ -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 {
diff --git a/pkgs/development/interpreters/python/python2/mk-python-derivation.nix b/pkgs/development/interpreters/python/python2/mk-python-derivation.nix
index e5f9c00b2fb..d42e4e85c10 100644
--- a/pkgs/development/interpreters/python/python2/mk-python-derivation.nix
+++ b/pkgs/development/interpreters/python/python2/mk-python-derivation.nix
@@ -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