Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 7aa1b6bc7939744181c38e214bd52753ec662f6f 1 parent c0eafe8
@Julian Julian authored
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
1  MANIFEST.in
@@ -0,0 +1 @@
+include treq/_version
View
5 setup.py
@@ -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
7 treq/__init__.py
@@ -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
1  treq/_version
@@ -0,0 +1 @@
+0.1dev
Please sign in to comment.
Something went wrong with that request. Please try again.