diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2020-03-08 08:11:01 +0100 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2020-03-08 08:11:01 +0100 |
commit | 0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778 (patch) | |
tree | 6f41b6c4ec4f9dd918fe596b8ac0683799ee277f /pkgs/development/python-modules/setuptools/44.0.nix | |
parent | 6b6f9d769a5086df38a06b680104d0c5fd1a8e0e (diff) | |
parent | fed080b772e1d8679db383488cf2f80f0288c54b (diff) | |
download | nixlib-0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778.tar nixlib-0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778.tar.gz nixlib-0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778.tar.bz2 nixlib-0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778.tar.lz nixlib-0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778.tar.xz nixlib-0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778.tar.zst nixlib-0eb0ddc4dbe3cd5415c6b6e657538eb809fc3778.zip |
Merge staging-next into master
Diffstat (limited to 'pkgs/development/python-modules/setuptools/44.0.nix')
-rw-r--r-- | pkgs/development/python-modules/setuptools/44.0.nix | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/setuptools/44.0.nix b/pkgs/development/python-modules/setuptools/44.0.nix new file mode 100644 index 000000000000..194b90cb42ad --- /dev/null +++ b/pkgs/development/python-modules/setuptools/44.0.nix @@ -0,0 +1,74 @@ +{ stdenv +, buildPythonPackage +, fetchFromGitHub +, python +, wrapPython +, unzip +, callPackage +, bootstrapped-pip +, lib +, pipInstallHook +, setuptoolsBuildHook +}: + +let + pname = "setuptools"; + version = "44.0.0"; + + # Create an sdist of setuptools + sdist = stdenv.mkDerivation rec { + name = "${pname}-${version}-sdist.tar.gz"; + + src = fetchFromGitHub { + owner = "pypa"; + repo = pname; + rev = "v${version}"; + sha256 = "0z3q0qinyp1rmnxkw3y5f6nbsxhqlfq5k7skfrqa6ymb3zr009y1"; + name = "${pname}-${version}-source"; + }; + + buildPhase = '' + ${python.pythonForBuild.interpreter} bootstrap.py + ${python.pythonForBuild.interpreter} setup.py sdist --formats=gztar + ''; + + installPhase = '' + echo "Moving sdist..." + mv dist/*.tar.gz $out + ''; + }; +in buildPythonPackage rec { + inherit pname version; + # Because of bootstrapping we don't use the setuptoolsBuildHook that comes with format="setuptools" directly. + # Instead, we override it to remove setuptools to avoid a circular dependency. + # The same is done for pip and the pipInstallHook. + format = "other"; + + src = sdist; + + nativeBuildInputs = [ + bootstrapped-pip + (pipInstallHook.override{pip=null;}) + (setuptoolsBuildHook.override{setuptools=null; wheel=null;}) + ]; + + preBuild = lib.strings.optionalString (!stdenv.hostPlatform.isWindows) '' + export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0 + ''; + + pipInstallFlags = [ "--ignore-installed" ]; + + # Adds setuptools to nativeBuildInputs causing infinite recursion. + catchConflicts = false; + + # Requires pytest, causing infinite recursion. + doCheck = false; + + meta = with stdenv.lib; { + description = "Utilities to facilitate the installation of Python packages"; + homepage = https://pypi.python.org/pypi/setuptools; + license = with licenses; [ psfl zpl20 ]; + platforms = python.meta.platforms; + priority = 10; + }; +} |