17
17
import re
18
18
import subprocess
19
19
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
+
20
28
# We use vanilla build_ext, to avoid importing Cython via
21
29
# the setuptools version.
22
- import setuptools
23
30
from setuptools .command import build_py as setuptools_build_py
24
31
from setuptools .command import sdist as setuptools_sdist
25
32
from setuptools .command import build_ext as setuptools_build_ext
65
72
_ROOT = pathlib .Path (__file__ ).parent
66
73
67
74
68
- with open (str (_ROOT / 'README.rst' )) as f :
69
- readme = f .read ()
70
-
71
-
72
75
with open (str (_ROOT / 'asyncpg' / '_version.py' )) as f :
73
76
for line in f :
74
77
if line .startswith ('__version__ =' ):
@@ -246,41 +249,7 @@ def finalize_options(self):
246
249
247
250
248
251
setuptools .setup (
249
- name = 'asyncpg' ,
250
252
version = VERSION ,
251
- description = 'An asyncio PostgreSQL driver' ,
252
- long_description = readme ,
253
- classifiers = [
254
- 'Development Status :: 5 - Production/Stable' ,
255
- 'Framework :: AsyncIO' ,
256
- 'Intended Audience :: Developers' ,
257
- 'License :: OSI Approved :: Apache Software License' ,
258
- 'Operating System :: POSIX' ,
259
- 'Operating System :: MacOS :: MacOS X' ,
260
- 'Operating System :: Microsoft :: Windows' ,
261
- 'Programming Language :: Python :: 3 :: Only' ,
262
- 'Programming Language :: Python :: 3.6' ,
263
- 'Programming Language :: Python :: 3.7' ,
264
- 'Programming Language :: Python :: 3.8' ,
265
- 'Programming Language :: Python :: 3.9' ,
266
- 'Programming Language :: Python :: 3.10' ,
267
- 'Programming Language :: Python :: Implementation :: CPython' ,
268
- 'Topic :: Database :: Front-Ends' ,
269
- ],
270
- platforms = ['macOS' , 'POSIX' , 'Windows' ],
271
- python_requires = '>=3.6.0' ,
272
- zip_safe = False ,
273
- author = 'MagicStack Inc' ,
274
- author_email = 'hello@magic.io' ,
275
- url = 'https://github.com/MagicStack/asyncpg' ,
276
- license = 'Apache License, Version 2.0' ,
277
- packages = setuptools .find_packages (
278
- exclude = ['tests' , 'tools' ],
279
- ),
280
- package_data = {
281
- # Cython sources needed for tracebacks
282
- "" : ["*.pyx" , "*.pxd" , "*.pxi" ],
283
- },
284
253
ext_modules = [
285
254
setuptools .extension .Extension (
286
255
"asyncpg.pgproto.pgproto" ,
@@ -296,7 +265,6 @@ def finalize_options(self):
296
265
extra_compile_args = CFLAGS ,
297
266
extra_link_args = LDFLAGS ),
298
267
],
299
- install_requires = ['typing-extensions>=3.7.4.3;python_version<"3.8"' ],
300
268
cmdclass = {'build_ext' : build_ext , 'build_py' : build_py , 'sdist' : sdist },
301
269
test_suite = 'tests.suite' ,
302
270
extras_require = EXTRA_DEPENDENCIES ,
0 commit comments