Blame python-azure-mgmt-batchai.spec

fba4889
%global         srcname     azure-mgmt-batchai
fba4889
fba4889
Name:           python-%{srcname}
184fdc8
Version:        2.0.0
a0f4668
Release:        4%{?dist}
fba4889
Summary:        Microsoft Azure Batch AI Management Client Library for Python
fba4889
License:        MIT
fba4889
URL:            https://pypi.org/project/%{srcname}/
fba4889
Source0:        %{pypi_source %{srcname} %{version} zip}
184fdc8
Patch0:         remove-custom-wheel-generator.patch
fba4889
fba4889
BuildArch:      noarch
fba4889
a0f4668
Epoch:          1
a0f4668
fba4889
Obsoletes:      python-azure-sdk < 5.0.1
fba4889
f2fcbaa
BuildRequires:  python3-devel
fba4889
BuildRequires:  pyproject-rpm-macros
fba4889
fba4889
fba4889
%global _description %{expand:
fba4889
Microsoft Azure Batch AI Management Client Library for Python}
fba4889
fba4889
%description %{_description}
fba4889
fba4889
f2fcbaa
%package -n python3-%{srcname}
fba4889
Summary:        %{summary}
fba4889
f2fcbaa
%description -n python3-%{srcname} %{_description}
fba4889
fba4889
fba4889
%prep
d779313
%autosetup -p0 -n %{srcname}-%{version}
fba4889
184fdc8
# Remove the customized wheel builder included by Microsoft that adds
184fdc8
# azure-mgmt-nspkg to the requirements.
184fdc8
rm -f azure_bdist_wheel.py
fba4889
fba4889
%generate_buildrequires
fba4889
%pyproject_buildrequires -r
fba4889
fba4889
fba4889
%build
fba4889
%pyproject_wheel
fba4889
fba4889
fba4889
%install
fba4889
%pyproject_install
fba4889
f94f0ba
# PEP 420 allows implicit namespace packaging without additional __init__.py
f94f0ba
# files. Remove unneccessary __init__.py that conflicts with other packages.
f94f0ba
rm -rf %{buildroot}%{python3_sitelib}/azure/{__init__.py,__pycache__}
f94f0ba
rm -rf %{buildroot}%{python3_sitelib}/azure/mgmt/{__init__.py,__pycache__}
fba4889
f94f0ba
f94f0ba
%files -n python3-%{srcname}
184fdc8
%doc README.rst HISTORY.rst
f94f0ba
%{python3_sitelib}/azure/mgmt/batchai
f94f0ba
%{python3_sitelib}/azure_mgmt_batchai-%{version}.dist-info
fba4889
fba4889
fba4889
%changelog
a0f4668
* Fri Jul 23 2021 Major Hayden <major@mhtx.net> - 1:2.0.0-4
a7ec410
- Add epoch number to 2.0.0 downgrade
a0f4668
f94f0ba
* Wed Jul 14 2021 Major Hayden <major@mhtx.net> - 2.0.0-3
f94f0ba
- Remove unneccessary __init__.py files to avoid file conflicts.
f94f0ba
d779313
* Wed Jul 07 2021 Major Hayden <major@mhtx.net> - 2.0.0-2
d779313
- Removed customized wheel builder from package to avoid -nspkg requirement.
d779313
fba4889
* Tue Jun 01 2021 Major Hayden <major@mhtx.net> - 2.0.0-1
fba4889
- First package.