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

[tools] Simplify static file handling in report-converter #4423

Merged

Conversation

gamesh411
Copy link
Collaborator

The report-converter package shows setuptools warnings during build about missing packages when using Python 3.12. This is due to stricter package discovery checks introduced in setuptools 61.0.0 [1], which now warns about directories that could be packages but aren't explicitly configured.

While we could address this with explicit package_data configuration, the package already has a correct MANIFEST.in file that handles static file inclusion.

This change:

  • Relies on the existing MANIFEST.in pattern for static files
  • Uses find_namespace_packages() to properly handle package structure
  • Keeps include_package_data=True to ensure MANIFEST.in is respected

This approach is more maintainable as:

  1. All static file patterns are managed in one place (MANIFEST.in)
  2. New static files are automatically included if they follow the existing directory structure
  3. setuptools will warn us if files specified in MANIFEST.in are missing

The change makes the package compatible with Python 3.12's stricter package discovery while maintaining a clean and maintainable solution for static file handling.

I assume this is the intention: to include these static files in the package; please verify!

Fixes #4422

[1] https://setuptools.pypa.io/en/latest/history.html#v61-0-0
[2] https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

…3.12

The report-converter package shows setuptools warnings during build about
missing packages when using Python 3.12. This is due to stricter package
discovery checks introduced in setuptools 61.0.0 [1], which now warns about
directories that could be packages but aren't explicitly configured.

While we could address this with explicit package_data configuration, the
package already has a correct MANIFEST.in file that handles static file
inclusion.

This change:
- Removes redundant package_data configuration from setup.py
- Relies on the existing MANIFEST.in pattern for static files
- Uses find_namespace_packages() to properly handle package structure
- Keeps include_package_data=True to ensure MANIFEST.in is respected

This approach is more maintainable as:
1. All static file patterns are managed in one place (MANIFEST.in)
2. New static files are automatically included if they follow the
   existing directory structure
3. setuptools will warn us if files specified in MANIFEST.in are missing

The change makes the package compatible with Python 3.12's stricter
package discovery while maintaining a clean and maintainable solution
for static file handling.

[1] https://setuptools.pypa.io/en/latest/history.html#v61-0-0
[2] https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
@bruntib bruntib merged commit 9a3230c into Ericsson:master Jan 13, 2025
7 of 8 checks passed
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

Successfully merging this pull request may close these issues.

Minor warning while building report-converter
2 participants