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.
2 parents 2b11be5 + ea9ad08 commit d28fdfaCopy full SHA for d28fdfa
setup.py
@@ -1,12 +1,18 @@
1
import setuptools
2
from setuptools import find_packages
3
+import re
4
+
5
+with open("./src/__init__.py", 'r') as f:
6
+ content = f.read()
7
+ # from https://www.py4u.net/discuss/139845
8
+ version = re.search(r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', content).group(1)
9
10
with open("README.md", "r") as fh:
11
long_description = fh.read()
12
13
setuptools.setup(
14
name="template-python-zuppif",
- version="0.0.2",
15
+ version=version,
16
author="zuppif",
17
author_email="[email protected]",
18
description="<INSERT_DESCRIPTION>",
src/__init__.py
@@ -0,0 +1 @@
+__version__ = "0.0.1"
0 commit comments