2015-04-22 15:55:12 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-certifi
|
|
|
|
#
|
2020-01-24 16:17:43 +01:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2015-04-22 15:55:12 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-02-12 09:00:17 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-06-13 23:22:31 +02:00
|
|
|
#
|
2015-04-22 15:55:12 +02:00
|
|
|
|
|
|
|
|
2017-04-12 21:05:04 +02:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2015-04-22 15:55:12 +02:00
|
|
|
Name: python-certifi
|
2020-08-16 04:19:53 +02:00
|
|
|
Version: 2020.6.20
|
2015-04-22 15:55:12 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Python package for providing Mozilla's CA Bundle
|
2016-06-13 23:22:31 +02:00
|
|
|
License: MPL-2.0
|
2015-04-22 15:55:12 +02:00
|
|
|
Group: Development/Languages/Python
|
2019-09-20 14:46:08 +02:00
|
|
|
URL: https://github.com/certifi/python-certifi
|
2017-04-12 21:05:04 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/c/certifi/certifi-%{version}.tar.gz
|
2019-01-14 09:43:18 +01:00
|
|
|
# PATCH-FIX-SUSE -- prefer SUSE certificates (only for use on SUSE platforms)
|
2015-09-26 12:57:24 +02:00
|
|
|
Patch0: python-certifi-shipped-requests-cabundle.patch
|
2017-04-12 21:05:04 +02:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2015-09-26 12:57:24 +02:00
|
|
|
BuildRequires: ca-certificates
|
2017-04-12 21:05:04 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2015-09-26 12:57:24 +02:00
|
|
|
Requires: ca-certificates
|
2017-06-11 22:38:08 +02:00
|
|
|
Requires: ca-certificates-mozilla
|
2015-04-22 15:55:12 +02:00
|
|
|
BuildArch: noarch
|
2017-04-12 21:05:04 +02:00
|
|
|
%python_subpackages
|
2015-04-22 15:55:12 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
This installable Python package contains a CA Bundle that you can reference
|
|
|
|
in your Python code. This is useful for verifying HTTP requests, for example.
|
|
|
|
|
|
|
|
This is the same CA Bundle which ships with the Requests codebase, and is
|
|
|
|
derived from Mozilla Firefox's canonical set.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n certifi-%{version}
|
2019-01-14 09:43:18 +01:00
|
|
|
%if 0%{?suse_version}
|
2015-04-22 15:55:12 +02:00
|
|
|
%patch0 -p1
|
2019-01-14 09:43:18 +01:00
|
|
|
%endif
|
2015-04-22 15:55:12 +02:00
|
|
|
|
|
|
|
%build
|
2017-04-12 21:05:04 +02:00
|
|
|
%python_build
|
2015-04-22 15:55:12 +02:00
|
|
|
|
|
|
|
%install
|
2017-04-12 21:05:04 +02:00
|
|
|
%python_install
|
|
|
|
|
2017-07-10 21:27:11 +02:00
|
|
|
%{python_expand chmod +x %{buildroot}%{$python_sitelib}/certifi/core.py
|
2018-04-17 13:33:28 +02:00
|
|
|
sed -i "s|#!%{_bindir}/env python|#!%__$python|" %{buildroot}/%{$python_sitelib}/certifi/core.py
|
2019-01-14 09:43:18 +01:00
|
|
|
%if 0%{?suse_version}
|
2017-07-10 21:27:11 +02:00
|
|
|
rm %{buildroot}%{$python_sitelib}/certifi/cacert.pem
|
2019-01-14 09:43:18 +01:00
|
|
|
%endif
|
2017-04-12 21:05:04 +02:00
|
|
|
}
|
2015-04-22 15:55:12 +02:00
|
|
|
|
2019-09-20 14:45:29 +02:00
|
|
|
%python_expand $python -m compileall %{buildroot}%{$python_sitelib}/certifi/
|
|
|
|
%python_expand $python -O -m compileall %{buildroot}%{$python_sitelib}/certifi/
|
2017-07-10 21:27:11 +02:00
|
|
|
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
2019-07-24 11:47:21 +02:00
|
|
|
%check
|
|
|
|
# no upstream tests found
|
|
|
|
|
2017-04-12 21:05:04 +02:00
|
|
|
%files %{python_files}
|
2018-04-17 13:33:28 +02:00
|
|
|
%license LICENSE
|
|
|
|
%doc README.rst
|
2017-04-12 21:05:04 +02:00
|
|
|
%{python_sitelib}/certifi/
|
2017-07-10 21:27:11 +02:00
|
|
|
%{python_sitelib}/certifi-%{version}-py*.egg-info
|
2015-04-22 15:55:12 +02:00
|
|
|
|
|
|
|
%changelog
|