Skip to content

Avoid copying extension sources as package data#5230

Open
puneetdixit200 wants to merge 1 commit into
pypa:mainfrom
puneetdixit200:fix-build-py-extension-sources
Open

Avoid copying extension sources as package data#5230
puneetdixit200 wants to merge 1 commit into
pypa:mainfrom
puneetdixit200:fix-build-py-extension-sources

Conversation

@puneetdixit200
Copy link
Copy Markdown

Summary of changes

build_py now filters extension source files from manifest-derived package data before copying files into build/lib. Regular package data from SOURCES.txt is still copied, and extension sources remain available to sdist handling.

Closes #5133

Tests

  • .venv\Scripts\python -m pytest setuptools\tests\test_build_py.py -q
  • .venv\Scripts\python -m pytest setuptools\tests\test_sdist.py::TestSdistTest::test_extension_sources_in_sdist setuptools\tests\test_sdist.py::TestSdistTest::test_missing_extension_sources setuptools\tests\test_sdist.py::TestSdistTest::test_symlinked_extension_sources -q
  • .venv\Scripts\python -m ruff check setuptools\command\build_py.py setuptools\tests\test_build_py.py
  • .venv\Scripts\python -m ruff format --check setuptools\command\build_py.py setuptools\tests\test_build_py.py
  • git diff --check

Pull Request Checklist

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.

[BUG] build command copies extension sources (.c, .cpp files) to build/lib directory

1 participant