Browse Source

Merge branch 'master' into 101-int

pull/128/merge
Jeff Forcier 4 years ago
parent
commit
5006b5263a
  1. 3
      .gitignore
  2. 37
      .travis.yml
  3. 2
      LICENSE
  4. 4
      alabaster/__init__.py
  5. 8
      alabaster/about.html
  6. 2
      alabaster/support.py
  7. 1
      alabaster/theme.conf
  8. 3
      dev-requirements.txt
  9. 7
      docs/changelog.rst
  10. 3
      docs/customization.rst
  11. 2
      docs/installation.rst
  12. 7
      setup.cfg
  13. 16
      setup.py

3
.gitignore vendored

@ -1,3 +1,6 @@
*.egg-info/
build/
dist/
docs/_build
*.egg-info
*.py[cod]

37
.travis.yml

@ -0,0 +1,37 @@
language: python
cache: pip
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "pypy"
- "pypy3"
env:
- SPHINX=">=1.3,<1.4"
- SPHINX=">=1.4,<1.5"
- SPHINX=">=1.5,<1.6"
- SPHINX=">=1.6,<1.7"
install:
# For some reason Travis' build envs have wildly different pip/setuptools
# versions between minor Python versions, and this can cause many hilarious
# corner packaging cases. So...
- pip install -U pip
# Setuptools 34+ seems to get less stable
- pip install 'setuptools>33,<34'
# Install dev requirements
- pip install -r dev-requirements.txt
# Limit Sphinx version re: test matrix
- pip install "sphinx$SPHINX"
# Sanity/debug-friendliness: list what got installed
- pip list --format=columns
# Dev tooling sanity test: can invoke list tasks?
- inv --list
script:
# We have no real tests at present so we just make sure installation works,
# first off.
- pip install .
# Does our own dogfooding website build ok? :D
- inv docs
# I have this in my git pre-push hook, but contributors probably don't
- flake8

2
LICENSE

@ -1,4 +1,4 @@
Copyright (c) 2017 Jeff Forcier.
Copyright (c) 2018 Jeff Forcier.
Based on original work copyright (c) 2011 Kenneth Reitz and copyright (c) 2010
Armin Ronacher.

4
alabaster/__init__.py

@ -15,6 +15,10 @@ def update_context(app, pagename, templatename, context, doctree):
context['alabaster_version'] = version.__version__
def setup(app):
# add_html_theme is new in Sphinx 1.6+
if hasattr(app, 'add_html_theme'):
theme_path = os.path.abspath(os.path.dirname(__file__))
app.add_html_theme('alabaster', theme_path)
app.connect('html-page-context', update_context)
return {'version': version.__version__,
'parallel_read_safe': True}

8
alabaster/about.html

@ -33,8 +33,8 @@
<p>
<a href="https://travis-ci.org/{{ path }}">
<img
alt="https://secure.travis-ci.org/{{ path }}.svg?branch=master"
src="https://secure.travis-ci.org/{{ path }}.svg?branch=master"
alt="https://secure.travis-ci.org/{{ path }}.svg?branch={{ theme_badge_branch }}"
src="https://secure.travis-ci.org/{{ path }}.svg?branch={{ theme_badge_branch }}"
/>
</a>
</p>
@ -49,8 +49,8 @@
<p>
<a href="https://codecov.io/github/{{ path }}">
<img
alt="https://codecov.io/github/{{ path }}/coverage.svg?branch=master"
src="https://codecov.io/github/{{ path }}/coverage.svg?branch=master"
alt="https://codecov.io/github/{{ path }}/coverage.svg?branch={{ theme_badge_branch }}"
src="https://codecov.io/github/{{ path }}/coverage.svg?branch={{ theme_badge_branch }}"
/>
</a>
</p>

2
alabaster/support.py

@ -1,3 +1,5 @@
# flake8: noqa
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal

1
alabaster/theme.conf

@ -15,6 +15,7 @@ github_button = true
github_banner = false
github_type = watch
github_count = true
badge_branch = master
travis_button = false
codecov_button = false
gratipay_user =

3
dev-requirements.txt

@ -3,5 +3,6 @@ invoke>=0.10.1
invocations>=0.6.2
semantic_version>=2.4,<2.5
wheel==0.24
twine==1.5
twine==1.11.0
releases>=1.2.0,<2.0
flake8==2.4.0

7
docs/changelog.rst

@ -5,6 +5,13 @@ Changelog
* :feature:`18` add optional *next* and *previous* links at the top and bottom
of page content. Use theme option ``show_relbars`` to enable these. Credit:
William Minchin.
* :support:`- backported` Miscellaneous project maintenance updates such as
adding to Travis CI and enforcing the use of ``flake8``.
* :feature:`110 backported` Add ``badge_branch`` option allowing
configurability of which specific Git branch the Travis, Codecov, etc buttons
default to. Credit: ``@TitanSnow``.
* :support:`111 backported` Add setuptools-level entrypoint for improved theme
distribution compatibility. Thanks to Aaron Carlisle for the patch.
* :release:`0.7.10 <2017-02-28>`
* :bug:`32` Update styling of various block-level elements such as admonitions
(``.. note::``, ``.. warning::``, etc) and code blocks (``.. code::``) so

3
docs/customization.rst

@ -104,6 +104,9 @@ Variables and feature toggles
``$PROJECT/_static/``) to be used as the banner image instead of the
default.
* ``badge_branch``: Set which branch is used in Travis, CodeCov, etc badges.
Defaults to ``master``.
* ``travis_button``: ``true``, ``false`` or a Github-style ``"account/repo"``
string - used to display a `Travis-CI <https://travis-ci.org>`_ build status
button in the sidebar. If ``true``, uses your ``github_(user|repo)``

2
docs/installation.rst

@ -35,7 +35,7 @@ The bare minimum required to install Alabaster is as follows:
Alabaster (as RTD defaults to using its own theme) by adding this line
to your ``conf.py``::
html_theme = ['alabaster']
html_theme = 'alabaster'
* **Either way**, add an explicit ``html_sidebars`` setting so Alabaster's
customized sidebar templates are loaded:

7
setup.cfg

@ -1,2 +1,9 @@
[bdist_wheel]
universal = 1
[metadata]
license_file = LICENSE
[flake8]
ignore = E124,E125,E128,E261,E301,E302,E303
max-line-length = 79

16
setup.py

@ -23,17 +23,29 @@ setup(
url='https://alabaster.readthedocs.io',
packages=['alabaster'],
include_package_data=True,
entry_points={
'sphinx.html_themes': [
'alabaster = alabaster',
]
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Topic :: Documentation',
'Topic :: Software Development :: Documentation',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Documentation',
'Topic :: Software Development :: Documentation',
],
)

Loading…
Cancel
Save