Open ccoulombe opened 2 years ago
HI, @ccoulombe Thanks for your PR!
The current will not work when :
Very robust, as this is only a complement and does not hurt to have this extra path.
$ORIGIN
always point to the origin of the library and since pysam
is required to be installed along pairtools
, the required libraries will always be at $PWD/../..pysam
when installed in user-space or in a virtual environment since pip install packages in : lib/pythonX.Y/site-packages
( and pysam libraries live in the installation directory).
Obviously, this does not apply when the packages are installed system-wide, in which case the linker should be able to find the pysam
libraries from its config (e.g. another system-wide path).
In the end, this only add flexibility and make the package installable in different environment by not using hard coded paths.
Pysam include library directory and set libraries instead of providing full path. Set rpath so libs are found when installed in a virtual environment or in user-space.
This allow to use pairtools in different environment and find libs at runtime instead of having them hardcoded at build time.