We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5bd027 commit 20c8cd2Copy full SHA for 20c8cd2
setup.py
@@ -3,6 +3,17 @@
3
4
from setuptools import setup, find_packages
5
6
+
7
+def find_stubs(package):
8
+ stubs = []
9
+ for root, dirs, files in os.walk(package):
10
+ for f in files:
11
+ path = os.path.join(root, f).replace(package + os.sep, '', 1)
12
+ if path.endswith('.pyi') or path.endswith('py.typed'):
13
+ stubs.append(path)
14
+ return {package: stubs}
15
16
17
if sys.argv[-1] == 'publish':
18
os.system('python setup.py sdist upload')
19
os.system('python setup.py bdist_wheel upload')
@@ -42,7 +53,5 @@
42
53
extras_require={
43
54
'signals': ['blinker>=1.3,<2.0'],
44
55
},
45
- package_data={
46
- 'pynamodb': ['py.typed'],
47
- },
56
+ package_data=find_stubs('pynamodb'),
48
57
)
0 commit comments