Skip to content

Commit

Permalink
Adds sphinx 2.0+ support.
Browse files Browse the repository at this point in the history
It seems as tho you had already tried to add 2.0+ support and could
not get it working.
In order to get everything running properly I had to make several
changes to the file structure.

It should now run properly using sphinx >= 1.6.1 I have tested it using
sphinx 2.1.2 and it ran without issue.
  • Loading branch information
kdschlosser authored and danwos committed Nov 19, 2019
1 parent f2d2037 commit 9e29416
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 18 deletions.
4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
include LICENSE
graft groundwork_sphinx_theme/groundwork/
include groundwork_sphinx_theme/theme.conf
include groundwork_sphinx_theme/static/*
include groundwork_sphinx_theme/templates/*
16 changes: 4 additions & 12 deletions groundwork_sphinx_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,12 @@
__version__ = '1.0.9'


def get_path():
return os.path.abspath(os.path.dirname(__file__))


def setup(app):
app.add_html_theme(
'groundwork',
os.path.abspath(os.path.dirname(__file__))
)
return {
'version': __version__,
'parallel_read_safe': True
}

# New way since sphinx 1.6
# Used for http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package
# but not working.

# from os import path
# def setup(app):
# app.add_html_theme('groundwork', path.abspath(path.join(path.dirname(__file__), "groundwork")))
File renamed without changes
File renamed without changes.
25 changes: 20 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,27 @@
description="Sphinx theme for groundwork projects (Based on flask_theme)",
long_description=doc,
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
package_data={
'groundwork_sphinx_theme': [
'theme.conf',
],
os.path.join('groundwork_sphinx_theme', 'static'): [
'groundwork.css_t',
'gw_logo.png',
'small_groundwork.css'
],
os.path.join('groundwork_sphinx_theme', 'templates'): [
'contribute.html',
'layout.html',
'relations.html',
'searchbox.html',
],
},
include_package_data=True,
platforms='any',
setup_requires=[],
tests_require=[],
install_requires=["Sphinx"],
install_requires=["Sphinx>=1.6.1"],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
Expand All @@ -40,9 +56,8 @@
'Programming Language :: Python :: 3.5',
],
entry_points={
# 'sphinx.html_themes': [
# 'groundwork = groundwork_sphinx_theme',
# ],
'sphinx_themes': ['groundwork = groundwork_sphinx_theme:get_path']
'sphinx.html_themes': [
'groundwork = groundwork_sphinx_theme',
],
},
)

0 comments on commit 9e29416

Please sign in to comment.