diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 447f0796c..26fe992bc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -116,14 +116,24 @@ jobs: platforms: all - name: Build and test wheels - uses: pypa/cibuildwheel@v2.16.5 + uses: pypa/cibuildwheel@v4.3.3 env: # configure cibuildwheel to build native archs ('auto'), and some # emulated ones CIBW_ARCHS_LINUX: "auto aarch64" CIBW_ARCHS_MACOS: "universal2" - CIBW_BUILD: "cp39-*" + # The wheel is abi3, so it is built once on cp39. cibuildwheel skips + # the build for cp315 because the abi3 wheel already covers it, and + # only reruns the tests there, so the oldest and newest supported + # interpreters both load the extension. + CIBW_BUILD: "cp39-* cp315-*" CIBW_SKIP: "pp* *-musllinux* *-manylinux_i686" + # cibuildwheel v3+ builds on manylinux_2_28 (glibc 2.28) by default. + # Pin manylinux2014 (glibc 2.17) so CentOS/RHEL 7, Amazon Linux 2 and + # Ubuntu 18.04 still get the C extension instead of falling back to + # the pure-Python wheel without any warning. + CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 + CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014 CIBW_TEST_COMMAND: "pytest -v --pyargs singlestoredb.tests.test_basics" # xdist because pyproject.toml's addopts sets -n/--dist, and PYTHONPATH # points --pyargs at the workspace, so that pyproject is the inifile diff --git a/accel.c b/accel.c index 075276287..dd53bd619 100644 --- a/accel.c +++ b/accel.c @@ -371,7 +371,7 @@ static PyObject *create_numpy_array(PyObject *py_memview, char *data_format, int // Returns a newly allocated UTF-8 copy of `unicode`; the caller owns it // and must free() it. -char *_PyUnicode_AsUTF8(PyObject *unicode) { +static char *_PyUnicode_AsUTF8(PyObject *unicode) { PyObject *bytes = PyUnicode_AsEncodedString(unicode, "utf-8", "strict"); if (!bytes) return NULL; diff --git a/pyproject.toml b/pyproject.toml index f7a140b75..0acbbc149 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["build", "setuptools>=61.0", "wheel"] +requires = ["build", "setuptools>=77.0"] build-backend = "setuptools.build_meta" [project] @@ -7,7 +7,8 @@ name = "singlestoredb" version = "1.18.2" description = "Interface to the SingleStoreDB database and workspace management APIs" readme = {file = "README.md", content-type = "text/markdown"} -license = {text = "Apache-2.0"} +license = "Apache-2.0" +license-files = ["LICENSE"] authors = [ {name = "SingleStore", email = "support@singlestore.com"} ] @@ -69,7 +70,7 @@ docs = [ ] build = [ "build", - "setuptools>=61.0", + "setuptools>=77.0", "wheel", ] dev = [ diff --git a/setup.py b/setup.py index 9ace49851..44458593a 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ from setuptools import Extension from setuptools import setup -from wheel.bdist_wheel import bdist_wheel +from setuptools.command.bdist_wheel import bdist_wheel py_limited_api = '0x03080000'