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

9f80256
# Upstream has no tests yet.
9f80256
%bcond_with     tests
9f80256
ed993d7
%global         srcname     azure-mgmt-datalake-analytics
ed993d7
ed993d7
Name:           python-%{srcname}
9cae87a
Version:        0.2.1
664f5de
Release:        %autorelease
ed993d7
Summary:        Microsoft Azure Data Lake Analytics Management Client Library for Python
ed993d7
License:        MIT
ed993d7
URL:            https://pypi.org/project/%{srcname}/
ed993d7
Source0:        %{pypi_source %{srcname} %{version} zip}
ed993d7
ed993d7
BuildArch:      noarch
ed993d7
9cae87a
Epoch:          1
9cae87a
9cae87a
BuildRequires:  python3-devel
ed993d7
9f80256
%if %{with tests}
9f80256
BuildRequires:  python3dist(azure-devtools)
9f80256
BuildRequires:  python3dist(azure-mgmt-keyvault)
9f80256
BuildRequires:  python3dist(azure-mgmt-resource)
9f80256
BuildRequires:  python3dist(azure-sdk-tools)
9f80256
BuildRequires:  python3dist(pytest)
9f80256
BuildRequires:  python3dist(pytest-aiohttp)
9f80256
BuildRequires:  python3dist(python-dotenv)
9f80256
%endif
9f80256
ed993d7
%global _description %{expand:
ed993d7
Microsoft Azure Data Lake Analytics Management Client Library for Python}
ed993d7
ed993d7
%description %{_description}
ed993d7
ed993d7
9cae87a
%package -n python3-%{srcname}
ed993d7
Summary:        %{summary}
9f80256
9cae87a
%description -n python3-%{srcname} %{_description}
ed993d7
ed993d7
ed993d7
%prep
9f80256
%autosetup -n %{srcname}-%{version}
a5916a1
a5916a1
# Remove the customized wheel builder included by Microsoft that adds
a5916a1
# azure-mgmt-nspkg to the requirements.
1e3bedc
sed -i '/^azure-namespace-package/d' setup.cfg
a5916a1
rm -f azure_bdist_wheel.py
ed993d7
9cae87a
# Fix line endings.
9cae87a
sed -i 's/\r$//' README.rst
ed993d7
9f80256
ed993d7
%generate_buildrequires
9f80256
%pyproject_buildrequires
ed993d7
ed993d7
ed993d7
%build
ed993d7
%pyproject_wheel
ed993d7
ed993d7
ed993d7
%install
ed993d7
%pyproject_install
ed993d7
47ab9d5
# PEP 420 allows implicit namespace packaging without additional __init__.py
47ab9d5
# files. Remove unneccessary __init__.py that conflicts with other packages.
47ab9d5
rm -rf %{buildroot}%{python3_sitelib}/azure/{__init__.py,__pycache__}
47ab9d5
rm -rf %{buildroot}%{python3_sitelib}/azure/mgmt/{__init__.py,__pycache__}
47ab9d5
rm -rf %{buildroot}%{python3_sitelib}/azure/mgmt/datalake/{__init__.py,__pycache__}
ed993d7
9f80256
%pyproject_save_files azure
9f80256
9f80256
9f80256
%check
9f80256
%pyproject_check_import
9f80256
9f80256
%if %{with tests}
9f80256
%pytest
9f80256
%endif
9f80256
47ab9d5
47ab9d5
%files -n python3-%{srcname}
ce307bf
%doc README.rst HISTORY.rst
47ab9d5
%{python3_sitelib}/azure/mgmt/datalake/analytics
47ab9d5
%{python3_sitelib}/azure_mgmt_datalake_analytics-%{version}.dist-info
ed993d7
ed993d7
ed993d7
%changelog
664f5de
%autochangelog