Create py.typed (#12893)

* Create py.typed

This creates a [py.typed as per PEP 561](https://www.python.org/dev/peps/pep-0561/#packaging-type-information) that should be distributed to mark that the package includes (inline) type annotations.

* Update setup.py

Include py.typed as package data

* Update setup.py

Call `setup(...)` with `zip_safe=False`.
This commit is contained in:
Will Frey
2021-08-13 04:12:59 -04:00
committed by GitHub
parent b0a917c48a
commit d8fb278a2c
2 changed files with 3 additions and 0 deletions

View File

@@ -350,6 +350,8 @@ setup(
url="https://github.com/huggingface/transformers",
package_dir={"": "src"},
packages=find_packages("src"),
package_data={"transformers": ["py.typed"]},
zip_safe=False,
extras_require=extras,
entry_points={"console_scripts": ["transformers-cli=transformers.commands.transformers_cli:main"]},
python_requires=">=3.6.0",