Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
182a76daa1
!13 fix build error with python 3.11.4
From: @cherry530 
Reviewed-by: @wang--ge 
Signed-off-by: @wang--ge
2023-07-20 01:10:40 +00:00
cherry530
d8edfb8333 fix build error with python 3.11.4
Signed-off-by: cherry530 <707078654@qq.com>
2023-07-19 15:29:00 +08:00
openeuler-ci-bot
8b38ce38aa
!11 [sync] PR-9: openEuler-22.03-LTS-Next Packages upgrade
From: @openeuler-sync-bot 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
2022-04-18 09:12:21 +00:00
cherry530
2a13131cfd remove unuse files
(cherry picked from commit acff64ec01a72278023f911a20d52537fd668df6)
2022-04-12 15:08:59 +08:00
openeuler-ci-bot
6132412bb4 !4 resolve installation conflicts of sub-packages
From: @maminjie
Reviewed-by: @zhanghua1831,@small_leek
Signed-off-by: @small_leek
2021-01-07 10:59:36 +08:00
maminjie
2088daa2cc resolve installation conflicts of sub-packages and fix license 2021-01-06 11:23:24 +08:00
openeuler-ci-bot
5ef1de3c04 !3 disable python2
From: @jackie_wu123
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2020-11-02 11:59:55 +08:00
jackie_wu
8eb7468205 disable python2 2020-11-02 09:58:22 +08:00
openeuler-ci-bot
c641b85c0b !2 add yaml file
Merge pull request !2 from sigui/master
2020-05-19 15:28:39 +08:00
si-gui
fcf04eaa7b add yaml file 2020-05-12 17:56:34 +08:00
10 changed files with 259 additions and 196 deletions

View File

@ -1,3 +1,3 @@
%_sip_api_major 12 %_sip_api_major 12
%_sip_api_minor 5 %_sip_api_minor 7
%_sip_api %{_sip_api_major}.%{_sip_api_minor} %_sip_api %{_sip_api_major}.%{_sip_api_minor}

View File

@ -1,7 +1,7 @@
diff -up sip-4.18/siputils.py.no_rpath sip-4.18/siputils.py diff -rupN --no-dereference sip-4.19.25/siputils.py sip-4.19.25-new/siputils.py
--- sip-4.18/siputils.py.no_rpath 2015-03-25 06:00:24.000000000 -0500 --- sip-4.19.25/siputils.py 2021-10-21 13:45:54.808566613 +0200
+++ sip-4.18/siputils.py 2016-04-13 11:34:48.179894616 -0500 +++ sip-4.19.25-new/siputils.py 2021-10-21 13:45:54.812566611 +0200
@@ -435,7 +435,7 @@ class Makefile: @@ -436,7 +436,7 @@ class Makefile:
if l_dir in ("", ".", ".."): if l_dir in ("", ".", ".."):
continue continue
@ -10,7 +10,7 @@ diff -up sip-4.18/siputils.py.no_rpath sip-4.18/siputils.py
if self._python: if self._python:
incdir.append(self.config.py_inc_dir) incdir.append(self.config.py_inc_dir)
@@ -612,7 +612,7 @@ class Makefile: @@ -613,7 +613,7 @@ class Makefile:
# Handle library directories. # Handle library directories.
libdir_qt = self.optional_list("LIBDIR_QT") libdir_qt = self.optional_list("LIBDIR_QT")
libdir.extend(libdir_qt) libdir.extend(libdir_qt)

View File

