summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernat Gabor <bgabor8@bloomberg.net>2018-10-26 10:13:06 +0100
committerBernat Gabor <bgabor8@bloomberg.net>2018-10-26 10:20:02 +0100
commita2f532da8f49c29aa427f1adbf6185eb3f4e224f (patch)
tree9c640fbc1bd2968c935f9ddabe9a8d2f72478fe4
parent181b311349bf6dc26692e0693c2e000da6c071f6 (diff)
downloadvirtualenv-docs.tar.gz
Fix documentationdocs
-rw-r--r--.github/config.yml2
-rw-r--r--.pre-commit-config.yaml2
-rw-r--r--README.rst4
-rw-r--r--docs/conf.py118
-rw-r--r--readthedocs.yml8
-rw-r--r--setup.py4
-rw-r--r--tox.ini18
7 files changed, 26 insertions, 130 deletions
diff --git a/.github/config.yml b/.github/config.yml
new file mode 100644
index 0000000..74a0ed9
--- /dev/null
+++ b/.github/config.yml
@@ -0,0 +1,2 @@
+rtd:
+ project: virtualenv
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 01e2cad..fc817eb 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -15,7 +15,7 @@ repos:
rev: master
hooks:
- id: seed-isort-config
- args: [--application-directories, "src:tests:virtualenv_embedded"]
+ args: [--application-directories, "src:tests:virtualenv_embedded:docs:bin"]
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.4
hooks:
diff --git a/README.rst b/README.rst
index fe9c962..2516fed 100644
--- a/README.rst
+++ b/README.rst
@@ -9,8 +9,8 @@ A tool for creating isolated 'virtual' python environments.
.. image:: https://img.shields.io/pypi/pyversions/virtualenv.svg
:target: https://pypi.org/project/virtualenv/
:alt: Supported Python versions
-.. image:: https://dev.azure.com/pypa/virtualenv/_apis/build/status/pypa.virtualenv
- :target: https://dev.azure.com/pypa/virtualenv/_apis/build/status/pypa.virtualenv?branchName=master
+.. image:: https://dev.azure.com/pypa/virtualenv/_apis/build/status/pypa.virtualenv?branchName=master
+ :target: https://dev.azure.com/pypa/virtualenv/_build/latest?definitionId=11&branchName=master
:alt: Azure Pipelines build status
.. image:: https://readthedocs.org/projects/virtualenv/badge/?version=latest&style=flat-square
:target: https://virtualenv.readthedocs.io/en/latest/?badge=latest
diff --git a/docs/conf.py b/docs/conf.py
index 36cf58a..0b2441c 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,46 +1,14 @@
# -*- coding: utf-8 -*-
-#
-# Paste documentation build configuration file, created by
-# sphinx-quickstart on Tue Apr 22 22:08:49 2008.
-#
-# This file is execfile()d with the current directory set to its containing dir.
-#
-# The contents of this file are pickled, so don't put values in the namespace
-# that aren't pickleable (module imports are okay, they're removed automatically).
-#
-# All configuration values have a default value; values that are commented out
-# serve to show the default value.
-
import os
-import sys
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
-
-# If your extensions are in another directory, add it here.
-sys.path.insert(0, os.path.abspath(os.pardir))
-
-# General configuration
-# ---------------------
-
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ["sphinx.ext.autodoc", "sphinx.ext.extlinks"]
-
-# Add any paths that contain templates here, relative to this directory.
-# templates_path = ['_templates']
-
-# The suffix of source filenames.
source_suffix = ".rst"
-
-# The master toctree document.
master_doc = "index"
-
-# General substitutions.
project = "virtualenv"
-copyright = "2007-2014, Ian Bicking, The Open Planning Project, PyPA"
+copyright = "2007-2018, Ian Bicking, The Open Planning Project, PyPA"
+
-# The default replacements for |version| and |release|, also used in various
-# other places throughout the built documents.
try:
from virtualenv import __version__
@@ -51,27 +19,8 @@ try:
except ImportError:
version = release = "dev"
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-# today = ''
-# Else, today_fmt is used as the format for a strftime call.
today_fmt = "%B %d, %Y"
-
-# List of documents that shouldn't be included in the build.
unused_docs = []
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-# add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-# add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-# show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
extlinks = {
@@ -79,15 +28,6 @@ extlinks = {
"pull": ("https://github.com/pypa/virtualenv/pull/%s", "PR #"),
}
-
-# Options for HTML output
-# -----------------------
-
-# The style sheet to use for HTML and HTML Help pages. A file of that name
-# must exist either in Sphinx' static/ path, or in one of the custom paths
-# given in html_static_path.
-# html_style = 'default.css'
-
html_theme = "default"
if not on_rtd:
try:
@@ -97,59 +37,5 @@ if not on_rtd:
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
except ImportError:
pass
-
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-# html_static_path = ['_static']
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
html_last_updated_fmt = "%b %d, %Y"
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-# html_use_smartypants = True
-
-# Content template for the index page.
-# html_index = ''
-
-# Custom sidebar templates, maps document names to template names.
-# html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-# html_additional_pages = {}
-
-# If false, no module index is generated.
-# html_use_modindex = True
-
-# If true, the reST sources are included in the HTML build as _sources/<name>.
-# html_copy_source = True
-
-# Output file base name for HTML help builder.
htmlhelp_basename = "Pastedoc"
-
-
-# Options for LaTeX output
-# ------------------------
-
-# The paper size ('letter' or 'a4').
-# latex_paper_size = 'letter'
-
-# The font size ('10pt', '11pt' or '12pt').
-# latex_font_size = '10pt'
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, document class [howto/manual]).
-# latex_documents = []
-
-# Additional stuff for the LaTeX preamble.
-# latex_preamble = ''
-
-# Documents to append as an appendix to all manuals.
-# latex_appendices = []
-
-# If false, no module index is generated.
-# latex_use_modindex = True
diff --git a/readthedocs.yml b/readthedocs.yml
new file mode 100644
index 0000000..1aaa175
--- /dev/null
+++ b/readthedocs.yml
@@ -0,0 +1,8 @@
+build:
+ image: latest
+python:
+ version: 3.6
+ pip_install: true
+ extra_requirements:
+ - docs
+formats: []
diff --git a/setup.py b/setup.py
index e06063f..bb17aab 100644
--- a/setup.py
+++ b/setup.py
@@ -119,5 +119,9 @@ setup(
packages=find_packages("src"),
package_data={"virtualenv_support": ["*.whl"]},
python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*",
+ extras_require={
+ "testing": ["mock", "pytest >= 3.0.0, <4", "pytest-cov >= 2.5.1, <3", "pytest-timeout >= 1.3.0, <2"],
+ "docs": ["sphinx >= 1.8.0, < 2"],
+ },
**setup_params
)
diff --git a/tox.ini b/tox.ini
index f68f025..37e2235 100644
--- a/tox.ini
+++ b/tox.ini
@@ -8,11 +8,7 @@ skip_missing_interpreters = true
description = run tests with {basepython}
setenv = PIP_DISABLE_VERSION_CHECK = 1
COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}}
-deps = mock
- pytest >= 3.0.0, <4
- pytest-cov >= 2.5.1, <3
- pytest-mock >= 1.10.0, <2
- pytest-timeout >= 1.3.0, <2
+extras = testing
commands = pytest {posargs:\
--cov=virtualenv \
--cov-config="{toxinidir}/tox.ini" \
@@ -41,9 +37,9 @@ source = src
[testenv:coverage]
description = [run locally after tests]: combine coverage data and create report;
generates a diff coverage against origin/master (can be changed by setting DIFF_AGAINST env var)
-deps = {[testenv]deps}
- coverage >= 4.4.1, < 5
+deps = coverage >= 4.4.1, < 5
diff_cover
+extras =
skip_install = True
passenv = DIFF_AGAINST
setenv = COVERAGE_FILE={toxworkdir}/.coverage
@@ -57,7 +53,7 @@ commands = coverage erase --rcfile="{toxinidir}/tox.ini"
[testenv:cross_python2]
description = test creating a python3 venv with a python2-based virtualenv
basepython = python2
-deps =
+extras =
commands = virtualenv -p python3 {envtmpdir}/{envname}
{envtmpdir}/{envname}/bin/python -V 2>&1 | grep "Python 3"
@@ -65,14 +61,14 @@ commands = virtualenv -p python3 {envtmpdir}/{envname}
[testenv:cross_python3]
description = test creating a python2 venv with a python3-based virtualenv
basepython = python3
-deps =
+extras =
commands = virtualenv -p python2 {envtmpdir}/{envname}
{envtmpdir}/{envname}/bin/python -V 2>&1 | grep "Python 2"
[testenv:docs]
basepython = python3
description = build documentation
-deps = sphinx
+extras = docs
commands = sphinx-build -d "{envtmpdir}/doctree" docs "{toxworkdir}/docs_out" --color -W -bhtml {posargs}
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'
@@ -88,7 +84,7 @@ commands = pip wheel -w {envtmpdir}/build --no-deps .
[testenv:embed]
description = embed dependencies into virtualenv.py
skip_install = true
-deps =
+extras =
commands = python {toxinidir}/bin/rebuild-script.py
[testenv:fix_lint]