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

setuptools deprecation notice when building with python3.11 #503

Open
dmsimard opened this issue Aug 28, 2023 · 2 comments
Open

setuptools deprecation notice when building with python3.11 #503

dmsimard opened this issue Aug 28, 2023 · 2 comments
Labels
packaging Related to the packaging

Comments

@dmsimard
Copy link
Contributor

What is the issue ?

When building a wheel with python3 setup.py sdist bdist_wheel there are warnings such as:

/tmp/release/lib64/python3.11/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'ara.api.management.commands' as data is deprecated, please list it in `packages`.
    !!


    ############################
    # Package would be ignored #
    ############################
    Python recognizes 'ara.api.management.commands' as an importable package,
    but it is not listed in the `packages` configuration of setuptools.

    'ara.api.management.commands' 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 'ara.api.management.commands' 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)

The full list is the following:

Installing 'ara.api.management.commands' as data is deprecated, please list it in `packages`.
Installing 'ara.plugins.action' as data is deprecated, please list it in `packages`.
Installing 'ara.plugins.callback' as data is deprecated, please list it in `packages`.
Installing 'ara.plugins.lookup' as data is deprecated, please list it in `packages`.
Installing 'ara.server.db.backends' as data is deprecated, please list it in `packages`.
Installing 'ara.server.db.backends.distributed_sqlite' as data is deprecated, please list it in `packages`.
Installing 'ara.ui.management.commands' as data is deprecated, please list it in `packages`.
Installing 'ara.ui.static' as data is deprecated, please list it in `packages`.
Installing 'ara.ui.static.css' as data is deprecated, please list it in `packages`.
Installing 'ara.ui.static.images' as data is deprecated, please list it in `packages`.
Installing 'ara.ui.static.js' as data is deprecated, please list it in `packages`.
Installing 'ara.ui.templates' as data is deprecated, please list it in `packages`.
Installing 'ara.ui.templates.partials' as data is deprecated, please list it in `packages`.
Installing 'ara.ui.templates.partials.search' as data is deprecated, please list it in `packages`.
Installing 'ara.ui.templates.partials.tables' as data is deprecated, please list it in `packages`.
Installing 'ara.ui.templatetags' as data is deprecated, please list it in `packages`.

I have not yet investigated the issue but we should understand and fix the deprecation.

What should be happening ?

We should be able to build without running into deprecations.

@dmsimard dmsimard added the packaging Related to the packaging label Aug 28, 2023
@gotmax23
Copy link

gotmax23 commented Sep 3, 2023

Those directories are missing __init__.py files, so they're not proper Python packages, and setuptools.find_packages() (used by pbr under the hood) does not explicitly include them in setuptools' packages configuration. Adding __init__.py files should fix this problem.

@dmsimard
Copy link
Contributor Author

dmsimard commented Sep 4, 2023

Thanks for pointing me in the right direction!

Some of those aren't meant to be python modules, most notably the UI bits, but we can figure it out.

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

No branches or pull requests

2 participants