File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 11from setuptools import setup , find_packages
2- import subprocess
2+ from distutils .util import convert_path
3+ from typing import Dict
34
45
56def _read_long_description ():
67 with open ("README.md" ) as readme :
78 return readme .read ()
89
910
10- GIT_VERSION = (
11- subprocess .check_output ("git describe --always" .split ())
12- .strip ()
13- .decode ("ascii" )
14- .replace ("v" , "" , 1 )
15- )
1611DEV_REQUIRE = [
1712 "pytest" ,
1813 "pytest-cov" ,
@@ -23,6 +18,11 @@ def _read_long_description():
2318NAME = "flaky_tests_detection"
2419NAME_DASHED = NAME .replace ("_" , "-" )
2520
21+ init_content : Dict [str , str ] = {}
22+ init_path = convert_path ('flaky_tests_detection/__init__.py' )
23+ with open (init_path ) as init_file :
24+ exec (init_file .read (), init_content )
25+
2626
2727setup (
2828 name = NAME_DASHED ,
@@ -34,7 +34,7 @@ def _read_long_description():
3434 url = f"https://github.com/F-Secure/{ NAME_DASHED } " ,
3535 license = "Apache License 2.0" ,
3636 platforms = "any" ,
37- version = GIT_VERSION ,
37+ version = init_content [ "__version__" ] ,
3838 packages = find_packages (exclude = [f"{ NAME } .tests" , f"{ NAME } .tests.*" ]),
3939 entry_points = {
4040 "console_scripts" : [
You can’t perform that action at this time.
0 commit comments