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

SetuptoolsDeprecationWarning: Installing 'supervisor.scripts' as data is deprecated, please list it in packages #1560

Open
sbraz opened this issue Dec 24, 2022 · 3 comments

Comments

@sbraz
Copy link
Contributor

sbraz commented Dec 24, 2022

Hi,
There are multiple warnings with recent setuptools versions:

/usr/lib/python3.10/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'supervisor.scripts' as data is deprecated, please list it in `packages`.                       
    !!                                                                                                                                                                                                             
                                                                                                                                                                                                                   
                                                                                                                                                                                                                   
    ############################                                                                                                                                                                                   
    # Package would be ignored #                                                                                                                                                                                   
    ############################                                                                                                                                                                                   
    Python recognizes 'supervisor.scripts' as an importable package,                                                                                                                                               
    but it is not listed in the `packages` configuration of setuptools.                                                                                                                                            
                                                                                                                                                                                                                   
    'supervisor.scripts' 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 'supervisor.scripts' 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.                                                                                                                                                                                            
                                                                                                                                                                                                                   
                                                                                                                                                                                                                   
!!

All these have the same issue:

Installing 'supervisor.scripts' as data is deprecated, please list it in `packages`.                      
Installing 'supervisor.skel' as data is deprecated, please list it in `packages`.                         
Installing 'supervisor.tests.fixtures' as data is deprecated, please list it in `packages`.               
Installing 'supervisor.tests.fixtures.example' as data is deprecated, please list it in `packages`.       
Installing 'supervisor.ui' as data is deprecated, please list it in `packages`.                           
Installing 'supervisor.ui.images' as data is deprecated, please list it in `packages`.                    
Installing 'supervisor.ui.stylesheets' as data is deprecated, please list it in `packages`.               
@mnaberez
Copy link
Member

It looks like this warning was added to setuptools in this commit and released in setuptools 62.3.0, which was uploaded to PyPI on May 16, 2022.

Supervisor has been distributing these files using pretty much the same setup.py and MANIFEST.in for at least 10 years now. The files are required for Supervisor to work correctly (e.g. the supervisor.ui files are needed by the web interface).

Hopefully a solution can be found where the package can be installed on newer setuptools without warnings while also still installing correctly on older setuptools, since Supervisor still supports a lot of old Python versions. I haven't investigated this issue yet, other than trying to find out when the warning started. Any help would be welcome.

@sbraz
Copy link
Contributor Author

sbraz commented Apr 29, 2024

Hello @mnaberez, there is now some additional documentation at https://setuptools.pypa.io/en/latest/userguide/package_discovery.html. Do you plan on dropping support for older Python versions or are we still facing the same problem?

@mnaberez
Copy link
Member

there is now some additional documentation at https://setuptools.pypa.io/en/latest/userguide/package_discovery.html.

Thanks for the link.

Do you plan on dropping support for older Python versions or are we still facing the same problem?

There are not currently plans to drop any older Python versions unless they become a maintenance burden. We're still able to run all the versions we support on GitHub Actions, so they aren't currently.

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

No branches or pull requests

2 participants