mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-23 15:33:26 +08:00
latest work on bacloud
This commit is contained in:
parent
4255a2d048
commit
7abe4d8673
@ -138,6 +138,8 @@ class EntityMixin:
|
||||
|
||||
This uses bafoundation.jsontools.ExtendedJSONEncoder/Decoder
|
||||
to support data types not natively storable in json.
|
||||
Be sure to use the corresponding loading functions here for
|
||||
this same reason.
|
||||
"""
|
||||
if prune:
|
||||
data = self.pruned_data()
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND -->
|
||||
<!--DOCSHASH=aff21e829575f81236ae45ffa0ed1039-->
|
||||
<h4><em>last updated on 2020-01-04 for Ballistica version 1.5.0 build 20001</em></h4>
|
||||
<!--DOCSHASH=737f6c63728412d33c32ba7504ac1166-->
|
||||
<h4><em>last updated on 2020-01-17 for Ballistica version 1.5.0 build 20001</em></h4>
|
||||
<p>This page documents the Python classes and functions in the 'ba' module,
|
||||
which are the ones most relevant to modding in Ballistica. If you come across something you feel should be included here or could be better explained, please <a href="mailto:support@froemling.net">let me know</a>. Happy modding!</p>
|
||||
<hr>
|
||||
|
||||
@ -47,8 +47,8 @@ def build_apple(arch: str, debug: bool = False) -> None:
|
||||
os.chdir(builddir)
|
||||
|
||||
# TEMP: Check out a particular commit while the branch head is broken.
|
||||
# efrotools.run('git checkout 1a9c71dca298c03517e8236b81cf1d9c8c521cbf')
|
||||
efrotools.run(f'git checkout {PYTHON_VERSION_MAJOR}')
|
||||
efrotools.run('git checkout 1a9c71dca298c03517e8236b81cf1d9c8c521cbf')
|
||||
# efrotools.run(f'git checkout {PYTHON_VERSION_MAJOR}')
|
||||
|
||||
# On mac we currently have to add the _scproxy module or urllib will
|
||||
# fail.
|
||||
@ -267,14 +267,13 @@ def build_android(rootdir: str, arch: str, debug: bool = False) -> None:
|
||||
"super().__init__('https://github.com/python/cpython/', branch='3.7')")
|
||||
|
||||
# Turn ipv6 on (curious why its turned off here?...)
|
||||
# Also, turn on low level debugging features for our debug builds.
|
||||
ftxt = efrotools.replace_one(ftxt, "'--disable-ipv6',", "'--enable-ipv6',")
|
||||
if debug:
|
||||
ftxt = efrotools.replace_one(ftxt, "'./configure',",
|
||||
"'./configure', '--with-pydebug',")
|
||||
|
||||
# We don't use this stuff so lets strip it out to simplify.
|
||||
# ftxt = efrotools.replace_one(ftxt, "'--with-system-ffi',", "")
|
||||
# ftxt = efrotools.replace_one(ftxt, "'--with-system-expat',", "")
|
||||
ftxt = efrotools.replace_one(ftxt, "'--without-ensurepip',", "")
|
||||
|
||||
# This builds all modules as dynamic libs, but we want to be consistent
|
||||
@ -287,18 +286,10 @@ def build_android(rootdir: str, arch: str, debug: bool = False) -> None:
|
||||
' if os.system(\'"' + rootdir +
|
||||
'/tools/snippets" python_android_patch "' + os.getcwd() +
|
||||
'"\') != 0: raise Exception("patch apply failed")')
|
||||
# ftxt = efrotools.replace_one(
|
||||
# ftxt, ' def prepare(self):',
|
||||
# ' def prepare(self):\n import os\n'
|
||||
# ' if os.system(\'"' + rootdir +
|
||||
# '/tools/snippets" python_android_patch "' + os.getcwd() +
|
||||
# '"\') != 0: raise Exception("patch apply failed")')
|
||||
|
||||
efrotools.writefile('pybuild/packages/python.py', ftxt)
|
||||
|
||||
# Set this to a particular cpython commit to target exact releases from git
|
||||
# commit = 'e09359112e250268eca209355abeb17abf822486' # 3.7.4 release
|
||||
# commit = '5c02a39a0b31a330e06b4d6f44835afb205dc7cc' # 3.7.5 release
|
||||
commit = '43364a7ae01fbe4288ef42622259a0038ce1edcc' # 3.7.6 release
|
||||
|
||||
if commit is not None:
|
||||
|
||||
@ -80,6 +80,22 @@ def ignore_type_check_filter(node: nc.NodeNG) -> nc.NodeNG:
|
||||
return node
|
||||
|
||||
|
||||
def ignore_reveal_type_call(node: nc.NodeNG) -> nc.NodeNG:
|
||||
"""Make 'reveal_type()' not trigger an error.
|
||||
|
||||
The 'reveal_type()' fake call is used for type debugging types with
|
||||
mypy and it is annoying having pylint errors pop up alongside the mypy
|
||||
info.
|
||||
"""
|
||||
|
||||
# Let's just replace any reveal_type(x) call with print(x)..
|
||||
if (isinstance(node.func, astroid.Name)
|
||||
and node.func.name == 'reveal_type'):
|
||||
node.func.name = 'print'
|
||||
return node
|
||||
return node
|
||||
|
||||
|
||||
def _strip_import(cnode: nc.NodeNG, mnode: nc.NodeNG) -> None:
|
||||
if isinstance(cnode, (astroid.Import, astroid.ImportFrom)):
|
||||
for name, val in list(mnode.locals.items()):
|
||||
@ -194,6 +210,8 @@ def register_plugins(manager: astroid.Manager) -> None:
|
||||
# check code as if it doesn't exist at all.
|
||||
manager.register_transform(astroid.If, ignore_type_check_filter)
|
||||
|
||||
manager.register_transform(astroid.Call, ignore_reveal_type_call)
|
||||
|
||||
# Annotations on variables within a function are defer-eval'ed
|
||||
# in some cases, so lets replace them with simple strings in those
|
||||
# cases to avoid type complaints.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user