Compare commits
19 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a47917420 | ||
|
|
293cce1998 | ||
|
|
73a838db01 | ||
|
|
e2747fa20e | ||
|
|
52db5c0099 | ||
|
|
3fe3bfaa91 | ||
|
|
afe687a416 | ||
|
|
84142f48f6 | ||
|
|
aee9fb4a9c | ||
|
|
09a1296091 | ||
|
|
1304396ee8 | ||
|
|
a828a01fe1 |
||
|
|
bc606bf933 | ||
|
|
aed31f5f37 | ||
|
|
d7ccfaf5e7 |
||
|
|
69f4a977cb |
||
|
|
1752a92b62 | ||
|
|
96399a74df |
||
|
|
ff34a6f910 |
5 changed files with 57 additions and 32 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -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
|
||||
|
|
|
|||
21
generate-source.sh
Executable file
21
generate-source.sh
Executable file
|
|
@ -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
|
||||
|
|
@ -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 =
|
||||
|
|
@ -1,22 +1,37 @@
|
|||
# EPEL9 does not have python-aiohttp packaged yet.
|
||||
%if 0%{?fedora}
|
||||
%bcond_without tests
|
||||
%else
|
||||
%bcond_with tests
|
||||
%endif
|
||||
|
||||
%global srcname azure-mgmt-consumption
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 2.0.0
|
||||
Release: 4%{?dist}
|
||||
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
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: pyproject-rpm-macros
|
||||
|
||||
%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}
|
||||
|
|
@ -26,7 +41,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}
|
||||
|
||||
|
||||
|
|
@ -34,11 +49,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
|
||||
|
|
@ -53,6 +69,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
|
||||
|
|
@ -61,17 +87,4 @@ rm -rf %{buildroot}%{python3_sitelib}/azure/mgmt/{__init__.py,__pycache__}
|
|||
|
||||
|
||||
%changelog
|
||||
* Wed Sep 08 2021 Major Hayden <major@mhtx.net> - 1:2.0.0-4
|
||||
- Move obsoletes into subpackage
|
||||
|
||||
* Mon Jul 26 2021 Major Hayden <major@mhtx.net> - 1:2.0.0-3
|
||||
- Remove conflicting namespace package files
|
||||
|
||||
* Fri Jul 23 2021 Major Hayden <major@mhtx.net> - 1:2.0.0-2
|
||||
- Add epoch number for 2.0.0 downgrade
|
||||
|
||||
* Thu Jul 22 2021 Major Hayden <major@mhtx.net> - 2.0.0-1
|
||||
- Downgrade to 2.0.0
|
||||
|
||||
* Tue Jun 01 2021 Major Hayden <major@mhtx.net> - 8.0.0-1
|
||||
- First package.
|
||||
%autochangelog
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (azure-mgmt-consumption-2.0.0.zip) = 57879641214bfb5faa347d23be6e8149cf676e487bc18b2d588abaa4f7d27b6b93d74d098e8ce45aa451de97a01c102b1a56dbd83c8fb21641d6cb9868bc5427
|
||||
SHA512 (azure-mgmt-consumption-2.0.0.tgz) = dbf0350e76ca60e42fe5fa970b4ac691db7f44921e46f7d69962490db737c823e9044c657bb77082f6e35eb7f887ab03be418eadfa09de4fae851fab8ced4342
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue