From 3dfb104e8c4c2e7785727fb0c3f78a4f8a224c56 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Tue, 6 Jan 2015 13:44:34 -0800 Subject: gkeys, gkeys-gen: Fix man page installation --- gkeys-gen/setup.py | 22 +++------------------- gkeys/setup.py | 22 +++------------------- 2 files changed, 6 insertions(+), 38 deletions(-) diff --git a/gkeys-gen/setup.py b/gkeys-gen/setup.py index fc93bf0..15c3434 100755 --- a/gkeys-gen/setup.py +++ b/gkeys-gen/setup.py @@ -1,12 +1,12 @@ #!/usr/bin/env python -import collections import os import sys from distutils.core import setup, Command from distutils.command.build import build +from glob import glob from gkeygen import __version__, __license__ @@ -67,23 +67,6 @@ class build_man(Command): man.make_subpages(Action_Map, Available_Actions) -def get_manpages(): - linguas = os.environ.get('LINGUAS') - if linguas is not None: - linguas = linguas.split() - - for dirpath, dirnames, filenames in os.walk('doc'): - groups = collections.defaultdict(list) - for f in filenames: - fn, suffix = f.rsplit('.', 1) - groups[suffix].append(os.path.join(dirpath, f)) - - topdir = dirpath[len('doc/'):] - if not topdir or linguas is None or topdir in linguas: - for g, mans in groups.items(): - yield [os.path.join('$mandir', topdir, 'man%s' % g), mans] - - setup( name='gkeys-gen', version=__version__, @@ -96,8 +79,9 @@ setup( download_url='', packages=['gkeygen'], scripts=['bin/gkey-gen'], - data_files=list(get_manpages()) + [ + data_files=[ (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'etc/gkeys/'), ['etc/gkeys-gen.conf']), + (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'usr/share/man/man1'), glob('doc/*')), ], license=__license__, long_description=open('README.md').read(), diff --git a/gkeys/setup.py b/gkeys/setup.py index d6b38af..fdb8e18 100755 --- a/gkeys/setup.py +++ b/gkeys/setup.py @@ -1,12 +1,12 @@ #!/usr/bin/env python -import collections import os import sys from distutils.core import setup, Command from distutils.command.build import build +from glob import glob from gkeys import __version__, __license__ @@ -67,23 +67,6 @@ class build_man(Command): man.make_subpages(Action_Map, Available_Actions) -def get_manpages(): - linguas = os.environ.get('LINGUAS') - if linguas is not None: - linguas = linguas.split() - - for dirpath, dirnames, filenames in os.walk('doc'): - groups = collections.defaultdict(list) - for f in filenames: - fn, suffix = f.rsplit('.', 1) - groups[suffix].append(os.path.join(dirpath, f)) - - topdir = dirpath[len('doc/'):] - if not topdir or linguas is None or topdir in linguas: - for g, mans in groups.items(): - yield [os.path.join('$mandir', topdir, 'man%s' % g), mans] - - setup( name='gkeys', version=__version__, @@ -96,9 +79,10 @@ setup( download_url='', packages=['gkeys'], scripts=['bin/gkeys'], - data_files=list(get_manpages()) + [ + data_files=[ (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'etc/gkeys/'), ['etc/gkeys.conf']), (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'etc/gkeys/'), ['etc/gkeys.conf.sample']), + (os.path.join(os.sep, EPREFIX.lstrip(os.sep), 'usr/share/man/man1'), glob('doc/*')), ], license=__license__, long_description=open('README.md').read(), -- cgit v1.2.3-65-gdbad