diff options
author | Casey Deccio <casey@deccio.net> | 2015-09-14 17:49:38 +0300 |
---|---|---|
committer | Casey Deccio <casey@deccio.net> | 2015-09-14 17:49:38 +0300 |
commit | 2c5231e98aef9e8494cb1fb565c0e88281c6b1da (patch) | |
tree | f3487cb415372aea76ab3ac88dd9764478d7218a /setup.py | |
parent | 75523de6c582dcf262f77d1213418ea09b0ae494 (diff) |
Consider alternate roots
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -50,7 +50,13 @@ class MyBuild(build): class MyInstall(install): def run(self): - apply_substitutions(os.path.join('dnsviz','config.py.in'), self.install_data) + # if this an alternate root is specified, then embed the install_data + # path relative to that alternate root + if self.root is not None: + install_data = os.path.join(os.path.sep, os.path.relpath(self.install_data, self.root)) + else: + install_data = self.install_data + apply_substitutions(os.path.join('dnsviz','config.py.in'), install_data) install.run(self) DOC_FILES = [('share/doc/dnsviz', ['README.md', 'LICENSE', 'COPYRIGHT'])] |