Skip to content

Commit

Permalink
Don't include crc32c/ext as package data
Browse files Browse the repository at this point in the history
On edacda4 we added type hint stub files that needed to be distributed
with the source and binary distributions of our package. However we
relied on the include_package_data, which recursively includes all files
it finds, and therefore we ended up with the ext/* sources included in
our binary wheels.

This commit removes the include_package_data flag usage, and replaces it
with a more details package_data specification. This means we can also
remove the corresponding lines from the MANIFEST.in file. Additionally,
the header files don't need to be specified in MANIFEST.in since they
are already stated as a dependency of the C Extension.

Signed-off-by: Rodrigo Tobar <[email protected]>
  • Loading branch information
rtobar committed Aug 14, 2024
1 parent fd4a951 commit 85efdc6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
a checksum calculation is attempted.
* Skip hardware probing if the `CRC32C_SKIP_HW_PROBE` environment variable
is set to `1`.
* Cleaned up wheel generation so it doesn't include
C extension sources after changes introduced in 2.5.

## [2.6]

Expand Down
3 changes: 0 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
include LICENSE*
include AUTHORS*
include src/crc32c/ext/*.h
include src/crc32c/*.pyi
include src/crc32c/py.typed
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
classifiers=classifiers,
packages=['crc32c'],
package_dir={'': 'src'},
package_data={"crc32c": ["*.pyi", "py.typed"]},
python_requires=">=3.7",
include_package_data=True,
ext_modules=[crcmod_ext],
test_suite="test")

0 comments on commit 85efdc6

Please sign in to comment.