Avoid symlinks in the manpage path.
* 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
This commit is contained in:
parent
a56046a21d
commit
4b286c2c44
11
setup.py
11
setup.py
@ -17,6 +17,7 @@
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from distutils.command.install import install as du_install
|
from distutils.command.install import install as du_install
|
||||||
from setuptools.command.install import install
|
from setuptools.command.install import install
|
||||||
|
import os.path
|
||||||
|
|
||||||
# version comes from git-review.
|
# version comes from git-review.
|
||||||
savename = __name__
|
savename = __name__
|
||||||
@ -34,6 +35,14 @@ class git_review_install(install):
|
|||||||
|
|
||||||
git_review_cmdclass = {'install': git_review_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(
|
setup(
|
||||||
name='git-review',
|
name='git-review',
|
||||||
version=version,
|
version=version,
|
||||||
@ -49,6 +58,6 @@ setup(
|
|||||||
author_email='openstack@lists.launchpad.net',
|
author_email='openstack@lists.launchpad.net',
|
||||||
url='https://launchpad.net/git-review',
|
url='https://launchpad.net/git-review',
|
||||||
scripts=['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'],
|
install_requires=['argparse'],
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user