# running tests with plugin fails # ImportError: Error importing plugin "trio_typing._tests.datadriven": cannot import name 'mypyc_output_dir' from '' (unknown location) %bcond tests 0 Name: python-trio-typing Version: 0.10.0 Release: %autorelease Summary: Static type checking support for Trio and related projects License: MIT OR Apache-2.0 URL: https://github.com/python-trio/trio-typing Source: %{pypi_source trio-typing} BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(pytest) %global _description %{expand: This package provides: * PEP 561 typing stubs packages for the Trio project packages: * trio (trio-stubs) * outcome (outcome-stubs) * async_generator (async_generator-stubs) * A package trio_typing containing types that Trio programs often want to refer to (AsyncGenerator[Y, S] and TaskStatus[T]) (Nursery is exported publicly by mainline Trio as of version 0.12.0.) * A mypy plugin that smooths over some limitations in the basic type hints. } %description %_description %package -n python3-trio-typing Summary: %{summary} %description -n python3-trio-typing %_description %pyproject_extras_subpkg -n python3-trio-typing mypy %prep %autosetup -p1 -n trio-typing-%{version} %generate_buildrequires %pyproject_buildrequires -x mypy %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l async_generator-stubs outcome-stubs trio-stubs trio_typing %check %pyproject_check_import %if %{with tests} # this is what upstream recommends but fails # ImportError: Error importing plugin "trio_typing._tests.datadriven": cannot import name 'mypyc_output_dir' from '' (unknown location) %pytest -p trio_typing._tests.datadriven --pyargs trio_typing %endif %files -n python3-trio-typing -f %{pyproject_files} %changelog %autochangelog