diff --git a/.gitignore b/.gitignore index f352154..ded933c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,8 @@ /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 new file mode 100755 index 0000000..a8fa272 --- /dev/null +++ b/generate-source.sh @@ -0,0 +1,21 @@ +#!/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 6217548..044ff55 100644 --- a/python-azure-identity.spec +++ b/python-azure-identity.spec @@ -1,16 +1,15 @@ -# The majority of the tests included require some type of network access, so they are -# disabled for now until upstream can improve them. +# Upstream's tests now require docker to be running. %bcond_with tests %global srcname azure-identity Name: python-%{srcname} -Version: 1.9.0 +Version: 1.17.1 Release: %autorelease Summary: Microsoft Azure Identity Library for Python License: MIT URL: https://pypi.org/project/%{srcname}/ -Source0: %{pypi_source %{srcname} %{version} zip} +Source0: %{pypi_source %{srcname} %{version}} Epoch: 1 @@ -20,10 +19,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) @@ -38,20 +37,16 @@ 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 -r +%pyproject_buildrequires %build @@ -63,9 +58,14 @@ sed -i 's/msal-extensions~=0.3.0/msal-extensions~=1.0.0/' setup.py %pyproject_save_files azure -%if %{with tests} %check -%pytest +%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" %endif diff --git a/sources b/sources index aab1c3a..b8a1680 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (azure-identity-1.9.0.zip) = 43677d43fc2c3d4311efc7246d627e8ddb45120bae87e0906ac26e3de83eb56e6e4cb2d6661db5503db590c80c0a146a9159f1263a85d0286ec6393112318ddf +SHA512 (azure-identity-1.17.1.tar.gz) = fd922f49b69dcbdef52452effc406a1ac43234ccfc0123614570ed7040e71e97d0e94eda29caec27832c5dbc95528f244de214b2d55f65c16b65abaa7a81e36b