From 4d3814d1cf973fbb5b74d942b3d611d59e639e73 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Wed, 15 Feb 2012 23:31:37 +0000 Subject: [PATCH] Fixed a bug with Python Distutils and relative source paths --- interfaces/python/setup.py.in | 2 +- src/python/SConscript | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/interfaces/python/setup.py.in b/interfaces/python/setup.py.in index 8fda052d9..de3ebbb6b 100644 --- a/interfaces/python/setup.py.in +++ b/interfaces/python/setup.py.in @@ -18,7 +18,7 @@ if '@python_package@' == 'full': packages = ["","Cantera","Cantera.OneD", "MixMaster","MixMaster.Units"], package_data = {'Cantera': dataFiles}, - ext_modules=[Extension('_spam', ['../../src/python/spam.c'])]) + ext_modules=[Extension('_spam', [@spam_source@])]) elif '@python_package@' == 'minimal': setup(name="Cantera CTI File Processor", diff --git a/src/python/SConscript b/src/python/SConscript index b039766e9..0bc63fde1 100644 --- a/src/python/SConscript +++ b/src/python/SConscript @@ -19,6 +19,7 @@ for var in ('VS80COMNTOOLS', 'VS90COMNTOOLS', 'VS100COMNTOOLS'): if var in os.environ: localenv['ENV'][var] = os.environ[var] +localenv['spam_source'] = repr(File('#src/python/spam.c').abspath) make_setup = localenv.SubstFile('#interfaces/python/setup.py', '#interfaces/python/setup.py.in')