@ -1,7 +1,7 @@
diff -up sip-4.18/siputils.py.no_strip sip-4.18/siputils.py diff -rupN --no-dereference sip-4.19.25/siputils.py sip-4.19.25-new/siputils.py
--- sip-4.18/siputils.py.no_strip 2015-03-25 06:00:24.000000000 -0500 --- sip-4.19.25/siputils.py 2021-02-26 16:17:35.156108000 +0100
+++ sip-4.18/siputils.py 2016-04-13 11:34:23.718690341 -0500 +++ sip-4.19.25-new/siputils.py 2021-10-21 13:45:54.780566626 +0200
@@ -1469,7 +1469,7 @@ class ModuleMakefile(Makefile): @@ -1473,7 +1473,7 @@ class ModuleMakefile(Makefile):
""" """
def __init__(self, configuration, build_file, install_dir=None, static=0, def __init__(self, configuration, build_file, install_dir=None, static=0,
console=0, qt=0, opengl=0, threaded=0, warnings=1, debug=0, console=0, qt=0, opengl=0, threaded=0, warnings=1, debug=0,
@ -10,7 +10,7 @@ diff -up sip-4.18/siputils.py.no_strip sip-4.18/siputils.py
export_all=0, universal=None, arch=None, export_all=0, universal=None, arch=None,
deployment_target=None): deployment_target=None):
"""Initialise an instance of a module Makefile. """Initialise an instance of a module Makefile.
@@ -1780,7 +1780,7 @@ class SIPModuleMakefile(ModuleMakefile): @@ -1784,7 +1784,7 @@ class SIPModuleMakefile(ModuleMakefile):
""" """
def __init__(self, configuration, build_file, install_dir=None, static=0, def __init__(self, configuration, build_file, install_dir=None, static=0,
console=0, qt=0, opengl=0, threaded=0, warnings=1, debug=0, console=0, qt=0, opengl=0, threaded=0, warnings=1, debug=0,

Binary file not shown.

View File

@ -0,0 +1,12 @@
diff -rupN --no-dereference sip-4.19.25/configure.py sip-4.19.25-new/configure.py
--- sip-4.19.25/configure.py 2021-02-26 16:28:41.621025600 +0100
+++ sip-4.19.25-new/configure.py 2021-10-21 13:45:54.845566597 +0200
@@ -449,7 +449,7 @@ def create_makefiles(macros):
if sys.platform == 'win32':
mod = 'sip.lib' if opts.static else 'sip.pyd'
else:
- mod = 'libsip.a' if opts.static else 'sip.so'
+ mod = 'libsip.a' if opts.static else sip_module_name.split('.')[-1] + '.so'
all_installs.append((mod, sip_module_dest_dir))

View File

@ -0,0 +1,52 @@
From: Jochen Sprickerhof <jspricke@debian.org>
Date: Fri, 5 Nov 2021 09:13:14 +0100
Subject: Make parser not break on py_ssize_t_clean directive from SIP v6.4
---
sipgen/metasrc/lexer.l | 1 +
sipgen/metasrc/parser.y | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/sipgen/metasrc/lexer.l b/sipgen/metasrc/lexer.l
index a52b018..c328202 100644
--- a/sipgen/metasrc/lexer.l
+++ b/sipgen/metasrc/lexer.l
@@ -174,6 +174,7 @@ SIP_QOBJECT {return TK_QOBJECT;}
<directive>timestamp {return TK_TIMESTAMP;}
<directive>type {return TK_TYPE;}
<directive>use_argument_names {return TK_USEARGNAMES;}
+<directive>py_ssize_t_clean {return TK_PYSSIZETCLEAN;}
<directive>use_limited_api {return TK_USELIMITEDAPI;}
<directive>all_raise_py_exception {return TK_ALLRAISEPYEXC;}
<directive>call_super_init {return TK_CALLSUPERINIT;}
diff --git a/sipgen/metasrc/parser.y b/sipgen/metasrc/parser.y
index 5623dca..2d98380 100644
--- a/sipgen/metasrc/parser.y
+++ b/sipgen/metasrc/parser.y
@@ -389,6 +389,7 @@ static scopedNameDef *fullyQualifiedName(scopedNameDef *snd);
%token TK_TIMESTAMP
%token TK_TYPE
%token TK_USEARGNAMES
+%token TK_PYSSIZETCLEAN
%token TK_USELIMITEDAPI
%token TK_ALLRAISEPYEXC
%token TK_CALLSUPERINIT
@@ -2012,6 +2013,18 @@ module_arg: TK_KWARGS '=' TK_STRING_VALUE {
$$.call_super_init = -1;
$$.def_error_handler = NULL;
}
+ | TK_PYSSIZETCLEAN '=' bool_value {
+ $$.token = TK_PYSSIZETCLEAN;
+
+ $$.c_module = FALSE;
+ $$.kwargs = defaultKwArgs;
+ $$.name = NULL;
+ $$.use_arg_names = FALSE;
+ $$.use_limited_api = FALSE;
+ $$.all_raise_py_exc = FALSE;
+ $$.call_super_init = -1;
+ $$.def_error_handler = NULL;
+ }
| TK_USELIMITEDAPI '=' bool_value {
$$.token = TK_USELIMITEDAPI;

View File

@ -0,0 +1,13 @@
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 Normal file

Binary file not shown.

328
sip.spec
View File

@ -1,231 +1,196 @@
%{!?python2_inc:%global python2_inc %(%{__python2} -c "from distutils.sysconfig import get_python_inc; print get_python_inc(1)")}
%{!?python3_inc:%global python3_inc %(%{__python3} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc(1))")} %{!?python3_inc:%global python3_inc %(%{__python3} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc(1))")}
%{!?python2_sitearch:%global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %global PYINCLUDE %{_includedir}/python%{python3_version}
%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) %global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
%undefine _strict_symbol_defs_build %undefine _strict_symbol_defs_build
%global wx_siplib 1
%global pyqt5_sip 1
Summary: SIP - Python/C++ Bindings Generator
Name: sip Name: sip
Version: 4.19.12 Version: 4.19.25
Release: 10 Release: 2
Summary: A C/C++ library bindings generator for Python v2 and v3 License: GPLv2 or GPLv3
License: GPLv2 or GPLv3 and (GPLv3+ with exceptions) Url: https://riverbankcomputing.com/software/sip/intro
URL: http://www.riverbankcomputing.com/software/sip/intro Source0: https://riverbankcomputing.com/static/Downloads/sip/%{version}/sip-%{version}.tar.gz
Source0: http://downloads.sourceforge.net/pyqt/sip-%{version}.tar.gz
Source1: macros.sip Source1: macros.sip
Source2: sip-wrapper.sh Source10: sip-wrapper.sh
BuildRequires: gcc-c++ sed
Patch50: sip-4.18-no_strip.patch
Patch51: sip-4.18-no_rpath.patch
Patch53: sip-4.19.18-no_hardcode_sip_so.patch
Patch54: sip-4.19.25-py_ssize_t_clean.patch
Patch55: sip-4.19.25-pyframe_getback.patch
BuildRequires: make
BuildRequires: gcc-c++
BuildRequires: sed
BuildRequires: bison
BuildRequires: flex
Obsoletes: sip-macros < %{version}-%{release} Obsoletes: sip-macros < %{version}-%{release}
Provides: sip-macros = %{version}-%{release} Provides: sip-macros = %{version}-%{release}
Patch0001: sip-4.18-no_strip.patch
Patch0002: sip-4.18-no_rpath.patch
%description %global _description\
SIP is a tool that makes it very easy to create Python bindings for C and C++ SIP is a tool for generating bindings for C++ classes so that they can be\
libraries. It was originally developed to create PyQt, the Python bindings for accessed as normal Python classes. SIP takes many of its ideas from SWIG but,\
the Qt toolkit, but can be used to create bindings for any C or C++ library. because it is specifically designed for C++ and Python, is able to generate\
tighter bindings. SIP is so called because it is a small SWIG.\
\
SIP was originally designed to generate Python bindings for KDE and so has\
explicit support for the signal slot mechanism used by the Qt/KDE class\
libraries. However, SIP can be used to generate Python bindings for any C++\
class library.
SIP comprises a code generator and a Python module. The code generator processes %description %_description
a set of specification files and generates C or C++ code which is then compiled
to create the bindings extension module. The SIP Python module provides support
functions to the automatically generated code.
%package doc
Summary: Documentation for %summary
BuildArch: noarch
%description doc
This package contains HTML documentation for SIP.
%_description
%package -n python2-sip
Summary: A C/C++ library bindings generator for Python v2
Provides: sip-api(12) = 12.5 sip-api(12) = 12.5
Provides: python2-sip-api(12) = 12.5 python2-sip-api(12) = 12.5
%{?python_provide:%python_provide python2-sip}
%description -n python2-sip
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.
SIP comprises a code generator and a Python module. The code generator processes
a set of specification files and generates C or C++ code which is then compiled
to create the bindings extension module. The SIP Python module provides support
functions to the automatically generated code.
%package -n python2-sip-devel
Summary: Files needed to generate Python v2 bindings for any C++ class library
Requires: sip = %{version}-%{release} python2-devel
BuildRequires: python2-devel
Provides: sip-devel = %{version}-%{release} sip-devel = %{version}-%{release}
Obsoletes: sip-devel < %{version}-%{release}
%description -n python2-sip-devel
Files needed to generate Python v2 bindings for any C++ class library.
%package -n python2-pyqt4-sip
Summary: Python 2/C++ Bindings Generator for pyqt5
Provides: python2-pyqt4-sip-api(12) = 12.5 python2-pyqt4-sip-api(12) = 12.5
%{?python_provide:%python_provide python2-pyqt4-sip}
%description -n python2-pyqt4-sip
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.
SIP comprises a code generator and a Python module. The code generator processes
a set of specification files and generates C or C++ code which is then compiled
to create the bindings extension module. The SIP Python module provides support
functions to the automatically generated code.
%package -n python2-pyqt5-sip
Summary: Python 2/C++ Bindings Generator for pyqt5
Provides: python2-pyqt5-sip-api(12) = 12.5 python2-pyqt5-sip-api(12) = 12.5
%{?python_provide:%python_provide python2-pyqt5-sip}
%description -n python2-pyqt5-sip
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.
SIP comprises a code generator and a Python module. The code generator processes
a set of specification files and generates C or C++ code which is then compiled
to create the bindings extension module. The SIP Python module provides support
functions to the automatically generated code.
%package -n python3-sip %package -n python3-sip
Summary: A C/C++ library bindings generator for Python v3 Summary: SIP - Python 3/C++ Bindings Generator
Provides: python3-sip-api(12) = 12.5 python3-sip-api(12) = 12.5 Provides: python3-sip-api(12) = 12.7
%description -n python3-sip %description -n python3-sip
This is the Python 3 build of SIP. This is the Python 3 build of SIP.
SIP is a tool that makes it very easy to create Python bindings for C and C++ %_description
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.
SIP comprises a code generator and a Python module. The code generator processes
a set of specification files and generates C or C++ code which is then compiled
to create the bindings extension module. The SIP Python module provides support
functions to the automatically generated code.
%package -n python3-sip-devel %package -n python3-sip-devel
Summary: Files needed to generate Python v3 bindings for any C++ class library Summary: Files needed to generate Python bindings for any C++ class library
Requires: sip = %{version}-%{release} python3-devel Requires: sip = %{version}-%{release}
BuildRequires: python3-devel BuildRequires: python3-devel
Requires: python3-devel
%description -n python3-sip-devel %description -n python3-sip-devel
Files needed to generate Python v3 bindings for any C++ class library %{summary}.
%package -n python3-pyqt4-sip %package -n python3-pyqt4-sip
Summary: Python 3/C++ Bindings Generator for pyqt4 Summary: SIP - Python 3/C++ Bindings Generator for pyqt4
Provides: python3-pyqt4-sip-api(12) = 12.5 python3-pyqt4-sip-api(12) = 12.5
BuildRequires: python3-devel BuildRequires: python3-devel
Provides: python3-pyqt4-sip-api(12) = 12.7
%description -n python3-pyqt4-sip %description -n python3-pyqt4-sip
This is the Python 3 build of pyqt4-SIP. This is the Python 3 build of pyqt4-SIP.
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.
SIP comprises a code generator and a Python module. The code generator processes
a set of specification files and generates C or C++ code which is then compiled
to create the bindings extension module. The SIP Python module provides support
functions to the automatically generated code.
%package -n python3-pyqt5-sip %package -n python3-pyqt5-sip
Summary: Python 3/C++ Bindings Generator for pyqt5 Summary: SIP - Python 3/C++ Bindings Generator for pyqt5
BuildRequires: python3-devel BuildRequires: python3-devel
Provides: python3-pyqt5-sip-api(12) = 12.5 python3-pyqt5-sip-api(12) = 12.5 Provides: python3-pyqt5-sip-api(12) = 12.7
%description -n python3-pyqt5-sip %description -n python3-pyqt5-sip
This is the Python 3 build of pyqt5-SIP. This is the Python 3 build of pyqt5-SIP.
SIP is a tool that makes it very easy to create Python bindings for C and C++ %package -n python3-wx-siplib
libraries. It was originally developed to create PyQt, the Python bindings for Summary: SIP - Python 3/C++ Bindings Generator for wx
the Qt toolkit, but can be used to create bindings for any C or C++ library. BuildRequires: python3-devel
Provides: python3-wx-siplib-api(12) = 12.7
Provides: python3-wx-siplib-api(12) = 12.7
%description -n python3-wx-siplib
This is the Python 3 build of wx-siplib.
%_description
SIP comprises a code generator and a Python module. The code generator processes
a set of specification files and generates C or C++ code which is then compiled
to create the bindings extension module. The SIP Python module provides support
functions to the automatically generated code.
%prep %prep
%autosetup -n %{name}-%{version} -p1
%setup -q -n %{name}-%{version}
%patch50 -p1 -b .no_strip
%patch51 -p1 -b .no_rpath
%patch53 -p1 -b .no_sip_so
%patch54 -p1 -b .py_ssize_t_clean
%patch55 -p1 -b .pyframe_getback
%build %build
install -d %{_target_platform}-python2 flex --outfile=sipgen/lexer.c sipgen/metasrc/lexer.l
cd %{_target_platform}-python2 bison --yacc --defines=sipgen/parser.h --output=sipgen/parser.c sipgen/metasrc/parser.y
%{__python2} ../configure.py CFLAGS+="%{optflags}" CXXFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}" sed -i -e 's|target = siplib|target = sip|g' siplib/siplib.sbf
mkdir %{_target_platform}-python3
pushd %{_target_platform}-python3
%{__python3} ../configure.py \
-b %{_bindir} -d %{python3_sitearch} -e %{PYINCLUDE} \
CXXFLAGS+="%{optflags}" CFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}"
%make_build %make_build
cd - popd
install -d %{_target_platform}-python2-pyqt4
cd %{_target_platform}-python2-pyqt4 mkdir %{_target_platform}-python3-pyqt4
%{__python2} ../configure.py --sip-module=PyQt4.sip CFLAGS+="%{optflags}" CXXFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}" pushd %{_target_platform}-python3-pyqt4
%{__python3} ../configure.py \
--sip-module=PyQt4.sip \
-b %{_bindir} -d %{python3_sitearch} -e %{PYINCLUDE} \
CXXFLAGS+="%{optflags}" CFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}"
%make_build %make_build
cd - popd
install -d %{_target_platform}-python2-pyqt5
cd %{_target_platform}-python2-pyqt5 mkdir %{_target_platform}-python3-pyqt5
%{__python2} ../configure.py --sip-module=PyQt5.sip CFLAGS+="%{optflags}" CXXFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}" pushd %{_target_platform}-python3-pyqt5
%{__python3} ../configure.py \
--sip-module=PyQt5.sip \
-b %{_bindir} -d %{python3_sitearch} -e %{PYINCLUDE} \
CXXFLAGS+="%{optflags}" CFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}"
%make_build %make_build
cd - popd
install -d %{_target_platform}-python3
cd %{_target_platform}-python3 sed -i -e 's|target = sip|target = siplib|g' siplib/siplib.sbf
%{__python3} ../configure.py CXXFLAGS+="%{optflags}" CFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}" mkdir %{_target_platform}-python3-wx
pushd %{_target_platform}-python3-wx
%{__python3} ../configure.py \
--sip-module=wx.siplib \
-b %{_bindir} -d %{python3_sitearch} -e %{PYINCLUDE} \
CXXFLAGS+="%{optflags}" CFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}"
%make_build %make_build
cd - popd
install -d %{_target_platform}-python3-pyqt4 sed -i -e 's|target = siplib|target = sip|g' siplib/siplib.sbf
cd %{_target_platform}-python3-pyqt4
%{__python3} ../configure.py --sip-module=PyQt4.sip CXXFLAGS+="%{optflags}" CFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}"
%make_build
cd -
install -d %{_target_platform}-python3-pyqt5
cd %{_target_platform}-python3-pyqt5
%{__python3} ../configure.py --sip-module=PyQt5.sip CXXFLAGS+="%{optflags}" CFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}"
%make_build
cd -
%install %install
%make_install -C %{_target_platform}-python3 %make_install -C %{_target_platform}-python3
ln -s sip %{buildroot}%{_bindir}/python3-sip
%make_install -C %{_target_platform}-python3-pyqt4 %make_install -C %{_target_platform}-python3-pyqt4
%make_install -C %{_target_platform}-python3-pyqt5 %make_install -C %{_target_platform}-python3-pyqt5
install -d %{buildroot}%{python3_sitearch}/__pycache__/exclude_rpm_hack %make_install -C %{_target_platform}-python3-wx
%make_install -C %{_target_platform}-python2 mv %{buildroot}%{python3_sitearch}/wx/sip.pyi %{buildroot}%{python3_sitearch}/wx/siplib.pyi
%make_install -C %{_target_platform}-python2-pyqt4 ln -s sip %{buildroot}%{_bindir}/python3-sip
%make_install -C %{_target_platform}-python2-pyqt5 mkdir -p %{buildroot}%{python3_sitearch}/__pycache__/exclude_rpm_hack
install %{SOURCE2} %{buildroot}%{_bindir}/sip-pyqt4
install %{SOURCE2} %{buildroot}%{_bindir}/sip-pyqt5 install %{SOURCE10} %{buildroot}%{_bindir}/sip-pyqt4
install %{SOURCE10} %{buildroot}%{_bindir}/sip-pyqt5
install %{SOURCE10} %{buildroot}%{_bindir}/sip-wx
sed -i -e 's|@SIP_MODULE@|PyQt4.sip|g' %{buildroot}%{_bindir}/sip-pyqt4 sed -i -e 's|@SIP_MODULE@|PyQt4.sip|g' %{buildroot}%{_bindir}/sip-pyqt4
sed -i -e 's|@SIP_MODULE@|PyQt5.sip|g' %{buildroot}%{_bindir}/sip-pyqt5 sed -i -e 's|@SIP_MODULE@|PyQt5.sip|g' %{buildroot}%{_bindir}/sip-pyqt5
install -d %{buildroot}%{_datadir}/sip sed -i -e 's|@SIP_MODULE@|wx.siplib|g' %{buildroot}%{_bindir}/sip-wx
mkdir -p %{buildroot}%{_datadir}/sip
install -D -p -m644 %{SOURCE1} %{buildroot}%{rpm_macros_dir}/macros.sip install -D -p -m644 %{SOURCE1} %{buildroot}%{rpm_macros_dir}/macros.sip
pushd doc
find html/ -type f -exec install -m0644 -D {} %{buildroot}%{_pkgdocdir}/{} \;
popd
%files %files
%doc README LICENSE LICENSE-GPL2 LICENSE-GPL3 %doc README LICENSE LICENSE-GPL2 LICENSE-GPL3
%{_bindir}/sip %{_bindir}/sip
# sip-wrappers
%{_bindir}/sip-pyqt4 %{_bindir}/sip-pyqt4
%{_bindir}/sip-pyqt5 %{_bindir}/sip-pyqt5
%{_bindir}/sip-wx
# compat symlink
%{_bindir}/python3-sip %{_bindir}/python3-sip
%dir %{_datadir}/sip/ %dir %{_datadir}/sip/
%{rpm_macros_dir}/macros.sip %{rpm_macros_dir}/macros.sip
%files -n python2-sip-devel %files doc
%{python2_inc}/sip.h %{_pkgdocdir}/html
%{python2_sitearch}/sipconfig.py*
%{python2_sitearch}/sipdistutils.py*
%files -n python2-sip
%doc NEWS README LICENSE LICENSE-GPL2 LICENSE-GPL3
%{python2_sitearch}/sip.*
%{python2_sitearch}/sip-%{version}.dist-info/
%files -n python2-pyqt4-sip
%doc NEWS README LICENSE LICENSE-GPL2 LICENSE-GPL3
%{python2_sitearch}/PyQt4/
%{python2_sitearch}/PyQt4_sip-%{version}.dist-info/
%files -n python2-pyqt5-sip
%doc NEWS README LICENSE LICENSE-GPL2 LICENSE-GPL3
%{python2_sitearch}/PyQt5/sip.*
%{python2_sitearch}/PyQt5_sip-%{version}.dist-info/
%files -n python3-sip-devel %files -n python3-sip-devel
%{python3_inc}/sip.h %{PYINCLUDE}/sip.h
%{python3_sitearch}/sipconfig.py* %{python3_sitearch}/sipconfig.py*
%{python3_sitearch}/sipdistutils.py* %{python3_sitearch}/sipdistutils.py*
%{python3_sitearch}/__pycache__/* %{python3_sitearch}/__pycache__/*
@ -238,18 +203,35 @@ install -D -p -m644 %{SOURCE1} %{buildroot}%{rpm_macros_dir}/macros.sip
%files -n python3-pyqt4-sip %files -n python3-pyqt4-sip
%doc NEWS README LICENSE LICENSE-GPL2 LICENSE-GPL3 %doc NEWS README LICENSE LICENSE-GPL2 LICENSE-GPL3
%dir %{python3_sitearch}/PyQt4/
%{python3_sitearch}/PyQt4/sip.* %{python3_sitearch}/PyQt4/sip.*
%{python3_sitearch}/PyQt4_sip-%{version}.dist-info/ %{python3_sitearch}/PyQt4_sip-%{version}.dist-info/
%{python3_sitearch}/__pycache__/*
%exclude %{python3_sitearch}/__pycache__/exclude_rpm_hack
%files -n python3-pyqt5-sip %files -n python3-pyqt5-sip
%doc NEWS README LICENSE LICENSE-GPL2 LICENSE-GPL3 %doc NEWS README LICENSE LICENSE-GPL2 LICENSE-GPL3
%dir %{python3_sitearch}/PyQt5/
%{python3_sitearch}/PyQt5/sip.* %{python3_sitearch}/PyQt5/sip.*
%{python3_sitearch}/PyQt5_sip-%{version}.dist-info/ %{python3_sitearch}/PyQt5_sip-%{version}.dist-info/
%{python3_sitearch}/__pycache__/*
%exclude %{python3_sitearch}/__pycache__/exclude_rpm_hack %files -n python3-wx-siplib
%doc NEWS README LICENSE LICENSE-GPL2 LICENSE-GPL3
%dir %{python3_sitearch}/wx/
%{python3_sitearch}/wx/siplib.*
%{python3_sitearch}/wx_siplib-%{version}.dist-info/
%changelog %changelog
* Wed Jul 12 2023 liyanan <thistleslyn@163.com> - 4.19.25-2
- fix build error with python 3.11.4
* Sat Jan 29 2022 chenchen <chen_aka_jan@163.com> - 4.19.25-1
- update to 4.19.25
* Tue Jan 05 2021 maminjie <maminjie1@huawei.com> - 4.19.12-12
- resolve installation conflicts of sub-packages
- fix license
* Wed Oct 21 2020 wutao <wutao61@huawei.com> - 4.19.12-11
- delete python2 modules
* Thu Nov 28 2019 Ling Yang <lingyang2@huawei.com> - 4.19.12-10 * Thu Nov 28 2019 Ling Yang <lingyang2@huawei.com> - 4.19.12-10
- Package init - Package init

4
sip.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: hg
src_repo: https://www.riverbankcomputing.com/hg/sip
tag_prefix: ^
separator: .