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
This commit is contained in:
Mitchell Stokes 2020-11-24 15:29:25 -08:00 committed by rdb
parent d015b7e2f1
commit 33d688ec08

View File

@ -7,6 +7,7 @@ on how to use these commands.
import collections import collections
import os import os
import plistlib import plistlib
import pkg_resources
import sys import sys
import subprocess import subprocess
import zipfile import zipfile
@ -1350,6 +1351,10 @@ class bdist_apps(setuptools.Command):
tmp = self.DEFAULT_INSTALLER_FUNCS.copy() tmp = self.DEFAULT_INSTALLER_FUNCS.copy()
tmp.update(self.installer_functions) 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 self.installer_functions = tmp
def get_archive_basedir(self): def get_archive_basedir(self):