Skip to content

Commit

Permalink
fix documentation bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat committed Sep 2, 2018
1 parent c67c1b6 commit 8c3fdce
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
15 changes: 13 additions & 2 deletions doc/example/package.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ setuptools
Using the ``pyproject.toml`` file at the root folder (alongside ``setup.py``) one can specify
build requirements.

.. code-block:: python
.. code-block:: ini
[build-system]
requires = [
Expand All @@ -29,14 +29,19 @@ build requirements.
]
build-backend = "setuptools.build_meta"
.. code-block:: ini
# tox.ini
[tox]
build_isolated = True
flit
----
`flit <https://flit.readthedocs.io/en/latest/>`_ requires ``Python 3``, however the generated source
distribution can be installed under ``python 2``. Furthermore it does not require a ``setup.py``
file as that information is also added to the ``pyproject.toml`` file.

.. code-block:: python
.. code-block:: ini
[build-system]
requires = ["flit >= 1.1"]
Expand All @@ -47,3 +52,9 @@ file as that information is also added to the ``pyproject.toml`` file.
author = "Happy Harry"
author-email = "happy@harry.com"
home-page = "https://github.com/happy-harry/is"
.. code-block:: ini
# tox.ini
[tox]
build_isolated = True
4 changes: 1 addition & 3 deletions src/tox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1006,9 +1006,7 @@ def __init__(self, config, inipath): # noqa

config.skipsdist = reader.getbool("skipsdist", all_develop)
config.isolated_build = reader.getbool("isolated_build", False)
config.isolated_build_env = reader.getstring(
"isolated_build_env", ".package"
)
config.isolated_build_env = reader.getstring("isolated_build_env", ".package")
if config.isolated_build is True:
name = config.isolated_build_env
if name not in config.envconfigs:
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ basepython = python3.7
extras = docs
changedir = {toxinidir}
commands = sphinx-build -d "{toxworkdir}/docs_doctree" doc "{toxworkdir}/docs_out" --color -W -bhtml {posargs}
python -c 'print("documentation available under file://{toxworkdir}/docs_out/index.html")'
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'

[testenv:package-description]
description = check that the long description is valid
Expand All @@ -52,7 +52,7 @@ deps = pre-commit == 1.10.3
skip_install = True
changedir = {toxinidir}
commands = pre-commit run --all-files --show-diff-on-failure
python -c 'print("hint: run {envdir}/bin/pre-commit install to add checks as pre-commit hook")'
python -c 'import pathlib; print("hint: run \{\} install to add checks as pre-commit hook".format(pathlib.Path(r"{envdir}") / "bin" / "pre-commit"))'


[testenv:coverage]
Expand Down

0 comments on commit 8c3fdce

Please sign in to comment.