No module named 'direct.showbase.PhysicsMangaerGlobal'

Hello everyone, how are you?

I’ve been stuck for some time trying to compile with setuptools. I’ve tried several approaches, but each time I get a different error.

I’m trying to compile a version of the old Toontown that I’m modifying.

Right now, I’m stuck on the following error when running the game:
No module named ‘direct.showbase.PhysicsManagerGlobal’

I compiled the Panda3D wheel with the libtoontown and installed it in the virtual environment.
I also added the wheel path to the requirements.txt so that setuptools would use the compiled version, and that part seems fine.

However, the compiler apparently isn’t importing the direct module (it works with cx_Freeze).

from setuptools import setup, find_packages
import os
import sys

setup(
name=“OpenToontownBR”,
find_packages=find_packages(where=“direct”),
package_dir={“”: “direct”},
options={
“build_apps”: {
“include_patterns”: [
# Arquivos Python e configurações
/.py",
"etc/
.prc",
"
/.mf",
"**/
.txt”,
# Recursos
“resources/",
"models/
”,
“maps/",
"audio/
”,
“config/",
"data/
”,
],
“exclude_patterns”: [
/*.pyc",
"
/pycache/",
".git/
”,
“build/**”,
],
“gui_apps”: {
“OpenToontownBR”: “main.py”,
},
“plugins”: [
“pandagl”,
“p3openal_audio”,
“p3ffmpeg”,
“p3ptloader”,
],
“platforms”: [
“linux_x86_64”,
# Descomente conforme necessário:
# “win_amd64”,
# “macosx_10_9_x86_64”,
],
“include_modules”: {
“*”: [
“direct”
“otp”,
“toontown”,
]
},
“log_filename”: “toontown.log”,
“log_append”: False,

    }
},

)

And here is the cx_freeze setup

import sys
from cx_Freeze import setup, Executable

include_files = [
(‘resources’, ‘resources’),
(‘etc’, ‘etc’),
]

build_exe_options = {
‘packages’: [‘panda3d’, ‘direct’, ‘otp’, ‘toontown’],
‘include_files’: include_files,
‘excludes’: ,
}

base = None
if sys.platform == ‘win32’:
base = ‘Win32GUI’

executables = [
Executable(‘main.py’, base=base, target_name=‘OpenToontownBR’)
]

setup(
name=‘OpenToontownBR’,
version=‘1.0’,
description=‘Open Toontown BR’,
options={‘build_exe’: build_exe_options},
executables=executables
)

also my requirements.txt
pytz
panda3d
-f /home/ubuntu/Documentos/panda3d/panda3d-1.11.0-cp312-cp312-linux_x86_64.whl

Hi, welcome to the community!

Unfortunately, we can’t help you with matters that involve infringement of copyright.

If you are encountering an issue in a different context, we’d be happy to help you with that.

Thanks for understanding!

I might not have expressed myself clearly.

The project I’m trying to compile is a version of Open-Toontown available on GitHub:
GitHub - open-toontown/open-toontown: Open source Toontown Online, based on the latest version of Disney's Toontown Online (sv1.0.47.38).,
which is based on the old Toontown game.

I don’t believe there are any copyright violations.

There are even some versions of the game, like Toontown Rewritten

But if im wrong you can delete the post.

Disney did not host Toontown Online under the BSD-3-Clause license
https://disney.github.io/
The repository you specified does not contain copyright information in the code header. Actually, the repository itself is not affiliated with Disney in any way.