python3Packages.setuptools_80: init at 80.10.2

81 is the last version with pkg_resources module.
80 is the last version with dry_run arg in copy_file function.
This commit is contained in:
Martin Weinelt 2026-05-12 03:27:01 +02:00
commit a03725a6c6
2 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,56 @@
{
stdenv,
lib,
buildPythonPackage,
distutils_80,
fetchFromGitHub,
python,
}:
buildPythonPackage (finalAttrs: {
pname = "setuptools";
version = "80.10.2";
pyproject = true;
src = fetchFromGitHub {
owner = "pypa";
repo = "setuptools";
tag = "v${finalAttrs.version}";
hash = "sha256-kf2c4auQrZDGW8bM0SxOPFsR8IE4b0coevTxKWGtHp8=";
};
patches = [
./reproducible-wheel.patch
];
# Drop dependency on coherent.license, which in turn requires coherent.build
postPatch = ''
sed -i "/coherent.licensed/d" pyproject.toml
# Substitute version for reproducible builds
substituteInPlace setuptools/version.py \
--replace-fail '@version@' '${finalAttrs.version}'
'';
preBuild = lib.optionalString (!stdenv.hostPlatform.isWindows) ''
export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0
'';
# Requires pytest, causing infinite recursion.
doCheck = false;
passthru.tests = {
inherit distutils_80;
};
meta = {
description = "Utilities to facilitate the installation of Python packages";
homepage = "https://github.com/pypa/setuptools";
changelog = "https://setuptools.pypa.io/en/stable/history.html#v${
lib.replaceString "." "-" finalAttrs.version
}";
license = with lib.licenses; [ mit ];
platforms = python.meta.platforms;
teams = [ lib.teams.python ];
};
})

View file

@ -27,6 +27,8 @@ self: super: with self; {
setuptools = callPackage ../development/python-modules/setuptools { };
setuptools_80 = callPackage ../development/python-modules/setuptools/80.nix { };
# by_regex ensures inherit statements are sorted after the (first) attribute name that is inherited.
# keep-sorted start block=yes newline_separated=yes by_regex=["(?:inherit\\s+\\([^)]+\\)\\n?\\s*)?(.+)"]
a2a-sdk = callPackage ../development/python-modules/a2a-sdk { };