From 86804f24cde7a9341e74fb07cc43ace85d276d26 Mon Sep 17 00:00:00 2001 From: tell-k Date: Mon, 15 Apr 2019 00:23:30 +0900 Subject: [PATCH] Fix theme settings --- setup.py | 12 +++++------- src/sphinxjp/themes/gopher/__init__.py | 3 ++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 0b9f8ed..e6eb7f8 100644 --- a/setup.py +++ b/setup.py @@ -71,12 +71,10 @@ install_requires=install_requires, setup_requires=setup_requires, tests_require=tests_require, - entry_points=""" - [sphinx_themes] - path = sphinxjp.themes.gopher:get_path - - [sphinx_directives] - setup = sphinxjp.themes.gopher:setup - """, + entry_points= { + 'sphinx.html_themes': [ + 'gopher = sphinxjp.themes.gohper', + ] + }, zip_safe=False ) diff --git a/src/sphinxjp/themes/gopher/__init__.py b/src/sphinxjp/themes/gopher/__init__.py index c9d35c6..650ed57 100644 --- a/src/sphinxjp/themes/gopher/__init__.py +++ b/src/sphinxjp/themes/gopher/__init__.py @@ -9,7 +9,7 @@ from os import path package_dir = path.abspath(path.dirname(__file__)) -template_path = path.join(package_dir, 'templates') +template_path = path.join(package_dir, 'templates', 'gopher') __version__ = '0.2.2' @@ -21,3 +21,4 @@ def get_path(): def setup(app): """entry-point for sphinx directive.""" + app.add_html_theme('gopher', get_path())