From 0b70f678acf0de4353a539e27eb8de200ed89de2 Mon Sep 17 00:00:00 2001 From: "Matthew M. Keeler" Date: Wed, 22 Jun 2022 15:58:52 -0400 Subject: [PATCH] Fix mypy type checking (#184) A [customer requested][original-pr] that we start including a py.typed file in our repository. This would enable mypy to take advantage of our typehints. Unfortunately, this didn't completely solve the customers issue. A [second pr][second-pr] was opened to address the missing step of including the py.typed file in the `Manifest.in` file. However, this change alone is not sufficient. According to the [documentation][include_package_data], you must also include the `include_package_data=True` directive so that files specified in the `Manifest.in` file are included in distribution. [original-pr]: https://github.com/launchdarkly/python-server-sdk/pull/166 [second-pr]: https://github.com/launchdarkly/python-server-sdk/pull/172 [include_package_data]: https://setuptools.pypa.io/en/latest/userguide/datafiles.html#include-package-data --- MANIFEST.in | 1 + setup.py | 1 + 2 files changed, 2 insertions(+) diff --git a/MANIFEST.in b/MANIFEST.in index 35367703..f376dd16 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,3 +4,4 @@ include test-requirements.txt include consul-requirements.txt include dynamodb-requirements.txt include redis-requirements.txt +include ldclient/py.typed diff --git a/setup.py b/setup.py index cf3312f8..6c2cbe43 100644 --- a/setup.py +++ b/setup.py @@ -54,6 +54,7 @@ def run(self): author='LaunchDarkly', author_email='team@launchdarkly.com', packages=find_packages(), + include_package_data=True, url='https://github.com/launchdarkly/python-server-sdk', description='LaunchDarkly SDK for Python', long_description='LaunchDarkly SDK for Python',