Good afternoon, ladies and gentlemen.
I used to not be the kind to ask for help, but if this will speed up my game project development I shall do so from now on. I was experimenting with a panda3d feature which the engine I previously used (and no longer exists) did not had and will help me a lot: setuptools
I created a very simple “Hello world” program:
print("Hello world")
For the setup.py I did:
from setuptools import setup
setup(
name = "helloworld",
options = {
'build_apps':{
'console_apps': {
'helloworld': 'main.py',
},
'platforms': [
'manylinux1_x86_64',
],
}
}
)
For now I left the requisites.txt file empty, but I too tried putting “panda3d”.
At the linux terminal I did:
python setup.py build_apps
The result was (at the panda3d case):
running build_apps
Building platforms: manylinux1_x86_64
Gathering wheels for platform: manylinux1_x86_64
Looking in indexes: https://pypi.org/simple, https://archive.panda3d.org/simple/opt, https://archive.panda3d.org/thirdparty
Collecting panda3d
Using cached https://buildbot.panda3d.org/downloads/90fb31ac219f7fb5e314686fed03cb069ef81554/opt/panda3d-1.10.8.post4%2Bopt-cp39-cp39-manylinux1_x86_64.whl (51.2 MB)
Saved ./build/__whl_cache__/manylinux1_x86_64_cp39/panda3d-1.10.8.post4+opt-cp39-cp39-manylinux1_x86_64.whl
Successfully downloaded panda3d
Building runtime for platform: manylinux1_x86_64
There are some missing modules: ['_winapi', 'pep517']
Copying game files for platform: manylinux1_x86_64
I saw that part mentioning “missing modules” but I decided to test the produced executable anyway. It did not started and the output at the terminal was:
Fatal Python error: init_import_site: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
File "importlib._bootstrap", line 1007, in _find_and_load
File "importlib._bootstrap", line 986, in _find_and_load_unlocked
File "importlib._bootstrap", line 680, in _load_unlocked
File "importlib._bootstrap", line 838, in exec_module
File "site", line 34, in <module>
File "importlib._bootstrap", line 1007, in _find_and_load
File "importlib._bootstrap", line 986, in _find_and_load_unlocked
File "importlib._bootstrap", line 680, in _load_unlocked
File "importlib._bootstrap", line 838, in exec_module
File "os", line 29, in <module>
File "importlib._bootstrap", line 1007, in _find_and_load
File "importlib._bootstrap", line 986, in _find_and_load_unlocked
File "importlib._bootstrap", line 680, in _load_unlocked
File "importlib._bootstrap", line 838, in exec_module
File "_collections_abc", line 416, in <module>
TypeError: type 'types.GenericAlias' is not an acceptable base type
I did just in case:
pip install pep517
Then the list of missing modules increased a considerably, and it also said numpy and uuid should be put as requisites for building. I put numpy at the “requisites.txt” file, and although the numpy missing specific warning dissapeared, there was still modules missing with “numpy” on their name (not to mention other kinds of modules like zip).
Building the panda3d “asteroids” sample give the same issues (do not start), the difference is I got no error output as it was redirect to a file in a place I do not know in my linux system. It (and the hello world test) did worked by running directly the main.py (without building). My linux system is fedora 33 workstation 64 bit, and I installed the current panda3d version by means of pip as said at the download page.
Although it will not stop my game development, I cannot distribute it to the players for testing until I solve this simple build test. I saw no topics with a issue like mine in google, most were missing its graphics plugin and had graphics related errors, but my test only requires the terminal for now. Usually when I find nothing, the issue is or software side bug (linux distribution, panda3d, etc) or is a very simple error to solve and I am being “dumb”.
I did coded in the far past for my game a simple python “build tool” which just selected, copied and pasted dlls, libraries and such in a end user folder for the platform I typed at terminal, but I am not used to work with more advanced build tools from others.
Thanks for your support regarding building a simple test app.