For anyone that doesn’t know - deploy-ng is the new deployment/distribution system, you can read more about it here and here get it here, here or here …or somewhere else in here
I really like it, and I want it to work
For testing how good it works (or works not), I’ve taken one of my old PyWeek games, adapted it for python3 and deployed using this new tool, but since I’m mostly working on windows I’m having some problems testing if it works on other platforms.
I already know that the win_amd64 version is working OK (it opens a console in the back, but that’s a known and fixable bug), and the win32 is not working at all.
A side not for anyone trying to use this tool on windows in its current state- in the setup script in ‘exclude_paths’ use ‘build*’ not ‘build/*’ unless you have unlimited time and disc space, you may also need to put in this hack in the setup.py if you have problems with encoding:
I tried both windows builds on a system that does have panda installs.
64 bit worked. 32 bit gave error
$ ./questforfire.exe
Traceback (most recent call last):
File "main.py", line 1, in <module>
File "C:\Panda3D-1.10.0-x64-py36\python\lib\importlib\_bootstrap.py", line 961, in _find_and_load
File "C:\Panda3D-1.10.0-x64-py36\python\lib\importlib\_bootstrap.py", line 950, in _find_and_load_unlocked
File "C:\Panda3D-1.10.0-x64-py36\python\lib\importlib\_bootstrap.py", line 655, in _load_unlocked
File "C:\Panda3D-1.10.0-x64-py36\python\lib\importlib\_bootstrap.py", line 798, in exec_module
File "panda3d.core", line 1, in <module>
File "C:\Panda3D-1.10.0-x64-py36\python\lib\imp.py", line 342, in load_dynamic
File "C:\Panda3D-1.10.0-x64-py36\python\lib\importlib\_bootstrap.py", line 675, in _load
File "C:\Panda3D-1.10.0-x64-py36\python\lib\importlib\_bootstrap.py", line 648, in _load_unlocked
File "C:\Panda3D-1.10.0-x64-py36\python\lib\importlib\_bootstrap.py", line 560, in module_from_spec
File "C:\Panda3D-1.10.0-x64-py36\python\lib\importlib\_bootstrap_external.py", line 922, in create_module
File "C:\Panda3D-1.10.0-x64-py36\python\lib\importlib\_bootstrap.py", line 205, in _call_with_frames_removed
ImportError: DLL load failed: %1 is not a valid Win32 application.
EDIT: Just curious though, did you build the windows builds from linux?
I may repeat the experiment again this weekend, but I’ll ask around on irc first if the deploy-ng branch had enough updates to actually test anything new.
Thanks cmr for your investigative work! I’ll try to setup some experiments to deploy from a Windows machine. That path issue is exactly the type of issues I’d expect from not having tested deploying from Windows well.
First a bit of a disclaimer: My PC was actually cursed by a witch, and was assembled on an old Indian graveyard, also there’s a gremlin and a poltergeist fighting over who gets to make weird noises on the GPU fan. If you have a normal PC, some of this might not be true.
Building from windows works… but only for windows. I’ve managed to build both 32bit and 64bit versions that do in fact work. There are some quirks with the included files if I added *.txt then *.html files where skipped and vice versa. For me zip files are always skipped, and although I mentioned on irc that .py files are skipped that is in fact not true, .py files get copied ok.
Building for linux on windows unfortunately fails. The 32bit version is missing some modules …including panda3d.core and it just won’t run without them. The 64bit version is missing some encoding and will also fail to start.
Building on linux - works for 64bit linux version and all windows version as far as I can tell. The 32bit linux version is also missing panda3d.core just like the one build from windows.
I have no idea how things look for mac. Don’t have one don’t intend on having one.
One extra thing to note is that recently setuptools is downloading non deploy-ng wheels so I needed to add panda3d==1.10.0.dev1511+deployng.222 in requirements.txt to get the right wheels.
There was a dev build recently updated to PyPI, which to pip looked newer than any builds in the deploy-ng index. This caused pip to grab the build from PyPI instead of the buildbot archives. I have merged in the latest changes from the master branch into deploy-ng, which should fix this issue as the buildbots spit out new builds.
I will start looking into testing deploying to Linux from Windows and the 32bit issues.
I do not know why txt, html, and zip files are getting skipped if you have added them as include_patterns to your setup.py. Can you share (maybe via PM or IRC if you don’t want it in the forum post) the contents of your setup.py?
Also, tarball installers created on Windows should now have proper execute permissions for Linux systems.