[issue14530] distutils's build_wininst command fails to correctly interpret the data_files argument
report at bugs.python.org
Sun Apr 8 19:58:20 CEST 2012
New submission from Mario Vilas <mvilas at gmail.com>:
I tried the following:
data_files = [(sys.prefix_exec, os.path.join('Win32', 'BeaEngine.dll'))]
# (... rest of the setup call here...)
This works perfectly when running the "python setup.py install". But when generating an installer (not MSI but the exe file), the installer places the 'BeaEngine.dll' in a subdirectory called 'python27'. For 64 bit builds, the subdirectory is called 'Python27-x64' instead.
The paths to my python installations are "C:\Python27" and "C:\Python27-x64" respectively. The target folders should have been those, not "C:\Python27-x64\Python27-x64" which is clearly wrong.
So far my workaround was this:
data_files = [(os.path.join(sys.prefix_exec,'..'), os.path.join('Win32', 'BeaEngine.dll'))]
But of course, now my setup.py script only works for generating the installer, not for installing the module from sources.
nosy: Mario.Vilas, eric.araujo, tarek
title: distutils's build_wininst command fails to correctly interpret the data_files argument
versions: Python 2.7
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list