Closed letmaik closed 6 years ago
pkgresources is used in __init_\.py (mainly for Windows), which I think is distributed with setuptools. That's why it became a runtime dependency.
OK, that makes sense, but pkg_resources is not new in 38.0, so in that case I would keep it in install_requires
but remove the version constraint. I have an actual case where I cannot install wrf-python as user package in a non-root environment because it triggers an update of setuptools which fails.
No problem. I think the only reason the version is in there is because it was never tested with anything prior to 38.0.
Currently,
install_requires
containssetuptools >= 38.0
since this is listed in therequirements.txt
which is included there. However, this doesn't make much sense because a)install_requires
is only for runtime dependencies, not setup dependencies, and b) by the time thesetup(..)
function is executed,setuptools
is already imported and cannot be updated in-place. Another consequence of the first point is thatsetuptools
is listed as dependency in generated wheel packages, and this is plain wrong since wheels are packaged installations and don't run setup.py. I suggest: Keep it in requirements.txt if you really depend on >= 38.0, but filter it out when you parse the file insetup.py
and instead add a simple version check such that the setup fails if setuptools is < 38.0. Then the user can update it manually, and the dependency disappears in generated wheels.