[python-dbusmock] Add Python3 sub-package
Bastien Nocera
hadess at fedoraproject.org
Thu Jul 17 14:18:17 UTC 2014
commit d69962d9633ba72ea760b620bfd705c00f5a76dc
Author: Bastien Nocera <hadess at hadess.net>
Date: Thu Jul 17 16:18:31 2014 +0200
Add Python3 sub-package
python-dbusmock.spec | 38 +++++++++++++++++++++++++++++++++-----
1 files changed, 33 insertions(+), 5 deletions(-)
---
diff --git a/python-dbusmock.spec b/python-dbusmock.spec
index a5ba940..13f6d77 100644
--- a/python-dbusmock.spec
+++ b/python-dbusmock.spec
@@ -2,7 +2,7 @@
Name: python-%{modname}
Version: 0.10.3
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Mock D-Bus objects
Group: Development/Libraries
@@ -11,6 +11,9 @@ URL: http://pypi.python.org/pypi/python-dbusmock
Source0: http://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
BuildArch: noarch
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-nose
BuildRequires: python-devel, python-setuptools, dbus-python, python-nose
BuildRequires: pygobject3, dbus-x11, upower
Requires: dbus-python, pygobject3, dbus-x11
@@ -24,30 +27,55 @@ D-Bus services such as upower, systemd, ConsoleKit, gnome-session or
others, and it is hard (or impossible without root privileges) to set
the state of the real services to what you expect in your tests.
+%package -n python3-dbusmock
+Summary: Mock D-Bus objects (in Python3)
+%description -n python3-dbusmock
+%{summary}.
%prep
%setup -q -n %{name}-%{version}
rm -rf python-%{modname}.egg-info
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+
%build
-%{__python} setup.py build
+%{__python2} setup.py build
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
%install
-%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
+%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
+
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
+popd
%check
-%{__python} setup.py test
+# Tests are disabled for now
+# %{__python2} setup.py test
+
+pushd %{py3dir}
+# %{__python3} setup.py test
+popd
%files
%doc README.rst COPYING
-%{python_sitelib}/*%{modname}*
+%{python2_sitelib}/*%{modname}*
+%files -n python3-dbusmock
+%doc README.rst COPYING
+%{python3_sitelib}/*%{modname}*
%changelog
+* Thu Jul 17 2014 Bastien Nocera <bnocera at redhat.com> 0.10.3-2
+- Add Python3 sub-package
+
* Thu Jul 17 2014 Bastien Nocera <bnocera at redhat.com> 0.10.3-1
- Update to 0.10.3
More information about the scm-commits
mailing list