-
-
Notifications
You must be signed in to change notification settings - Fork 178
Remove some useless PATHs in Usage.md #284
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you verified these changes actually work?
There's a notable difference between the initialization sequence described in this document, and the initialization sequence used in the iOS testbed - but the difference isn't just what is put on to PYTHONPATH - its how the data is put onto PYTHONPATH, and the rest of the initialisation routine.
I agree that the three sources (this document, the iOS testbed, and the briefcase iOS template) should be consistent - but we need to make sure we're clear what is both consistent and correct.
Nope, haven't tested it yet. Will test using my own demo repo, see what
happens, push a commit, and rerequest review, all this evening.
…On Sun, May 4, 2025 at 11:45 PM Russell Keith-Magee < ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Have you verified these changes actually work?
There's a notable difference between the initialization sequence described
in this document, and the initialization sequence used in the iOS testbed -
but the difference isn't *just* what is put on to PYTHONPATH - its *how*
the data is put onto PYTHONPATH, and the rest of the initialisation routine.
I agree that the three sources (this document, the iOS testbed, and the
briefcase iOS template) should be consistent - but we need to make sure
we're clear what is both consistent *and correct*.
------------------------------
In USAGE.md
<#284 (comment)>
:
> NSString *appPath = [NSString stringWithFormat:@"%@/app", resourcePath, nil];
setenv("PYTHONHOME", pythonHome, 1);
- setenv("PYTHONPATH", [NSString stringWithFormat:@"%@:%@:%@", pythonpath, libDynloadPath, appPath, nil]);
+ setenv("PYTHONPATH", [NSString stringWithFormat:@"%@:%@:%@", appPath, nil]);
This one definitely isn't right - there's three format specifiers, and one
string substitution.
------------------------------
In USAGE.md
<#284 (comment)>
:
> let appPath = Bundle.main.path(forResource: "app", ofType: nil)
setenv("PYTHONHOME", pythonHome, 1)
- setenv("PYTHONPATH", [pythonPath, libDynloadPath, appPath].compactMap { $0 }.joined(separator: ":"), 1)
+ setenv("PYTHONPATH", [appPath].compactMap { $0 }.joined(separator: ":"), 1)
If there's only one item on the path, then we don't need to do the
compactMap transform - we can just use the string verbatim.
—
Reply to this email directly, view it on GitHub
<#284 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BRODAI3CATBGUWO3GZMDQQT243UGTAVCNFSM6AAAAAB4NTDI3WVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDQMJTG44DMNJSGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Revised + Tested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Looks like the instructions have inherited some baggage from the "isolated config" versions that the apps use.
A lot of the PATHs are redundant in USAGE.md, so this PR removes them.
PR Checklist: