Merge pull request #196400 from Mic92/pypy
pypy39: fix executable name for 3.9
This commit is contained in:
commit
b7448d9018
1 changed files with 3 additions and 1 deletions
|
@ -23,11 +23,12 @@ with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
isPy3k = substring 0 1 pythonVersion == "3";
|
isPy3k = substring 0 1 pythonVersion == "3";
|
||||||
|
isPy39OrNewer = versionAtLeast pythonVersion "3.9";
|
||||||
passthru = passthruFun {
|
passthru = passthruFun {
|
||||||
inherit self sourceVersion pythonVersion packageOverrides;
|
inherit self sourceVersion pythonVersion packageOverrides;
|
||||||
implementation = "pypy";
|
implementation = "pypy";
|
||||||
libPrefix = "pypy${pythonVersion}";
|
libPrefix = "pypy${pythonVersion}";
|
||||||
executable = "pypy${if isPy3k then "3" else ""}";
|
executable = "pypy${if isPy39OrNewer then lib.versions.majorMinor pythonVersion else if isPy3k then "3" else ""}";
|
||||||
sitePackages = "site-packages";
|
sitePackages = "site-packages";
|
||||||
hasDistutilsCxxPatch = false;
|
hasDistutilsCxxPatch = false;
|
||||||
inherit pythonAttr;
|
inherit pythonAttr;
|
||||||
|
@ -148,6 +149,7 @@ in with passthru; stdenv.mkDerivation rec {
|
||||||
cp -R {include,lib_pypy,lib-python,${executable}-c} $out/${executable}-c
|
cp -R {include,lib_pypy,lib-python,${executable}-c} $out/${executable}-c
|
||||||
cp lib${executable}-c${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/
|
cp lib${executable}-c${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/
|
||||||
ln -s $out/${executable}-c/${executable}-c $out/bin/${executable}
|
ln -s $out/${executable}-c/${executable}-c $out/bin/${executable}
|
||||||
|
${optionalString isPy39OrNewer "ln -s $out/bin/${executable}-c $out/bin/pypy3"}
|
||||||
|
|
||||||
# other packages expect to find stuff according to libPrefix
|
# other packages expect to find stuff according to libPrefix
|
||||||
ln -s $out/${executable}-c/include $out/include/${libPrefix}
|
ln -s $out/${executable}-c/include $out/include/${libPrefix}
|
||||||
|
|
Loading…
Reference in a new issue