Move ipa.1 man file

setuptools does not support data_files any more. The ipa(1) man page is
now handled like the remaining man pages.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
Christian Heimes
2016-10-17 15:56:41 +02:00
committed by Martin Basti
parent 16dad1c3cb
commit b9d68b5c35
4 changed files with 2 additions and 44 deletions

View File

@@ -10,7 +10,8 @@ man1_MANS = \
ipa-client-install.1 \
ipa-client-automount.1 \
ipa-certupdate.1 \
ipa-join.1
ipa-join.1 \
ipa.1
man5_MANS = \
default.conf.5

View File

@@ -70,7 +70,6 @@ def setup_package():
"ipaclient.remote_plugins.2_164",
],
scripts=['../ipa'],
data_files = [('share/man/man1', ["../ipa.1"])],
)
finally:
del sys.path[0]

View File

@@ -24,50 +24,8 @@ Python-level packaging using distutils.
"""
from distutils.core import setup
from distutils.command.install_data import install_data as _install_data
from distutils.util import change_root, convert_path
from distutils import log
import ipalib
import os
class install_data(_install_data):
"""Override the built-in install_data to gzip files once they
are installed.
"""
def run(self):
# install_data is a classic class so super() won't work. Call it
# directly to copy the files first.
_install_data.run(self)
# Now gzip them
for f in self.data_files:
if isinstance(f, str):
# it's a simple file
f = convert_path(f)
cmd = '/bin/gzip %s/%s' % (self.install_dir, f)
log.info("gzipping %s/%s" % (self.install_dir, f))
os.system(cmd)
else:
# it's a tuple with path and a list of files
dir = convert_path(f[0])
if not os.path.isabs(dir):
dir = os.path.join(self.install_dir, dir)
elif self.root:
dir = change_root(self.root, dir)
if f[1] == []:
# If there are no files listed the user must be
# trying to create an empty directory. So nothing
# to do here.
pass
else:
# gzip the files
for data in f[1]:
data = convert_path(data)
cmd = '/bin/gzip %s/%s' % (dir, data)
log.info("gzipping %s/%s" % (dir, data))
os.system(cmd)
setup(
name='freeipa',