diff --git a/python-cffi.spec b/python-cffi.spec index 754a4e4..d9abd4f 100644 --- a/python-cffi.spec +++ b/python-cffi.spec @@ -22,6 +22,7 @@ Patch: https://foss.heptapod.net/pypy/cffi/-/commit/87f514b.patch Patch: https://foss.heptapod.net/pypy/cffi/-/commit/69660bd.patch Patch: https://foss.heptapod.net/pypy/cffi/-/commit/814c55e.patch +BuildRequires: python3-devel BuildRequires: make BuildRequires: libffi-devel BuildRequires: gcc @@ -36,11 +37,6 @@ based on LuaJIT’s FFI. %package -n python3-cffi Summary: Foreign Function Interface for Python 3 to call C code -BuildRequires: python3-sphinx -BuildRequires: python3-pytest -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pycparser %description -n python3-cffi Foreign Function Interface for Python, providing a convenient and @@ -50,6 +46,7 @@ based on LuaJIT’s FFI. %package doc Summary: Documentation for CFFI BuildArch: noarch +BuildRequires: python3-sphinx %description doc Documentation for CFFI, the Foreign Function Interface for Python. @@ -57,25 +54,25 @@ Documentation for CFFI, the Foreign Function Interface for Python. %prep %autosetup -p1 -n cffi-v%{general_version}%{?prerel} +%generate_buildrequires +%pyproject_buildrequires requirements.txt + %build -%py3_build +%pyproject_wheel cd doc make SPHINXBUILD=sphinx-build-3 html rm build/html/.buildinfo %install -%py3_install +%pyproject_install +%pyproject_save_files _cffi_backend cffi %check -PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest c/ testing/ +%pytest c/ testing/ -%files -n python3-cffi +%files -n python3-cffi -f %{pyproject_files} %doc README.md -%license LICENSE -%{python3_sitearch}/cffi/ -%{python3_sitearch}/_cffi_backend.*.so -%{python3_sitearch}/cffi-%{general_version}%{?prerel}-py%{python3_version}.egg-info/ %files doc %doc doc/build/html