Skip to content

Commit b9f6f41

Browse files
committed
Fix SetuptoolsDeprecationWarning about using --global-option
1 parent fd58e73 commit b9f6f41

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

docs/changelog/2478.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed ``SetuptoolsDeprecationWarning`` about using ``--global-option`` -- by :user:`adamchainz`

src/tox/helper/build_isolated.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ def _ensure_module_in_paths(module, paths):
3838
if backend_obj:
3939
backend = getattr(backend, backend_obj)
4040

41-
basename = backend.build_sdist(dist_folder, {"--global-option": ["--formats=gztar"]})
41+
basename = backend.build_sdist(dist_folder, {"--build-option": ["--formats=gztar"]})
4242
print(basename)

tests/unit/package/builder/test_package_builder_isolated.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def test_verbose_isolated_build(initproj, mock_venv, cmd):
2525
},
2626
)
2727
result = cmd("--sdistonly", "-v", "-v", "-v", "-e", "py")
28+
assert "The arguments ['--formats=gztar'] were given via `--global-option`." not in result.err
2829
assert "running sdist" in result.out, result.out
2930
assert "running egg_info" in result.out, result.out
3031
assert "example123-0.5.tar.gz" in result.out, result.out

0 commit comments

Comments
 (0)