1{ stdenv 2, lib 3, buildPythonPackage 4, fetchFromGitHub 5, python 6, wheel 7}: 8 9buildPythonPackage rec { 10 pname = "setuptools"; 11 version = "68.2.2"; 12 format = "pyproject"; 13 14 src = fetchFromGitHub { 15 owner = "pypa"; 16 repo = "setuptools"; 17 rev = "refs/tags/v${version}"; 18 hash = "sha256-PpZbITlYp/cA+8jmObw8g69TK+oE9YEXD3NNJixExB4="; 19 }; 20 21 patches = [ 22 ./tag-date.patch 23 ./setuptools-distutils-C++.patch 24 ]; 25 26 nativeBuildInputs = [ 27 wheel 28 ]; 29 30 preBuild = lib.optionalString (!stdenv.hostPlatform.isWindows) '' 31 export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0 32 ''; 33 34 # Requires pytest, causing infinite recursion. 35 doCheck = false; 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${replaceStrings [ "." ] [ "-" ] version}"; 41 license = with licenses; [ mit ]; 42 platforms = python.meta.platforms; 43 maintainers = teams.python.members; 44 }; 45}