Skip to content

Commit

Permalink
Merge pull request #33 from Pylons/docs-update
Browse files Browse the repository at this point in the history
Update docs to use pylons_sphinx_themes.
  • Loading branch information
stevepiercy committed Nov 5, 2018
2 parents 543f422 + c454311 commit 73b56f1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 46 deletions.
7 changes: 2 additions & 5 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
pyramid_beaker
==============

Provides a session factory for the `Pyramid <http://docs.pylonsproject.org>`_
web framework backed by the `Beaker <http://beaker.groovie.org/>`_ sessioning
Provides a session factory for the `Pyramid <https://docs.pylonsproject.org/projects/pyramid/en/latest/>`_
web framework backed by the `Beaker <https://beaker.readthedocs.io/en/latest/>`_ sessioning
system.

See `the Pylons Project documentation <http://docs.pylonsproject.org>`_ for
more information.
55 changes: 17 additions & 38 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,11 @@

import sys
import os
import pylons_sphinx_themes

# Add and use Pylons theme
if 'sphinx-build' in ' '.join(sys.argv): # protect against dumb importers
from subprocess import call, Popen, PIPE

p = Popen('which git', shell=True, stdout=PIPE)
git = p.stdout.read().strip()
cwd = os.getcwd()
_themes = os.path.join(cwd, '_themes')

if not os.path.isdir(_themes):
call([git, 'clone', 'git://github.com/Pylons/pylons_sphinx_theme.git',
'_themes'])
else:
os.chdir(_themes)
call([git, 'checkout', 'master'])
call([git, 'pull'])
os.chdir(cwd)

sys.path.append(os.path.abspath('_themes'))

parent = os.path.dirname(os.path.dirname(__file__))
sys.path.append(os.path.abspath(parent))
wd = os.getcwd()
os.chdir(parent)
os.system('%s setup.py test -q' % sys.executable)
os.chdir(wd)

for item in os.listdir(parent):
if item.endswith('.egg'):
sys.path.append(os.path.join(parent, item))
html_theme = 'pyramid'
html_theme_path = pylons_sphinx_themes.get_html_themes_path()

# General configuration
# ---------------------
Expand Down Expand Up @@ -116,11 +90,10 @@
# Options for HTML output
# -----------------------

# Add and use Pylons theme
sys.path.append(os.path.abspath('_themes'))
html_theme_path = ['_themes']
html_theme = 'pyramid'
html_theme_options = dict(github_url='https://github.com/Pylons/pyramid_beaker')
html_theme_options = dict(
github_url='https://github.com/Pylons/pyramid_beaker',
canonical_url='https://docs.pylonsproject.org/projects/pyramid_beaker/en/latest/',
)

# The style sheet to use for HTML and HTML Help pages. A file of that name
# must exist either in Sphinx' static/ path, or in one of the custom paths
Expand Down Expand Up @@ -154,12 +127,18 @@
# bottom, using the given strftime format.
html_last_updated_fmt = '%b %d, %Y'

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Do not use smart quotes.
smartquotes = False

# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Control display of sidebars
html_sidebars = { '**': [
'localtoc.html',
'ethicalads.html',
'relations.html',
'sourcelink.html',
'searchbox.html',
] }

# Additional templates that should be rendered to pages, maps page names to
# template names.
Expand Down
1 change: 1 addition & 0 deletions rtd.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-e .[docs]
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
docs_extras = [
'Sphinx',
'docutils',
'pylons-sphinx-themes',
]

testing_extras = [
Expand All @@ -55,8 +56,8 @@
],
keywords='web wsgi pylons pyramid',
author="Chris McDonough, Agendaless Consulting",
author_email="pylons-devel@googlegroups.com",
url="http://docs.pylonsproject.org/projects/pyramid_beaker/en/latest/",
author_email="pylons-discuss@googlegroups.com",
url="https://docs.pylonsproject.org/projects/pyramid_beaker/en/latest/",
license="BSD-derived (http://www.repoze.org/LICENSE.txt)",
packages=find_packages(),
include_package_data=True,
Expand All @@ -69,4 +70,3 @@
},
test_suite="pyramid_beaker",
)

0 comments on commit 73b56f1

Please sign in to comment.