From 3bbdbcb6b63d3257477a7fd4110c4eb9be653d95 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Jun 27 2022 20:04:32 +0000 Subject: Add pyproject-check-import --- diff --git a/python-azure-datalake-store.spec b/python-azure-datalake-store.spec index eb67c68..7787650 100644 --- a/python-azure-datalake-store.spec +++ b/python-azure-datalake-store.spec @@ -1,3 +1,6 @@ +# No tests are included with this version of azure-datalake-store. +%bcond_with tests + %global srcname azure-datalake-store Name: python-%{srcname} @@ -14,6 +17,15 @@ BuildArch: noarch BuildRequires: python3-devel +%if %{with tests} +BuildRequires: python3dist(azure-devtools) +BuildRequires: python3dist(azure-mgmt-keyvault) +BuildRequires: python3dist(azure-mgmt-resource) +BuildRequires: python3dist(azure-sdk-tools) +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(pytest-aiohttp) +BuildRequires: python3dist(python-dotenv) +%endif %global _description %{expand: Azure Data Lake Store Filesystem Client Library for Python} @@ -23,7 +35,7 @@ Azure Data Lake Store Filesystem Client Library for Python} %package -n python3-%{srcname} Summary: %{summary} -Obsoletes: python3-azure-sdk < 5.0.1 + %description -n python3-%{srcname} %{_description} @@ -35,7 +47,7 @@ sed -i 's/\r$//' README.rst %generate_buildrequires -%pyproject_buildrequires -r +%pyproject_buildrequires %build @@ -50,6 +62,14 @@ sed -i 's/\r$//' README.rst rm -rf %{buildroot}%{python3_sitelib}/samples +%check +%pyproject_check_import -e 'samples*' + +%if %{with tests} +%pytest +%endif + + %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst HISTORY.rst