From 33d688ec0828156a6c1eb96585d19990638920e7 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Tue, 24 Nov 2020 15:29:25 -0800 Subject: [PATCH] bdist_apps: Allow specifying custom installers with entry points The entry point is 'panda3d.bdist_apps.installers'. The installer will get added to bdist_apps.installer_functions. Closes #1060 --- direct/src/dist/commands.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/direct/src/dist/commands.py b/direct/src/dist/commands.py index 4f38c5642a..c14309ac03 100644 --- a/direct/src/dist/commands.py +++ b/direct/src/dist/commands.py @@ -7,6 +7,7 @@ on how to use these commands. import collections import os import plistlib +import pkg_resources import sys import subprocess import zipfile @@ -1350,6 +1351,10 @@ class bdist_apps(setuptools.Command): tmp = self.DEFAULT_INSTALLER_FUNCS.copy() tmp.update(self.installer_functions) + tmp.update({ + entrypoint.name: entrypoint.load() + for entrypoint in pkg_resources.iter_entry_points('panda3d.bdist_apps.installers') + }) self.installer_functions = tmp def get_archive_basedir(self):