Many fixes to document building - we now use the handy pypi doc upload script.
authorSalim Fadhley <sal@stodge.org>
Sat, 1 Jun 2013 00:18:21 +0000 (01:18 +0100)
committerSalim Fadhley <sal@stodge.org>
Sat, 1 Jun 2013 00:18:21 +0000 (01:18 +0100)
build.xml
doc/source/conf.py
setup.cfg [new file with mode: 0644]
setup.py

index 3a2c96e..5fd6389 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -5,7 +5,6 @@
        <target name="all" depends="clean, compile" />
 
        <target name="clean">
-
                <delete failonerror="false">
                        <fileset dir="build" />
                </delete>
                <delete failonerror="false">
                        <fileset dir="dist" />
                </delete>
+
+               <delete failonerror="false">
+                       <fileset dir="doc/build" />
+               </delete>
        </target>
 
-       <target name="compile" depends="sdist,bdist_egg_27" />
+       <target name="compile" depends="install,test,sdist,doc" />
+
+       <target name="install">
+               <exec executable="python">
+                       <arg value="setup.py" />
+                       <arg value="develop" />
+               </exec>
+       </target>
+
+       <target name="test">
+               <exec executable="python">
+                       <arg value="setup.py" />
+                       <arg value="test" />
+               </exec>
+       </target>
 
        <target name="sdist">
                <exec executable="python">
                        <arg value="sdist" />
                        <arg value="upload" />
                </exec>
+       </target>       
+
+       <target name="doc">
+               <exec executable="python">
+                       <arg value="setup.py" />
+                       <arg value="build_sphinx" />
+                       <arg value="upload_sphinx" />
+               </exec>
        </target>
-       
-       <target name="bdist_egg_26">
-                       <exec executable="python2.6">
-                               <arg value="setup.py" />
-                               <arg value="bdist_egg" />
-                               <arg value="upload" />
-                       </exec>
-       </target>
-       
-       <target name="bdist_egg_27">
-                               <exec executable="python2.7">
-                                       <arg value="setup.py" />
-                                       <arg value="bdist_egg" />
-                                       <arg value="upload" />
-                       </exec>
-       </target>
-       
-       <target name="bdist_wininst_27">
-                                       <exec executable="python2.6">
-                                               <arg value="setup.py" />
-                                               <arg value="bdist_wininst" />
-                                               <arg value="upload" />
-                               </exec>
-       </target>
-       
 
 </project>
\ No newline at end of file
index 8012299..01395ce 100644 (file)
 #
 # 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 (file)
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
index 7f47eb4..cf541a0 100644 (file)
--- 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'],