1{
2 stdenv,
3 lib,
4 buildPythonPackage,
5 fetchFromGitHub,
6 python,
7 wheel,
8}:
9
10buildPythonPackage rec {
11 pname = "setuptools";
12 version = "69.5.1";
13 format = "pyproject";
14
15 src = fetchFromGitHub {
16 owner = "pypa";
17 repo = "setuptools";
18 rev = "refs/tags/v${version}";
19 hash = "sha256-X0ntFlDIhUjxtWzz0LxybQSuxhRpHlMeBYtOGwqDl4A=";
20 };
21
22 patches = [
23 ./tag-date.patch
24 ./setuptools-distutils-C++.patch
25 ];
26
27 nativeBuildInputs = [ wheel ];
28
29 preBuild = lib.optionalString (!stdenv.hostPlatform.isWindows) ''
30 export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0
31 '';
32
33 # Requires pytest, causing infinite recursion.
34 doCheck = false;
35
36 meta = with lib; {
37 description = "Utilities to facilitate the installation of Python packages";
38 homepage = "https://github.com/pypa/setuptools";
39 changelog = "https://setuptools.pypa.io/en/stable/history.html#v${
40 replaceStrings [ "." ] [ "-" ] version
41 }";
42 license = with licenses; [ mit ];
43 platforms = python.meta.platforms;
44 maintainers = teams.python.members;
45 };
46}