Sync from SUSE:SLFO:Main python-sip4 revision 884062ba605e19af62dd8902d6c6c9fb
This commit is contained in:
commit
84ad4fe1eb
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
12
disable-rpaths.diff
Normal file
12
disable-rpaths.diff
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/siputils.py b/siputils.py
|
||||
index a29300d..df58650 100644
|
||||
--- a/siputils.py
|
||||
+++ b/siputils.py
|
||||
@@ -927,6 +927,7 @@ class Makefile:
|
||||
rpaths is the cannonical list of rpaths.
|
||||
"""
|
||||
flags = []
|
||||
+ return flags
|
||||
prefix = self.optional_string("RPATH")
|
||||
|
||||
if prefix == "":
|
30
disable-strip.diff
Normal file
30
disable-strip.diff
Normal file
@ -0,0 +1,30 @@
|
||||
commit c59ca3fa7a63c7c13fb6be2d9642feeeaef603e2
|
||||
Author: Christophe Giboudeaux <christophe@krop.fr>
|
||||
Date: Sun Oct 21 11:29:04 2018 +0200
|
||||
|
||||
Don't strip files.
|
||||
|
||||
This prevents the debug package from being created.
|
||||
|
||||
Index: sip-4.19.24/siputils.py
|
||||
===================================================================
|
||||
--- sip-4.19.24.orig/siputils.py
|
||||
+++ sip-4.19.24/siputils.py
|
||||
@@ -1474,7 +1474,7 @@ class ModuleMakefile(Makefile):
|
||||
"""
|
||||
def __init__(self, configuration, build_file, install_dir=None, static=0,
|
||||
console=0, qt=0, opengl=0, threaded=0, warnings=1, debug=0,
|
||||
- dir=None, makefile="Makefile", installs=None, strip=1,
|
||||
+ dir=None, makefile="Makefile", installs=None, strip=0,
|
||||
export_all=0, universal=None, arch=None,
|
||||
deployment_target=None):
|
||||
"""Initialise an instance of a module Makefile.
|
||||
@@ -1785,7 +1785,7 @@ class SIPModuleMakefile(ModuleMakefile):
|
||||
"""
|
||||
def __init__(self, configuration, build_file, install_dir=None, static=0,
|
||||
console=0, qt=0, opengl=0, threaded=0, warnings=1, debug=0,
|
||||
- dir=None, makefile="Makefile", installs=None, strip=1,
|
||||
+ dir=None, makefile="Makefile", installs=None, strip=0,
|
||||
export_all=0, universal=None, arch=None, prot_is_public=0,
|
||||
deployment_target=None):
|
||||
"""Initialise an instance of a SIP generated module Makefile.
|
1014
python-sip4.changes
Normal file
1014
python-sip4.changes
Normal file
File diff suppressed because it is too large
Load Diff
300
python-sip4.spec
Normal file
300
python-sip4.spec
Normal file
@ -0,0 +1,300 @@
|
||||
#
|
||||
# spec file for package python-sip4
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} < 1550
|
||||
# Build the PyQt4.sip module only for older distros.
|
||||
%bcond_without pyqt4_module
|
||||
%else
|
||||
%bcond_with pyqt4_module
|
||||
%endif
|
||||
|
||||
# The python-qt5-sip provides the correct PyQt5 module for sip5 enabled distros,
|
||||
# including SLE/Leap build targets now
|
||||
%bcond_with pyqt5_module
|
||||
|
||||
%define python_sip_api 12.7
|
||||
%define mname sip
|
||||
%define pname sip4
|
||||
# Note about package names:
|
||||
# pythonX-sip4 contains the SIP module(s)
|
||||
# pythonX-sip4-devel contains the tools to build SIP modules
|
||||
# where X is the python flavor
|
||||
# python-sip4-doc and python-sip4-common are flavorless
|
||||
%define oldpython python
|
||||
|
||||
Name: python-%{pname}
|
||||
Version: 4.19.25
|
||||
Release: 0
|
||||
Summary: SIP tool to use python sip bindings - legacy version 4
|
||||
License: GPL-2.0-only OR GPL-3.0-only OR SUSE-SIP
|
||||
Group: Development/Libraries/Python
|
||||
URL: https://www.riverbankcomputing.com/software/sip
|
||||
Source0: https://www.riverbankcomputing.com/static/Downloads/sip/%{version}/sip-%{version}.tar.gz
|
||||
# PATCH-FIX-OPENSUSE disable-rpaths.diff -- Disable rpaths
|
||||
Patch0: disable-rpaths.diff
|
||||
# PATCH-FIX-OPENSUSE disable-strip.diff -- Disable stripping
|
||||
Patch1: disable-strip.diff
|
||||
# PATCH-FIX-OPENSUSE -- Use accessor for python frame object
|
||||
Patch2: python311_frame.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: c++_compiler
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: %{name}-common = %{version}
|
||||
Provides: python-%{mname} = %{version}-%{release}
|
||||
Provides: python-sip(api) = %{python_sip_api}
|
||||
Obsoletes: python-%{mname} < %{version}
|
||||
%ifpython2
|
||||
Provides: %{oldpython}-%{mname} = %{version}-%{release}
|
||||
Obsoletes: %{oldpython}-%{mname} < %{version}
|
||||
%endif
|
||||
%if %{with pyqt5_module}
|
||||
Conflicts: python-qt5-sip
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
SIP is a tool that makes it very easy to create Python bindings for C
|
||||
and C++ libraries. It was originally developed to create PyQt, the
|
||||
Python bindings for the Qt toolkit, but can be used to create bindings
|
||||
for any C or C++ library.
|
||||
|
||||
This package provides the legacy version 4 of the SIP tool
|
||||
|
||||
%package devel
|
||||
Summary: SIP tool to create python bindings
|
||||
Group: Development/Libraries/Python
|
||||
Requires: %{name} = %{version}
|
||||
Requires: %{name}-common = %{version}
|
||||
Requires: c++_compiler
|
||||
Requires: python-devel
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Provides: python-%{mname}-bin = %{version}-%{release}
|
||||
Provides: python-%{mname}-devel = %{version}-%{release}
|
||||
Obsoletes: python-%{mname}-bin < %{version}
|
||||
Obsoletes: python-%{mname}-devel < %{version}
|
||||
%ifpython2
|
||||
Provides: %{oldpython}-%{mname}-bin = %{version}-%{release}
|
||||
Provides: %{oldpython}-%{mname}-devel = %{version}-%{release}
|
||||
Obsoletes: %{oldpython}-%{mname}-bin < %{version}
|
||||
Obsoletes: %{oldpython}-%{mname}-devel < %{version}
|
||||
%endif
|
||||
|
||||
%description devel
|
||||
SIP is a tool that makes it very easy to create Python bindings for C
|
||||
and C++ libraries. It was originally developed to create PyQt, the
|
||||
Python bindings for the Qt toolkit, but can be used to create bindings
|
||||
for any C or C++ library.
|
||||
|
||||
This package contains all the developer tools you need to create your
|
||||
own sip bindings.
|
||||
|
||||
%package -n python-%{pname}-doc
|
||||
Summary: SIP tool to create python bindings -- common documentation
|
||||
Group: Development/Libraries/Python
|
||||
Provides: %{python_module %{pname}-doc = %{version}-%{release}}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n python-%{pname}-doc
|
||||
SIP is a tool that makes it very easy to create Python bindings for C
|
||||
and C++ libraries. It was originally developed to create PyQt, the
|
||||
Python bindings for the Qt toolkit, but can be used to create bindings
|
||||
for any C or C++ library.
|
||||
|
||||
This package contains common documentation files shared between python2
|
||||
and python3 versions of sip.
|
||||
|
||||
%package -n python-%{pname}-common
|
||||
Summary: SIP tool to create python bindings -- common files
|
||||
Group: Development/Libraries/Python
|
||||
Provides: %{python_module %{pname}-common = %{version}-%{release}}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n python-%{pname}-common
|
||||
SIP is a tool that makes it very easy to create Python bindings for C
|
||||
and C++ libraries. It was originally developed to create PyQt, the
|
||||
Python bindings for the Qt toolkit, but can be used to create bindings
|
||||
for any C or C++ library.
|
||||
|
||||
This package contains common files shared between python2 and python3
|
||||
versions of sip.
|
||||
|
||||
%prep
|
||||
%setup -q -n sip-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
sip_major=$(grep "define SIP_API_MAJOR_NR" siplib/sip.h | awk '{print $3}')
|
||||
sip_minor=$(grep "define SIP_API_MINOR_NR" siplib/sip.h | awk '{print $3}')
|
||||
|
||||
if test "%{python_sip_api}" != "$sip_major.$sip_minor"; then
|
||||
echo "API version was changed to $sip_major.$sip_minor"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
export CXXFLAGS="%{optflags}"
|
||||
|
||||
%{python_expand mkdir build_%{$python_bin_suffix}
|
||||
pushd build_%{$python_bin_suffix}
|
||||
|
||||
# Link against libpython (fixes bnc#756282 and bnc#721280)
|
||||
ldlibrary=`$python -c "import sysconfig as s;print(s.get_config_var('LDLIBRARY')[3:-3])"`
|
||||
$python ../configure.py --debug \
|
||||
CFLAGS+="%{optflags}" \
|
||||
CXXFLAGS+="%{optflags}" \
|
||||
LIBS+="-l$ldlibrary" \
|
||||
-d %{$python_sitearch}
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
# Point to the correct location for the documentation files
|
||||
cp ../README ./
|
||||
sed -i 's/"doc" directory/"doc" directory of package %{$python_prefix}-sip-devel/' README
|
||||
|
||||
popd
|
||||
}
|
||||
|
||||
for P in \
|
||||
%if %{with pyqt4_module}
|
||||
PyQt4 \
|
||||
%endif
|
||||
%if %{with pyqt5_module}
|
||||
PyQt5 \
|
||||
%endif
|
||||
; do
|
||||
%{python_expand mkdir build_${P}_%{$python_bin_suffix}
|
||||
pushd build_${P}_%{$python_bin_suffix}
|
||||
|
||||
# Link against libpython
|
||||
ldlibrary=`$python -c "import sysconfig as s;print(s.get_config_var('LDLIBRARY')[3:-3])"`
|
||||
$python ../configure.py --debug \
|
||||
--sip-module=${P}.sip \
|
||||
CFLAGS+="%{optflags}" \
|
||||
CXXFLAGS+="%{optflags}" \
|
||||
LIBS+="-l$ldlibrary" \
|
||||
--no-dist-info \
|
||||
-d %{$python_sitearch}
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
popd
|
||||
}
|
||||
done
|
||||
|
||||
%install
|
||||
|
||||
%{python_expand pushd build_%{$python_bin_suffix}
|
||||
%make_install
|
||||
popd
|
||||
|
||||
# Make sure the correct sip executable is picked
|
||||
sed -i 's,%{_bindir}/sip,%{_bindir}/sip-%{$python_bin_suffix},' %{buildroot}%{$python_sitearch}/sipconfig.py
|
||||
}
|
||||
|
||||
for P in \
|
||||
%if %{with pyqt4_module}
|
||||
PyQt4 \
|
||||
%endif
|
||||
%if %{with pyqt5_module}
|
||||
PyQt5 \
|
||||
%endif
|
||||
; do
|
||||
%{python_expand pushd build_${P}_%{$python_bin_suffix}/siplib
|
||||
%make_install
|
||||
popd
|
||||
}
|
||||
done
|
||||
|
||||
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
|
||||
|
||||
echo "%%python_sip_api_ver %{python_sip_api}" > %{buildroot}%{_rpmconfigdir}/macros.d/macros.python_all-sip4
|
||||
|
||||
%{python_expand # flavor specific macros
|
||||
echo "%%requires_$python_sip_api Requires: %{$python_prefix}-sip(api) = %%python_sip_api_ver" \
|
||||
> %{buildroot}%{_rpmconfigdir}/macros.d/macros.%{$python_prefix}-sip4
|
||||
}
|
||||
# macro for old python2 name
|
||||
%if 0%{?have_python2} && ! 0%{?skip_python2}
|
||||
echo "%%requires_python_sip_api Requires: %{python2_prefix}-sip(api) = %%python_sip_api_ver" \
|
||||
>> %{buildroot}%{_rpmconfigdir}/macros.d/macros.%{python2_prefix}-sip4
|
||||
%endif
|
||||
# additional: default python3 in case of multiple python3 flavors
|
||||
%if 0%{?have_python3} && ! 0%{?skip_python3}
|
||||
grep '%%requires_%{python3_prefix}_sip_api' %{buildroot}%{_rpmconfigdir}/macros.d/macros.*-sip4 || \
|
||||
echo "%%requires_%{python3_prefix}_sip_api Requires: %{python_prefix}-sip(api) = %%python_sip_api_ver" >> %{buildroot}%{_rpmconfigdir}/macros.d/macros.python_all-sip4
|
||||
%endif
|
||||
%{?python_compileall}
|
||||
%{?!python_compileall:%python_exec -m compileall %{buildroot}%{$python_sitearch}}
|
||||
%{?!python_compileall:%python_exec -O -m compileall %{buildroot}%{$python_sitearch}}
|
||||
%python_clone -a %{buildroot}/%{_bindir}/sip
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
mkdir -p %{buildroot}%{_datadir}/sip
|
||||
|
||||
%post devel
|
||||
%python_install_alternative sip
|
||||
|
||||
%postun devel
|
||||
%python_uninstall_alternative sip
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE*
|
||||
%doc ChangeLog NEWS
|
||||
%doc build_%{python_bin_suffix}/README
|
||||
%{python_sitearch}/sip.so
|
||||
%if %{with pyqt4_module}
|
||||
%dir %{python_sitearch}/PyQt4
|
||||
%{python_sitearch}/PyQt4/sip.so
|
||||
%endif
|
||||
%if %{with pyqt5_module}
|
||||
%dir %{python_sitearch}/PyQt5
|
||||
%{python_sitearch}/PyQt5/sip.so
|
||||
%endif
|
||||
%{python_sitearch}/sip-%{version}.dist-info/
|
||||
|
||||
%files %{python_files devel}
|
||||
%license LICENSE*
|
||||
%{_rpmconfigdir}/macros.d/macros.%{python_prefix}-sip4
|
||||
%python_alternative %{_bindir}/sip
|
||||
%if %{with pyqt4_module}
|
||||
%dir %{python_sitearch}/PyQt4
|
||||
%{python_sitearch}/PyQt4/sip.pyi
|
||||
%endif
|
||||
%if %{with pyqt5_module}
|
||||
%dir %{python_sitearch}/PyQt5
|
||||
%{python_sitearch}/PyQt5/sip.pyi
|
||||
%endif
|
||||
%{_includedir}/python%{python_bin_suffix}*/sip.h
|
||||
%{python_sitearch}/sipconfig.py*
|
||||
%{python_sitearch}/sipdistutils.py*
|
||||
%{python_sitearch}/sip.pyi
|
||||
%pycache_only %{python_sitearch}/__pycache__/sipconfig.*.py*
|
||||
%pycache_only %{python_sitearch}/__pycache__/sipdistutils.*.py*
|
||||
|
||||
%files -n python-%{pname}-doc
|
||||
%license LICENSE*
|
||||
%doc doc/
|
||||
|
||||
%files -n python-%{pname}-common
|
||||
%license LICENSE*
|
||||
%{_rpmconfigdir}/macros.d/macros.python_all-sip4
|
||||
%dir %{_datadir}/sip/
|
||||
|
||||
%changelog
|
15
python311_frame.patch
Normal file
15
python311_frame.patch
Normal file
@ -0,0 +1,15 @@
|
||||
Taken from https://bugzilla.redhat.com/show_bug.cgi?id=2062144
|
||||
|
||||
diff --git a/siplib/siplib.c b/siplib/siplib.c
|
||||
index db52b68..8019e97 100644
|
||||
--- a/siplib/siplib.c
|
||||
+++ b/siplib/siplib.c
|
||||
@@ -13747,7 +13747,7 @@ static struct _frame *sip_api_get_frame(int depth)
|
||||
|
||||
while (frame != NULL && depth > 0)
|
||||
{
|
||||
- frame = frame->f_back;
|
||||
+ frame = PyFrame_GetBack(frame);
|
||||
--depth;
|
||||
}
|
||||
|
BIN
sip-4.19.25.tar.gz
(Stored with Git LFS)
Normal file
BIN
sip-4.19.25.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user