From 0fd682ce38ca53476d4fcc9bc43157561e5d3aff Mon Sep 17 00:00:00 2001 From: Carl George Date: Oct 12 2017 02:23:46 +0000 Subject: [PATCH 1/4] EPEL compatibility --- diff --git a/python-certifi.spec b/python-certifi.spec index 1b310db..bfb1225 100644 --- a/python-certifi.spec +++ b/python-certifi.spec @@ -2,7 +2,7 @@ Name: python-%{pypi_name} Version: 2016.9.26 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python package for providing Mozilla's CA Bundle License: MPLv2.0 @@ -13,11 +13,6 @@ Patch1: certifi-2016.9.26-remove-bundle-cert.patch BuildArch: noarch -BuildRequires: python2-devel -BuildRequires: python-setuptools -BuildRequires: python3-setuptools -BuildRequires: python3-devel -Requires: python3 Requires: ca-certificates %description @@ -32,6 +27,8 @@ instead. For more details on this system, see the ca-certificates package. %package -n python2-%{pypi_name} Summary: %{sum} %{?python_provide:%python_provide python2-%{pypi_name}} +BuildRequires: python2-devel +BuildRequires: python%{?fedora:2}-setuptools %description -n python2-%{pypi_name} Certifi is a carefully curated collection of Root Certificates for validating @@ -45,12 +42,14 @@ instead. For more details on this system, see the ca-certificates package. This package provides the Python 2 certifi library. -%package -n python3-%{pypi_name} +%package -n python%{python3_pkgversion}-%{pypi_name} Summary: Python 3 package for providing Mozilla's CA Bundle Group: Development/Libraries -%{?python_provide:%python_provide python3-%{pypi_name}} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools -%description -n python3-%{pypi_name} +%description -n python%{python3_pkgversion}-%{pypi_name} Certifi is a carefully curated collection of Root Certificates for validating the trustworthiness of SSL certificates while verifying the identity of TLS hosts. It has been extracted from the Requests project. @@ -86,12 +85,15 @@ find %{_builddir}/%{pypi_name}-%{version} -name '*.py' \ %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/%{pypi_name}-*-py?.?.egg-info -%files -n python3-%{pypi_name} +%files -n python%{python3_pkgversion}-%{pypi_name} %doc README.rst %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-*-py?.?.egg-info %changelog +* Thu Oct 12 2017 Carl George - 2016.9.26-4 +- EPEL compatibility + * Thu Jul 27 2017 Fedora Release Engineering - 2016.9.26-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From f17493b88b03907855ad4970e3465c617f8a4f6d Mon Sep 17 00:00:00 2001 From: Carl George Date: Oct 12 2017 02:26:23 +0000 Subject: [PATCH 2/4] Include license --- diff --git a/python-certifi.spec b/python-certifi.spec index bfb1225..4e6fdbb 100644 --- a/python-certifi.spec +++ b/python-certifi.spec @@ -81,11 +81,13 @@ find %{_builddir}/%{pypi_name}-%{version} -name '*.py' \ %py3_install %files -n python2-%{pypi_name} +%license LICENSE %doc README.rst %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/%{pypi_name}-*-py?.?.egg-info %files -n python%{python3_pkgversion}-%{pypi_name} +%license LICENSE %doc README.rst %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-*-py?.?.egg-info @@ -93,6 +95,7 @@ find %{_builddir}/%{pypi_name}-%{version} -name '*.py' \ %changelog * Thu Oct 12 2017 Carl George - 2016.9.26-4 - EPEL compatibility +- Include license * Thu Jul 27 2017 Fedora Release Engineering - 2016.9.26-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 8a62c62a9aa0be927950c93fe6ffaee3c6acd7f0 Mon Sep 17 00:00:00 2001 From: Carl George Date: Oct 12 2017 02:37:01 +0000 Subject: [PATCH 3/4] - Move ca-certificates requirement to subpackages --- diff --git a/python-certifi.spec b/python-certifi.spec index 4e6fdbb..20c4cd0 100644 --- a/python-certifi.spec +++ b/python-certifi.spec @@ -12,8 +12,6 @@ Source0: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{ Patch1: certifi-2016.9.26-remove-bundle-cert.patch BuildArch: noarch - -Requires: ca-certificates %description Certifi is a carefully curated collection of Root Certificates for validating @@ -29,6 +27,7 @@ Summary: %{sum} %{?python_provide:%python_provide python2-%{pypi_name}} BuildRequires: python2-devel BuildRequires: python%{?fedora:2}-setuptools +Requires: ca-certificates %description -n python2-%{pypi_name} Certifi is a carefully curated collection of Root Certificates for validating @@ -48,6 +47,7 @@ Group: Development/Libraries %{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools +Requires: ca-certificates %description -n python%{python3_pkgversion}-%{pypi_name} Certifi is a carefully curated collection of Root Certificates for validating @@ -96,6 +96,7 @@ find %{_builddir}/%{pypi_name}-%{version} -name '*.py' \ * Thu Oct 12 2017 Carl George - 2016.9.26-4 - EPEL compatibility - Include license +- Move ca-certificates requirement to subpackages * Thu Jul 27 2017 Fedora Release Engineering - 2016.9.26-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From c667ea800172527e8be095099614712f6309c023 Mon Sep 17 00:00:00 2001 From: Carl George Date: Oct 12 2017 02:37:10 +0000 Subject: [PATCH 4/4] cleanup --- diff --git a/python-certifi.spec b/python-certifi.spec index 20c4cd0..4649fe2 100644 --- a/python-certifi.spec +++ b/python-certifi.spec @@ -23,7 +23,7 @@ collection at all. It reads the system shared certificate trust collection instead. For more details on this system, see the ca-certificates package. %package -n python2-%{pypi_name} -Summary: %{sum} +Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} BuildRequires: python2-devel BuildRequires: python%{?fedora:2}-setuptools @@ -42,8 +42,7 @@ This package provides the Python 2 certifi library. %package -n python%{python3_pkgversion}-%{pypi_name} -Summary: Python 3 package for providing Mozilla's CA Bundle -Group: Development/Libraries +Summary: %{summary} %{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools @@ -62,11 +61,10 @@ This package provides the Python 3 certifi library. %prep -%setup -q -n %{pypi_name}-%{version} +%autosetup -n %{pypi_name}-%{version} -p 1 # Remove bundled egg-info rm -rf %{pypi_name}.egg-info rm -rf certifi/*.pem -%patch1 -p1 #drop shebangs from python_sitearch find %{_builddir}/%{pypi_name}-%{version} -name '*.py' \