-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
75 lines (62 loc) · 2.14 KB
/
setup.py
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
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/env python
import os
import sys
#import ez_setup
#ez_setup.use_setuptools()
from setuptools import setup, find_packages
import subprocess
VERSION_FILE="VERSION"
def update_version():
if not os.path.isdir(".git"):
print "This does not appear to be a Git repository."
return
try:
p = subprocess.Popen(["git", "describe",
"--tags", "--always"],
stdout=subprocess.PIPE)
except EnvironmentError:
print "Warning: Unable to run git, not modifying VERSION"
return
stdout = p.communicate()[0]
if p.returncode != 0:
print "Warning: Unable to run git, not modifying VERSION"
return
ver = stdout.strip()
fn = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'VERSION')
f = open(fn, "w")
f.write(ver)
f.close()
print "KMeans VERSION: '%s'" % ver
def get_version():
try:
fn = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'VERSION')
f = open(fn)
version = f.read().strip()
f.close()
except EnvironmentError:
return "-1"
return version
update_version()
setup(name='Pilot-InMemory',
version=get_version(),
description='Pilot-Job Extension for In-Memory and Stream Computing',
author='Andre Luckow, et al.',
author_email='aluckow@cct.lsu.edu',
url='https://github.com/drelu/Pilot-KMeans',
classifiers = ['Development Status :: 5 - Production/Stable',
'Programming Language :: Python',
'Environment :: Console',
'Topic :: Utilities',
],
platforms = ('Unix', 'Linux', 'Mac OS'),
package_dir = {'':'src', 'basic':'examples'},
packages=['distributed_inmem', 'basic'],
include_package_data=True,
# data files for easy_install
data_files = [('', ['README.md', 'README.md']),
('', ['VERSION', 'VERSION'])],
# data files for pip
package_data = {},
install_requires=['argparse'],
entry_points = { }
)