Remove some useless PATHs in Usage.md#284
Merged
freakboy3742 merged 3 commits intobeeware:mainfrom May 6, 2025
Merged
Conversation
freakboy3742
requested changes
May 5, 2025
Member
freakboy3742
left a comment
There was a problem hiding this comment.
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.
Contributor
Author
|
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:
***@***.***>
|
Contributor
Author
|
Revised + Tested. |
freakboy3742
approved these changes
May 6, 2025
Member
freakboy3742
left a comment
There was a problem hiding this comment.
👍
Looks like the instructions have inherited some baggage from the "isolated config" versions that the apps use.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A lot of the PATHs are redundant in USAGE.md, so this PR removes them.
PR Checklist: