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

BLD: deprecation warnings from setuptools (auto-included packages) #4279

Open
neutrinoceros opened this issue Jan 2, 2023 · 6 comments
Open
Labels
bug build related to the build process

Comments

@neutrinoceros
Copy link
Member

neutrinoceros commented Jan 2, 2023

Building a wheel with --verbose

python -m pip wheel --verbose --progress-bar off --no-deps --wheel-dir build .

Yields the following warnings

SetuptoolsDeprecationWarning:     Installing 'yt.frontends.amrvac.tests.sample_parfiles' as data is deprecated, please list it in `packages`.
      !!


      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'yt.frontends.amrvac.tests.sample_parfiles' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.

      'yt.frontends.amrvac.tests.sample_parfiles' 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 'yt.frontends.amrvac.tests.sample_parfiles' 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.

7 directories are affected

  • yt.frontends.amrvac.tests.sample_parfiles
  • yt.frontends.artio.artio_headers
  • yt.geometry._selection_routines
  • yt.utilities.grid_data_format.docs
  • yt.utilities.grid_data_format.scripts
  • yt.utilities.lib.cykdtree.windows
  • yt.utilities.lib.ewahboolarray (soon to be removed in BLD: Split EWAH bool array code #2711)

It should be easily fixable, but it's likely that we don't actually want to include everything there (I suspect some of these files are actually not used anymore)

@neutrinoceros neutrinoceros added bug infrastructure Related to CI, versioning, websites, organizational issues, etc labels Jan 2, 2023
@neutrinoceros
Copy link
Member Author

Actually it seems to me that only yt.frontends.amrvac.tests.sample_parfiles should be included in wheels because it can be used to run some tests, the rest is all source files and internal docs that serve no purpose in a wheel AFAICT.

@neutrinoceros
Copy link
Member Author

Working on a patch. I'll open a PR once I see builds passing on my fork: https://github.com/neutrinoceros/yt/actions/workflows/wheels.yaml

@neutrinoceros
Copy link
Member Author

Related discussion upstream: pypa/setuptools#3340

@matthewturk
Copy link
Member

I'd rather the fix be to make sure we include the files rather than exclude them, unless they are very large or detrimental in some way.

@neutrinoceros
Copy link
Member Author

Fine with me. For now I'm actually struggling to do anything with them because the recommandation is to include them via pyproject.toml but we actually use MANIFEST.in for that and I am not sure I understand how they interact.

@neutrinoceros
Copy link
Member Author

I'll give a try to combining pyproject.toml with MANIFEST.in and use wheel-inspect to check that we don't miss anything

@neutrinoceros neutrinoceros added build related to the build process and removed infrastructure Related to CI, versioning, websites, organizational issues, etc labels Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug build related to the build process
Projects
None yet
Development

No branches or pull requests

2 participants