[python-yubico/el6] Enable build on EL6
Nathaniel McCallum
npmccallum at fedoraproject.org
Mon Jun 23 20:06:30 UTC 2014
commit 55c329a8e1ffbd361228889afcff622af7cc7c6b
Author: Nathaniel McCallum <nathaniel at themccallums.org>
Date: Mon Jun 23 16:06:02 2014 -0400
Enable build on EL6
python-yubico.spec | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/python-yubico.spec b/python-yubico.spec
index 31cb429..5092b58 100644
--- a/python-yubico.spec
+++ b/python-yubico.spec
@@ -1,6 +1,11 @@
+%if 0%{?rhel} != 0 && 0%{?rhel} <= 6
+%{!?__python2: %global __python2 /usr/bin/python2}
+%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%endif
+
Name: python-yubico
Version: 1.2.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Pure-python library for interacting with Yubikeys
License: BSD
@@ -10,7 +15,9 @@ Source0: https://github.com/Yubico/python-yubico/archive/%{name}-%{versio
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
+%if 0%{?rhel} == 0 || 0%{?rhel} >= 7
BuildRequires: python-nose
+%endif
Requires: pyusb
%description
@@ -21,6 +28,7 @@ Pure-python library for interacting with Yubikeys
%build
+sed -i 's|setup_requires=|tests_require=|' setup.py
%{__python2} setup.py build
@@ -32,12 +40,17 @@ Pure-python library for interacting with Yubikeys
%doc COPYING NEWS README
%{python2_sitelib}/*
+%if 0%{?rhel} == 0 || 0%{?rhel} >= 7
%check
# Exclude tests that require a physical yubikey attached.
nosetests -e test_challenge_response -e test_serial -e test_status
+%endif
%changelog
-* Sat Jun 21 2014 Nathaniel McCallum <nathaniel at natemccallum.com> - 1.2.1-2
+* Mon Jun 23 2014 Nathaniel McCallum <npmccallum at redhat.com> - 1.2.1-3
+- Enable build on EL6.
+
+* Sat Jun 21 2014 Nathaniel McCallum <npmccallum at redhat.com> - 1.2.1-2
- Run upstream tests during build.
* Thu Jun 19 2014 Nathaniel McCallum <npmccallum at redhat.com> - 1.2.1-1
More information about the scm-commits
mailing list