Merge pull request #1914 from RonnyPfannschmidt/docs-remove-getdoctarget
docs: remove the need for special scripts
This commit is contained in:
commit
99efc281ee
|
@ -19,10 +19,9 @@ REGENDOC_ARGS := \
|
||||||
--normalize "@/tmp/pytest-of-.*/pytest-\d+@PYTEST_TMPDIR@" \
|
--normalize "@/tmp/pytest-of-.*/pytest-\d+@PYTEST_TMPDIR@" \
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
|
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
|
||||||
|
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "Please use \`make <target>' where <target> is one of"
|
@echo "Please use \`make <target>' where <target> is one of"
|
||||||
@echo " html to make standalone HTML files"
|
@echo " html to make standalone HTML files"
|
||||||
|
@ -36,22 +35,6 @@ help:
|
||||||
clean:
|
clean:
|
||||||
-rm -rf $(BUILDDIR)/*
|
-rm -rf $(BUILDDIR)/*
|
||||||
|
|
||||||
SITETARGET=$(shell ./_getdoctarget.py)
|
|
||||||
|
|
||||||
showtarget:
|
|
||||||
@echo $(SITETARGET)
|
|
||||||
|
|
||||||
install: html
|
|
||||||
# for access talk to someone with login rights to
|
|
||||||
# pytest-dev@pytest.org to add your ssh key
|
|
||||||
rsync -avz _build/html/ pytest-dev@pytest.org:pytest.org/$(SITETARGET)
|
|
||||||
|
|
||||||
installpdf: latexpdf
|
|
||||||
@scp $(BUILDDIR)/latex/pytest.pdf pytest-dev@pytest.org:pytest.org/$(SITETARGET)
|
|
||||||
|
|
||||||
installall: clean install installpdf
|
|
||||||
@echo "done"
|
|
||||||
|
|
||||||
regen:
|
regen:
|
||||||
PYTHONDONTWRITEBYTECODE=1 COLUMNS=76 regendoc --update *.rst */*.rst ${REGENDOC_ARGS}
|
PYTHONDONTWRITEBYTECODE=1 COLUMNS=76 regendoc --update *.rst */*.rst ${REGENDOC_ARGS}
|
||||||
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
import py
|
|
||||||
|
|
||||||
def get_version_string():
|
|
||||||
fn = py.path.local(__file__).join("..", "..", "..",
|
|
||||||
"_pytest", "__init__.py")
|
|
||||||
for line in fn.readlines():
|
|
||||||
if "version" in line and not line.strip().startswith('#'):
|
|
||||||
return eval(line.split("=")[-1])
|
|
||||||
|
|
||||||
def get_minor_version_string():
|
|
||||||
return ".".join(get_version_string().split(".")[:2])
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
print (get_minor_version_string())
|
|
|
@ -19,11 +19,8 @@
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
|
|
||||||
import os, sys
|
import os, sys
|
||||||
sys.path.insert(0, os.path.dirname(__file__))
|
from _pytest import __version__ as version
|
||||||
import _getdoctarget
|
release = ".".join(version.split(".")[:2])
|
||||||
|
|
||||||
version = _getdoctarget.get_minor_version_string()
|
|
||||||
release = _getdoctarget.get_version_string()
|
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
# add these directories to sys.path here. If the directory is relative to the
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
|
|
Loading…
Reference in New Issue