Skip to content
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

"Package would be ignored" warnings when building the pvlib distribution #1474

Closed
kandersolar opened this issue Jun 15, 2022 · 0 comments · Fixed by #1483
Closed

"Package would be ignored" warnings when building the pvlib distribution #1474

kandersolar opened this issue Jun 15, 2022 · 0 comments · Fixed by #1483

Comments

@kandersolar
Copy link
Member

Describe the bug

Building the pvlib distribution files emits a handful of warnings like this:

 /opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'pvlib.bifacial' as data is 
deprecated, please list it in `packages`.
    !!
    ############################
    # Package would be ignored #
    ############################
    Python recognizes 'pvlib.bifacial' as an importable package,
    but it is not listed in the `packages` configuration of setuptools.
    'pvlib.bifacial' has been automatically added to the distribution only
    because it may contain data files, but this behavior is likely to change
    in future versions of setuptools (and therefore is considered deprecated).
    Please make sure that 'pvlib.bifacial' is included as a package by using
    the `packages` configuration field or the proper discovery methods
    (for example by using `find_namespace_packages(...)`/`find_namespace:`
    instead of `find_packages(...)`/`find:`).
    You can read more about "package discovery" and "data files" on setuptools
    documentation page.
!!
  check.warn(importable)

This warning is emitted for pvlib.bifacial, pvlib.data, pvlib.iotools, pvlib.ivtools, pvlib.spa_c_files, pvlib.spectrum, and pvlib.tests.

To Reproduce
I've not reproduced it locally, but the relevant command is python setup.py sdist bdist_wheel. From the wording of the warning I guess you might need to use a recent version of setuptools to reproduce it. At least the version listed below should reproduce it.

Expected behavior
No scary warnings during the distribution build.

Versions:

  • pvlib.__version__: 0.9.1+33.g177a6e0
  • pandas.__version__:
  • python: 3.8
  • setuptools-62.4.0
  • wheel-0.37.1

Additional context
First noticed in this CI job log: https://github.com/pvlib/pvlib-python/runs/6886769268?check_suite_focus=true#step:6:393

Also as suggested by @wholmgren in #1306 (comment), we may want to split the "test the build" CI job out from the "deploy the build" CI job, as well as enable fail on warnings in the test job if possible. In the style of test-driven development, perhaps that should be done as the first step of fixing these warnings.

We may also want to move away from python setup.py entirely, see https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant