-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add utility for add library to environment variable using anchor #9
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #9 +/- ##
===========================================
- Coverage 100.00% 94.32% -5.68%
===========================================
Files 2 2
Lines 144 194 +50
===========================================
+ Hits 144 183 +39
- Misses 0 11 +11
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
std::set<std::string> libraries_with_fullpath; | ||
for (auto it = library_names.begin(); it != library_names.end();) | ||
{ | ||
if (boost::filesystem::exists(*it)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also check to make sure the file is an absolute path using boost::filesystem::is_absolute()
setenv(search_libraries_env.c_str(), search_libraries_env_var_str.c_str(), 1); | ||
setenv(search_paths_env.c_str(), search_paths_env_var_str.c_str(), 1); | ||
setenv(search_libraries_env.c_str(), search_libraries_env_var_str.c_str(), 1); | ||
setenv(search_paths_env.c_str(), search_paths_env_var_str.c_str(), 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't be updating the search paths, we should use absolute paths for the libraries. Adding the entire path to be searched may have unpredictable results.
@marip8 is working on splitting this up so the plugin loader only deals with absolute paths and there is a secondary class which is provided that does the searching and generation of the the list of library absolute paths. This way in Tesseract we can have a compile def which switches the way we locate plugins for the python wheel. |
@marip8 Have you taken a shot at the new interface? |
No I haven't had a chance to look into it much yet |
This functionality is to support python wheels and is ported from this PR