Author: cito Date: Sat Feb 6 14:27:09 2016 New Revision: 826 Log: Make Sphinx docs work without the Cloud theme
Our custom navigation bar on the page header works only with the Cloud theme, so we use a toc as the start page when creating the docs without Cloud theme. Added: branches/4.x/docs/about.txt branches/4.x/docs/toc.rst trunk/docs/about.txt trunk/docs/toc.rst Modified: branches/4.x/docs/about.rst branches/4.x/docs/conf.py branches/4.x/docs/download/download.rst branches/4.x/docs/index.rst trunk/docs/about.rst trunk/docs/conf.py trunk/docs/download/download.rst trunk/docs/index.rst Modified: branches/4.x/docs/about.rst ============================================================================== --- branches/4.x/docs/about.rst Sat Feb 6 12:30:34 2016 (r825) +++ branches/4.x/docs/about.rst Sat Feb 6 14:27:09 2016 (r826) @@ -1,40 +1,4 @@ -**PyGreSQL** is an *open-source* `Python <http://www.python.org>`_ module -that interfaces to a `PostgreSQL <http://www.postgresql.org>`_ database. -It embeds the PostgreSQL query library to allow easy use of the powerful -PostgreSQL features from a Python script. +About PyGreSQL +============== - | This software is copyright © 1995, Pascal Andre. - | Further modifications are copyright © 1997-2008 by D'Arcy J.M. Cain. - | Further modifications are copyright © 2009-2016 by the PyGreSQL team. - | For licensing details, see the full :doc:`copyright`. - -**PostgreSQL** is a highly scalable, SQL compliant, open source -object-relational database management system. With more than 20 years -of development history, it is quickly becoming the de facto database -for enterprise level open source solutions. -Best of all, PostgreSQL's source code is available under the most liberal -open source license: the BSD license. - -**Python** Python is an interpreted, interactive, object-oriented -programming language. It is often compared to Tcl, Perl, Scheme or Java. -Python combines remarkable power with very clear syntax. It has modules, -classes, exceptions, very high level dynamic data types, and dynamic typing. -There are interfaces to many system calls and libraries, as well as to -various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules -are easily written in C or C++. Python is also usable as an extension -language for applications that need a programmable interface. -The Python implementation is copyrighted but freely usable and distributable, -even for commercial use. - -**PyGreSQL** is a Python module that interfaces to a PostgreSQL database. -It embeds the PostgreSQL query library to allow easy use of the powerful -PostgreSQL features from a Python script. - -PyGreSQL is developed and tested on a NetBSD system, but it also runs on -most other platforms where PostgreSQL and Python is running. It is based -on the PyGres95 code written by Pascal Andre ([email protected]). -D'Arcy ([email protected]) renamed it to PyGreSQL starting with -version 2.0 and serves as the "BDFL" of PyGreSQL. - -The current version PyGreSQL 4.2 needs PostgreSQL 8.3 or newer and Python 2.5 -to 2.7. If you are using Python 3.x, you will need PyGreSQL 5.0 or newer. +.. include:: about.txt \ No newline at end of file Added: branches/4.x/docs/about.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/4.x/docs/about.txt Sat Feb 6 14:27:09 2016 (r826) @@ -0,0 +1,40 @@ +**PyGreSQL** is an *open-source* `Python <http://www.python.org>`_ module +that interfaces to a `PostgreSQL <http://www.postgresql.org>`_ database. +It embeds the PostgreSQL query library to allow easy use of the powerful +PostgreSQL features from a Python script. + + | This software is copyright © 1995, Pascal Andre. + | Further modifications are copyright © 1997-2008 by D'Arcy J.M. Cain. + | Further modifications are copyright © 2009-2016 by the PyGreSQL team. + | For licensing details, see the full :doc:`copyright`. + +**PostgreSQL** is a highly scalable, SQL compliant, open source +object-relational database management system. With more than 20 years +of development history, it is quickly becoming the de facto database +for enterprise level open source solutions. +Best of all, PostgreSQL's source code is available under the most liberal +open source license: the BSD license. + +**Python** Python is an interpreted, interactive, object-oriented +programming language. It is often compared to Tcl, Perl, Scheme or Java. +Python combines remarkable power with very clear syntax. It has modules, +classes, exceptions, very high level dynamic data types, and dynamic typing. +There are interfaces to many system calls and libraries, as well as to +various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules +are easily written in C or C++. Python is also usable as an extension +language for applications that need a programmable interface. +The Python implementation is copyrighted but freely usable and distributable, +even for commercial use. + +**PyGreSQL** is a Python module that interfaces to a PostgreSQL database. +It embeds the PostgreSQL query library to allow easy use of the powerful +PostgreSQL features from a Python script. + +PyGreSQL is developed and tested on a NetBSD system, but it also runs on +most other platforms where PostgreSQL and Python is running. It is based +on the PyGres95 code written by Pascal Andre ([email protected]). +D'Arcy ([email protected]) renamed it to PyGreSQL starting with +version 2.0 and serves as the "BDFL" of PyGreSQL. + +The current version PyGreSQL 4.2 needs PostgreSQL 8.3 or newer and Python 2.5 +to 2.7. If you are using Python 3.x, you will need PyGreSQL 5.0 or newer. Modified: branches/4.x/docs/conf.py ============================================================================== --- branches/4.x/docs/conf.py Sat Feb 6 12:30:34 2016 (r825) +++ branches/4.x/docs/conf.py Sat Feb 6 14:27:09 2016 (r826) @@ -15,9 +15,13 @@ import os import shlex -# import Cloud theme -# this will also automatically add the theme directory -import cloud_sptheme +# Import Cloud theme (this will also automatically add the theme directory). +# Note: We add a navigation bar to the cloud them using a custom layout. +try: + import cloud_sptheme + use_cloud_theme = True +except ImportError: + use_cloud_theme = False # 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 @@ -34,7 +38,7 @@ extensions = ['sphinx.ext.autodoc'] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ['_templates'] if use_cloud_theme else [] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: @@ -45,7 +49,7 @@ #source_encoding = 'utf-8-sig' # The master toctree document. -master_doc = 'index' +master_doc = 'index' if use_cloud_theme else 'toc' # General information about the project. project = u'PyGreSQL' @@ -79,11 +83,17 @@ # List of pages which are included in other pages and therefore should # not appear in the toctree. -exclude_patterns += ['about.rst', +exclude_patterns += [ 'download/download.rst', 'download/files.rst', 'community/mailinglist.rst', 'community/source.rst', 'community/bugtracker.rst', 'community/support.rst', 'community/homes.rst'] +if use_cloud_theme: + # We use a naviagtion bar instead of the table of contents + # and we include the about page on the index page. + exclude_patterns += ['toc.rst', 'about.rst'] +else: + exclude_patterns += ['index.rst'] # The reST default role (used for this markup: `text`) for all documents. #default_role = None @@ -116,15 +126,18 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'cloud' +html_theme = 'cloud' if use_cloud_theme else 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -html_theme_options = { - 'roottarget': 'contents/index', - 'defaultcollapsed': True, - 'shaded_decor': True} +if use_cloud_theme: + html_theme_options = { + 'roottarget': 'contents/index', + 'defaultcollapsed': True, + 'shaded_decor': True} +else: + html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. html_theme_path = ['_themes'] Modified: branches/4.x/docs/download/download.rst ============================================================================== --- branches/4.x/docs/download/download.rst Sat Feb 6 12:30:34 2016 (r825) +++ branches/4.x/docs/download/download.rst Sat Feb 6 14:27:09 2016 (r826) @@ -1,5 +1,5 @@ -Download PyGreSQL here: ------------------------ +Current PyGreSQL versions +------------------------- You can find PyGreSQL on the **Python Package Index** at * http://pypi.python.org/pypi/PyGreSQL/ @@ -18,3 +18,9 @@ * http://pygresql.org/files/PyGreSQL-4.2.win32-py2.5.exe * http://pygresql.org/files/PyGreSQL-4.2.win32-py2.6.exe * http://pygresql.org/files/PyGreSQL-4.2.win32-py2.7.exe + +Older PyGreSQL versions +----------------------- + +You can look for older PyGreSQL versions at + * http://pygresql.org/files/ Modified: branches/4.x/docs/index.rst ============================================================================== --- branches/4.x/docs/index.rst Sat Feb 6 12:30:34 2016 (r825) +++ branches/4.x/docs/index.rst Sat Feb 6 14:27:09 2016 (r826) @@ -12,4 +12,4 @@ contents/index community/index -.. include:: about.rst +.. include:: about.txt Added: branches/4.x/docs/toc.rst ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/4.x/docs/toc.rst Sat Feb 6 14:27:09 2016 (r826) @@ -0,0 +1,14 @@ +.. PyGreSQL documentation master file + +Welcome to PyGreSQL +=================== + +.. toctree:: + :maxdepth: 2 + + about + copyright + announce + download/index + contents/index + community/index Modified: trunk/docs/about.rst ============================================================================== --- trunk/docs/about.rst Sat Feb 6 12:30:34 2016 (r825) +++ trunk/docs/about.rst Sat Feb 6 14:27:09 2016 (r826) @@ -1,41 +1,4 @@ -**PyGreSQL** is an *open-source* `Python <http://www.python.org>`_ module -that interfaces to a `PostgreSQL <http://www.postgresql.org>`_ database. -It embeds the PostgreSQL query library to allow easy use of the powerful -PostgreSQL features from a Python script. +About PyGreSQL +============== - | This software is copyright © 1995, Pascal Andre. - | Further modifications are copyright © 1997-2008 by D'Arcy J.M. Cain. - | Further modifications are copyright © 2009-2016 by the PyGreSQL team. - | For licensing details, see the full :doc:`copyright`. - -**PostgreSQL** is a highly scalable, SQL compliant, open source -object-relational database management system. With more than 20 years -of development history, it is quickly becoming the de facto database -for enterprise level open source solutions. -Best of all, PostgreSQL's source code is available under the most liberal -open source license: the BSD license. - -**Python** Python is an interpreted, interactive, object-oriented -programming language. It is often compared to Tcl, Perl, Scheme or Java. -Python combines remarkable power with very clear syntax. It has modules, -classes, exceptions, very high level dynamic data types, and dynamic typing. -There are interfaces to many system calls and libraries, as well as to -various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules -are easily written in C or C++. Python is also usable as an extension -language for applications that need a programmable interface. -The Python implementation is copyrighted but freely usable and distributable, -even for commercial use. - -**PyGreSQL** is a Python module that interfaces to a PostgreSQL database. -It embeds the PostgreSQL query library to allow easy use of the powerful -PostgreSQL features from a Python script or application. - -PyGreSQL is developed and tested on a NetBSD system, but it also runs on -most other platforms where PostgreSQL and Python is running. It is based -on the PyGres95 code written by Pascal Andre ([email protected]). -D'Arcy ([email protected]) renamed it to PyGreSQL starting with -version 2.0 and serves as the "BDFL" of PyGreSQL. - -The current version PyGreSQL 5.0 needs PostgreSQL 9.0 or newer and Python 2.6, -2.7 or 3.3 to 3.5. If you need to support older PostgreSQL versions or older -Python 2.x versions, you can resort to PyGreSQL 4.x that still supports them. +.. include:: about.txt \ No newline at end of file Added: trunk/docs/about.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/docs/about.txt Sat Feb 6 14:27:09 2016 (r826) @@ -0,0 +1,41 @@ +**PyGreSQL** is an *open-source* `Python <http://www.python.org>`_ module +that interfaces to a `PostgreSQL <http://www.postgresql.org>`_ database. +It embeds the PostgreSQL query library to allow easy use of the powerful +PostgreSQL features from a Python script. + + | This software is copyright © 1995, Pascal Andre. + | Further modifications are copyright © 1997-2008 by D'Arcy J.M. Cain. + | Further modifications are copyright © 2009-2016 by the PyGreSQL team. + | For licensing details, see the full :doc:`copyright`. + +**PostgreSQL** is a highly scalable, SQL compliant, open source +object-relational database management system. With more than 20 years +of development history, it is quickly becoming the de facto database +for enterprise level open source solutions. +Best of all, PostgreSQL's source code is available under the most liberal +open source license: the BSD license. + +**Python** Python is an interpreted, interactive, object-oriented +programming language. It is often compared to Tcl, Perl, Scheme or Java. +Python combines remarkable power with very clear syntax. It has modules, +classes, exceptions, very high level dynamic data types, and dynamic typing. +There are interfaces to many system calls and libraries, as well as to +various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules +are easily written in C or C++. Python is also usable as an extension +language for applications that need a programmable interface. +The Python implementation is copyrighted but freely usable and distributable, +even for commercial use. + +**PyGreSQL** is a Python module that interfaces to a PostgreSQL database. +It embeds the PostgreSQL query library to allow easy use of the powerful +PostgreSQL features from a Python script or application. + +PyGreSQL is developed and tested on a NetBSD system, but it also runs on +most other platforms where PostgreSQL and Python is running. It is based +on the PyGres95 code written by Pascal Andre ([email protected]). +D'Arcy ([email protected]) renamed it to PyGreSQL starting with +version 2.0 and serves as the "BDFL" of PyGreSQL. + +The current version PyGreSQL 5.0 needs PostgreSQL 9.0 or newer and Python 2.6, +2.7 or 3.3 to 3.5. If you need to support older PostgreSQL versions or older +Python 2.x versions, you can resort to PyGreSQL 4.x that still supports them. Modified: trunk/docs/conf.py ============================================================================== --- trunk/docs/conf.py Sat Feb 6 12:30:34 2016 (r825) +++ trunk/docs/conf.py Sat Feb 6 14:27:09 2016 (r826) @@ -15,9 +15,13 @@ import os import shlex -# import Cloud theme -# this will also automatically add the theme directory -import cloud_sptheme +# Import Cloud theme (this will also automatically add the theme directory). +# Note: We add a navigation bar to the cloud them using a custom layout. +try: + import cloud_sptheme + use_cloud_theme = True +except ImportError: + use_cloud_theme = False # 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 @@ -34,7 +38,7 @@ extensions = ['sphinx.ext.autodoc'] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ['_templates'] if use_cloud_theme else [] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: @@ -45,7 +49,7 @@ #source_encoding = 'utf-8-sig' # The master toctree document. -master_doc = 'index' +master_doc = 'index' if use_cloud_theme else 'toc' # General information about the project. project = 'PyGreSQL' @@ -79,11 +83,17 @@ # List of pages which are included in other pages and therefore should # not appear in the toctree. -exclude_patterns += ['about.rst', +exclude_patterns += [ 'download/download.rst', 'download/files.rst', 'community/mailinglist.rst', 'community/source.rst', 'community/bugtracker.rst', 'community/support.rst', 'community/homes.rst'] +if use_cloud_theme: + # We use a naviagtion bar instead of the table of contents + # and we include the about page on the index page. + exclude_patterns += ['toc.rst', 'about.rst'] +else: + exclude_patterns += ['index.rst'] # The reST default role (used for this markup: `text`) for all documents. #default_role = None @@ -117,12 +127,12 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'cloud' +html_theme = 'cloud' if use_cloud_theme else 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -html_theme_options = {'defaultcollapsed': True} +html_theme_options = {'defaultcollapsed': True} if use_cloud_theme else {} # Add any paths that contain custom themes here, relative to this directory. html_theme_path = ['_themes'] Modified: trunk/docs/download/download.rst ============================================================================== --- trunk/docs/download/download.rst Sat Feb 6 12:30:34 2016 (r825) +++ trunk/docs/download/download.rst Sat Feb 6 14:27:09 2016 (r826) @@ -1,5 +1,5 @@ -Download PyGreSQL here: ------------------------ +Current PyGreSQL versions +------------------------- You can find PyGreSQL on the **Python Package Index** at * http://pypi.python.org/pypi/PyGreSQL/ @@ -19,8 +19,8 @@ * http://pygresql.org/files/PyGreSQL-5.0.win32-py2.6.exe * http://pygresql.org/files/PyGreSQL-5.0.win32-py2.7.exe -Older PyGreSQL versions: ------------------------- +Older PyGreSQL versions +----------------------- You can look for older PyGreSQL versions at * http://pygresql.org/files/ Modified: trunk/docs/index.rst ============================================================================== --- trunk/docs/index.rst Sat Feb 6 12:30:34 2016 (r825) +++ trunk/docs/index.rst Sat Feb 6 14:27:09 2016 (r826) @@ -12,4 +12,4 @@ contents/index community/index -.. include:: about.rst +.. include:: about.txt Added: trunk/docs/toc.rst ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/docs/toc.rst Sat Feb 6 14:27:09 2016 (r826) @@ -0,0 +1,14 @@ +.. PyGreSQL documentation master file + +Welcome to PyGreSQL +=================== + +.. toctree:: + :maxdepth: 2 + + about + copyright + announce + download/index + contents/index + community/index _______________________________________________ PyGreSQL mailing list [email protected] https://mail.vex.net/mailman/listinfo.cgi/pygresql
