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 <rtobar@icrar.org>
  • Loading branch information
rtobar committed Dec 16, 2024
1 parent 511b973 commit 7f4e12e
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 @@ -33,8 +33,6 @@
)

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

0 comments on commit 7f4e12e

Please sign in to comment.