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 b3ef236
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
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.
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
import pathlib
import sys

from distutils.version import StrictVersion

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

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 b3ef236

Please sign in to comment.