File python-oss2.spec of Package python-oss2
#
# spec file for package python-oss2
#
# Copyright (c) 2023 SUSE LLC
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-oss2
Version: 2.18.4
Release: 0
Summary: Aliyun OSS (Object Storage Service) SDK
License: MIT
URL: http://oss.aliyun.com
Source: https://files.pythonhosted.org/packages/source/o/oss2/oss2-%{version}.tar.gz
Patch0: 0001_Dont-use-mock.patch
BuildRequires: python-rpm-macros
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
# SECTION test requirements
BuildRequires: %{python_module aliyun-python-sdk-core >= 2.13.12}
BuildRequires: %{python_module aliyun-python-sdk-kms >= 2.4.1}
BuildRequires: %{python_module aliyun-python-sdk-sts}
BuildRequires: %{python_module crcmod >= 1.7}
BuildRequires: %{python_module nose2}
BuildRequires: %{python_module pycryptodome >= 3.4.7}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module six}
# /SECTION
BuildRequires: fdupes
Requires: python-aliyun-python-sdk-core >= 2.13.12
Requires: python-aliyun-python-sdk-kms >= 2.4.1
Requires: python-crcmod >= 1.7
Requires: python-pycryptodome >= 3.4.7
Requires: python-requests
Requires: python-six
%if 0%{?sle_version} >= 150400
Obsoletes: python3-oss2 < 2.18.4
%endif
BuildArch: noarch
%python_subpackages
%description
Aliyun OSS (Object Storage Service) SDK
%prep
%setup -q -n oss2-%{version}
%patch -P0 -p1
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_exec -m nose2 -v unittests
%files %{python_files}
%doc CHANGELOG.rst README.rst
%license LICENSE
%{python_sitelib}/
%{python_sitelib}/oss2-%{version}.dist-info
%changelog