Permalink
Browse files

Dedup version number declarations

  • Loading branch information...
1 parent f678b13 commit 871b73039481e07e47657a4585af5167827786b5 Steve Johnson committed Sep 9, 2013
Showing with 20 additions and 9 deletions.
  1. +2 −1 better/__init__.py
  2. +9 −3 docs/conf.py
  3. +7 −4 docs/installation.rst
  4. +2 −1 setup.py
View
@@ -1,2 +1,3 @@
import os
-better_theme_path = os.path.split(os.path.split(__file__)[0])[0]
+better_theme_path = os.path.split(os.path.dirname(__file__))[0]
+__version__ = '0.1.5-dev'
View
@@ -1,4 +1,10 @@
# -*- coding: utf-8 -*-
+import os
+import sys
+
+sys.path.append(os.path.abspath('../'))
+
+import better
extensions = ['sphinx.ext.intersphinx']
templates_path = []
@@ -8,9 +14,9 @@
project = u'sphinx-better-theme'
copyright = u'2013 Steve Johnson'
# The short X.Y version.
-version = '0.1.4'
+version = better.__version__.split("-")[0]
# The full version, including alpha/beta/rc tags.
-release = '0.1.4'
+release = better.__version__
exclude_patterns = ['_build']
pygments_style = 'sphinx'
@@ -21,7 +27,7 @@
'cssfiles': ['_static/style.css'],
'scriptfiles': ['_static/testing.js'],
}
-html_theme_path = ['..']
+html_theme_path = [better.better_theme_path]
html_title = "{} {}".format(project, release)
html_short_title = "Home"
html_sidebars = {
View
@@ -26,10 +26,13 @@ it to install the package.
.. _Read the Docs: https://readthedocs.org/
-First, create a :file:`requirements.txt` file just for your docs. It must
-contain at least the line ``sphinx-better-theme==0.1.4``, as well as any other
-dependencies your docs might have that are separate from your project's
-dependencies. I suggest putting it in your docs folder, e.g. at
+First, create a :file:`requirements.txt` file just for your docs. It should
+look like this::
+
+ sphinx-better-theme==0.1.5
+ # other dependencies for your docs if any
+
+I suggest putting it in your docs folder, e.g. at
:file:`docs/requirements.txt`.
Then, go to your Read the Docs admin panel. Make sure the :guilabel:`Use
View
@@ -1,8 +1,9 @@
from distutils.core import setup
+import better
setup(
name='sphinx-better-theme',
- version='0.1.4',
+ version=better.__version__,
author='Steve Johnson',
author_email='steve@steveasleep.com',
packages=['better'],

0 comments on commit 871b730

Please sign in to comment.