diff --git a/.gitignore b/.gitignore index e67294e..c91f8bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /azure-devtools-1.0.0.tar.gz /azure-sdk-for-python-a88809f86787492ddc99c4b3ea5de36c99f14b4f.tar.gz /azure-sdk-for-python-19487ff9f1790033bcc9e3354b7bdee309a5bc71.tar.gz +/azure-devtools-a5a4ef4a7adc8c730dd7da2e9e3bdb43c9376586.tar.gz +/generate-devtools-tarball.sh diff --git a/python-azure-devtools.spec b/python-azure-devtools.spec index 980f43b..282ce1f 100644 --- a/python-azure-devtools.spec +++ b/python-azure-devtools.spec @@ -2,19 +2,24 @@ # continues to update it without bumping the version. 😞 %global srcname azure-devtools %global forgeurl https://github.com/Azure/azure-sdk-for-python/ -%global commit 19487ff9f1790033bcc9e3354b7bdee309a5bc71 +%global commit a5a4ef4a7adc8c730dd7da2e9e3bdb43c9376586 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global distprefix %{nil} %global short_version 1.2.1 %forgemeta Name: python-%{srcname} -Version: %{short_version}~git.2.%{shortcommit} +Version: %{short_version}~git.3.%{shortcommit} Release: 1%{?dist} Summary: Microsoft Azure Development Tools for SDK License: MIT and ASL 2.0 URL: %forgeurl -Source0: %forgesource +Source0: azure-devtools-%{commit}.tar.gz +# The azure-sdk-for-python repository is huge at > 160MB, but we only need ~ +# 100KB of source for this package. Use this script to generate a tarball of the +# source code: +# ./generate-devtools-tarball.sh COMMIT_SHA +Source1: generate-devtools-tarball.sh # Asked upstream to update the vcrpy requirement. PR in progress. # https://github.com/Azure/azure-sdk-for-python/pull/20032 Patch0: python-azure-devtools-requirements-fix.patch @@ -44,14 +49,15 @@ Summary: %{summary} %prep -%forgesetup -%patch0 -p0 +%autosetup -v -p3 -c -n %{srcname}-%{commit} %build -pushd tools/%{srcname} - %pyproject_wheel -popd +%pyproject_wheel + + +%generate_buildrequires +%pyproject_buildrequires -r %install @@ -63,11 +69,15 @@ rm -f %{buildroot}%{_bindir}/{perfstress,systemperf} %files -n python3-%{srcname} -f %{pyproject_files} -%doc tools/%{srcname}/README.rst -%license tools/%{srcname}/LICENSE +%doc README.rst +%license LICENSE %changelog +* Tue Aug 03 2021 Major Hayden - 1.2.1~git.3.a5a4ef4 +- Updated to latest commit on 2021-08-11 +- Generate a source tarball using a script to shrink size of source RPM + * Tue Aug 03 2021 Major Hayden - 1.2.1~git.2.19487ff - Updated to latest commit on 2021-08-03 diff --git a/sources b/sources index 4c46ed7..49478b2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (azure-sdk-for-python-19487ff9f1790033bcc9e3354b7bdee309a5bc71.tar.gz) = bf9d136b5e8923fb3ef059c97be991ad47d37d118ee4a7014eb8f69f155abea37cbfeaccbbc2a32721fc65e6e45e0ee48008a5a639551fdd6a5a2cc91268dd4f +SHA512 (generate-devtools-tarball.sh) = 9f9e4debd047d28b33577ec2344f11023cbc18a275fc322c6bae3f06032a83be3f8273fbdd3bd2b75ffff104e6b99a7e80ed4f27564c19e903e1fed35c15022e