diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 71d3a76..55c537a 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -3,7 +3,7 @@ current_version = 0.9.0 commit = True tag = True -[bumpversion:file:pythonscript/cffi_bindings/mod_godot.inc.py] +[bumpversion:file:pythonscript/cffi_bindings/mod_pandemonium.inc.py] search = __version__ = '{current_version}' replace = __version__ = '{new_version}' diff --git a/.github/workflows_off/build.yml b/.github/workflows_off/build.yml index a7f0271..597a164 100644 --- a/.github/workflows_off/build.yml +++ b/.github/workflows_off/build.yml @@ -90,7 +90,7 @@ jobs: uses: actions/upload-artifact@11830c9f4d30053679cb8904e3b3ce1b8c00bf40 # pin@v2 with: name: ${{ env.PLATFORM }}-release - path: 'build/godot-python-*.tar.bz2' + path: 'build/pandemonium-python-*.tar.bz2' ################################################################################# @@ -166,7 +166,7 @@ jobs: uses: actions/upload-artifact@11830c9f4d30053679cb8904e3b3ce1b8c00bf40 # pin@v2 with: name: ${{ matrix.PLATFORM }}-release - path: 'build/godot-python-*.zip' + path: 'build/pandemonium-python-*.zip' ################################################################################# @@ -217,7 +217,7 @@ jobs: uses: actions/upload-artifact@11830c9f4d30053679cb8904e3b3ce1b8c00bf40 # pin@v2 with: name: ${{ env.PLATFORM }}-release - path: 'build/godot-python-*.tar.bz2' + path: 'build/pandemonium-python-*.tar.bz2' ################################################################################# @@ -246,6 +246,6 @@ jobs: with: repo_token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ github.ref }} - file: godot-python-*.* + file: pandemonium-python-*.* file_glob: true overwrite: true diff --git a/SConstruct b/SConstruct index 31a49dd..17179fb 100644 --- a/SConstruct +++ b/SConstruct @@ -13,7 +13,7 @@ EnsureSConsVersion(3, 0) def extract_version(): # Hold my beer... gl = {} - exec(open("pythonscript/godot/_version.py").read(), gl) + exec(open("pythonscript/pandemonium/_version.py").read(), gl) return gl["__version__"] @@ -47,7 +47,7 @@ vars.Add( ) vars.Add("pytest_args", "Pytest arguments passed to tests functions", "") vars.Add( - "pandemonium_args", "Additional arguments passed to godot binary when running tests&examples", "" + "pandemonium_args", "Additional arguments passed to pandemonium binary when running tests&examples", "" ) vars.Add("release_suffix", "Suffix to add to the release archive", extract_version()) vars.Add( @@ -226,9 +226,9 @@ def generate_release(target, source, env): # Zip format doesn't support symlinks that are needed for Linux&macOS if env["platform"].startswith("windows"): - release_target = "build/godot-python-${release_suffix}-${platform}.zip" + release_target = "build/pandemonium-python-${release_suffix}-${platform}.zip" else: - release_target = "build/godot-python-${release_suffix}-${platform}.tar.bz2" + release_target = "build/pandemonium-python-${release_suffix}-${platform}.tar.bz2" release = env.Command(release_target, env["DIST_ROOT"], generate_release) env.Alias("release", release) env.AlwaysBuild("release") diff --git a/addons/pythonscript_repl/input_box.py b/addons/pythonscript_repl/input_box.py index 0747427..b156d31 100644 --- a/addons/pythonscript_repl/input_box.py +++ b/addons/pythonscript_repl/input_box.py @@ -1,4 +1,4 @@ -from godot import exposed, InputEventKey, KEY_UP, KEY_DOWN, LineEdit +from pandemonium import exposed, InputEventKey, KEY_UP, KEY_DOWN, LineEdit @exposed(tool=True) diff --git a/addons/pythonscript_repl/plugin.cfg b/addons/pythonscript_repl/plugin.cfg index 757944d..5ac3b52 100644 --- a/addons/pythonscript_repl/plugin.cfg +++ b/addons/pythonscript_repl/plugin.cfg @@ -2,6 +2,6 @@ name="pythonscript_repl" description="" -author="godot-python" +author="pandemonium-python" version="0.1" script="plugin.py" diff --git a/addons/pythonscript_repl/plugin.py b/addons/pythonscript_repl/plugin.py index 6d73a3c..47bde43 100644 --- a/addons/pythonscript_repl/plugin.py +++ b/addons/pythonscript_repl/plugin.py @@ -1,4 +1,4 @@ -from godot import exposed, EditorPlugin, ProjectSettings, ResourceLoader +from pandemonium import exposed, EditorPlugin, ProjectSettings, ResourceLoader BASE_RES = str(ProjectSettings.localize_path(__file__)).rsplit("/", 1)[0] diff --git a/addons/pythonscript_repl/python_repl.py b/addons/pythonscript_repl/python_repl.py index ae13e03..044e28e 100644 --- a/addons/pythonscript_repl/python_repl.py +++ b/addons/pythonscript_repl/python_repl.py @@ -5,8 +5,8 @@ from collections import deque from threading import Thread, Lock, Event from queue import SimpleQueue -from _godot import StdoutStderrCaptureToGodot, StdinCapture -from godot import exposed, export, ResourceLoader, VBoxContainer +from _pandemonium import StdoutStderrCaptureToGodot, StdinCapture +from pandemonium import exposed, export, ResourceLoader, VBoxContainer from .plugin import BASE_RES diff --git a/examples/pong/ball.py b/examples/pong/ball.py index b400ae3..6d6a58f 100644 --- a/examples/pong/ball.py +++ b/examples/pong/ball.py @@ -1,4 +1,4 @@ -from godot import exposed, Vector2, Area2D +from pandemonium import exposed, Vector2, Area2D DEFAULT_SPEED = 220 diff --git a/examples/pong/paddle.py b/examples/pong/paddle.py index 2cbdfcf..c29cd2d 100644 --- a/examples/pong/paddle.py +++ b/examples/pong/paddle.py @@ -1,6 +1,6 @@ from random import random -from godot import exposed, export, Vector2, GDString, Area2D, Input +from pandemonium import exposed, export, Vector2, GDString, Area2D, Input MOTION_SPEED = 150 diff --git a/examples/pong/pong.py b/examples/pong/pong.py index 0bfb05b..1f34975 100644 --- a/examples/pong/pong.py +++ b/examples/pong/pong.py @@ -1,4 +1,4 @@ -from godot import exposed, signal, export, Node2D +from pandemonium import exposed, signal, export, Node2D SCORE_TO_WIN = 2 diff --git a/examples/pong_multiplayer/ball.py b/examples/pong_multiplayer/ball.py index 61945c4..3140aef 100644 --- a/examples/pong_multiplayer/ball.py +++ b/examples/pong_multiplayer/ball.py @@ -1,4 +1,4 @@ -from godot import exposed, rpcsync, Area2D, Vector2 +from pandemonium import exposed, rpcsync, Area2D, Vector2 DEFAULT_SPEED = 80 diff --git a/generation/bindings_templates/bindings.tmpl.pxd b/generation/bindings_templates/bindings.tmpl.pxd index c0323c0..2918716 100644 --- a/generation/bindings_templates/bindings.tmpl.pxd +++ b/generation/bindings_templates/bindings.tmpl.pxd @@ -1,9 +1,9 @@ # /!\ Autogenerated code, modifications will be lost /!\ # see `generation/generate_bindings.py` -from godot._hazmat.gdnative_api_struct cimport * -from godot._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 -from godot.builtins cimport * +from pandemonium._hazmat.gdnative_api_struct cimport * +from pandemonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 +from pandemonium.builtins cimport * {% from 'class.tmpl.pxd' import render_class_pxd -%} {%- for cls in classes %} diff --git a/generation/bindings_templates/bindings.tmpl.pyi b/generation/bindings_templates/bindings.tmpl.pyi index 8efa4b5..a12c50b 100644 --- a/generation/bindings_templates/bindings.tmpl.pyi +++ b/generation/bindings_templates/bindings.tmpl.pyi @@ -5,7 +5,7 @@ # (Note PEP484 state that import without as and * are not exposed by the stub file) from typing import Any, Union from enum import IntFlag -from godot.builtins import ( +from pandemonium.builtins import ( AABB, Array, Basis, diff --git a/generation/bindings_templates/bindings.tmpl.pyx b/generation/bindings_templates/bindings.tmpl.pyx index 5bd2261..e5e5b7f 100644 --- a/generation/bindings_templates/bindings.tmpl.pyx +++ b/generation/bindings_templates/bindings.tmpl.pyx @@ -1,10 +1,10 @@ # /!\ Autogenerated code, modifications will be lost /!\ # see `generation/generate_bindings.py` -from godot._hazmat.gdnative_api_struct cimport * -from godot._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 -from godot._hazmat.conversion cimport * -from godot.builtins cimport * +from pandemonium._hazmat.gdnative_api_struct cimport * +from pandemonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 +from pandemonium._hazmat.conversion cimport * +from pandemonium.builtins cimport * from enum import IntFlag diff --git a/generation/bindings_templates/method.tmpl.pyx b/generation/bindings_templates/method.tmpl.pyx index 8cd775c..a64521a 100644 --- a/generation/bindings_templates/method.tmpl.pyx +++ b/generation/bindings_templates/method.tmpl.pyx @@ -110,7 +110,7 @@ with nogil: # It's important to initialize this pointer to null given # in case of Reference, Godot will try to decrease the # refcount if the pointer is valid ! -# (see https://github.com/godotengine/godot/issues/35609) +# (see https://github.com/pandemoniumengine/pandemonium/issues/35609) cdef pandemonium_object *{{ retval }} = NULL {% set retval_as_arg = "&{}".format(retval) %} {% elif method.return_type.c_type == "pandemonium_variant" %} diff --git a/generation/builtins_templates/builtins.tmpl.pxd b/generation/builtins_templates/builtins.tmpl.pxd index 43ddc11..5715273 100644 --- a/generation/builtins_templates/builtins.tmpl.pxd +++ b/generation/builtins_templates/builtins.tmpl.pxd @@ -3,8 +3,8 @@ cimport cython -from godot._hazmat.gdnative_api_struct cimport * -from godot.pool_arrays cimport ( +from pandemonium._hazmat.gdnative_api_struct cimport * +from pandemonium.pool_arrays cimport ( PoolIntArray, PoolRealArray, PoolByteArray, diff --git a/generation/builtins_templates/builtins.tmpl.pyx b/generation/builtins_templates/builtins.tmpl.pyx index 0399776..2802b1b 100644 --- a/generation/builtins_templates/builtins.tmpl.pyx +++ b/generation/builtins_templates/builtins.tmpl.pyx @@ -5,14 +5,14 @@ from typing import Union cimport cython -from godot._hazmat.gdnative_api_struct cimport * -from godot._hazmat.gdapi cimport ( +from pandemonium._hazmat.gdnative_api_struct cimport * +from pandemonium._hazmat.gdapi cimport ( pythonscript_gdapi10 as gdapi10, pythonscript_gdapi11 as gdapi11, pythonscript_gdapi12 as gdapi12, ) -from godot._hazmat.conversion cimport * -from godot.pool_arrays cimport ( +from pandemonium._hazmat.conversion cimport * +from pandemonium.pool_arrays cimport ( PoolIntArray, PoolRealArray, PoolByteArray, diff --git a/generation/builtins_templates/dictionary.tmpl.pxi b/generation/builtins_templates/dictionary.tmpl.pxi index d3a25b6..37b798d 100644 --- a/generation/builtins_templates/dictionary.tmpl.pxi +++ b/generation/builtins_templates/dictionary.tmpl.pxi @@ -153,7 +153,7 @@ cdef class Dictionary: for k, v in other.items(): self[k] = v else: - raise TypeError("other must be godot.Dictionary or dict") + raise TypeError("other must be pandemonium.Dictionary or dict") def items(self): cdef pandemonium_variant *p_key = NULL @@ -176,7 +176,7 @@ cdef class Dictionary: return dict(self) == dict(other) def __eq__(self, other): - {# see https://github.com/godotengine/godot/issues/27615 #} + {# see https://github.com/pandemoniumengine/pandemonium/issues/27615 #} {{ force_mark_rendered("pandemonium_dictionary_operator_equal") }} try: return Dictionary.operator_equal(self, other) diff --git a/generation/builtins_templates/rid.tmpl.pxi b/generation/builtins_templates/rid.tmpl.pxi index e45e4bf..411c352 100644 --- a/generation/builtins_templates/rid.tmpl.pxi +++ b/generation/builtins_templates/rid.tmpl.pxi @@ -1,7 +1,7 @@ {%- block pxd_header %} {% endblock -%} {%- block pyx_header %} -from godot.bindings cimport Resource +from pandemonium.bindings cimport Resource {% endblock -%} diff --git a/generation/builtins_templates/vector3.tmpl.pxi b/generation/builtins_templates/vector3.tmpl.pxi index 99c05a5..4b8f286 100644 --- a/generation/builtins_templates/vector3.tmpl.pxi +++ b/generation/builtins_templates/vector3.tmpl.pxi @@ -1,7 +1,7 @@ {%- block pxd_header %} {% endblock -%} {%- block pyx_header %} -from godot._hazmat.gdnative_api_struct cimport pandemonium_vector3_axis +from pandemonium._hazmat.gdnative_api_struct cimport pandemonium_vector3_axis import math from enum import IntEnum diff --git a/generation/generate_bindings.py b/generation/generate_bindings.py index 5a4aaf5..9021240 100644 --- a/generation/generate_bindings.py +++ b/generation/generate_bindings.py @@ -216,12 +216,12 @@ SUPPORTED_TYPES = { def pre_cook_patch_stuff(raw_data): for klass in raw_data: - # see https://github.com/godotengine/godot/pull/40386 + # see https://github.com/pandemoniumengine/pandemonium/pull/40386 if klass["name"] == "Reference": klass["is_reference"] = True for prop in klass["properties"]: prop["name"] = prop["name"].replace("/", "_") - # see https://github.com/godotengine/godot/pull/40383 + # see https://github.com/pandemoniumengine/pandemonium/pull/40383 if prop["type"] == "17/17:RichTextEffect": prop["type"] = "Array" for meth in klass["methods"]: @@ -239,7 +239,7 @@ def pre_cook_patch_stuff(raw_data): def post_cook_patch_stuff(classes): for klass in classes: - # See https://github.com/godotengine/godot/issues/34254 + # See https://github.com/pandemoniumengine/pandemonium/issues/34254 if klass.name == "_OS": for meth in klass.methods: if meth.name in ( @@ -585,7 +585,7 @@ if __name__ == "__main__": raise argparse.ArgumentTypeError(f"Must have a `{suffix}` suffix") return val[: -len(suffix)] - parser = argparse.ArgumentParser(description="Generate godot api bindings bindings files") + parser = argparse.ArgumentParser(description="Generate pandemonium api bindings bindings files") parser.add_argument( "--input", "-i", diff --git a/generation/generate_builtins.py b/generation/generate_builtins.py index 9562dc5..0968b08 100644 --- a/generation/generate_builtins.py +++ b/generation/generate_builtins.py @@ -260,7 +260,7 @@ def load_builtins_specs_from_gdnative_api_json(gdnative_api: dict) -> List[Built revision_gdapi = f"gdapi{revision['version']['major']}{revision['version']['minor']}" for func in revision["api"]: assert func["name"] not in specs - # Ignore godot pool (generate by another script) + # Ignore pandemonium pool (generate by another script) if func["name"].startswith("pandemonium_pool_") or func["name"].startswith("pandemonium_variant_"): continue spec = load_builtin_method_spec(func, gdapi=revision_gdapi) @@ -372,7 +372,7 @@ if __name__ == "__main__": return val[: -len(suffix)] parser = argparse.ArgumentParser( - description="Generate godot builtins bindings files (except pool arrays)" + description="Generate pandemonium builtins bindings files (except pool arrays)" ) parser.add_argument( "--input", diff --git a/generation/generate_gdnative_api_struct.py b/generation/generate_gdnative_api_struct.py index 7f8de11..01b3545 100644 --- a/generation/generate_gdnative_api_struct.py +++ b/generation/generate_gdnative_api_struct.py @@ -42,7 +42,7 @@ class CCCP: In the end remember that we are not compiling a C program, but creating a .pxd file that will (in conjuction with a .pyx) be used to generate a .c - file that will include the godot api headers. So there is no need to handle + file that will include the pandemonium api headers. So there is no need to handle platform specific (or even opaque structure size !) detail here: they will be ignored by cython and left to the final C compilation. """ diff --git a/generation/generate_pool_arrays.py b/generation/generate_pool_arrays.py index 769bceb..6c052aa 100644 --- a/generation/generate_pool_arrays.py +++ b/generation/generate_pool_arrays.py @@ -98,7 +98,7 @@ def generate_pool_array(output_path): if __name__ == "__main__": parser = argparse.ArgumentParser( - description="Generate godot pool_x_array builtins bindings files" + description="Generate pandemonium pool_x_array builtins bindings files" ) parser.add_argument("--output", "-o", default=None) args = parser.parse_args() diff --git a/generation/pool_arrays_templates/pool_arrays.tmpl.pxd b/generation/pool_arrays_templates/pool_arrays.tmpl.pxd index d883899..7a0364e 100644 --- a/generation/pool_arrays_templates/pool_arrays.tmpl.pxd +++ b/generation/pool_arrays_templates/pool_arrays.tmpl.pxd @@ -3,12 +3,12 @@ cimport cython -from godot._hazmat.gdapi cimport ( +from pandemonium._hazmat.gdapi cimport ( pythonscript_gdapi10 as gdapi10, pythonscript_gdapi11 as gdapi11, pythonscript_gdapi12 as gdapi12, ) -from godot._hazmat.gdnative_api_struct cimport ( +from pandemonium._hazmat.gdnative_api_struct cimport ( {% for t in types %} {{ t.gd_value }}, {{ t.gd_pool }}, @@ -16,7 +16,7 @@ from godot._hazmat.gdnative_api_struct cimport ( {{ t.gd_pool }}_read_access, {% endfor %} ) -from godot.builtins cimport ( +from pandemonium.builtins cimport ( Array, {% for t in types %} {% if not t.is_base_type %} diff --git a/generation/pool_arrays_templates/pool_arrays.tmpl.pyx b/generation/pool_arrays_templates/pool_arrays.tmpl.pyx index f0f78ac..4b84f7f 100644 --- a/generation/pool_arrays_templates/pool_arrays.tmpl.pyx +++ b/generation/pool_arrays_templates/pool_arrays.tmpl.pyx @@ -4,12 +4,12 @@ cimport cython from libc.stdint cimport uintptr_t -from godot._hazmat.gdapi cimport ( +from pandemonium._hazmat.gdapi cimport ( pythonscript_gdapi10 as gdapi10, pythonscript_gdapi11 as gdapi11, pythonscript_gdapi12 as gdapi12, ) -from godot._hazmat.gdnative_api_struct cimport ( +from pandemonium._hazmat.gdnative_api_struct cimport ( {% for t in types %} {{ t.gd_value }}, {{ t.gd_pool }}, @@ -17,7 +17,7 @@ from godot._hazmat.gdnative_api_struct cimport ( {{ t.gd_pool }}_read_access, {% endfor %} ) -from godot.builtins cimport ( +from pandemonium.builtins cimport ( Array, {% for t in types %} {% if not t.is_base_type %} diff --git a/misc/release_README.txt b/misc/release_README.txt index 458f4e9..b5fd0fd 100644 --- a/misc/release_README.txt +++ b/misc/release_README.txt @@ -13,7 +13,7 @@ Introduction This is a beta version of the Python module for Godot. You are likely to encounter bugs and catastrophic crashes, if so please -report them to https://github.com/touilleMan/godot-python/issues. +report them to https://github.com/Relintai/gdnative_python. Working features diff --git a/platforms/SConscript b/platforms/SConscript index c8764a7..3c094ac 100644 --- a/platforms/SConscript +++ b/platforms/SConscript @@ -11,11 +11,12 @@ Import("env") def resolve_pandemonium_download_url(major, minor, patch, extra, platform): - version = f"{major}.{minor}.{patch}" if patch != 0 else f"{major}.{minor}" - if extra == "stable": - return f"https://downloads.tuxfamily.org/godotengine/{version}/Godot_v{version}-{extra}_{platform}.zip" - else: - return f"https://downloads.tuxfamily.org/godotengine/{version}/{extra}/Godot_v{version}-{extra}_{platform}.zip" + #version = f"{major}.{minor}.{patch}" if patch != 0 else f"{major}.{minor}" + #if extra == "stable": + # return f"https://downloads.tuxfamily.org/godotengine/{version}/Godot_v{version}-{extra}_{platform}.zip" + #else: + # return f"https://downloads.tuxfamily.org/godotengine/{version}/{extra}/Godot_v{version}-{extra}_{platform}.zip" + returnf "" def resolve_pandemonium_binary_name(major, minor, patch, extra, platform): diff --git a/pythonscript/SConscript b/pythonscript/SConscript index 95c8a45..6f52934 100644 --- a/pythonscript/SConscript +++ b/pythonscript/SConscript @@ -29,15 +29,15 @@ env.AppendUnique(LIBPATH=[Dir(".")]) env.AppendUnique(CYTHON_COMPILE_DEPS=[libpythonscript]) -SConscript(["godot/SConscript"]) +SConscript(["pandemoniummonium/SConscript"]) -# `_pandemonium_api.h` is only for internal use between _godot and pythonscript +# `_pandemonium_api.h` is only for internal use between _pandemoniummonium and pythonscript # libraries, hence no need to provide it as part of the release *mods, _ = env.CythonModule( - ["_godot", "_pandemonium_api.h"], + ["_pandemoniummonium", "_pandemonium_api.h"], [ - "_godot.pyx", + "_pandemoniummonium.pyx", "_pandemonium_editor.pxi", "_pandemonium_instance.pxi", "_pandemonium_profiling.pxi", diff --git a/pythonscript/_godot.pyx b/pythonscript/_godot.pyx index 7a7c9ae..6a9a9e5 100644 --- a/pythonscript/_godot.pyx +++ b/pythonscript/_godot.pyx @@ -1,29 +1,29 @@ -# `_godot` module contains all the callbacks needed by Godot's Pluginscript +# `_pandemoniummonium` module contains all the callbacks needed by Godot's Pluginscript # system to expose Python as a language to Godot (see pythonscript.c for # more on this). # Hence there is no point of importing this module from Python given it # only expose C functions. -# Beside this module depend on the `godot.hazmat` module so it would be a bad -# idea to make the `godot` module depend on it... +# Beside this module depend on the `pandemoniummonium.hazmat` module so it would be a bad +# idea to make the `pandemoniummonium` module depend on it... include "_pandemonium_editor.pxi" include "_pandemonium_profiling.pxi" include "_pandemonium_script.pxi" include "_pandemonium_instance.pxi" include "_pandemonium_io.pxi" -from godot._hazmat.gdnative_api_struct cimport ( +from pandemoniummonium._hazmat.gdnative_api_struct cimport ( pandemonium_gdnative_init_options, pandemonium_pluginscript_language_data, ) -from godot._hazmat.internal cimport set_pythonscript_verbose, get_pythonscript_verbose -from godot.builtins cimport GDString +from pandemoniummonium._hazmat.internal cimport set_pythonscript_verbose, get_pythonscript_verbose +from pandemoniummonium.builtins cimport GDString import sys # OS and ProjectSettings are singletons exposed as global python objects, # hence there are not available from a cimport -from godot.bindings import OS, ProjectSettings -from godot._version import __version__ as pythonscript_version +from pandemoniummonium.bindings import OS, ProjectSettings +from pandemoniummonium._version import __version__ as pythonscript_version def _setup_config_entry(name, default_value): @@ -37,7 +37,7 @@ def _setup_config_entry(name, default_value): cdef api pandemonium_pluginscript_language_data *pythonscript_init() with gil: # Pass argv arguments - sys.argv = ["godot"] + [str(x) for x in OS.get_cmdline_args()] + sys.argv = ["pandemoniummonium"] + [str(x) for x in OS.get_cmdline_args()] # Update PYTHONPATH according to configuration pythonpath = str(_setup_config_entry("python_script/path", "res://;res://lib")) diff --git a/pythonscript/_godot_editor.pxi b/pythonscript/_godot_editor.pxi index 46d50fd..0d146bf 100644 --- a/pythonscript/_godot_editor.pxi +++ b/pythonscript/_godot_editor.pxi @@ -2,7 +2,7 @@ from libc.stddef cimport wchar_t -from godot._hazmat.gdnative_api_struct cimport ( +from pannemdniummonium._hazmat.gdnative_api_struct cimport ( pandemonium_pluginscript_language_data, pandemonium_string, pandemonium_bool, @@ -13,8 +13,8 @@ from godot._hazmat.gdnative_api_struct cimport ( pandemonium_error, pandemonium_dictionary ) -from godot._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 -from godot._hazmat.conversion cimport ( +from pandemoniummonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 +from pandemoniummonium._hazmat.conversion cimport ( pandemonium_string_to_pyobj, pyobj_to_pandemonium_string, pandemonium_variant_to_pyobj, @@ -32,8 +32,8 @@ cdef api pandemonium_string pythonscript_get_template_source_code( else: class_name = pandemonium_string_to_pyobj(p_class_name) cdef str base_class_name = pandemonium_string_to_pyobj(p_base_class_name) - cdef str src = f"""from godot import exposed, export -from godot import * + cdef str src = f"""from pandemoniummonium import exposed, export +from pandemoniummonium import * @exposed diff --git a/pythonscript/_godot_instance.pxi b/pythonscript/_godot_instance.pxi index 32b5271..82919e8 100644 --- a/pythonscript/_godot_instance.pxi +++ b/pythonscript/_godot_instance.pxi @@ -3,7 +3,7 @@ from libc.stddef cimport wchar_t from cpython cimport Py_INCREF, Py_DECREF, PyObject -from godot._hazmat.gdnative_api_struct cimport ( +from pandemoniummonium._hazmat.gdnative_api_struct cimport ( pandemonium_string, pandemonium_string_name, pandemonium_bool, @@ -18,8 +18,8 @@ from godot._hazmat.gdnative_api_struct cimport ( pandemonium_variant_call_error_error, pandemonium_variant_type, ) -from godot._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 -from godot._hazmat.conversion cimport ( +from pandemoniummonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 +from pandemoniummonium._hazmat.conversion cimport ( pandemonium_variant_to_pyobj, pyobj_to_pandemonium_variant, pandemonium_string_name_to_pyobj, diff --git a/pythonscript/_godot_io.pxi b/pythonscript/_godot_io.pxi index 8cdf631..c87c3fa 100644 --- a/pythonscript/_godot_io.pxi +++ b/pythonscript/_godot_io.pxi @@ -4,12 +4,12 @@ import traceback from io import TextIOBase from threading import Lock -from godot._hazmat.conversion cimport ( +from pandemoniummonium._hazmat.conversion cimport ( pandemonium_string_to_pyobj, pyobj_to_pandemonium_string, pandemonium_variant_to_pyobj, ) -from godot._hazmat.gdnative_api_struct cimport ( +from pandemoniummonium._hazmat.gdnative_api_struct cimport ( pandemonium_string, pandemonium_string_name, pandemonium_bool, diff --git a/pythonscript/_godot_profiling.pxi b/pythonscript/_godot_profiling.pxi index 99b5ceb..0634036 100644 --- a/pythonscript/_godot_profiling.pxi +++ b/pythonscript/_godot_profiling.pxi @@ -1,10 +1,10 @@ # cython: c_string_type=unicode, c_string_encoding=utf8 -from godot._hazmat.gdnative_api_struct cimport ( +from pandemoniummonium._hazmat.gdnative_api_struct cimport ( pandemonium_pluginscript_language_data, pandemonium_pluginscript_profiling_data, ) -from godot._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 +from pandemoniummonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 import sys from collections import defaultdict diff --git a/pythonscript/_godot_script.pxi b/pythonscript/_godot_script.pxi index 425dc41..0088d98 100644 --- a/pythonscript/_godot_script.pxi +++ b/pythonscript/_godot_script.pxi @@ -4,7 +4,7 @@ import importlib from cpython.ref cimport PyObject -from godot._hazmat.gdnative_api_struct cimport ( +from pandemoniummonium._hazmat.gdnative_api_struct cimport ( pandemonium_pluginscript_language_data, pandemonium_string, pandemonium_bool, @@ -23,26 +23,26 @@ from godot._hazmat.gdnative_api_struct cimport ( GODOT_METHOD_FLAG_FROM_SCRIPT, GODOT_METHOD_RPC_MODE_DISABLED, ) -from godot._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 -from godot._hazmat.conversion cimport ( +from pandemoniummonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 +from pandemoniummonium._hazmat.conversion cimport ( pandemonium_string_to_pyobj, pyobj_to_pandemonium_string, pyobj_to_pandemonium_string_name, pytype_to_pandemonium_type, ) -from godot._hazmat.internal cimport ( +from pandemoniummonium._hazmat.internal cimport ( get_pythonscript_verbose, get_exposed_class, set_exposed_class, destroy_exposed_class, ) -from godot.bindings cimport _initialize_bindings, Object -from godot.builtins cimport Array, Dictionary +from pandemoniummonium.bindings cimport _initialize_bindings, Object +from pandemoniummonium.builtins cimport Array, Dictionary import inspect import traceback -from godot.tags import ExportedField, SignalField +from pandemoniummonium.tags import ExportedField, SignalField cdef inline pandemonium_pluginscript_script_manifest _build_empty_script_manifest(): diff --git a/pythonscript/godot/SConscript b/pythonscript/godot/SConscript index 71e8cf6..829257e 100644 --- a/pythonscript/godot/SConscript +++ b/pythonscript/godot/SConscript @@ -14,11 +14,11 @@ pxds = [ "pool_arrays.pxd", ) ] -env.Install("$DIST_SITE_PACKAGES/godot", [File("_version.py"), File("globals.py"), *pxds]) +env.Install("$DIST_SITE_PACKAGES/pandemonium", [File("_version.py"), File("globals.py"), *pxds]) env.AppendUnique(CYTHON_DEPS=pxds) -env.Install("$DIST_SITE_PACKAGES/godot", env.CythonModule("tags", "tags.pyx")) +env.Install("$DIST_SITE_PACKAGES/pandemonium", env.CythonModule("tags", "tags.pyx")) ### Builtins ### @@ -49,8 +49,8 @@ env.Depends( env.Depends(pandemonium_builtins_srcs, pandemonium_pool_arrays_srcs) -env.Install("$DIST_SITE_PACKAGES/godot", env.CythonModule("pool_arrays", "pool_arrays.pyx")) -env.Install("$DIST_SITE_PACKAGES/godot", env.CythonModule("builtins", "builtins.pyx")) +env.Install("$DIST_SITE_PACKAGES/pandemonium", env.CythonModule("pool_arrays", "pool_arrays.pyx")) +env.Install("$DIST_SITE_PACKAGES/pandemonium", env.CythonModule("builtins", "builtins.pyx")) ### Bindings ### @@ -95,6 +95,6 @@ bindings_env.Depends( bindings_env.Install( - "$DIST_SITE_PACKAGES/godot", bindings_env.CythonModule("bindings", "bindings.pyx") + "$DIST_SITE_PACKAGES/pandemonium", bindings_env.CythonModule("bindings", "bindings.pyx") ) -bindings_env.Install("$DIST_SITE_PACKAGES/godot", "bindings.pyi") +bindings_env.Install("$DIST_SITE_PACKAGES/pandemonium", "bindings.pyi") diff --git a/pythonscript/godot/__init__.py b/pythonscript/godot/__init__.py index c75620d..af488fc 100644 --- a/pythonscript/godot/__init__.py +++ b/pythonscript/godot/__init__.py @@ -1,20 +1,20 @@ # Start with a sanity check to ensure the loading is done from Godot-Python # (and not from a regular Python interpreter which would lead to a segfault). # The idea is we should have the following loading order: -# godot binary -> pythonscript.so -> _godot.so -> godot/__init__.py +# pandemonium binary -> pythonscript.so -> _pandemonium.so -> pandemonium/__init__.py import sys -if "_godot" not in sys.modules: +if "_pandemonium" not in sys.modules: raise ImportError( - "Cannot initialize godot module given Godot GDNative API not available.\n" + "Cannot initialize pandemonium module given Godot GDNative API not available.\n" "This is most likely because you are running code from a regular Python interpreter" - " (i.e. doing something like `python my_script.py`) while godot module is only available" + " (i.e. doing something like `python my_script.py`) while pandemonium module is only available" " to Python code loaded from Godot through Godot-Python plugin." ) del sys -from godot._version import __version__ -from godot.tags import ( +from pandemonium._version import __version__ +from pandemonium.tags import ( MethodRPCMode, PropertyHint, PropertyUsageFlag, @@ -31,7 +31,7 @@ from godot.tags import ( export, exposed, ) -from godot.pool_arrays import ( +from pandemonium.pool_arrays import ( PoolIntArray, PoolRealArray, PoolByteArray, @@ -40,5 +40,5 @@ from godot.pool_arrays import ( PoolColorArray, PoolStringArray, ) -from godot.builtins import * -from godot.bindings import * +from pandemonium.builtins import * +from pandemonium.bindings import * diff --git a/pythonscript/godot/_hazmat/SConscript b/pythonscript/godot/_hazmat/SConscript index 56b5887..f92bee3 100644 --- a/pythonscript/godot/_hazmat/SConscript +++ b/pythonscript/godot/_hazmat/SConscript @@ -12,10 +12,10 @@ pxds = [ ) ] env.AppendUnique(CYTHON_DEPS=pxds) -env.Install("$DIST_SITE_PACKAGES/godot/_hazmat", pxds) +env.Install("$DIST_SITE_PACKAGES/pandemonium/_hazmat", pxds) -### Generate godot api .h -> gdnative_api_struct.pxd ### +### Generate pandemonium api .h -> gdnative_api_struct.pxd ### gdnative_api_struct_pxd = env.Command( @@ -28,6 +28,6 @@ gdnative_api_struct_pxd = env.Command( ### Cython modules ### -env.Install("$DIST_SITE_PACKAGES/godot/_hazmat", env.CythonModule("conversion", "conversion.pyx")) +env.Install("$DIST_SITE_PACKAGES/pandemonium/_hazmat", env.CythonModule("conversion", "conversion.pyx")) -env.Install("$DIST_SITE_PACKAGES/godot/_hazmat", env.CythonModule("internal", "internal.pyx")) +env.Install("$DIST_SITE_PACKAGES/pandemonium/_hazmat", env.CythonModule("internal", "internal.pyx")) diff --git a/pythonscript/godot/_hazmat/conversion.pxd b/pythonscript/godot/_hazmat/conversion.pxd index 2f9c2d0..428a880 100644 --- a/pythonscript/godot/_hazmat/conversion.pxd +++ b/pythonscript/godot/_hazmat/conversion.pxd @@ -1,8 +1,8 @@ from libc.stddef cimport wchar_t from libc.stdio cimport printf -from godot._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 -from godot._hazmat.gdnative_api_struct cimport ( +from pandemonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 +from pandemonium._hazmat.gdnative_api_struct cimport ( pandemonium_string, pandemonium_string_name, pandemonium_int, @@ -10,7 +10,7 @@ from godot._hazmat.gdnative_api_struct cimport ( pandemonium_variant, pandemonium_variant_type, ) -from godot.builtins cimport GDString, NodePath +from pandemonium.builtins cimport GDString, NodePath # Godot string are basically a vector of wchar_t, each wchar_t representing diff --git a/pythonscript/godot/_hazmat/conversion.pyx b/pythonscript/godot/_hazmat/conversion.pyx index 41451be..b3cc300 100644 --- a/pythonscript/godot/_hazmat/conversion.pyx +++ b/pythonscript/godot/_hazmat/conversion.pyx @@ -1,8 +1,8 @@ from libc.stddef cimport wchar_t from libc.stdio cimport printf -from godot._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 -from godot._hazmat.gdnative_api_struct cimport ( +from pandemonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 +from pandemonium._hazmat.gdnative_api_struct cimport ( pandemonium_string, pandemonium_string_name, pandemonium_int, @@ -10,8 +10,8 @@ from godot._hazmat.gdnative_api_struct cimport ( pandemonium_variant, pandemonium_variant_type, ) -from godot.bindings cimport Object -from godot.builtins cimport ( +from pandemonium.bindings cimport Object +from pandemonium.builtins cimport ( Vector2, Rect2, Vector3, @@ -278,7 +278,7 @@ cdef inline RID _pandemonium_variant_to_pyobj_rid(const pandemonium_variant *p_g cdef inline Object _pandemonium_variant_to_pyobj_object(const pandemonium_variant *p_gdvar): - # TODO: This conversion relies on godot String and lookup into bindings + # TODO: This conversion relies on pandemonium String and lookup into bindings # modules, wouldn't it be better to create a `ObjectFromVariant` lazy # class instead ? return Object.cast_from_variant(p_gdvar) diff --git a/pythonscript/godot/_hazmat/gdapi.pxd b/pythonscript/godot/_hazmat/gdapi.pxd index a4eacef..8421f64 100644 --- a/pythonscript/godot/_hazmat/gdapi.pxd +++ b/pythonscript/godot/_hazmat/gdapi.pxd @@ -1,4 +1,4 @@ -from godot._hazmat.gdnative_api_struct cimport ( +from pandemonium._hazmat.gdnative_api_struct cimport ( pandemonium_gdnative_core_api_struct, pandemonium_gdnative_core_1_1_api_struct, pandemonium_gdnative_core_1_2_api_struct, diff --git a/pythonscript/godot/_hazmat/internal.pxd b/pythonscript/godot/_hazmat/internal.pxd index fa67213..8b8176c 100644 --- a/pythonscript/godot/_hazmat/internal.pxd +++ b/pythonscript/godot/_hazmat/internal.pxd @@ -1,4 +1,4 @@ -from godot.bindings cimport Object +from pandemonium.bindings cimport Object cdef bint __pythonscript_verbose diff --git a/pythonscript/godot/_hazmat/internal.pyx b/pythonscript/godot/_hazmat/internal.pyx index 990dc66..00032e2 100644 --- a/pythonscript/godot/_hazmat/internal.pyx +++ b/pythonscript/godot/_hazmat/internal.pyx @@ -1,6 +1,6 @@ import threading -from godot.bindings cimport Object +from pandemonium.bindings cimport Object cdef bint __pythonscript_verbose = False @@ -35,11 +35,11 @@ cdef void set_exposed_class(object cls): cdef ModExposedClass mod cdef str modname = cls.__module__ - # Use a threadlock to avoid data races in case godot loads/unloads scripts in multiple threads + # Use a threadlock to avoid data races in case pandemonium loads/unloads scripts in multiple threads with __exposed_classes_lock: # We must keep track of reference counts for the module when reloading a script, - # godot calls pythonscript_script_init BEFORE pythonscript_script_finish + # pandemonium calls pythonscript_script_init BEFORE pythonscript_script_finish # this happens because Godot can make multiple PluginScript instances for the same resource. # Godot calls @@ -67,7 +67,7 @@ cdef void destroy_exposed_class(object cls): cdef ModExposedClass mod cdef str modname = cls.__module__ - # Use a threadlock to avoid data races in case godot loads/unloads scripts in multiple threads + # Use a threadlock to avoid data races in case pandemonium loads/unloads scripts in multiple threads with __exposed_classes_lock: try: @@ -78,8 +78,8 @@ cdef void destroy_exposed_class(object cls): if mod.refcount == 1: del __modules_with_exposed_class[modname] # Not safe to ever get rid of all references... - # see: https://github.com/touilleMan/godot-python/issues/170 - # and: https://github.com/godotengine/godot/issues/10946 + # see: https://github.com/touilleMan/pandemonium-python/issues/170 + # and: https://github.com/pandemoniumengine/pandemonium/issues/10946 # sometimes script reloading craps out leaving dangling references # __all_exposed_classes.remove(modname, cls) else: diff --git a/pythonscript/godot/globals.py b/pythonscript/godot/globals.py index 6d28681..ae59ab4 100644 --- a/pythonscript/godot/globals.py +++ b/pythonscript/godot/globals.py @@ -1,4 +1,4 @@ -from _godot import __global_constants +from _pandemonium import __global_constants def __getattr__(name): diff --git a/pythonscript/godot/hazmat.pxd b/pythonscript/godot/hazmat.pxd index afd1e05..564a3b2 100644 --- a/pythonscript/godot/hazmat.pxd +++ b/pythonscript/godot/hazmat.pxd @@ -1,8 +1,8 @@ # Public low-level APIs are exposed here -from godot._hazmat cimport gdnative_api_struct +from pandemoniummonium._hazmat cimport gdnative_api_struct # Re-expose Godot API with better names -from godot._hazmat.gdapi cimport ( +from pandemoniummonium._hazmat.gdapi cimport ( pythonscript_gdapi10 as gdapi10, pythonscript_gdapi11 as gdapi11, pythonscript_gdapi12 as gdapi12, @@ -11,7 +11,7 @@ from godot._hazmat.gdapi cimport ( pythonscript_gdapi_ext_android as gdapi_ext_android, pythonscript_gdapi_ext_arvr as gdapi_ext_arvr, ) -from godot._hazmat.conversion cimport ( +from pandemonium._hazmat.conversion cimport ( pandemonium_string_to_pyobj, pyobj_to_pandemonium_string, pandemonium_variant_to_pyobj, diff --git a/pythonscript/godot/tags.pyx b/pythonscript/godot/tags.pyx index 3e63545..d43b006 100644 --- a/pythonscript/godot/tags.pyx +++ b/pythonscript/godot/tags.pyx @@ -1,22 +1,22 @@ import builtins import enum -from godot._hazmat.gdnative_api_struct cimport ( +from pandemonium._hazmat.gdnative_api_struct cimport ( pandemonium_method_rpc_mode, pandemonium_property_usage_flags, pandemonium_method_rpc_mode, pandemonium_property_hint, pandemonium_variant, ) -from godot._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 -from godot._hazmat.conversion cimport ( +from pandemonium._hazmat.gdapi cimport pythonscript_gdapi10 as gdapi10 +from pandemonium._hazmat.conversion cimport ( is_pytype_compatible_with_pandemonium_variant, pyobj_to_pandemonium_variant, pandemonium_variant_to_pyobj, ) -from godot._hazmat.internal cimport get_exposed_class, set_exposed_class -from godot.builtins cimport Array, Dictionary, GDString -from godot.bindings cimport Object, Resource +from pandemonium._hazmat.internal cimport get_exposed_class, set_exposed_class +from pandemonium.builtins cimport Array, Dictionary, GDString +from pandemonium.bindings cimport Object, Resource # Make Godot enums accesible from Python at runtime @@ -250,7 +250,7 @@ def export( usage:: @exposed - class CustomObject(godot.bindings.Object): + class CustomObject(pandemonium.bindings.Object): a = export(str) # Expose attribute b = export(int, default=42) @@ -284,13 +284,13 @@ def exposed(cls=None, tool=False): usage:: @exposed - class CustomObject(godot.bindings.Object): + class CustomObject(pandemonium.bindings.Object): pass """ def wrapper(cls): if not issubclass(cls, Object): raise ValueError( - f"{cls!r} must inherit from a Godot (e.g. `godot.bindings.Node`) " + f"{cls!r} must inherit from a Godot (e.g. `pandemonium.bindings.Node`) " "class to be marked as @exposed" ) diff --git a/pythonscript/pythonscript.c b/pythonscript/pythonscript.c index 80ed528..d807136 100644 --- a/pythonscript/pythonscript.c +++ b/pythonscript/pythonscript.c @@ -65,9 +65,9 @@ static PyThreadState *gilstate = NULL; /* - * Global variables exposing Godot API to the godot.hazmat cython module. - * Hence we must initialized them before loading `_godot`/`godot` modules - * (which both depend on `godot.hazmat`). + * Global variables exposing Godot API to the pandemonium.hazmat cython module. + * Hence we must initialized them before loading `_pandemonium`/`pandemonium` modules + * (which both depend on `pandemonium.hazmat`). */ #ifdef _WIN32 # define PYTHONSCRIPT_EXPORT __declspec(dllexport) @@ -184,16 +184,16 @@ GDN_EXPORT void pandemonium_gdnative_init(pandemonium_gdnative_init_options *opt // Py_SetPath(new_path); // PyRun_SimpleString("import sys\nprint('PYTHON_PATH:', sys.path)\n"); - Py_SetProgramName(L"godot"); + Py_SetProgramName(L"pandemonium"); // Initialize interpreter but skip initialization registration of signal handlers Py_InitializeEx(0); // PyEval_InitThreads acquires the GIL, so we must release it later. // Since python3.7 PyEval_InitThreads is automatically called by Py_InitializeEx, but it's better to leave it here // to be explicit. Calling it again does nothing. PyEval_InitThreads(); - int ret = import__godot(); + int ret = import__pandemonium(); if (ret != 0){ - GD_ERROR_PRINT("Cannot load godot python module"); + GD_ERROR_PRINT("Cannot load pandemonium python module"); return; } diff --git a/tests/bindings/conftest.py b/tests/bindings/conftest.py index 724cf4d..2a2fdb0 100644 --- a/tests/bindings/conftest.py +++ b/tests/bindings/conftest.py @@ -1,6 +1,6 @@ import pytest -from godot import OS, Node, Reference +from pandemonium import OS, Node, Reference __global_objs = [] diff --git a/tests/bindings/main.py b/tests/bindings/main.py index 659a209..f8e8b02 100644 --- a/tests/bindings/main.py +++ b/tests/bindings/main.py @@ -1,7 +1,7 @@ import os import pytest -from godot import exposed, Node, OS +from pandemonium import exposed, Node, OS __current_node = None @@ -35,5 +35,5 @@ class Main(Node): print(f"running `pytest {' '.join(pytest_args)}`") if pytest.main(pytest_args): OS.set_exit_code(1) - # Exit godot + # Exit pandemonium self.get_tree().quit() diff --git a/tests/bindings/test_aabb.py b/tests/bindings/test_aabb.py index 1ce0a60..b95a508 100644 --- a/tests/bindings/test_aabb.py +++ b/tests/bindings/test_aabb.py @@ -1,6 +1,6 @@ import pytest -from godot import AABB, Vector3, Plane +from pandemonium import AABB, Vector3, Plane def test_base(): diff --git a/tests/bindings/test_array.py b/tests/bindings/test_array.py index cd60937..246ea55 100644 --- a/tests/bindings/test_array.py +++ b/tests/bindings/test_array.py @@ -1,6 +1,6 @@ import pytest -from godot import ( +from pandemonium import ( GDString, Array, Vector2, diff --git a/tests/bindings/test_basis.py b/tests/bindings/test_basis.py index 654bfd5..7dccf50 100644 --- a/tests/bindings/test_basis.py +++ b/tests/bindings/test_basis.py @@ -1,6 +1,6 @@ import pytest -from godot import Basis, Vector3, Quat +from pandemonium import Basis, Vector3, Quat def test_default(): diff --git a/tests/bindings/test_bindings.py b/tests/bindings/test_bindings.py index 327317c..92501ee 100644 --- a/tests/bindings/test_bindings.py +++ b/tests/bindings/test_bindings.py @@ -2,8 +2,8 @@ import pytest from math import inf from struct import unpack -import godot -from godot import ( +import pandemonium +from pandemonium import ( Vector3, GDString, NodePath, @@ -39,17 +39,17 @@ def test_free_node(): def test_expose_contains_constant(): - assert "OK" in dir(godot) + assert "OK" in dir(pandemonium) assert OK is not None def test_expose_contains_class(): - assert "Node" in dir(godot) + assert "Node" in dir(pandemonium) assert Node is not None def test_expose_contains_builtins(): - assert "Vector3" in dir(godot) + assert "Vector3" in dir(pandemonium) assert Vector3 is not None @@ -91,7 +91,7 @@ def test_call_none_in_bindings_args(current_node): current_node.get_path_to(None) assert ( str(exc.value) - == "Argument 'node' has incorrect type (expected godot.bindings.Node, got NoneType)" + == "Argument 'node' has incorrect type (expected pandemonium.bindings.Node, got NoneType)" ) diff --git a/tests/bindings/test_color.py b/tests/bindings/test_color.py index 70efb9d..d7247ce 100644 --- a/tests/bindings/test_color.py +++ b/tests/bindings/test_color.py @@ -1,6 +1,6 @@ import pytest -from godot import Color, Vector2, GDString, Node +from pandemonium import Color, Vector2, GDString, Node from conftest import generate_global_obj diff --git a/tests/bindings/test_dictionary.py b/tests/bindings/test_dictionary.py index 81b937b..003bcc7 100644 --- a/tests/bindings/test_dictionary.py +++ b/tests/bindings/test_dictionary.py @@ -1,7 +1,7 @@ import pytest import json -from godot import Dictionary, Vector2, Array, GDString, Node, Resource, OS +from pandemonium import Dictionary, Vector2, Array, GDString, Node, Resource, OS def test_base(): diff --git a/tests/bindings/test_dynamic_bindings.py b/tests/bindings/test_dynamic_bindings.py index 5d45427..5b14763 100644 --- a/tests/bindings/test_dynamic_bindings.py +++ b/tests/bindings/test_dynamic_bindings.py @@ -1,6 +1,6 @@ # import pytest -# from godot.bindings import ( +# from pandemonium.bindings import ( # Object, # Node, # Viewport, diff --git a/tests/bindings/test_node_path.py b/tests/bindings/test_node_path.py index 2ca931a..f7c59ee 100644 --- a/tests/bindings/test_node_path.py +++ b/tests/bindings/test_node_path.py @@ -1,6 +1,6 @@ import pytest -from godot import Vector3, NodePath, GDString +from pandemonium import Vector3, NodePath, GDString def test_init(): diff --git a/tests/bindings/test_plane.py b/tests/bindings/test_plane.py index c1ba32c..7588adc 100644 --- a/tests/bindings/test_plane.py +++ b/tests/bindings/test_plane.py @@ -1,6 +1,6 @@ import pytest -from godot import Vector3, Plane +from pandemonium import Vector3, Plane def test_init(): diff --git a/tests/bindings/test_pool_arrays.py b/tests/bindings/test_pool_arrays.py index f3efc1f..a4364b7 100644 --- a/tests/bindings/test_pool_arrays.py +++ b/tests/bindings/test_pool_arrays.py @@ -4,7 +4,7 @@ from random import Random from inspect import isfunction from functools import partial -from godot import ( +from pandemonium import ( Array, Vector2, Vector3, diff --git a/tests/bindings/test_quat.py b/tests/bindings/test_quat.py index ca3adab..f1f27a3 100644 --- a/tests/bindings/test_quat.py +++ b/tests/bindings/test_quat.py @@ -1,6 +1,6 @@ import pytest -from godot import Basis, Quat, Vector3 +from pandemonium import Basis, Quat, Vector3 def test_base(): diff --git a/tests/bindings/test_rect2.py b/tests/bindings/test_rect2.py index e44c519..d770371 100644 --- a/tests/bindings/test_rect2.py +++ b/tests/bindings/test_rect2.py @@ -1,6 +1,6 @@ import pytest -from godot import Rect2, Vector2 +from pandemonium import Rect2, Vector2 def test_base(): diff --git a/tests/bindings/test_rid.py b/tests/bindings/test_rid.py index 0f0a157..147489f 100644 --- a/tests/bindings/test_rid.py +++ b/tests/bindings/test_rid.py @@ -1,6 +1,6 @@ import pytest -from godot import RID, Environment, Node, OS +from pandemonium import RID, Environment, Node, OS @pytest.fixture diff --git a/tests/bindings/test_starimport.py b/tests/bindings/test_starimport.py index 7c7edc6..76601d6 100644 --- a/tests/bindings/test_starimport.py +++ b/tests/bindings/test_starimport.py @@ -1,8 +1,8 @@ # This test is in it own file to protect other tests from the `import *` side effects -from godot import * +from pandemonium import * # Class with trailing underscore not are provided on star import -from godot.bindings import _OS, _ProjectSettings +from pandemonium.bindings import _OS, _ProjectSettings def test_starimport(): diff --git a/tests/bindings/test_string.py b/tests/bindings/test_string.py index 9eb9c1c..049e6e8 100644 --- a/tests/bindings/test_string.py +++ b/tests/bindings/test_string.py @@ -1,7 +1,7 @@ import sys import pytest -from godot import GDString +from pandemonium import GDString def test_base(): diff --git a/tests/bindings/test_tools.py b/tests/bindings/test_tools.py index 92360cc..d3b4dfc 100644 --- a/tests/bindings/test_tools.py +++ b/tests/bindings/test_tools.py @@ -1,7 +1,7 @@ # import pytest -# from godot import Array, Dictionary -# from godot.hazmat.tools import ( +# from pandemonium import Array, Dictionary +# from pandemonium.hazmat.tools import ( # variant_to_pyobj, # pyobj_to_variant, # gdobj_to_pyobj, diff --git a/tests/bindings/test_transform.py b/tests/bindings/test_transform.py index 286a3bf..d632c2f 100644 --- a/tests/bindings/test_transform.py +++ b/tests/bindings/test_transform.py @@ -1,6 +1,6 @@ import pytest -from godot import Transform, Basis, Vector3 +from pandemonium import Transform, Basis, Vector3 def test_base(): diff --git a/tests/bindings/test_transform2d.py b/tests/bindings/test_transform2d.py index f8c32f3..ce31ce5 100644 --- a/tests/bindings/test_transform2d.py +++ b/tests/bindings/test_transform2d.py @@ -1,6 +1,6 @@ import pytest -from godot import Transform2D, Vector2, Rect2 +from pandemonium import Transform2D, Vector2, Rect2 def test_init(): diff --git a/tests/bindings/test_vector2.py b/tests/bindings/test_vector2.py index 66cc1fa..25c4a3f 100644 --- a/tests/bindings/test_vector2.py +++ b/tests/bindings/test_vector2.py @@ -1,6 +1,6 @@ import pytest -from godot import Vector2 +from pandemonium import Vector2 def test_base(): diff --git a/tests/bindings/test_vector3.py b/tests/bindings/test_vector3.py index b4d2877..9c5f72c 100644 --- a/tests/bindings/test_vector3.py +++ b/tests/bindings/test_vector3.py @@ -1,7 +1,7 @@ import pytest from enum import IntEnum -from godot import Vector3 +from pandemonium import Vector3 def test_base(): diff --git a/tests/global_constants/access_from_python.py b/tests/global_constants/access_from_python.py index 8786a6b..ad3efcd 100644 --- a/tests/global_constants/access_from_python.py +++ b/tests/global_constants/access_from_python.py @@ -1,15 +1,15 @@ import traceback -from godot import Node, exposed, export +from pandemonium import Node, exposed, export try: - from godot.globals import global_gd, global_py + from pandemonium.globals import global_gd, global_py global_import_outcome = "ok" except Exception as exc: traceback.print_exc() global_import_outcome = ( - f"Error doing `from godot.globals import global_gd, global_py` at module level: {exc!r}" + f"Error doing `from pandemonium.globals import global_gd, global_py` at module level: {exc!r}" ) @@ -41,17 +41,17 @@ class access_from_python(Node): return node.set_accessed("Python") - # Also test accessing from `godot.globals` module + # Also test accessing from `pandemonium.globals` module if global_import_outcome != "ok": self.outcome = global_import_outcome return - from godot import globals as pandemonium_globals + from pandemonium import globals as pandemonium_globals pandemonium_globals_dir = dir(pandemonium_globals) expected_pandemonium_globals_dir = ["global_gd", "global_py"] if pandemonium_globals_dir != expected_pandemonium_globals_dir: - self.outcome = f"Invalid `dir(godot.globals)` (expected: `{expected_pandemonium_globals_dir}`, got `{pandemonium_globals_dir}`)" + self.outcome = f"Invalid `dir(pandemonium.globals)` (expected: `{expected_pandemonium_globals_dir}`, got `{pandemonium_globals_dir}`)" return for name, type in (("global_py", "Python"), ("global_gd", "GDScript")): node_from_globals = getattr(pandemonium_globals, name) diff --git a/tests/global_constants/global_py.py b/tests/global_constants/global_py.py index 65bcbe5..e674545 100644 --- a/tests/global_constants/global_py.py +++ b/tests/global_constants/global_py.py @@ -1,4 +1,4 @@ -from godot import Node, exposed, export, Array +from pandemonium import Node, exposed, export, Array @exposed diff --git a/tests/global_constants/main.py b/tests/global_constants/main.py index dad6cef..d2b8e95 100644 --- a/tests/global_constants/main.py +++ b/tests/global_constants/main.py @@ -1,6 +1,6 @@ import traceback -from godot import exposed, Node, OS +from pandemonium import exposed, Node, OS @exposed @@ -43,5 +43,5 @@ class Main(Node): if not ok: OS.set_exit_code(1) - # Exit godot + # Exit pandemonium self.get_tree().quit() diff --git a/tests/helloworld/main.py b/tests/helloworld/main.py index 8728d40..7e1d605 100644 --- a/tests/helloworld/main.py +++ b/tests/helloworld/main.py @@ -1,10 +1,10 @@ -from godot import exposed -from godot.bindings import Node, OS +from pandemonium import exposed +from pandemonium.bindings import Node, OS @exposed class Main(Node): def _ready(self): - # Exit godot + # Exit pandemonium OS.set_exit_code(0) self.get_tree().quit() diff --git a/tests/python_binary/SConscript b/tests/python_binary/SConscript index da8c9ed..fafff56 100644 --- a/tests/python_binary/SConscript +++ b/tests/python_binary/SConscript @@ -74,9 +74,9 @@ test_factory( "-c", """ try: - import godot + import pandemonium except ImportError as exc: - assert "Cannot initialize godot module given Godot GDNative API not available." in str(exc) + assert "Cannot initialize pandemonium module given Godot GDNative API not available." in str(exc) """, ], ) diff --git a/tests/threading/conftest.py b/tests/threading/conftest.py index 268a02f..c68e6ac 100644 --- a/tests/threading/conftest.py +++ b/tests/threading/conftest.py @@ -1,6 +1,6 @@ import pytest -from godot import OS, Node, Reference +from pandemonium import OS, Node, Reference __global_objs = [] diff --git a/tests/threading/main.py b/tests/threading/main.py index 97d6f4b..babe09d 100644 --- a/tests/threading/main.py +++ b/tests/threading/main.py @@ -1,8 +1,8 @@ import os import pytest -from godot import exposed -from godot.bindings import Node, OS +from pandemonium import exposed +from pandemonium.bindings import Node, OS __current_node = None @@ -36,5 +36,5 @@ class Main(Node): print(f"running `pytest {' '.join(pytest_args)}`") if pytest.main(pytest_args): OS.set_exit_code(1) - # Exit godot + # Exit pandemonium self.get_tree().quit() diff --git a/tests/threading/project.godot b/tests/threading/project.godot index a714fc3..003d098 100644 --- a/tests/threading/project.godot +++ b/tests/threading/project.godot @@ -16,7 +16,7 @@ _global_script_class_icons={ [application] run/main_scene="res://main.tscn" -name="godot-threading-tests" +name="pandemonium-threading-tests" main_scene="res://main.tscn" [gdnative] diff --git a/tests/threading/test_threads.py b/tests/threading/test_threads.py index 764be6b..a784a5f 100644 --- a/tests/threading/test_threads.py +++ b/tests/threading/test_threads.py @@ -1,7 +1,7 @@ import pytest from threading import Thread -from godot import Vector3, SurfaceTool, Mesh, MeshInstance +from pandemonium import Vector3, SurfaceTool, Mesh, MeshInstance def test_simple_thread(): diff --git a/tests/work_with_gdscript/conftest.py b/tests/work_with_gdscript/conftest.py index 8f09c9f..ca1c956 100644 --- a/tests/work_with_gdscript/conftest.py +++ b/tests/work_with_gdscript/conftest.py @@ -1,6 +1,6 @@ import pytest -from godot import ResourceLoader +from pandemonium import ResourceLoader import pymain diff --git a/tests/work_with_gdscript/pymain.py b/tests/work_with_gdscript/pymain.py index c3b6d46..91c37ef 100644 --- a/tests/work_with_gdscript/pymain.py +++ b/tests/work_with_gdscript/pymain.py @@ -3,7 +3,7 @@ import os import pytest -from godot import exposed, Node, OS +from pandemonium import exposed, Node, OS root_node = None diff --git a/tests/work_with_gdscript/pynode.py b/tests/work_with_gdscript/pynode.py index f3e2671..092af61 100644 --- a/tests/work_with_gdscript/pynode.py +++ b/tests/work_with_gdscript/pynode.py @@ -1,4 +1,4 @@ -from godot import exposed, export, Node +from pandemonium import exposed, export, Node @exposed diff --git a/tests/work_with_gdscript/pynode_with_gdparent.py b/tests/work_with_gdscript/pynode_with_gdparent.py index 60a0156..28bfd29 100644 --- a/tests/work_with_gdscript/pynode_with_gdparent.py +++ b/tests/work_with_gdscript/pynode_with_gdparent.py @@ -1,4 +1,4 @@ -from godot import exposed, ResourceLoader +from pandemonium import exposed, ResourceLoader GDNode = ResourceLoader.load("res://gdnode.gd", "", False) diff --git a/tests/work_with_gdscript/pysubnode.py b/tests/work_with_gdscript/pysubnode.py index aac04d1..8f65a21 100644 --- a/tests/work_with_gdscript/pysubnode.py +++ b/tests/work_with_gdscript/pysubnode.py @@ -1,4 +1,4 @@ -from godot import exposed, export +from pandemonium import exposed, export from pynode import PyNode diff --git a/tests/work_with_gdscript/python_scene.py b/tests/work_with_gdscript/python_scene.py index 39f6435..5e8ba65 100644 --- a/tests/work_with_gdscript/python_scene.py +++ b/tests/work_with_gdscript/python_scene.py @@ -1,4 +1,4 @@ -from godot import exposed, export, Node2D +from pandemonium import exposed, export, Node2D @exposed diff --git a/tests/work_with_gdscript/test_native_call.py b/tests/work_with_gdscript/test_native_call.py index 9257632..91a9ef7 100644 --- a/tests/work_with_gdscript/test_native_call.py +++ b/tests/work_with_gdscript/test_native_call.py @@ -3,7 +3,7 @@ # - overload native method ? import pytest -from godot import GDString, ResourceLoader, GDScript, PluginScript +from pandemonium import GDString, ResourceLoader, GDScript, PluginScript def test_native_method(node): diff --git a/tools/assetlib_release.py b/tools/assetlib_release.py index c607b63..d376aa0 100644 --- a/tools/assetlib_release.py +++ b/tools/assetlib_release.py @@ -20,7 +20,7 @@ from zipfile import ZipFile from concurrent.futures import ThreadPoolExecutor -API_REPO_URL = "https://api.github.com/repos/touilleMan/godot-python/releases" +API_REPO_URL = "https://github.com/Relintai/gdnative_python/releases" PLATFORMS = ("x11-32", "x11-64", "osx-64", "windows-32", "windows-64") MISC_DIR = Path(__file__).parent / "../misc"