From 76684dccd384a7196dcbbc497c7e515a4a9cdd36 Mon Sep 17 00:00:00 2001 From: Salim Fadhley Date: Sun, 8 Jan 2012 13:36:00 +0000 Subject: [PATCH] More tweaks. --- doc/source/conf.py | 20 ++++++++++++++------ setup.py | 11 +++++++---- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index f368333..61afabb 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -11,12 +11,20 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os +import sys, os, logging + +log = logging.getLogger(__name__) + +DOC_SOURCE_DIR, _ = os.path.split( os.path.abspath(__file__) ) +DOC_DIR, _ = os.path.split( DOC_SOURCE_DIR ) +PROJECT_DIR, _ = os.path.split( DOC_DIR ) +#log.warn( "Using %s as project dir" % PROJECT_DIR ) # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, PROJECT_DIR ) +import setup as jenkinsapi_setup # -- General configuration ----------------------------------------------------- @@ -40,17 +48,17 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'JenkinsAPI' -copyright = u'2012, Salim Fadhley, Ramon van Alteren' +project = jenkinsapi_setup.PROJECT_NAME +copyright = u'2011, %s' % jenkinsapi_setup.PROJECT_AUTHORS # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '0.1' +version = jenkinsapi_setup.VERSION # The full version, including alpha/beta/rc tags. -release = '0.1' +release = jenkinsapi_setup.REVISION # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index 355c8c9..44618bd 100644 --- a/setup.py +++ b/setup.py @@ -4,16 +4,19 @@ 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(sys.argv[0]) +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='jenkinsapi', - version='0.1', - author="Salim Fadhley, Ramon van Alteren", +setup(name=PROJECT_NAME, + version=VERSION, + author=PROJECT_AUTHORS, author_email='salimfadhley@gmail.com, ramon@vanalteren.nl', packages=find_packages('.'), zip_safe=True, -- 2.34.1