Skip to content

Commit

Permalink
No longer rely on distutils for CompileError
Browse files Browse the repository at this point in the history
Related to #2204
  • Loading branch information
serge-sans-paille committed May 3, 2024
1 parent b37f584 commit 3923bb0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pythran/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import pythran

from pythran.errors import PythranSyntaxError, PythranTypeError
from distutils.errors import CompileError
from setuptools.errors import CompileError

logger = logging.getLogger("pythran")

Expand Down
2 changes: 1 addition & 1 deletion pythran/tests/test_openmp.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
from distutils.errors import CompileError
from setuptools.errors import CompileError
from pythran.tests import TestFromDir
import os
import pythran
Expand Down
9 changes: 3 additions & 6 deletions pythran/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@
from pythran.utils import cxxid
import pythran.frontend as frontend

try:
from distutils.errors import CompileError
from distutils import sysconfig
except ImportError:
from setuptools.errors import CompileError
from setuptools._distutils import sysconfig
from setuptools.errors import CompileError
from setuptools._distutils import sysconfig

try:
# `numpy.distutils is deprecated, may not be present, or broken
from numpy.distutils.core import setup
Expand Down

0 comments on commit 3923bb0

Please sign in to comment.