On 6/27/18, 12:28 AM, "Ryan Schmidt" <[email protected]> wrote:





    On Jun 26, 2018, at 10:07, Langer, Stephen A. (Fed) wrote:



    > That's what I don't understand.   When not using MacPorts, we use 
install_name_tool to fix the libraries.  They're built in 
$HOME/project/build/{lib, include, etc} and moved to $PREFIX /{lib, include, 
etc}, at which point install_name_tool fixes their ids.



    Can you not pass the correct -install_name=$PREFIX/lib/libsomething.dylib 
flag when you link it, and thus avoid needing to use install_name_tool later?



It requires knowing the installation prefix during the distutils build stage, 
which certainly can be done, but I don't think it's standard in the distutils 
world.  At least, the prefix isn't accessible to the build_ext command in the 
python 2.7 distutils.  The easiest solution would be for the distutils 
build_ext command to copy the value from the distutils install command, but 
that requires them to be run together in the MacPorts build phase, which breaks 
the MacPorts model.  It could be set twice, once as a build argument and once 
as an install argument, which is ugly but might work.  I'll try it.



Thanks.

  -- Steve

Reply via email to