Christian Heimes cd03137
# Created by pyp2rpm-3.2.2
Christian Heimes cd03137
%global pypi_name asn1crypto
Christian Heimes cd03137
03e2fb9
%if 0%{?fedora} || 0%{?rhel} > 7
03e2fb9
# Enable python3 build by default
03e2fb9
%bcond_without python3
03e2fb9
%else
03e2fb9
%bcond_with python3
03e2fb9
%endif
03e2fb9
94bedba
%if 0%{?fedora} > 31 || 0%{?rhel} > 7
03e2fb9
# Disable python2 build by default
03e2fb9
%bcond_with python2
03e2fb9
%else
03e2fb9
%bcond_without python2
e4143e5
%endif
e4143e5
e4143e5
%{!?python3_pkgversion:%global python3_pkgversion 3}
e4143e5
Christian Heimes cd03137
Name:           python-%{pypi_name}
caf2e08
Version:        1.2.0
caf2e08
Release:        1%{?dist}
Christian Heimes cd03137
Summary:        Fast Python ASN.1 parser and serializer
Christian Heimes cd03137
Christian Heimes cd03137
License:        MIT
Christian Heimes cd03137
URL:            https://github.com/wbond/asn1crypto
Christian Heimes cd03137
Source0:        https://files.pythonhosted.org/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
Christian Heimes cd03137
BuildArch:      noarch
Christian Heimes f7c7f9c
03e2fb9
%if 0%{?with_python2}
Christian Heimes cd03137
BuildRequires:  python2-devel
e4143e5
BuildRequires:  python2-setuptools
03e2fb9
%endif
e4143e5
%if 0%{?with_python3}
4a1ace6
BuildRequires:  python%{python3_pkgversion}-devel
4a1ace6
BuildRequires:  python%{python3_pkgversion}-setuptools
e4143e5
%endif
Christian Heimes cd03137
Christian Heimes cd03137
%description
Christian Heimes cd03137
Fast ASN.1 parser and serializer with definitions for private keys,
Christian Heimes cd03137
public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8,
Christian Heimes cd03137
PKCS#12, PKCS#5, X.509 and TSP.
Christian Heimes cd03137
03e2fb9
%if 0%{?with_python2}
Christian Heimes cd03137
%package -n     python2-%{pypi_name}
Christian Heimes cd03137
Summary:        %{summary}
Christian Heimes cd03137
%{?python_provide:%python_provide python2-%{pypi_name}}
Christian Heimes cd03137
Christian Heimes cd03137
%description -n python2-%{pypi_name}
Christian Heimes cd03137
Fast ASN.1 parser and serializer with definitions for private keys,
Christian Heimes cd03137
public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8,
Christian Heimes cd03137
PKCS#12, PKCS#5, X.509 and TSP.
03e2fb9
%endif
Christian Heimes cd03137
e4143e5
%if 0%{?with_python3}
4a1ace6
%package -n     python%{python3_pkgversion}-%{pypi_name}
Christian Heimes cd03137
Summary:        %{summary}
4a1ace6
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
Christian Heimes cd03137
4a1ace6
%description -n python%{python3_pkgversion}-%{pypi_name}
Christian Heimes cd03137
Fast ASN.1 parser and serializer with definitions for private keys,
Christian Heimes cd03137
public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8,
Christian Heimes cd03137
PKCS#12, PKCS#5, X.509 and TSP.
e4143e5
%endif
Christian Heimes cd03137
Christian Heimes cd03137
%prep
Christian Heimes cd03137
%autosetup -n %{pypi_name}-%{version}
Christian Heimes cd03137
# Remove bundled egg-info
Christian Heimes cd03137
rm -rf %{pypi_name}.egg-info
Christian Heimes cd03137
Christian Heimes cd03137
%build
03e2fb9
%if 0%{?with_python2}
Christian Heimes cd03137
%py2_build
03e2fb9
%endif
e4143e5
%if 0%{?with_python3}
Christian Heimes cd03137
%py3_build
e4143e5
%endif
Christian Heimes cd03137
Christian Heimes cd03137
%install
03e2fb9
%if 0%{?with_python2}
03e2fb9
%py2_install
03e2fb9
%endif
e4143e5
%if 0%{?with_python3}
Christian Heimes cd03137
%py3_install
e4143e5
%endif
Christian Heimes cd03137
Christian Heimes cd03137
Christian Heimes cd03137
%check
Christian Heimes cd03137
# asn1crypto source distribution doesn't come with tests
Christian Heimes f7c7f9c
# {__python2} setup.py test
e4143e5
%if 0%{?with_python3}
Christian Heimes f7c7f9c
# {__python3} setup.py test
e4143e5
%endif
Christian Heimes cd03137
03e2fb9
%if 0%{?with_python2}
Christian Heimes cd03137
%files -n python2-%{pypi_name}
Christian Heimes f7c7f9c
%doc
Christian Heimes cd03137
%{python2_sitelib}/%{pypi_name}
Christian Heimes cd03137
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
03e2fb9
%endif
Christian Heimes cd03137
e4143e5
%if 0%{?with_python3}
4a1ace6
%files -n python%{python3_pkgversion}-%{pypi_name}
Christian Heimes f7c7f9c
%doc
Christian Heimes cd03137
%{python3_sitelib}/%{pypi_name}
Christian Heimes cd03137
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
e4143e5
%endif
Christian Heimes cd03137
Christian Heimes cd03137
%changelog
caf2e08
* Mon Nov 18 2019 Lumír Balhar <lbalhar@redhat.com> - 1.2.0-1
caf2e08
- New upstream version 1.2.0 (#1758089)
caf2e08
94bedba
* Sat Oct 12 2019 Christian Heimes <cheimes@redhat.com> - 0.24.0-10
94bedba
- Drop Python 2 package
94bedba
- Resolves: rhbz#1761084
94bedba
97a34b5
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.24.0-9
97a34b5
- Rebuilt for Python 3.8.0rc1 (#1748018)
97a34b5
245ada2
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 0.24.0-8
245ada2
- Rebuilt for Python 3.8
245ada2
08c1b34
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.24.0-7
08c1b34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
08c1b34
1cefc72
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.24.0-6
1cefc72
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
1cefc72
8f61a63
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.24.0-5
8f61a63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
8f61a63
a4d9f2b
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 0.24.0-4
a4d9f2b
- Rebuilt for Python 3.7
a4d9f2b
03e2fb9
* Tue Jun 19 2018 Christian Heimes <cheimes@redhat.com> - 0.24.0-3
03e2fb9
- Build Python 2 package conditionally
03e2fb9
3b8bf97
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 0.24.0-2
3b8bf97
- Rebuilt for Python 3.7
3b8bf97
d218f97
* Wed Mar 21 2018 Christian Heimes <cheimes@redhat.com> - 0.24.0-1
d218f97
- New upstream release 0.24.0
d218f97
13731ea
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.0-2
13731ea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
13731ea
e4143e5
* Thu Oct 12 2017 Christian Heimes <cheimes@redhat.com> - 0.23-1
e4143e5
- New upstream release 0.23.0
e4143e5
e4143e5
* Fri Aug 04 2017 Christian Heimes <cheimes@redhat.com> - 0.22.0-5
e4143e5
- Use python2-setuptools, add with_python3
e4143e5
4a1ace6
* Thu Aug 03 2017 Christian Heimes <cheimes@redhat.com> - 0.22.0-4
4a1ace6
- Modernize spec
4a1ace6
4b1de03
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.22.0-3
4b1de03
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
4b1de03
Christian Heimes f7c7f9c
* Tue Jun 27 2017 Christian Heimes <cheimes@redhat.com> - 0.22.0-2
Christian Heimes f7c7f9c
- Address rpmlint issues
Christian Heimes f7c7f9c
Christian Heimes cd03137
* Tue Jun 27 2017 Christian Heimes <cheimes@redhat.com> - 0.22.0-1
Christian Heimes cd03137
- Initial package.