Drop python2 support

This commit is contained in:
wangxiyuan 2021-07-22 08:12:24 +00:00 committed by sean-lau
parent 9648c4d666
commit f64f4aa066
2 changed files with 13 additions and 27 deletions

View File

@ -0,0 +1,9 @@
diff -urN service-identity-16.0.0/setup.cfg service-identity-16.0.0-new/setup.cfg
--- service-identity-16.0.0/setup.cfg 2016-02-18 19:26:33.000000000 +0800
+++ service-identity-16.0.0-new/setup.cfg 2021-07-22 18:08:01.670140214 +0800
@@ -1,4 +1,4 @@
-[pytest]
+[tool:pytest]
minversion = 2.8.2
strict = true
addopts = -ra

View File

@ -1,10 +1,11 @@
Name: python-service-identity Name: python-service-identity
Version: 16.0.0 Version: 16.0.0
Release: 12 Release: 13
Summary: Service Identity Verification for pyOpenSSL & cryptography Summary: Service Identity Verification for pyOpenSSL & cryptography
License: MIT License: MIT
URL: https://github.com/pyca/service_identity URL: https://github.com/pyca/service_identity
Source0: https://github.com/pyca/service_identity/archive/%{version}/service-identity-%{version}.tar.gz Source0: https://github.com/pyca/service_identity/archive/%{version}/service-identity-%{version}.tar.gz
Patch0: fix-pytest-error-py3.patch
BuildArch: noarch BuildArch: noarch
%description %description
@ -15,24 +16,6 @@ In the simplest case, this means host name verification. However,
service_identity implements RFC 6125 fully and plans to add other service_identity implements RFC 6125 fully and plans to add other
relevant RFCs too. relevant RFCs too.
%package -n python2-service-identity
Summary: Service Identity Verification for pyOpenSSL & cryptography
%{?python_provide:%python_provide python2-service-identity}
BuildRequires: python2-pytest python2-attrs python2-pyasn1 python2-pyasn1-modules
BuildRequires: python2-pyOpenSSL python2-idna python2-setuptools python2-devel
Requires: python2-attrs python2-pyasn1 python2-pyasn1-modules python2-pyOpenSSL
Recommends: python2-idna
%description -n python2-service-identity
Service_identity aspires to give you all the tools you need for
verifying whether a certificate is valid for the intended purposes.
In the simplest case, this means host name verification. However,
service_identity implements RFC 6125 fully and plans to add other
relevant RFCs too.
Python 2 version.
%package -n python3-service-identity %package -n python3-service-identity
Summary: Service Identity Verification for pyOpenSSL & cryptography Summary: Service Identity Verification for pyOpenSSL & cryptography
%{?python_provide:%python_provide python3-service-identity} %{?python_provide:%python_provide python3-service-identity}
@ -54,27 +37,21 @@ Python 3 version.
%autosetup -n service-identity-%{version} %autosetup -n service-identity-%{version}
%build %build
%py2_build
%py3_build %py3_build
%install %install
%py2_install
%py3_install %py3_install
%check %check
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} -v
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -v PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -v
%files -n python2-service-identity
%license LICENSE
%doc README.rst
%{python2_sitelib}/{service_identity-*.egg-info/,service_identity/}
%files -n python3-service-identity %files -n python3-service-identity
%license LICENSE %license LICENSE
%doc README.rst %doc README.rst
%{python3_sitelib}/{service_identity-*.egg-info/,service_identity/} %{python3_sitelib}/{service_identity-*.egg-info/,service_identity/}
%changelog %changelog
* Thu Jul 22 2021 wangxiyuan <wangxiyuan1007@gmail.com> - 16.0.0-13
- Drop python2 support
* Thu Feb 27 2020 duyeyu <duyeyu@huawei.com> - 16.0.0-12 * Thu Feb 27 2020 duyeyu <duyeyu@huawei.com> - 16.0.0-12
- Initial package. - Initial package.