Support the use of `pip` in packaged apps
- Dominant language
- Python
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 40
Description
`pip` is currently deliberately removed from Briefcase-packaged apps. This is on the theory that apps should be shipping with all the code they require, and installation triggered by the end-user shouldn't be necessary.
However, there is a limited subset of cases where it *is* necessary. #418 is one example where it has been requested; https://github.com/phildini/hera is another.
We should support this use case.
This will require:
* Ensuring that it is possible to include `pip` in the `requires` list and get a functioning version of pip
* Reconciling the discrepancy between the default `site_packages` and Briefcase's `app_packages`.
* Providing an entry point that can be invoked programatically. By design, pip *does not* have a stable programmatic API, by design, and PyPA has indicated that the have no intention of adding one (and have actively *removed* APIs that made pip programatically invocable
* Reconciling how to use `pip` on platforms where runtime installation may be prohibited by app store guidelines.
Contributor guide
Research direction
Start by reviewing how packaged apps handle the requires list, the default site_packages, and Briefcase's app_packages. Then examine the platform-specific constraints around runtime installation and app store guidelines. Done means pip can be included and invoked programmatically where permitted, with the package-path discrepancy and prohibited platforms addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100