mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-23 18:38:08 -07:00
dev-python/six: keyword 1.16.0-r1 for ~arm64-macos dev-python/regex: keyword 2023.6.3 for ~arm64-macos dev-python/python-dateutil: keyword 2.8.2-r1 for ~arm64-macos dev-python/idna: keyword 3.4 for ~arm64-macos dev-python/attrs: keyword 23.1.0 for ~arm64-macos dev-python/numpy: keyword 1.24.4-r1 for ~arm64-macos dev-python/jsonschema: keyword 4.17.3 for ~arm64-macos dev-python/arrow: keyword 1.2.3 for ~arm64-macos dev-python/fqdn: keyword 1.5.1-r2 for ~arm64-macos dev-python/hatch-fancy-pypi-readme: keyword 23.1.0 for ~arm64-macos dev-python/hatch-vcs: keyword 0.3.0 for ~arm64-macos dev-python/isoduration: keyword 20.11.0-r1 for ~arm64-macos dev-python/lark: keyword 1.1.5 for ~arm64-macos dev-python/pkgconfig: keyword 1.5.5-r1 for ~arm64-macos dev-python/poetry-core: keyword 1.6.1 for ~arm64-macos dev-python/pyrsistent: keyword 0.19.3 for ~arm64-macos dev-python/rfc3339-validator: keyword 0.1.4-r1 for ~arm64-macos dev-python/rfc3986-validator: keyword 0.1.1-r1 for ~arm64-macos dev-python/rfc3987: keyword 1.3.8-r2 for ~arm64-macos dev-python/strict-rfc3339: keyword 0.7-r2 for ~arm64-macos dev-python/webcolors: keyword 1.13 for ~arm64-macos dev-python/uri_template: keyword 1.3.0 for ~arm64-macos dev-python/jsonpointer: keyword 2.4 for ~arm64-macos sci-libs/hdf5: keyword 1.14.1 for ~arm64-macos Reported-by: Jiajie Chen <jiegec@qq.com> Signed-off-by: Benda Xu <heroxbd@gentoo.org>
80 lines
1.9 KiB
Bash
80 lines
1.9 KiB
Bash
# Copyright 2022-2023 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
DISTUTILS_USE_PEP517=standalone
|
|
PYTHON_TESTED=( pypy3 python3_{10..12} )
|
|
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
|
|
|
|
inherit distutils-r1
|
|
|
|
DESCRIPTION="Poetry PEP 517 Build Backend"
|
|
HOMEPAGE="
|
|
https://github.com/python-poetry/poetry-core/
|
|
https://pypi.org/project/poetry-core/
|
|
"
|
|
SRC_URI="
|
|
https://github.com/python-poetry/poetry-core/archive/${PV}.tar.gz
|
|
-> ${P}.gh.tar.gz
|
|
"
|
|
|
|
LICENSE="MIT"
|
|
SLOT="0"
|
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~x64-macos"
|
|
|
|
# check inside src/poetry/core/_vendor/vendor.txt
|
|
# (note that some are indirect deps)
|
|
RDEPEND="
|
|
dev-python/jsonschema[${PYTHON_USEDEP}]
|
|
dev-python/lark[${PYTHON_USEDEP}]
|
|
dev-python/packaging[${PYTHON_USEDEP}]
|
|
$(python_gen_cond_dep '
|
|
dev-python/tomli[${PYTHON_USEDEP}]
|
|
' 3.9 3.10)
|
|
"
|
|
BDEPEND="
|
|
${RDEPEND}
|
|
test? (
|
|
$(python_gen_cond_dep '
|
|
dev-python/build[${PYTHON_USEDEP}]
|
|
dev-python/pytest-mock[${PYTHON_USEDEP}]
|
|
dev-python/tomli-w[${PYTHON_USEDEP}]
|
|
dev-python/virtualenv[${PYTHON_USEDEP}]
|
|
dev-vcs/git
|
|
' "${PYTHON_TESTED[@]}")
|
|
)
|
|
"
|
|
|
|
distutils_enable_tests pytest
|
|
|
|
PATCHES=(
|
|
"${FILESDIR}/${P}-pypy3.patch"
|
|
)
|
|
|
|
EPYTEST_DESELECT=(
|
|
# These "fail" bacause of glob file path resulting from newer versions
|
|
# in our tree than vendored. But those don't affect anything.
|
|
tests/masonry/builders/test_sdist.py::test_default_with_excluded_data
|
|
tests/masonry/builders/test_wheel.py::test_default_src_with_excluded_data
|
|
)
|
|
|
|
src_prepare() {
|
|
# remove vendoring of dependencies
|
|
rm -r src/poetry/core/_vendor || die
|
|
sed -e '/__vendor_site__/d' -i src/poetry/core/__init__.py || die
|
|
|
|
distutils-r1_src_prepare
|
|
}
|
|
|
|
python_test() {
|
|
if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then
|
|
einfo "Skippin tests on ${EPYTHON} (unported deps)"
|
|
return
|
|
fi
|
|
|
|
# needed for migration from <1.1
|
|
distutils_write_namespace poetry
|
|
epytest
|
|
}
|