1
1
#!/usr/bin/env python
2
2
import sys
3
+ import os
3
4
4
5
from setuptools import setup , find_packages
5
6
from setuptools .command .test import test as TestCommand
6
7
7
- with open ("README.md" , "r" ) as fh :
8
- long_description = fh .read ()
8
+ here = os .path .abspath (os .path .dirname (__file__ ))
9
+ about = {}
10
+
11
+ with open (os .path .join (here , 'graphdiff' , '__version__.py' ), 'r' ) as f :
12
+ exec (f .read (), about )
13
+
14
+ with open ('README.md' , 'r' ) as f :
15
+ long_description = f .read ()
9
16
10
17
class PyTest (TestCommand ):
11
18
user_options = [("pytest-args=" , "a" , "Arguments to pass to pytest" )]
@@ -21,17 +28,17 @@ def run_tests(self):
21
28
sys .exit (errno )
22
29
23
30
setup (
24
- name = "graphdiff" ,
25
- version = "0.0.5" ,
26
- author = "Avi Yeger" ,
27
- author_email = "yeger00@gmail.com" ,
28
- description = "" ,
31
+ name = about [ '__title__' ] ,
32
+ version = about [ '__version__' ] ,
33
+ author = about [ '__author__' ] ,
34
+ author_email = about [ '__author_email__' ] ,
35
+ description = about [ '__description__' ] ,
29
36
long_description = long_description ,
30
- long_description_content_type = " text/markdown" ,
31
- url = "https://github.com/yeger00/" ,
37
+ long_description_content_type = ' text/markdown' ,
38
+ url = about [ '__url__' ] ,
32
39
packages = find_packages (),
33
- install_requires = [" pydot" ],
34
- tests_require = [" pytest" , " pytest_mock" ],
35
- cmdclass = {" test" : PyTest },
36
- scripts = [" bin/graph-diff" , " bin/graph-diff-color" , " bin/git-graph-diff-tool" ]
40
+ install_requires = [' pydot' ],
41
+ tests_require = [' pytest' , ' pytest_mock' ],
42
+ cmdclass = {' test' : PyTest },
43
+ scripts = [' bin/graph-diff' , ' bin/graph-diff-color' , ' bin/git-graph-diff-tool' ]
37
44
)
0 commit comments