Skip to content

Commit

Permalink
Always build manpages before install
Browse files Browse the repository at this point in the history
  • Loading branch information
unbrice committed Oct 2, 2015
1 parent 0f63df7 commit c085f57
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,27 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

from distutils.command import build
from distutils.command import build as upstream_build
from distutils.command import install as upstream_install
import setuptools
from sphinx import setup_command as sphinx_command

from py1 import constants


class build(build.build):
sub_commands = build.build.sub_commands + [
class build(upstream_build.build):
"""Builds man pages and spinx doc as well."""
sub_commands = upstream_build.build.sub_commands + [
('build_man', None),
('build_sphinx', None),
]


class install(upstream_install.install):
"""Builds man pages and spinx doc before to install."""
sub_commands = upstream_install.install.sub_commands + [
('build_man', None),
('build_sphinx', None),
]


Expand Down Expand Up @@ -63,8 +73,9 @@ class build(build.build):
data_files=[('share/man/man1', ['build/sphinx/man/py1.1'])],
cmdclass={
'build_man': sphinx_command.BuildDoc,
# Setups our build command that also builds the doc.
# Setups our build and install command that also builds the doc.
'build': build,
'install': install,
},
command_options={
'build_man': {
Expand All @@ -80,7 +91,7 @@ class build(build.build):

keywords='scripting awk one-liner oneliner',

# https://pypi.python.org/pypi?%3Aaction=list_classifiers
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
Expand Down

0 comments on commit c085f57

Please sign in to comment.