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

Packaging of examples as data is deprecated #1348

Closed
ischoegl opened this issue Jul 31, 2022 · 1 comment · Fixed by #1352
Closed

Packaging of examples as data is deprecated #1348

ischoegl opened this issue Jul 31, 2022 · 1 comment · Fixed by #1352
Labels

Comments

@ischoegl
Copy link
Member

ischoegl commented Jul 31, 2022

Problem description

Building Cantera produces lengthy warnings about deprecated packaging (one warning per examples folder):

  /opt/hostedtoolcache/Python/3.8.13/x64/lib/python3.8/site-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'cantera.examples.kinetics' as data is deprecated, please list it in `packages`.
      !!


      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'cantera.examples.kinetics' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.

      'cantera.examples.kinetics' 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 'cantera.examples.kinetics' 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.


  !!

Following a similar rationale as the proposed resolution of #1258, one approach would be to no longer package examples and move them to the samples folder of the repository where other examples are located. Discussion elsewhere has shown that the recommended access point for examples is the website, as it generally cannot be expected that users are able to locate examples in the Python installation folders.

Steps to reproduce

  1. Run scons build

System information

  • Cantera version: 3.0.0a2
@bryanwweber
Copy link
Member

Just to add some minor context, this warning is produced by recent versions of Setuptools... I forget exactly which version introduced this check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants