Why are most Python dependencies use depends_lib?

Mojca Miklavec mojca at macports.org
Sat Sep 8 05:59:10 UTC 2018


On Sat, 8 Sep 2018 at 06:17, Ryan Schmidt wrote:
> On Sep 7, 2018, at 22:08, Chih-Hsuan Yen wrote:
>
> > Thank you both for explanations and reasoning! As depends_run and
> > depends_lib are practically the same for Python ports, how about
> > moving all ports to either depends_lib or depends_run gradually?
> > Having two patterns hurts my eyes :D
> >
> > If we are moving to depends_run, just remember to keep non-Python
> > dependencies in depends_lib for Python packages with C extensions. For
> > example, in py-openssl, path:lib/libssl.dylib:openssl should be kept
> > in depends_lib and port:py${python.version}-cryptography and
> > port:py${python.version}-six can be moved to depends_run.
>
> I do not know enough about Python to confirm whether such a mass change would be appropriate. I thought some Python modules are compiled. If one compiled Python module depends on another compiled Python module, probably it does so at build time, not just at runtime; in other words, depends_lib would be correct for that case.

Indeed. While mass change is feasible, it should only be done if we
test one-by-one port (even if using some scripting to iterate through
ports), and for each port test whether a port can be compiled and
installed/destrooted without having a particular dependency available.
If that is the case, the dependency could be moved to depends_run.

To me it sounds correct to move dependencies from depends_lib to
depends_run, but only if they are not needed during build time. I
would probably not volunteer for that task though since it takes quite
some time to get this right and there is not so much advantage other
than consistency.

Mojca


More information about the macports-dev mailing list