beeware / beeware/briefcase

Verify support package's Python version matches running Python version

Open
#1,581 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
3.3k
Forks
549
Avg merge
1d 4h
Merged PRs (30d)
40

Description

### Describe the bug

If a user specifies a support package that contains a different version of Python than is being used to create the app, the resulting package is likely to be unusable. Errors are also likely to manifest in strange ways since the app's Python will be trying to load packages for a different version.

### Steps to reproduce

1. Activate an environment for a version other than 3.10
2. `briefcase package linux appimage --config 'requires=["toga-gtk==0.3.1","PyGobject<3.46.0"]' --config "support_package='https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11+20230507-x86_64_v2-unknown-linux-gnu-install_only.tar.gz'"`

If you try this with Flatpak, it errors during the build process trying to modify files for a non-existent Python....although, that still quite obscures the underlying problem for the user.

### Expected behavior

Inform the user about the incompatible settings and abort.

### Screenshots

_No response_

### Environment

- Operating System: pop os 22.04
- Python version: 3.11.6
- Software versions:
- Briefcase: `0.3.17.dev163+g60d0a976.d20231219`

### Logs

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the mismatch with the provided `briefcase package linux appimage` command and compare the active Python version with the support package version. Trace the packaging flow for where support packages are selected or validated; done means incompatible versions are detected early and reported clearly before packaging proceeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.