blender: install with python3Packages.requests, fixes #97250 #118987
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
Fixes #97250.
Some popular add-ons need
python3Packages.requests
(eg. BlenderBIM).It could be provided with
nix-shell -p python3Packages.requests --run blender
because the wrapper only prepend toPYTHONPATH
instead of setting it, but still it's a better user-experience to just have this dependency bundled by default.There was also an attempt to wrap blender in a separate derivation in #97388 which could be resurrected.
Things done
requests
can now be imported from the console and by add-ons, including its dependencies becausebuildPythonPath
is now used.I'm not setting
PYTHON_REQUESTS_PATH
becauseWITH_PYTHON_INSTALL_REQUESTS=OFF
, and I guess settingPYTHON_NUMPY_PATH
is useless as well but I'm not removing it, howeverPYTHON_NUMPY_INCLUDE_DIRS
would likely still be needed becauseWITH_PYTHON_NUMPY=ON
.FIXME
When running the "Render presets thumbs" of the community module Archipack, the
No module named 'numpy'
error is still raised without my knowing why. That kind of error was previously mentioned here #82337 but believed to be fixed in #82341.sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)