From 1a6f9f94ed7e2322f75cf1d4ca15254205c8a856 Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Fri, 12 Jul 2019 08:01:59 +0200 Subject: add py.typed to distribution --- setup.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 9b15f4e..5d9dc9e 100644 --- a/setup.py +++ b/setup.py @@ -656,6 +656,12 @@ class NameSpacePackager(object): and only adding defaults when no explicit entries were provided. Add explicit Python versions in sync with tox.env generation based on python_requires? """ + attr = '_' + sys._getframe().f_code.co_name + if not hasattr(self, attr): + setattr(self, attr, self._setup_classifiers()) + return getattr(self, attr) + + def _setup_classifiers(self): return sorted( set( [ @@ -760,6 +766,10 @@ class NameSpacePackager(object): df.append('LICENSE') # but don't install it exclude_files.append('LICENSE') + debug('testing<<<<<') + if 'Typing :: Typed' in self.classifiers: + debug('appending') + df.append('py.typed') pd = self._pkg_data.get('package_data', {}) if df: pd[self.full_package_name] = df -- cgit v1.2.1