Blame SPECS/python-asn1crypto.spec

103e57
# Created by pyp2rpm-3.2.2
103e57
%global pypi_name asn1crypto
103e57
103e57
%if 0%{?fedora} || 0%{?rhel} > 7
103e57
# Enable python3 build by default
103e57
%bcond_without python3
103e57
%else
103e57
%bcond_with python3
103e57
%endif
103e57
103e57
%if 0%{?fedora} > 31 || 0%{?rhel} > 7
103e57
# Disable python2 build by default
103e57
%bcond_with python2
103e57
%else
103e57
%bcond_without python2
103e57
%endif
103e57
103e57
%{!?python3_pkgversion:%global python3_pkgversion 3}
103e57
103e57
Name:           python-%{pypi_name}
103e57
Version:        1.2.0
103e57
Release:        3%{?dist}
103e57
Summary:        Fast Python ASN.1 parser and serializer
103e57
103e57
License:        MIT
103e57
URL:            https://github.com/wbond/asn1crypto
103e57
Source0:        https://files.pythonhosted.org/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
103e57
BuildArch:      noarch
103e57
# Exclude i686 arch. Due to a modularity issue it's being added to the
103e57
# x86_64 compose of CRB, but we don't want to ship it at all.
103e57
# See: https://projects.engineering.redhat.com/browse/RCM-72605
103e57
ExcludeArch:    i686
103e57
103e57
%if 0%{?with_python2}
103e57
BuildRequires:  python2-devel
103e57
BuildRequires:  python2-setuptools
103e57
%endif
103e57
%if 0%{?with_python3}
103e57
BuildRequires:  python%{python3_pkgversion}-devel
103e57
BuildRequires:  python%{python3_pkgversion}-setuptools
103e57
BuildRequires:  python%{python3_pkgversion}-rpm-macros
103e57
%endif
103e57
103e57
%description
103e57
Fast ASN.1 parser and serializer with definitions for private keys,
103e57
public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8,
103e57
PKCS#12, PKCS#5, X.509 and TSP.
103e57
103e57
%if 0%{?with_python2}
103e57
%package -n     python2-%{pypi_name}
103e57
Summary:        %{summary}
103e57
%{?python_provide:%python_provide python2-%{pypi_name}}
103e57
103e57
%description -n python2-%{pypi_name}
103e57
Fast ASN.1 parser and serializer with definitions for private keys,
103e57
public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8,
103e57
PKCS#12, PKCS#5, X.509 and TSP.
103e57
%endif
103e57
103e57
%if 0%{?with_python3}
103e57
%package -n     python%{python3_pkgversion}-%{pypi_name}
103e57
Summary:        %{summary}
103e57
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
103e57
103e57
%description -n python%{python3_pkgversion}-%{pypi_name}
103e57
Fast ASN.1 parser and serializer with definitions for private keys,
103e57
public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8,
103e57
PKCS#12, PKCS#5, X.509 and TSP.
103e57
%endif
103e57
103e57
%prep
103e57
%autosetup -n %{pypi_name}-%{version}
103e57
# Remove bundled egg-info
103e57
rm -rf %{pypi_name}.egg-info
103e57
103e57
%build
103e57
%if 0%{?with_python2}
103e57
%py2_build
103e57
%endif
103e57
%if 0%{?with_python3}
103e57
%py3_build
103e57
%endif
103e57
103e57
%install
103e57
%if 0%{?with_python2}
103e57
%py2_install
103e57
%endif
103e57
%if 0%{?with_python3}
103e57
%py3_install
103e57
%endif
103e57
103e57
103e57
%check
103e57
# asn1crypto source distribution doesn't come with tests
103e57
# {__python2} setup.py test
103e57
%if 0%{?with_python3}
103e57
# {__python3} setup.py test
103e57
%endif
103e57
103e57
%if 0%{?with_python2}
103e57
%files -n python2-%{pypi_name}
103e57
%doc
103e57
%{python2_sitelib}/%{pypi_name}
103e57
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
103e57
%endif
103e57
103e57
%if 0%{?with_python3}
103e57
%files -n python%{python3_pkgversion}-%{pypi_name}
103e57
%doc
103e57
%{python3_sitelib}/%{pypi_name}
103e57
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
103e57
%endif
103e57
103e57
%changelog
103e57
* Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 1.2.0-3
103e57
- Exclude unsupported i686 arch
103e57
103e57
* Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 1.2.0-2
103e57
- Adjusted for Python 3.8 module in RHEL 8
103e57
103e57
* Mon Nov 18 2019 Lumír Balhar <lbalhar@redhat.com> - 1.2.0-1
103e57
- New upstream version 1.2.0 (#1758089)
103e57
103e57
* Sat Oct 12 2019 Christian Heimes <cheimes@redhat.com> - 0.24.0-10
103e57
- Drop Python 2 package
103e57
- Resolves: rhbz#1761084
103e57
103e57
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.24.0-9
103e57
- Rebuilt for Python 3.8.0rc1 (#1748018)
103e57
103e57
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 0.24.0-8
103e57
- Rebuilt for Python 3.8
103e57
103e57
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.24.0-7
103e57
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
103e57
103e57
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.24.0-6
103e57
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
103e57
103e57
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.24.0-5
103e57
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
103e57
103e57
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 0.24.0-4
103e57
- Rebuilt for Python 3.7
103e57
103e57
* Tue Jun 19 2018 Christian Heimes <cheimes@redhat.com> - 0.24.0-3
103e57
- Build Python 2 package conditionally
103e57
103e57
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 0.24.0-2
103e57
- Rebuilt for Python 3.7
103e57
103e57
* Wed Mar 21 2018 Christian Heimes <cheimes@redhat.com> - 0.24.0-1
103e57
- New upstream release 0.24.0
103e57
103e57
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.0-2
103e57
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
103e57
103e57
* Thu Oct 12 2017 Christian Heimes <cheimes@redhat.com> - 0.23-1
103e57
- New upstream release 0.23.0
103e57
103e57
* Fri Aug 04 2017 Christian Heimes <cheimes@redhat.com> - 0.22.0-5
103e57
- Use python2-setuptools, add with_python3
103e57
103e57
* Thu Aug 03 2017 Christian Heimes <cheimes@redhat.com> - 0.22.0-4
103e57
- Modernize spec
103e57
103e57
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.22.0-3
103e57
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
103e57
103e57
* Tue Jun 27 2017 Christian Heimes <cheimes@redhat.com> - 0.22.0-2
103e57
- Address rpmlint issues
103e57
103e57
* Tue Jun 27 2017 Christian Heimes <cheimes@redhat.com> - 0.22.0-1
103e57
- Initial package.