-
Notifications
You must be signed in to change notification settings - Fork 2
Update setuptools testing #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
f8fe4f2
255e986
1185e76
6cfb48a
0331e05
c5dcf1a
7ca8e2d
6800db8
09bb498
7d83776
d5c6454
e7d5446
57a9985
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [bdist_wheel] | ||
| py_limited_api = cp315 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,17 @@ | ||
| [build-system] | ||
| build-backend = "setuptools.build_meta" | ||
| requires = [ | ||
| "setuptools", | ||
| "setuptools@git+https://github.com/ngoldbaum/setuptools@abi3.abi3t", | ||
| "packaging@git+https://github.com/ngoldbaum/packaging@abi3.abi3t", | ||
| "cython@git+https://github.com/cython/cython@freethreading-limited-api-preview", | ||
| ] | ||
|
|
||
| [project] | ||
| name = "limited-api" | ||
| version = "1.2.3" | ||
| dependencies = [ | ||
| "setuptools@git+https://github.com/ngoldbaum/setuptools@abi3.abi3t" | ||
| ] | ||
|
||
|
|
||
| [[tool.setuptools.ext-modules]] | ||
| name = "limited" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [bdist_wheel] | ||
| py_limited_api = cp315 | ||
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ | |
| from build import ProjectBuilder | ||
| import pytest | ||
|
|
||
| from contextlib import contextmanager | ||
| from contextlib import contextmanager, nullcontext | ||
| from pathlib import Path | ||
| import os | ||
| import subprocess | ||
|
|
@@ -75,12 +75,20 @@ def test_install(test_case: str, tmp_path: Path, subtests) -> None: | |
| ): | ||
| dist_path = builder.build("wheel", tmp_path) | ||
|
|
||
| with subtests.test(msg="wheel has 'abi3.abi3t' tag"): | ||
| with subxfail( | ||
| build_system != "meson-python", | ||
| reason="Only meson-python fork builds abi3.abi3t", | ||
| ): | ||
| assert "abi3.abi3t" in Path(dist_path).name | ||
| with subtests.test(msg="wheel has correct ABI tag"): | ||
| if IS_FREETHREADING or build_system == "meson_python": | ||
|
||
| context = subxfail( | ||
| build_system not in ("meson-python", "setuptools"), | ||
| reason="Only meson-python and setuptools forks build abi3.abi3t", | ||
| ) | ||
| else: | ||
| context = nullcontext() | ||
| with context: | ||
| if ((build_system == "setuptools" and IS_FREETHREADING) or | ||
| build_system == "meson_python"): | ||
| assert "abi3.abi3t" in Path(dist_path).name | ||
| else: | ||
| assert "abi3" in Path(dist_path).name | ||
|
|
||
| subprocess.run([sys.executable, "-m", "venv", tmp_path / "venv"], check=True) | ||
| python_exe = "python.exe" if os.name == "nt" else "python" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newline.