Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test suite failing due to setuptools/pip updates #1195

Closed
freakboy3742 opened this issue Apr 20, 2023 · 4 comments · Fixed by #1198
Closed

Test suite failing due to setuptools/pip updates #1195

freakboy3742 opened this issue Apr 20, 2023 · 4 comments · Fixed by #1198
Labels
bug A crash or error in behavior. macOS The issue relates to Apple macOS support. windows The issue relates to Microsoft Windows support.

Comments

@freakboy3742
Copy link
Member

freakboy3742 commented Apr 20, 2023

Describe the bug

The Briefcase CI test suite is currently failing with a series of errors caused by recent setuptools and pip updates,.

Steps to reproduce

  1. Update pip and setuptools
  2. Run the CI test suite.

Expected behavior

Test suite should pass cleanly,

Screenshots

No response

Environment

  • Operating System: macOS (any)
  • Python version: any
  • Software versions:
    • Briefcase: 0.3.15.dev29+g5c83de4a
    • Pip: 23.1
    • Setuptools: 67.6.1

Logs

There are dozens of test failures, preventing CI from even collecting the test suite:

==============================================================================
CRITICAL: tests/test_cmdline.py
------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rkm/beeware/briefcase/tests/test_cmdline.py", line 16, in <module>
    from briefcase.platforms.macOS.app import (
  File "/Users/rkm/beeware/briefcase/src/briefcase/platforms/macOS/__init__.py", line 20, in <module>
    import dmgbuild
  File "/Users/rkm/beeware/briefcase/venv3.10/lib/python3.10/site-packages/dmgbuild/__init__.py", line 1, in <module>
    from .core import build_dmg
  File "/Users/rkm/beeware/briefcase/venv3.10/lib/python3.10/site-packages/dmgbuild/core.py", line 12, in <module>
    import pkg_resources
  File "/Users/rkm/beeware/briefcase/venv3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 121, in <module>
    warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)
DeprecationWarning: pkg_resources is deprecated as an API

Additional context

The issue is that dmgbuild is using the deprecated setuptools pkg_resources API to get package resources.

@freakboy3742 freakboy3742 added bug A crash or error in behavior. macOS The issue relates to Apple macOS support. labels Apr 20, 2023
@freakboy3742
Copy link
Member Author

See dmgbuild/dmgbuild#59.

@freakboy3742 freakboy3742 changed the title Test suite failing on macOS due to pkg_resources reference Test suite failing due to setuptools/pip updates Apr 20, 2023
@freakboy3742
Copy link
Member Author

freakboy3742 commented Apr 20, 2023

dmgbuild 1.6.1 has been released, fixing the originally reported issue.

This has now revealed an issue with the window winstore environment build in CI:

Run tox -e py --installpkg dist/briefcase-*.whl
[2](https://github.com/beeware/briefcase/actions/runs/4748383096/jobs/8447175749?pr=1183#step:7:2)
  tox -e py --installpkg dist/briefcase-*.whl
[3](https://github.com/beeware/briefcase/actions/runs/4748383096/jobs/8447175749?pr=1183#step:7:3)
  shell: C:\Program Files\Git\bin\bash.EXE --noprofile --norc -e -o pipefail {0}
[4](https://github.com/beeware/briefcase/actions/runs/4748383096/jobs/8447175749?pr=1183#step:7:4)
  env:
[5](https://github.com/beeware/briefcase/actions/runs/4748383096/jobs/8447175749?pr=1183#step:7:5)
    MSYS: winsymlinks:nativestrict
[6](https://github.com/beeware/briefcase/actions/runs/4748383096/jobs/8447175749?pr=1183#step:7:7)
.pkg_external: freeze> python -m pip freeze --all
[7](https://github.com/beeware/briefcase/actions/runs/4748383096/jobs/8447175749?pr=1183#step:7:8)
.pkg_external: 
[8](https://github.com/beeware/briefcase/actions/runs/4748383096/jobs/8447175749?pr=1183#step:7:9)
py: install_package_deps> python -I -m pip install GitPython<4.0,>=3.1 build>=0.10 cookiecutter<3.0,>=2.1 coverage[toml]==7.2.3 "dmgbuild<2.0,>=1.6; sys_platform == \"darwin\"" "importlib-metadata>=4.4; python_version <= \"3.9\"" packaging>=22.0 pip>=22 platformdirs<4.0,>=2.6 pre-commit==3.2.2 psutil<6.0,>=5.9 pytest-tldr==0.2.5 pytest==7.3.1 requests<3.0,>=2.28 rich<14.0,>=12.6 setuptools-scm[toml]==7.1.0 setuptools>=60 tomli-w<2.0,>=1.0 "tomli<3.0,>=2.0; python_version <= \"3.10\"" tox==4.4.12 wheel>=0.37
[9](https://github.com/beeware/briefcase/actions/runs/4748383096/jobs/8447175749?pr=1183#step:7:10)
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
[10](https://github.com/beeware/briefcase/actions/runs/4748383096/jobs/8447175749?pr=1183#step:7:11)

[11](https://github.com/beeware/briefcase/actions/runs/4748383096/jobs/8447175749?pr=1183#step:7:12)
py: exit 1 (1.94 seconds) D:\a\briefcase\briefcase> python -I -m pip install GitPython<4.0,>=3.1 build>=0.10 cookiecutter<3.0,>=2.1 coverage[toml]==7.2.3 "dmgbuild<2.0,>=1.6; sys_platform == \"darwin\"" "importlib-metadata>=4.4; python_version <= \"3.9\"" packaging>=22.0 pip>=22 platformdirs<4.0,>=2.6 pre-commit==3.2.2 psutil<6.0,>=5.9 pytest-tldr==0.2.5 pytest==7.3.1 requests<3.0,>=2.28 rich<14.0,>=12.6 setuptools-scm[toml]==7.1.0 setuptools>=60 tomli-w<2.0,>=1.0 "tomli<3.0,>=2.0; python_version <= \"3.10\"" tox==4.4.12 wheel>=0.37 pid=4192
[12](https://github.com/beeware/briefcase/actions/runs/4748383096/jobs/8447175749?pr=1183#step:7:13)
  py: FAIL code 1 (9.97 seconds)
[13](https://github.com/beeware/briefcase/actions/runs/4748383096/jobs/8447175749?pr=1183#step:7:14)
  evaluation failed :( (10.14 seconds)
[14](https://github.com/beeware/briefcase/actions/runs/4748383096/jobs/8447175749?pr=1183#step:7:15)

[15](https://github.com/beeware/briefcase/actions/runs/4748383096/jobs/8447175749?pr=1183#step:7:16)
Error: Process completed with exit code 1.

@freakboy3742 freakboy3742 added the windows The issue relates to Microsoft Windows support. label Apr 20, 2023
@freakboy3742
Copy link
Member Author

The windows error appears to be due to a bug in pip 23.1.

@freakboy3742
Copy link
Member Author

We've fixed the problem with #1196; however, that PR includes a FIXME line that can be removed once pip pushes out an updated release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash or error in behavior. macOS The issue relates to Apple macOS support. windows The issue relates to Microsoft Windows support.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant