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.typed
file, which is good - contains the
tests
folder, while it should be excluded according to thefind_packages
doc.
I spent hours trying to understand why with no success. Especially because it seems to work for other projects !