diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index a851a3df..c6a60c0d 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.10", "3.11"] + python-version: ["3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index 7ab43888..cb1970b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ # We need mypy-protobuf during build - it is a plugin to protoc. # The version requirement is iffy, there is no way to know whether # this is going to be compatible to the installed protoc or not. -requires = ["setuptools>=55.0.0", "wheel", "mypy-protobuf~=3.4.0"] +requires = ["setuptools>=75.6.0", "wheel", "mypy-protobuf~=3.4.0"] build-backend = 'setuptools.build_meta' [tool.black] diff --git a/setup.cfg b/setup.cfg index 9fcbdb27..d3a24a7c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -67,7 +67,7 @@ dev = %(cli)s tox pandas = - pandas ~= 2.0.1 + pandas ~= 2.2.0 cli = click click-log diff --git a/setup.py b/setup.py index 5e61d0d0..7e5664d6 100755 --- a/setup.py +++ b/setup.py @@ -13,13 +13,11 @@ import logging import os import re +import shutil import subprocess import sys from bisect import bisect_right from datetime import datetime -from distutils.errors import DistutilsFileError -from distutils.log import ERROR, INFO -from distutils.spawn import find_executable from operator import itemgetter from typing import Any, Iterable, Optional @@ -29,6 +27,9 @@ metricq_package_dir = "metricq" protobuf_version_module_file = "_protobuf_version.py" +INFO = 2 +ERROR = 4 + class ProtocWrapper: @staticmethod @@ -36,7 +37,7 @@ def _find_protoc() -> str | None: if "PROTOC" in os.environ and os.path.exists(os.environ["PROTOC"]): return os.environ["PROTOC"] - return find_executable("protoc") + return shutil.which("protoc") @staticmethod def _get_protoc_version(protoc: str) -> tuple[int, int, int]: @@ -78,7 +79,7 @@ def _assert_has_executable(self) -> None: os.environ.get("PROTOC", "Not set") ) ) - raise DistutilsFileError("protoc not found") + raise ValueError("protoc not found") @property def executable(self) -> str: @@ -242,7 +243,7 @@ def _protobuf_filenames(self) -> Iterable[str]: if not filenames: self.error(f"no protobuf files found in {self.proto_dir}") - raise DistutilsFileError(f"No protobuf files found in {self.proto_dir}") + raise ValueError(f"No protobuf files found in {self.proto_dir}") self.info(f"found protobuf files: {filenames}")