From ff34a6f9107b094830144f382e31ec619fdb59de Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 10:35:42 +0000 Subject: [PATCH 01/19] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-azure-mgmt-consumption.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-azure-mgmt-consumption.spec b/python-azure-mgmt-consumption.spec index efd3189..30106b9 100644 --- a/python-azure-mgmt-consumption.spec +++ b/python-azure-mgmt-consumption.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Version: 2.0.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Microsoft Azure Consumption Client Library for Python License: MIT URL: https://pypi.org/project/%{srcname}/ @@ -61,6 +61,9 @@ rm -rf %{buildroot}%{python3_sitelib}/azure/mgmt/{__init__.py,__pycache__} %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 1:2.0.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Sep 08 2021 Major Hayden - 1:2.0.0-4 - Move obsoletes into subpackage From 96399a74dfac3e31861c21e06d9e30bac36c7ed0 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Thu, 28 Apr 2022 09:22:59 -0500 Subject: [PATCH 02/19] Switch to rpmautospec --- python-azure-mgmt-consumption.spec | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/python-azure-mgmt-consumption.spec b/python-azure-mgmt-consumption.spec index 30106b9..208389a 100644 --- a/python-azure-mgmt-consumption.spec +++ b/python-azure-mgmt-consumption.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Version: 2.0.0 -Release: 5%{?dist} +Release: %autorelease Summary: Microsoft Azure Consumption Client Library for Python License: MIT URL: https://pypi.org/project/%{srcname}/ @@ -13,9 +13,7 @@ Epoch: 1 BuildArch: noarch - BuildRequires: python3-devel -BuildRequires: pyproject-rpm-macros %global _description %{expand: @@ -61,20 +59,4 @@ rm -rf %{buildroot}%{python3_sitelib}/azure/mgmt/{__init__.py,__pycache__} %changelog -* Fri Jan 21 2022 Fedora Release Engineering - 1:2.0.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Wed Sep 08 2021 Major Hayden - 1:2.0.0-4 -- Move obsoletes into subpackage - -* Mon Jul 26 2021 Major Hayden - 1:2.0.0-3 -- Remove conflicting namespace package files - -* Fri Jul 23 2021 Major Hayden - 1:2.0.0-2 -- Add epoch number for 2.0.0 downgrade - -* Thu Jul 22 2021 Major Hayden - 2.0.0-1 -- Downgrade to 2.0.0 - -* Tue Jun 01 2021 Major Hayden - 8.0.0-1 -- First package. +%autochangelog From 1752a92b62ef9bad205925855a7d66f5114af958 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Thu, 16 Jun 2022 12:07:38 +0200 Subject: [PATCH 03/19] Rebuilt for Python 3.11 From 69f4a977cb700a3aea060ffc0418f0144c9eaa7d Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Tue, 28 Jun 2022 13:35:05 -0500 Subject: [PATCH 04/19] Run tests during build --- .gitignore | 1 + generate-source.sh | 21 ++++++++++++++ python-azure-consumption-remove-nspkg.patch | 10 ------- python-azure-mgmt-consumption.spec | 31 ++++++++++++++++++--- sources | 2 +- 5 files changed, 50 insertions(+), 15 deletions(-) create mode 100755 generate-source.sh delete mode 100644 python-azure-consumption-remove-nspkg.patch diff --git a/.gitignore b/.gitignore index 050570e..80a8fd1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /azure-mgmt-consumption-8.0.0.zip /azure-mgmt-consumption-2.0.0.zip +/azure-mgmt-consumption-2.0.0.tgz diff --git a/generate-source.sh b/generate-source.sh new file mode 100755 index 0000000..9ed2597 --- /dev/null +++ b/generate-source.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -euxo pipefail + +export VERSION=2.0.0 +export PACKAGE_NAME=azure-mgmt-consumption +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-consumption-remove-nspkg.patch b/python-azure-consumption-remove-nspkg.patch deleted file mode 100644 index eb731c1..0000000 --- a/python-azure-consumption-remove-nspkg.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff -up ./setup.cfg.orig ./setup.cfg ---- ./setup.cfg.orig 2021-07-22 16:37:20.836524174 -0500 -+++ ./setup.cfg 2021-07-22 16:37:28.147481481 -0500 -@@ -1,6 +1,5 @@ - [bdist_wheel] - universal = 1 --azure-namespace-package = azure-mgmt-nspkg - - [egg_info] - tag_build = diff --git a/python-azure-mgmt-consumption.spec b/python-azure-mgmt-consumption.spec index 208389a..723fe4b 100644 --- a/python-azure-mgmt-consumption.spec +++ b/python-azure-mgmt-consumption.spec @@ -1,3 +1,5 @@ +%bcond_without tests + %global srcname azure-mgmt-consumption Name: python-%{srcname} @@ -6,8 +8,9 @@ Release: %autorelease Summary: Microsoft Azure Consumption Client Library for Python License: MIT URL: https://pypi.org/project/%{srcname}/ -Source0: %{pypi_source %{srcname} %{version} zip} -Patch0: python-azure-consumption-remove-nspkg.patch +# This source comes from making a git archive of the main azure-sdk-for-python +# repository. To reproduce the source code, run the generate-source.sh script. +Source0: %{srcname}-%{version}.tgz Epoch: 1 @@ -15,6 +18,15 @@ 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(pytest) +BuildRequires: python3dist(pytest-aiohttp) +BuildRequires: python3dist(python-dotenv) +%endif %global _description %{expand: Microsoft Azure Consumption Client Library for Python} @@ -24,7 +36,7 @@ Microsoft Azure Consumption Client Library for Python} %package -n python3-%{srcname} Summary: %{summary} -Obsoletes: python3-azure-sdk < 5.0.1 + %description -n python3-%{srcname} %{_description} @@ -32,11 +44,12 @@ Obsoletes: python3-azure-sdk < 5.0.1 %autosetup -p0 -n %{srcname}-%{version} # Remove the custom wheel builder. +sed -i '/azure-namespace-package/d' setup.cfg rm -fv azure_bdist_wheel.py %generate_buildrequires -%pyproject_buildrequires -r +%pyproject_buildrequires %build @@ -51,6 +64,16 @@ rm -fv azure_bdist_wheel.py rm -rf %{buildroot}%{python3_sitelib}/azure/{__init__.py,__pycache__} rm -rf %{buildroot}%{python3_sitelib}/azure/mgmt/{__init__.py,__pycache__} +%pyproject_save_files azure + + +%check +%pyproject_check_import + +%if %{with tests} +%pytest +%endif + %files -n python3-%{srcname} %doc README.rst HISTORY.rst diff --git a/sources b/sources index 49897eb..96fdd68 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (azure-mgmt-consumption-2.0.0.zip) = 57879641214bfb5faa347d23be6e8149cf676e487bc18b2d588abaa4f7d27b6b93d74d098e8ce45aa451de97a01c102b1a56dbd83c8fb21641d6cb9868bc5427 +SHA512 (azure-mgmt-consumption-2.0.0.tgz) = dbf0350e76ca60e42fe5fa970b4ac691db7f44921e46f7d69962490db737c823e9044c657bb77082f6e35eb7f887ab03be418eadfa09de4fae851fab8ced4342 From d7ccfaf5e7a71106869bd3a593727750455d9f90 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Fri, 8 Jul 2022 10:15:58 -0500 Subject: [PATCH 05/19] Add testing conditional for epel9 --- python-azure-mgmt-consumption.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python-azure-mgmt-consumption.spec b/python-azure-mgmt-consumption.spec index 723fe4b..9ad446b 100644 --- a/python-azure-mgmt-consumption.spec +++ b/python-azure-mgmt-consumption.spec @@ -1,4 +1,9 @@ +# EPEL9 does not have python-aiohttp packaged yet. +%if 0%{?fedora} %bcond_without tests +%else +%bcond_with tests +%endif %global srcname azure-mgmt-consumption From aed31f5f37a39849ec9539c7aaa9b3df2ed33d49 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 22 Jul 2022 16:38:15 +0000 Subject: [PATCH 06/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering From bc606bf933cc4c45a79646aa04a21bf9b65c62ff Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 20 Jan 2023 11:30:37 +0000 Subject: [PATCH 07/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering From a828a01fe11b71bbdf72c6e54d025039bde77c48 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Mon, 8 May 2023 13:56:25 -0500 Subject: [PATCH 08/19] -S Migrated to SPDX license Signed-off-by: Major Hayden From 1304396ee80752bae6190a7b8be07394842448e6 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Sat, 1 Jul 2023 18:45:49 +0200 Subject: [PATCH 09/19] Rebuilt for Python 3.12 From 09a1296091fa285caa32b392a63d01bbce293183 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 07:39:35 +0000 Subject: [PATCH 10/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering From aee9fb4a9cca9ca845d47f06f994b42a9097881f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 23:35:52 +0000 Subject: [PATCH 11/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 84142f48f69713c2367c06c6803e43337057902e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jan 2024 01:42:11 +0000 Subject: [PATCH 12/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From afe687a4162095eebe28a4ba1ebc410fb54db0d9 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Sun, 9 Jun 2024 13:43:01 +0200 Subject: [PATCH 13/19] Rebuilt for Python 3.13 From 3fe3bfaa915ecf60c833641e1b21ede1cc5a9267 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 09:46:50 +0000 Subject: [PATCH 14/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 52db5c00999497426ac69ff125bf99af32877c27 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 12:13:41 +0000 Subject: [PATCH 15/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From e2747fa20e356ac4e6d17506dc4ee1e4cb8ee2b0 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 6 Jun 2025 17:35:47 +0200 Subject: [PATCH 16/19] Rebuilt for Python 3.14 From 73a838db014c936d61fa7f1110432ce27e69df84 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 06:50:55 +0000 Subject: [PATCH 17/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 293cce199867e5739dda1c0a078397f337908846 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 13:18:42 +0200 Subject: [PATCH 18/19] Rebuilt for Python 3.14.0rc2 bytecode From 8a4791742022226cd76a80760de8f0b88da35ad5 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 12:49:35 +0200 Subject: [PATCH 19/19] Rebuilt for Python 3.14.0rc3 bytecode