summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorJeremy Stanley <fungi@yuggoth.org>2012-10-31 20:34:05 +0000
committerJeremy Stanley <fungi@yuggoth.org>2012-11-02 02:31:51 +0000
commit4b286c2c44088373e40d057401d1a4e228099a49 (patch)
treed9763c5ac09972af58e4e3ed83fab407df18aea0 /setup.py
parenta56046a21d042e978bd04b06f21aff4f9026b2c8 (diff)
downloadgit-review-4b286c2c44088373e40d057401d1a4e228099a49.tar.gz
Avoid symlinks in the manpage path.1.20
* setup.py: This works around bug 1073766, what appears to be an upstream installer issue exposed by e7b8dc61. When attempting to idempotently create the full destination path, it will fail cryptically on any existing symlink it finds (expecting only real directories). Change-Id: I1e502b86854fd6ac57974b579af48cd75d3e7752
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 25654e1..27765fb 100755
--- a/setup.py
+++ b/setup.py
@@ -17,6 +17,7 @@
from setuptools import setup
from distutils.command.install import install as du_install
from setuptools.command.install import install
+import os.path
# version comes from git-review.
savename = __name__
@@ -34,6 +35,14 @@ class git_review_install(install):
git_review_cmdclass = {'install': git_review_install}
+manpath = 'man'
+if os.path.realpath('/usr/local/man') == '/usr/local/share/man':
+ # This works around a bug with install where it expects every node
+ # in the relative data directory to be an actual directory, since at
+ # least Debian derivatives (and probably other platforms as well)
+ # like to symlink Unixish /usr/local/man to /usr/local/share/man.
+ manpath = os.path.join('share', manpath)
+
setup(
name='git-review',
version=version,
@@ -49,6 +58,6 @@ setup(
author_email='openstack@lists.launchpad.net',
url='https://launchpad.net/git-review',
scripts=['git-review'],
- data_files=[('man/man1', ['git-review.1'])],
+ data_files=[(os.path.join(manpath, 'man1'), ['git-review.1'])],
install_requires=['argparse'],
)