<div dir="ltr"><div><div><div><div>After considering @pcreech's point, +1 installing Pulp in {datadir} and having it install there using setup.cfg options. In terms of setting the PYTHONPATH at runtime, it would be best if we could have the Python code do it itself at startup. As an alternative we could do it with the systemd units, but then on other distros they would have to figure it out all again so by doing it in the processes themselves we would avoid that.<br><br>We still need to pick the PyPI names we would distribute with, but this would allow us to have all imports be:<br><br></div>from pulp import ....<br><br></div>or for plugins<br><br></div>from pulp_rpm import .....<br><br></div>-Brian<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 7, 2017 at 5:59 PM, Patrick Creech <span dir="ltr"><<a href="mailto:pcreech@redhat.com" target="_blank">pcreech@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've been doing some preliminary research into a 'Have our cake and eat it too' option.<br>
<br>
While getting back up to speed on things pulp, I came across this comment on the FPC ticket:<br>
<br>
    <a href="https://pagure.io/packaging-committee/issue/671#comment-146777" rel="noreferrer" target="_blank">https://pagure.io/packaging-<wbr>committee/issue/671#comment-<wbr>146777</a><br>
<br>
Buried towards the end of this comment, in the second to last paragraph, is a statement of interest<br>
from a packaging perspective:<br>
<br>
    "Moving the common library out of %{site_packages}/pulp and into, for instance,<br>
%{_datadir}/pulp_common/pulp will also fix the conflict".<br>
<br>
Something to consider, our Pulp project is not intended to be a general purpose system library.  It<br>
is for pulp purposes only (and pulp plugins).  With that, we don't necessarily need to live in site-<br>
packages.  FWIW, we do something similar with the SCL that was created.<br>
<br>
We will have to modify pulp tooling to either set PYTHONPATH (bash script) or sys.path (python<br>
script), but this allows us to keep 'import pulp' while preventing conflicts with the PuLP project.<br>
This also addresses the Fedora package collision by moving our files out of site-packages as well,<br>
removing the RPM file collision.<br>
<br>
After doing some reading on setuptools, we can specify "setup.py install" options in setup.cfg,<br>
allowing us to do this across various ways of distributing our software.<br>
<br>
The last piece is how pypi will treat this (as it was expressed to me that pip install pulp_project<br>
is of interest).  My initial reading seems to suggest this as 'just works' with the setup.cfg, but I<br>
would like to verify this.<br>
<br>
Thoughts?<br>
<span class="HOEnZb"><font color="#888888"><br>
Patrick<br>
<br>
</font></span><br>______________________________<wbr>_________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/pulp-dev</a><br>
<br></blockquote></div><br></div>