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