@@ -252,7 +252,7 @@ def compile_requirements(*, upgrade=False):
252
252
"--resolver=backtracking" , # new pip resolver, default in pip-compile 7+
253
253
* extra ,
254
254
str (f ),
255
- "hypothesis-python/setup.py " ,
255
+ "hypothesis-python/pyproject.toml " ,
256
256
"--output-file" ,
257
257
str (out_file ),
258
258
cwd = tools .ROOT ,
@@ -288,8 +288,8 @@ def update_python_versions():
288
288
# (plus some special cases for the `t` suffix for free-threading builds)
289
289
stable = re .compile (r".*3\.\d+.\d+t?$" )
290
290
min_minor_version = re .search (
291
- r'python_requires= ">= ?3.(\d+)"' ,
292
- Path ("hypothesis-python/setup.py " ).read_text (encoding = "utf-8" ),
291
+ r'requires-python = ">= ?3.(\d+)"' ,
292
+ Path ("hypothesis-python/pyproject.toml " ).read_text (encoding = "utf-8" ),
293
293
).group (1 )
294
294
best = {}
295
295
for line in map (str .strip , result .splitlines ()):
@@ -350,14 +350,14 @@ def update_django_versions():
350
350
thisfile .write_text (after , encoding = "utf-8" )
351
351
pip_tool ("shed" , str (thisfile ))
352
352
353
- # Update the minimum version in setup.py
354
- setup_py = hp .BASE_DIR / "setup.py "
353
+ # Update the minimum version in pyproject.toml
354
+ pyproject_toml = hp .BASE_DIR / "pyproject.toml "
355
355
content = re .sub (
356
356
r"django>=\d+\.\d+" ,
357
357
f"django>={ min (versions , key = float )} " ,
358
- setup_py .read_text (encoding = "utf-8" ),
358
+ pyproject_toml .read_text (encoding = "utf-8" ),
359
359
)
360
- setup_py .write_text (content , encoding = "utf-8" )
360
+ pyproject_toml .write_text (content , encoding = "utf-8" )
361
361
362
362
# Automatically sync ci_version with the version in build.sh
363
363
tox_ini = hp .BASE_DIR / "tox.ini"
@@ -417,13 +417,13 @@ def update_vendored_files():
417
417
# Always require the most recent version of tzdata - we don't need to worry about
418
418
# pre-releases because tzdata is a 'latest data' package (unlike pyodide-build).
419
419
# Our crosshair extra is research-grade, so we require latest versions there too.
420
- setup = pathlib .Path (hp .BASE_DIR , "setup.py " )
421
- new = setup .read_text (encoding = "utf-8" )
420
+ pyproject_toml = pathlib .Path (hp .BASE_DIR , "pyproject.toml " )
421
+ new = pyproject_toml .read_text (encoding = "utf-8" )
422
422
for pkgname in ("tzdata" , "crosshair-tool" , "hypothesis-crosshair" ):
423
423
pkg_url = f"https://pypi.org/pypi/{ pkgname } /json"
424
424
pkg_version = requests .get (pkg_url ).json ()["info" ]["version" ]
425
425
new = re .sub (rf"{ pkgname } >=([a-z0-9.]+)" , f"{ pkgname } >={ pkg_version } " , new )
426
- setup .write_text (new , encoding = "utf-8" )
426
+ pyproject_toml .write_text (new , encoding = "utf-8" )
427
427
428
428
429
429
def has_diff (file_or_directory ):
@@ -496,7 +496,7 @@ def run_tox(task, version, *args):
496
496
497
497
# update_python_versions(), above, keeps the contents of this dict up to date.
498
498
# When a version is added or removed, manually update the env lists in tox.ini and
499
- # workflows/main.yml, and the `Programming Language ::` specifiers in setup.py
499
+ # workflows/main.yml, and the `Programming Language ::` specifiers in pyproject.toml
500
500
PYTHONS = {
501
501
"3.9" : "3.9.21" ,
502
502
"3.10" : "3.10.16" ,
0 commit comments