aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2015-01-06 13:44:34 -0800
committerBrian Dolbec <dolsen@gentoo.org>2015-01-06 13:44:34 -0800
commit3dfb104e8c4c2e7785727fb0c3f78a4f8a224c56 (patch)
treee998512efac4c74788a585dfc964aa39a0e88d22
parentgkeys, gkeys-gen: set version to "0.1" (diff)
downloadgentoo-keys-3dfb104e8c4c2e7785727fb0c3f78a4f8a224c56.tar.gz
gentoo-keys-3dfb104e8c4c2e7785727fb0c3f78a4f8a224c56.tar.bz2
gentoo-keys-3dfb104e8c4c2e7785727fb0c3f78a4f8a224c56.zip
gkeys, gkeys-gen: Fix man page installation
-rwxr-xr-xgkeys-gen/setup.py22
-rwxr-xr-xgkeys/setup.py22
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(),