diff options
author | Universebenzene | 2023-09-09 12:55:46 +0800 |
---|---|---|
committer | Universebenzene | 2023-09-09 12:55:46 +0800 |
commit | 29a10839ca183519031cb873e83ece33d7e3028f (patch) | |
tree | 551875fe4441b70a989a12b2eae34948f1347b51 | |
parent | e5d7140a7c0ea58a0ae0d2a66941ef09fb0a8fd1 (diff) | |
download | aur-29a10839ca183519031cb873e83ece33d7e3028f.tar.gz |
Update to version 2.0.1
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | Makefile | 134 | ||||
-rw-r--r-- | PKGBUILD | 48 |
3 files changed, 182 insertions, 15 deletions
@@ -1,19 +1,24 @@ pkgbase = python-sunpy-sphinx-theme pkgdesc = The sphinx theme for the SunPy website and documentation - pkgver = 1.2.42 + pkgver = 2.0.1 pkgrel = 1 url = https://github.com/sunpy/sunpy-sphinx-theme arch = any license = BSD checkdepends = python-nose - checkdepends = python-sphinx-bootstrap-theme makedepends = python-setuptools-scm makedepends = python-wheel makedepends = python-build makedepends = python-installer - source = https://files.pythonhosted.org/packages/source/s/sunpy-sphinx-theme/sunpy-sphinx-theme-1.2.42.tar.gz - md5sums = 5db658613f933bab237c7af8b52d3562 + makedepends = python-pydata-sphinx-theme + source = https://files.pythonhosted.org/packages/source/s/sunpy-sphinx-theme/sunpy-sphinx-theme-2.0.1.tar.gz + source = Makefile + md5sums = e57aa0474c734ecea39e42c558b267d6 + md5sums = a6aa4bc42b138d75f938065a0994c3e1 pkgname = python-sunpy-sphinx-theme depends = python-sphinx - depends = python-sphinx-bootstrap-theme + depends = python-pydata-sphinx-theme<0.14 + +pkgname = python-sunpy-sphinx-theme-doc + pkgdesc = Documentation for sunpy-sphinx-theme diff --git a/Makefile b/Makefile new file mode 100644 index 000000000000..c7979506d6bf --- /dev/null +++ b/Makefile @@ -0,0 +1,134 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest + +#This is needed with git because git doesn't create a dir if it's empty +$(shell [ -d "_static" ] || mkdir -p _static) + +help: + @echo "Please use \`make <target>' where <target> is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf $(BUILDDIR) + -rm -rf api + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Astropy.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Astropy.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/Astropy" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Astropy" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + make -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." @@ -2,37 +2,65 @@ pkgbase=python-sunpy-sphinx-theme _pyname=${pkgbase#python-} -pkgname=("python-${_pyname}") -pkgver=1.2.42 +pkgname=("python-${_pyname}" "python-${_pyname}-doc") +pkgver=2.0.1 pkgrel=1 pkgdesc="The sphinx theme for the SunPy website and documentation" arch=('any') url="https://github.com/sunpy/sunpy-sphinx-theme" license=('BSD') -makedepends=('python-setuptools-scm' 'python-wheel' 'python-build' 'python-installer') -#checkdepends=('python-pytest' 'python-sphinx') -checkdepends=('python-nose' 'python-sphinx-bootstrap-theme') -source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz") -md5sums=('5db658613f933bab237c7af8b52d3562') +makedepends=('python-setuptools-scm' + 'python-wheel' + 'python-build' + 'python-installer' + 'python-pydata-sphinx-theme') +checkdepends=('python-nose') # pydata already in makedepends +source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz" + 'Makefile') +md5sums=('e57aa0474c734ecea39e42c558b267d6' + 'a6aa4bc42b138d75f938065a0994c3e1') -build() { +get_pyver() { + python -c "import sys; print('$1'.join(map(str, sys.version_info[:2])))" +} + +prepare() { cd ${srcdir}/${_pyname}-${pkgver} + ln -s ${srcdir}/Makefile docs +} + +build() { + cd ${srcdir}/${_pyname}-${pkgver} python -m build --wheel --no-isolation + + msg "Building Docs" + ln -rs ${srcdir}/${_pyname}-${pkgver}/src/${_pyname//-/_}*egg-info \ + build/lib/${_pyname//-/_}-${pkgver}-py$(get_pyver .).egg-info + PYTHONPATH="../build/lib" make -C docs html } check() { cd ${srcdir}/${_pyname}-${pkgver} # pytest - nosetests + nosetests -v -x } package_python-sunpy-sphinx-theme() { - depends=('python-sphinx' 'python-sphinx-bootstrap-theme') + depends=('python-sphinx' 'python-pydata-sphinx-theme<0.14') cd ${srcdir}/${_pyname}-${pkgver} install -D -m644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}" install -D -m644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}" python -m installer --destdir="${pkgdir}" dist/*.whl } + +package_python-sunpy-sphinx-theme-doc() { + pkgdesc="Documentation for sunpy-sphinx-theme" + cd ${srcdir}/${_pyname}-${pkgver}/docs/_build + + install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" ../../LICENSE.md + install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}" + cp -a html "${pkgdir}/usr/share/doc/${pkgbase}" +} |