remove unuse files

(cherry picked from commit acff64ec01a72278023f911a20d52537fd668df6)
This commit is contained in:
cherry530 2022-01-27 18:55:46 +08:00 committed by openeuler-sync-bot
parent 6132412bb4
commit 2a13131cfd
9 changed files with 233 additions and 101 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;

BIN
sip-4.19.25.tar.gz Normal file

Binary file not shown.

226
sip.spec
View File

@ -1,137 +1,194 @@
%{!?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: 12 Release: 1
Summary: A C/C++ library bindings generator for Python v2 and v3 License: GPLv2 or GPLv3
# sipgen/parser.{c.h} is GPLv2 with exceptions (bison) Url: https://riverbankcomputing.com/software/sip/intro
License: GPLv2 and (GPLv2 with exceptions) or GPLv3 Source0: https://riverbankcomputing.com/static/Downloads/sip/%{version}/sip-%{version}.tar.gz
URL: http://www.riverbankcomputing.com/software/sip/intro
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
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.
%description %_description
%package doc
Summary: Documentation for %summary
BuildArch: noarch
%description doc
This package contains HTML documentation for SIP.
%_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.
%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
%build %build
install -d %{_target_platform}-python3 flex --outfile=sipgen/lexer.c sipgen/metasrc/lexer.l
cd %{_target_platform}-python3 bison --yacc --defines=sipgen/parser.h --output=sipgen/parser.c sipgen/metasrc/parser.y
%{__python3} ../configure.py CXXFLAGS+="%{optflags}" CFLAGS+="%{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}-python3-pyqt4
cd %{_target_platform}-python3-pyqt4 mkdir %{_target_platform}-python3-pyqt4
%{__python3} ../configure.py --sip-module=PyQt4.sip CXXFLAGS+="%{optflags}" CFLAGS+="%{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}-python3-pyqt5
cd %{_target_platform}-python3-pyqt5 mkdir %{_target_platform}-python3-pyqt5
%{__python3} ../configure.py --sip-module=PyQt5.sip CXXFLAGS+="%{optflags}" CFLAGS+="%{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
sed -i -e 's|target = sip|target = siplib|g' siplib/siplib.sbf
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
popd
sed -i -e 's|target = siplib|target = sip|g' siplib/siplib.sbf
%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
install %{SOURCE2} %{buildroot}%{_bindir}/sip-pyqt4 mv %{buildroot}%{python3_sitearch}/wx/sip.pyi %{buildroot}%{python3_sitearch}/wx/siplib.pyi
install %{SOURCE2} %{buildroot}%{_bindir}/sip-pyqt5 ln -s sip %{buildroot}%{_bindir}/python3-sip
mkdir -p %{buildroot}%{python3_sitearch}/__pycache__/exclude_rpm_hack
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 doc
%{_pkgdocdir}/html
%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__/*
@ -144,15 +201,26 @@ 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/
%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/
%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
* 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 * Tue Jan 05 2021 maminjie <maminjie1@huawei.com> - 4.19.12-12
- resolve installation conflicts of sub-packages - resolve installation conflicts of sub-packages
- fix license - fix license

View File

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