makewheel: Add libpython to deploy_libs

TODO: See if there is a better way to do this and to test/implement macOS support.
This commit is contained in:
Mitchell Stokes 2017-01-10 18:42:59 -08:00
parent 8352f27a23
commit 3347a6e2cb
1 changed files with 9 additions and 0 deletions

View File

@ -590,6 +590,15 @@ def makewheel(version, output_dir, platform=default_platform):
whl.write_file(info_dir + '/README.md', readme_src)
whl.write_file_data(info_dir + '/top_level.txt', 'direct\npanda3d\npandac\npanda3d_tools\n')
# Add libpython for deployment
if sys.platform in ('win32', 'cygwin'):
pylib_name = 'python{0}{1}.dll'.format(*sys.version_info)
pylib_path = os.path.join(get_config_var('BINDIR'), pylib_name)
else:
pylib_name = get_config_var('LDLIBRARY')
pylib_path = os.path.join(get_config_var('LIBDIR'), pylib_name)
whl.write_file('/deploy_libs/' + pylib_name, pylib_path)
whl.close()