Add pyproject_check_import
This commit is contained in:
parent
9a1995b75b
commit
b4ab8928e4
4 changed files with 31 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
|||
/azure-mgmt-batch-15.0.0.zip
|
||||
/azure-mgmt-batch-16.0.0.zip
|
||||
/azure-mgmt-batch-16.1.0.zip
|
||||
/azure-mgmt-batch-16.1.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=16.1.0
|
||||
export PACKAGE_NAME=azure-mgmt-batch
|
||||
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
|
||||
|
|
@ -10,18 +10,20 @@ Release: %autorelease
|
|||
Summary: Microsoft Azure Batch Management 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-network)
|
||||
BuildRequires: python3dist(azure-mgmt-resource)
|
||||
BuildRequires: python3dist(azure-sdk-tools)
|
||||
BuildRequires: python3dist(pytest)
|
||||
BuildRequires: python3dist(python-dotenv)
|
||||
%endif
|
||||
|
|
@ -42,15 +44,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-batch-16.1.0.zip) = 9a210bb94163f4e76a4057d73ca5a5afa394f768f76121ea1e59603e76eb99e16d5225360c62ed88cbef0194ccb736da991897b4e83c14a5b5eedf54914c39b1
|
||||
SHA512 (azure-mgmt-batch-16.1.0.tgz) = 4d15f832f606214f1732fcef092e2c811b10d0a468dd05ca020b3698fe0b0f06da65c4a48b175c4c9985b543af832533ed120e66481696a66888b239f4a8cf9c
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue