Skip to content
Permalink
Browse files

fix manpage bullshit (#1434)

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jan 18, 2015
1 parent b7c6572 commit dca8f0849317481db6a017497c6925a9bb6e542b
Showing with 6 additions and 128 deletions.
  1. +1 −1 CHANGES.txt
  2. +0 −97 docs/man/nikola.1
  3. BIN docs/man/nikola.1.gz
  4. +3 −1 scripts/set_version.py
  5. +1 −1 setup.cfg
  6. +1 −28 setup.py
@@ -1,4 +1,4 @@
New in master
New in v7.3.0
=============

Features

This file was deleted.

BIN +894 Bytes docs/man/nikola.1.gz
Binary file not shown.
@@ -9,6 +9,7 @@
import re
import sys
import glob
import subprocess


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

[flake8]
ignore=E501
@@ -96,33 +96,6 @@ def expands_symlinks_for_windows():
"\n\tYour best bet is to start again from clean.")


def install_manpages(root, prefix):
try:
man_pages = [
('docs/man/nikola.1', 'share/man/man1/nikola.1'),
]
join = os.path.join
normpath = os.path.normpath
if root is not None:
prefix = os.path.realpath(root) + os.path.sep + prefix
for src, dst in man_pages:
path_dst = join(normpath(prefix), normpath(dst))
try:
os.makedirs(os.path.dirname(path_dst))
except OSError:
pass
rst2man_cmd = ['rst2man.py', 'rst2man']
for rst2man in rst2man_cmd:
try:
subprocess.call([rst2man, src, path_dst])
except OSError:
continue
else:
break
except Exception as e:
print("Not installing the man pages:", e)


def remove_old_files(self):
tree = os.path.join(self.install_lib, 'nikola')
try:
@@ -136,7 +109,6 @@ def run(self):
expands_symlinks_for_windows()
remove_old_files(self)
install.run(self)
install_manpages(self.root, self.prefix)


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

0 comments on commit dca8f08

Please sign in to comment.
You can’t perform that action at this time.