1988adb
%bcond_without  tests
b0ce943
38946ef
%global         reponame    azure-sdk-for-python
701c069
%global         srcname     azure-core
701c069
701c069
Name:           python-%{srcname}
Jeremy Cline 1ea5aac
Version:        1.30.1
3da3a7e
Release:        %autorelease
701c069
Summary:        Azure Core shared client library for Python
38946ef
701c069
License:        MIT
Jeremy Cline 1ea5aac
URL:            https://pypi.org/project/%{srcname}/
Jeremy Cline 1ea5aac
Source0:        %{pypi_source %{srcname} %{version}}
701c069
b8af56b
Epoch:          2
1b91e70
701c069
BuildArch:      noarch
701c069
118111d
BuildRequires:  python3-devel
701c069
b0ce943
%if %{with tests}
3da3a7e
BuildRequires:  python3dist(azure-devtools)
3da3a7e
BuildRequires:  python3dist(azure-mgmt-keyvault)
3da3a7e
BuildRequires:  python3dist(azure-mgmt-resource)
024eb8e
BuildRequires:  python3dist(azure-sdk-tools)
3da3a7e
BuildRequires:  python3dist(flask)
b0ce943
BuildRequires:  python3dist(msrest)
b0ce943
BuildRequires:  python3dist(pytest)
b0ce943
BuildRequires:  python3dist(pytest-aiohttp)
ea49b3f
BuildRequires:  python3dist(python-dotenv)
b0ce943
BuildRequires:  python3dist(trio)
b0ce943
%endif
b0ce943
701c069
%global _description %{expand:
701c069
Azure Core shared client library for Python}
701c069
701c069
%description %{_description}
701c069
701c069
118111d
%package -n python3-%{srcname}
701c069
Summary:        %{summary}
118111d
%description -n python3-%{srcname} %{_description}
701c069
701c069
Roman Inflianskas 543e6ce
%pyproject_extras_subpkg -n python3-%{srcname} aio
Roman Inflianskas 543e6ce
701c069
%prep
Jeremy Cline 1ea5aac
%autosetup -n %{srcname}-%{version}
701c069
701c069
701c069
%generate_buildrequires
ea49b3f
%pyproject_buildrequires
701c069
701c069
701c069
%build
701c069
%pyproject_wheel
701c069
701c069
701c069
%install
701c069
%pyproject_install
ea49b3f
%pyproject_save_files azure
701c069
701c069
b0ce943
%check
0ef18d9
%pyproject_check_import
0ef18d9
0ef18d9
%if %{with tests}
1988adb
# azure-core has a flask-based testing server that must be available to run tests.
1988adb
# Disabling async/streaming tests since they require network connectivity to various
1988adb
# APIs on Azure's site.
1988adb
PYTHONPATH=%{buildroot}%{python3_sitelib}:%{buildroot}%{python3_sitearch}:tests/testserver_tests/coretestserver/ \
1988adb
    %pytest \
1988adb
        --ignore=tests/async_tests \
1988adb
        --ignore tests/test_streaming.py \
1988adb
        -k "not test_decompress_plain_no_header \
1988adb
            and not test_compress_plain_no_header \
01c3cc6
            and not test_decompress_compressed_no_header \
9de524b
            and not test_text_and_encoding \
9de524b
            and not test_response_headers" \
1988adb
        tests
b0ce943
%endif
b0ce943
b0ce943
ea49b3f
%files -n python3-%{srcname} -f %{pyproject_files}
38946ef
%license LICENSE
38946ef
%doc CHANGELOG.md CLIENT_LIBRARY_DEVELOPER.md README.md
701c069
701c069
701c069
%changelog
3da3a7e
%autochangelog