[Distutils] install_requires vs. requires_dist, and setup.cfg
lists at asheesh.org
Mon Apr 7 06:07:40 CEST 2014
>From what I understand in PEP 345, "Requires-Dist" is the name in PKG-INFO
files for a distribution's dependencies on other distributions.
>From what I also understand from personal experience, when using
setuptools, install_requires is the name of the keyword argument to setup()
that specifies a dependency on another distribution.
Sanity-check: This doesn't mean that one should call setup() with a
"required_dist" keyword argument, right?
to suggest that one day in our glorious future, when we can lay down
our setup.py files and switch to setup.cfg, then we can call it
requires_dist in that format.
As I understand it. the setup.cfg revolution never happened, so I should
still encourage new people packaging their own things to write
install_requires in their calls to setuptools.setup().
Also, I just created a trivial setup.py that contains an "install_requires"
and doing "python setup.py develop --user" does seem to have created a
PKG-INFO file, but it doesn't have a "Requires-Dist" line.
Details of my test case:
➜ rofl python
Python 2.7.6 (default, Mar 22 2014, 15:40:47)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import setuptools
>>> print setuptools.__version__
➜ rofl cat setup.py
from setuptools import setup
➜ rofl grep mwparser UNKNOWN.egg-info/*
I expected to also see it in a Requires-Dist property within
UNKNOWN.egg-info/PKG-INFO. Is that a mistaken expectation? If so, what if
anything writes a "Requires-Dist" line anywhere?
Thanks for your patience with me, and for your speedy responses so far! I'm
really hoping to provide as much high quality information to people at
PyCon as I can, and grateful that so many wise people are willing to have
these conversations with me.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Distutils-SIG