summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Aastrand Grimnes <gromgull@gmail.com>2017-01-30 21:38:03 +0100
committerGunnar Aastrand Grimnes <gromgull@gmail.com>2017-01-30 21:38:03 +0100
commitff4616e6e58e83fae518770f0af2e6ca4922ac42 (patch)
treef87749958480f16588a24c33693c363145645823
parent08e5cb8b4ffafc4eccb3ccbedf0585ca806039d1 (diff)
downloadrdflib-ff4616e6e58e83fae518770f0af2e6ca4922ac42.tar.gz
restored find_version in setup.py
-rw-r--r--setup.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 63f1ffed..a88656bc 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import os
+import re
from setuptools import setup, find_packages
kwargs = {}
@@ -9,8 +10,14 @@ kwargs['tests_require'] = ['html5lib', 'networkx', 'SPARQLWrapper']
kwargs['test_suite'] = "nose.collector"
kwargs['extras_require'] = {'sparql': ['SPARQLWrapper'], 'html': ['html5lib']}
+def find_version(filename):
+ _version_re = re.compile(r'__version__ = "(.*)"')
+ for line in open(filename):
+ version_match = _version_re.match(line)
+ if version_match:
+ return version_match.group(1)
-from rdflib import __version__ as version
+version = find_version('rdflib/__init__.py')
packages = find_packages(exclude=('examples*', 'test*'))