diff --git a/SPECS/python-cffi.spec b/SPECS/python-cffi.spec index 51ff25d..08c77c6 100644 --- a/SPECS/python-cffi.spec +++ b/SPECS/python-cffi.spec @@ -1,6 +1,8 @@ # RHEL: Docs disabled due to python3-sphinx not being installable during build of the python39 module %bcond_with docs +%bcond_without tests + Name: python-cffi Version: 1.14.3 Release: 2%{?dist} @@ -18,8 +20,10 @@ BuildRequires: make BuildRequires: libffi-devel BuildRequires: gcc +%if %{with tests} # For tests: BuildRequires: gcc-c++ +%endif %?python_enable_dependency_generator @@ -31,9 +35,11 @@ based on LuaJIT’s FFI. %package -n python%{python3_pkgversion}-cffi Summary: Foreign Function Interface for Python 3 to call C code %if %{with docs} -BuildRequires: python%{python3_pkgversion}-sphinx +BuildRequires: python3-sphinx %endif +%if %{with tests} BuildRequires: python%{python3_pkgversion}-pytest +%endif BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-rpm-macros BuildRequires: python%{python3_pkgversion}-setuptools @@ -71,8 +77,10 @@ rm build/html/.buildinfo %install %py3_install +%if %{with tests} %check PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest c/ testing/ +%endif %files -n python%{python3_pkgversion}-cffi %doc PKG-INFO