From fcaa2e93dc97e27b5579c5e3a5852b46c13c4444 Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Sun, 9 Jun 2024 16:05:04 +0200 Subject: [PATCH] Bump setuptools version to >=59 --- pyproject.toml | 4 ++-- pytensor/link/c/exceptions.py | 19 +------------------ 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a3c951ca4f..0bfcdcf875 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "setuptools>=48.0.0", + "setuptools>=59.0.0", "cython", "numpy>=1.17.0", "versioneer[toml]>=0.28", @@ -46,7 +46,7 @@ keywords = [ "differentiation", ] dependencies = [ - "setuptools>=48.0.0", + "setuptools>=59.0.0", "scipy>=0.14", "numpy>=1.17.0,<2", "filelock", diff --git a/pytensor/link/c/exceptions.py b/pytensor/link/c/exceptions.py index de4ac39ca3..8dc2fa1c7a 100644 --- a/pytensor/link/c/exceptions.py +++ b/pytensor/link/c/exceptions.py @@ -1,21 +1,4 @@ -try: - from setuptools.errors import CompileError as BaseCompileError -except ImportError: - import warnings - from distutils.errors import CompileError as BaseCompileError # type: ignore - from importlib.metadata import version - - # These exception classes were made available in setuptools - # since v59.0.0 via - # in preparation for distutils deprecation. Complain loudly if they - # are not available. - setuptools_version = version("setuptools") - warnings.warn( - f"You appear to be using an ancient version of setuptools: " - f"v{setuptools_version}. Please upgrade to at least v59.0.0. " - f"Support for this version of setuptools is provisionary and " - f"may be removed without warning in the future." - ) +from setuptools.errors import CompileError as BaseCompileError class MissingGXX(Exception):