Add import test
This commit is contained in:
parent
39fe260e0e
commit
f25fde65f2
4 changed files with 31 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
/azure-mgmt-cdn-11.0.0.zip
|
||||
/azure-mgmt-cdn-12.0.0.zip
|
||||
/azure-mgmt-cdn-12.0.0.tgz
|
||||
|
|
|
|||
21
generate-source.sh
Executable file
21
generate-source.sh
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
|
||||
export VERSION=12.0.0
|
||||
export PACKAGE_NAME=azure-mgmt-cdn
|
||||
WORKING_DIR=$(pwd)
|
||||
|
||||
# Download the release and unpack it.
|
||||
curl -LO https://github.com/Azure/azure-sdk-for-python/archive/refs/tags/${PACKAGE_NAME}_${VERSION}.tar.gz
|
||||
tar xzf ${PACKAGE_NAME}_${VERSION}.tar.gz
|
||||
|
||||
# Find the package directory in the SDK release and the parent directory.
|
||||
PACKAGE_DIR=$(find azure-sdk-for-python-${PACKAGE_NAME}_${VERSION} -type d -name $PACKAGE_NAME)
|
||||
PARENT_DIR=$(dirname $PACKAGE_DIR)
|
||||
|
||||
# Build a tarball with a prefix directory that contains the package name and
|
||||
# version. Store that in the directory where the script is running.
|
||||
pushd $PARENT_DIR
|
||||
tar --transform "s/^${PACKAGE_NAME}/${PACKAGE_NAME}-${VERSION}/" -cz \
|
||||
-f ${WORKING_DIR}/${PACKAGE_NAME}-${VERSION}.tgz $PACKAGE_NAME
|
||||
popd
|
||||
|
|
@ -9,17 +9,19 @@ Release: %autorelease
|
|||
Summary: Microsoft Azure CDN Client Library for Python
|
||||
License: MIT
|
||||
URL: https://pypi.org/project/%{srcname}/
|
||||
Source0: %{pypi_source %{srcname} %{version} zip}
|
||||
# This source comes from making a git archive of the main azure-sdk-for-python
|
||||
# repository. To reproduce the source code, run the generate-source.sh script.
|
||||
Source0: %{srcname}-%{version}.tgz
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
|
||||
%if %{with tests}
|
||||
BuildRequires: python3-azure-sdk-tools
|
||||
BuildRequires: python3dist(azure-devtools)
|
||||
BuildRequires: python3dist(azure-mgmt-keyvault)
|
||||
BuildRequires: python3dist(azure-mgmt-resource)
|
||||
BuildRequires: python3dist(azure-sdk-tools)
|
||||
BuildRequires: python3dist(pytest)
|
||||
BuildRequires: python3dist(python-dotenv)
|
||||
%endif
|
||||
|
|
@ -40,15 +42,17 @@ Summary: %{summary}
|
|||
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -r
|
||||
%pyproject_buildrequires
|
||||
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
%pyproject_check_import
|
||||
|
||||
%if %{with tests}
|
||||
%pytest
|
||||
%endif
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (azure-mgmt-cdn-12.0.0.zip) = 820a97f94bdff877b81a7825b5f85b7114fd1063a02cd6c9718850c35b9f0432029961a0d934c3e18985f6815aad65332f249db7c86b09ed35ad8a08eb5ad856
|
||||
SHA512 (azure-mgmt-cdn-12.0.0.tgz) = 5554c39ecc8ed2fc097c9b597b67cf6088e81e088ea579773da1cfacc0da41f71286b7dada0459fdaa1be3d52fbfd9a8fc903bec56e11635c6c71eee9efc7fb9
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue