<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Feb 7, 2019, at 8:05 PM, Joshua Root <<a href="mailto:jmr@macports.org" class="">jmr@macports.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">On 2019-2-8 13:59 , Casey Deccio wrote:</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class=""><br class=""><blockquote type="cite" class="">On Feb 7, 2019, at 7:03 PM, Joshua Root <<a href="mailto:jmr@macports.org" class="">jmr@macports.org</a>> wrote:<br class=""><br class="">BTW Gmail decided my reply was spam; sending only to the list this time<br class="">so Casey might actually see it...<br class=""></blockquote><br class="">Much appreciated :)<br class=""><br class=""><blockquote type="cite" class="">On 2019-2-8 13:00 , Joshua Root wrote:<br class=""><blockquote type="cite" class=""><br class="">Ctypes uses dlopen behind the scenes, and if you look at dlopen's man<br class="">page, it only searches a small set of fallback paths when the full path<br class="">to the library is not supplied, most of which are controlled by<br class="">environment variables. So I would say that py-libnacl should be passing<br class="">the full path to libnacl to ctypes.cdll.LoadLibrary.<br class=""></blockquote></blockquote><br class="">Thanks for the feedback! I figured it should have that path provided somehow. So, should an issue/pull request be filed with the py-libnacl port then? Where is the right place for the path to be provided?<br class=""></blockquote><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">The call is in libnacl/__init__.py. I'd patch in a placeholder and use</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">reinplace to insert the value of $prefix.</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""></div></blockquote><div class=""><br class=""></div>Thanks! So would it be better for the patch to try first the hard-coded location (i.e., hardcoded with ${prefix}) then via relative name/search or just the hardcoded?</div><div class=""><br class=""></div><div class="">That is,</div><div class=""><br class=""></div><div class="">$ git diff<br class="">diff --git a/libnacl/__init__.py b/libnacl/__init__.py<br class="">index 1b037ac..c2c321a 100644<br class="">--- a/libnacl/__init__.py<br class="">+++ b/libnacl/__init__.py<br class="">@@ -34,7 +34,7 @@ def _get_nacl():<br class=""> raise OSError(msg)<br class=""> elif sys.platform.startswith('darwin'):<br class=""> try:<br class="">- return ctypes.cdll.LoadLibrary('libsodium.dylib')<br class="">+ return ctypes.cdll.LoadLibrary(os.path.join('@@PREFIX@@', 'libsodium.dylib'))<br class=""> except OSError:<br class=""> pass<br class=""> try:<br class=""><br class="">vs.</div><div class=""><br class=""></div><div class="">$ git diff<br class="">diff --git a/libnacl/__init__.py b/libnacl/__init__.py<br class="">index 1b037ac..648f885 100644<br class="">--- a/libnacl/__init__.py<br class="">+++ b/libnacl/__init__.py<br class="">@@ -37,6 +37,10 @@ def _get_nacl():<br class=""> return ctypes.cdll.LoadLibrary('libsodium.dylib')<br class=""> except OSError:<br class=""> pass<br class="">+ try:<br class="">+ return ctypes.cdll.LoadLibrary(os.path.join('@@PREFIX@@', 'libsodium.dylib'))<br class="">+ except OSError:<br class="">+ pass<br class=""> try:<br class=""> libidx = __file__.find('lib')<br class=""> if libidx > 0:<br class=""><br class="">Casey</div></div></body></html>