-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blender: fix wrapper script on case-sensitive filesystems #21990
Conversation
Is this still needed, now that we move to |
The shim was added in #18891 to provide a custom PYTHONPATH, so I doubt we can get rid of it. |
I’m asking because in a recent issue (which I’m not being able to find), there was talk of Blender making this wrapper itself, but since it relied on hardcoded paths, this shim was needed instead. With moving, that would presumably be fixed. I think I even pinged someone (likely @psibre) but did not get an answer. |
Thanks for the feedback! It does appear that in the meantime, the shim script is no longer necessary to run The only reservation I have is that I haven't tested this in a sandbox environment, and it's not unlikely that I have local configurations that somehow make this work on my machine for other reasons. |
It’s not. And since many of our CLI tools will be removed to be in homebrew instead, there’s even less of a reason.
Let’s drop the shim, then. I’d rather see not having it break later on and have to revert, than have it there and not be needed. |
@vitorgalvao I would absolutely agree. However I just ran an informal test, creating a small two-liner for blender: import bpy
print(bpy.app.version_string) Running this with the fixed shim script in this PR:
Then I removed the shim script from the cask: Casks/blender.rb | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/Casks/blender.rb b/Casks/blender.rb
index 0e8eee1..d0ea3c5 100644
--- a/Casks/blender.rb
+++ b/Casks/blender.rb
@@ -10,17 +10,5 @@ cask 'blender' do
# Renamed for consistency: app name is different in the Finder and in a shell.
app 'blender.app', target: 'Blender.app'
app 'blenderplayer.app', target: 'Blenderplayer.app'
- # shim script (https://github.com/caskroom/homebrew-cask/issues/18809)
- shimscript = "#{staged_path}/blenderwrapper"
- binary shimscript, target: 'blender'
-
- preflight do
- pythonversion = '3.4'
- File.open(shimscript, 'w') do |f|
- f.puts '#!/bin/bash'
- f.puts "export PYTHONHOME=#{Hbc.appdir}/Blender.app/Contents/Resources/#{version}/python/lib/python#{pythonversion}"
- f.puts "#{Hbc.appdir}/Blender.app/Contents/MacOS/blender $@"
- FileUtils.chmod '+x', f
- end
- end
+ binary "#{Hbc.appdir}/Blender.app/Contents/MacOS/blender"
end Upon which, sadly, running the test script fails:
Followed by the usual OSX crash popup window. So it looks like we still need the shim script after all, despite my earlier comments, and the optimistic documentation upstream... |
Alright, seems like we have to keep it, then. Thank you for looking further into it. Have you contacted upstream about the issue? |
@vitorgalvao I'm not sure if this really is the correct way to run |
That’s what I mean. Informing them their method doesn’t always work, and why, so they can fix it upstream (in which case everyone benefits, not just HBC users). |
fixes a regression introduced in 7aabd17