Skip to content

Commit f833964

Browse files
Rongronggg9elprans
authored andcommitted
Bump setuptools dependency to 61
PEP 621 is supported in setuptools starting from version 61, not 60.
1 parent 89d5bd0 commit f833964

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ classifiers = [
2828
]
2929

3030
[project.urls]
31-
github = "https://github.com/MagicStack/asyncpg"
31+
homepage = "https://github.com/MagicStack/asyncpg"
32+
documentation = "https://magicstack.github.io/asyncpg/current/"
33+
repository = "https://github.com/MagicStack/asyncpg"
34+
changelog = "https://github.com/MagicStack/asyncpg/releases"
3235

3336
[project.optional-dependencies]
3437
test = [
@@ -43,14 +46,15 @@ docs = [
4346

4447
[build-system]
4548
requires = [
46-
"setuptools>=60",
49+
"setuptools>=61",
4750
"wheel",
4851

4952
"Cython(>=0.29.24,<0.30.0)"
5053
]
5154
build-backend = "setuptools.build_meta"
5255

5356
[tool.setuptools]
57+
platforms = ["macOS", "POSIX", "Windows"]
5458
zip-safe = false
5559

5660
[tool.setuptools.packages.find]

setup.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,16 @@
1717
import re
1818
import subprocess
1919

20+
import setuptools
21+
from distutils.version import StrictVersion
22+
23+
if StrictVersion(setuptools.__version__) < StrictVersion('61.0.0'):
24+
raise RuntimeError(f'Your setuptools version ({setuptools.__version__}) '
25+
f'does not support PEP 621. '
26+
'Please upgrade it first.')
27+
2028
# We use vanilla build_ext, to avoid importing Cython via
2129
# the setuptools version.
22-
import setuptools
2330
from setuptools.command import build_py as setuptools_build_py
2431
from setuptools.command import sdist as setuptools_sdist
2532
from setuptools.command import build_ext as setuptools_build_ext
@@ -37,10 +44,6 @@
3744
_ROOT = pathlib.Path(__file__).parent
3845

3946

40-
with open(str(_ROOT / 'README.rst')) as f:
41-
readme = f.read()
42-
43-
4447
with open(str(_ROOT / 'asyncpg' / '_version.py')) as f:
4548
for line in f:
4649
if line.startswith('__version__ ='):

0 commit comments

Comments
 (0)