Update package version to 0.27.3
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Github repository
|
||||
REPO="rapidfuzz/Levenshtein"
|
||||
|
||||
# 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')
|
||||
|
||||
# Trim 'v' character in TAG_NAME variable
|
||||
VERSION=$(echo "$TAG_NAME" | tr -d 'v')
|
||||
|
||||
echo "$VERSION"
|
||||
@@ -1,10 +1,29 @@
|
||||
name: python-levenshtein
|
||||
description: Python extension for computing string edit distances and similarities
|
||||
version: 0.27.1
|
||||
revision: 2
|
||||
version: 0.27.3
|
||||
revision: 1
|
||||
url: https://github.com/rapidfuzz/Levenshtein
|
||||
license: GPL2-or-later
|
||||
maintainers:
|
||||
- [email protected]
|
||||
architecture: any
|
||||
depends: ["gcc-libs", "glibc", "python3", "python-rapidfuzz"]
|
||||
make_depends: ["python-cython", "python-build", "python-installer", "python-scikit-build-core", "python-setuptools", "rapidfuzz-cpp"]
|
||||
type: source
|
||||
depends:
|
||||
- gcc-libs
|
||||
- glibc
|
||||
- python3=3.14.*
|
||||
- python-rapidfuzz
|
||||
make_depends:
|
||||
- python-cython
|
||||
- python-build
|
||||
- python-installer
|
||||
- python-scikit-build-core
|
||||
- python-setuptools
|
||||
- rapidfuzz-cpp
|
||||
check_depends:
|
||||
- python-pytest
|
||||
downloads:
|
||||
- url: https://github.com/rapidfuzz/Levenshtein/archive/refs/tags/v${BPM_PKG_VERSION}.tar.gz
|
||||
extract_to: ${BPM_SOURCE}
|
||||
extract_strip_components: 1
|
||||
checksum: bc052cc7ac742b4a2dcfb82212b157f4adce9193ed27fe4d495f1349546eecdd
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -1,7 +1,7 @@
|
||||
[build-system]
|
||||
requires = [
|
||||
"scikit-build-core>=0.11",
|
||||
- "Cython>=3.1.6,<3.2.0"
|
||||
+ "Cython"
|
||||
]
|
||||
build-backend = "scikit_build_core.build"
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
# 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/rapidfuzz/Levenshtein/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
|
||||
# This function is used for putting downloaded files to the correct location or applying patches
|
||||
prepare() {
|
||||
wget "$DOWNLOAD"
|
||||
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
|
||||
cd "$BPM_SOURCE"
|
||||
|
||||
patch -Np1 -i "$BPM_WORKDIR"/remove-version-constraints.patch
|
||||
sed -e 's|-m cython|-m cython --cplus|g' -i src/Levenshtein/CMakeLists.txt # Fix building with Cython 3.2
|
||||
}
|
||||
|
||||
# The build function is executed in the source directory
|
||||
@@ -18,10 +17,22 @@ build() {
|
||||
python -m build --wheel --no-isolation .
|
||||
}
|
||||
|
||||
# The check function is executed in the source directory
|
||||
# This function is used to run tests to verify the package has been compiled correctly
|
||||
check() {
|
||||
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
||||
|
||||
# Install module to temporary directory
|
||||
python -m installer --destdir="$PWD/tmp_install" dist/*.whl
|
||||
|
||||
PYTHONPATH="$PWD/tmp_install$site_packages" pytest -v
|
||||
}
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package() {
|
||||
python -m installer --destdir "$BPM_OUTPUT" --prefix=/usr dist/*.whl
|
||||
|
||||
install -Dm644 COPYING "$BPM_OUTPUT"/usr/share/licenses/python-levenshtein/COPYING
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/python-levenshtein/LICENSE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user