Skip to content

Commit 882524d

Browse files
committed
Fix: List all packages
1 parent bd57b02 commit 882524d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

setup.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@
1212
long_description = readme.read()
1313

1414

15+
def get_packages(package):
16+
"""
17+
Return root package and all sub-packages.
18+
"""
19+
return [
20+
dirpath
21+
for dirpath, dirnames, filenames in os.walk(package)
22+
if os.path.exists(os.path.join(dirpath, '__init__.py'))
23+
]
24+
25+
1526
if sys.argv[-1] == 'publish':
1627
os.system('python setup.py sdist upload')
1728
os.system('python setup.py bdist_wheel upload')
@@ -30,7 +41,7 @@
3041
license='MIT',
3142
keywords='jwt json web token security signing',
3243
url='http://github.com/jpadilla/pyjwt',
33-
packages=['jwt'],
44+
packages=get_packages('jwt'),
3445
scripts=['bin/jwt'],
3546
long_description=long_description,
3647
classifiers=[

0 commit comments

Comments
 (0)