Building a frozen panda module with Deploy-ng/Setuptools


#1

Hello! I am requesting some support in getting a baseline frozen panda module for multiple systems using the deploy-ng branch. I caught wind of it through the hackpad collaboration page and found this piece of documentationdetailing sample usage.

At first, I tried following the doc directly, using the supplied setup.py in the asteroids project directory and trying to build for Win32/64, MacOS, and Linux. So far I obtained the panda3d package that was built with deploy-ng and I am getting an error that I don’t have panda3d wheel.

(i added a dummy requirements.txt for now)

PS C:\Panda3D-1.10.0\samples\asteroids> python -V
Python 2.7.13
PS C:\Panda3D-1.10.0\samples\asteroids> python setup.py bdist_apps
running bdist_apps
running build_apps
Building platforms: manylinux1_x86_64,macosx_10_6_x86_64,win32,win_amd64
removing 'C:\Panda3D-1.10.0\samples\asteroids\build\manylinux1_x86_64' (and everything under it)
creating C:\Panda3D-1.10.0\samples\asteroids\build\manylinux1_x86_64
Collecting pymongo (from -r ./requirements.txt (line 1))
  File was already downloaded c:\panda3d-1.10.0\samples\asteroids\build\__whl_cache__\pymongo-3.4.0-cp27-cp27m-manylinux1_x86_64.whl
Successfully downloaded pymongo
Traceback (most recent call last):
  File "setup.py", line 22, in <module>
    'win_amd64',
  File "C:\Python27\lib\distutils\core.py", line 151, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\site-packages\direct\showutil\dist.py", line 287, in run
    self.run_command('build_apps')
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\site-packages\direct\showutil\dist.py", line 106, in run
    raise RuntimeError("Missing panda3d wheel")
RuntimeError: Missing panda3d wheel

Thanks for any help


How to build installer using deploy-ng?
#2

Looks like pip did not grab a panda3d wheels. Can you post the contents of c:\panda3d-1.10.0\samples\asteroids\build_whl_cache_ and your requirements.txt file.

Also, pip will need to download deploy-ng wheels, which currently requires some requirements.txt trickery to avoid grabbing the official wheels from PyPI. However, that will result in a different error and we can cross that bridge when we get there.


#3

I cloned directly from the branch, built, and installed.

requirements.txt

-f ./wheels
panda3d

and nothing in whl_cache

After the self-build and install, i get this error:

PS C:\Panda3D-1.10.0\samples\asteroids> python .\setup.py bdist_apps
running bdist_apps
running build_apps
Building platforms: manylinux1_x86_64,macosx_10_6_x86_64,win32,win_amd64
creating C:\Panda3D-1.10.0\samples\asteroids\build
creating C:\Panda3D-1.10.0\samples\asteroids\build\manylinux1_x86_64
Collecting panda3d (from -r ./requirements.txt (line 2))
  Could not find a version that satisfies the requirement panda3d (from -r ./requirements.txt (line 2)) (from versions: )
No matching distribution found for panda3d (from -r ./requirements.txt (line 2))
Traceback (most recent call last):
  File ".\setup.py", line 16, in <module>
    'win_amd64',
  File "C:\Python27\lib\distutils\core.py", line 151, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\site-packages\direct\showutil\dist.py", line 287, in run
    self.run_command('build_apps')
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\site-packages\direct\showutil\dist.py", line 106, in run
    raise RuntimeError("Missing panda3d wheel")
RuntimeError: Missing panda3d wheel

#4

Hey, so I’m confused here. I used the python.exe downloaded from python.org for win32 and I installed panda3d using

python.exe -m pip install --extra-index-url=https://archive.panda3d.org/branches/deploy-ng panda3d

And when I run on the example setup.py OP mentioned, which I placed in the asteroids sample, I get the error

error: invalid command 'bdist_apps'

#5

How are you running the setup.py (e.g., command-line, double-clicking on the file)? Do you have multiple python installations? Do you have any installs of the Panda3D SDK that used the installers (i.e., not installed using pip)?


#6

Hi Moguri,

Thanks for your reply. I have posted the info you requested in a separate thread here so that others with similar problem will find it more easily: [url]How to build installer using deploy-ng?]


#7

From this: https://stackoverflow.com/questions/2477117/pip-requirements-txt-with-alternative-index

I set my requirements.txt as

-i https://archive.panda3d.org/branches/deploy-ng/panda3d/
panda3d==1.10.0.dev1137+deployng.102

And right now its downloading just fine.


#8

Well, ok, after the download it shows this error:

running bdist_apps
running build_apps
Building platforms: win32
removing 'C:\Panda3D-1.9.4\samples\asteroids\build\win32' (and everything under it)
creating C:\Panda3D-1.9.4\samples\asteroids\build\win32
Collecting panda3d==1.10.0.dev1137+deployng.102 (from -r ./requirements.txt (line 2))
  File was already downloaded c:\panda3d-1.9.4\samples\asteroids\build\__whl_cache__\panda3d-1.10.0.dev1137+deployng.102-cp27-cp27m-win32.whl
Successfully downloaded panda3d
There are some missing modules: ['_hashlib', 'builtins', 'panda3d.core', 'panda3d.direct', 'resource', 'select']
copying __whl_cache__\panda3d-1.10.0.dev1137+deployng.102-cp27-cp27m-win32.whl\panda3d\libpandagl.dll -> win32\libpandagl.dll
error: can't copy 'C:\Panda3D-1.9.4\samples\asteroids\build\__whl_cache__\panda3d-1.10.0.dev1137+deployng.102-cp27-cp27m-win32.whl\panda3d/libpandagl.dll': doesn't exist or not a regular file

However, when running from source using deploy-ng version of panda3d, asteroid program runs just fine.