File python-oss2.spec of Package python-oss2
#
# spec file for package python-oss2
#
# Copyright (c) 2020 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 http://bugs.opensuse.org/
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-oss2
Version: 2.13.0
Release: 0
License: MIT
Summary: Aliyun OSS (Object Storage Service) SDK
Url: https://github.com/aliyun/aliyun-oss-python-sdk
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/o/oss2/oss2-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module setuptools}
# SECTION test requirements
BuildRequires: %{python_module aliyun-python-sdk-core}
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 pycryptodome >= 3.4.7}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module requests}
# /SECTION
BuildRequires: fdupes
Requires: python-aliyun-python-sdk-core
Requires: python-aliyun-python-sdk-kms >= 2.4.1
Requires: python-crcmod >= 1.7
Requires: python-pycryptodome >= 3.4.7
Requires: python-requests
BuildArch: noarch
%python_subpackages
%description
Aliyun OSS (Object Storage Service) SDK.
%prep
%setup -q -n oss2-%{version}
# 'aliyun-python-sdk-core-v3>=2.5.5',
sed -i 's/aliyun-python-sdk-core-v3/aliyun-python-sdk-core/' setup.py
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_exec -m nose -v unittests
%files %{python_files}
%doc CHANGELOG.rst README.rst
%license LICENSE
%{python_sitelib}/*
%changelog