Hi, I’ve this minimal application:
main.py
import hy
from logics import double_value
import direct.directbase.DirectStart
from direct.gui.OnscreenText import *
from direct.gui.DirectGui import *
t = OnscreenText(text='', pos=(0, .1))
DirectEntry(
scale=.05,
command=lambda text: t.setText(str(double_value(int(text)))),
focus=1)
base.run()
logics.hy
(defn double_value [n] (* n 2))
If I launch it with python main.py everything works (it doubles the number inserted in the entry field).
Anyway, if I try to create a build of this program (with python setup.py build_apps) using the following files:
setup.py
from setuptools import setup
setup(
name='try_hy',
options={
'build_apps': {
'gui_apps': {'try_hy': 'main.py'},
'log_filename': '$USER_APPDATA/try_hy/output.log',
'log_append': False,
'include_modules': {'*': ['hy']},
'include_patterns': ['**/*.hy',],
'plugins': ['pandagl']}})
requirements.txt
panda3d
hy
When I run the build, it doesn’t work and I get this in the log:
Traceback (most recent call last):
File "__main__", line 2, in <module>
File "importlib._bootstrap", line 1027, in _find_and_load
File "importlib._bootstrap", line 1006, in _find_and_load_unlocked
File "importlib._bootstrap", line 688, in _load_unlocked
File "importlib._bootstrap_external", line 879, in exec_module
File "importlib._bootstrap_external", line 1017, in get_code
File "hy.importer", line 128, in _hy_source_to_code
File "hy.compiler", line 2167, in hy_compile
File "hy.compiler", line 396, in __init__
File "hy.macros", line 230, in load_macros
File "importlib", line 126, in import_module
File "importlib._bootstrap", line 1050, in _gcd_import
File "importlib._bootstrap", line 1027, in _find_and_load
File "importlib._bootstrap", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'hy.core.bootstrap'
Where is my error? Thank you very much!