File tree Expand file tree Collapse file tree 7 files changed +38
-32
lines changed Expand file tree Collapse file tree 7 files changed +38
-32
lines changed Original file line number Diff line number Diff line change 4141 submodules : true
4242 - name : >-
4343 Verify that `requirements/runtime-deps.in`
44- is in sync with `setup.cfg `
44+ is in sync with `pyproject.toml `
4545 run: |
4646 set -eEuo pipefail
4747 make sync-direct-runtime-deps
Original file line number Diff line number Diff line change 1+ Moved dependency metadata from :file: `setup.cfg ` to :file: `pyproject.toml ` per :pep: `621 `
2+ -- by :user: `cdce8p `.
Original file line number Diff line number Diff line change @@ -184,5 +184,5 @@ install-dev: .develop
184184
185185.PHONY : sync-direct-runtime-deps
186186sync-direct-runtime-deps :
187- @echo Updating ' requirements/runtime-deps.in' from ' setup.cfg ' ... >&2
187+ @echo Updating ' requirements/runtime-deps.in' from ' pyproject.toml ' ... >&2
188188 @python requirements/sync-direct-runtime-deps.py
Original file line number Diff line number Diff line change @@ -32,12 +32,27 @@ classifiers = [
3232 " Topic :: Internet :: WWW/HTTP" ,
3333]
3434requires-python = " >= 3.10"
35+ dependencies = [
36+ " aiohappyeyeballs >= 2.5.0" ,
37+ " aiosignal >= 1.4.0" ,
38+ " async-timeout >= 4.0, < 6.0 ; python_version < '3.11'" ,
39+ " frozenlist >= 1.1.1" ,
40+ " multidict >=4.5, < 7.0" ,
41+ " propcache >= 0.2.0" ,
42+ " yarl >= 1.17.0, < 2.0" ,
43+ ]
3544dynamic = [
36- " dependencies" ,
37- " optional-dependencies" ,
3845 " version" ,
3946]
4047
48+ [project .optional-dependencies ]
49+ speedups = [
50+ " aiodns >= 3.3.0" ,
51+ " Brotli; platform_python_implementation == 'CPython'" ,
52+ " brotlicffi; platform_python_implementation != 'CPython'" ,
53+ " backports.zstd; platform_python_implementation == 'CPython' and python_version < '3.14'" ,
54+ ]
55+
4156[[project .maintainers ]]
4257name = " aiohttp team"
4358
Original file line number Diff line number Diff line change 1- # Extracted from `setup.cfg ` via `make sync-direct-runtime-deps`
1+ # Extracted from `pyproject.toml ` via `make sync-direct-runtime-deps`
22
33aiodns >= 3.3.0
44aiohappyeyeballs >= 2.5.0
55aiosignal >= 1.4.0
6- async-timeout >= 4.0, < 6.0 ; python_version < " 3.11"
7- backports.zstd; platform_python_implementation == 'CPython' and python_version < " 3.14"
6+ async-timeout >= 4.0, < 6.0 ; python_version < ' 3.11'
7+ backports.zstd; platform_python_implementation == 'CPython' and python_version < ' 3.14'
88Brotli; platform_python_implementation == 'CPython'
99brotlicffi; platform_python_implementation != 'CPython'
1010frozenlist >= 1.1.1
Original file line number Diff line number Diff line change 11#!/usr/bin/env python
2- """Sync direct runtime dependencies from setup.cfg to runtime-deps.in."""
2+ """Sync direct runtime dependencies from pyproject.toml to runtime-deps.in."""
33
4- from configparser import ConfigParser
4+ import sys
55from pathlib import Path
66
7- cfg = ConfigParser ()
8- cfg .read (Path ("setup.cfg" ))
9- reqs = cfg ["options" ]["install_requires" ] + cfg .items ("options.extras_require" )[0 ][1 ]
10- reqs = sorted (reqs .split ("\n " ), key = str .casefold )
11- reqs .remove ("" )
7+ if sys .version_info >= (3 , 11 ):
8+ import tomllib
9+ else :
10+ raise RuntimeError ("Use Python 3.11+ to run 'make sync-direct-runtime-deps'" )
11+
12+ data = tomllib .loads (Path ("pyproject.toml" ).read_text ())
13+ reqs = (
14+ data ["project" ]["dependencies" ]
15+ + data ["project" ]["optional-dependencies" ]["speedups" ]
16+ )
17+ reqs = sorted (reqs , key = str .casefold )
1218
1319with open (Path ("requirements" , "runtime-deps.in" ), "w" ) as outfile :
14- header = "# Extracted from `setup.cfg ` via `make sync-direct-runtime-deps`\n \n "
20+ header = "# Extracted from `pyproject.toml ` via `make sync-direct-runtime-deps`\n \n "
1521 outfile .write (header )
1622 outfile .write ("\n " .join (reqs ) + "\n " )
Original file line number Diff line number Diff line change 1- [options]
2- install_requires =
3- aiohappyeyeballs >= 2.5.0
4- aiosignal >= 1.4.0
5- async-timeout >= 4.0, < 6.0 ; python_version < "3.11"
6- frozenlist >= 1.1.1
7- multidict >=4.5, < 7.0
8- propcache >= 0.2.0
9- yarl >= 1.17.0, < 2.0
10-
11- [options.extras_require]
12- speedups =
13- aiodns >= 3.3.0
14- Brotli; platform_python_implementation == 'CPython'
15- brotlicffi; platform_python_implementation != 'CPython'
16- backports.zstd; platform_python_implementation == 'CPython' and python_version < "3.14"
17-
181[pep8]
192max-line-length =79
203
You can’t perform that action at this time.
0 commit comments