diff --git a/.gitignore b/.gitignore index ded933c..f352154 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,3 @@ /azure-identity-1.5.0.zip /azure-identity-1.6.1.zip /azure-identity-1.9.0.zip -/azure-identity-1.10.0.zip -/azure-identity-1.10.0.tgz -/azure-identity-1.14.0.zip -/azure-identity-1.15.0.tar.gz -/azure-identity-1.17.1.tar.gz diff --git a/generate-source.sh b/generate-source.sh deleted file mode 100755 index a8fa272..0000000 --- a/generate-source.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -set -euxo pipefail - -export VERSION=1.10.0 -export PACKAGE_NAME=azure-identity -WORKING_DIR=$(pwd) - -# Download the release and unpack it. -curl -LO https://github.com/Azure/azure-sdk-for-python/archive/refs/tags/${PACKAGE_NAME}_${VERSION}.tar.gz -tar xzf ${PACKAGE_NAME}_${VERSION}.tar.gz - -# Find the package directory in the SDK release and the parent directory. -PACKAGE_DIR=$(find azure-sdk-for-python-${PACKAGE_NAME}_${VERSION} -type d -name $PACKAGE_NAME) -PARENT_DIR=$(dirname $PACKAGE_DIR) - -# Build a tarball with a prefix directory that contains the package name and -# version. Store that in the directory where the script is running. -pushd $PARENT_DIR - tar --transform "s/^${PACKAGE_NAME}/${PACKAGE_NAME}-${VERSION}/" -cz \ - -f ${WORKING_DIR}/${PACKAGE_NAME}-${VERSION}.tgz $PACKAGE_NAME -popd \ No newline at end of file diff --git a/python-azure-identity.spec b/python-azure-identity.spec index 044ff55..6217548 100644 --- a/python-azure-identity.spec +++ b/python-azure-identity.spec @@ -1,15 +1,16 @@ -# Upstream's tests now require docker to be running. +# The majority of the tests included require some type of network access, so they are +# disabled for now until upstream can improve them. %bcond_with tests %global srcname azure-identity Name: python-%{srcname} -Version: 1.17.1 +Version: 1.9.0 Release: %autorelease Summary: Microsoft Azure Identity Library for Python License: MIT URL: https://pypi.org/project/%{srcname}/ -Source0: %{pypi_source %{srcname} %{version}} +Source0: %{pypi_source %{srcname} %{version} zip} Epoch: 1 @@ -19,10 +20,10 @@ BuildArch: noarch BuildRequires: python3-devel %if %{with tests} +BuildRequires: python3-azure-sdk-tools BuildRequires: python3dist(azure-devtools) BuildRequires: python3dist(azure-mgmt-keyvault) BuildRequires: python3dist(azure-mgmt-resource) -BuildRequires: python3dist(azure-sdk-tools) BuildRequires: python3dist(pytest) BuildRequires: python3dist(aiohttp) BuildRequires: python3dist(pytest-asyncio) @@ -37,16 +38,20 @@ Microsoft Azure Identity Library for Python} %package -n python3-%{srcname} Summary: %{summary} - +Obsoletes: python3-azure-sdk < 5.0.1 %description -n python3-%{srcname} %{_description} %prep %autosetup -n %{srcname}-%{version} +# azure-identity requires msal-extensions~=0.3.0, but azure-cli needs 1.0.0. +# This conflict will be fixed in the next azure-identity release after 1.9.0. +sed -i 's/msal-extensions~=0.3.0/msal-extensions~=1.0.0/' setup.py + %generate_buildrequires -%pyproject_buildrequires +%pyproject_buildrequires -r %build @@ -58,14 +63,9 @@ Summary: %{summary} %pyproject_save_files azure -%check -%pyproject_check_import - %if %{with tests} -# test_persistent_cache_linux fails with Python 3.12 -# we skip it as it's likely problem between mocked objects -# reported upstream: https://github.com/Azure/azure-sdk-for-python/issues/30994 -%pytest -k "not test_timeout and not test_persistent_cache_linux" +%check +%pytest %endif diff --git a/sources b/sources index b8a1680..aab1c3a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (azure-identity-1.17.1.tar.gz) = fd922f49b69dcbdef52452effc406a1ac43234ccfc0123614570ed7040e71e97d0e94eda29caec27832c5dbc95528f244de214b2d55f65c16b65abaa7a81e36b +SHA512 (azure-identity-1.9.0.zip) = 43677d43fc2c3d4311efc7246d627e8ddb45120bae87e0906ac26e3de83eb56e6e4cb2d6661db5503db590c80c0a146a9159f1263a85d0286ec6393112318ddf