Skip to content

Commit

Permalink
Merge pull request #1211 from pbsds/bpo-36707
Browse files Browse the repository at this point in the history
preferWheels improvements
  • Loading branch information
adisbladis authored Jul 11, 2023
2 parents 4865e14 + 571b966 commit 6711e2f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pep425.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ let
tags = [ "cp" "py" ];
in
{ inherit major minor tags; };
abiTag = "cp${pythonVer.major}${pythonVer.minor}m";
# Builds with and without pymalloc (m) are ABI compatible since python 3.8 (bpo-36707)
abiTag = "cp${pythonVer.major}${pythonVer.minor}"
+ lib.optionalString (builtins.compareVersions python.version "3.8" < 0) "m";

#
# Parses wheel file returning an attribute set
Expand Down Expand Up @@ -95,7 +97,7 @@ let
then
# See PEP 600 for details.
(p:
builtins.match "any|manylinux(1|2010|2014)_${escapeRegex targetMachine}|manylinux_[0-9]+_[0-9]+_${escapeRegex targetMachine}" p != null
builtins.match "any|(linux|manylinux(1|2010|2014))_${escapeRegex targetMachine}|manylinux_[0-9]+_[0-9]+_${escapeRegex targetMachine}" p != null
)
else
(p: p == "any")
Expand All @@ -116,7 +118,7 @@ let
choose = files:
let
osxMatches = [ "12_0" "11_0" "10_15" "10_14" "10_12" "10_11" "10_10" "10_9" "10_8" "10_7" "any" ];
linuxMatches = [ "manylinux1_" "manylinux2010_" "manylinux2014_" "manylinux_" "any" ];
linuxMatches = [ "manylinux1_" "manylinux2010_" "manylinux2014_" "manylinux_" "linux_" "any" ];
chooseLinux = x: lib.take 1 (findBestMatches linuxMatches x);
chooseOSX = x: lib.take 1 (findBestMatches osxMatches x);
in
Expand Down

0 comments on commit 6711e2f

Please sign in to comment.