Skip to content

Commit

Permalink
Use python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
auouymous committed Jul 6, 2023
1 parent 7630213 commit 2ca3bab
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 48 deletions.
10 changes: 5 additions & 5 deletions bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ for cmd in ${CMDS}; do
done

# kill some useless files
rm -Rf "$APP_PREFIX"/lib/python3.10/test
rm -Rvf "$APP_PREFIX"/lib/python3.10/*/test
rm -f "$APP_PREFIX"/lib/python3.10/config/libpython3.10.a
find "$APP_PREFIX"/lib/python3.10 -name '*.pyc' -delete
find "$APP_PREFIX"/lib/python3.10 -name '*.pyo' -delete
rm -Rf "$APP_PREFIX"/lib/python3.11/test
rm -Rvf "$APP_PREFIX"/lib/python3.11/*/test
rm -f "$APP_PREFIX"/lib/python3.11/config/libpython3.11.a
find "$APP_PREFIX"/lib/python3.11 -name '*.pyc' -delete
find "$APP_PREFIX"/lib/python3.11 -name '*.pyo' -delete

echo checking for dynamic linking consistency : nothing should reference gtk/inst
find "$APP_PREFIX" -name '*.so' -and -print -and -exec sh -c 'otool -L $1 | grep /gtk/inst' '{}' '{}' ';'
Expand Down
8 changes: 4 additions & 4 deletions misc/bundle/launcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ set_python_path(void)
CFStringRef str = make_filesystem_string(bundle_url);
CFRelease(bundle_url);
mstr = CFStringCreateMutableCopy(NULL, 5 * PATH_MAX, str);
CFStringAppendCString(mstr, "/lib/python3.10:",
CFStringAppendCString(mstr, "/lib/python3.11:",
kCFStringEncodingUTF8);
CFStringAppend(mstr, str);
CFStringAppendCString(mstr, "/lib/python3.10/plat-darwin:",
CFStringAppendCString(mstr, "/lib/python3.11/plat-darwin:",
kCFStringEncodingUTF8);
CFStringAppend(mstr, str);
CFStringAppendCString(mstr, "/lib/python3.10/lib-dynload:",
CFStringAppendCString(mstr, "/lib/python3.11/lib-dynload:",
kCFStringEncodingUTF8);
CFStringAppend(mstr, str);
CFStringAppendCString(mstr, "/lib/python3.10/site-packages",
CFStringAppendCString(mstr, "/lib/python3.11/site-packages",
kCFStringEncodingUTF8);
CFRelease(str);
path = widen_cfstring(mstr);
Expand Down
2 changes: 1 addition & 1 deletion misc/bundle/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# for forked python
os.environ['PYTHONHOME'] = bundle_res
#Set $PYTHON to point inside the bundle
PYVER = 'python3.10'
PYVER = 'python3.11'
sys.path.append(bundle_res)
print('System Path:\n','\n'.join(sys.path))

Expand Down
76 changes: 38 additions & 38 deletions misc/bundle/pythonbase.bundle
Original file line number Diff line number Diff line change
Expand Up @@ -99,59 +99,59 @@

<!-- standard install minus unused -->
<data>
${prefix}/lib/python3.10/*.py
${prefix}/lib/python3.11/*.py
</data>
<data>${prefix}/lib/python3.10/asyncio</data>
<data>${prefix}/lib/python3.10/collections</data>
<data>${prefix}/lib/python3.10/concurrent</data>
<data>${prefix}/lib/python3.10/config-3.10-darwin</data>
<data>${prefix}/lib/python3.10/ctypes</data>
<data>${prefix}/lib/python3.10/curses</data>
<!--<data>${prefix}/lib/python3.10/dbm</data>-->
<data>${prefix}/lib/python3.10/email</data>
<data>${prefix}/lib/python3.10/encodings</data>
<data>${prefix}/lib/python3.10/html</data>
<data>${prefix}/lib/python3.10/http</data>
<!--<data>${prefix}/lib/python3.10/idlelib</data>-->
<data>${prefix}/lib/python3.10/importlib</data>
<data>${prefix}/lib/python3.10/json</data>
<binary>${prefix}/lib/python3.10/lib-dynload</binary>
<!--<data>${prefix}/lib/python3.10/lib2to3</data>-->
<data>${prefix}/lib/python3.10/logging</data>
<data>${prefix}/lib/python3.10/multiprocessing</data>
<!--<data>${prefix}/lib/python3.10/pydoc_data</data>-->
<data>${prefix}/lib/python3.10/sqlite3</data>
<!--<data>${prefix}/lib/python3.10/test</data>-->
<!--<data>${prefix}/lib/python3.10/tkinter</data>-->
<!--<data>${prefix}/lib/python3.10/turtledemo</data>-->
<data>${prefix}/lib/python3.10/unittest</data>
<data>${prefix}/lib/python3.10/urllib</data>
<!--<data>${prefix}/lib/python3.10/venv</data>-->
<data>${prefix}/lib/python3.10/wsgiref</data>
<data>${prefix}/lib/python3.10/xml</data>
<data>${prefix}/lib/python3.11/asyncio</data>
<data>${prefix}/lib/python3.11/collections</data>
<data>${prefix}/lib/python3.11/concurrent</data>
<data>${prefix}/lib/python3.11/config-3.10-darwin</data>
<data>${prefix}/lib/python3.11/ctypes</data>
<data>${prefix}/lib/python3.11/curses</data>
<!--<data>${prefix}/lib/python3.11/dbm</data>-->
<data>${prefix}/lib/python3.11/email</data>
<data>${prefix}/lib/python3.11/encodings</data>
<data>${prefix}/lib/python3.11/html</data>
<data>${prefix}/lib/python3.11/http</data>
<!--<data>${prefix}/lib/python3.11/idlelib</data>-->
<data>${prefix}/lib/python3.11/importlib</data>
<data>${prefix}/lib/python3.11/json</data>
<binary>${prefix}/lib/python3.11/lib-dynload</binary>
<!--<data>${prefix}/lib/python3.11/lib2to3</data>-->
<data>${prefix}/lib/python3.11/logging</data>
<data>${prefix}/lib/python3.11/multiprocessing</data>
<!--<data>${prefix}/lib/python3.11/pydoc_data</data>-->
<data>${prefix}/lib/python3.11/sqlite3</data>
<!--<data>${prefix}/lib/python3.11/test</data>-->
<!--<data>${prefix}/lib/python3.11/tkinter</data>-->
<!--<data>${prefix}/lib/python3.11/turtledemo</data>-->
<data>${prefix}/lib/python3.11/unittest</data>
<data>${prefix}/lib/python3.11/urllib</data>
<!--<data>${prefix}/lib/python3.11/venv</data>-->
<data>${prefix}/lib/python3.11/wsgiref</data>
<data>${prefix}/lib/python3.11/xml</data>

<!-- only required extra modules (no dbus, for instance) -->
<data recurse="True">
${prefix}/lib/python3.10/site-packages/gi/*.py
${prefix}/lib/python3.11/site-packages/gi/*.py
</data>
<data>${prefix}/lib/python3.10/site-packages/cairo/*.py</data>
<data>${prefix}/lib/python3.11/site-packages/cairo/*.py</data>

<binary>
${prefix}/lib/python3.10/lib-dynload/*.so
${prefix}/lib/python3.11/lib-dynload/*.so
</binary>

<!-- every bundled .so must have its dynamic links rewritten to point to the bundle.
Can't specify site-packages/*/*.so, so list them based on the output of postproc.sh.
-->
<binary>
${prefix}/lib/python3.10/site-packages/cairo/*.so
${prefix}/lib/python3.11/site-packages/cairo/*.so
</binary>
<binary>
${prefix}/lib/python3.10/site-packages/gi/*.so
${prefix}/lib/python3.11/site-packages/gi/*.so
</binary>

<data>
${prefix}/include/python3.10
${prefix}/include/python3.11
</data>


Expand Down Expand Up @@ -218,8 +218,8 @@

<!-- pip support -->
<data>${prefix}/bin/pip3*</data>
<data>${prefix}/lib/python3.10/distutils</data>
<!-- <data>${prefix}/lib/python3.10/site-packages/pip</data>-->
<data>${prefix}/lib/python3.10/xmlrpc</data>
<data>${prefix}/lib/python3.11/distutils</data>
<!-- <data>${prefix}/lib/python3.11/site-packages/pip</data>-->
<data>${prefix}/lib/python3.11/xmlrpc</data>

</app-bundle>

0 comments on commit 2ca3bab

Please sign in to comment.