Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test_custom_shebang fails with system (Gentoo) install of PyPy3 #204

@mgorny

Description

@mgorny

Describe the bug

$ tox -e pypy3
.pkg: _optional_hooks> python /usr/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /usr/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_wheel> python /usr/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: prepare_metadata_for_build_wheel> python /usr/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /usr/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
pypy3: install_package> python -I -m pip install --force-reinstall --no-deps /tmp/distlib/.tox/.tmp/package/5/distlib-0.3.8.dev0.tar.gz
pypy3: commands[0]> python tests/test_all.py
............................s.................................................s....s.......s..........................sss.ss.....F....sss......ss.........................s..........s..........................ssss.........ss.............
======================================================================
FAIL: test_custom_shebang (test_scripts.ScriptTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/distlib/tests/test_scripts.py", line 121, in test_custom_shebang
    self.assertEqual(p.returncode, 0)
AssertionError: 1 != 0

----------------------------------------------------------------------
Ran 236 tests in 18.396s

FAILED (failures=1, skipped=22)
pypy3: exit 1 (19.16 seconds) /tmp/distlib> python tests/test_all.py pid=237205
.pkg: _exit> python /usr/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
  pypy3: FAIL code 1 (23.76=setup[4.61]+cmd[19.16] seconds)
  evaluation failed :( (23.81 seconds)

To Reproduce

tox -e pypy3

Expected behavior
Tests passing ;-).

Environment

  • OS, including version: Gentoo Linux
  • Version of this library: 0.3.7, 445bbf0

Additional information
stdout contains: b"ModuleNotFoundError: No module named 'encodings'\ndebug: OperationError:\ndebug: operror-type: ModuleNotFoundError\ndebug: operror-value: No module named 'encodings'\n"

FWICS this is because you're creating a venv without passing symlinks=True, and venv copies incomplete (nonfunctional) PyPy executable there. That said, I have no clue why the venv module has different defaults than python -m venv ... invocation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions