From 7dd5aef9c69ec38b20c7bba5df9af33d2a602287 Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Wed, 18 Mar 2020 19:46:06 +0100 Subject: [PATCH] dev-python/starlette: enable docs also made an attempt at getting tests to work but we need newer graphql-core Package-Manager: Portage-2.3.94, Repoman-2.3.21 Signed-off-by: Andrew Ammerlaan --- dev-python/starlette/Manifest | 2 +- dev-python/starlette/starlette-0.13.2.ebuild | 49 ++++++++++++++++---- 2 files changed, 40 insertions(+), 11 deletions(-) diff --git a/dev-python/starlette/Manifest b/dev-python/starlette/Manifest index 9b3908d7a4..f2483f6280 100644 --- a/dev-python/starlette/Manifest +++ b/dev-python/starlette/Manifest @@ -1 +1 @@ -DIST starlette-0.13.2.tar.gz 48335 BLAKE2B 10241c501989ececf33d11f98fbaee09ad141bc3baee92373cdc134941ef2f0260af7812888d1c3a124ec803ad978f6cb24a88e053439fff2cd9308bb9e83ee8 SHA512 ff312536bc28fa2d2c7b0bc81ce4c47fdfef885a0c6a9fe39cd02407ea4c334b0506f1d1fd0a31fa51353255024a9090ad31ce560426362e471312aa0b09c3a3 +DIST starlette-0.13.2.tar.gz 431011 BLAKE2B 60a34667c5c784dc4167ddaf764be976f97e95f518c6c1cd7c0d20a41c10cdc2232a402a39b5c742a5fbc8a19613713fa18756f0b1858e8acf9905f614ae0d58 SHA512 9622f5ddcf7469305e0d509457a1d9c7e44b6291e84c0c5627d4599dc2f561ce58a5437214b41917ac019dd6f27c3551ed0dea38b57fbbcadc54b30ceca870a5 diff --git a/dev-python/starlette/starlette-0.13.2.ebuild b/dev-python/starlette/starlette-0.13.2.ebuild index 255b3940a8..541f6ae3c0 100644 --- a/dev-python/starlette/starlette-0.13.2.ebuild +++ b/dev-python/starlette/starlette-0.13.2.ebuild @@ -3,36 +3,65 @@ EAPI=7 -PYTHON_COMPAT=(python3_{6,7,8} pypy3 ) +PYTHON_COMPAT=( python3_6 ) inherit distutils-r1 eutils -DESCRIPTION="The little ASGI framework that shines." +DESCRIPTION="The little ASGI framework that shines" HOMEPAGE=" https://www.starlette.io/ https://github.com/encode/starlette " -SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" +SRC_URI="https://github.com/encode/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~x86" -DEPEND="test? ( dev-python/black[${PYTHON_USEDEP}] - dev-python/databases[${PYTHON_USEDEP}] - dev-python/isort[${PYTHON_USEDEP}] - dev-python/mypy[${PYTHON_USEDEP}] )" +IUSE="doc" +REQUIRED_USE="x86? ( !doc )" + +# ModuleNotFoundError: No module named 'graphql.pyutils.compat' +# We need newer graphql-core +RESTRICT="test" + +BDEPEND="doc? ( !x86? ( + dev-python/mkdocs + dev-python/mkdocs-material + dev-python/mkautodoc ) )" + +DEPEND="test? ( + dev-python/aiofiles[${PYTHON_USEDEP}] + dev-python/black[${PYTHON_USEDEP}] + dev-python/databases[${PYTHON_USEDEP}] + dev-python/isort[${PYTHON_USEDEP}] + dev-python/itsdangerous[${PYTHON_USEDEP}] + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/mypy[${PYTHON_USEDEP}] + dev-python/python-multipart[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/sse-starlette[${PYTHON_USEDEP}] + dev-python/ujson[${PYTHON_USEDEP}] + dev-python/graphene[${PYTHON_USEDEP}] )" python_prepare_all() { - # do not install LICENSE to /usr/ + # do not install LICENSE to /usr/ sed -i -e '/data_files/d' setup.py || die - distutils-r1_python_prepare_all + distutils-r1_python_prepare_all +} + +python_compile_all() { + default + if use doc; then + mkdocs build || die "failed to make docs" + HTML_DOCS="site" + fi } pkg_postinst() { optfeature "Required if you want to use FileResponse or StaticFiles" dev-python/aiofiles - optfeature "Required if you want to use Jinja2Templates" dev-python/jinja2 + optfeature "Required if you want to use Jinja2Templates" dev-python/jinja optfeature "Required if you want to support form parsing, with request.form()" dev-python/python-multipart optfeature "Required for SessionMiddleware support." dev-python/itsdangerous optfeature "Required for SchemaGenerator support." dev-python/pyyaml