|
@@ -3,22 +3,13 @@
|
3
|
3
|
from __future__ import with_statement
|
4
|
4
|
from distutils.core import setup
|
5
|
5
|
import os
|
|
6
|
+from cdiff import META_INFO as _meta
|
6
|
7
|
|
7
|
8
|
# Create symlink so that to use 'scripts' w/o '.py'
|
8
|
9
|
link_name = 'cdiff'
|
9
|
10
|
if os.path.exists(link_name):
|
10
|
11
|
os.unlink(link_name)
|
11
|
|
-os.symlink('src/cdiff.py', link_name)
|
12
|
|
-
|
13
|
|
-# This awfulness is all in aid of grabbing the version number out
|
14
|
|
-# of the source code, rather than having to repeat it here. Basically,
|
15
|
|
-# we parse out firt line starts with "__version__" and execute it
|
16
|
|
-#
|
17
|
|
-with open('cdiff') as script:
|
18
|
|
- for line in script:
|
19
|
|
- if line.startswith('__version__ = '):
|
20
|
|
- exec(line)
|
21
|
|
- break
|
|
12
|
+os.symlink('cdiff.py', link_name)
|
22
|
13
|
|
23
|
14
|
with open('README.rst') as doc:
|
24
|
15
|
long_description = doc.read()
|
|
@@ -27,15 +18,14 @@ with open('CHANGES') as changes:
|
27
|
18
|
|
28
|
19
|
setup(
|
29
|
20
|
name = 'cdiff',
|
30
|
|
- version = __version__,
|
31
|
|
- author = 'Matthew Wang',
|
32
|
|
- author_email = 'mattwyl(@)gmail(.)com',
|
33
|
|
- license = 'BSD-3',
|
34
|
|
- description = ('View colored, incremental diff in workspace, or given '
|
35
|
|
- 'file from stdin, with side by side and auto pager support'),
|
|
21
|
+ version = _meta['version'],
|
|
22
|
+ author = _meta['author'],
|
|
23
|
+ author_email = _meta['email'],
|
|
24
|
+ license = _meta['license'],
|
|
25
|
+ description = _meta['description'],
|
36
|
26
|
long_description = long_description,
|
37
|
|
- keywords = 'colored incremental side-by-side diff',
|
38
|
|
- url = 'https://github.com/ymattw/cdiff',
|
|
27
|
+ keywords = _meta['keywords'],
|
|
28
|
+ url = _meta['url'],
|
39
|
29
|
classifiers = [
|
40
|
30
|
'Development Status :: 4 - Beta',
|
41
|
31
|
'Topic :: Utilities',
|
|
@@ -47,8 +37,7 @@ setup(
|
47
|
37
|
'Operating System :: Unix',
|
48
|
38
|
'Programming Language :: Python',
|
49
|
39
|
],
|
50
|
|
- package_dir = {'': 'src'},
|
51
|
|
- packages = [''],
|
|
40
|
+ packages = [],
|
52
|
41
|
py_modules = ['cdiff'],
|
53
|
42
|
scripts = [link_name],
|
54
|
43
|
)
|