Update package version to 0.27.3

This commit is contained in:
2026-05-07 09:03:19 +03:00
parent dbd14cde6e
commit 1ae02e950a
4 changed files with 64 additions and 11 deletions
+18 -7
View File
@@ -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
}