| from distutils.core import setup |
| def copytree(src, dst, symlinks=False, ignore=None): |
| if not os.path.exists(dst): |
| for item in os.listdir(src): |
| s = os.path.join(src, item) |
| d = os.path.join(dst, item) |
| copytree(s, d, symlinks, ignore) |
| if not os.path.exists(d) or os.stat(src).st_mtime - os.stat(dst).st_mtime > 1: |
| setup(name='planetstack', |
| description='PlanetStack', |
| scripts=['planetstack/planetstack-backend.py'], |
| ('/etc/planetstack/', ['planetstack/plstackapi_config']), |
| ('/lib/systemd/system/', ['planetstack/redhat/planetstack-backend.service']), |
| copytree('planetstack/', '/opt/planetstack') |