[python-collada] Add a %check section; bump release
John Morris
zultron at fedoraproject.org
Sat Mar 9 07:17:44 UTC 2013
commit 4aa9f37f48ed830eed998a6f485d7ccce40f32f3
Author: John Morris <john at zultron.com>
Date: Fri Jan 25 14:53:24 2013 -0600
Add a %check section; bump release
This introduces two extra BRs and a small patch to disable downloads.
pycollada-0.4-disable_unittest_downloads.patch | 17 +++++++++++++++++
python-collada.spec | 15 ++++++++++++++-
2 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/pycollada-0.4-disable_unittest_downloads.patch b/pycollada-0.4-disable_unittest_downloads.patch
new file mode 100644
index 0000000..58d2adc
--- /dev/null
+++ b/pycollada-0.4-disable_unittest_downloads.patch
@@ -0,0 +1,17 @@
+Defining install_requires in setup() causes the packages
+to be downloaded from pypi by easy_install. That defeats
+the purpose of unit testing against installed system
+packages, so disable the install_requires attribute.
+
+diff -up pycollada-pycollada-ed5d8f8/setup.py.nodownloads pycollada-pycollada-ed5d8f8/setup.py
+--- pycollada-pycollada-ed5d8f8/setup.py.nodownloads 2012-09-20 11:52:49.000000000 -0500
++++ pycollada-pycollada-ed5d8f8/setup.py 2012-11-02 15:19:08.621455388 -0500
+@@ -22,7 +22,7 @@ setup(
+ author_email = 'jterrace at gmail.com',
+ platforms=["any"],
+ license="BSD",
+- install_requires=install_requires,
++# install_requires=install_requires,
+ extras_require = {
+ 'prettyprint': ["lxml"],
+ 'validation': ["lxml"]
diff --git a/python-collada.spec b/python-collada.spec
index df82857..2dba9b0 100644
--- a/python-collada.spec
+++ b/python-collada.spec
@@ -6,17 +6,22 @@
Name: python-collada
Version: 0.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A python module for creating, editing and loading COLLADA
+Group: Development/Languages
License: BSD
URL: https://github.com/pycollada/pycollada
# https://github.com/pycollada/pycollada/archive/v0.4.tar.gz
Source0: %{realname}-%{version}.tar.gz
+Patch0: pycollada-0.4-disable_unittest_downloads.patch
BuildArch: noarch
BuildRequires: python2-devel
+# unit test requirements
+BuildRequires: python-dateutil
+BuildRequires: python-unittest2
%description
pycollada is a python module for creating, editing and loading COLLADA, which
@@ -30,6 +35,7 @@ as well as in-place editing.
%prep
%setup -q -n %{realname}-%{version}
+%patch0 -p1 -z .no_downloads
%build
@@ -40,11 +46,18 @@ as well as in-place editing.
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+%check
+%{__python} setup.py test
+
+
%files
%doc AUTHORS.md CHANGELOG.rst COPYING README.markdown
%{python_sitelib}/*
%changelog
+* Fri Jan 25 2013 John Morris <john at zultron.com> - 0.4-2
+- Add check section
+
* Wed Jan 23 2013 Richard Shaw <hobbes1069 at gmail.com> - 0.4-1
- Initial packaging.
More information about the scm-commits
mailing list