Skip to content

Commit

Permalink
- clean up documentation configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Jul 2, 2021
1 parent 1e8a6e4 commit 3a725c5
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 71 deletions.
4 changes: 3 additions & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ interpreter = zopepy

[docs]
recipe = zc.recipe.egg
eggs = Sphinx
eggs =
Products.GenericSetup[docs]
Sphinx
scripts =
sphinx-build
74 changes: 12 additions & 62 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,70 +1,20 @@
# Makefile for Sphinx documentation
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d .build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html web pickle htmlhelp latex changes linkcheck
SPHINXBUILD = ../bin/sphinx-build
SPHINXPROJ = ZMySQLDA
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " pickle to make pickle files (usable by e.g. sphinx-web)"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " changes to make an overview over all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"

clean:
-rm -rf .build/*

html:
mkdir -p .build/html .build/doctrees
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) .build/html
@echo
@echo "Build finished. The HTML pages are in .build/html."

pickle:
mkdir -p .build/pickle .build/doctrees
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) .build/pickle
@echo
@echo "Build finished; now you can process the pickle files or run"
@echo " sphinx-web .build/pickle"
@echo "to start the sphinx-web server."

web: pickle

htmlhelp:
mkdir -p .build/htmlhelp .build/doctrees
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) .build/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in .build/htmlhelp."

latex:
mkdir -p .build/latex .build/doctrees
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) .build/latex
@echo
@echo "Build finished; the LaTeX files are in .build/latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
"run these through (pdf)latex."
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

changes:
mkdir -p .build/changes .build/doctrees
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) .build/changes
@echo
@echo "The overview file is in .build/changes."
.PHONY: help Makefile

linkcheck:
mkdir -p .build/linkcheck .build/doctrees
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) .build/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in .build/linkcheck/output.txt."
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# All configuration values have a default value; values that are commented out
# serve to show the default value.

import datetime
import sys
import os
import pkg_resources
Expand Down Expand Up @@ -42,8 +43,9 @@
master_doc = 'index'

# General substitutions.
year = datetime.datetime.now().year
project = 'Products.GenericSetup'
copyright = '2008-2017, Zope CMF Developers'
copyright = '2008-%s, Zope Foundation and Contributors' % year

# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
Expand Down
7 changes: 1 addition & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
docs = os.path.join(here, 'docs')


def _package_doc(name):
with open(os.path.join(package, name)) as f:
return f.read()


with open('README.rst') as f:
README = f.read()

Expand All @@ -27,7 +22,7 @@ def _package_doc(name):

setup(
name='Products.GenericSetup',
version=_package_doc('version.txt').strip(),
version='2.1.3.dev0',
description='Read Zope configuration state from profile dirs / tarballs',
long_description=README + _BOUNDARY + CHANGES,
classifiers=[
Expand Down
1 change: 0 additions & 1 deletion src/Products/GenericSetup/version.txt

This file was deleted.

0 comments on commit 3a725c5

Please sign in to comment.