From 48bc983d9327152e19a591a7bc76c3bef95bb625 Mon Sep 17 00:00:00 2001 From: Charles Leifer Date: Wed, 21 Aug 2024 09:56:29 -0500 Subject: [PATCH] 0.5.3 Also builds python 3.12 wheels. --- .github/workflows/tests.yaml | 5 +++-- build-scripts/_build_wheels.sh | 4 ++++ build-scripts/build.sh | 2 +- setup.py | 2 +- {test => tests}/__init__.py | 0 {test => tests}/__main__.py | 16 ++++++++-------- {test => tests}/backup.py | 0 {test => tests}/dbapi.py | 0 {test => tests}/factory.py | 0 {test => tests}/hooks.py | 0 {test => tests}/regression.py | 0 {test => tests}/transactions.py | 0 {test => tests}/ttypes.py | 0 {test => tests}/userfunctions.py | 0 14 files changed, 17 insertions(+), 12 deletions(-) rename {test => tests}/__init__.py (100%) rename {test => tests}/__main__.py (69%) rename {test => tests}/backup.py (100%) rename {test => tests}/dbapi.py (100%) rename {test => tests}/factory.py (100%) rename {test => tests}/hooks.py (100%) rename {test => tests}/regression.py (100%) rename {test => tests}/transactions.py (100%) rename {test => tests}/ttypes.py (100%) rename {test => tests}/userfunctions.py (100%) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 4045b39..01ec39c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -7,7 +7,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] + python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 @@ -16,8 +16,9 @@ jobs: - name: package deps run: | sudo apt-get install libsqlcipher-dev + pip install setuptools python setup.py build_ext -i - name: runtests env: PYTHONPATH: '.:$PYTHONPATH' - run: python test/ + run: python tests/ diff --git a/build-scripts/_build_wheels.sh b/build-scripts/_build_wheels.sh index 1f3d986..f38eb26 100755 --- a/build-scripts/_build_wheels.sh +++ b/build-scripts/_build_wheels.sh @@ -61,6 +61,9 @@ PY310="/opt/python/cp310-cp310/bin" PY311="/opt/python/cp311-cp311/bin" "${PY311}/python" setup.py build_static +PY312="/opt/python/cp312-cp312/bin" +"${PY312}/python" setup.py build_static + # Replace the package name defined in setup.py so we can push this to PyPI # without stomping on the source dist. sed -i "s|name=PACKAGE_NAME,|name='sqlcipher3-binary',|g" setup.py @@ -71,6 +74,7 @@ sed -i "s|name=PACKAGE_NAME,|name='sqlcipher3-binary',|g" setup.py "${PY39}/pip" wheel /io/sqlcipher3 -w /io/wheelhouse "${PY310}/pip" wheel /io/sqlcipher3 -w /io/wheelhouse "${PY311}/pip" wheel /io/sqlcipher3 -w /io/wheelhouse +"${PY312}/pip" wheel /io/sqlcipher3 -w /io/wheelhouse for whl in /io/wheelhouse/*.whl; do auditwheel repair "$whl" -w /io/wheelhouse/ diff --git a/build-scripts/build.sh b/build-scripts/build.sh index 84898bf..166f3b6 100755 --- a/build-scripts/build.sh +++ b/build-scripts/build.sh @@ -22,6 +22,6 @@ cp "sqlcipher/sqlite3.c" sqlcipher3/ cp "sqlcipher/sqlite3.h" sqlcipher3/ # Create the wheels and strip symbols to produce manylinux wheels. -docker run -it -v $(pwd):/io quay.io/pypa/manylinux_2_24_x86_64 /io/_build_wheels.sh +docker run -it -v $(pwd):/io quay.io/pypa/manylinux2014_x86_64 /io/_build_wheels.sh sudo rm ./wheelhouse/*-linux_* diff --git a/setup.py b/setup.py index dd073e1..96dc325 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ # If you need to change anything, it should be enough to change setup.cfg. PACKAGE_NAME = 'sqlcipher3' -VERSION = '0.5.2' +VERSION = '0.5.3' # define sqlite sources sources = [os.path.join('src', source) diff --git a/test/__init__.py b/tests/__init__.py similarity index 100% rename from test/__init__.py rename to tests/__init__.py diff --git a/test/__main__.py b/tests/__main__.py similarity index 69% rename from test/__main__.py rename to tests/__main__.py index c05ca0c..1a43df9 100644 --- a/test/__main__.py +++ b/tests/__main__.py @@ -2,14 +2,14 @@ import sys import unittest -from test.backup import suite as backup_suite -from test.dbapi import suite as dbapi_suite -from test.factory import suite as factory_suite -from test.hooks import suite as hooks_suite -from test.regression import suite as regression_suite -from test.transactions import suite as transactions_suite -from test.ttypes import suite as types_suite -from test.userfunctions import suite as userfunctions_suite +from tests.backup import suite as backup_suite +from tests.dbapi import suite as dbapi_suite +from tests.factory import suite as factory_suite +from tests.hooks import suite as hooks_suite +from tests.regression import suite as regression_suite +from tests.transactions import suite as transactions_suite +from tests.ttypes import suite as types_suite +from tests.userfunctions import suite as userfunctions_suite def test(verbosity=1, failfast=False): diff --git a/test/backup.py b/tests/backup.py similarity index 100% rename from test/backup.py rename to tests/backup.py diff --git a/test/dbapi.py b/tests/dbapi.py similarity index 100% rename from test/dbapi.py rename to tests/dbapi.py diff --git a/test/factory.py b/tests/factory.py similarity index 100% rename from test/factory.py rename to tests/factory.py diff --git a/test/hooks.py b/tests/hooks.py similarity index 100% rename from test/hooks.py rename to tests/hooks.py diff --git a/test/regression.py b/tests/regression.py similarity index 100% rename from test/regression.py rename to tests/regression.py diff --git a/test/transactions.py b/tests/transactions.py similarity index 100% rename from test/transactions.py rename to tests/transactions.py diff --git a/test/ttypes.py b/tests/ttypes.py similarity index 100% rename from test/ttypes.py rename to tests/ttypes.py diff --git a/test/userfunctions.py b/tests/userfunctions.py similarity index 100% rename from test/userfunctions.py rename to tests/userfunctions.py