summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorwil paredes <code@dystedium.com>2014-02-07 00:07:33 -0800
committerwil paredes <code@dystedium.com>2014-02-07 00:07:33 -0800
commitb87bad733d4b2eef81967f98602cfdbb0997fb72 (patch)
tree5819bf8886f8c6f0d7a7d993a00f6382006793f0 /setup.py
parent3bade2705b75909e7e589723d7d61c808fe16d3d (diff)
downloadpyjwt-b87bad733d4b2eef81967f98602cfdbb0997fb72.tar.gz
refactor decode(), fix setup.py for automated sdist builds
* split decode() internals into load() and verify_signature() * pull code out of read() function in setup.py so it doesn't fail when using distutils.core.run_setup() to build an archive * the setup.py change also uses with so file closing is automatic
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 32f2271..cdd14a3 100755
--- a/setup.py
+++ b/setup.py
@@ -3,8 +3,9 @@ import os
from setuptools import setup
-def read(fname):
- return open(os.path.join(os.path.dirname(__file__), fname)).read()
+with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
+ long_description = readme.read()
+
setup(
name="PyJWT",
@@ -17,7 +18,7 @@ setup(
url="http://github.com/progrium/pyjwt",
packages=['jwt'],
scripts=['bin/jwt'],
- long_description=read('README.md'),
+ long_description=long_description,
classifiers=[
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",