blob: bc486e56d9361b32283b803a30e3df46e6be37f9 [file] [log] [blame]
Tony Mackc663d442013-05-10 16:51:12 -04001import os
2import shutil
Tony Mack0d44f862013-03-26 13:27:37 -04003from distutils.core import setup
Tony Mack0d44f862013-03-26 13:27:37 -04004
Tony Mackc663d442013-05-10 16:51:12 -04005def copytree(src, dst, symlinks=False, ignore=None):
6 if not os.path.exists(dst):
7 os.makedirs(dst)
8 for item in os.listdir(src):
9 s = os.path.join(src, item)
10 d = os.path.join(dst, item)
11 if os.path.isdir(s):
12 copytree(s, d, symlinks, ignore)
13 else:
14 if not os.path.exists(d) or os.stat(src).st_mtime - os.stat(dst).st_mtime > 1:
15 shutil.copy2(s, d)
16
17setup(name='planetstack',
Tony Mack0d44f862013-03-26 13:27:37 -040018 version='0.1',
Tony Mackc663d442013-05-10 16:51:12 -040019 description='PlanetStack',
Tony Mack9b7a8bd2013-06-24 15:08:01 -040020 scripts=['planetstack/planetstack-backend.py'],
Tony Mack45ab56b2013-03-28 20:17:17 -040021 data_files=[
Tony Mackc663d442013-05-10 16:51:12 -040022 ('/etc/planetstack/', ['planetstack/plstackapi_config']),
Andy Bavier1e2c2322013-10-28 15:17:35 -040023 ('/lib/systemd/system/', ['planetstack/redhat/planetstack-backend.service']),
Tony Mack45ab56b2013-03-28 20:17:17 -040024 ])
Tony Mackc663d442013-05-10 16:51:12 -040025
Scott Baker13007262015-02-04 23:35:48 -080026copytree('planetstack/', '/opt/xos')