-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setup.py: use setuptools.find_namespace_packages() #1483
Conversation
Ready for review. I guess the long and the short of it is that we should have been listing all packages (including sub-packages and even The old distutils documentation agrees that all directories should be listed; see the last example in section 6.2 here: https://docs.python.org/3/distutils/examples.html#pure-python-distribution-by-package |
TBH that’s the way (listing all packages) I have been doing it, and I was reluctant to use start using |
@kanderso-nrel I just tagged an alpha release after merging #1495. We should double check that installs as expected and then merge this one and perhaps make another alpha release |
should hopefully address and silence this warning: Warning: You are using "pypa/gh-action-pypi-publish@master". The "master" branch of this project has been sunset and will not receive any updates, not even security bug fixes. Please, make sure to use a supported version. If you want to pin to v1 major version, use "pypa/gh-action-pypi-publish@release/v1". If you feel adventurous, you may opt to use use "pypa/gh-action-pypi-publish@unstable/v1" instead. A more general recommendation is to pin to exact tags or commit shas.
After merging master and updating the 13a14
> docs/examples/bifacial/plot_pvfactors_fixed_tilt.py
133a135
> docs/sphinx/source/whatsnew/v0.9.2.rst
149d150
< pvlib/_version.py
162a164
> pvlib/data/Burlington, United States SolarAnywhere Time Series 2021 Lat_44_465 Lon_-73_205 TMY3 format.csv
190c192
< pvlib/data/pvgis_hourly_Timeseries_45.000_8.000_CM_10kWp_CIS_5_2a_2013_2014.json
---
> pvlib/data/pvgis_hourly_Timeseries_45.000_8.000_SA2_10kWp_CIS_5_2a_2013_2014.json
316a319
> pyproject.toml
319d321
< versioneer.py Also, the new |
[ ] Tests added[ ] Updates entries indocs/sphinx/source/reference
for API changes.[ ] Adds description and name entries in the appropriate "what's new" file indocs/sphinx/source/whatsnew
for all changes. Includes link to the GitHub Issue with:issue:`num`
or this Pull Request with:pull:`num`
. Includes contributor name and/or GitHub username (link with:ghuser:`user`
).[ ] New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.remote-data
) and Milestone are assigned to the Pull Request and linked Issue.According to people who keep better track than I do of the evolution of python packaging over time, any folder is now considered a python package, even if it doesn't have any python-related files (see pypa/setuptools#3340 (comment)). This prompted some deprecations in
setuptools
, leading to the warnings in #1474. According to pypa/setuptools#3340 (comment) and similar posts elsewhere, usingsetuptools.find_namespace_packages()
is a recommended fix.In our case
find_namespace_packages()
includes a bunch of other stuff we don't actually want, butfind_packages()
seems closer to the mark. Making that change seems to get rid of the warnings without changing which files get included in thesdist
:I don't really understand what's happening under the hood here, but I want to see what the CI thinks of this change. Keeping as a draft until I have a better understanding of what
setuptools
is doing.