diff --git a/python-sip.spec b/python-sip.spec index e49ddfc..b75d475 100644 --- a/python-sip.spec +++ b/python-sip.spec @@ -1,6 +1,6 @@ Name: python-sip Version: 6.5.1 -Release: 1mamba +Release: 3mamba Summary: Python extension module generator for C and C++ libraries Group: System/Libraries/Python Vendor: openmamba @@ -8,50 +8,31 @@ Distribution: openmamba Packager: Silvan Calarco URL: https://www.riverbankcomputing.com/software/sip Source: https://pypi.debian.net/sip/sip-%{version}.tar.gz -#Source: https://www.riverbankcomputing.com/static/Downloads/sip/%{version}/sip-%{version}.tar.gz -#Source: http://sourceforge.net/projects/pyqt/files/sip/sip-%{version}/sip-%{version}.tar.gz License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libpython3-devel +BuildRequires: python3.7dist(packaging) +BuildRequires: python3.7dist(setuptools) +BuildRequires: python3.7dist(toml) ## AUTOBUILDREQ-END -BuildRequires: libpython3-devel >= 3.7.4 %description SIP is an extension module generator similar to SWIG but is specifically designed for creating Python modules. -%if "%?with_pyver" -%define pyver %{with_pyver} -%define __python %(rpm --eval %{__python%{with_pyver}}) -%define python_sitearch %(rpm --eval %{python%{with_pyver}_sitearch}) -%define python_sitelib %(rpm --eval %{python%{with_pyver}_sitelib}) -%define python_inc %(rpm --eval %{python%{with_pyver}_inc}) -%define python_version %(rpm --eval %{python%{with_pyver}_version}) -%define python_provides %(rpm --eval %{python%{with_pyver}_provides}) -%define python_requires %(rpm --eval %{python%{with_pyver}_requires}) -%define py_requires %(rpm --eval %{py%{with_pyver}_requires}) - -%package py%{pyver} -Group: System/Libraries/Python -Summary: Python %{pyver} extension module generator for C and C++ libraries -Provides: python-sip-%{?with_pyver:py%{with_pyver}-}devel -Obsoletes: python-sip-%{?with_pyver:py%{with_pyver}-}devel -Obsoletes: python-sip-py36 < 5.5.0 -Requires: sip = %{?epoch:%epoch:}%{version}-%{release} -%py_requires - -%description py%{pyver} -SIP is an extension module generator similar to SWIG but is specifically designed for creating Python modules. +%if "0%{?with_pyver}" == "03" +%define py_requires_append \ +Provides: python-sip-%{?with_pyver:py%{with_pyver}-}devel \ +Obsoletes: python-sip-%{?with_pyver:py%{with_pyver}-}devel < 6.5.1 \ +Obsoletes: python-sip-py36 < 5.5.0 \ +Obsoletes: python-sip5-py3 <= 5.5.0 \ +Provides: sip \ +Obsoletes: sip < 6.5.1-2mamba %endif -%package -n sip -Group: Development/Tools -Summary: Python %{pyver} extension module generator for C and C++ libraries -Requires: python-toml-py%{pyver} - -%description -n sip -SIP is an extension module generator similar to SWIG but is specifically designed for creating Python modules. -This package provides the sip tool and documentation. +%if 0%{?with_pyver} +%pyver_package +%endif %prep %setup -q -n sip-%{version} @@ -68,7 +49,16 @@ CFLAGS="%{optflags}" %{__python} setup.py build --install-lib=%{python_sitearch} \ --record=%{name}.filelist -sed -i "s,.*/man/.*,&.gz," %{name}.filelist +sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist + +sed -i "/^\/usr\/bin/d" %{name}.filelist + +for f in build distinfo install module sdist wheel; do + mv %{buildroot}%{_bindir}/sip-${f} %{buildroot}%{_bindir}/sip-${f}-py%{with_pyver} +%if "%{?with_pyver}" == "3" + ln -s sip-${f}-py%{with_pyver} %{buildroot}%{_bindir}/sip-${f} +%endif +done %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -80,17 +70,23 @@ find %{python_sitearch}/*.egg-info -type d -empty -delete > /dev/null || true %files %{?with_pyver:py%{pyver}} -f %{name}.filelist %defattr(-,root,root) -%exclude %{_bindir}/* +%{_bindir}/sip-build* +%{_bindir}/sip-distinfo* +%{_bindir}/sip-install* +%{_bindir}/sip-module* +%{_bindir}/sip-sdist* +%{_bindir}/sip-wheel* +%dir %{python_sitearch}/sip-%{version}-py*.egg-info +%{python_sitearch}/sip-%{version}-py*.egg-info/* %doc LICENSE LICENSE-GPL2 LICENSE-GPL3 -%files -n sip -%defattr(-,root,root) -#%{_bindir}/sip5 -%{_bindir}/sip-* -#%doc NEWS README -#%doc doc/* - %changelog +* Thu Apr 07 2022 Silvan Calarco 6.5.1-3mamba +- fix some requires and obsoletes + +* Thu Apr 07 2022 Silvan Calarco 6.5.1-2mamba +- rebuilt with python 3.10 + * Wed Feb 02 2022 Automatic Build System 6.5.1-1mamba - automatic version update by autodist