Skip to content

Commit

Permalink
mark some packages always static with BUILD_STATIC
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Sep 14, 2023
1 parent dba47c1 commit cd12f0c
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
SDK_VERSION: 3.1.46.bi
SYS_PYTHON: /usr/bin/python3
PACKAGES: emsdk hpy pygame
BUILD_STATIC: emsdk hpy
STATIC: false
BUILDS: 3.11 3.12
CYTHON: Cython-3.0.1-py2.py3-none-any.whl
Expand Down Expand Up @@ -69,4 +70,3 @@ jobs:
branch: gh-pages
folder: build/web/archives


2 changes: 1 addition & 1 deletion packages.d/emsdk/emsdk.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
PyImport_AppendInittab("embed_emscripten", PyInit_emscripten);
PyImport_AppendInittab("embed_browser", PyInit_browser);

# pragma message "emsdk is statically linked as built-in"
4 changes: 4 additions & 0 deletions packages.d/hpy/hpy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ then
git pull
else
git clone --no-tags --depth 1 --single-branch --branch master https://github.com/hpyproject/hpy

wget https://github.com/hpyproject/hpy/archive/refs/tags/0.9.0rc2.tar.gz
tar xvfz 0.9.0rc2.tar.gz

pushd $(pwd)/hpy
# git submodule update --init --recursive

Expand Down
13 changes: 6 additions & 7 deletions pygbag/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
import sys
from pathlib import Path


__version__ = "0.7.3"

# make aio available

sys.path.append(str(Path(__file__).parent / "support/cross"))
__version__ = "0.8.0"

# hack to test git cdn build without upgrading pygbag
# beware can have side effects when file packager behaviour must change !
Expand All @@ -21,7 +16,11 @@
"""
)
__version__ = "0.0.0"
sys.argv.remove("--git")


# make aio available

sys.path.append(str(Path(__file__).parent / "support/cross"))


# WaPy=>CPython compat
Expand Down
3 changes: 3 additions & 0 deletions pygbag/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ async def main_run(app_folder, mainscript, cdn=DEFAULT_CDN):

sys.argv.pop()

if "--git" in sys.argv:
sys.argv.remove("--git")

parser = argparse.ArgumentParser()

print(
Expand Down
5 changes: 3 additions & 2 deletions pygbag/support/cross/__EMSCRIPTEN__.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,14 @@ async def process(self):
await client(sns)
else:
client(sns)

if discarded:
console.log(f"221 DISCARD : {evtype} {evdata}")
console.log(f"221: DISCARD : {evtype} {evdata}")

await aio.sleep(0)

EventTarget = EventTarget()

add_event_listener = EventTarget.addEventListener

# ============================= PRELOADING ==============================

Expand Down
6 changes: 4 additions & 2 deletions scripts/build-loader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,16 @@ if $STATIC
then
echo "building static loader"
else
export PACKAGES=${BUILD_STATIC:-emsdk hpy}

echo "building dynamic loader
TODO: get the only static ones here
with static parts : ${BUILD_STATIC}
"
export PACKAGES="emsdk hpy"

fi


Expand Down

0 comments on commit cd12f0c

Please sign in to comment.