From 992d489177a5f2aef564141bf3d3dd1a99224586 Mon Sep 17 00:00:00 2001 From: Salim Fadhley Date: Mon, 9 Jan 2012 17:20:33 +0000 Subject: [PATCH] More tweaks, finally getting the hang of Sphinx --- doc/run_epydoc.py | 15 --------------- doc/source/conf.py | 7 +++++-- doc/source/index.rst | 10 ++++++++-- setup.py | 22 +++++----------------- setup_config.py | 18 ++++++++++++++++++ 5 files changed, 36 insertions(+), 36 deletions(-) delete mode 100644 doc/run_epydoc.py create mode 100644 setup_config.py diff --git a/doc/run_epydoc.py b/doc/run_epydoc.py deleted file mode 100644 index aeb8556..0000000 --- a/doc/run_epydoc.py +++ /dev/null @@ -1,15 +0,0 @@ -import os, sys - -try: - from epydoc.cli import cli -except ImportError: - from pkg_resources import require - require("epydoc>=3.0.1") - from epydoc.cli import cli - -DOC_DIR, _ = os.path.split( os.path.abspath( __file__ ) ) -PROJECT_DIR, _ = os.path.split( DOC_DIR ) - -sys.path.insert( 0, PROJECT_DIR ) - -cli() \ No newline at end of file diff --git a/doc/source/conf.py b/doc/source/conf.py index d4ce6e0..c4e7d27 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -22,6 +22,9 @@ PROJECT_DIR, _ = os.path.split( DOC_DIR ) # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, PROJECT_DIR ) +#Sanity check +import jenkinsapi + # Config file import setup_config as jenkinsapi_setup_config @@ -77,7 +80,7 @@ exclude_patterns = [] #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True +add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). @@ -85,7 +88,7 @@ exclude_patterns = [] # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. -#show_authors = False +show_authors = True # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' diff --git a/doc/source/index.rst b/doc/source/index.rst index 66f59d9..848f627 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -3,14 +3,20 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to JenkinsAPI's documentation! -======================================= +Welcome to the JenkinsAPI project documentation +=============================================== Contents: .. toctree:: :maxdepth: 2 +.. automodule:: jenkinsapi + :members: + +.. automodule:: jenkinsapi.api + :members: + Indices and tables diff --git a/setup.py b/setup.py index 44618bd..6fccfce 100644 --- a/setup.py +++ b/setup.py @@ -1,28 +1,16 @@ from setuptools import setup, find_packages import sys, os +from setup_config import DESCRIPTION, VERSION, PROJECT_NAME, PROJECT_AUTHORS, GLOBAL_ENTRY_POINTS, PROJECT_EMAILS, PROJECT_URL, SHORT_DESCRIPTION -# Use the README file as the long-description for the project. -# This makes sure that the PyPi index page contains automatically -# generated documentation. -PROJECT_ROOT, _ = os.path.split(__file__) -DESCRIPTION = open( os.path.join(PROJECT_ROOT, "README") ).read() -VERSION = REVISION = '0.1.1' -PROJECT_NAME = 'jenkinsapi' -PROJECT_AUTHORS = "Salim Fadhley, Ramon van Alteren" - -GLOBAL_ENTRY_POINTS = { - "console_scripts":[ "jenkins_invoke=jenkinsapi.command_line.jenkins_invoke:main"] - } - -setup(name=PROJECT_NAME, +setup(name=PROJECT_NAME.lower(), version=VERSION, author=PROJECT_AUTHORS, - author_email='salimfadhley@gmail.com, ramon@vanalteren.nl', + author_email=PROJECT_EMAILS, packages=find_packages('.'), zip_safe=True, include_package_data = False, entry_points = GLOBAL_ENTRY_POINTS, - url="https://github.com/salimfadhley/jenkinsapi", - description='A Python API for accessing resources on a Jenkins continuous-integration server.', + url=PROJECT_URL, + description=SHORT_DESCRIPTION, long_description=DESCRIPTION, ) diff --git a/setup_config.py b/setup_config.py new file mode 100644 index 0000000..fc1daa4 --- /dev/null +++ b/setup_config.py @@ -0,0 +1,18 @@ +from setuptools import setup, find_packages +import sys, os + +# Use the README file as the long-description for the project. +# This makes sure that the PyPi index page contains automatically +# generated documentation. +PROJECT_ROOT, _ = os.path.split(__file__) +DESCRIPTION = open( os.path.join(PROJECT_ROOT, "README") ).read() +VERSION = REVISION = '0.1.1' +PROJECT_NAME = 'JenkinsAPI' +PROJECT_AUTHORS = "Salim Fadhley, Ramon van Alteren, Ruslan Lutsenko" +PROJECT_EMAILS = 'salimfadhley@gmail.com, ramon@vanalteren.nl, ruslan.lutcenko@gmail.com', +PROJECT_URL = "https://github.com/salimfadhley/jenkinsapi" +SHORT_DESCRIPTION = 'A Python API for accessing resources on a Jenkins continuous-integration server.' + +GLOBAL_ENTRY_POINTS = { + "console_scripts":[ "jenkins_invoke=jenkinsapi.command_line.jenkins_invoke:main"] + } \ No newline at end of file -- 2.34.1