Skip to content

[BUG] 61.3.0 sdist misses setuptools/tests/config/setupcfg_examples.txt #3233

Closed
@mgorny

Description

@mgorny
Contributor

setuptools version

61.3.0

Python version

3.10.4

OS

Gentoo Linux

Additional environment information

Using sdist tarball from pypi.

Description

Many tests fail when running from 61.3.0 due to a missing file, e.g.:

________________________________ ERROR collecting setuptools/tests/config/test_apply_pyprojecttoml.py _________________________________
setuptools/tests/config/test_apply_pyprojecttoml.py:21: in <module>
    EXAMPLES = (Path(__file__).parent / "setupcfg_examples.txt").read_text()
/usr/lib/python3.10/pathlib.py:1132: in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
/usr/lib/python3.10/pathlib.py:1117: in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
E   FileNotFoundError: [Errno 2] No such file or directory: '/tmp/setuptools-61.3.0/setuptools/tests/config/setupcfg_examples.txt'

Expected behavior

Tests passing ;-).

How to Reproduce

tar -xf setuptools-61.3.0.tar.gz
cd setuptools-61.3.0
tox -e py310

Output

$ tox -e py310
py310 create: /tmp/setuptools-61.3.0/.tox/py310
py310 develop-inst: /tmp/setuptools-61.3.0
py310 installed: attrs==21.4.0,autocommand==2.2.1,black==22.3.0,build==0.7.0,click==8.1.2,coverage==6.3.2,distlib==0.3.4,docutils==0.18.1,execnet==1.9.0,filelock==3.6.0,flake8==4.0.1,flake8-2020==1.6.1,importlib-metadata==4.11.3,ini2toml==0.10,iniconfig==1.1.1,jaraco.context==4.1.1,jaraco.envs==2.3.0,jaraco.functools==3.5.0,jaraco.path==3.3.1,mccabe==0.6.1,mock==4.0.3,more-itertools==8.12.0,mypy==0.942,mypy-extensions==0.4.3,packaging==21.3,path==16.4.0,pathspec==0.9.0,pep517==0.12.0,pip-run==8.8.0,platformdirs==2.5.1,pluggy==1.0.0,py==1.11.0,pycodestyle==2.8.0,pyflakes==2.4.0,pyparsing==3.0.7,pytest==7.1.1,pytest-black==0.3.12,pytest-checkdocs==2.7.1,pytest-cov==3.0.0,pytest-enabler==1.2.1,pytest-flake8==1.1.1,pytest-forked==1.4.0,pytest-mypy==0.9.1,pytest-perf==0.12.0,pytest-xdist==2.5.0,pytz==2022.1,singledispatch==3.7.0,six==1.16.0,tempora==5.0.1,toml==0.10.2,tomli==2.0.1,tomli_w==1.0.0,tox==3.24.5,typing_extensions==4.1.1,virtualenv==20.14.0,zipp==3.7.0
py310 run-test-pre: PYTHONHASHSEED='525240523'
py310 run-test: commands[0] | pytest
========================================================= test session starts =========================================================
platform linux -- Python 3.10.4, pytest-7.1.1, pluggy-1.0.0
cachedir: .tox/py310/.pytest_cache
rootdir: /tmp/setuptools-61.3.0, configfile: pytest.ini
plugins: xdist-2.5.0, black-0.3.12, cov-3.0.0, flake8-1.1.1, forked-1.4.0, mypy-0.9.1, perf-0.12.0, checkdocs-2.7.1, enabler-1.2.1
gw0 ok / gw1 [1087] / gw2 ok / gw3 ok / gw4 [1087] / gw5 [1087] / gw6 [1087] / gw7 ok / gw8 [1087] / gw9 [1087] / gw10 [1087] / gw11 [1gw0 ok / gw1 [1087] / gw2 ok / gw3 [1087] / gw4 [1087] / gw5 [1087] / gw6 [1087] / gw7 ok / gw8 [1087] / gw9 [1087] / gw10 [1087] / gw1gw0 ok / gw1 [1087] / gw2 ok / gw3 [1087] / gw4 [1087] / gw5 [1087] / gw6 [1087] / gw7 [1087] / gw8 [1087] / gw9 [1087] / gw10 [1087] /gw0 ok / gw1 [1087] / gw2 [1087] / gw3 [1087] / gw4 [1087] / gw5 [1087] / gw6 [1087] / gw7 [1087] / gw8 [1087] / gw9 [1087] / gw10 [108gw0 [1087] / gw1 [1087] / gw2 [1087] / gw3 [1087] / gw4 [1087] / gw5 [1087] / gw6 [1087] / gw7 [1087] / gw8 [1087] / gw9 [1087] / gw10 [1087] / gw11 [1087]
.........................s................F.............s..............................F.F..F...............F..F........F...s.. [ 11%]
.........F.F.F.F...F................F.F.FXF....F...................................FFF....F.....F......................F....... [ 23%]
.............................................................................s....................F.......F...................s [ 35%]
...................................................................................................F........................... [ 46%]
.................F.........................F...F.................................x.F.............x.....x......x......F......... [ 58%]
..........F.....................s.........s............................................................ssss.................... [ 70%]
...............................................x............................................................................... [ 81%]
..................F..............................................F.sss.....................................FF.........F........ [ 93%]
.............................s.sss.sF..F.sFF..s.s.x.x................X.                                                         [100%]/tmp/setuptools-61.3.0/.tox/py310/lib/python3.10/site-packages/coverage/report.py:87: CoverageWarning: Couldn't parse '/tmp/build-via-sdist-5bdmqfw1/ns.pkg-0.0.0/setup.py': No source for code: '/tmp/build-via-sdist-5bdmqfw1/ns.pkg-0.0.0/setup.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
[...]

=============================================================== ERRORS ================================================================
________________________________ ERROR collecting setuptools/tests/config/test_apply_pyprojecttoml.py _________________________________
setuptools/tests/config/test_apply_pyprojecttoml.py:21: in <module>
    EXAMPLES = (Path(__file__).parent / "setupcfg_examples.txt").read_text()
/usr/lib/python3.10/pathlib.py:1132: in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
/usr/lib/python3.10/pathlib.py:1117: in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
E   FileNotFoundError: [Errno 2] No such file or directory: '/tmp/setuptools-61.3.0/setuptools/tests/config/setupcfg_examples.txt'
________________________________ ERROR collecting setuptools/tests/config/test_apply_pyprojecttoml.py _________________________________
setuptools/tests/config/test_apply_pyprojecttoml.py:21: in <module>
    EXAMPLES = (Path(__file__).parent / "setupcfg_examples.txt").read_text()
/usr/lib/python3.10/pathlib.py:1132: in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
/usr/lib/python3.10/pathlib.py:1117: in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
E   FileNotFoundError: [Errno 2] No such file or directory: '/tmp/setuptools-61.3.0/setuptools/tests/config/setupcfg_examples.txt'
[...]

Activity

added
Needs TriageIssues that need to be evaluated for severity and status.
on Mar 31, 2022
abravalheri

abravalheri commented on Apr 1, 2022

@abravalheri
Contributor

Thanks @mgorny for reporting this.

The classic manifest error 😅, sorry for that. I will have a look tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssues that need to be evaluated for severity and status.bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @mgorny@abravalheri

      Issue actions

        [BUG] 61.3.0 sdist misses setuptools/tests/config/setupcfg_examples.txt · Issue #3233 · pypa/setuptools