Skip to content

Commit 87afa4b

Browse files
authored
Merge pull request #4479 from pypa/bugfix/4475-all-the-files
Install all the files
2 parents aa41ab5 + cf298e7 commit 87afa4b

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

newsfragments/4475.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Restored package data that went missing in 71.0. This change also incidentally causes tests to be installed once again.

pyproject.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,7 @@ PKG-INFO = "setuptools.command.egg_info:write_pkg_info"
178178
"dependency_links.txt" = "setuptools.command.egg_info:overwrite_arg"
179179

180180
[tool.setuptools]
181-
# disabled as it causes tests to be included #2505
182-
# include_package_data = true
183-
include-package-data = false
181+
include-package-data = true
184182

185183
[tool.setuptools.packages.find]
186184
include = [
@@ -194,10 +192,6 @@ exclude = [
194192
]
195193
namespaces = true
196194

197-
[tool.setuptools.package-data]
198-
# ensure that `setuptools/_vendor/jaraco/text/Lorem ipsum.txt` is installed
199-
"*" = ["*.txt"]
200-
201195
[tool.distutils.sdist]
202196
formats = "zip"
203197

setuptools/tests/config/test_apply_pyprojecttoml.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from inspect import cleandoc
1313
from pathlib import Path
1414
from unittest.mock import Mock
15-
from zipfile import ZipFile
1615

1716
import pytest
1817
from ini2toml.api import LiteTranslator
@@ -422,11 +421,6 @@ def test_example_file_in_sdist(self, setuptools_sdist):
422421
with tarfile.open(setuptools_sdist) as tar:
423422
assert any(name.endswith(EXAMPLES_FILE) for name in tar.getnames())
424423

425-
def test_example_file_not_in_wheel(self, setuptools_wheel):
426-
"""Meta test to ensure auxiliary test files are not in wheel"""
427-
with ZipFile(setuptools_wheel) as zipfile:
428-
assert not any(name.endswith(EXAMPLES_FILE) for name in zipfile.namelist())
429-
430424

431425
class TestInteropCommandLineParsing:
432426
def test_version(self, tmp_path, monkeypatch, capsys):

setuptools/tests/test_setuptools.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,17 @@ def test_findall_missing_symlink(tmpdir, can_symlink):
301301
assert found == []
302302

303303

304+
@pytest.mark.xfail(reason="unable to exclude tests; #4475 #3260")
304305
def test_its_own_wheel_does_not_contain_tests(setuptools_wheel):
305306
with ZipFile(setuptools_wheel) as zipfile:
306307
contents = [f.replace(os.sep, '/') for f in zipfile.namelist()]
307308

308309
for member in contents:
309310
assert '/tests/' not in member
311+
312+
313+
def test_wheel_includes_cli_scripts(setuptools_wheel):
314+
with ZipFile(setuptools_wheel) as zipfile:
315+
contents = [f.replace(os.sep, '/') for f in zipfile.namelist()]
316+
317+
assert any('cli-64.exe' in member for member in contents)

0 commit comments

Comments
 (0)