From a2df6900a7f0e566d45ee8e73a9016174a65d944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 10 Feb 2022 11:11:52 +0100 Subject: [PATCH] Stop shipping C sources, move some headers to -devel, one to -test --- pypy3.9.rpmlintrc | 1 + pypy3.9.spec | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/pypy3.9.rpmlintrc b/pypy3.9.rpmlintrc index 2aa2ce3..7c88006 100644 --- a/pypy3.9.rpmlintrc +++ b/pypy3.9.rpmlintrc @@ -20,6 +20,7 @@ addFilter(r'only-non-binary-in-usr-lib') # some devel files that are deliberately needed addFilter(r'devel-file-in-non-devel-package /usr/include/pypy3\.\d+m?/pyconfig-(32|64)\.h') addFilter(r'devel-file-in-non-devel-package /usr/lib(64)?/pypy3\.\d+/distutils/tests/xxmodule\.c') +addFilter(r'devel-file-in-non-devel-package /usr/lib(64)?/pypy3\.\d+/_.*test.*\.[ch]') # SORRY, NOT SORRY: # manual pages diff --git a/pypy3.9.spec b/pypy3.9.spec index 76cf42f..097ec4a 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -471,6 +471,12 @@ patchelf --replace-needed libpypy%{pyversion}-c.so libpypy%{pyversion}-c.so.%{so rm %{packaged_prefix}/include/README # 6. copy the main LICENSE file to pypy's libdir, as does CPython cp -a LICENSE %{packaged_prefix}/%{_lib}/pypy%{pyversion} +# 7. Remove sources, we don't install them +rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_blake2/impl +rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_libmpdec +rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_sha3/kcp +rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_cffi_ssl/_cffi_src/openssl/src +rm %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_pypy_*.c # Create the prefix and move stuff into it mkdir -p %{buildroot}%{_prefix} @@ -763,6 +769,11 @@ CheckPyPy pypy%{pyversion}-c %exclude %{pypylibdir}/*/test/ %exclude %{pypylibdir}/*/tests/ %exclude %{pypylibdir}/idlelib/idle_test/ +%exclude %{pypylibdir}/testcapi_long.h + +# Keep this synced with %%files devel below +%exclude %{pypylibdir}/cffi/*.h +%exclude %{pypylibdir}/hpy/devel/ %files test @@ -777,6 +788,7 @@ CheckPyPy pypy%{pyversion}-c %{pypylibdir}/*/test/ %{pypylibdir}/*/tests/ %{pypylibdir}/idlelib/idle_test/ +%{pypylibdir}/testcapi_long.h %files devel @@ -786,6 +798,8 @@ CheckPyPy pypy%{pyversion}-c %if %{with main_pypy3} %{_rpmconfigdir}/macros.d/macros.pypy3 %endif +%{pypylibdir}/cffi/*.h +%{pypylibdir}/hpy/devel/ %changelog