From 35c19edb32e1698bb79320fbbac57ee08ce46df4 Mon Sep 17 00:00:00 2001 From: Guillaume Chazarain Date: Fri, 23 May 2008 00:24:57 +0200 Subject: [PATCH] Package the man page --- MANIFEST.in | 1 + install-rpm.sh | 19 +++++++++++++++++++ setup.cfg | 5 +---- setup.py | 1 + 4 files changed, 22 insertions(+), 4 deletions(-) create mode 100755 install-rpm.sh diff --git a/MANIFEST.in b/MANIFEST.in index 3076b60..44c591d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ include COPYING include NEWS include THANKS +include iotop.1 include setuptools-0.6c6-py2.4.egg diff --git a/install-rpm.sh b/install-rpm.sh new file mode 100755 index 0000000..ba8b955 --- /dev/null +++ b/install-rpm.sh @@ -0,0 +1,19 @@ +#! /bin/sh +# +# Copied from: http://trac.edgewall.org/ticket/1141 +# +# this file is *inserted* into the install section of the generated +# spec file +# + +# this is, what dist.py normally does +./setup.py install --root=${RPM_BUILD_ROOT} --record="INSTALLED_FILES" + +# catch compressed man pages +sed -i -e 's@\(.\+/man/man[[:digit:]]/.\+\.[[:digit:]]\)$@\1*@' "INSTALLED_FILES" + +# catch any compiled python files (.pyc, .pyo), but don't list them twice +sed -i -e 's@\(.\+\)\.py$@\1.py*@' \ + -e '/.\+\.pyc$/d' \ + "INSTALLED_FILES" + diff --git a/setup.cfg b/setup.cfg index 140c30c..88475b3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,3 @@ -[install] -optimize=1 - [bdist_rpm] +install_script = install-rpm.sh doc_files = COPYING NEWS THANKS -group = Applications/System diff --git a/setup.py b/setup.py index 85628fc..9f1c747 100755 --- a/setup.py +++ b/setup.py @@ -16,6 +16,7 @@ process is the I/O going on.''', author_email='guichaz@gmail.com', url='http://guichaz.free.fr/iotop', scripts=['bin/iotop'], + data_files=[('share/man/man1', ['iotop.1'])], packages=find_packages(), include_package_data=True, license='GPL' -- 2.11.4.GIT