mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-12 08:33:15 -04:00
dev-python/pylatex: update ebuild to conform with qa standards
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: David Denoncin <ddenoncin@gmail.com>
This commit is contained in:
@@ -6,9 +6,4 @@
|
||||
<email>ddenoncin@gmail.com</email>
|
||||
<name>David Denoncin</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="numpy">Optionally add dev-python/numpy</flag>
|
||||
<flag name="matplotlib">Optionally add dev-python/matplotlib</flag>
|
||||
<flag name="extras">Optionally add dev-python/quantities</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
|
||||
@@ -7,8 +7,8 @@ MY_PN="PyLaTeX"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7,8} ) #python2_7 -> error: package directory 'python2_source/pylatex' does not exist
|
||||
inherit distutils-r1
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
inherit distutils-r1 eutils
|
||||
|
||||
DESCRIPTION="A Python library for creating LaTeX files and snippets"
|
||||
HOMEPAGE="https://github.com/JelteF/PyLaTeX"
|
||||
@@ -17,40 +17,44 @@ SRC_URI="https://github.com/JelteF/${MY_PN}/archive/v${PV}.tar.gz -> ${MY_PN}.ta
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="examples matplotlib numpy extras"
|
||||
IUSE="examples"
|
||||
|
||||
DEPEND="
|
||||
dev-python/ordered-set[${PYTHON_USEDEP}]
|
||||
matplotlib? ( dev-python/matplotlib[$PYTHON_USEDEP] )
|
||||
numpy? ( dev-python/numpy[$PYTHON_USEDEP] )
|
||||
extras? ( dev-python/quantities[$PYTHON_USEDEP] )
|
||||
dev-python/ordered-set[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
distutils_enable_tests nose
|
||||
distutils_enable_sphinx docs
|
||||
distutils_enable_tests nose
|
||||
|
||||
DEPEND+="
|
||||
test? (
|
||||
dev-python/quantities
|
||||
dev-python/matplotlib
|
||||
dev-python/numpy
|
||||
)
|
||||
"
|
||||
|
||||
src_prepare(){
|
||||
if use doc; then
|
||||
sphinx-apidoc -F -o docs "${S}"/pylatex # conf.py is not included in source
|
||||
fi
|
||||
if use doc; then
|
||||
sphinx-apidoc -F -o docs "${S}"/pylatex # conf.py is not included in source
|
||||
fi
|
||||
|
||||
distutils-r1_src_prepare
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
if use examples ; then
|
||||
docinto examples
|
||||
dodoc -r examples/.
|
||||
fi
|
||||
if use examples ; then
|
||||
docinto examples
|
||||
dodoc -r examples/.
|
||||
fi
|
||||
|
||||
distutils-r1_python_install_all
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if ! use extras ; then
|
||||
rm "${S}"/tests/test_quantities.py # remove if quantities is not installed
|
||||
fi
|
||||
distutils-r1_src_test
|
||||
pkg_postinst() {
|
||||
elog "Optional dependencies:"
|
||||
optfeature "matplotlib support" dev-python/matplotlib
|
||||
optfeature "numpy support" dev-python/numpy
|
||||
optfeature "quantities support" dev-python/quantities
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user