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

Package would be ignored warnings #12778

Open
nijel opened this issue Oct 15, 2024 · 4 comments
Open

Package would be ignored warnings #12778

nijel opened this issue Oct 15, 2024 · 4 comments
Labels
enhancement Adding or requesting a new feature. good first issue Opportunity for newcoming contributors. hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed.

Comments

@nijel
Copy link
Member

nijel commented Oct 15, 2024

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

@nijel nijel added enhancement Adding or requesting a new feature. hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed. good first issue Opportunity for newcoming contributors. labels Oct 15, 2024
Copy link

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 added a commit to nijel/weblate that referenced this issue Oct 15, 2024
nijel added a commit to nijel/weblate that referenced this issue Oct 15, 2024
@nijel
Copy link
Member Author

nijel commented Oct 15, 2024

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

nijel added a commit that referenced this issue Oct 15, 2024
This should collect errors seen in #12778.
@portalghost
Copy link

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

@nijel
Copy link
Member Author

nijel commented Oct 16, 2024

You're welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature. good first issue Opportunity for newcoming contributors. hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed.
Projects
None yet
Development

No branches or pull requests

2 participants