Advice on distributing a project

Langer, Stephen A. (Fed) stephen.langer at nist.gov
Wed Jun 27 18:47:47 UTC 2018





On 6/27/18, 12:28 AM, "Ryan Schmidt" <ryandesign at macports.org> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20180627/13ac9b20/attachment.html>


More information about the macports-users mailing list