Skip to content

Commit

Permalink
Let setuptools auto-discover src/ layout
Browse files Browse the repository at this point in the history
Now that we use pyproject.toml we can use setuptools' automatic layout
discovery for our project (the so-called "src-layout"). This works fine
even without a pyproject-based configuration for pure python projects,
but those declaring extensions *need* to be configured through pyproject
according to setuptools' documentation.

Note that the "build" tool was already complaining about the
"crc32c.ext" package not being explicitly included (or excluded). We
don't really expect it, but we don't really care if it's there either.
Either way, it's easier and better to let setuptools do the src/
automatic discovery and identify packages, etc.

Signed-off-by: Rodrigo Tobar <[email protected]>
  • Loading branch information
rtobar committed Jan 28, 2025
1 parent 649a651 commit 507207f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
)

setup(
packages=["crc32c"],
package_dir={"": "src"},
package_data={"crc32c": ["*.pyi", "py.typed", "ext/*.h"]},
ext_modules=[crcmod_ext],
)

0 comments on commit 507207f

Please sign in to comment.