1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2024-10-26 07:55:06 +03:00

gitlab: unset CFLAGS for rpm build

Setting CFLAGS before invoking rpm-build causes replacement of the
CFLAGS that RPM wants to set for python. This causes the loss of
certain flags needed to turn on debug output and optimization.
Previously this wasn't a problem as something in setuptools appears
to have been adding -g anyway, but with the update to python 3.12
this now fully breaks. We should never have been setting CFLAGS
during the RPM build so we drop it unconditionally for all distros.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2023-09-21 15:15:15 +01:00
parent dc9ca83ab9
commit 697b7727d0

View File

@ -30,6 +30,7 @@ stages:
- $PYTHON -m pytest tests
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ;
then
unset CFLAGS ;
rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta dist/libvirt-python*tar.gz ;
mv rpmbuild/RPMS/x86_64/ libvirt-python-rpms ;
fi
@ -53,6 +54,7 @@ stages:
- $PYTHON -m pytest tests
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ;
then
unset CFLAGS ;
rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta dist/libvirt-python*tar.gz ;
mv rpmbuild/RPMS/x86_64/ libvirt-python-rpms ;
fi