Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dnsviz/dnsviz.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasey Deccio <casey@deccio.net>2015-09-14 17:49:38 +0300
committerCasey Deccio <casey@deccio.net>2015-09-14 17:49:38 +0300
commit2c5231e98aef9e8494cb1fb565c0e88281c6b1da (patch)
treef3487cb415372aea76ab3ac88dd9764478d7218a /setup.py
parent75523de6c582dcf262f77d1213418ea09b0ae494 (diff)
Consider alternate roots
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 4931bec..b39d2df 100644
--- a/setup.py
+++ b/setup.py
@@ -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'])]