%bcond_without tests Name: python-griffelib Version: 2.2.0 Release: %autorelease Summary: Python library to extract the structure and signatures of Python programs License: MIT and ISC URL: https://github.com/mkdocstrings/griffe Source: %{pypi_source griffelib} Patch0: griffelib-0001-skip-tests-when-running-without-dependencies.patch BuildArch: noarch BuildRequires: python3-devel # To pass the git related tests BuildRequires: git-core %if %{with tests} BuildRequires: python3-pytest %endif %global _description %{expand: Griffe is a Python library that extracts the structure, frame, and skeleton of Python projects. It parses source code to compute signatures for entire Python programs, which can be used to generate API documentation or detect breaking changes in an API.} %description %_description %package -n python3-griffelib Summary: %{summary} %description -n python3-griffelib %_description %pyproject_extras_subpkg -n python3-griffelib pypi %prep %autosetup -p3 -n griffelib-%{version} %generate_buildrequires %pyproject_buildrequires -x pypi -g dev %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l griffe %check %pyproject_check_import %if %{with tests} %pytest -v %endif %files -n python3-griffelib -f %{pyproject_files} %license LICENSE %doc CHANGELOG.md %doc README.md %changelog %autochangelog