Enable build on EL6
This commit is contained in:
parent
a4b75e3cbe
commit
55c329a8e1
@ -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@natemccallum.com> - 1.2.1-2
|
||||
* Mon Jun 23 2014 Nathaniel McCallum <npmccallum@redhat.com> - 1.2.1-3
|
||||
- Enable build on EL6.
|
||||
|
||||
* Sat Jun 21 2014 Nathaniel McCallum <npmccallum@redhat.com> - 1.2.1-2
|
||||
- Run upstream tests during build.
|
||||
|
||||
* Thu Jun 19 2014 Nathaniel McCallum <npmccallum@redhat.com> - 1.2.1-1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user