Skip to content

Commit

Permalink
fix hpy rebuild when not in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Oct 6, 2023
1 parent 9c0f47b commit b5ec252
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages.d/hpy/hpy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ then
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
#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
14 changes: 7 additions & 7 deletions pygbag/support/cross/__EMSCRIPTEN__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ def shed_yield():

# those __dunder__ are usually the same used in C conventions.

try:
__UPY__
except:
if hasattr(sys.implementation, "_mpy"):
builtins.__UPY__ = this
else:
builtins.__UPY__ = None
#try:
# __UPY__
#except:
# if hasattr(sys.implementation, "_mpy"):
# builtins.__UPY__ = this
# else:
# builtins.__UPY__ = None


# force use a fixed, tested version of uasyncio to avoid non-determinism
Expand Down
2 changes: 1 addition & 1 deletion pygbag/support/cross/aio/cross.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


if not defined("__UPY__"):
define("__UPY__", hasattr(sys, "print_exception") )
define("__UPY__", hasattr(sys.implementation, "_mpy"))

if not __UPY__:
# setup exception display with same syntax as upy
Expand Down
4 changes: 4 additions & 0 deletions pygbag/support/pythonrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,10 @@ async def preload_code(cls, code, callback=None, hint=""):

@classmethod
def interactive(cls, prompt=False):
if prompt:
TopLevel_async_handler.mute_state = False
TopLevel_async_handler.muted = False

if cls.is_interactive:
return
# if you don't reach that step
Expand Down
4 changes: 4 additions & 0 deletions scripts/build-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ import secrets
import plistlib
from pkg_resources import resource_filename
# netpbm
from mimetypes import guess_type
from pprint import pprint
# pgex
import typing
try:
Expand Down

0 comments on commit b5ec252

Please sign in to comment.