From 5f3f2339e66263759f2dbade1d111d3537bffb4a Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 6 Dec 2022 20:04:06 +0100 Subject: [PATCH] dist: Drop egg2bam handler, add egg/gltf/glb to bam_model_extensions See #714 --- direct/src/dist/commands.py | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/direct/src/dist/commands.py b/direct/src/dist/commands.py index b5da8c78c9..770be6249d 100644 --- a/direct/src/dist/commands.py +++ b/direct/src/dist/commands.py @@ -83,24 +83,6 @@ def _model_to_bam(_build_cmd, srcpath, dstpath): raise IOError('Failed to write .bam file: %s' % (dstpath)) -def egg2bam(_build_cmd, srcpath, dstpath): - if dstpath.endswith('.gz') or dstpath.endswith('.pz'): - dstpath = dstpath[:-3] - dstpath = dstpath + '.bam' - try: - subprocess.check_call([ - 'egg2bam', - '-o', dstpath, - '-pd', os.path.dirname(os.path.abspath(srcpath)), - '-ps', 'rel', - srcpath - ]) - except FileNotFoundError: - raise RuntimeError('egg2bam failed: egg2bam was not found in the PATH') - except (subprocess.CalledProcessError, OSError) as err: - raise RuntimeError('egg2bam failed: {}'.format(err)) - return dstpath - macosx_binary_magics = ( b'\xFE\xED\xFA\xCE', b'\xCE\xFA\xED\xFE', b'\xFE\xED\xFA\xCF', b'\xCF\xFA\xED\xFE', @@ -276,7 +258,6 @@ class build_apps(setuptools.Command): ('platforms=', 'p', 'a list of platforms to build for'), ] default_file_handlers = { - '.egg': egg2bam, } def initialize_options(self): @@ -319,7 +300,7 @@ class build_apps(setuptools.Command): 'https://archive.panda3d.org/thirdparty', ] self.file_handlers = {} - self.bam_model_extensions = [] + self.bam_model_extensions = ['.egg', '.gltf', '.glb'] self.exclude_dependencies = [ # Windows 'kernel32.dll', 'user32.dll', 'wsock32.dll', 'ws2_32.dll',