Consider the following package structure:
With the following setup.py contents:
from setuptools import setup, find_packages
setup(
name='dfl_client',
packages=find_packages(exclude=['*tests*']),
include_package_data=True,
package_data={"": ['py.typed', '*.pyi']},
)
When I package it using python setup.py sdist bdist_wheel, the resulting wheel:
- contains the
py.typedfile, which is good - contains the
testsfolder, while it should be excluded according to thefind_packagesdoc.
I spent hours trying to understand why with no success. Especially because it seems to work for other projects !
