Michał Jaworski avatar Michał Jaworski committed bd80347

added version to init.py and requirements to setup.py

Comments (0)

Files changed (3)

oauth_provider/__init__.py

-
+VERSION = (2, 1, 0)  # PEP 386
+__version__ = ".".join([str(x) for x in VERSION])
 Django>=1.3
 oauth2>=1.5.170
 South>=0.7.3
-wsgiref>=0.1.2
 from setuptools import setup, find_packages
- 
+from oauth_provider import __version__ as version
+import os
+
+def strip_comments(l):
+    return l.split('#', 1)[0].strip()
+
+def reqs(*f):
+    return list(filter(None, [strip_comments(l) for l in open(
+        os.path.join(os.getcwd(), *f)).readlines()]))
+
+install_requires = reqs('requirements.txt')
+
 setup(
     name='django-oauth-plus',
-    version='2.0',
+    version=version,
     description='Support of OAuth 1.0a in Django using python-oauth2.',
     author='David Larlet',
     author_email='david@larlet.fr',
     # svn and CVS by default
     include_package_data=True,
     zip_safe=False,
-    # Tells setuptools to download setuptools_git before running setup.py so
+    # Tells setuptools to download setuptools_hg before running setup.py so
     # it can find the data files under Hg version control.
     setup_requires=['setuptools_hg'],
+    install_requires=install_requires,
 )
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.