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,29 +1,26 @@ PORTNAME= acstore -PORTVERSION= 20230519 -PORTREVISION= 1 +PORTVERSION= 20240407 CATEGORIES= devel python MASTER_SITES= PYPI \ https://github.com/log2timeline/acstore/releases/download/${PORTVERSION}/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= antoine@FreeBSD.org COMMENT= Attribute Container Storage 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 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))