Update to 1.3.2

This commit is contained in:
Nathaniel McCallum 2016-05-10 12:51:51 -04:00
parent a9d27a6f02
commit f61908766f
3 changed files with 37 additions and 91 deletions

3
.gitignore vendored
View File

@ -1,2 +1 @@
/python-yubico-1.2.1.tar.gz
/python-yubico-1.2.3.tar.gz
/python-yubico-1.3.2.tar.gz

View File

@ -1,37 +1,23 @@
%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
%{!?_licensedir:%global license %%doc}
%if 0%{?rhel} != 0 && 0%{?rhel} <= 7
# Do not build python3 subpackage for RHEL <= 7
%bcond_with python3
%else
%bcond_without python3
%endif
%global srcname yubico
Name: python-yubico
Version: 1.2.3
Release: 6%{?dist}
Name: python-%{srcname}
Version: 1.3.2
Release: 1%{?dist}
Summary: Pure-python library for interacting with Yubikeys
License: BSD
URL: https://github.com/Yubico/python-yubico
Source0: https://github.com/Yubico/python-yubico/archive/%{name}-%{version}.tar.gz
Patch0: %{name}-python3.patch
Patch1: %{name}-python3_util_examples.patch
URL: https://github.com/Yubico/%{name}
Source0: https://github.com/Yubico/%{name}/archive/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
%if 0%{?rhel} == 0 || 0%{?rhel} >= 7
BuildRequires: python-nose
BuildRequires: python2-setuptools
BuildRequires: python2-nose
BuildRequires: pyusb
%endif
Requires: pyusb
%if %{with python3}
%if 0%{fedora}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-nose
@ -41,89 +27,50 @@ BuildRequires: python3-pyusb
%description
Pure-python library for interacting with Yubikeys
%if %{with python3}
%package -n python3-yubico
%package -n python2-%{srcname}
Summary: Pure-python library for interacting with Yubikeys
Requires: pyusb
%description -n python2-%{srcname}
Pure-python library for interacting with Yubikeys. For Python 2.
%package -n python3-%{srcname}
Summary: Pure-python library for interacting with Yubikeys
Requires: python3-pyusb
%description -n python3-yubico
%description -n python3-%{srcname}
Pure-python library for interacting with Yubikeys. For Python 3.
%endif
%prep
%setup -qc
mv %{name}-%{name}-%{version} python2
pushd python2
sed -i 's|setup_requires=|tests_require=|' setup.py
popd
%if %{with python3}
cp -a python{2,3}
pushd python3
%patch0 -p1
%patch1 -p1
popd
%endif
%autosetup -n %{name}-%{name}-%{version}
%build
pushd python2
%{__python2} setup.py build
popd
%if %{with python3}
pushd python3
%{__python3} setup.py build
popd
%endif
%py2_build
%py3_build
%install
pushd python2
%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
popd
%py2_install
%py3_install
%if %{with python3}
pushd python3
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
popd
%endif
%files
%{!?_licensedir:%global license %%doc}
%license python2/COPYING
%doc python2/NEWS python2/README
%files -n python2-%{srcname}
%license COPYING
%doc NEWS README
%{python2_sitelib}/*
%if %{with python3}
%files -n python3-yubico
%license python3/COPYING
%doc python3/NEWS python3/README
%files -n python3-%{srcname}
%license COPYING
%doc NEWS README
%{python3_sitelib}/*
%endif
%if 0%{?rhel} == 0 || 0%{?rhel} >= 7
%check
pushd python2
# Exclude tests that require a physical yubikey attached.
nosetests -e test_challenge_response -e test_serial -e test_status
popd
%if %{with python3}
pushd python3
# Exclude tests that require a physical yubikey attached.
nosetests-%{python2_version} -e test_challenge_response -e test_serial -e test_status
nosetests-%{python3_version} -e test_challenge_response -e test_serial -e test_status
popd
%endif # with python3
%endif # rhel
%changelog
* Tue May 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.3.2-1
- Cleanup obsolete conditions (like RHEL 6)
- Update to v1.3.2
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

View File

@ -1 +1 @@
c7cb59d7898cf36d9302183dd44c486b python-yubico-1.2.3.tar.gz
3012d95a043b1da93486e0b555b95234 python-yubico-1.3.2.tar.gz