From 60404288705b3df37bc04b1bbfe69a7704a3a4f2 Mon Sep 17 00:00:00 2001 From: Maciej Barć Date: Mon, 4 Apr 2022 15:53:22 +0200 Subject: sci-mathematics/alectryon: fix setup.cfg; add DISTUTILS_USE_PEP517 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: https://github.com/cpitclaudel/alectryon/pull/80 Closes: https://bugs.gentoo.org/836748 Signed-off-by: Maciej Barć --- .../alectryon/alectryon-1.4.0-r1.ebuild | 80 ++++++++++++++++++++++ sci-mathematics/alectryon/alectryon-1.4.0.ebuild | 78 --------------------- .../files/alectryon-1.4.0-setup.cfg-version.patch | 11 +++ 3 files changed, 91 insertions(+), 78 deletions(-) create mode 100644 sci-mathematics/alectryon/alectryon-1.4.0-r1.ebuild delete mode 100644 sci-mathematics/alectryon/alectryon-1.4.0.ebuild create mode 100644 sci-mathematics/alectryon/files/alectryon-1.4.0-setup.cfg-version.patch (limited to 'sci-mathematics/alectryon') diff --git a/sci-mathematics/alectryon/alectryon-1.4.0-r1.ebuild b/sci-mathematics/alectryon/alectryon-1.4.0-r1.ebuild new file mode 100644 index 000000000000..a15045952615 --- /dev/null +++ b/sci-mathematics/alectryon/alectryon-1.4.0-r1.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{8..10} ) + +inherit elisp-common distutils-r1 + +DESCRIPTION="Toolkit for literate programming in Coq" +HOMEPAGE="https://github.com/cpitclaudel/alectryon/" + +if [[ "${PV}" == *9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/cpitclaudel/${PN}.git" +else + SRC_URI="https://github.com/cpitclaudel/${PN}/archive/v${PV}.tar.gz + -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="doc emacs" + +RDEPEND=" + dev-python/beautifulsoup4[${PYTHON_USEDEP}] + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/dominate[${PYTHON_USEDEP}] + dev-python/myst_parser[${PYTHON_USEDEP}] + dev-python/pygments[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + sci-mathematics/coq-serapi +" +DEPEND="${RDEPEND}" +BDEPEND=" + emacs? ( + >=app-editors/emacs-23.1:* + app-emacs/flycheck + app-emacs/proofgeneral + ) +" + +DOCS=( CHANGES.rst CITATION.bib README.rst ) +PATCHES=( "${FILESDIR}"/${P}-setup.cfg-version.patch ) +SITEFILE="50${PN}-gentoo.el" + +src_compile() { + python_foreach_impl distutils-r1_python_compile + + use doc && emake -C ./recipes/sphinx latexpdf + use emacs && elisp-compile ./etc/elisp/alectryon.el +} + +src_install() { + python_foreach_impl distutils-r1_python_install + einstalldocs + + if use doc ; then + docinto html + dodoc ./recipes/sphinx/_build/html/* + docinto pdf + dodoc ./recipes/sphinx/_build/latex/alectryon-demo.pdf + docinto latex + dodoc ./recipes/sphinx/_build/latex/alectryon-demo.tex + fi + if use emacs ; then + elisp-install ${PN} ./etc/elisp/${PN}.el{,c} + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sci-mathematics/alectryon/alectryon-1.4.0.ebuild b/sci-mathematics/alectryon/alectryon-1.4.0.ebuild deleted file mode 100644 index bdbf53a0c35b..000000000000 --- a/sci-mathematics/alectryon/alectryon-1.4.0.ebuild +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{8..10} ) - -inherit elisp-common distutils-r1 - -DESCRIPTION="Toolkit for literate programming in Coq" -HOMEPAGE="https://github.com/cpitclaudel/alectryon/" - -if [[ "${PV}" == *9999* ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/cpitclaudel/${PN}.git" -else - SRC_URI="https://github.com/cpitclaudel/${PN}/archive/v${PV}.tar.gz - -> ${P}.tar.gz" - KEYWORDS="~amd64" -fi - -LICENSE="MIT" -SLOT="0" -IUSE="doc emacs" - -RDEPEND=" - dev-python/beautifulsoup4[${PYTHON_USEDEP}] - dev-python/docutils[${PYTHON_USEDEP}] - dev-python/dominate[${PYTHON_USEDEP}] - dev-python/myst_parser[${PYTHON_USEDEP}] - dev-python/pygments[${PYTHON_USEDEP}] - dev-python/sphinx[${PYTHON_USEDEP}] - sci-mathematics/coq-serapi -" -DEPEND="${RDEPEND}" -BDEPEND=" - emacs? ( - >=app-editors/emacs-23.1:* - app-emacs/flycheck - app-emacs/proofgeneral - ) -" - -DOCS=( CHANGES.rst CITATION.bib README.rst ) -SITEFILE="50${PN}-gentoo.el" - -src_compile() { - python_foreach_impl distutils-r1_python_compile - - use doc && emake -C ./recipes/sphinx latexpdf - use emacs && elisp-compile ./etc/elisp/alectryon.el -} - -src_install() { - python_foreach_impl distutils-r1_python_install - einstalldocs - - if use doc ; then - docinto html - dodoc ./recipes/sphinx/_build/html/* - docinto pdf - dodoc ./recipes/sphinx/_build/latex/alectryon-demo.pdf - docinto latex - dodoc ./recipes/sphinx/_build/latex/alectryon-demo.tex - fi - if use emacs ; then - elisp-install ${PN} ./etc/elisp/${PN}.el{,c} - elisp-site-file-install "${FILESDIR}/${SITEFILE}" - fi -} - -pkg_postinst() { - use emacs && elisp-site-regen -} - -pkg_postrm() { - use emacs && elisp-site-regen -} diff --git a/sci-mathematics/alectryon/files/alectryon-1.4.0-setup.cfg-version.patch b/sci-mathematics/alectryon/files/alectryon-1.4.0-setup.cfg-version.patch new file mode 100644 index 000000000000..9445c0857f0d --- /dev/null +++ b/sci-mathematics/alectryon/files/alectryon-1.4.0-setup.cfg-version.patch @@ -0,0 +1,11 @@ +index 1a25a92..066089b 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -1,6 +1,6 @@ + [metadata] + name = alectryon +-version = attr: alectryon.__version__ ++version = attr: alectryon.__init__.__version__ + description = A library to process Coq snippets embedded in documents, showing goals and messages for each Coq sentence. + long_description = file: README.rst + url = https://github.com/cpitclaudel/alectryon -- cgit v1.2.3-65-gdbad