Wednesday, 22 May 2019

What does distutils do with the "requires" metadata?

From the distutils docs:

Dependencies on other Python modules and packages can be specified by supplying the requires keyword argument to setup().

For example the python-gflags distribution uses distutils and specifies a dependency on six:

https://github.com/google/python-gflags/blob/master/setup.py#L43

Yet, unlike setuptools' install_requires deps, installing python-gflags with pip does not actually install the dependency six.

The question is, what does distutils and/or pip actually do with this requires value, if anything? I can see it gets stored in the distribution metadata (you can find the requirement specification as plaintext in the file site-packages/python_gflags-3.1.2.dist-info/METADATA after installation) but that alone seems useless without a consumer.



from What does distutils do with the "requires" metadata?

No comments:

Post a Comment