import dbus-python-1.2.4-15.el8

This commit is contained in:
CentOS Sources 2019-11-05 16:27:18 -05:00 committed by Andrew Lukoshko
parent c8f72d7bff
commit f36d6f2ece

View File

@ -5,10 +5,13 @@
%bcond_without python2
%endif
%global python2dir %{_builddir}/python2-%{name}-%{version}-%{release}
%global python3dir %{_builddir}/python3-%{name}-%{version}-%{release}
Summary: D-Bus Python Bindings
Name: dbus-python
Version: 1.2.4
Release: 14%{?dist}
Release: 15%{?dist}
License: MIT
URL: http://www.freedesktop.org/wiki/Software/DBusBindings/
@ -42,6 +45,7 @@ D-Bus python bindings for use with python programs.
Summary: %summary
%{?python_provide:%python_provide python2-dbus}
BuildRequires: python2-devel
BuildRequires: python2dist(setuptools)
# Remove before F30
Provides: dbus-python = %{version}-%{release}
Provides: dbus-python%{?_isa} = %{version}-%{release}
@ -54,6 +58,7 @@ Obsoletes: dbus-python < %{version}-%{release}
Summary: D-Bus bindings for python3
%{?python_provide:%python_provide python3-dbus}
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
%description -n python3-dbus
%{summary}.
@ -68,28 +73,46 @@ bindings.
%prep
%autosetup -p1
%build
# For new arches (aarch64/ppc64le), and patch0
autoreconf -vif
%if %{with python2}
mkdir -p %{python2dir}
cp -a . %{python2dir}
mv %{python2dir} python2-build
%endif
mkdir -p %{python3dir}
cp -a . %{python3dir}
mv %{python3dir} python3-build
%build
%global _configure ../configure
%if %{with python2}
mkdir python2-build; pushd python2-build
pushd python2-build
%py2_build
%configure PYTHON="%{__python2}"
%make_build
popd
%endif # with python2
mkdir python3-build; pushd python3-build
pushd python3-build
%py3_build
%configure PYTHON="%{__python3}"
%make_build
popd
%install
%if %{with python2}
%make_install -C python2-build
pushd python2-build
%py2_install
%make_install
popd
%endif # with python2
%make_install -C python3-build
pushd python3-build
%py3_install
%make_install
popd
# unpackaged files
%if %{with python2}
@ -110,6 +133,7 @@ make check -k -C python3-build
%license COPYING
%{python2_sitearch}/*.so
%{python2_sitearch}/dbus/
%{python2_sitearch}/dbus_python*egg-info
%endif # with python2
%files -n python3-dbus
@ -117,6 +141,7 @@ make check -k -C python3-build
%license COPYING
%{python3_sitearch}/*.so
%{python3_sitearch}/dbus/
%{python3_sitearch}/dbus_python*egg-info
%files devel
%doc README ChangeLog doc/API_CHANGES.txt doc/HACKING.txt doc/tutorial.txt
@ -124,6 +149,10 @@ make check -k -C python3-build
%{_libdir}/pkgconfig/dbus-python.pc
%changelog
* Thu Jun 06 2019 Josh Boyer <jwboyer@redhat.com> - 1.2.4-15
- Backport patch from Neal Gompa <ngompa13@gmail.com> to generate pythonXdist
metadata
* Sun Jul 22 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.2.4-14
- Conditionalize the python2 subpackage