diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..df084c7 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Github repository +REPO="pypa/flit" + +# 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"/tags | jq -r '.[0].name') + +echo "$TAG_NAME" diff --git a/pkg.info b/pkg.info index d7a8656..07706bb 100644 --- a/pkg.info +++ b/pkg.info @@ -1,9 +1,15 @@ name: python-flit-core description: A PEP 517 build backend for packages using Flit -version: 3.9.0 -revision: 3 +version: 3.12.0 +revision: 1 url: https://pypi.org/project/flit-core/ license: BSD-3-Clause architecture: any -depends: ["python3"] type: source +depends: + - python3 +downloads: + - url: https://github.com/pypa/flit/archive/refs/tags/${BPM_PKG_VERSION}.tar.gz + extract_to_bpm_source: true + extract_strip_components: 1 + checksum: c157ff92c01f4bb169182722ff76aadac113926b729215e91909021aa56e2ea3 diff --git a/source.sh b/source.sh index 272b3a9..d475d8b 100644 --- a/source.sh +++ b/source.sh @@ -2,25 +2,19 @@ # 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://pypi.org/packages/source/f/flit-core/flit_core-${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 flit_core + python3 -m flit_core.wheel } # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package() { + cd flit_core + python3 bootstrap_install.py --install-root "$BPM_OUTPUT" dist/flit_core-"$BPM_PKG_VERSION"-py3-none-any.whl # Install package license