WeblateOrg / weblate

Web based localization tool with tight version control integration.
https://weblate.org/
GNU General Public License v3.0
4.57k stars 1.01k forks source link

Package would be ignored warnings #12778

Open nijel opened 4 days ago

nijel commented 4 days ago

Describe the problem

During the package build there are several warnings like:

        ********************************************************************************
        ############################
        # Package would be ignored #
        ############################
        Python recognizes 'weblate.templates.memory' as an importable package[^1],
        but it is absent from setuptools' `packages` configuration.

        This leads to an ambiguous overall configuration. If you want to distribute this
        package, please make sure that 'weblate.templates.memory' is explicitly added
        to the `packages` configuration field.

        Alternatively, you can also rely on setuptools' discovery methods
        (for example by using `find_namespace_packages(...)`/`find_namespace:`
        instead of `find_packages(...)`/`find:`).

        You can read more about "package discovery" on setuptools documentation page:

        - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

        If you don't want 'weblate.templates.memory' to be distributed and are
        already explicitly excluding 'weblate.templates.memory' via
        `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
        you can try to use `exclude_package_data`, or `include-package-data=False` in
        combination with a more fine grained `package-data` configuration.

        You can read more about "package data files" on setuptools documentation page:

        - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

        [^1]: For Python, any directory (with suitable naming) can be imported,
              even if it does not contain any `.py` files.
              On the other hand, currently there is no concept of package data
              directory, all directories are treated like packages.
        ********************************************************************************

Describe the solution you would like

The warnings should be addressed. I think in all cases these are data files.

Describe alternatives you have considered

No response

Screenshots

No response

Additional context

github-actions[bot] commented 4 days ago

This issue seems to be a good fit for newbie contributors. You are welcome to contribute to Weblate! Don't hesitate to ask any questions you would have while implementing this.

You can learn about how to get started in our contributors documentation.

nijel commented 4 days ago

Since #12782 the warnings are captured at GitHub in the "Build packages" job, for example see https://github.com/WeblateOrg/weblate/actions/runs/11346156159?pr=12782

portalghost commented 3 days ago

Ahoj @nijel, I would like to tackle this problem.

nijel commented 3 days ago

You're welcome!