Why are most Python dependencies use depends_lib?

Mojca Miklavec mojca at macports.org
Fri Sep 7 09:08:13 UTC 2018


On Fri, 7 Sep 2018 at 10:39, Chih-Hsuan Yen <yan12125 at gmail.com> wrote:
>
> Hi all,
>
> In many Python libraries, depends_lib is used to store dependencies
> listed in install_requires of setup.py. According to MacPorts
> documents, depends_lib is for dependencies that are necessary for both
> build-time and run-time, and depends_run is for those required in
> run-time only. For most Python libraries, especially pure Python ones,
> the build step is just copying Python sources files to a build/
> directory, and dependencies are not checked. So, the question is: why
> depends_lib is used in these cases instead of depends_run?

My speculation is that:
- long time ago we had no depends_run (or at least I did not know
about it), so initially everything would be depends_lib anyway
- functionally there's absolutely no difference from the perspective
of the user being able to use a package
- in many cases nobody bothers checking or fixing those dependencies
- pypi2port would always give you depends_lib (I'm not even sure if
metainformation in python packages is able to distinguish between the
two, and even if it is, most python package authors would not bother
getting this right)

But note again that this is just my personal **speculation**.

Mojca


More information about the macports-dev mailing list