deploy-ng: Create entry_points in makewheel for dist commands

This allows setuptools to automatically find build_p3d and
bdist_p3d_archive.

NOTE: Importing direct.showutil.dist.setup still works for installs that
are not using wheels.
This commit is contained in:
Mitchell Stokes 2017-01-28 20:44:26 -08:00
parent 9723cb62d9
commit b8ee352ebb
2 changed files with 4 additions and 1 deletions

View File

@ -577,6 +577,9 @@ def makewheel(version, output_dir, platform=default_platform):
funcname = basename.replace('-', '_')
entry_points += '{0} = panda3d_tools:{1}\n'.format(basename, funcname)
tools_init += '{0} = lambda: _exec_tool({1!r})\n'.format(funcname, file)
entry_points += '[distutils.commands]\n'
entry_points += 'build_p3d = direct.showutil.dist:build_p3d\n'
entry_points += 'bdist_p3d_archive = direct.showutil.dist:bdist_p3d_archive\n'
whl.write_file_data('panda3d_tools/__init__.py', PANDA3D_TOOLS_INIT.format(tools_init))

View File

@ -1,4 +1,4 @@
from direct.showutil.dist import *
from setuptools import setup
setup(
name="asteroids",