Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit dca8f08

Browse files
committedJan 18, 2015
fix manpage bullshit (#1434)
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
1 parent b7c6572 commit dca8f08

File tree

6 files changed

+6
-128
lines changed

6 files changed

+6
-128
lines changed
 

‎CHANGES.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
New in master
1+
New in v7.3.0
22
=============
33

44
Features

‎docs/man/nikola.1

-97
This file was deleted.

‎docs/man/nikola.1.gz

894 Bytes
Binary file not shown.

‎scripts/set_version.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import re
1010
import sys
1111
import glob
12+
import subprocess
1213

1314

1415
def sed_like_thing(pattern, repl, path):
@@ -34,4 +35,5 @@ def sed_like_thing(pattern, repl, path):
3435
sed_like_thing("release = .*", "release = '{0}'".format(version), os.path.join('docs', 'sphinx', 'conf.py'))
3536
sed_like_thing('__version__ = ".*"', '__version__ = "{0}"'.format(version), os.path.join('nikola', '__init__.py'))
3637
sed_like_thing('New in master', 'New in v{0}'.format(version), 'CHANGES.txt')
37-
os.system("help2man -h help -N --version-string='{0}' nikola > {1}".format(version, os.path.join('docs', 'man', 'nikola.1')))
38+
subprocess.call(["help2man", "-N", "--version-string={0}".format(version), "-n", "static site and blog generator", "-o", os.path.join('docs', 'man', 'nikola.1'), "nikola"])
39+
subprocess.call(["gzip", "-f", os.path.join('docs', 'man', 'nikola.1')])

‎setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[wheel]
2-
universal = 0
2+
universal = 1
33

44
[flake8]
55
ignore=E501

‎setup.py

+1-28
Original file line numberDiff line numberDiff line change
@@ -96,33 +96,6 @@ def expands_symlinks_for_windows():
9696
"\n\tYour best bet is to start again from clean.")
9797

9898

99-
def install_manpages(root, prefix):
100-
try:
101-
man_pages = [
102-
('docs/man/nikola.1', 'share/man/man1/nikola.1'),
103-
]
104-
join = os.path.join
105-
normpath = os.path.normpath
106-
if root is not None:
107-
prefix = os.path.realpath(root) + os.path.sep + prefix
108-
for src, dst in man_pages:
109-
path_dst = join(normpath(prefix), normpath(dst))
110-
try:
111-
os.makedirs(os.path.dirname(path_dst))
112-
except OSError:
113-
pass
114-
rst2man_cmd = ['rst2man.py', 'rst2man']
115-
for rst2man in rst2man_cmd:
116-
try:
117-
subprocess.call([rst2man, src, path_dst])
118-
except OSError:
119-
continue
120-
else:
121-
break
122-
except Exception as e:
123-
print("Not installing the man pages:", e)
124-
125-
12699
def remove_old_files(self):
127100
tree = os.path.join(self.install_lib, 'nikola')
128101
try:
@@ -136,7 +109,6 @@ def run(self):
136109
expands_symlinks_for_windows()
137110
remove_old_files(self)
138111
install.run(self)
139-
install_manpages(self.root, self.prefix)
140112

141113

142114
setup(name='Nikola',
@@ -187,6 +159,7 @@ def run(self):
187159
'docs/manual.txt',
188160
'docs/theming.txt',
189161
'docs/extending.txt']),
162+
('share/man/man1', ['docs/man/nikola.1.gz']),
190163
],
191164
entry_points = {
192165
'console_scripts': [

0 commit comments

Comments
 (0)
Please sign in to comment.