From 6bdbe826ab0ae214e2f06ccb2f906e84238728fe Mon Sep 17 00:00:00 2001 From: Bilal Retiat Date: Mon, 23 Feb 2026 14:40:27 +0400 Subject: [PATCH 1/7] chore(ci): drop Python 3.9 support and add Python 3.14 --- .github/workflows/benchmarks.yml | 2 +- .github/workflows/publish_wheels.yml | 4 ++-- .github/workflows/tests.yml | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index a33fd737..a1a19157 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.13"] + python-version: ["3.14"] os: [macos-latest, ubuntu-latest, windows-latest] steps: diff --git a/.github/workflows/publish_wheels.yml b/.github/workflows/publish_wheels.yml index c7aef874..aa7ae54e 100644 --- a/.github/workflows/publish_wheels.yml +++ b/.github/workflows/publish_wheels.yml @@ -15,11 +15,11 @@ jobs: - [macos-13, macosx_x86_64, "13.0"] - [macos-14, macosx_arm64, "14.0"] python: - - cp39 - cp310 - cp311 - cp312 - cp313 + - cp314 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -50,7 +50,7 @@ jobs: - name: Set up Python uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 with: - python-version: "3.13" + python-version: "3.14" - name: Install twine run: python -m pip install --upgrade twine diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a902ad33..4ac9c271 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.13"] + python-version: ["3.14"] os: [ubuntu-latest] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -34,7 +34,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] os: [macos-latest, ubuntu-latest, windows-latest] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -86,7 +86,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] os: [macos-latest, ubuntu-latest, windows-latest] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 From 83206575bb26756fb0bc732561fa6415c7044114 Mon Sep 17 00:00:00 2001 From: Bilal Retiat Date: Mon, 23 Feb 2026 14:42:42 +0400 Subject: [PATCH 2/7] chore(tenseal): bump tenseal version from 0.3.16 to 0.3.17 --- tenseal/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tenseal/version.py b/tenseal/version.py index 39774cfa..f7e5c1d8 100644 --- a/tenseal/version.py +++ b/tenseal/version.py @@ -1 +1 @@ -__version__ = "0.3.16" +__version__ = "0.3.17" From d77688bf5bf92d652b9dfb96d248301b39bd3f44 Mon Sep 17 00:00:00 2001 From: Bilal Retiat Date: Mon, 23 Feb 2026 15:05:31 +0400 Subject: [PATCH 3/7] chore(common): use the latest version of black code formatter --- requirements_dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_dev.txt b/requirements_dev.txt index 0222186e..90c9af50 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,4 +1,4 @@ -black==22.3.0 +black bumpversion flake8 numpy From 12fe8faaa06fc6a89003dfe17f40125078a196f7 Mon Sep 17 00:00:00 2001 From: philomath213 Date: Fri, 27 Feb 2026 15:29:53 +0400 Subject: [PATCH 4/7] chore(common): pin black version to 26.1.0 --- pyproject.toml | 2 +- requirements_dev.lock | 148 ++++++++++++++++++++++++------------------ requirements_dev.txt | 2 +- 3 files changed, 88 insertions(+), 64 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 927d158a..582a8982 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.black] -target-version = ['py36', 'py37'] +target-version = ['py310', 'py311', 'py312', 'py313', 'py314'] line-length = 100 exclude = ''' ( diff --git a/requirements_dev.lock b/requirements_dev.lock index 2cd6787d..52401376 100644 --- a/requirements_dev.lock +++ b/requirements_dev.lock @@ -1,68 +1,99 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile requirements_dev.in -# ---find-links file:///home/bcebere/.cache/pip/wheelhouse - +# This file was autogenerated by uv via the following command: +# uv pip compile requirements_dev.txt -o requirements_dev.lock attrs==22.2.0 # via pytest -black==22.3.0 - # via -r requirements_dev.in +black==26.1.0 + # via -r requirements_dev.txt bump2version==1.0.1 # via bumpversion bumpversion==0.6.0 - # via -r requirements_dev.in -certifi==2022.12.7 - # via requests -charset-normalizer==2.1.1 - # via requests + # via -r requirements_dev.txt click==8.1.3 # via black -py==1.11.0 -coverage[toml]==7.0.3 +coverage==7.0.3 # via pytest-cov -exceptiongroup==1.1.0 - # via pytest +cuda-bindings==12.9.4 + # via torch +cuda-pathfinder==1.4.0 + # via cuda-bindings +filelock==3.24.3 + # via torch flake8==6.0.0 - # via -r requirements_dev.in -idna==3.4 - # via requests + # via -r requirements_dev.txt +fsspec==2026.2.0 + # via torch imageio==2.23.0 # via scikit-image iniconfig==1.1.1 # via pytest +jinja2==3.1.6 + # via torch +markupsafe==3.0.3 + # via jinja2 mccabe==0.7.0 # via flake8 +mpmath==1.3.0 + # via sympy mypy-extensions==0.4.3 # via black networkx==2.8.8 - # via scikit-image + # via + # scikit-image + # torch numpy==1.24.1 # via - # -r requirements_dev.in + # -r requirements_dev.txt # imageio # pywavelets # scikit-image # scipy # tifffile # torchvision -nvidia-cublas-cu11==11.10.3.66 +nvidia-cublas-cu12==12.8.4.1 # via - # nvidia-cudnn-cu11 + # nvidia-cudnn-cu12 + # nvidia-cusolver-cu12 # torch -nvidia-cuda-nvrtc-cu11==11.7.99 +nvidia-cuda-cupti-cu12==12.8.90 # via torch -nvidia-cuda-runtime-cu11==11.7.99 +nvidia-cuda-nvrtc-cu12==12.8.93 # via torch -nvidia-cudnn-cu11==8.5.0.96 +nvidia-cuda-runtime-cu12==12.8.90 + # via torch +nvidia-cudnn-cu12==9.10.2.21 + # via torch +nvidia-cufft-cu12==11.3.3.83 + # via torch +nvidia-cufile-cu12==1.13.1.3 + # via torch +nvidia-curand-cu12==10.3.9.90 + # via torch +nvidia-cusolver-cu12==11.7.3.90 + # via torch +nvidia-cusparse-cu12==12.5.8.93 + # via + # nvidia-cusolver-cu12 + # torch +nvidia-cusparselt-cu12==0.7.1 + # via torch +nvidia-nccl-cu12==2.27.5 + # via torch +nvidia-nvjitlink-cu12==12.8.93 + # via + # nvidia-cufft-cu12 + # nvidia-cusolver-cu12 + # nvidia-cusparse-cu12 + # torch +nvidia-nvshmem-cu12==3.4.5 + # via torch +nvidia-nvtx-cu12==12.8.90 # via torch packaging==22.0 # via + # black # pytest # scikit-image -pathspec==0.10.3 +pathspec==1.0.4 # via black pillow==9.4.0 # via @@ -73,6 +104,8 @@ platformdirs==2.6.2 # via black pluggy==1.0.0 # via pytest +py==1.11.0 + # via -r requirements_dev.txt py-cpuinfo==9.0.0 # via pytest-benchmark pycodestyle==2.10.0 @@ -81,53 +114,44 @@ pyflakes==3.0.1 # via flake8 pygal==3.0.0 # via - # -r requirements_dev.in + # -r requirements_dev.txt # pytest-benchmark pygaljs==1.0.2 # via - # -r requirements_dev.in + # -r requirements_dev.txt # pytest-benchmark pytest==7.2.0 # via - # -r requirements_dev.in + # -r requirements_dev.txt # pytest-benchmark # pytest-cov -pytest-benchmark[histogram]==4.0.0 - # via -r requirements_dev.in +pytest-benchmark==4.0.0 + # via -r requirements_dev.txt pytest-cov==4.0.0 - # via -r requirements_dev.in + # via -r requirements_dev.txt +pytokens==0.4.1 + # via black pywavelets==1.4.1 # via scikit-image -requests==2.28.1 - # via torchvision scikit-image==0.19.3 - # via -r requirements_dev.in + # via -r requirements_dev.txt scipy==1.10.0 # via scikit-image +setuptools==82.0.0 + # via + # -r requirements_dev.txt + # torch +sympy==1.14.0 + # via torch tifffile==2022.10.10 # via scikit-image -tomli==2.0.1 +torch==2.10.0 # via - # black - # coverage - # pytest -torch==1.13.1 - # via - # -r requirements_dev.in + # -r requirements_dev.txt # torchvision -torchvision==0.14.1 - # via -r requirements_dev.in -typing-extensions==4.4.0 - # via - # black - # torch - # torchvision -urllib3==1.26.13 - # via requests -wheel==0.38.4 - # via - # nvidia-cublas-cu11 - # nvidia-cuda-runtime-cu11 - -# The following packages are considered to be unsafe in a requirements file: -# setuptools +torchvision==0.25.0 + # via -r requirements_dev.txt +triton==3.6.0 + # via torch +typing-extensions==4.15.0 + # via torch diff --git a/requirements_dev.txt b/requirements_dev.txt index 90c9af50..78a556e6 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,4 +1,4 @@ -black +black==26.1.0 bumpversion flake8 numpy From 865ff570bbfabdbbe01ebf7150b8f9e0ebeea398 Mon Sep 17 00:00:00 2001 From: philomath213 Date: Fri, 27 Feb 2026 15:31:13 +0400 Subject: [PATCH 5/7] refactor(tenseal): linting Python scripts --- tenseal/__init__.py | 3 +-- tenseal/enc_context.py | 1 + tenseal/sealapi/__init__.py | 3 +-- tenseal/tensors/__init__.py | 1 + tenseal/tensors/abstract_tensor.py | 1 + tenseal/tensors/bfvtensor.py | 3 +-- tenseal/tensors/bfvvector.py | 4 ++-- tenseal/tensors/ckkstensor.py | 3 +-- tenseal/tensors/ckksvector.py | 4 ++-- tenseal/tensors/plaintensor.py | 4 ++-- tests/python/sealapi/main.py | 4 ++-- tests/python/sealapi/test_context.py | 2 +- tests/python/sealapi/test_evaluator.py | 12 ++++++------ tests/python/tenseal/main.py | 4 ++-- tests/python/tenseal/tensors/test_bfv_tensor.py | 3 +-- tests/python/tenseal/tensors/test_ckks_tensor.py | 3 +-- tests/python/tenseal/test_enc_dec.py | 1 - 17 files changed, 26 insertions(+), 30 deletions(-) diff --git a/tenseal/__init__.py b/tenseal/__init__.py index 2a745cda..9d20412b 100644 --- a/tenseal/__init__.py +++ b/tenseal/__init__.py @@ -1,5 +1,4 @@ -"""TenSEAL is a library for doing homomorphic encryption operation on tensors. -""" +"""TenSEAL is a library for doing homomorphic encryption operation on tensors.""" try: import _tenseal_cpp as _ts_cpp diff --git a/tenseal/enc_context.py b/tenseal/enc_context.py index 0619a713..17e700c7 100644 --- a/tenseal/enc_context.py +++ b/tenseal/enc_context.py @@ -1,6 +1,7 @@ """The Context manages everything related to the encrypted computation, including keys, which optimization should be enabled, and how many threads should run for a parallel computation. """ + import multiprocessing from enum import Enum from typing import List, Union diff --git a/tenseal/sealapi/__init__.py b/tenseal/sealapi/__init__.py index 61188cca..a26f842d 100644 --- a/tenseal/sealapi/__init__.py +++ b/tenseal/sealapi/__init__.py @@ -1,5 +1,4 @@ -"""SEAL API bindings. -""" +"""SEAL API bindings.""" try: import _sealapi_cpp diff --git a/tenseal/tensors/__init__.py b/tenseal/tensors/__init__.py index ac6999d6..b24e4162 100644 --- a/tenseal/tensors/__init__.py +++ b/tenseal/tensors/__init__.py @@ -6,6 +6,7 @@ - BFVVectpr: Vector of values encrypted using BFV. - PlainTensor: N-dimensonal tensor, serving as the main type to interact with encrypted tensors. """ + from tenseal.tensors.ckkstensor import CKKSTensor from tenseal.tensors.ckksvector import CKKSVector from tenseal.tensors.bfvvector import BFVVector diff --git a/tenseal/tensors/abstract_tensor.py b/tenseal/tensors/abstract_tensor.py index cac1d0a0..40e5aa40 100644 --- a/tenseal/tensors/abstract_tensor.py +++ b/tenseal/tensors/abstract_tensor.py @@ -1,4 +1,5 @@ """Abstract tensor class that implements common tensor methods""" + from typing import List, Union import tenseal as ts from abc import ABC diff --git a/tenseal/tensors/bfvtensor.py b/tenseal/tensors/bfvtensor.py index a388cba0..02a5b669 100644 --- a/tenseal/tensors/bfvtensor.py +++ b/tenseal/tensors/bfvtensor.py @@ -1,5 +1,4 @@ -"""N-dimensional tensor storing value in encrypted form using BFV. -""" +"""N-dimensional tensor storing value in encrypted form using BFV.""" from typing import List import tenseal as ts diff --git a/tenseal/tensors/bfvvector.py b/tenseal/tensors/bfvvector.py index d68cdc03..f1234002 100644 --- a/tenseal/tensors/bfvvector.py +++ b/tenseal/tensors/bfvvector.py @@ -1,5 +1,5 @@ -"""Vector of values encrypted using BFV. -""" +"""Vector of values encrypted using BFV.""" + from typing import List import tenseal as ts from tenseal.tensors.abstract_tensor import AbstractTensor diff --git a/tenseal/tensors/ckkstensor.py b/tenseal/tensors/ckkstensor.py index 4a918c47..86e8ac10 100644 --- a/tenseal/tensors/ckkstensor.py +++ b/tenseal/tensors/ckkstensor.py @@ -1,5 +1,4 @@ -"""N-dimensional tensor storing value in encrypted form using CKKS. -""" +"""N-dimensional tensor storing value in encrypted form using CKKS.""" from typing import List import tenseal as ts diff --git a/tenseal/tensors/ckksvector.py b/tenseal/tensors/ckksvector.py index 4b225167..d5b39d6a 100644 --- a/tenseal/tensors/ckksvector.py +++ b/tenseal/tensors/ckksvector.py @@ -1,5 +1,5 @@ -"""Vector of values encrypted using CKKS. Less flexible, but more efficient than CKKSTensor. -""" +"""Vector of values encrypted using CKKS. Less flexible, but more efficient than CKKSTensor.""" + from typing import List import tenseal as ts from tenseal.tensors.abstract_tensor import AbstractTensor diff --git a/tenseal/tensors/plaintensor.py b/tenseal/tensors/plaintensor.py index fbf24622..446ad1df 100644 --- a/tenseal/tensors/plaintensor.py +++ b/tenseal/tensors/plaintensor.py @@ -1,5 +1,5 @@ -"""N-dimensonal tensor, serving as the main type to interact with encrypted tensors. -""" +"""N-dimensonal tensor, serving as the main type to interact with encrypted tensors.""" + from typing import List, Union import tenseal as ts import numpy as np diff --git a/tests/python/sealapi/main.py b/tests/python/sealapi/main.py index 8b7fdb7e..3acd34fe 100644 --- a/tests/python/sealapi/main.py +++ b/tests/python/sealapi/main.py @@ -1,5 +1,5 @@ -"""Test runner required by Bazel py_test rule. -""" +"""Test runner required by Bazel py_test rule.""" + import sys import os import pytest diff --git a/tests/python/sealapi/test_context.py b/tests/python/sealapi/test_context.py index 734ac4aa..2cc46317 100644 --- a/tests/python/sealapi/test_context.py +++ b/tests/python/sealapi/test_context.py @@ -165,7 +165,7 @@ def context_data_sanity(ctx_data, ctx_alias, index): assert qualifiers.using_fast_plain_lift == (scheme == sealapi.SCHEME_TYPE.BFV) assert qualifiers.sec_level == sec_level - for (parms_id, ctx_data, index) in [ + for parms_id, ctx_data, index in [ (sealctx.first_parms_id(), sealctx.first_context_data(), coeff_mod_count - 2), (sealctx.last_parms_id(), sealctx.last_context_data(), 0), (sealctx.key_parms_id(), sealctx.key_context_data(), coeff_mod_count - 1), diff --git a/tests/python/sealapi/test_evaluator.py b/tests/python/sealapi/test_evaluator.py index 89b94e64..7186d7d7 100644 --- a/tests/python/sealapi/test_evaluator.py +++ b/tests/python/sealapi/test_evaluator.py @@ -26,7 +26,7 @@ def test_evaluator_unary(scheme, ctx, left): evaluator, encryptor, decryptor, _ = helper_generate_evaluator(ctx) # unary in place - for (op, expected) in [ + for op, expected in [ (evaluator.negate_inplace, [-v for v in left]), (evaluator.square_inplace, [v * v for v in left]), (evaluator.mod_switch_to_next_inplace, left), @@ -44,7 +44,7 @@ def test_evaluator_unary(scheme, ctx, left): is_close_enough(out[: len(left)], expected) # unary - for (op, expected) in [ + for op, expected in [ (evaluator.negate, [-v for v in left]), (evaluator.square, [v * v for v in left]), (evaluator.mod_switch_to_next, left), @@ -86,7 +86,7 @@ def test_evaluator_binary(scheme, ctx, left, right): evaluator, encryptor, decryptor, _ = helper_generate_evaluator(ctx) # binary in place - for (op, expected) in [ + for op, expected in [ (evaluator.add_inplace, [left[idx] + right[idx] for idx in range(len(left))]), (evaluator.sub_inplace, [left[idx] - right[idx] for idx in range(len(left))]), (evaluator.multiply_inplace, [left[idx] * right[idx] for idx in range(len(left))]), @@ -109,7 +109,7 @@ def test_evaluator_binary(scheme, ctx, left, right): is_close_enough(out[: len(left)], expected) # binary - for (op, expected) in [ + for op, expected in [ (evaluator.add, [left[idx] + right[idx] for idx in range(len(left))]), (evaluator.sub, [left[idx] - right[idx] for idx in range(len(left))]), (evaluator.multiply, [left[idx] * right[idx] for idx in range(len(left))]), @@ -153,7 +153,7 @@ def test_evaluator_plain(scheme, ctx, left): evaluator, encryptor, decryptor, _ = helper_generate_evaluator(ctx) # plain op in place - for (op, plain, expected) in [ + for op, plain, expected in [ (evaluator.add_plain_inplace, [100] * len(left), [100 + v for v in left]), (evaluator.sub_plain_inplace, [5] * len(left), [v - 5 for v in left]), (evaluator.multiply_plain_inplace, [2] * len(left), [2 * v for v in left]), @@ -173,7 +173,7 @@ def test_evaluator_plain(scheme, ctx, left): is_close_enough(out[: len(left)], expected) # plain op - for (op, plain, expected) in [ + for op, plain, expected in [ (evaluator.add_plain, [100] * len(left), [100 + v for v in left]), (evaluator.sub_plain, [5] * len(left), [v - 5 for v in left]), (evaluator.multiply_plain, [2] * len(left), [2 * v for v in left]), diff --git a/tests/python/tenseal/main.py b/tests/python/tenseal/main.py index 550294f2..1aac3b77 100644 --- a/tests/python/tenseal/main.py +++ b/tests/python/tenseal/main.py @@ -1,5 +1,5 @@ -"""Test runner required by Bazel py_test rule. -""" +"""Test runner required by Bazel py_test rule.""" + import sys import os import pytest diff --git a/tests/python/tenseal/tensors/test_bfv_tensor.py b/tests/python/tenseal/tensors/test_bfv_tensor.py index c3bd90f7..acd2b8b7 100644 --- a/tests/python/tenseal/tensors/test_bfv_tensor.py +++ b/tests/python/tenseal/tensors/test_bfv_tensor.py @@ -8,7 +8,6 @@ import tenseal as ts - SHAPES = [[1], [2], [10], [2, 2], [3, 5], [2, 3, 4], [2, 3, 4, 5], [2, 3, 4, 5, 6]] BROADCAST_SHAPES = [ @@ -173,7 +172,7 @@ def test_sum_batch(context, data, reshape_first, precision): @pytest.mark.parametrize( - "data", [(ts.plain_tensor([i for i in range(8)], shape=[2, 2, 2], dtype="int"))] + "data", [ts.plain_tensor([i for i in range(8)], shape=[2, 2, 2], dtype="int")] ) @pytest.mark.parametrize("batch", [True, False]) def test_sum_fail(context, data, batch, precision): diff --git a/tests/python/tenseal/tensors/test_ckks_tensor.py b/tests/python/tenseal/tensors/test_ckks_tensor.py index 74984098..67d48c39 100644 --- a/tests/python/tenseal/tensors/test_ckks_tensor.py +++ b/tests/python/tenseal/tensors/test_ckks_tensor.py @@ -8,7 +8,6 @@ import tenseal as ts - SHAPES = [[1], [2], [10], [2, 2], [3, 5], [2, 3, 4], [2, 3, 4, 5], [2, 3, 4, 5, 6]] BROADCAST_SHAPES = [ @@ -260,7 +259,7 @@ def test_sum_batch(context, data, reshape_first, precision): ), "Something went wrong in memory." -@pytest.mark.parametrize("data", [(ts.plain_tensor([i for i in range(8)], shape=[2, 2, 2]))]) +@pytest.mark.parametrize("data", [ts.plain_tensor([i for i in range(8)], shape=[2, 2, 2])]) @pytest.mark.parametrize("batch", [True, False]) def test_sum_fail(context, data, batch, precision): context.generate_galois_keys() diff --git a/tests/python/tenseal/test_enc_dec.py b/tests/python/tenseal/test_enc_dec.py index 90153f6b..ba2969ec 100644 --- a/tests/python/tenseal/test_enc_dec.py +++ b/tests/python/tenseal/test_enc_dec.py @@ -2,7 +2,6 @@ import tenseal as ts import numpy as np - PLAIN_VEC = [[0], [-1], [1], [73, 81, 90], [-73, -81, -90]] PLAIN_EMPTY_VEC = [[]] COEFF_MOD_BIT_SIZES = [60, 40, 40, 60] From 2165964a8b031f3577851b23d3de51fce0646e88 Mon Sep 17 00:00:00 2001 From: philomath213 Date: Fri, 27 Feb 2026 23:26:19 +0400 Subject: [PATCH 6/7] chore(tenseal): set the cmake minimum required version to 3.5 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 92f4c724..bd4a37bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.14) +cmake_minimum_required(VERSION 3.5) project(tenseal) From ace31c18075d9c28bb3c8d3bac3fca7fa6a534f7 Mon Sep 17 00:00:00 2001 From: philomath213 Date: Fri, 27 Feb 2026 23:43:38 +0400 Subject: [PATCH 7/7] chore(tenseal): set the cmake minimum required version to 3.5 in setup.py --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index b66a2b65..028cc2e4 100644 --- a/setup.py +++ b/setup.py @@ -39,8 +39,8 @@ def run(self): if platform.system() == "Windows": cmake_version = LooseVersion(re.search(r"version\s*([\d.]+)", out.decode()).group(1)) - if cmake_version < "3.1.0": - raise RuntimeError("CMake >= 3.1.0 is required on Windows") + if cmake_version < "3.5.0": + raise RuntimeError("CMake >= 3.5.0 is required on Windows") for ext in self.extensions: self.build_extension(ext) @@ -52,6 +52,7 @@ def build_extension(self, ext): "-DSEAL_USE_INTEL_HEXL=" + hexl, "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=" + extdir, "-DPYTHON_EXECUTABLE=" + sys.executable, + '-DCMAKE_POLICY_VERSION_MINIMUM=3.5', ] cfg = "Debug" if self.debug else "Release"