Blame python-azure-mgmt-datalake-store.spec

e2dc781
# Upstream has no tests.
3ba910a
%bcond_with     tests
e2dc781
f25b39d
%global         srcname     azure-mgmt-datalake-store
f25b39d
f25b39d
Name:           python-%{srcname}
a2d6145
Version:        0.5.0
3be28b9
Release:        %autorelease
929c6ac
Summary:        Microsoft Azure Datalake Store Management Client Library for Python
f25b39d
License:        MIT
f25b39d
URL:            https://pypi.org/project/%{srcname}/
f25b39d
Source0:        %{pypi_source %{srcname} %{version} zip}
f25b39d
f25b39d
BuildArch:      noarch
f25b39d
cf55931
Epoch:          1
cf55931
cf55931
BuildRequires:  python3-devel
f25b39d
e2dc781
%if %{with tests}
e2dc781
BuildRequires:  python3dist(azure-devtools)
e2dc781
BuildRequires:  python3dist(azure-mgmt-keyvault)
e2dc781
BuildRequires:  python3dist(azure-mgmt-resource)
e2dc781
BuildRequires:  python3dist(azure-sdk-tools)
e2dc781
BuildRequires:  python3dist(pytest)
e2dc781
BuildRequires:  python3dist(pytest-aiohttp)
e2dc781
BuildRequires:  python3dist(python-dotenv)
e2dc781
%endif
f25b39d
f25b39d
%global _description %{expand:
929c6ac
Microsoft Azure Datalake Store Management Client Library for Python}
f25b39d
f25b39d
%description %{_description}
f25b39d
f25b39d
cf55931
%package -n python3-%{srcname}
f25b39d
Summary:        %{summary}
e2dc781
cf55931
%description -n python3-%{srcname} %{_description}
f25b39d
f25b39d
f25b39d
%prep
e2dc781
%autosetup -n %{srcname}-%{version}
b2e3329
b2e3329
# Remove the customized wheel builder included by Microsoft that adds
b2e3329
# azure-mgmt-nspkg to the requirements.
e2dc781
sed -i '/azure-namespace-package/d' setup.cfg
e2dc781
sed -i '/azure_bdist_wheel.py/d' MANIFEST.in
b2e3329
rm -f azure_bdist_wheel.py
f25b39d
f25b39d
f25b39d
%generate_buildrequires
e2dc781
%pyproject_buildrequires
f25b39d
f25b39d
f25b39d
%build
f25b39d
%pyproject_wheel
f25b39d
f25b39d
f25b39d
%install
f25b39d
%pyproject_install
f25b39d
16bd970
# PEP 420 allows implicit namespace packaging without additional __init__.py
16bd970
# files. Remove unneccessary __init__.py that conflicts with other packages.
16bd970
rm -rf %{buildroot}%{python3_sitelib}/azure/{__init__.py,__pycache__}
16bd970
rm -rf %{buildroot}%{python3_sitelib}/azure/mgmt/{__init__.py,__pycache__}
16bd970
rm -rf %{buildroot}%{python3_sitelib}/azure/mgmt/datalake/{__init__.py,__pycache__}
f25b39d
e2dc781
%pyproject_save_files azure
e2dc781
e2dc781
e2dc781
%check
e2dc781
%pyproject_check_import
e2dc781
e2dc781
%if %{with tests}
e2dc781
%pytest
e2dc781
%endif
e2dc781
16bd970
16bd970
%files -n python3-%{srcname}
929c6ac
%doc README.rst HISTORY.rst
16bd970
%{python3_sitelib}/azure/mgmt/datalake/store
16bd970
%{python3_sitelib}/azure_mgmt_datalake_store-%{version}.dist-info
f25b39d
f25b39d
f25b39d
%changelog
3be28b9
%autochangelog