We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d536d79 commit abeafa7Copy full SHA for abeafa7
setup.py
@@ -1,7 +1,14 @@
1
# -*- coding: utf-8 -*-
2
from setuptools import setup
3
+import re
4
-from pusher.version import VERSION
5
+# Lovingly adapted from https://github.com/kennethreitz/requests/blob/39d693548892057adad703fda630f925e61ee557/setup.py#L50-L55
6
+with open('pusher/version.py', 'r') as fd:
7
+ VERSION = re.search(r'^VERSION = [\']([^\']*)[\']',
8
+ fd.read(), re.MULTILINE).group(1)
9
+
10
+if not VERSION:
11
+ raise RuntimeError('Ensure `VERSION` is correctly set in ./pusher/version.py')
12
13
setup(
14
name='pusher',
0 commit comments