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 'klaus.templates' as data is deprecated, please list it in packages. #302

Open
sbraz opened this issue Nov 26, 2022 · 2 comments

Comments

@sbraz
Copy link
Contributor

sbraz commented Nov 26, 2022

Hi,
When running setup.py build, we see this for both klaus.templates and klaus.static:

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

If you have the time I’d appreciate a PR to fix this!

@sbraz
Copy link
Contributor Author

sbraz commented Nov 27, 2022

I'm not sure I'll find time to do this in the near future (that's why I filed an issue, because I wasn't 100% sure of the correct fix). But in any case I guess we still have some time before this becomes critical.

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

No branches or pull requests

2 participants