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 eb82735 commit abb53e4Copy full SHA for abb53e4
setup.py
@@ -1,12 +1,20 @@
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
-
+import re
4
import os
5
import sys
6
7
from setuptools import setup
8
9
-VERSION = '2015.04.28'
+version_regex = r'__version__ = ["\']([^"\']*)["\']'
10
+with open('certifi/__init__.py', 'r') as f:
11
+ text = f.read()
12
+ match = re.search(version_regex, text)
13
+
14
+ if match:
15
+ VERSION = match.group(1)
16
+ else:
17
+ raise RuntimeError("No version number found!")
18
19
if sys.argv[-1] == 'publish':
20
os.system('python setup.py sdist bdist_wheel upload')
0 commit comments