guru/dev-python/pydantic/pydantic-1.5.1.ebuild
Andrew Ammerlaan 707d825675
dev-python: email-validator moved to ::gentoo
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
2020-05-21 19:53:29 +02:00

49 lines
1.2 KiB
Bash

# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6,7} )
DOCBUILDER="mkdocs"
DOCDEPEND="
dev-python/mkdocs-material
dev-python/mkdocs-exclude
dev-python/markdown-include
"
inherit distutils-r1 docs
DESCRIPTION="Data parsing and validation using Python type hints"
HOMEPAGE="https://github.com/samuelcolvin/pydantic"
SRC_URI="https://github.com/samuelcolvin/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
KEYWORDS="~amd64 ~x86"
SLOT="0"
distutils_enable_tests pytest
BDEPEND="dev-python/cython"
DEPEND="test? (
dev-python/mypy[${PYTHON_USEDEP}]
dev-python/pytest-mock[${PYTHON_USEDEP}]
)"
RDEPEND="
>=dev-python/devtools-0.5.1[${PYTHON_USEDEP}]
>=dev-python/python-email-validator-1.0.5[${PYTHON_USEDEP}]
>=dev-python/python-dotenv-0.13.0[${PYTHON_USEDEP}]
dev-python/typing-extensions[${PYTHON_USEDEP}]
$(python_gen_cond_dep 'dev-python/dataclasses[${PYTHON_USEDEP}]' python3_6)
"
python_prepare_all() {
# AssertionError: assert 'pydantic-1.5.1.tar.gz' == 'config a'
sed -i -e 's:test_config_file_settings_nornir:_&:' \
tests/test_settings.py || die
distutils-r1_python_prepare_all
}