diff --git a/azure-core-1.24.2.zip b/azure-core-1.24.2.zip new file mode 100644 index 0000000000000000000000000000000000000000..70c271485c7f8cfdba0c6e11b7a1239e4fd41d36 Binary files /dev/null and b/azure-core-1.24.2.zip differ diff --git a/python-azure-core.spec b/python-azure-core.spec new file mode 100644 index 0000000000000000000000000000000000000000..3cb97c95bea28d37f101154cf58c6449ff2c8b89 --- /dev/null +++ b/python-azure-core.spec @@ -0,0 +1,103 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.2.6) +%define autorelease(e:s:pb:) %{?-p:0.}%{lua: + release_number = 3; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} +## END: Set by rpmautospec + +# EPEL9 does not have python-aiohttp packaged yet. +%if 0%{?fedora} +%bcond_without tests +%else +%bcond_with tests +%endif + +%global srcname azure-core + +Name: python-%{srcname} +Version: 1.24.2 +Release: 3 +Summary: Azure Core shared client library for Python +License: MIT +URL: https://pypi.org/project/%{srcname}/ +Source0: %{pypi_source %{srcname} %{version} zip} + +Epoch: 2 + +BuildArch: noarch + +BuildRequires: python3-devel + +%if %{with tests} +BuildRequires: python3dist(azure-devtools) +BuildRequires: python3dist(azure-mgmt-keyvault) +BuildRequires: python3dist(azure-mgmt-resource) +BuildRequires: python3dist(azure-sdk-tools) +BuildRequires: python3dist(flask) +BuildRequires: python3dist(msrest) +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(pytest-aiohttp) +BuildRequires: python3dist(python-dotenv) +BuildRequires: python3dist(trio) +%endif + +%global _description %{expand: +Azure Core shared client library for Python} + +%description %{_description} + + +%package -n python3-%{srcname} +Summary: %{summary} +%description -n python3-%{srcname} %{_description} + + +%prep +%autosetup -n %{srcname}-%{version} -p4 + +# Fedora 35/36 and epel9 have an older version of typing-extensions. +%if 0%{?fedora} < 37 || 0%{?rhel} +sed -i 's/typing-extensions[>=0-9\.]*/typing-extensions/' setup.py +%endif + +%generate_buildrequires +%pyproject_buildrequires + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files azure + + +%check +%pyproject_check_import + +%if %{with tests} +# azure-core has a flask-based testing server that must be available to run tests. +# Disabling async/streaming tests since they require network connectivity to various +# APIs on Azure's site. +PYTHONPATH=%{buildroot}%{python3_sitelib}:%{buildroot}%{python3_sitearch}:tests/testserver_tests/coretestserver/ \ + %pytest \ + --ignore=tests/async_tests \ + --ignore tests/test_streaming.py \ + -k "not test_decompress_plain_no_header \ + and not test_compress_plain_no_header \ + and not test_decompress_compressed_no_header \ + and not test_text_and_encoding" \ + tests +%endif + + +%files -n python3-%{srcname} -f %{pyproject_files} +%doc README.md + + +%changelog +* Fri Jul 22 2022 Dong Jiao 2:1.24.2-3 +- Initial package