Permalink
Browse files

Make the version available without the deps installed.

Fixes the setup.py, which could fail with an ImportError if the deps
hadn't been installed (and therefore also makes tox work).
  • Loading branch information...
Julian committed Aug 6, 2012
1 parent c0eafe8 commit 7aa1b6bc7939744181c38e214bd52753ec662f6f
Showing with 12 additions and 2 deletions.
  1. +1 −0 MANIFEST.in
  2. +4 −1 setup.py
  3. +6 −1 treq/__init__.py
  4. +1 −0 treq/_version
View
@@ -0,0 +1 @@
+include treq/_version
View
@@ -1,6 +1,9 @@
from setuptools import setup
+import os.path
-from treq import __version__
+
+with open(os.path.join(os.path.dirname(__file__), "treq", "_version")) as ver:
+ __version__ = ver.readline().strip()
classifiers = [
View
@@ -1,5 +1,10 @@
+import os.path
+
from treq.api import head, get, post, put, delete, request
head, get, post, put, delete, request
__all__ = ('head', 'get', 'post', 'put', 'delete')
-__version__ = "0.1dev"
+
+
+with open(os.path.join(os.path.dirname(__file__), "_version")) as ver:
+ __version__ = ver.readline().strip()
View
@@ -0,0 +1 @@
+0.1dev

0 comments on commit 7aa1b6b

Please sign in to comment.