mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-13 01:05:48 +03:00
Only import distutils when type checking
This commit is contained in:
parent
cff21412c5
commit
e2a96a5c2c
6
setup.py
6
setup.py
|
@ -8,7 +8,6 @@
|
|||
# ------------------------------
|
||||
from __future__ import annotations
|
||||
|
||||
import distutils.ccompiler
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
|
@ -18,12 +17,15 @@ import sys
|
|||
import tempfile
|
||||
import warnings
|
||||
from collections.abc import Iterator
|
||||
from typing import Any
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from setuptools import Extension, setup
|
||||
from setuptools.command.build_ext import build_ext
|
||||
from setuptools.errors import CompileError
|
||||
|
||||
if TYPE_CHECKING:
|
||||
import distutils.ccompiler
|
||||
|
||||
|
||||
def get_version() -> str:
|
||||
version_file = "src/PIL/_version.py"
|
||||
|
|
Loading…
Reference in New Issue
Block a user