Provides pythonXdist symbols

Signed-off-by: herengui <herengui@uniontech.com>
This commit is contained in:
herengui 2021-12-02 15:38:30 +08:00
parent 8653e6d1fa
commit 472309c196

View File

@ -1,8 +1,10 @@
%global _configure ../configure
%global python2dir %{_builddir}/python2-%{name}-%{version}-%{release}
%global python3dir %{_builddir}/python3-%{name}-%{version}-%{release}
Name: dbus-python
Version: 1.2.16
Release: 1
Release: 2
Summary: original Python binding for dbus
License: MIT
URL: http://www.freedesktop.org/wiki/Software/DBusBindings/
@ -53,21 +55,43 @@ developing applications that use %{name}.
%build
autoreconf -vif
mkdir -p python2-build python3-build
pushd python2-build; %configure PYTHON="%{__python2}"
%make_build; popd
install -d %{python2dir}
cp -a . %{python2dir}
mv %{python2dir} python2-build
install -d %{python3dir}
cp -a . %{python3dir}
mv %{python3dir} python3-build
pushd python2-build
%py2_build
%configure PYTHON="%{__python2}"
%make_build
popd
pushd python3-build
%py3_build
%configure PYTHON="%{__python3}"
%make_build
popd
pushd python3-build; %configure PYTHON="%{__python3}"
%make_build; popd
%install
%make_install -C python2-build
%make_install -C python3-build
find %{buildroot} -name '*.la' -delete
pushd python2-build
%py2_install
%make_install
popd
pushd python3-build
%py3_install
%make_install
popd
%delete_la
%check
make check -k -C python2-build
make check -k -C python3-build
make check -k -C python2-build || cat python2-build/test/test*.log
make check -k -C python3-build || cat python3-build/test/test*.log
%pre
@ -82,12 +106,14 @@ make check -k -C python3-build
%{python2_sitearch}/_dbus_bindings.so
%{python2_sitearch}/_dbus_glib_bindings.so
%{python2_sitearch}/dbus/
%{python2_sitearch}/dbus_python-%{version}-py%{python2_version}.egg-info
%files -n python3-dbus
%license COPYING
%{python3_sitearch}/_dbus_bindings.so
%{python3_sitearch}/_dbus_glib_bindings.so
%{python3_sitearch}/dbus/
%{python3_sitearch}/dbus_python-%{version}-py%{python3_version}.egg-info
%files devel
%{_includedir}/dbus-1.0/dbus/%{name}.h
@ -97,6 +123,12 @@ make check -k -C python3-build
%doc NEWS ChangeLog README doc/API_CHANGES.txt doc/tutorial.txt
%changelog
* Thu Dec 02 2021 herengui <herengui@uniontech.com> - 1.2.16-2
- Type:update
- ID:NA
- SUG:NA
- DESC: Provides pythonXdist
* Fri Jul 31 2020 Liquor <lirui130@huawei.com> - 1.2.16-1
- Type:update
- ID:NA