Python: drop python.majorVersion
Drop `python.majorVersion`. For Python language version, use `python.pythonVersion`. For implementation version, use `python.sourceVersion`. Some expressions were broken. Those that were identified were fixed. fixup major
This commit is contained in:
@@ -39,8 +39,6 @@ with pkgs;
|
||||
pythonAtLeast = lib.versionAtLeast pythonVersion;
|
||||
pythonOlder = lib.versionOlder pythonVersion;
|
||||
inherit pythonForBuild;
|
||||
|
||||
majorVersion = pythonVersion; # Backwards compatibility. Should be dropped.
|
||||
};
|
||||
|
||||
in {
|
||||
|
||||
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
|
||||
preConfigure = ''
|
||||
# Fix for boost 1.67+
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "find_package(Boost)" "find_package(Boost 1.40 REQUIRED COMPONENTS python${builtins.replaceStrings ["."] [""] python.majorVersion})"
|
||||
--replace "find_package(Boost)" "find_package(Boost 1.40 REQUIRED COMPONENTS python${builtins.replaceStrings ["."] [""] python.pythonVersion})"
|
||||
for f in `find . -name CMakeLists.txt`; do
|
||||
substituteInPlace "$f" \
|
||||
--replace "boost_python" "\''${Boost_LIBRARIES}"
|
||||
|
||||
@@ -45,7 +45,7 @@ in buildPythonPackage rec {
|
||||
format = "wheel";
|
||||
|
||||
src = let
|
||||
pyVerNoDot = lib.strings.stringAsChars (x: if x == "." then "" else x) "${python.majorVersion}";
|
||||
pyVerNoDot = lib.strings.stringAsChars (x: if x == "." then "" else x) "${python.pythonVersion}";
|
||||
pyver = if stdenv.isDarwin then builtins.substring 0 1 pyVerNoDot else pyVerNoDot;
|
||||
platform = if stdenv.isDarwin then "mac" else "linux";
|
||||
unit = if cudaSupport then "gpu" else "cpu";
|
||||
|
||||
Reference in New Issue
Block a user