Core: require setuptools>=75 (#5346)

Setuptools 70.3.0 seems to not work for us.
This commit is contained in:
black-sliver
2025-08-19 17:35:50 +00:00
committed by GitHub
parent 48906de873
commit 16d5b453a7
3 changed files with 4 additions and 4 deletions

View File

@@ -28,7 +28,7 @@ COPY requirements.txt WebHostLib/requirements.txt
RUN pip install --no-cache-dir -r \ RUN pip install --no-cache-dir -r \
WebHostLib/requirements.txt \ WebHostLib/requirements.txt \
"setuptools<81" "setuptools>=75,<81"
COPY _speedups.pyx . COPY _speedups.pyx .
COPY intset.h . COPY intset.h .

View File

@@ -74,11 +74,11 @@ def update_command():
def install_pkg_resources(yes=False): def install_pkg_resources(yes=False):
try: try:
import pkg_resources # noqa: F401 import pkg_resources # noqa: F401
except ImportError: except (AttributeError, ImportError):
check_pip() check_pip()
if not yes: if not yes:
confirm("pkg_resources not found, press enter to install it") confirm("pkg_resources not found, press enter to install it")
subprocess.call([sys.executable, "-m", "pip", "install", "--upgrade", "setuptools<81"]) subprocess.call([sys.executable, "-m", "pip", "install", "--upgrade", "setuptools>=75,<81"])
def update(yes: bool = False, force: bool = False) -> None: def update(yes: bool = False, force: bool = False) -> None:

View File

@@ -30,7 +30,7 @@ try:
install_cx_freeze = False install_cx_freeze = False
except pkg_resources.ResolutionError: except pkg_resources.ResolutionError:
install_cx_freeze = True install_cx_freeze = True
except ImportError: except (AttributeError, ImportError):
install_cx_freeze = True install_cx_freeze = True
pkg_resources = None # type: ignore[assignment] pkg_resources = None # type: ignore[assignment]