python39: drop (#397258)

This commit is contained in:
Martin Weinelt
2025-04-13 01:46:51 +02:00
committed by GitHub
13 changed files with 38 additions and 96 deletions
@@ -50,7 +50,6 @@ sets are
* `pkgs.python27Packages`
* `pkgs.python3Packages`
* `pkgs.python39Packages`
* `pkgs.python310Packages`
* `pkgs.python311Packages`
* `pkgs.python312Packages`
@@ -158,14 +158,14 @@ lib.mkOption {
::: {#ex-options-declarations-util-mkPackageOption-extraDescription .example}
### `mkPackageOption` with additional description text
```nix
mkPackageOption pkgs [ "python39Packages" "pytorch" ] {
mkPackageOption pkgs [ "python312Packages" "torch" ] {
extraDescription = "This is an example and doesn't actually do anything.";
}
# is like
lib.mkOption {
type = lib.types.package;
default = pkgs.python39Packages.pytorch;
defaultText = lib.literalExpression "pkgs.python39Packages.pytorch";
default = pkgs.python312Packages.torch;
defaultText = lib.literalExpression "pkgs.python312Packages.torch";
description = "The pytorch package to use. This is an example and doesn't actually do anything.";
}
```
+23 -41
View File
@@ -1,9 +1,8 @@
{
lib,
fetchFromGitHub,
fetchPypi,
replaceVars,
python39,
python3,
fluidsynth,
soundfont-fluid,
wrapGAppsHook3,
@@ -12,51 +11,18 @@
ghostscript,
}:
let
# requires python39 due to https://stackoverflow.com/a/71902541 https://github.com/jwdj/EasyABC/issues/52
python = python39.override {
self = python;
packageOverrides = self: super: {
# currently broken with 4.2.1
# https://github.com/jwdj/EasyABC/issues/75
wxpython = super.wxpython.overrideAttrs (args: rec {
version = "4.2.0";
src = fetchPypi {
inherit version;
pname = "wxPython";
hash = "sha256-ZjzrxFCdfl0RNRiGX+J093+VQ0xdV7w4btWNZc7thsc=";
};
});
};
};
in
python.pkgs.buildPythonApplication {
python3.pkgs.buildPythonApplication {
pname = "easyabc";
version = "1.3.8.6";
version = "1.3.8.7-unstable-2025-01-12";
format = "other";
src = fetchFromGitHub {
owner = "jwdj";
repo = "easyabc";
rev = "6461b2c14280cb64224fc5299c31cfeef9b7d43c";
hash = "sha256-leC3A4HQMeJNeZXArb3YAYr2mddGPcws618NrRh2Q1Y=";
rev = "2cfa74d138d485523cae9b889186add3a249f2e4";
hash = "sha256-96Rh7hFWITIC62vs0bUtatDDgJ27UdZYhku8uqJBJew=";
};
nativeBuildInputs = [ wrapGAppsHook3 ];
propagatedBuildInputs = with python.pkgs; [
cx-freeze
wxpython
pygame
];
# apparently setup.py only supports Windows and Darwin
# everything is very non-standard in this project
dontBuild = true;
format = "other";
# https://discourse.nixos.org/t/packaging-mcomix3-python-gtk-missing-gsettings-schemas-issue/10190/2
strictDeps = false;
patches = [
(replaceVars ./hardcoded-paths.patch {
fluidsynth = "${fluidsynth}/lib/libfluidsynth.so";
@@ -65,6 +31,22 @@ python.pkgs.buildPythonApplication {
})
];
nativeBuildInputs = [ wrapGAppsHook3 ];
dependencies = with python3.pkgs; [
cx-freeze
wxpython
pygame
pyparsing
];
# apparently setup.py only supports Windows and Darwin
# everything is very non-standard in this project
dontBuild = true;
# https://discourse.nixos.org/t/packaging-mcomix3-python-gtk-missing-gsettings-schemas-issue/10190/2
strictDeps = false;
installPhase = ''
runHook preInstall
@@ -76,7 +58,7 @@ python.pkgs.buildPythonApplication {
ln -s ${abcmidi}/bin/abc2abc $out/share/easyabc/bin/abc2abc
ln -s ${abcm2ps}/bin/abcm2ps $out/share/easyabc/bin/abcm2ps
makeWrapper ${python.interpreter} $out/bin/easyabc \
makeWrapper ${python3.interpreter} $out/bin/easyabc \
--set PYTHONPATH "$PYTHONPATH:$out/share/easyabc" \
--add-flags "-O $out/share/easyabc/easy_abc.py"
+3 -3
View File
@@ -5,7 +5,7 @@
rustPlatform,
nodejs,
which,
python39,
python3,
libuv,
util-linux,
nixosTests,
@@ -37,7 +37,7 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs =
[
which
python39
python3
nodejs
pkg-config
]
@@ -66,11 +66,11 @@ rustPlatform.buildRustPackage rec {
passthru.tests.basic = nixosTests.cjdns;
meta = with lib; {
broken = true; # outdated, incompatible with supported python versions
homepage = "https://github.com/cjdelisle/cjdns";
description = "Encrypted networking for regular people";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ehmry ];
platforms = platforms.linux;
broken = stdenv.hostPlatform.isAarch64;
};
}
@@ -37,7 +37,6 @@
pkg-config,
ninja,
python312,
python39,
gitMinimal,
version,
flutterVersion,
@@ -58,7 +57,7 @@ let
constants = callPackage ./constants.nix { platform = stdenv.targetPlatform; };
python3 = if lib.versionAtLeast flutterVersion "3.20" then python312 else python39;
python3 = python312;
src = callPackage ./source.nix {
inherit
@@ -159,7 +159,6 @@ filterAndCreateOverrides {
expat,
libxcrypt-legacy,
ncurses6,
python39,
python310,
python311,
python312,
@@ -176,7 +175,6 @@ filterAndCreateOverrides {
++ lib.lists.optionals (cudaAtLeast "12.5") [
libxcrypt-legacy
ncurses6
python39
python310
python311
python312
@@ -29,7 +29,6 @@
patchelf,
perl,
python3, # FIXME: CUDAToolkit 10 may still need python27
python39,
python310,
python311,
pulseaudio,
@@ -155,7 +154,6 @@ backendStdenv.mkDerivation rec {
# libcrypt.so.1
libxcrypt-legacy
ncurses6
python39
python310
python311
];
@@ -309,14 +309,9 @@ stdenv.mkDerivation (finalAttrs: {
]
++ buildInputs;
prePatch =
optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace configure --replace-fail '`/usr/bin/arch`' '"i386"'
''
+ optionalString (pythonOlder "3.9" && stdenv.hostPlatform.isDarwin && x11Support) ''
# Broken on >= 3.9; replaced with ./3.9/darwin-tcl-tk.patch
substituteInPlace setup.py --replace-fail /Library/Frameworks /no-such-path
'';
prePatch = optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace configure --replace-fail '`/usr/bin/arch`' '"i386"'
'';
patches =
[
@@ -772,14 +767,6 @@ stdenv.mkDerivation (finalAttrs: {
inherit src;
name = "python${pythonVersion}-${version}-doc";
patches = optionals (pythonAtLeast "3.9" && pythonOlder "3.10") [
# https://github.com/python/cpython/issues/98366
(fetchpatch {
url = "https://github.com/python/cpython/commit/5612471501b05518287ed61c1abcb9ed38c03942.patch";
hash = "sha256-p41hJwAiyRgyVjCVQokMSpSFg/VDDrqkCSxsodVb6vY=";
})
];
postPatch = lib.optionalString (pythonAtLeast "3.9" && pythonOlder "3.11") ''
substituteInPlace Doc/tools/extensions/pyspecific.py \
--replace-fail "from sphinx.util import status_iterator" "from sphinx.util.display import status_iterator"
@@ -44,18 +44,6 @@
inherit passthruFun;
};
python39 = callPackage ./cpython {
self = __splicedPackages.python39;
sourceVersion = {
major = "3";
minor = "9";
patch = "21";
suffix = "";
};
hash = "sha256-MSb1lZLJsNeYWEdV8r97CB+hyjXOem/qmAEI11KgW7E=";
inherit passthruFun;
};
python310 = callPackage ./cpython {
self = __splicedPackages.python310;
sourceVersion = {
@@ -33,7 +33,7 @@ buildPythonPackage rec {
sed -i /patchelf/d pyproject.toml
# Build system requirements
substituteInPlace pyproject.toml \
--replace-fail "setuptools>=70.1,<75" "setuptools"
--replace-fail "setuptools>=70.1,<76" "setuptools"
'';
build-system = [
+4 -3
View File
@@ -9,7 +9,7 @@
perl,
check,
pkg-config,
python39, # crossfire-server relies on a parser wich was removed in python >3.9
python3,
version,
rev,
sha256,
@@ -39,7 +39,7 @@ stdenv.mkDerivation {
perl
check
pkg-config
python39
python3
];
hardeningDisable = [ "format" ];
@@ -49,13 +49,14 @@ stdenv.mkDerivation {
sh autogen.sh
'';
configureFlags = [ "--with-python=${python39}" ];
configureFlags = [ "--with-python=${python3}" ];
postInstall = ''
ln -s ${maps} "$out/share/crossfire/maps"
'';
meta = with lib; {
broken = true; # cfpython.c:63:10: fatal error: node.h: No such file or directory
description = "Server for the Crossfire free MMORPG";
homepage = "http://crossfire.real-time.com/";
license = licenses.gpl2Plus;
-8
View File
@@ -7589,12 +7589,6 @@ with pkgs;
bluezSupport = lib.meta.availableOn stdenv.hostPlatform bluez;
x11Support = true;
};
python39Full = python39.override {
self = python39Full;
pythonAttr = "python39Full";
bluezSupport = lib.meta.availableOn stdenv.hostPlatform bluez;
x11Support = true;
};
python310Full = python310.override {
self = python310Full;
pythonAttr = "python310Full";
@@ -7639,7 +7633,6 @@ with pkgs;
pythonInterpreters = callPackage ./../development/interpreters/python { };
inherit (pythonInterpreters)
python27
python39
python310
python311
python312
@@ -7655,7 +7648,6 @@ with pkgs;
# Python package sets.
python27Packages = python27.pkgs;
python39Packages = python39.pkgs;
python310Packages = python310.pkgs;
python311Packages = python311.pkgs;
python312Packages = recurseIntoAttrs python312.pkgs;
-2
View File
@@ -38,14 +38,12 @@ mapAliases ({
python2Packages = throw "do not use python2Packages when building Python packages, specify each used package as a separate argument"; # do not remove
python27Packages = throw "do not use python27Packages when building Python packages, specify each used package as a separate argument"; # do not remove
python3Packages = throw "do not use python3Packages when building Python packages, specify each used package as a separate argument"; # do not remove
python39Packages = throw "do not use python39Packages when building Python packages, specify each used package as a separate argument"; # do not remove
python310Packages = throw "do not use python310Packages when building Python packages, specify each used package as a separate argument"; # do not remove
python311Packages = throw "do not use python311Packages when building Python packages, specify each used package as a separate argument"; # do not remove
python312Packages = throw "do not use python312Packages when building Python packages, specify each used package as a separate argument"; # do not remove
python313Packages = throw "do not use python313Packages when building Python packages, specify each used package as a separate argument"; # do not remove
python2 = throw "do not use python2 when building Python packages, use the generic python parameter instead"; # do not remove
python3 = throw "do not use python3 when building Python packages, use the generic python parameter instead"; # do not remove
python39 = throw "do not use python39 when building Python packages, use the generic python parameter instead"; # do not remove
python310 = throw "do not use python310 when building Python packages, use the generic python parameter instead"; # do not remove
python311 = throw "do not use python311 when building Python packages, use the generic python parameter instead"; # do not remove
python312 = throw "do not use python312 when building Python packages, use the generic python parameter instead"; # do not remove