[packages/python3-fido2] up to 1.1.0
atler
atler at pld-linux.org
Thu Nov 3 18:27:37 CET 2022
commit 59cee599fcf66b572111d635de70394086cc0f33
Author: Jan Palus <atler at pld-linux.org>
Date: Thu Nov 3 18:27:17 2022 +0100
up to 1.1.0
python-fido2-mock.patch | 43 ------------------------
python3-fido2.spec | 88 ++++++-------------------------------------------
2 files changed, 10 insertions(+), 121 deletions(-)
---
diff --git a/python3-fido2.spec b/python3-fido2.spec
index 6f6281b..c6fbdd6 100644
--- a/python3-fido2.spec
+++ b/python3-fido2.spec
@@ -1,14 +1,12 @@
#
# Conditional build:
%bcond_with tests # unit tests
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
-Summary: Python 2 based FIDO 2.0 library
-Summary(pl.UTF-8): Biblioteka FIDO 2.0 dla Pythona 2
-Name: python-fido2
-Version: 0.9.1
-Release: 5
+Summary: Python 3 based FIDO 2.0 library
+Summary(pl.UTF-8): Biblioteka FIDO 2.0 dla Pythona 3
+Name: python3-fido2
+Version: 1.1.0
+Release: 1
# Yubico code is BSD licensed; includes also:
# pyudf (Apache 2.0)
# public suffix list (MPL 2.0)
@@ -16,33 +14,20 @@ License: BSD, Apache v2.0, MPL v2.0
Group: Libraries/Python
#Source0Download: https://github.com/Yubico/python-fido2/releases
Source0: https://github.com/Yubico/python-fido2/releases/download/%{version}/fido2-%{version}.tar.gz
-# Source0-md5: bf661f7949a057440e52aad6595a24fa
-Patch0: %{name}-mock.patch
+# Source0-md5: ee9c06204d6eac131b4f7ca6360b0090
URL: https://developers.yubico.com/python-fido2/
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.7
-BuildRequires: python-setuptools
-%if %{with tests}
-BuildRequires: python-cryptography >= 1.0
-BuildRequires: python-mock >= 1.0.1
-BuildRequires: python-pyfakefs >= 2.4
-BuildRequires: python-six
-%endif
-%endif
-%if %{with python3}
-BuildRequires: python3-modules >= 1:3.4
+BuildRequires: python3-modules >= 1:3.7
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: python3-cryptography >= 1.0
BuildRequires: python3-pyfakefs >= 2.4
BuildRequires: python3-six
%endif
-%endif
-Requires: python-cryptography >= 1.0
-Requires: python-modules >= 1:2.7
-Requires: python-six
+Requires: python3-cryptography >= 1.0
+Requires: python3-modules >= 1:3.4
+Requires: python3-six
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -55,83 +40,30 @@ signatures.
Ten pakiet zawiera bibliotekę funkcji do komunikacji z urządzeniami
FIDO po USB, a także weryfikowania podpisów poświadczeń i zapewnień.
-%package -n python3-fido2
-Summary: Python 3 based FIDO 2.0 library
-Summary(pl.UTF-8): Biblioteka FIDO 2.0 dla Pythona 3
-Group: Libraries/Python
-Requires: python3-cryptography >= 1.0
-Requires: python3-modules >= 1:3.4
-Requires: python3-six
-
-%description -n python3-fido2
-This package provides library functionality for communicating with a
-FIDO device over USB as well as verifying attestation and assertion
-signatures.
-
-%description -n python3-fido2 -l pl.UTF-8
-Ten pakiet zawiera bibliotekę funkcji do komunikacji z urządzeniami
-FIDO po USB, a także weryfikowania podpisów poświadczeń i zapewnień.
-
%prep
%setup -q -n fido2-%{version}
-%patch0 -p1
%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-%{__python} -m unittest discover -s test
-%endif
-%endif
-
-%if %{with python3}
%py3_build
%if %{with tests}
%{__python3} -m unittest discover -s test
%endif
-%endif
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
%py3_install
-%endif
-%if %{with python2}
-install -d $RPM_BUILD_ROOT%{_examplesdir}/python-fido2-%{version}
-cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-fido2-%{version}
-%endif
-%if %{with python3}
install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-fido2-%{version}
cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-fido2-%{version}
-%endif
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
%files
%defattr(644,root,root,755)
%doc COPYING NEWS README.adoc
-%{py_sitescriptdir}/fido2
-%{py_sitescriptdir}/fido2-%{version}-py*.egg-info
-%{_examplesdir}/python-fido2-%{version}
-%endif
-
-%if %{with python3}
-%files -n python3-fido2
-%defattr(644,root,root,755)
-%doc COPYING NEWS README.adoc
%{py3_sitescriptdir}/fido2
%{py3_sitescriptdir}/fido2-%{version}-py*.egg-info
%{_examplesdir}/python3-fido2-%{version}
-%endif
diff --git a/python-fido2-mock.patch b/python-fido2-mock.patch
deleted file mode 100644
index 3152397..0000000
--- a/python-fido2-mock.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- fido2-0.3.0/test/test_client.py.orig 2018-04-05 14:24:00.000000000 +0200
-+++ fido2-0.3.0/test/test_client.py 2018-05-20 21:11:47.066881551 +0200
-@@ -29,8 +29,11 @@
-
- from __future__ import absolute_import, unicode_literals
-
--import mock
- import unittest
-+try:
-+ import mock
-+except:
-+ from unittest import mock
- from threading import Event, Timer
- from binascii import a2b_hex
- from fido2.utils import sha256, websafe_decode
---- fido2-0.3.0/test/test_ctap1.py.orig 2018-04-05 14:24:00.000000000 +0200
-+++ fido2-0.3.0/test/test_ctap1.py 2018-05-20 21:12:03.176881487 +0200
-@@ -31,7 +31,10 @@ from fido2.ctap1 import CTAP1, ApduError
- from fido2.ctap1 import Ctap1, ApduError
- from binascii import a2b_hex
- import unittest
--import mock
-+try:
-+ import mock
-+except:
-+ from unittest import mock
-
-
- class TestCtap1(unittest.TestCase):
---- fido2-0.3.0/test/test_ctap2.py.orig 2018-04-12 17:10:24.000000000 +0200
-+++ fido2-0.3.0/test/test_ctap2.py 2018-05-20 21:12:17.790214668 +0200
-@@ -37,7 +37,10 @@ from cryptography.hazmat.backends import
- from cryptography.hazmat.primitives.asymmetric import ec
-
- import unittest
--import mock
-+try:
-+ import mock
-+except:
-+ from unittest import mock
-
- _AAGUID = a2b_hex("F8A011F38C0A4D15800617111F9EDC7D")
- _INFO = a2b_hex(
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-fido2.git/commitdiff/59cee599fcf66b572111d635de70394086cc0f33
More information about the pld-cvs-commit
mailing list