From 8c8bab7fea1d392b7465211a9892be2423028637 Mon Sep 17 00:00:00 2001 From: Luciogi Date: Tue, 21 Nov 2023 20:46:45 +0500 Subject: [PATCH 1/4] New package: rapidfuzz-cpp --- srcpkgs/rapidfuzz-cpp/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/rapidfuzz-cpp/template diff --git a/srcpkgs/rapidfuzz-cpp/template b/srcpkgs/rapidfuzz-cpp/template new file mode 100644 index 00000000000000..d08266171f30a4 --- /dev/null +++ b/srcpkgs/rapidfuzz-cpp/template @@ -0,0 +1,17 @@ +# Template file for 'rapidfuzz-cpp' +pkgname=rapidfuzz-cpp +version=2.2.3 +revision=1 +#archs="i686 x86_64" +build_style=cmake +short_desc="Rapid fuzzy string matching in C++ using the Levenshtein Distance" +maintainer="Luciogi " +license="MIT" +homepage="https://github.com/maxbachmann/rapidfuzz-cpp" +changelog="https://github.com/maxbachmann/rapidfuzz-cpp/raw/main/CHANGELOG.md" +distfiles="https://github.com/maxbachmann/rapidfuzz-cpp/archive/refs/tags/v${version}.tar.gz>${pkgname}-${version}.tar.gz" +checksum=df4412e9593945782de2212095bd4b70a8f8e63ae8f313976c616809be124d2c + +post_install() { + vlicense LICENSE +} From af5b57e63b6a7f52825e053001ca018717702f87 Mon Sep 17 00:00:00 2001 From: Luciogi Date: Tue, 21 Nov 2023 20:50:10 +0500 Subject: [PATCH 2/4] New package: python3-scikit-build --- .../patches/remove-fancy-readme.patch | 49 +++++++++++++++++++ srcpkgs/python3-scikit-build/template | 29 +++++++++++ 2 files changed, 78 insertions(+) create mode 100644 srcpkgs/python3-scikit-build/patches/remove-fancy-readme.patch create mode 100644 srcpkgs/python3-scikit-build/template diff --git a/srcpkgs/python3-scikit-build/patches/remove-fancy-readme.patch b/srcpkgs/python3-scikit-build/patches/remove-fancy-readme.patch new file mode 100644 index 00000000000000..087dc16d0ce2d4 --- /dev/null +++ b/srcpkgs/python3-scikit-build/patches/remove-fancy-readme.patch @@ -0,0 +1,49 @@ +diff --git a/pyproject.toml b/pyproject.toml +index 8b31b64..b77e19e 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,5 +1,5 @@ + [build-system] +-requires = ["hatchling", "hatch-fancy-pypi-readme", "hatch-vcs"] ++requires = ["hatchling", "hatch-vcs"] + build-backend = "hatchling.build" + + [project] +@@ -75,37 +75,6 @@ build.targets.wheel.packages = ["skbuild"] + version.source = "vcs" + build.hooks.vcs.version-file = "skbuild/_version.py" + +- +-[tool.hatch.metadata.hooks.fancy-pypi-readme] +-content-type = "text/x-rst" +- +-[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] +-path = "README.rst" +-start-after = ".. START-INTRO" +-end-before = ".. END-INTRO" +- +-[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] +-path = "CHANGES.rst" +-start-after = ".. START-BRIEF-CHANGELOG" +-end-before = ".. END-BRIEF-CHANGELOG" +- +-[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] +-path = "README.rst" +-start-after = ".. INJECT-CHANGELOG" +- +-[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] +-pattern = ':pr:`(\d+)`' +-replacement = '`#\1 `_' +- +-[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] +-pattern = ':issue:`(\d+)`' +-replacement = '`#\1 `_' +- +-[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] +-pattern = ':user:`(\S+)`' +-replacement = '`@\1 `_' +- +- + [tool.black] + line-length = 120 + diff --git a/srcpkgs/python3-scikit-build/template b/srcpkgs/python3-scikit-build/template new file mode 100644 index 00000000000000..9df9ac0c294e81 --- /dev/null +++ b/srcpkgs/python3-scikit-build/template @@ -0,0 +1,29 @@ +# Template file for 'python3-scikit-build' +pkgname=python3-scikit-build +version=0.17.6 +revision=1 +build_style=python3-pep517 +hostmakedepends="hatchling hatch-vcs" +depends="python3-distro python3-packaging python3-setuptools python3-wheel" +checkdepends="${depends} python3-devel python3-Cython python3-numpy python3-pytest + python3-pytest-mock python3-requests python3-virtualenv python3-path python3-six + git cmake gcc gcc-fortran" +short_desc="Build system generator for Python C/C++/Fortran/Cython extensions" +maintainer="Luciogi " +license="MIT" +homepage="https://github.com/scikit-build/scikit-build" +changelog="https://github.com/scikit-build/scikit-build/raw/main/CHANGES.rst" +distfiles="${PYPI_SITE}/s/scikit_build/scikit_build-${version}.tar.gz" +checksum=b51a51a36b37c42650994b5047912f59b22e3210b23e321f287611f9ef6e5c9d +pre_check() { + # Tests run in only virtual environment + python -m venv test-env --system-site-package +} + +do_check() { + test-env/bin/python /usr/bin/pytest -m "not isolated and not deprecated and not nosetuptoolsscm" +} + +post_install() { + vlicense LICENSE +} From 8a80be9ef79b7311985ec0fcf3105e0e8caac996 Mon Sep 17 00:00:00 2001 From: Luciogi Date: Wed, 22 Nov 2023 11:27:12 +0500 Subject: [PATCH 3/4] python3-Levenshtein: update to 0.23.0. --- srcpkgs/python3-Levenshtein/template | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/srcpkgs/python3-Levenshtein/template b/srcpkgs/python3-Levenshtein/template index 044c5d1492408d..9402aa902e16a6 100644 --- a/srcpkgs/python3-Levenshtein/template +++ b/srcpkgs/python3-Levenshtein/template @@ -1,14 +1,21 @@ # Template file for 'python3-Levenshtein' pkgname=python3-Levenshtein -version=0.12.0 -revision=9 +version=0.23.0 +revision=1 build_style=python3-module -hostmakedepends="python3-devel python3-setuptools" -makedepends="python3-devel" -depends="python3" +make_check_target="tests" +hostmakedepends="python3-setuptools cmake" +makedepends="python3-devel python3-scikit-build python3-RapidFuzz" +depends="python3-RapidFuzz" +checkdepends="python3-pytest" short_desc="Functions for computation of distance and string similarity (Python3)" maintainer="Orphaned " license="GPL-2.0-or-later" -homepage="https://pypi.org/project/python-Levenshtein/" -distfiles="${PYPI_SITE}/p/python-Levenshtein/python-Levenshtein-${version}.tar.gz" -checksum=033a11de5e3d19ea25c9302d11224e1a1898fe5abd23c61c7c360c25195e3eb1 +homepage="https://github.com/maxbachmann/Levenshtein" +distfiles="${PYPI_SITE}/L/Levenshtein/Levenshtein-${version}.tar.gz" +checksum=de7ccc31a471ea5bfafabe804c12a63e18b4511afc1014f23c3cc7be8c70d3bd + +do_check() { + PYTHONPATH=$(cd _skbuild/linux*/setuptools/lib* && pwd) \ + python -m pytest -v +} From bafb44ee9becc5875b74448d54ed08c7a79eed03 Mon Sep 17 00:00:00 2001 From: Luciogi Date: Wed, 22 Nov 2023 11:35:12 +0500 Subject: [PATCH 4/4] New package: python3-RapidFuzz --- srcpkgs/python3-RapidFuzz/template | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 srcpkgs/python3-RapidFuzz/template diff --git a/srcpkgs/python3-RapidFuzz/template b/srcpkgs/python3-RapidFuzz/template new file mode 100644 index 00000000000000..1b5c5f32a599b2 --- /dev/null +++ b/srcpkgs/python3-RapidFuzz/template @@ -0,0 +1,24 @@ +# Template file for 'python3-RapidFuzz' +pkgname=python3-RapidFuzz +version=3.5.2 +revision=1 +build_style=python3-module +hostmakedepends="python3-scikit-build" +makedepends="python3-Cython rapidfuzz-cpp cmake ninja python3-devel" +checkdepends="python3-pytest python3-hypothesis python3-pandas" +short_desc="Rapid fuzzy string matching in Python using the Levenshtein Distance" +maintainer="Luciogi " +license="MIT" +homepage="https://github.com/maxbachmann/RapidFuzz" +changelog="https://raw.githubusercontent.com/maxbachmann/RapidFuzz/main/CHANGELOG.rst" +distfiles="${PYPI_SITE}/r/rapidfuzz/rapidfuzz-${version}.tar.gz" +checksum=9e9b395743e12c36a3167a3a9fd1b4e11d92fb0aa21ec98017ee6df639ed385e + +do_check() { + PYTHONPATH=$(cd _skbuild/linux*/setuptools/lib* && pwd) \ + python -m pytest -v +} + +post_install() { + vlicense LICENSE +}