Skip to content

Commit

Permalink
Library functions and modules should be in the 3 man page section. Al…
Browse files Browse the repository at this point in the history
…so the files should end in '.3'
  • Loading branch information
tbielawa committed Oct 3, 2012
1 parent 53d24ef commit 85fb7c6
Show file tree
Hide file tree
Showing 45 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# make deb ------------------ produce a DEB
# make docs ----------------- rebuild the manpages (results are checked in)
# make tests ---------------- run the tests
# make pyflakes, make pep8 -- source code checks
# make pyflakes, make pep8 -- source code checks

########################################################
# variable section
Expand Down Expand Up @@ -58,7 +58,7 @@ RPMNVR = "$(NAME)-$(VERSION)-$(RPMRELEASE)$(RPMDIST)"

all: clean python

tests:
tests:
PYTHONPATH=./lib nosetests -d -v

# To force a rebuild of the docs run 'touch VERSION && make docs'
Expand Down Expand Up @@ -161,4 +161,4 @@ deb: debian
# for arch or gentoo, read instructions in the appropriate 'packaging' subdirectory directory

modulepages:
hacking/module_formatter.py -A $(VERSION) -t man -o docs/man/man1/ --module-dir=library --template-dir=hacking/templates
hacking/module_formatter.py -A $(VERSION) -t man -o docs/man/man3/ --module-dir=library --template-dir=hacking/templates
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions hacking/module_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def get_docstring(filename, verbose=False):
if isinstance(child, ast.Assign):
if 'DOCUMENTATION' in (t.id for t in child.targets):
doc = yaml.load(child.value.s)

except:
if verbose:
raise
Expand Down Expand Up @@ -210,7 +210,7 @@ def main():

module_dir = None
args = p.parse_args()

# print "M: %s" % args.module_dir
# print "t: %s" % args.type
# print "m: %s" % args.module_list
Expand Down Expand Up @@ -251,7 +251,7 @@ def main():
if args.type == 'man':
env.filters['jpfunc'] = man_ify
template = env.get_template('man.j2')
outputname = "ansible.%s.man"
outputname = "ansible.%s.3"
includecmt = ""
includefmt = ""
if args.type == 'rst':
Expand Down Expand Up @@ -330,7 +330,7 @@ def main():
#
# # Sneaky: insert author's name from Git config
#
# cmd = subprocess.Popen("git config --get user.name", shell=True,
# cmd = subprocess.Popen("git config --get user.name", shell=True,
# stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# out, err = cmd.communicate()
#
Expand Down
4 changes: 3 additions & 1 deletion packaging/rpm/ansible.spec
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ are transferred to managed machines automatically.
mkdir -p $RPM_BUILD_ROOT/etc/ansible/
cp examples/hosts $RPM_BUILD_ROOT/etc/ansible/
cp examples/ansible.cfg $RPM_BUILD_ROOT/etc/ansible/
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/{man1,man3}/
cp -v docs/man/man1/*.1 $RPM_BUILD_ROOT/%{_mandir}/man1/
cp -v docs/man/man3/*.3 $RPM_BUILD_ROOT/%{_mandir}/man3/
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/ansible
cp -v library/* $RPM_BUILD_ROOT/%{_datadir}/ansible/

Expand All @@ -56,6 +57,7 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) %{_sysconfdir}/ansible
%doc README.md PKG-INFO COPYING
%doc %{_mandir}/man1/ansible*
%doc %{_mandir}/man3/ansible.*
%doc examples/playbooks

%changelog
Expand Down

0 comments on commit 85fb7c6

Please sign in to comment.