Skip to content

Commit

Permalink
Add check for compatible setuptools version.
Browse files Browse the repository at this point in the history
In order to avoid a recursive dependency issue when parsing
the aiohttp version during install setuptools needs:
pypa/setuptools@c457e68

This implies we need setuptools 46.4.0 or newer.
  • Loading branch information
jameshilliard committed Nov 2, 2021
1 parent 7f0cd0d commit f093ca3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES/6205.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add check for compatible ``setuptools`` version.
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ issue_format = "`#{issue} <https://github.com/aio-libs/aiohttp/issues/{issue}>`_
test-command = ""
# don't build PyPy wheels, install from source instead
skip = "pp*"

[build-system]
requires = [
"setuptools>=46.4.0",
]
build-backend = "setuptools.build_meta"
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import os
import pathlib
import sys
from distutils.version import StrictVersion

from setuptools import Extension, setup
from setuptools import Extension, __version__ as setuptools_version, setup

if sys.version_info < (3, 7):
raise RuntimeError("aiohttp 4.x requires Python 3.7+")


if StrictVersion(setuptools_version) < StrictVersion("46.4.0"):
raise RuntimeError("aiohttp 4.x requires setuptools 46.4.0+")


NO_EXTENSIONS = bool(os.environ.get("AIOHTTP_NO_EXTENSIONS")) # type: bool
HERE = pathlib.Path(__file__).parent
IS_GIT_REPO = (HERE / ".git").exists()
Expand Down

0 comments on commit f093ca3

Please sign in to comment.