-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·64 lines (57 loc) · 1.56 KB
/
setup.py
File metadata and controls
executable file
·64 lines (57 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env python
"""enplot: a one-line command line plotting tool for CSV data
enplot is a simple plotting tool for quickly visualizing data in CSV and
related formats. It uses Python/Scipy/matplotlib as backend.
"""
import os
from setuptools import setup
DOCLINES = __doc__.split('\n')
CLASSIFIERS = """\
Programming Language :: Python
Topic :: Engineering
Operating System :: POSIX
Operating System :: Unix
"""
NAME = "enplot"
MAJOR = 1
MINOR = 1
MICRO = 0
ISRELEASED = False
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
REVISION = 0 + int(os.popen("git rev-list --all | wc -l").read())
def write_version_py(filename=NAME+'/version.py'):
if os.path.exists(filename):
os.remove(filename)
cnt = """\
# THIS FILE IS AUTOMATICALLY GENERATED BY ENPLOT SETUP.PY
version = '%(version)s'
revision = %(revision)s
release = %(isrelease)s
"""
a = open(filename, 'w')
try:
a.write(cnt % {'version': VERSION,
'revision': REVISION,
'isrelease': str(ISRELEASED)})
finally:
a.close()
write_version_py()
setup(
name=NAME,
version=VERSION,
packages=['enplot'],
author="Robert Johansson",
author_email="jrjohansson@gmail.com",
license="LGPL",
description=DOCLINES[0],
long_description="\n".join(DOCLINES[2:]),
keywords="plotting, one-line, command-line",
url="http://github.com/jrjohansson",
platforms=["Linux", "Unix"],
package_data={'enplot': ['*.png'], },
entry_points={
'console_scripts': [
'enplot = enplot.run:main'
]
}
)