git: 8ec9f6df40da - main - devel/py-acstore: update to 20240407

From: Antoine Brodin <antoine_at_FreeBSD.org>
Date: Tue, 18 Feb 2025 10:13:36 UTC
The branch main has been updated by antoine:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8ec9f6df40daf35ce3b081cd83819fe16aff603a

commit 8ec9f6df40daf35ce3b081cd83819fe16aff603a
Author:     Antoine Brodin <antoine@FreeBSD.org>
AuthorDate: 2025-02-18 10:06:36 +0000
Commit:     Antoine Brodin <antoine@FreeBSD.org>
CommitDate: 2025-02-18 10:06:36 +0000

    devel/py-acstore: update to 20240407
---
 devel/py-acstore/Makefile                          | 11 +++-----
 devel/py-acstore/distinfo                          |  6 ++---
 .../files/patch-acstore_sqlite__store.py           | 29 ++++++++++++++++++++++
 .../py-acstore/files/patch-tests_sqlite__store.py  | 18 ++++++++++++++
 4 files changed, 54 insertions(+), 10 deletions(-)

diff --git a/devel/py-acstore/Makefile b/devel/py-acstore/Makefile
index 7b24116b7008..e43193773ccd 100644
--- a/devel/py-acstore/Makefile
+++ b/devel/py-acstore/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	acstore
-PORTVERSION=	20230519
-PORTREVISION=	1
+PORTVERSION=	20240407
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI \
 		https://github.com/log2timeline/acstore/releases/download/${PORTVERSION}/
@@ -13,17 +12,15 @@ WWW=		https://github.com/log2timeline/acstore
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	${PY_SETUPTOOLS} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}pyyaml>=0:devel/py-pyyaml@${PY_FLAVOR}
 
 NO_ARCH=	yes
 USES=		python
-USE_PYTHON=	distutils autoplist concurrent
+USE_PYTHON=	autoplist pep517
 DO_MAKE_TEST=	${SETENV} ${TEST_ENV} ${PYTHON_CMD}
 TEST_TARGET=	run_tests.py
 
-post-patch:
-	${REINPLACE_CMD} "s,share/doc/acstore,${DOCSDIR_REL}," ${WRKSRC}/setup.py
-	${REINPLACE_CMD} "/pip/d" ${WRKSRC}/requirements.txt
-
 .include <bsd.port.mk>
diff --git a/devel/py-acstore/distinfo b/devel/py-acstore/distinfo
index 0f7edd463616..f1302614c13a 100644
--- a/devel/py-acstore/distinfo
+++ b/devel/py-acstore/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1707754170
-SHA256 (acstore-20230519.tar.gz) = b9f6d7b1609b9758fc0944ec25e443de0bd1acb6957388c2de5acc641e13d808
-SIZE (acstore-20230519.tar.gz) = 47454
+TIMESTAMP = 1739777083
+SHA256 (acstore-20240407.tar.gz) = cae6c70c46799f096d416f2c2c4021832697234b2f1c24b76bb31ec22e9cbe98
+SIZE (acstore-20240407.tar.gz) = 47091
diff --git a/devel/py-acstore/files/patch-acstore_sqlite__store.py b/devel/py-acstore/files/patch-acstore_sqlite__store.py
new file mode 100644
index 000000000000..9dff424e5dfa
--- /dev/null
+++ b/devel/py-acstore/files/patch-acstore_sqlite__store.py
@@ -0,0 +1,29 @@
+--- acstore/sqlite_store.py.orig	2024-04-06 08:14:28 UTC
++++ acstore/sqlite_store.py
+@@ -57,7 +57,7 @@ def PythonAST2SQL(ast_node):
+ 
+   if isinstance(ast_node, ast.Constant):
+     if isinstance(ast_node.value, str):
+-      return f'"{ast_node.value:s}"'
++      return f'\'{ast_node.value:s}\''
+ 
+     return str(ast_node.value)
+ 
+@@ -195,7 +195,7 @@ class SQLiteAttributeContainerStore(
+ 
+   _HAS_TABLE_QUERY = (
+       'SELECT name FROM sqlite_master '
+-      'WHERE type = "table" AND name = "{0:s}"')
++      'WHERE type = \'table\' AND name = \'{0:s}\'')
+ 
+   _INSERT_METADATA_VALUE_QUERY = (
+       'INSERT INTO metadata (key, value) VALUES (?, ?)')
+@@ -625,7 +625,7 @@ class SQLiteAttributeContainerStore(
+     """
+     if self.format_version >= self._UPGRADE_COMPATIBLE_FORMAT_VERSION:
+       query = (f'UPDATE metadata SET value = {self._FORMAT_VERSION:d} '
+-               f'WHERE key = "format_version"')
++               f'WHERE key = \'format_version\'')
+ 
+       try:
+         self._cursor.execute(query)
diff --git a/devel/py-acstore/files/patch-tests_sqlite__store.py b/devel/py-acstore/files/patch-tests_sqlite__store.py
new file mode 100644
index 000000000000..cda0ddf8f917
--- /dev/null
+++ b/devel/py-acstore/files/patch-tests_sqlite__store.py
@@ -0,0 +1,18 @@
+--- tests/sqlite_store.py.orig	2024-03-30 05:07:58 UTC
++++ tests/sqlite_store.py
+@@ -188,13 +188,13 @@ class SQLiteAttributeContainerStoreTest(test_lib.BaseT
+             attribute_container.CONTAINER_TYPE, column_names=column_names))
+         self.assertEqual(len(containers), 1)
+ 
+-        filter_expression = 'attribute == "8f0bf95a7959baad9666b21a7feed79d"'
++        filter_expression = 'attribute == \'8f0bf95a7959baad9666b21a7feed79d\''
+         containers = list(test_store._GetAttributeContainersWithFilter(
+             attribute_container.CONTAINER_TYPE, column_names=column_names,
+             filter_expression=filter_expression))
+         self.assertEqual(len(containers), 1)
+ 
+-        filter_expression = 'attribute != "8f0bf95a7959baad9666b21a7feed79d"'
++        filter_expression = 'attribute != \'8f0bf95a7959baad9666b21a7feed79d\''
+         containers = list(test_store._GetAttributeContainersWithFilter(
+             attribute_container.CONTAINER_TYPE, column_names=column_names,
+             filter_expression=filter_expression))