1{
2 stdenv,
3 lib,
4 buildPythonPackage,
5 distutils,
6 fetchFromGitHub,
7 python,
8 wheel,
9}:
10
11buildPythonPackage rec {
12 pname = "setuptools";
13 version = "75.1.1";
14 format = "pyproject";
15
16 src = fetchFromGitHub {
17 owner = "pypa";
18 repo = "setuptools";
19 rev = "refs/tags/v${version}";
20 hash = "sha256-b8O/DrDWAbD6ht9M762fFN6kPtV8hAbn1gAN9SS7H5g=";
21 };
22
23 patches = [
24 ./tag-date.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 passthru.tests = {
37 inherit distutils;
38 };
39
40 meta = with lib; {
41 description = "Utilities to facilitate the installation of Python packages";
42 homepage = "https://github.com/pypa/setuptools";
43 changelog = "https://setuptools.pypa.io/en/stable/history.html#v${
44 replaceStrings [ "." ] [ "-" ] version
45 }";
46 license = with licenses; [ mit ];
47 platforms = python.meta.platforms;
48 maintainers = teams.python.members;
49 };
50}