Skip to content

Commit

Permalink
Fix: List all packages
Browse files Browse the repository at this point in the history
  • Loading branch information
jpadilla committed Mar 26, 2015
1 parent bd57b02 commit 882524d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@
long_description = readme.read()


def get_packages(package):
"""
Return root package and all sub-packages.
"""
return [
dirpath
for dirpath, dirnames, filenames in os.walk(package)
if os.path.exists(os.path.join(dirpath, '__init__.py'))
]


if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
os.system('python setup.py bdist_wheel upload')
Expand All @@ -30,7 +41,7 @@
license='MIT',
keywords='jwt json web token security signing',
url='https://github.com/jpadilla/pyjwt',
packages=['jwt'],
packages=get_packages('jwt'),
scripts=['bin/jwt'],
long_description=long_description,
classifiers=[
Expand Down

0 comments on commit 882524d

Please sign in to comment.