Get source from git repository
This commit is contained in:
parent
79b7f8f69b
commit
8ea5b0a8e7
4 changed files with 33 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -2,3 +2,4 @@
|
|||
/azure-mgmt-network-19.1.0.zip
|
||||
/azure-mgmt-network-19.3.0.zip
|
||||
/azure-mgmt-network-20.0.0.zip
|
||||
/azure-mgmt-network-20.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=20.0.0
|
||||
export PACKAGE_NAME=azure-mgmt-network
|
||||
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
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# All tests are marked as "live" tests which require network connectivity.
|
||||
# All of the tests require a proxy running under docker.
|
||||
%bcond_with tests
|
||||
|
||||
%global srcname azure-mgmt-network
|
||||
|
|
@ -9,7 +9,9 @@ Release: %autorelease
|
|||
Summary: Microsoft Azure Network 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
|
||||
|
||||
|
|
@ -33,7 +35,7 @@ Microsoft Azure Network Management Client Library for Python}
|
|||
|
||||
%package -n python3-%{srcname}
|
||||
Summary: %{summary}
|
||||
Obsoletes: python3-azure-sdk < 5.0.1
|
||||
|
||||
%description -n python3-%{srcname} %{_description}
|
||||
|
||||
|
||||
|
|
@ -42,7 +44,7 @@ Obsoletes: python3-azure-sdk < 5.0.1
|
|||
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -r
|
||||
%pyproject_buildrequires
|
||||
|
||||
|
||||
%build
|
||||
|
|
@ -54,9 +56,11 @@ Obsoletes: python3-azure-sdk < 5.0.1
|
|||
%pyproject_save_files azure
|
||||
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
%pytest -m "not live_test_only"
|
||||
%pyproject_check_import
|
||||
|
||||
%if %{with tests}
|
||||
%pytest
|
||||
%endif
|
||||
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (azure-mgmt-network-20.0.0.zip) = 75869f1f01bdf289afbeb70c3e73677d0618256ad4fecf7ee88bcb26434c9f15e3a1d071858f7c8c7de218942d284206a84117638f5f47eac195c49fbe9e4496
|
||||
SHA512 (azure-mgmt-network-20.0.0.tgz) = f8678895e7e06bf0df4b1202cd8503896231eceaccc701a145ba00e907637b7ba77cb447da2930e30a748c7c386c06a13206ebb2f817d806b00c620ee5b81935
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue