diff options
Diffstat (limited to 'dev-python/uvicorn/uvicorn-0.21.1.ebuild')
-rw-r--r-- | dev-python/uvicorn/uvicorn-0.21.1.ebuild | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/dev-python/uvicorn/uvicorn-0.21.1.ebuild b/dev-python/uvicorn/uvicorn-0.21.1.ebuild index 4dbce7762222..18a059cd9646 100644 --- a/dev-python/uvicorn/uvicorn-0.21.1.ebuild +++ b/dev-python/uvicorn/uvicorn-0.21.1.ebuild @@ -23,6 +23,7 @@ SRC_URI=" LICENSE="BSD" SLOT="0" KEYWORDS="amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv" +IUSE="test-rust" RDEPEND=" >=dev-python/asgiref-3.4.0[${PYTHON_USEDEP}] @@ -32,7 +33,6 @@ RDEPEND=" BDEPEND=" test? ( dev-python/a2wsgi[${PYTHON_USEDEP}] - dev-python/cryptography[${PYTHON_USEDEP}] dev-python/httpx[${PYTHON_USEDEP}] dev-python/pytest-asyncio[${PYTHON_USEDEP}] dev-python/pytest-mock[${PYTHON_USEDEP}] @@ -41,9 +41,17 @@ BDEPEND=" dev-python/trustme[${PYTHON_USEDEP}] >=dev-python/websockets-10.4[${PYTHON_USEDEP}] dev-python/wsproto[${PYTHON_USEDEP}] + test-rust? ( + dev-python/cryptography[${PYTHON_USEDEP}] + dev-python/watchfiles[${PYTHON_USEDEP}] + ) ) " +PATCHES=( + "${FILESDIR}"/${PN}-0.21.1-optional-rust.patch +) + distutils_enable_tests pytest python_test() { @@ -64,10 +72,19 @@ python_test() { fi local EPYTEST_IGNORE=() - # love from Rust world - if ! has_version "dev-python/watchfiles[${PYTHON_USEDEP}]"; then + + if ! use test-rust ; then + EPYTEST_DESELECT+=( + # dev-python/cryptography + tests/test_config.py::test_ssl_config + tests/test_config.py::test_ssl_config_combined + ) + EPYTEST_IGNORE+=( + # dev-python/watchdog tests/supervisors/test_reload.py + # dev-python/cryptography + tests/test_ssl.py ) fi |