blob: 11622797485de58dd1ddbd95ac4c944ef0242e79 [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',
Scott Baker29397412015-02-18 22:30:22 -080020 scripts=['xos/xos-observer.py'],
Tony Mack45ab56b2013-03-28 20:17:17 -040021 data_files=[
Scott Baker29397412015-02-18 22:30:22 -080022 ('/lib/systemd/system/', ['xos/redhat/xos-observer.service']),
Tony Mack45ab56b2013-03-28 20:17:17 -040023 ])
Tony Mackc663d442013-05-10 16:51:12 -040024
Scott Baker29397412015-02-18 22:30:22 -080025copytree('xos/', '/opt/xos')