Skip to content
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

Add processing of .pth files from "app_packages". #58

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed pre-commit errors
timrid committed Mar 21, 2025
commit 5f6be4bcecd448fe3a97fb531bc91691dd7aea40
6 changes: 3 additions & 3 deletions {{ cookiecutter.format }}/src/bootstrap/main.c
Original file line number Diff line number Diff line change
@@ -177,21 +177,21 @@ int main(int argc, char *argv[]) {
// files in that directory.
path = "/app/briefcase/app_packages";
app_packages_path_str = Py_DecodeLocale(path, NULL);

debug_log("Adding app_packages as site directory: %S\n", app_packages_path_str);

module = PyImport_ImportModule("site");
if (module == NULL) {
// crash_dialog("Could not import site module");
exit(-8);
}

module_attr = PyObject_GetAttrString(module, "addsitedir");
if (module_attr == NULL || !PyCallable_Check(module_attr)) {
// crash_dialog("Could not access site.addsitedir");
exit(-9);
}

app_packages_path = PyUnicode_FromWideChar(app_packages_path_str, wcslen(app_packages_path_str));
if (app_packages_path == NULL) {
//crash_dialog("Could not convert app_packages path to unicode");