aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'gkeys-gen/setup.py')
-rwxr-xr-xgkeys-gen/setup.py22
1 files changed, 3 insertions, 19 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(),