Skip to content

Commit

Permalink
python.pkgs.bootstrapped-pip: upgrade pkg_resources, fixes #26392
Browse files Browse the repository at this point in the history
pip 9.0.1 vendors a version of setuptools/pkg_resources which has been
fixed in setuptools/pkg_resources but not yet in pip. Because we're now
facing this issue with nox, we update pkg_resources to the version we
also have in setuptools. Let's cross our fingers this will work without
breaking other stuff.
  • Loading branch information
FRidh committed Jun 7, 2017
1 parent 1aac1fe commit 3b83c23
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion pkgs/development/python-modules/bootstrapped-pip/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, python, fetchPypi, makeWrapper, unzip }:
{ stdenv, python, fetchPypi, fetchurl, makeWrapper, unzip }:

let
wheel_source = fetchPypi {
Expand All @@ -13,6 +13,15 @@ let
format = "wheel";
sha256 = "f2900e560efc479938a219433c48f15a4ff4ecfe575a65de385eeb44f2425587";
};

# TODO: Shouldn't be necessary anymore for pip > 9.0.1!
# https://github.com/NixOS/nixpkgs/issues/26392
# https://github.com/pypa/setuptools/issues/885
pkg_resources = fetchurl {
url = https://raw.githubusercontent.com/pypa/setuptools/v36.0.1/pkg_resources/__init__.py;
sha256 = "1wdnq3mammk75mifkdmmjx7yhnpydvnvi804na8ym4mj934l2jkv";

This comment has been minimized.

Copy link
@Mic92

Mic92 Sep 14, 2017

Member

This checksum changed for some strange reason: 02y99jskkp72m4j12qbdc8gwni5fy8vbmzdz0isgf4k6n330qxjh

This comment has been minimized.

Copy link
@FRidh

FRidh Sep 14, 2017

Author Member

You sure its not commit a26ae76? I did not change a hash there because I suppose it did not change.

This comment has been minimized.

Copy link
@Mic92

Mic92 Sep 14, 2017

Member

ah right.

This comment has been minimized.

Copy link
@FRidh

FRidh Oct 7, 2017

Author Member

@Mic92 you were correct, it did change...

This comment has been minimized.

Copy link
@FRidh

FRidh Oct 7, 2017

Author Member

but in a26ae76, see #30158

};

in stdenv.mkDerivation rec {
pname = "pip";
version = "9.0.1";
Expand All @@ -29,6 +38,8 @@ in stdenv.mkDerivation rec {
unzip -d $out/${python.sitePackages} $src
unzip -d $out/${python.sitePackages} ${setuptools_source}
unzip -d $out/${python.sitePackages} ${wheel_source}
# TODO: Shouldn't be necessary anymore for pip > 9.0.1!
cp ${pkg_resources} $out/${python.sitePackages}/pip/_vendor/pkg_resources/__init__.py
'';

patchPhase = ''
Expand Down

1 comment on commit 3b83c23

@bjornfor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Please sign in to comment.