16
16
17
17
from . import contexts , namespaces
18
18
19
- from setuptools ._deprecation_warning import SetuptoolsDeprecationWarning
20
19
from setuptools ._importlib import resources as importlib_resources
21
20
from setuptools .command .editable_wheel import (
22
21
_LinkTree ,
@@ -516,6 +515,12 @@ def test_editable_install(self, tmp_path, venv, layout, editable_mode):
516
515
class TestLinkTree :
517
516
FILES = deepcopy (TestOverallBehaviour .EXAMPLES ["src-layout" ])
518
517
FILES ["pyproject.toml" ] += dedent ("""\
518
+ [tool.setuptools]
519
+ # Temporary workaround: both `include-package-data` and `package-data` configs
520
+ # can be removed after #3260 is fixed.
521
+ include-package-data = false
522
+ package-data = {"*" = ["*.txt"]}
523
+
519
524
[tool.setuptools.packages.find]
520
525
where = ["src"]
521
526
exclude = ["*.subpackage*"]
@@ -537,19 +542,15 @@ def test_generated_tree(self, tmp_path):
537
542
unpacked .mkdir ()
538
543
539
544
make_tree = _LinkTree (dist , name , build , tmp )
540
- with pytest .warns (SetuptoolsDeprecationWarning , match = "would be ignored" ):
541
- # Transitional warning related to #3260, can be removed after is fixed
542
- make_tree (unpacked )
545
+ make_tree (unpacked )
543
546
544
547
mod1 = next (build .glob ("**/mod1.py" ))
545
548
expected = tmp_path / "src/mypkg/mod1.py"
546
549
assert_link_to (mod1 , expected )
547
550
548
- with pytest .raises (AssertionError ): # ignore problems caused by #3260
549
- # Ensure excluded packages don't show up
550
- assert next (build .glob ("**/subpackage" ), None ) is None
551
- assert next (build .glob ("**/mod2.py" ), None ) is None
552
- assert next (build .glob ("**/resource_file.txt" ), None ) is None
551
+ assert next (build .glob ("**/subpackage" ), None ) is None
552
+ assert next (build .glob ("**/mod2.py" ), None ) is None
553
+ assert next (build .glob ("**/resource_file.txt" ), None ) is None
553
554
554
555
assert next (build .glob ("**/resource.not_in_manifest" ), None ) is None
555
556
@@ -568,8 +569,7 @@ def test_strict_install(self, tmp_path, venv, monkeypatch):
568
569
print(ex)
569
570
"""
570
571
out = venv .run (["python" , "-c" , dedent (cmd_import_error )])
571
- with pytest .raises (AssertionError ): # ignore problems caused by #3260
572
- assert b"cannot import name 'subpackage'" in out
572
+ assert b"cannot import name 'subpackage'" in out
573
573
574
574
# Ensure resource files excluded from distribution are not reachable
575
575
cmd_get_resource = """\
0 commit comments