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 1
1
from setuptools import setup , find_packages
2
- import subprocess
2
+ from distutils .util import convert_path
3
+ from typing import Dict
3
4
4
5
5
6
def _read_long_description ():
6
7
with open ("README.md" ) as readme :
7
8
return readme .read ()
8
9
9
10
10
- GIT_VERSION = (
11
- subprocess .check_output ("git describe --always" .split ())
12
- .strip ()
13
- .decode ("ascii" )
14
- .replace ("v" , "" , 1 )
15
- )
16
11
DEV_REQUIRE = [
17
12
"pytest" ,
18
13
"pytest-cov" ,
@@ -23,6 +18,11 @@ def _read_long_description():
23
18
NAME = "flaky_tests_detection"
24
19
NAME_DASHED = NAME .replace ("_" , "-" )
25
20
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
+
26
26
27
27
setup (
28
28
name = NAME_DASHED ,
@@ -34,7 +34,7 @@ def _read_long_description():
34
34
url = f"https://github.com/F-Secure/{ NAME_DASHED } " ,
35
35
license = "Apache License 2.0" ,
36
36
platforms = "any" ,
37
- version = GIT_VERSION ,
37
+ version = init_content [ "__version__" ] ,
38
38
packages = find_packages (exclude = [f"{ NAME } .tests" , f"{ NAME } .tests.*" ]),
39
39
entry_points = {
40
40
"console_scripts" : [
You can’t perform that action at this time.
0 commit comments