File tree Expand file tree Collapse file tree 7 files changed +39
-33
lines changed Expand file tree Collapse file tree 7 files changed +39
-33
lines changed Original file line number Diff line number Diff line change 3737 submodules : true
3838 - name : >-
3939 Verify that `requirements/runtime-deps.in`
40- is in sync with `setup.cfg `
40+ is in sync with `pyproject.toml `
4141 run: |
4242 set -eEuo pipefail
4343 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 @@ -189,5 +189,5 @@ install-dev: .develop
189189
190190.PHONY : sync-direct-runtime-deps
191191sync-direct-runtime-deps :
192- @echo Updating ' requirements/runtime-deps.in' from ' setup.cfg ' ... >&2
192+ @echo Updating ' requirements/runtime-deps.in' from ' pyproject.toml ' ... >&2
193193 @python requirements/sync-direct-runtime-deps.py
Original file line number Diff line number Diff line change @@ -33,12 +33,28 @@ classifiers = [
3333 " Topic :: Internet :: WWW/HTTP" ,
3434]
3535requires-python = " >= 3.9"
36+ dependencies = [
37+ " aiohappyeyeballs >= 2.5.0" ,
38+ " aiosignal >= 1.4.0" ,
39+ " async-timeout >= 4.0, < 6.0 ; python_version < '3.11'" ,
40+ " attrs >= 17.3.0" ,
41+ " frozenlist >= 1.1.1" ,
42+ " multidict >=4.5, < 7.0" ,
43+ " propcache >= 0.2.0" ,
44+ " yarl >= 1.17.0, < 2.0" ,
45+ ]
3646dynamic = [
37- " dependencies" ,
38- " optional-dependencies" ,
3947 " version" ,
4048]
4149
50+ [project .optional-dependencies ]
51+ speedups = [
52+ " aiodns >= 3.3.0" ,
53+ " Brotli; platform_python_implementation == 'CPython'" ,
54+ " brotlicffi; platform_python_implementation != 'CPython'" ,
55+ " backports.zstd; platform_python_implementation == 'CPython' and python_version < '3.14'" ,
56+ ]
57+
4258[[project .maintainers ]]
4359name = " aiohttp team"
4460
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"
6+ async-timeout >= 4.0, < 6.0 ; python_version < ' 3.11'
77attrs >= 17.3.0
8- backports.zstd; platform_python_implementation == 'CPython' and python_version < " 3.14"
8+ backports.zstd; platform_python_implementation == 'CPython' and python_version < ' 3.14'
99Brotli; platform_python_implementation == 'CPython'
1010brotlicffi; platform_python_implementation != 'CPython'
1111frozenlist >= 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- attrs >= 17.3.0
7- frozenlist >= 1.1.1
8- multidict >=4.5, < 7.0
9- propcache >= 0.2.0
10- yarl >= 1.17.0, < 2.0
11-
12- [options.extras_require]
13- speedups =
14- aiodns >= 3.3.0
15- Brotli; platform_python_implementation == 'CPython'
16- brotlicffi; platform_python_implementation != 'CPython'
17- backports.zstd; platform_python_implementation == 'CPython' and python_version < "3.14"
18-
191[pep8]
202max-line-length =79
213
You can’t perform that action at this time.
0 commit comments