Merge pull request #326044 from amarshall/blender-correct-python-version

This commit is contained in:
Sandro 2024-07-12 11:25:12 +02:00 committed by GitHub
commit eb76ed546a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View File

@ -198,6 +198,17 @@ stdenv.mkDerivation (finalAttrs: {
"-DWITH_CYCLES_DEVICE_OPTIX=ON"
];
preConfigure = ''
(
expected_python_version=$(grep -E --only-matching 'set\(_PYTHON_VERSION_SUPPORTED [0-9.]+\)' build_files/cmake/Modules/FindPythonLibsUnix.cmake | grep -E --only-matching '[0-9.]+')
actual_python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[0:2])))')
if ! [[ "$actual_python_version" = "$expected_python_version" ]]; then
echo "wrong Python version, expected '$expected_python_version', got '$actual_python_version'" >&2
exit 1
fi
)
'';
nativeBuildInputs =
[
cmake

View File

@ -29554,6 +29554,7 @@ with pkgs;
blender = callPackage ../applications/misc/blender {
openexr = openexr_3;
python3Packages = python311Packages;
inherit (darwin.apple_sdk.frameworks) Cocoa CoreGraphics ForceFeedback OpenAL OpenGL;
};