Implement "print-search-dirs" argument #16
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.
Implement
print-search-dirs
argument to list (currently)install
"binary" script and the searchlibraries
(required bylibtool
when building shared libraries (https://git.savannah.gnu.org/cgit/libtool.git/tree/m4/libtool.m4?id=33615a45a6926666f95da8a0dc28fc9a8c62d117#n2320)). This argument requires the presence of a Windows <-> Unix path tool to be present to be used to convert, for e.g.,LIB
environment variable with Windows libraries search paths to its equivalent in the Unix system it is running on (e.g. Cygwin with native Windows or Linux with Wine). It can be either guessed from the current Unix system or set using theCCCL_WINPATH_BIN
environment variable.The operations of
print-search-dirs
require the manipulation of Windows paths, namely separating the Windows path prefix from the path, to shorten the Unix version of the path, and parsing the Windows path prefix from the path is a bit tedious. So, I relied on Python'spathlib
'sPureWindowsPath
(and alsoPurePosixPath
for manipulating Unix paths) to resolve this issue without implementing this functionality in pure Bash scripting. However, I would have to add a Python requirement to the script as well, withCCCL_PYTHON_BIN
environment variable to set it to a custom Python installation path or resolved from thePATH
environment variable. Though recent versions of Linux or Cygwin installation already comes with Python (even native Windows Python should work in this case), and Python is being as available by default as Perl. Also, the library I require, which ispathlib
, is already part of the standard library of recent Python versions.