summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2014-04-02 16:33:53 +0200
committerDaniel P. Berrange <berrange@redhat.com>2014-04-02 16:33:53 +0200
commit0eaf951979cbb900eefbc76569b9ce32ec567bc5 (patch)
treef3f71c4354e00c4f5f3ba1af39b991348f1ee3db
parent71fd954092d1f1ff8e9576e4963858bd21be6805 (diff)
downloadlibvirt-python-0eaf951979cbb900eefbc76569b9ce32ec567bc5.tar.gz
Fix nosetests usage with python3v1.2.3
Add RPM deps on python/python3-nose, make RPM build run the test suite and invoke nosetests using correct python binary Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
-rw-r--r--libvirt-python.spec.in8
-rwxr-xr-xsetup.py2
2 files changed, 9 insertions, 1 deletions
diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in
index ac399cb..25d22cd 100644
--- a/libvirt-python.spec.in
+++ b/libvirt-python.spec.in
@@ -14,8 +14,10 @@ License: LGPLv2+
Group: Development/Libraries
BuildRequires: libvirt-devel >= @C_VERSION@
BuildRequires: python-devel
+BuildRequires: python-nose
%if %{with_python3}
BuildRequires: python3-devel
+BuildRequires: python3-nose
%endif
%if %{with_python3}
@@ -60,6 +62,12 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
%endif
rm -f %{buildroot}%{_libdir}/python*/site-packages/*egg-info
+%check
+%{__python} setup.py test
+%if %{with_python3}
+%{__python3} setup.py test
+%endif
+
%files
%defattr(-,root,root)
%doc ChangeLog AUTHORS NEWS README COPYING COPYING.LESSER examples/
diff --git a/setup.py b/setup.py
index 592c30b..44ebcf7 100755
--- a/setup.py
+++ b/setup.py
@@ -291,7 +291,7 @@ class my_test(Command):
else:
os.environ["PYTHONPATH"] = self.build_platlib
self.spawn([sys.executable, "sanitytest.py", self.build_platlib, apis[0]])
- self.spawn(["nosetests"])
+ self.spawn([sys.executable, "/usr/bin/nosetests"])
class my_clean(clean):