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:
2
setup.py
2
setup.py
@@ -350,6 +350,8 @@ setup(
|
|||||||
url="https://github.com/huggingface/transformers",
|
url="https://github.com/huggingface/transformers",
|
||||||
package_dir={"": "src"},
|
package_dir={"": "src"},
|
||||||
packages=find_packages("src"),
|
packages=find_packages("src"),
|
||||||
|
package_data={"transformers": ["py.typed"]},
|
||||||
|
zip_safe=False,
|
||||||
extras_require=extras,
|
extras_require=extras,
|
||||||
entry_points={"console_scripts": ["transformers-cli=transformers.commands.transformers_cli:main"]},
|
entry_points={"console_scripts": ["transformers-cli=transformers.commands.transformers_cli:main"]},
|
||||||
python_requires=">=3.6.0",
|
python_requires=">=3.6.0",
|
||||||
|
|||||||
1
src/transformers/py.typed
Normal file
1
src/transformers/py.typed
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
Reference in New Issue
Block a user