From dad1ca0edfe48b933388f8350da560362cb6a04d Mon Sep 17 00:00:00 2001 From: Salim Fadhley Date: Sat, 1 Jun 2013 01:18:21 +0100 Subject: [PATCH] Many fixes to document building - we now use the handy pypi doc upload script. --- build.xml | 54 +++++++++++++++++++++++++++--------------------------- doc/source/conf.py | 19 ++++++------------- setup.cfg | 7 +++++++ setup.py | 4 ++-- 4 files changed, 42 insertions(+), 42 deletions(-) create mode 100644 setup.cfg diff --git a/build.xml b/build.xml index 3a2c96e..5fd6389 100644 --- a/build.xml +++ b/build.xml @@ -5,7 +5,6 @@ - @@ -13,9 +12,27 @@ + + + + - + + + + + + + + + + + + + + + @@ -23,31 +40,14 @@ + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/doc/source/conf.py b/doc/source/conf.py index 8012299..01395ce 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -10,17 +10,19 @@ # # All configuration values have a default; values that are commented out # serve to show the default. - -import sys, os, logging +import logging +import jenkinsapi import pkg_resources +dist = pkg_resources.working_set.by_key[jenkinsapi.__name__] +VERSION = RELEASE = dist.version + if __name__ == "__main__": logging.basicConfig() log = logging.getLogger(__name__) # CHANGE THIS -VERSION = REVISION = '0.1.8' PROJECT_NAME = 'JenkinsAPI' PROJECT_AUTHORS = "Salim Fadhley, Ramon van Alteren, Ruslan Lutsenko" PROJECT_EMAILS = 'salimfadhley@gmail.com, ramon@vanalteren.nl, ruslan.lutcenko@gmail.com' @@ -28,14 +30,6 @@ PROJECT_URL = "https://github.com/salimfadhley/jenkinsapi" SHORT_DESCRIPTION = 'A Python API for accessing resources on a Jenkins continuous-integration server.' # CHANGE THIS -REQUIRE_STRING = "%s==%s" % (PROJECT_NAME.lower(), VERSION) - -pkg_resources.require(REQUIRE_STRING) -distrib = pkg_resources.get_distribution(REQUIRE_STRING) -#Sanity check -import jenkinsapi - - # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. @@ -62,13 +56,12 @@ project = u' JenkinsAPI' copyright = u'2012, %s' % 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 = VERSION # The full version, including alpha/beta/rc tags. -release = REVISION +release = VERSION # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..a0438ef --- /dev/null +++ b/setup.cfg @@ -0,0 +1,7 @@ +[build_sphinx] +source-dir = doc/source +build-dir = doc/build +all_files = 1 + +[upload_sphinx] +upload-dir = doc/build/html diff --git a/setup.py b/setup.py index 7f47eb4..cf541a0 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup import os PROJECT_ROOT, _ = os.path.split(__file__) -VERSION = REVISION = '0.1.15' +REVISION = '0.1.16' PROJECT_NAME = 'JenkinsAPI' PROJECT_AUTHORS = "Salim Fadhley, Ramon van Alteren, Ruslan Lutsenko" PROJECT_EMAILS = 'salimfadhley@gmail.com, ramon@vanalteren.nl, ruslan.lutcenko@gmail.com' @@ -19,7 +19,7 @@ GLOBAL_ENTRY_POINTS = { } setup(name=PROJECT_NAME.lower(), - version=VERSION, + version=REVISION, author=PROJECT_AUTHORS, author_email=PROJECT_EMAILS, packages=['jenkinsapi', 'jenkinsapi.utils', 'jenkinsapi.command_line', 'jenkinsapi_tests'], -- 2.7.4