Fixed issues generating version-dependent installer for Windows Python module
Passing the '--target-version' option to bdist_msi will generate an installer that requires the right version of Python without distutils needing to be able to find a working compiler.
This commit is contained in:
parent
afc0bad412
commit
34cffd0135
3 changed files with 4 additions and 21 deletions
|
|
@ -17,8 +17,7 @@ if '@python_package@' == 'full':
|
|||
url="http://code.google.com/p/cantera",
|
||||
packages = ["","Cantera","Cantera.OneD",
|
||||
"MixMaster","MixMaster.Units"],
|
||||
package_data = {'Cantera': dataFiles},
|
||||
ext_modules=[Extension('_spam', [@spam_source@])])
|
||||
package_data = {'Cantera': dataFiles})
|
||||
|
||||
elif '@python_package@' == 'minimal':
|
||||
setup(name="Cantera CTI File Processor",
|
||||
|
|
@ -28,5 +27,5 @@ elif '@python_package@' == 'minimal':
|
|||
""",
|
||||
author="Prof. D. G. Goodwin, Caltech",
|
||||
author_email="dgoodwin@caltech.edu",
|
||||
url="http://www.cantera.org",
|
||||
url="http://code.google.com/p/cantera",
|
||||
py_modules = ["ctml_writer"])
|
||||
|
|
|
|||
|
|
@ -85,16 +85,13 @@ else:
|
|||
# Install Python module in the default location
|
||||
extra = ''
|
||||
|
||||
if 'MSSdk' in os.environ:
|
||||
localenv['ENV']['DISTUTILS_USE_SDK'] = '1'
|
||||
localenv['ENV']['MSSdk'] = os.environ['MSSdk']
|
||||
|
||||
if localenv['PYTHON_INSTALLER'] == 'direct':
|
||||
install(localenv.Command, 'dummy', pymodule,
|
||||
'cd %s && $python_cmd setup.py install %s' % (moddir,extra))
|
||||
elif localenv['PYTHON_INSTALLER'] == 'binary':
|
||||
install(localenv.Command, 'dummy', pymodule,
|
||||
'cd %s && $python_cmd setup.py bdist_msi --dist-dir=../..' % moddir)
|
||||
'cd %s && $python_cmd setup.py bdist_msi --dist-dir=../..' % moddir +
|
||||
' --target-version=' + distutils.sysconfig.get_python_version())
|
||||
|
||||
if localenv['python_package'] == 'full':
|
||||
install(localenv.RecursiveInstall, pjoin('$inst_sampledir', 'python'),
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
/*
|
||||
* A trivial Python extension module introduced to force distutils to
|
||||
* generate installation packages requiring a specific Python version.
|
||||
*/
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
PyMODINIT_FUNC
|
||||
init_spam(void)
|
||||
{
|
||||
Py_InitModule3("_spam", NULL,
|
||||
"Spam, spam, spam, eggs, and spam.");
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue