Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Sphinx and Nox #591

Merged
merged 1 commit into from
Jan 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ language: python
sudo: false
python:
- 3.6
install: pip install --upgrade nox-automation virtualenv
script: nox -s build
install: python3 -m pip install --upgrade nox virtualenv
script: python3 -m nox -s build
19 changes: 9 additions & 10 deletions nox.py → noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,23 @@
import nox


@nox.session
@nox.session(py="3")
def build(session, autobuild=False):
session.interpreter = 'python3.6'
session.install('-r', 'requirements.txt')
session.install("-r", "requirements.txt")
# Treat warnings as errors.
session.env['SPHINXOPTS'] = '-W'
session.run(shutil.rmtree, 'build', ignore_errors=True)
session.env["SPHINXOPTS"] = "-W"

shutil.rmtree("build", ignore_errors=True)

if autobuild:
command = 'sphinx-autobuild'
command = "sphinx-autobuild"
else:
command = 'sphinx-build'
command = "sphinx-build"

session.run(command, '-W', '-b', 'html', 'source', 'build')
session.run(command, "-W", "-b", "html", "source", "build")


@nox.session
@nox.session(py="3")
def preview(session):
session.reuse_existing_virtualenv = True
session.install("sphinx-autobuild")
build(session, autobuild=True)
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sphinx==1.7.4
sphinx==1.8.3
sphinx-autobuild==0.7.1
git+https://github.com/python/python-docs-theme.git#egg=python-docs-theme
git+https://github.com/pypa/pypa-docs-theme.git#egg=pypa-docs-theme