commit python-sip for openSUSE:Factory
Hello community, here is the log from the commit of package python-sip for openSUSE:Factory checked in at 2017-04-19 18:07:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-sip (Old) and /work/SRC/openSUSE:Factory/.python-sip.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-sip" Wed Apr 19 18:07:06 2017 rev:91 rq:485037 version:4.19.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-sip/python-sip.changes 2017-02-21 13:36:42.007822489 +0100 +++ /work/SRC/openSUSE:Factory/.python-sip.new/python-sip.changes 2017-04-19 18:07:07.365270364 +0200 @@ -1,0 +2,41 @@ +Mon Apr 3 17:22:56 UTC 2017 - hpj@urpla.net + +- Fix requires_python3_sip_api macro + +------------------------------------------------------------------- +Wed Mar 29 15:38:33 UTC 2017 - toddrme2178@gmail.com + +- Fix Provides macro. +- Split largest part of docs into own subpackage to reduce package + size. + +------------------------------------------------------------------- +Sat Mar 11 03:51:53 UTC 2017 - toddrme2178@gmail.com + +- Fix sip api macro. +- Fix header location. +- Compile and install .pyc files. + +------------------------------------------------------------------- +Wed Mar 8 16:36:29 UTC 2017 - toddrme2178@gmail.com + +- spec file cleanups +- better use of multipython macros +- include more documentation + +------------------------------------------------------------------- +Mon Mar 6 16:21:09 UTC 2017 - toddrme2178@gmail.com + +- Add shared data directory and corresponding package. + +------------------------------------------------------------------- +Wed Mar 1 16:08:40 UTC 2017 - toddrme2178@gmail.com + +- Fix python library handling. + +------------------------------------------------------------------- +Mon Feb 27 19:37:19 UTC 2017 - toddrme2178@gmail.com + +- Switch to single spec version. + +------------------------------------------------------------------- Old: ---- python3-sip.changes python3-sip.spec ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-sip.spec ++++++ --- /var/tmp/diff_new_pack.RNDPOE/_old 2017-04-19 18:07:08.593096683 +0200 +++ /var/tmp/diff_new_pack.RNDPOE/_new 2017-04-19 18:07:08.593096683 +0200 @@ -17,6 +17,8 @@ %define python_sip_api 12.1 + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-sip Version: 4.19.1 Release: 0 @@ -27,12 +29,14 @@ Source0: sip-%{version}.tar.gz # PATCH-FIX-OPENSUSE disable-rpaths.diff -- Disable rpaths Patch0: disable-rpaths.diff +BuildRequires: %{python_module devel} BuildRequires: c++_compiler -BuildRequires: python -BuildRequires: python-devel +BuildRequires: python-rpm-macros +Requires: %{name}-common = %{version} Provides: python-sip(api) = %{python_sip_api} BuildRoot: %{_tmppath}/%{name}-%{version}-build -%py_requires + +%python_subpackages %description SIP is a tool that makes it very easy to create Python bindings for C @@ -40,15 +44,17 @@ Python bindings for the Qt toolkit, but can be used to create bindings for any C or C++ library. + %package devel Summary: SIP tool to create python bindings Group: Development/Libraries/Python Requires: %{name} = %{version} Requires: c++_compiler Requires: python-devel +Provides: %{name}-bin = %{version} +Obsoletes: %{name}-bin < %{version} Requires(post): update-alternatives -Provides: python-sip-bin = %{version} -Obsoletes: python-sip-bin < %{version} +Requires(postun): update-alternatives %description devel SIP is a tool that makes it very easy to create Python bindings for C @@ -59,17 +65,41 @@ This package contains all the developer tools you need to create your own sip bindings. + +%package -n %{name}-doc +Summary: SIP tool to create python bindings -- common documentation +Group: Development/Libraries/Python +Provides: %{python_module sip-doc = %{version}} + +%description -n %{name}-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 %{name}-common +Summary: SIP tool to create python bindings -- common files +Group: Development/Libraries/Python +Provides: %{python_module sip-common = %{version}} + +%description -n %{name}-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} %patch0 -p1 -%build -export CFLAGS="%{optflags}" -export CXXFLAGS="%{optflags}" -# Link against libpython (fixes bnc#756282 and bnc#721280) -python configure.py --debug CFLAGS+="%{optflags}" CXXFLAGS+="%{optflags}" LIBS+="-lpython%{py_ver}" -make %{?_smp_mflags} - sip_major=$(grep "define SIP_API_MAJOR_NR" siplib/sip.h.in | awk '{print $3}') sip_minor=$(grep "define SIP_API_MINOR_NR" siplib/sip.h.in | awk '{print $3}') @@ -78,48 +108,88 @@ exit 1 fi -echo "%%requires_python_sip_api Requires: python-sip(api) = $sip_major.$sip_minor" > macros.%{name} +%build +export CFLAGS="%{optflags}" +export CXXFLAGS="%{optflags}" -%install -make DESTDIR=%{buildroot} install %{?_smp_mflags} -mkdir -p %{buildroot}%{_datadir}/sip +%{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" +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 -# For alternatives -mv %{buildroot}%{_bindir}/sip %{buildroot}%{_bindir}/sip-%{py_ver} +popd +} + +%install mkdir -p %{buildroot}%{_sysconfdir}/alternatives -touch %{buildroot}%{_sysconfdir}/alternatives/sip -ln -s -f %{_sysconfdir}/alternatives/sip %{buildroot}/%{_bindir}/sip -install -m 644 -D macros.%{name} %{buildroot}/%{_sysconfdir}/rpm/macros.%{name} +%{python_expand pushd build_%{$python_bin_suffix} -# Point to the correct location for the documentation files -sed -i 's/"doc" directory/"doc" directory of package %{name}-devel/' README +%make_install + +popd + +# Prepare for update-alternatives usage +mv %{buildroot}%{_bindir}/sip %{buildroot}%{_bindir}/sip-%{$python_bin_suffix} +} + +mkdir -p %{buildroot}/%{_sysconfdir}/rpm/ + +%if 0%{have_python2} +echo "%%requires_python2_sip_api Requires: %{python2_prefix}-sip(api) = %{python_sip_api}" > %{buildroot}/%{_sysconfdir}/rpm/macros.%{python2_prefix}-sip +echo "%%requires_python_sip_api Requires: %{python2_prefix}-sip(api) = %{python_sip_api}" >> %{buildroot}/%{_sysconfdir}/rpm/macros.%{python2_prefix}-sip + +%py_compile %{buildroot}%{python2_sitearch} +%endif + +%if 0%{have_python3} +echo "%%requires_python3_sip_api Requires: %{python3_prefix}-sip(api) = %{python_sip_api}" > %{buildroot}/%{_sysconfdir}/rpm/macros.%{python3_prefix}-sip + +%py3_compile %{buildroot}%{python3_sitearch} +%endif + +%prepare_alternative sip +mkdir -p %{buildroot}%{_datadir}/sip %post devel -update-alternatives --install %{_bindir}/sip sip %{_bindir}/sip-%{py_ver} 50 +%{python_install_alternative sip} -%preun devel +%postun devel +%python_uninstall_alternative sip -if [ "$1" = 0 ] ; then - update-alternatives --remove sip %{_bindir}/sip-%{py_ver} -fi +%files %{python_files} +%defattr(-,root,root,-) +%doc ChangeLog LICENSE* NEWS +%doc build_%{python_bin_suffix}/README +%{python_sitearch}/sip.so + +%files %{python_files devel} +%defattr(-,root,root,-) +%doc LICENSE* +%config %{_sysconfdir}/rpm/macros.%{python_prefix}-sip +%python_alternative %{_bindir}/sip +%{_includedir}/python%{python_version}*/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 +%files -n python-sip-doc %defattr(-,root,root,-) -%doc README -%{py_sitedir}/sip.so +%doc LICENSE* +%doc doc/ -%files devel +%files -n python-sip-common %defattr(-,root,root,-) -%doc NEWS LICENSE* doc/ -%config %{_sysconfdir}/rpm/macros.%{name} -%{_bindir}/sip-%{py_ver} -%ghost %{_sysconfdir}/alternatives/sip -%{_bindir}/sip -%{py_incdir}/sip.h -%{py_sitedir}/sipconfig.py -%{py_sitedir}/sipdistutils.py -%{py_sitedir}/sip.pyi +%doc LICENSE* %{_datadir}/sip/ %changelog
participants (1)
-
root@hilbert.suse.de