6
6
README_FILE = os .path .join (PROJECT_ROOT , "README.md" )
7
7
VERSION_FILE = os .path .join (PROJECT_ROOT , "causalpy" , "version.py" )
8
8
REQUIREMENTS_FILE = os .path .join (PROJECT_ROOT , "requirements.txt" )
9
- TEST_REQUIREMENTS_FILE = os .path .join (PROJECT_ROOT , "requirements-test.txt" )
10
9
11
10
12
11
def get_long_description ():
13
12
with open (README_FILE , encoding = "utf-8" ) as f :
14
13
return f .read ()
15
14
16
15
17
- with open ( VERSION_FILE ) as f :
18
- version = f . read (). split ( "=" )[ - 1 ]. strip (). strip ( '"' )
16
+ # get version
17
+ exec ( open ( "causalpy/version.py" ). read () )
19
18
20
19
with open (REQUIREMENTS_FILE ) as f :
21
20
install_reqs = f .read ().splitlines ()
22
21
23
- with open (TEST_REQUIREMENTS_FILE ) as f :
24
- tests_reqs = f .read ().splitlines ()
25
-
26
22
setup (
27
23
name = "CausalPy" ,
28
- version = version ,
24
+ version = __version__ ,
29
25
description = "Causal inference for quasi-experiments in Python" ,
30
26
long_description = get_long_description (),
31
27
long_description_content_type = "text/markdown" ,
@@ -36,5 +32,5 @@ def get_long_description():
36
32
python_requires = ">=3.8" ,
37
33
maintainer = "Benjamin T. Vincent" ,
38
34
install_requires = install_reqs ,
39
- tests_require = tests_reqs ,
35
+ # tests_require=test_reqs ,
40
36
)
0 commit comments