From 882524d845349df532e2a96b30fbe7e74e6ff55c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Padilla?= Date: Thu, 26 Mar 2015 17:09:05 -0400 Subject: [PATCH] Fix: List all packages --- setup.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9000412c..e3dbcb94 100755 --- a/setup.py +++ b/setup.py @@ -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') @@ -30,7 +41,7 @@ license='MIT', keywords='jwt json web token security signing', url='http://github.com/jpadilla/pyjwt', - packages=['jwt'], + packages=get_packages('jwt'), scripts=['bin/jwt'], long_description=long_description, classifiers=[