diff --git a/python-azure-mgmt-cosmosdb.spec b/python-azure-mgmt-cosmosdb.spec index b8fba68..5d87250 100644 --- a/python-azure-mgmt-cosmosdb.spec +++ b/python-azure-mgmt-cosmosdb.spec @@ -1,3 +1,5 @@ +%bcond_without tests + %global srcname azure-mgmt-cosmosdb Name: python-%{srcname} @@ -10,9 +12,17 @@ Source0: %{pypi_source %{srcname} 7.0.0b2 zip} 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: Microsoft Azure Cosmos DB Management Client Library for Python} @@ -22,7 +32,7 @@ Microsoft Azure Cosmos DB Management Client Library for Python} %package -n python3-%{srcname} Summary: %{summary} -Obsoletes: python3-azure-sdk < 5.0.1 + %description -n python3-%{srcname} %{_description} @@ -31,7 +41,7 @@ Obsoletes: python3-azure-sdk < 5.0.1 %generate_buildrequires -%pyproject_buildrequires -r +%pyproject_buildrequires %build @@ -43,6 +53,14 @@ Obsoletes: python3-azure-sdk < 5.0.1 %pyproject_save_files azure +%check +%pyproject_check_import + +%if %{with tests} +%pytest +%endif + + %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md