d6e2d7
%global pypi_name certifi
d6e2d7
d6e2d7
Name:           python-%{pypi_name}
8da459
Version:        2018.10.15
7e8a09
Release:        4%{?dist}
d6e2d7
Summary:        Python package for providing Mozilla's CA Bundle
d6e2d7
d6e2d7
License:        MPLv2.0
d6e2d7
#https://www.mozilla.org/MPL/2.0/
d6e2d7
URL:            http://certifi.io/en/latest/
b60202
Source0:        %pypi_source
bc517a
Patch1:         certifi-2018.10.15-use-system-cert.patch
d6e2d7
d6e2d7
BuildArch:      noarch
2f45d4
2f45d4
# Require the system certificate bundle (/etc/pki/tls/certs/ca-bundle.crt)
2f45d4
BuildRequires: ca-certificates
d6e2d7
d6e2d7
%description
fa4178
Certifi is a carefully curated collection of Root Certificates for validating
fa4178
the trustworthiness of SSL certificates while verifying the identity of TLS
fa4178
hosts. It has been extracted from the Requests project.
d6e2d7
fa4178
Please note that this Fedora package does not actually include a certificate
fa4178
collection at all. It reads the system shared certificate trust collection
fa4178
instead. For more details on this system, see the ca-certificates package.
07e3b0
07e3b0
%package -n python2-%{pypi_name}
c667ea
Summary:        %{summary}
07e3b0
%{?python_provide:%python_provide python2-%{pypi_name}}
0fd682
BuildRequires:  python2-devel
0fd682
BuildRequires:  python%{?fedora:2}-setuptools
8a62c6
Requires:       ca-certificates
07e3b0
07e3b0
%description -n python2-%{pypi_name}
fa4178
Certifi is a carefully curated collection of Root Certificates for validating
fa4178
the trustworthiness of SSL certificates while verifying the identity of TLS
fa4178
hosts. It has been extracted from the Requests project.
07e3b0
fa4178
Please note that this Fedora package does not actually include a certificate
fa4178
collection at all. It reads the system shared certificate trust collection
fa4178
instead. For more details on this system, see the ca-certificates package.
fa4178
fa4178
This package provides the Python 2 certifi library.
07e3b0
07e3b0
0fd682
%package -n python%{python3_pkgversion}-%{pypi_name}
c667ea
Summary:        %{summary}
0fd682
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
0fd682
BuildRequires:  python%{python3_pkgversion}-devel
0fd682
BuildRequires:  python%{python3_pkgversion}-setuptools
8a62c6
Requires:       ca-certificates
d6e2d7
0fd682
%description -n python%{python3_pkgversion}-%{pypi_name}
fa4178
Certifi is a carefully curated collection of Root Certificates for validating
fa4178
the trustworthiness of SSL certificates while verifying the identity of TLS
fa4178
hosts. It has been extracted from the Requests project.
fa4178
fa4178
Please note that this Fedora package does not actually include a certificate
fa4178
collection at all. It reads the system shared certificate trust collection
fa4178
instead. For more details on this system, see the ca-certificates package.
d6e2d7
fa4178
This package provides the Python 3 certifi library.
07e3b0
d6e2d7
d6e2d7
%prep
f92548
%setup -n %{pypi_name}-%{version}
d6e2d7
# Remove bundled egg-info
d6e2d7
rm -rf %{pypi_name}.egg-info
d6e2d7
rm -rf certifi/*.pem
39b6e0
%patch1 -p1
d6e2d7
d6e2d7
#drop shebangs from python_sitearch
d6e2d7
find %{_builddir}/%{pypi_name}-%{version} -name '*.py' \
d6e2d7
    -exec sed -i '1{\@^#!/usr/bin/env python@d}' {} \;
d6e2d7
d6e2d7
%build
07e3b0
%py2_build
07e3b0
%py3_build
d6e2d7
d6e2d7
%install
07e3b0
%py2_install
07e3b0
%py3_install
d6e2d7
07e3b0
%files -n python2-%{pypi_name}
f17493
%license LICENSE
d6e2d7
%doc README.rst
d6e2d7
%{python2_sitelib}/%{pypi_name}
d6e2d7
%{python2_sitelib}/%{pypi_name}-*-py?.?.egg-info
d6e2d7
0fd682
%files -n python%{python3_pkgversion}-%{pypi_name}
f17493
%license LICENSE
d6e2d7
%doc README.rst
d6e2d7
%{python3_sitelib}/%{pypi_name}
d6e2d7
%{python3_sitelib}/%{pypi_name}-*-py?.?.egg-info
d6e2d7
d6e2d7
%changelog
7e8a09
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2018.10.15-4
7e8a09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
7e8a09
067aa4
* Thu Dec 13 2018  <jdennis@redhat.com> - 2018.10.15-3
067aa4
- Resolves: rhbz#1659132 Incorrect location used for system certs
067aa4
  where() now returns /etc/pki/tls/certs/ca-bundle.crt
067aa4
b60202
* Fri Nov 02 2018 William Moreno Reyes <williamjmorenor@gmail.com> - 2018.10.15-2
b60202
- Update spec to use %%pypi_source macro
b60202
8da459
* Tue Oct 23 2018 William Moreno Reyes <williamjmorenor@gmail.com> - 2018.10.15-1
8da459
- Update to release: 2018.10.15
bc517a
- Update patch to point to system certificates
8da459
b7e952
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2016.9.26-9
b7e952
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
b7e952
6e5b5f
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2016.9.26-8
6e5b5f
- Rebuilt for Python 3.7
6e5b5f
ad6b1d
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2016.9.26-7
ad6b1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ad6b1d
39b6e0
* Sat Oct 14 2017 williamjmorenor@gmail.com - 2016.9.26-6
39b6e0
- Fix path of .pem file
39b6e0
  Thanks to @carlwgeorge
39b6e0
  See: https://src.fedoraproject.org/rpms/python-certifi/pull-request/1
39b6e0
f92548
* Thu Oct 12 2017 williamjmorenor@gmail.com - 2016.9.26-5
f92548
- If fedora path to use current ca-certificates
684ba6
- If epel7 follow proper file to .pem file
f92548
0fd682
* Thu Oct 12 2017 Carl George <carl@george.computer> - 2016.9.26-4
0fd682
- EPEL compatibility
f17493
- Include license
8a62c6
- Move ca-certificates requirement to subpackages
0fd682
62222c
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2016.9.26-3
62222c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
62222c
22fa7f
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2016.9.26-2
22fa7f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
22fa7f
fa4178
* Wed Dec 28 2016 Adam Williamson <awilliam@redhat.com> - 2016.9.26-1
fa4178
- New release 2016.9.26
fa4178
7eb61d
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 2015.04.28-10
7eb61d
- Rebuild for Python 3.6
7eb61d
ddeb8e
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2015.04.28-9
ddeb8e
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
ddeb8e
fc43a8
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2015.04.28-8
fc43a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
fc43a8
d4c3b6
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2015.04.28-7
d4c3b6
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
d4c3b6
07e3b0
* Wed Sep 16 2015 William Moreno Reyes <williamjmorenor at="" gmail.com=""> - 2015.04.28-6
07e3b0
- Update python macros
07e3b0
- Include subpackages for Python2 and Python3
07e3b0
55558b
* Thu Jul 09 2015 William Moreno Reyes <williamjmorenor at="" gmail.com=""> 
55558b
- 2015.04.28-5
55558b
- rebuilt
55558b
d6e2d7
* Wed Jul 08 2015 William Moreno Reyes  <williamjmorenor at="" gmail.com=""> 
d6e2d7
- 2015.04.28-4
d6e2d7
- Initial Import of #1232433
d6e2d7
d6e2d7
* Mon Jul 06 2015 William Moreno Reyes <williamjmorenor at="" gmail.com=""> 
d6e2d7
- 2015.04.28-3
d6e2d7
- Remove shebang
d6e2d7
d6e2d7
* Thu Jul 02 2015 William Moreno Reyes <williamjmorenor at="" gmail.com=""> 
d6e2d7
- 2015.04.28-2
d6e2d7
- Remove bundle cacert.pem
d6e2d7
d6e2d7
* Tue Jun 16 2015 William Moreno Reyes <williamjmorenor at="" gmail.com=""> 
d6e2d7
- 2015.04.28-1
d6e2d7
- Initial packaging