NCAR / wrf-python

A collection of diagnostic and interpolation routines for use with output from the Weather Research and Forecasting (WRF-ARW) Model.
https://wrf-python.readthedocs.io
Apache License 2.0
410 stars 155 forks source link

Remove setuptools from setup.py dependencies #58

Closed letmaik closed 6 years ago

letmaik commented 6 years ago

Currently, install_requires contains setuptools >= 38.0 since this is listed in the requirements.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 the setup(..) function is executed, setuptools is already imported and cannot be updated in-place. Another consequence of the first point is that setuptools 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 in setup.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.

bladwig1 commented 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.

letmaik commented 6 years ago

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.

bladwig1 commented 6 years ago

No problem. I think the only reason the version is in there is because it was never tested with anything prior to 38.0.