summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/swig.py
diff options
context:
space:
mode:
authorDirk Baechle <dl9obn@darc.de>2011-09-07 18:34:31 (GMT)
committerDirk Baechle <dl9obn@darc.de>2011-09-07 18:34:31 (GMT)
commita19735359f404f133dc0a3429b397c43a4069778 (patch)
tree9ccab4c364c436a0ce81baadd53b126c89cfdaba /src/engine/SCons/Tool/swig.py
parentf77a946d58be75dd9f76d6f7ea4597ec48d88edb (diff)
downloadSCons-a19735359f404f133dc0a3429b397c43a4069778.zip
SCons-a19735359f404f133dc0a3429b397c43a4069778.tar.gz
SCons-a19735359f404f133dc0a3429b397c43a4069778.tar.bz2
- fixed SWIG module names for generated *.i files (#2707)
Diffstat (limited to 'src/engine/SCons/Tool/swig.py')
-rw-r--r--src/engine/SCons/Tool/swig.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/engine/SCons/Tool/swig.py b/src/engine/SCons/Tool/swig.py
index 23b251b..d51a386 100644
--- a/src/engine/SCons/Tool/swig.py
+++ b/src/engine/SCons/Tool/swig.py
@@ -66,9 +66,9 @@ def _find_modules(src):
try:
matches = _reModule.findall(open(src).read())
except IOError:
- # If the file's not yet generated, guess the module name from the filename
+ # If the file's not yet generated, guess the module name from the file stem
matches = []
- mnames.append(os.path.splitext(src)[0])
+ mnames.append(os.path.splitext(os.path.basename(src))[0])
for m in matches:
mnames.append(m[2])