File python-oci-cli.spec of Package python-oci-cli

# Created by pyp2rpm-3.3.7
%global pypi_name oci-cli
%global pypi_version 3.4.0

Name:           python-%{pypi_name}
Version:        %{pypi_version}
Release:        1%{?dist}
Summary:        Oracle Cloud Infrastructure CLI

License:        Universal Permissive License 1.0 or Apache License 2.0
URL:            https://docs.cloud.oracle.com/iaas/Content/API/Concepts/cliconcepts.htm
Source0:        https://github.com/oracle/%{pypi_name}/archive/v%{pypi_version}/%{pypi_name}-%{pypi_version}.tar.gz
Patch0:         python-oci-cli-deps-versions.patch
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3dist(arrow) >= 1
BuildRequires:  python3dist(certifi)
BuildRequires:  python3dist(click) >= 7.1.2
BuildRequires:  (python3dist(cryptography) >= 3.2.1 with python3dist(cryptography) <= 3.4.7)
BuildRequires:  python3dist(cx-oracle) >= 7
BuildRequires:  python3dist(jmespath) = 0.10
BuildRequires:  python3dist(oci) = 2.53
BuildRequires:  python3dist(pyopenssl) >= 19.1
BuildRequires:  (python3dist(python-dateutil) >= 2.5.3 with python3dist(python-dateutil) < 3)
BuildRequires:  python3dist(pytz) >= 2016.10
BuildRequires:  (python3dist(pyyaml) >= 5.4 with python3dist(pyyaml) < 6)
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(six) >= 1.15
BuildRequires:  python3dist(terminaltables) = 3.1
# For tests
#BuildRequires:  python3dist(pytest)
#BuildRequires:  python3dist(mock)
#BuildRequires:  python3dist(vcrpy)

%description
This is the command line interface for Oracle Cloud Infrastructure.
The project is open source and maintained by Oracle Corp.

%package -n     python3-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}

Requires:       python3dist(arrow) >= 1
Requires:       python3dist(certifi)
Requires:       python3dist(click) >= 7.1.2
Requires:       (python3dist(cryptography) >= 3.2.1 with python3dist(cryptography) <= 3.4.7)
Requires:       python3dist(cx-oracle) >= 7
Requires:       python3dist(jmespath) = 0.10
Requires:       python3dist(oci) = 2.53
Requires:       python3dist(pyopenssl) >= 19.1
Requires:       (python3dist(python-dateutil) >= 2.5.3 with python3dist(python-dateutil) < 3)
Requires:       python3dist(pytz) >= 2016.10
Requires:       (python3dist(pyyaml) >= 5.4 with python3dist(pyyaml) < 6)
Requires:       python3dist(setuptools)
Requires:       python3dist(six) >= 1.15
Requires:       python3dist(terminaltables) = 3.1
%description -n python3-%{pypi_name}
This is the command line interface for Oracle Cloud Infrastructure.
The project is open source and maintained by Oracle Corp.


%prep
%autosetup -n %{pypi_name}-%{pypi_version} -p1
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%py3_build

%install
%py3_install

%check
#%{__python3} setup.py test

%files -n python3-%{pypi_name}
%license LICENSE.txt THIRD_PARTY_LICENSES.txt
%doc README.rst
%{_bindir}/create_backup_from_onprem
%{_bindir}/oci
%{python3_sitelib}/common_util
%{python3_sitelib}/oci_cli
%{python3_sitelib}/services
%{python3_sitelib}/oci_cli-%{pypi_version}-py%{python3_version}.egg-info