66README_FILE = os .path .join (PROJECT_ROOT , "README.md" )
77VERSION_FILE = os .path .join (PROJECT_ROOT , "causalpy" , "version.py" )
88REQUIREMENTS_FILE = os .path .join (PROJECT_ROOT , "requirements.txt" )
9- TEST_REQUIREMENTS_FILE = os .path .join (PROJECT_ROOT , "requirements-test.txt" )
109
1110
1211def get_long_description ():
1312 with open (README_FILE , encoding = "utf-8" ) as f :
1413 return f .read ()
1514
1615
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 () )
1918
2019with open (REQUIREMENTS_FILE ) as f :
2120 install_reqs = f .read ().splitlines ()
2221
23- with open (TEST_REQUIREMENTS_FILE ) as f :
24- tests_reqs = f .read ().splitlines ()
25-
2622setup (
2723 name = "CausalPy" ,
28- version = version ,
24+ version = __version__ ,
2925 description = "Causal inference for quasi-experiments in Python" ,
3026 long_description = get_long_description (),
3127 long_description_content_type = "text/markdown" ,
@@ -36,5 +32,5 @@ def get_long_description():
3632 python_requires = ">=3.8" ,
3733 maintainer = "Benjamin T. Vincent" ,
3834 install_requires = install_reqs ,
39- tests_require = tests_reqs ,
35+ # tests_require=test_reqs ,
4036)
0 commit comments