diff --git a/check-version.sh b/check-version.sh index ccc85ec..eb7c7bf 100644 --- a/check-version.sh +++ b/check-version.sh @@ -4,9 +4,9 @@ REPO="pypa/setuptools-scm" # Get tag name using Github Rest API -TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name') +TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/releases | jq -r '.[].tag_name' | grep '^setuptools-scm' | head -n1) -# Trim 'v' character in TAG_NAME variable -VERSION=$(echo "$TAG_NAME" | tr -d 'v') +# Trim prefix +VERSION=${TAG_NAME//setuptools-scm-v/} echo "$VERSION" diff --git a/pkg.info b/pkg.info index 2e1918f..7bc8b32 100644 --- a/pkg.info +++ b/pkg.info @@ -1,16 +1,25 @@ name: python-setuptools-scm description: Python package to manage your versions by scm tags -version: 9.2.2 +version: 10.0.5 revision: 1 url: https://github.com/pypa/setuptools-scm license: MIT +maintainers: + - enumdev@enumerated.dev architecture: any output_architecture: any type: source depends: - python-packaging - python-setuptools + - python-vcs-versioning make_depends: - python-build - python-installer - python-wheel +downloads: + - url: https://github.com/pypa/setuptools-scm.git + type: git + clone_to: ${BPM_SOURCE} + git_branch: setuptools-scm-v${BPM_PKG_VERSION} + checksum: e2ba34f52b5d375d680c069bc3fa89c4056a9347 diff --git a/source.sh b/source.sh index 7d3ec28..3cbf5f0 100644 --- a/source.sh +++ b/source.sh @@ -2,26 +2,20 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT -DOWNLOAD="https://github.com/pypa/setuptools-scm/archive/refs/tags/v${BPM_PKG_VERSION}.tar.gz" -FILENAME="${DOWNLOAD##*/}" - -# The prepare function is executed in the root of the temp directory -# This function is used for downloading files and putting them into the correct location -prepare() { - wget "$DOWNLOAD" - tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" -} - # The build function is executed in the source directory # This function is used to compile the source code build() { + cd setuptools-scm + python3 -m build --wheel --no-isolation . } # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package() { + cd setuptools-scm + python3 -m installer --destdir="$BPM_OUTPUT" dist/*.whl - install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/python-setuptools-scm/LICENSE + install -Dm644 LICENSE "$BPM_OUTPUT"/usr/share/licenses/python-setuptools-scm/LICENSE }