From 9c31c86cccc5c4416f8458e7d85f3fb181919233 Mon Sep 17 00:00:00 2001 From: chrysos349 Date: Thu, 12 Oct 2023 00:50:14 +0300 Subject: [PATCH 1/6] New package: python3-hatch-fancy-pypi-readme-23.1.0 --- .../python3-hatch-fancy-pypi-readme/template | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 srcpkgs/python3-hatch-fancy-pypi-readme/template diff --git a/srcpkgs/python3-hatch-fancy-pypi-readme/template b/srcpkgs/python3-hatch-fancy-pypi-readme/template new file mode 100644 index 0000000000000..6809af37f6a19 --- /dev/null +++ b/srcpkgs/python3-hatch-fancy-pypi-readme/template @@ -0,0 +1,18 @@ +# Template file for 'python3-hatch-fancy-pypi-readme' +pkgname=python3-hatch-fancy-pypi-readme +version=23.1.0 +revision=1 +build_style=python3-pep517 +hostmakedepends="hatchling python3-wheel" +depends="hatchling" +checkdepends="python3-pytest ${depends}" +short_desc="Fancy PyPI READMEs with Hatch" +maintainer="chrysos349 " +license="MIT" +homepage="https://github.com/hynek/hatch-fancy-pypi-readme" +distfiles="${PYPI_SITE}/h/hatch_fancy_pypi_readme/hatch_fancy_pypi_readme-${version}.tar.gz" +checksum=b1df44063094af1e8248ceacd47a92c9cf313d6b9823bf66af8a927c3960287d + +post_install() { + vlicense LICENSE.txt +} From 299786efa7c6d0ec80d1f2a1d3c06a6bd840b9f3 Mon Sep 17 00:00:00 2001 From: chrysos349 Date: Thu, 12 Oct 2023 00:50:51 +0300 Subject: [PATCH 2/6] New package: python3-hatch-vcs-0.3.0 --- ...rk-with-setuptools_scm-7.1-fix-25-26.patch | 32 +++++++++++++++++++ srcpkgs/python3-hatch-vcs/template | 18 +++++++++++ 2 files changed, 50 insertions(+) create mode 100644 srcpkgs/python3-hatch-vcs/patches/hatch-vcs-0.3.0-Work-with-setuptools_scm-7.1-fix-25-26.patch create mode 100644 srcpkgs/python3-hatch-vcs/template diff --git a/srcpkgs/python3-hatch-vcs/patches/hatch-vcs-0.3.0-Work-with-setuptools_scm-7.1-fix-25-26.patch b/srcpkgs/python3-hatch-vcs/patches/hatch-vcs-0.3.0-Work-with-setuptools_scm-7.1-fix-25-26.patch new file mode 100644 index 0000000000000..919036acd720d --- /dev/null +++ b/srcpkgs/python3-hatch-vcs/patches/hatch-vcs-0.3.0-Work-with-setuptools_scm-7.1-fix-25-26.patch @@ -0,0 +1,32 @@ +From 47364faf5563df0eaa631ed10383817762c6b547 Mon Sep 17 00:00:00 2001 +From: Ben Beasley +Date: Thu, 5 Jan 2023 18:49:54 -0500 +Subject: [PATCH] Work with setuptools_scm 7.1 (fix #25) (#26) + +Make test_write less brittle (see also #8, #9) so that it works with +_version.py files generated by at least setuptools_scm 7.1, 7.0, and +6.x. +--- + tests/test_build.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/tests/test_build.py b/tests/test_build.py +index 2fde601..7c76343 100644 +--- a/tests/test_build.py ++++ b/tests/test_build.py +@@ -75,8 +75,10 @@ def test_write(new_project_write): + assert os.path.isfile(version_file) + + lines = read_file(version_file).splitlines() +- assert lines[3].startswith(('version =', '__version__ =')) +- assert lines[3].endswith("version = '1.2.3'") ++ version_starts = ('version = ', '__version__ = ') ++ assert any(line.startswith(version_starts) for line in lines) ++ version_line = next(line for line in lines if line.startswith(version_starts)) ++ assert version_line.endswith(" = '1.2.3'") + + + @pytest.mark.skipif(sys.version_info[0] == 2, reason='Depends on fix in 6.4.0 which is Python 3-only') +-- +2.39.1 + diff --git a/srcpkgs/python3-hatch-vcs/template b/srcpkgs/python3-hatch-vcs/template new file mode 100644 index 0000000000000..41882e15b2082 --- /dev/null +++ b/srcpkgs/python3-hatch-vcs/template @@ -0,0 +1,18 @@ +# Template file for 'python3-hatch-vcs' +pkgname=python3-hatch-vcs +version=0.3.0 +revision=1 +build_style=python3-pep517 +hostmakedepends="hatchling python3-wheel" +depends="hatchling python3-setuptools_scm" +checkdepends="${depends} git python3-pytest" +short_desc="Hatch plugin for versioning with your preferred VCS" +maintainer="chrysos349 " +license="MIT" +homepage="https://github.com/ofek/hatch-vcs" +distfiles="${PYPI_SITE}/h/hatch_vcs/hatch_vcs-${version}.tar.gz" +checksum=cec5107cfce482c67f8bc96f18bbc320c9aa0d068180e14ad317bbee5a153fee + +post_install() { + vlicense LICENSE.txt +} From 973e79613a090cfa436a13a70a060d55d9ca3aab Mon Sep 17 00:00:00 2001 From: chrysos349 Date: Thu, 12 Oct 2023 00:51:53 +0300 Subject: [PATCH 3/6] New package: python3-scikit-build-0.17.6 --- srcpkgs/python3-scikit-build/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-scikit-build/template diff --git a/srcpkgs/python3-scikit-build/template b/srcpkgs/python3-scikit-build/template new file mode 100644 index 0000000000000..abbd8022231e5 --- /dev/null +++ b/srcpkgs/python3-scikit-build/template @@ -0,0 +1,23 @@ +# Template file for 'python3-scikit-build' +pkgname=python3-scikit-build +version=0.17.6 +revision=1 +build_style=python3-pep517 +# test requires setuptools_scm to not be installed +make_check_args="-k not(nosetuptoolsscm)" +hostmakedepends="python3-hatch-fancy-pypi-readme python3-hatch-vcs + python3-wheel" +depends="python3-distro python3-packaging python3-setuptools python3-wheel" +checkdepends="${depends} cmake gcc-fortran git ninja python3-Cython + python3-devel python3-pip python3-pytest-mock python3-requests + python3-virtualenv" +short_desc="Build system generator for Python C/C++/Cython/Fortran extensions" +maintainer="chrysos349 " +license="MIT" +homepage="https://scikit-build.org" +distfiles="${PYPI_SITE}/s/scikit_build/scikit_build-${version}.tar.gz" +checksum=b51a51a36b37c42650994b5047912f59b22e3210b23e321f287611f9ef6e5c9d + +post_install() { + vlicense LICENSE +} From 9dbfe2b12c8c66942517f074051d51dfc6083c54 Mon Sep 17 00:00:00 2001 From: chrysos349 Date: Thu, 12 Oct 2023 00:52:26 +0300 Subject: [PATCH 4/6] New package: rapidfuzz-cpp-2.1.1 --- srcpkgs/rapidfuzz-cpp/template | 15 +++++++++++++++ 1 file changed, 15 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 0000000000000..72e957c9d131e --- /dev/null +++ b/srcpkgs/rapidfuzz-cpp/template @@ -0,0 +1,15 @@ +# Template file for 'rapidfuzz-cpp' +pkgname=rapidfuzz-cpp +version=2.1.1 +revision=1 +build_style=cmake +short_desc="Rapid fuzzy string matching in C++ using the Levenshtein Distance" +maintainer="chrysos349 " +license="MIT" +homepage="https://github.com/maxbachmann/rapidfuzz-cpp" +distfiles="https://github.com/maxbachmann/rapidfuzz-cpp/archive/v${version}.tar.gz" +checksum=1680c0dbf77d228ea81825c24755db99ee0e21a8db3663b5136741b3e108c3f2 + +post_install() { + vlicense LICENSE +} From 06de0ec3dc1825dc122619f0a1f2249a47589ffe Mon Sep 17 00:00:00 2001 From: chrysos349 Date: Thu, 12 Oct 2023 00:53:04 +0300 Subject: [PATCH 5/6] New package: python3-rapidfuzz-3.2.0 --- .../python3-rapidfuzz/files/README.voidlinux | 2 ++ srcpkgs/python3-rapidfuzz/template | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 srcpkgs/python3-rapidfuzz/files/README.voidlinux create mode 100644 srcpkgs/python3-rapidfuzz/template diff --git a/srcpkgs/python3-rapidfuzz/files/README.voidlinux b/srcpkgs/python3-rapidfuzz/files/README.voidlinux new file mode 100644 index 0000000000000..fd4aa98151f61 --- /dev/null +++ b/srcpkgs/python3-rapidfuzz/files/README.voidlinux @@ -0,0 +1,2 @@ +Optional dependencies: + python3-numpy diff --git a/srcpkgs/python3-rapidfuzz/template b/srcpkgs/python3-rapidfuzz/template new file mode 100644 index 0000000000000..894b6255f4e4e --- /dev/null +++ b/srcpkgs/python3-rapidfuzz/template @@ -0,0 +1,29 @@ +# Template file for 'python3-rapidfuzz' +pkgname=python3-rapidfuzz +version=3.2.0 +revision=1 +build_style=python3-pep517 +hostmakedepends="cmake python3-scikit-build" +makedepends="python3-devel rapidfuzz-cpp" +depends="python3" +checkdepends="python3-hypothesis python3-pandas python3-pytest" +short_desc="Rapid fuzzy string matching in Python using various string metrics" +maintainer="chrysos349 " +license="MIT" +homepage="https://github.com/maxbachmann/rapidfuzz" +distfiles="${PYPI_SITE}/r/rapidfuzz/rapidfuzz-${version}.tar.gz" +checksum=448d031d9960fea7826d42bd4284156fc68d3b55a6946eb34ca5c6acf960577b + +pre_build() { + # ugly hack to help cmake find python3 headers + if [ "$CROSS_BUILD" ]; then + rm -rf ${XBPS_BUILDDIR}/../${py3_inc} + ln -sf ${XBPS_BUILDDIR}/../${XBPS_CROSS_BASE}/${py3_inc} \ + ${XBPS_BUILDDIR}/../${py3_inc} + fi +} + +post_install() { + vdoc ${FILESDIR}/README.voidlinux + vlicense LICENSE +} From dac8c70936693b1bd42eaa5fd7805bca837be954 Mon Sep 17 00:00:00 2001 From: chrysos349 Date: Thu, 12 Oct 2023 00:54:03 +0300 Subject: [PATCH 6/6] python3-Levenshtein: update to 0.23.0 --- srcpkgs/python3-Levenshtein/template | 30 ++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/srcpkgs/python3-Levenshtein/template b/srcpkgs/python3-Levenshtein/template index 044c5d1492408..7876811b0ff0c 100644 --- a/srcpkgs/python3-Levenshtein/template +++ b/srcpkgs/python3-Levenshtein/template @@ -1,14 +1,24 @@ # Template file for 'python3-Levenshtein' pkgname=python3-Levenshtein -version=0.12.0 -revision=9 -build_style=python3-module -hostmakedepends="python3-devel python3-setuptools" -makedepends="python3-devel" -depends="python3" -short_desc="Functions for computation of distance and string similarity (Python3)" +version=0.23.0 +revision=1 +build_style=python3-pep517 +hostmakedepends="cmake python3-scikit-build" +makedepends="python3-devel rapidfuzz-cpp" +depends="python3-rapidfuzz" +checkdepends="${depends} python3-pytest" +short_desc="Functions for computation of distance and string similarity" 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 + +pre_build() { + # ugly hack to help cmake find python3 headers + if [ "$CROSS_BUILD" ]; then + rm -rf ${XBPS_BUILDDIR}/../${py3_inc} + ln -sf ${XBPS_BUILDDIR}/../${XBPS_CROSS_BASE}/${py3_inc} \ + ${XBPS_BUILDDIR}/../${py3_inc} + fi +}