Testing deploy-ng


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 :mrgreen:

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.

If you have like 10 minutes of spare time please go to:
drive.google.com/drive/folders/ … sp=sharing
grab the build for your system, try to run it and report back.
You should see something like this:

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:

import _locale
_locale._getdefaultlocale = (lambda *args: ['en_US', 'utf_8_sig'])

How to build installer using deploy-ng?

I tried both Linux builds (On a system without any Panda installs)

Looks like you did not mark the executable as executable, and after working around that, panda3d.core is not found.

craig@large ~/Downloads/manylinux1_x86_64 $ ./questforfire 
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 948, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'panda3d.core'
craig@large ~/Downloads/manylinux1_x86_64 $ cd ../manylinux1_i686/
craig@large ~/Downloads/manylinux1_i686 $ ./questforfire 
bash: ./questforfire: Permission denied
craig@large ~/Downloads/manylinux1_i686 $ chmod +x questforfire 
craig@large ~/Downloads/manylinux1_i686 $ ./questforfire 
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 948, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'panda3d.core'
craig@large ~/Downloads/manylinux1_i686 $ 


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 build all of it on Windows (10, 64bit)

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.


Hi Moguri, how did it work out for you?


Deploying from a Windows machine is working now.


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.