We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab08aa3 commit ad6c953Copy full SHA for ad6c953
setup.py
@@ -16,7 +16,14 @@
16
17
from setuptools import setup, find_packages
18
19
-from decyclify import __version__ as version
+import re, io
20
+
21
+# https://stackoverflow.com/questions/17583443/what-is-the-correct-way-to-share-package-version-with-setup-py-and-the-package
22
+__version__ = re.search(
23
+ r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
24
+ io.open('decyclify/__init__.py', encoding='utf_8_sig').read(),
25
+ re.MULTILINE)[0]
26
27
28
install_requires = [
29
'networkx==2.4.*',
@@ -45,7 +52,7 @@
45
52
setup(
46
53
long_description=open('README.md').read(),
47
54
long_description_content_type="text/markdown",
48
- version=version,
55
+ version=__version__,
49
56
packages=find_packages(include=["decyclify.*"]),
50
57
install_requires=install_requires,
51
58
tests_require=tests_require,
0 commit comments