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