Deprecate %py3_build, %py3_build_wheel, and %py3_install

...as well as their %py_... counterparts.

https://fedoraproject.org/wiki/Changes/DeprecateSetuppyMacros
This commit is contained in:
Miro Hrončok 2024-09-23 16:55:23 +02:00
commit b8a5807572
4 changed files with 62 additions and 8 deletions

View file

@ -43,17 +43,17 @@
# Use the slashes after expand so that the command starts on the same line as
# the macro
%py3_build() %{expand:\\\
%py3_build() %{_python_deprecated -n py3_build}%{expand:\\\
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
%{__python3} %{py_setup} %{?py_setup_args} build --executable="%{__python3} %{py3_shbang_opts}" %{?*}
}
%py3_build_wheel() %{expand:\\\
%py3_build_wheel() %{_python_deprecated -n py3_build_wheel}%{expand:\\\
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
%{__python3} %{py_setup} %{?py_setup_args} bdist_wheel %{?*}
}
%py3_install() %{expand:\\\
%py3_install() %{_python_deprecated -n py3_install}%{expand:\\\
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
%{__python3} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} --prefix %{_prefix} %{?*}
rm -rfv %{buildroot}%{_bindir}/__pycache__