blob: 6f26f7932914e618da92aa2a902111c75d85071f [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 Baker019c5ac2015-02-16 22:27:26 -080020 scripts=['planetstack/xos-observer.py'],
Tony Mack45ab56b2013-03-28 20:17:17 -040021 data_files=[
Scott Baker019c5ac2015-02-16 22:27:26 -080022 ('/lib/systemd/system/', ['planetstack/redhat/xos-observer.service']),
Tony Mack45ab56b2013-03-28 20:17:17 -040023 ])
Tony Mackc663d442013-05-10 16:51:12 -040024
Scott Baker201ae3f2015-02-04 23:35:48 -080025copytree('planetstack/', '/opt/xos')