Always add conda dirs to default paths - #48
Open
amoeba wants to merge 1 commit into
Open
Conversation
Author
|
cc @kou |
Member
|
It seems that this is different changes from ruby-gnome/rubygems-requirements-system#27 ? |
kou
reviewed
Jul 24, 2026
Comment on lines
+366
to
+377
| conda_prefixes = [] | ||
| conda_prefixes << ENV["CONDA_PREFIX"] if ENV["CONDA_PREFIX"] | ||
| if ENV["CONDA_EXE"] | ||
| conda_base = File.dirname(File.dirname(ENV["CONDA_EXE"])) | ||
| conda_prefixes << conda_base | ||
| end | ||
| conda_prefixes.uniq.each do |prefix| | ||
| lib_pkgconfig = File.join(prefix, "lib", "pkgconfig") | ||
| share_pkgconfig = File.join(prefix, "share", "pkgconfig") | ||
| paths << lib_pkgconfig if File.directory?(lib_pkgconfig) | ||
| paths << share_pkgconfig if File.directory?(share_pkgconfig) | ||
| end |
Author
There was a problem hiding this comment.
Hrm. I think my approach here is wrong. I previously thought default_paths was nil but it's not,
(ruby:remote) native_pkg_config
#<Pathname:/opt/homebrew/bin/pkgconf>
(ruby:remote) default_paths
["/opt/homebrew/lib/pkgconfig",
"/opt/homebrew/share/pkgconfig",
"/usr/local/lib/pkgconfig",
"/usr/lib/pkgconfig",
"/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/26"]I thought this PR was fixing my issue but, now that I test again, it's not.
Maybe this PR can be closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related to ruby-gnome/rubygems-requirements-system#27.
When trying to install the red-arrow gem with rubygems-system-requirements, I get a pre-install hook error. That's fixed by ruby-gnome/rubygems-requirements-system#27. But then I also get an extconf error,
What happened before was that rubygems-system-requiements detected by system had conda on it, installed arrow-glib to my base conda prefix. Then the red-arrow gem's extconfig.rb depends on this gem which doesn't support that case.
This PR unconditionally adds the pkgconfig dirs from conda to the list of default paths, adding both the base dir and the dir from any currently activated envs. This PR along with ruby-gnome/rubygems-requirements-system#27 gets red-arrow installing correctly on my system.