Convert to pyproject-rpm-macros
This commit is contained in:
parent
1990903f74
commit
74a85f3b2f
@ -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/69660bd.patch
|
||||||
Patch: https://foss.heptapod.net/pypy/cffi/-/commit/814c55e.patch
|
Patch: https://foss.heptapod.net/pypy/cffi/-/commit/814c55e.patch
|
||||||
|
|
||||||
|
BuildRequires: python3-devel
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: libffi-devel
|
BuildRequires: libffi-devel
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
@ -36,11 +37,6 @@ based on LuaJIT’s FFI.
|
|||||||
|
|
||||||
%package -n python3-cffi
|
%package -n python3-cffi
|
||||||
Summary: Foreign Function Interface for Python 3 to call C code
|
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
|
%description -n python3-cffi
|
||||||
Foreign Function Interface for Python, providing a convenient and
|
Foreign Function Interface for Python, providing a convenient and
|
||||||
@ -50,6 +46,7 @@ based on LuaJIT’s FFI.
|
|||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation for CFFI
|
Summary: Documentation for CFFI
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
BuildRequires: python3-sphinx
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
Documentation for CFFI, the Foreign Function Interface for Python.
|
Documentation for CFFI, the Foreign Function Interface for Python.
|
||||||
@ -57,25 +54,25 @@ Documentation for CFFI, the Foreign Function Interface for Python.
|
|||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n cffi-v%{general_version}%{?prerel}
|
%autosetup -p1 -n cffi-v%{general_version}%{?prerel}
|
||||||
|
|
||||||
|
%generate_buildrequires
|
||||||
|
%pyproject_buildrequires requirements.txt
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%pyproject_wheel
|
||||||
|
|
||||||
cd doc
|
cd doc
|
||||||
make SPHINXBUILD=sphinx-build-3 html
|
make SPHINXBUILD=sphinx-build-3 html
|
||||||
rm build/html/.buildinfo
|
rm build/html/.buildinfo
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install
|
%pyproject_install
|
||||||
|
%pyproject_save_files _cffi_backend cffi
|
||||||
|
|
||||||
%check
|
%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
|
%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
|
%files doc
|
||||||
%doc doc/build/html
|
%doc doc/build/html
|
||||||
|
Loading…
Reference in New Issue
Block a user