Browse Source

[setup] Add py.typed to allow type checking

This enables PEP 561 compatibility and allows other packages that use
this one as third party to type check.

See https://mypy.readthedocs.io/en/latest/installed_packages.html#making-pep-561-compatible-packages

Signed-off-by: David Caro <david@dcaro.es>
David Caro 4 years ago
parent
commit
744bc6cdb1
3 changed files with 2 additions and 1 deletions
  1. 1 0
      MANIFEST.in
  2. 0 0
      dulwich/py.typed
  3. 1 1
      setup.py

+ 1 - 0
MANIFEST.in

@@ -8,6 +8,7 @@ include CONTRIBUTING.rst
 include TODO
 include setup.cfg
 include dulwich/stdint.h
+include dulwich/py.typed
 recursive-include docs conf.py *.txt Makefile make.bat
 recursive-include examples *.py
 graft dulwich/tests/data

+ 0 - 0
dulwich/py.typed


+ 1 - 1
setup.py

@@ -113,7 +113,7 @@ setup(name='dulwich',
       keywords="git vcs",
       packages=['dulwich', 'dulwich.tests', 'dulwich.tests.compat',
                 'dulwich.contrib'],
-      package_data={'': ['../docs/tutorial/*.txt']},
+      package_data={'': ['../docs/tutorial/*.txt', 'py.typed']},
       scripts=scripts,
       ext_modules=ext_modules,
       distclass=DulwichDistribution,