Merge remote branch 'tony/pypi'

Conflicts:
	README.rst
This commit is contained in:
Eric Holscher 2013-11-03 16:17:30 -08:00
commit e8178bbe65
4 changed files with 102 additions and 2 deletions

12
MANIFEST.in Normal file
View File

@ -0,0 +1,12 @@
# Top level.
include *.rst
exclude *.png
# Non-python files.
recursive-include sphinx_rtd_theme *
recursive-exclude sass *
# Extraneous files.
global-exclude .DS_Store
global-exclude *.pyc

View File

@ -24,11 +24,33 @@ if you're just trying to use it on your project outside of that site.
Installation
============
Symlink or subtree the ``dist/sphinx_rtd_theme`` repository into your documentation at
Via package
-----------
Download the package or add it to your ``requirements.txt`` file:
.. code-block:: bash
$ pip install -e git+git://github.com/tony/sphinx_rtd_theme@pypi#egg=sphinx_rtd_theme
In your ``conf.py`` file:
.. code-block:: python
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
Via git or download
-------------------
Symlink or subtree the ``sphinx_rtd_theme/sphinx_rtd_theme`` repository into your documentation at
``docs/_themes/sphinx_rtd_theme`` then add the following two settings to your Sphinx
conf.py file:
.. code-block::
.. code-block:: python
html_theme = "sphinx_rtd_theme"
html_theme_path = ["_themes", ]

49
setup.py Normal file
View File

@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
"""`sphinxcontrib-rtd_theme` lives on `Github`_.
.. _github: https://www.github.com/snide/sphinx_rtd_theme
"""
from setuptools import setup, find_packages
from sphinx_rtd_theme import __version__
try:
from pip.req import parse_requirements
except ImportError:
def requirements(f):
reqs = open(f, 'r').read().splitlines()
reqs = [r for r in reqs if not r.strip().startswith('#')]
return reqs
else:
def requirements(f):
install_reqs = parse_requirements(f)
reqs = [str(r.req) for r in install_reqs]
return reqs
setup(
name='sphinxcontrib_rtd_theme',
version=__version__,
url='https://github.com/snide/sphinx_rtd_theme/',
license='MIT',
author='Dave Snider',
author_email='dave.snider@gmail.com',
description='ReadTheDocs.org theme for Sphinx, 2013 version.',
long_description=open('README.rst').read(),
zip_safe=False,
packages=find_packages(),
package_data = { "sphinx_rtd_theme": ['*.*', 'static/*.*', 'static/*/*.*'] },
install_requires=['sphinx>=1.1'],
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: BSD License',
'Environment :: Console',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Operating System :: OS Independent',
'Topic :: Documentation',
'Topic :: Software Development :: Documentation',
],
)

View File

@ -0,0 +1,17 @@
"""Sphinx ReadTheDocs theme.
From https://github.com/ryan-roemer/sphinx-bootstrap-theme.
"""
import os
VERSION = (0, 1, 0)
__version__ = ".".join(str(v) for v in VERSION)
__version_full__ = __version__
def get_html_theme_path():
"""Return list of HTML theme paths."""
cur_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
return cur_dir