summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2012-08-13 19:05:25 +0200
committerArmin Rigo <arigo@tunes.org>2012-08-13 19:05:25 +0200
commitc740a695b7d08758a26807b4bad38d3e11e0e313 (patch)
treec4433ff56a9b0609d0f089654a0b12c023e9f5a4
parent0eba11198592489f1f06be780165cf6c3e1a8af3 (diff)
downloadcffi-c740a695b7d08758a26807b4bad38d3e11e0e313.tar.gz
Write the version explicitly, and test it too.
-rw-r--r--setup.py2
-rw-r--r--testing/test_version.py8
2 files changed, 9 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 05f9770..ff6e879 100644
--- a/setup.py
+++ b/setup.py
@@ -71,7 +71,7 @@ if __name__ == '__main__':
setup(
name='cffi',
description='Foreign Function Interface for Python calling C code.',
- get_version_from_scm=True,
+ version='0.3',
packages=['cffi'],
url='http://cffi.readthedocs.org',
diff --git a/testing/test_version.py b/testing/test_version.py
index f631c19..865281f 100644
--- a/testing/test_version.py
+++ b/testing/test_version.py
@@ -19,3 +19,11 @@ def test_doc_version():
p = os.path.join(parent, 'doc', 'source', 'index.rst')
content = open(p).read()
assert ("release-%s.tar.bz2" % v) in content
+
+def test_setup_version():
+ parent = os.path.dirname(os.path.dirname(__file__))
+ p = os.path.join(parent, 'setup.py')
+ content = open(p).read()
+ #
+ v = cffi.__version__
+ assert ("version='%s'" % v) in content