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

Fix setuptools warning: "multidict._multilib not in packages list" #829

Closed
wants to merge 1 commit into from

Conversation

hoodmane
Copy link
Contributor

@hoodmane hoodmane commented Apr 7, 2023

This fixes the following build warning:

    ############################
    # Package would be ignored #
    ############################
    Python recognizes 'multidict._multilib' as an importable package,
    but it is not listed in the `packages` configuration of setuptools.

    'multidict._multilib' 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 'multidict._multilib' 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.

This fixes the following build warning:

    ############################
    # Package would be ignored #
    ############################
    Python recognizes 'multidict._multilib' as an importable package,
    but it is not listed in the `packages` configuration of setuptools.

    'multidict._multilib' 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 'multidict._multilib' 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.
@@ -80,7 +80,7 @@ def read(f):
"GitHub: repo": "https://github.com/aio-libs/multidict",
},
license="Apache 2",
packages=["multidict"],
packages=["multidict", "multidict._multilib"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a package — it only contains C-headers. So I don't think it's correct to add it here. Perhaps, this needs to be addressed differently.

@@ -80,7 +80,7 @@ def read(f):
"GitHub: repo": "https://github.com/aio-libs/multidict",
},
license="Apache 2",
packages=["multidict"],
packages=["multidict", "multidict._multilib"],
python_requires=">=3.7",
include_package_data=True,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I posted a question @ pypa/setuptools#3340 (comment), but it seems include_package_data=True should be re-assessed — do we need it enabled? Why? Would disabling it also remove the warning?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I experimented with this and it turned out that removing the setting yields the same distribution contents while not emitting the warning so I've gone with that: 31e1170.

@webknjaz webknjaz closed this in 31e1170 Dec 30, 2023
@hoodmane hoodmane deleted the packages-list branch January 18, 2024 23:14
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.

None yet

2 participants