<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">Even if we managed to ship our the boost dynamic libraries with pip, it would still not be pip-like, as we would still need our python wrappers to set LIBTBX_BUILD and LD_LIBRARY_PATH. Normal pip packages work with the standard python exe.&nbsp;LD_LIBRARY_PATH, we could get around that by changing the way we compile, using&nbsp;-Wl,-R, which is the runtime equivalent of build time -L. That’s a significant change that would need to be tested. But there is no way around setting&nbsp;LIBTBX_BUILD right now. Leaving that to the user is horrible. Perhaps there is a way to hack libtbx/env_config.py so that we can hardwire LIBTBX_BUILD in there when pip installs?</div><div class=""><br class=""></div><div class="">Best wishes,</div><div class=""><br class=""></div><div class="">Luc</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 16 Aug 2019, at 22:47, Luc Bourhis &lt;<a href="mailto:luc_j_bourhis@mac.com" class="">luc_j_bourhis@mac.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">I did look into that many years ago, and even toyed with building a pip installer. What stopped me is the exact conclusion you reached too: the user would not have the pip experience he expects. You are right that it is a lot of effort but is it worth it? Considering that remark, I don’t think so. Now, Conda was created specifically to go beyond pip pure-python-only support. Since cctbx has garnered support for Conda, the best avenue imho is to go the extra length to have a package on <a href="http://anaconda.org/" class="">Anaconda.org</a>, and then to advertise it hard to every potential user out there.</div><div class=""><br class=""></div><div class="">Best wishes,</div><div class=""><br class=""></div><div class="">Luc</div><div class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 16 Aug 2019, at 21:45, Aaron Brewster &lt;<a href="mailto:asbrewster@lbl.gov" class="">asbrewster@lbl.gov</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class="">Hi, to avoid clouding Dorothee's documentation email thread, which I think is a highly useful enterprise, here's some thoughts about putting cctbx into pip.&nbsp; Pip doesn't install non-python dependencies well.&nbsp; I don't think boost is available as a package on pip (at least the package version we use).&nbsp; wxPython4 isn't portable through pip (<a href="https://wiki.wxpython.org/How%20to%20install%20wxPython#Installing_wxPython-Phoenix_using_pip" class="">https://wiki.wxpython.org/How%20to%20install%20wxPython#Installing_wxPython-Phoenix_using_pip</a>).&nbsp; MPI libraries are system dependent.&nbsp; If cctbx were a pure python package, pip would be fine, but cctbx is not.</div><div dir="ltr" class=""><br class=""></div><div dir="ltr" class="">All that said, we could build a&nbsp;manylinux1 version of cctbx and upload it to PyPi (I'm just learning about this).&nbsp; For a pip package to be portable (which is a requirement for cctbx), it needs to conform to PEP513, the manylinux1 standard (<a href="https://www.python.org/dev/peps/pep-0513/" class="">https://www.python.org/dev/peps/pep-0513/</a>).&nbsp; For example, numpy is built according to this standard (see&nbsp;<a href="https://pypi.org/project/numpy/#files" class="">https://pypi.org/project/numpy/#files</a>, where you'll see the manylinux1 wheel).&nbsp; Note, the manylinux1 standard is built with Centos 5.11 which we no longer support.&nbsp;&nbsp;</div><div dir="ltr" class=""><br class=""></div><div class="">There is also a manylinux2010 standard, which is based on Centos 6 (<a href="https://www.python.org/dev/peps/pep-0571/" class="">https://www.python.org/dev/peps/pep-0571/</a>).&nbsp; This is likely a more attainable target (note though by default C++11 is not supported on Centos 6).</div><div dir="ltr" class=""><br class=""></div><div dir="ltr" class="">If we built a manylinuxX version of cctbx and uploaded it to PyPi, the user would need all the non-python dependencies.&nbsp; There's no way to specify these in pip.&nbsp; For example, cctbx requires boost 1.63 or better.&nbsp; The user will need to have it in a place their python can find it, or we could package it ourselves and supply it, similar to how the pip h5py package now comes with an hd5f library, or how the pip numpy package includes an openblas library.&nbsp; We'd have to do the same for any packages we depend on that aren't on pip using the manylinux standards, such as wxPython4.</div><div class=""><br class=""></div><div class="">Further, we need to think about how dials and other cctbx-based packages interact.&nbsp; If pip install cctbx is set up, how does pip install dials work, such that any dials shared libraries can find the cctbx libraries?&nbsp; Can shared libraries from one pip package link against libraries in another pip package?&nbsp; Would each package need to supply its own boost?&nbsp; Possibly this is well understood in the pip field, but not by me :)</div><div class=""><br class=""></div><div class="">Finally, there's the option of providing a source pip package.&nbsp; This would require the full compiler toolchain for any given platform (macOS, linux, windows).&nbsp; These are likely available for developers, but not for general users.</div><div class=""><br class=""></div><div class="">Anyway, these are some of the obstacles.&nbsp; Not saying it isn't possible, it's just a lot of effort.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">-Aaron</div><div dir="ltr" class=""><br class=""></div></div>
_______________________________________________<br class="">cctbxbb mailing list<br class=""><a href="mailto:cctbxbb@phenix-online.org" class="">cctbxbb@phenix-online.org</a><br class=""><a href="http://phenix-online.org/mailman/listinfo/cctbxbb" class="">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br class=""></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">cctbxbb mailing list<br class=""><a href="mailto:cctbxbb@phenix-online.org" class="">cctbxbb@phenix-online.org</a><br class="">http://phenix-online.org/mailman/listinfo/cctbxbb<br class=""></div></blockquote></div><br class=""></div></body></html>