indygreg / indygreg/PyOxidizer
The user site-package falls back to the unix location on macOS
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 256
- PR merge metrics
- No merged PRs in 30d
Description
The problem is `site.getuserbase()` expects `sys._framework` to be set, and I guess it's reasonably not set because this isn't using the framework. I don't see any way to influence the result via environment variables or similar, so maybe this needs to be documented somewhere. The issue is that things installed by pip won't be seen by the app (after fixing #430) without doing some platform specific hacking.
```
% ./build/pyoxidizer/x86_64-apple-darwin/release/app/hg debugshell
Python 3.9.6 (default, Jul 24 2021, 22:44:27)
[Clang 12.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import site
>>> print(site.getuserbase())
/Users/jenkins/.local
>>>
>>> import sys
>>> print('"%s"' % sys._framework)
""
>>> quit()
% python3 -c 'import site; print(site.getuserbase())'
/Users/jenkins/Library/Python/3.9
% python3 -c 'import sys; print(sys._framework)'
Python
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the macOS behavior in the `debugshell` entry point, comparing `site.getuserbase()` and `sys._framework` with the system Python commands shown in the report. Determine whether the expected outcome is a code change or documentation, and verify that pip-installed packages become visible to the application after addressing the behavior described alongside #430.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100