Skip to content

Commit

Permalink
Merge pull request #59 from julianneswinoga/jswinoga/fix/23-py36-ensu…
Browse files Browse the repository at this point in the history
…repip

Fix ensurepip segfault for 3.6, add ensurepip test
  • Loading branch information
domenkozar authored Oct 17, 2024
2 parents 0f2f8b7 + 12d05c5 commit 0024a77
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@
})];
});
}
# Fix ensurepip for 3.6: https://bugs.python.org/issue45700
{ condition = version: versionInBetween version "3.6.15" "3.6";
override = pkg: pkg.overrideAttrs (old: {
patches = old.patches ++ [(pkgs.fetchpatch {
url = "https://github.com/python/cpython/commit/8766cb74e186d3820db0a855.patch";
sha256 = "IzAp3M6hpSNcbVRttzvXNDyAVK7vLesKZDEDkdYbuww=";
})
(pkgs.fetchpatch {
url = "https://github.com/python/cpython/commit/f0be4bbb9b3cee876249c23f.patch";
sha256 = "FUF7ZkkatS4ON4++pR9XJQFQLW1kKSVzSs8NAS19bDY=";
})];
});
}
{ condition = version: versionInBetween version "3.4" "3.0";
override = pkg: (pkg.override {
# no existing patch available
Expand Down Expand Up @@ -215,6 +228,13 @@
mkdir $out
${python}/bin/python -c 'import ssl; print(ssl.OPENSSL_VERSION)' | tee $out/openssl-version
'';
} // lib.optionalAttrs (versionInBetween version "3.12" "3.6") {
${version + "-ensurepip"} = pkgs.runCommand "${version}-test-ensurepip" { } ''
set -x
mkdir $out
${python}/bin/python -m ensurepip --help | tee $out/ensurepip-help
'';
}) self.packages.${system});
};
}

0 comments on commit 0024a77

Please sign in to comment.