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

Warn about deprecation of behaviour that considers modules/packages as "data" when include_package_data=True #3308

Merged
merged 5 commits into from May 16, 2022

Conversation

abravalheri
Copy link
Contributor

@abravalheri abravalheri commented May 5, 2022

Summary of changes

When discovering files in build_py, warn (SetuptoolsDeprectationWarning) if files and directories that correspond to a sub-package are included as "data".

This is the first step towards #3260 (we first need to issue a deprecation so packages relying on this behaviour can implement the required changes)

Pull Request Checklist

During the transition, `build_py` should warn when a module or package
is included in the distribution as if it was "package data".
@abravalheri abravalheri marked this pull request as ready for review May 6, 2022 06:51
@abravalheri abravalheri changed the title Warn about deprecation of behaviour that considers modules/packages as "package data" when include_package_data=True Warn about deprecation of behaviour that considers modules/packages as "data" when include_package_data=True May 6, 2022
Previously, the checks would result in a warning per module additionally
to the parent package.

Now only one warning per parent package is issued.
@abravalheri abravalheri merged commit e66ee62 into pypa:main May 16, 2022
@abravalheri abravalheri deleted the issue-3260-take2 branch May 16, 2022 17:34
jacklovell added a commit to cherab/core that referenced this pull request Feb 24, 2023
…ually

This allows finer control over what gets packaged, and fixes a
deprecation warning in recent setuptools versions (see
pypa/setuptools#3308 for detais).
It also prevents Cython-transpiled C source files being included in
the wheel distribution, which roughly halves the size of the installed
distribution.
tmzullinger added a commit to tmzullinger/rpmlint that referenced this pull request Mar 6, 2023
Since setuptools-62.3.0¹, a warning is issued when setuptools finds an
importable package is listed in package_data rather than in packages.

¹ pypa/setuptools#3308
  https://setuptools.pypa.io/en/latest/history.html#v62-3-0
tmzullinger added a commit to tmzullinger/rpmlint that referenced this pull request Mar 7, 2023
Since setuptools-62.3.0¹, a warning is issued when setuptools finds an
importable package is listed in package_data rather than in packages.

¹ pypa/setuptools#3308
  https://setuptools.pypa.io/en/latest/history.html#v62-3-0
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

1 participant