From b8ee352ebb64bfae668506436dc170227ae4b9c1 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Sat, 28 Jan 2017 20:44:26 -0800 Subject: [PATCH] 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. --- makepanda/makewheel.py | 3 +++ samples/asteroids/setup.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/makepanda/makewheel.py b/makepanda/makewheel.py index e485413926..ce4a55227f 100644 --- a/makepanda/makewheel.py +++ b/makepanda/makewheel.py @@ -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)) diff --git a/samples/asteroids/setup.py b/samples/asteroids/setup.py index 16d433b149..e29f0ed104 100644 --- a/samples/asteroids/setup.py +++ b/samples/asteroids/setup.py @@ -1,4 +1,4 @@ -from direct.showutil.dist import * +from setuptools import setup setup( name="asteroids",