Unverified Commit dd8ce7bd authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

pythonInterpreters: Add passthru.pythonABITags (#445140)

parents a49eb716 3e6a5988
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -87,6 +87,10 @@ let
      pythonOnBuildForTarget = pkgsBuildTarget.${pythonAttr};
      pythonOnHostForHost = pkgsHostHost.${pythonAttr};
      pythonOnTargetForTarget = pkgsTargetTarget.${pythonAttr} or { };
      pythonABITags = [
        "none"
        "cp${sourceVersion.major}${sourceVersion.minor}"
      ];
    }
    // {
      inherit ucsEncoding;
+6 −0
Original line number Diff line number Diff line
@@ -195,6 +195,12 @@ let
        pythonOnHostForHost
        pythonOnTargetForTarget
        ;

      pythonABITags = [
        "abi3"
        "none"
        "cp${sourceVersion.major}${sourceVersion.minor}${lib.optionalString (!enableGIL) "t"}"
      ];
    };

  version = with sourceVersion; "${major}.${minor}.${patch}${suffix}";
+2 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
  pythonOnHostForHost,
  pythonOnTargetForTarget,
  pythonAttr ? null,
  pythonABITags ? [ "none" ],
  self, # is pythonOnHostForTarget
}:
let
@@ -141,6 +142,7 @@ rec {
  pythonOlder = lib.versionOlder pythonVersion;
  inherit hasDistutilsCxxPatch;
  inherit pythonOnBuildForHost;
  inherit pythonABITags;

  tests = callPackage ./tests.nix {
    python = self;
+5 −0
Original line number Diff line number Diff line
@@ -67,6 +67,11 @@ let
    pythonOnBuildForTarget = pkgsBuildTarget.${pythonAttr};
    pythonOnHostForHost = pkgsHostHost.${pythonAttr};
    pythonOnTargetForTarget = pkgsTargetTarget.${pythonAttr} or { };

    pythonABITags = [
      "none"
      "pypy${lib.concatStrings (lib.take 2 (lib.splitString "." pythonVersion))}_pp${sourceVersion.major}${sourceVersion.minor}"
    ];
  };
  pname = passthru.executable;
  version = with sourceVersion; "${major}.${minor}.${patch}";
+5 −0
Original line number Diff line number Diff line
@@ -48,6 +48,11 @@ let
    pythonOnBuildForTarget = throw "${pname} does not support cross compilation";
    pythonOnHostForHost = throw "${pname} does not support cross compilation";
    pythonOnTargetForTarget = throw "${pname} does not support cross compilation";

    pythonABITags = [
      "none"
      "pypy${lib.concatStrings (lib.take 2 (lib.splitString "." pythonVersion))}_pp${sourceVersion.major}${sourceVersion.minor}"
    ];
  };
  pname = "${passthru.executable}_prebuilt";
  version = with sourceVersion; "${major}.${minor}.${patch}";
Loading