From 16d807afe586dfacb277e3c67a09581e087c0c91 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Tue, 3 Aug 2021 16:49:06 -0500 Subject: [PATCH] Initial import (#1986417) --- .gitignore | 1 + python-azure-sdk-tools-requirements-fix.patch | 23 ++++++ python-azure-sdk-tools.spec | 78 +++++++++++++++++++ sources | 1 + 4 files changed, 103 insertions(+) create mode 100644 .gitignore create mode 100644 python-azure-sdk-tools-requirements-fix.patch create mode 100644 python-azure-sdk-tools.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0813053 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/azure-sdk-for-python-9d4f5a6d6da6ba453c5553a33177553da9d1ba5f.tar.gz diff --git a/python-azure-sdk-tools-requirements-fix.patch b/python-azure-sdk-tools-requirements-fix.patch new file mode 100644 index 0000000..c0e83eb --- /dev/null +++ b/python-azure-sdk-tools-requirements-fix.patch @@ -0,0 +1,23 @@ +diff -up ./tools/azure-sdk-tools/setup.py.orig ./tools/azure-sdk-tools/setup.py +--- ./tools/azure-sdk-tools/setup.py.orig 2021-08-03 16:07:10.859055550 -0500 ++++ ./tools/azure-sdk-tools/setup.py 2021-08-03 16:08:32.883571014 -0500 +@@ -9,19 +9,8 @@ DEPENDENCIES = [ + "packaging", + "wheel", + "Jinja2", +- "pytoml", +- "json-delta>=2.0", +- # Tests +- "pytest-cov", +- "pytest>=3.5.1", +- # 'azure-devtools>=0.4.1' override by packaging needs + "readme_renderer", +- # 'azure-storage-file<2.0', +- "azure-storage-common<1.4.1", + "pyopenssl", +- "azure-mgmt-resource", +- "azure-mgmt-storage", +- "azure-mgmt-keyvault", + "python-dotenv", + ] + diff --git a/python-azure-sdk-tools.spec b/python-azure-sdk-tools.spec new file mode 100644 index 0000000..b24c129 --- /dev/null +++ b/python-azure-sdk-tools.spec @@ -0,0 +1,78 @@ +# The SDK tools have never had a versioned release, but they are updated +# frequently in the upstream repository. +%global srcname azure-sdk-tools +%global forgeurl https://github.com/Azure/azure-sdk-for-python/ +%global commit 9d4f5a6d6da6ba453c5553a33177553da9d1ba5f +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global distprefix %{nil} +%global short_version 0.0.0 +%forgemeta + +Name: python-%{srcname} +Version: %{short_version}~git.1.%{shortcommit} +Release: 1%{?dist} +Summary: Specific tools for Azure SDK for Python testing +License: MIT and ASL 2.0 +URL: %forgeurl +Source0: %forgesource +# NOTE(mhayden): The testing tools provided with the package are meant for Azure +# SDK's CI processes upstream and are not needed to build this package. This +# package contains test framework helpers for other Azure CLI/SDK packages. +Patch0: python-azure-sdk-tools-requirements-fix.patch + +BuildArch: noarch + +Obsoletes: python-azure-sdk < 5.0.1 + +BuildRequires: python3-devel +BuildRequires: python3-pip +BuildRequires: python3-setuptools +BuildRequires: python3-wheel +BuildRequires: pyproject-rpm-macros + + +%global _description %{expand: +Specific tools for Azure SDK for Python testing} + +%description %{_description} + + +%package -n python3-%{srcname} +Summary: %{summary} + +%description -n python3-%{srcname} %{_description} + + +%prep +%forgesetup +%patch0 -p0 + + +%build +pushd tools/%{srcname} + # Some tools are only used for the Azure SDK CI system and there's no need + # to package those. + rm -rf packaging_tools pypi_tools + + # There's a dangling empty setup.py in the devtools_testutils directory. + rm -f devtools_testutils/setup.py + + %pyproject_wheel +popd + + +%install +%pyproject_install +%pyproject_save_files devtools_testutils testutils + +# Some provided executables are only used internally in Azure SDK's CI. +rm -f %{buildroot}/%{_bindir}/{auto_codegen,auto_package,generate_package,generate_sdk} + + +%files -n python3-%{srcname} -f %{pyproject_files} +%doc README.rst +%license LICENSE.txt + +%changelog +* Tue Jun 01 2021 Major Hayden - 0.0.0~git.1.9d4f5a6 +- First package. diff --git a/sources b/sources new file mode 100644 index 0000000..2e1ddd1 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (azure-sdk-for-python-9d4f5a6d6da6ba453c5553a33177553da9d1ba5f.tar.gz) = 3b061b500aaa727ca2c9d27d31564bf389f7d7b462b2b1a682a237e20bf4e0547a944487624f502e65bfe0025093a56ccd72bb83ab23b87d308623534245f62e