Skip to content

Commit 74f7be8

Browse files
Don't needlessly copy header files
1 parent eb321db commit 74f7be8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

utils/build_swig.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ def main():
118118
for from_to in subst[file]:
119119
line = line.replace(*from_to)
120120
out_file.write(line)
121-
else:
122-
shutil.copy(os.path.join(incl_dir, file),
123-
os.path.join(dest, file))
124121
# make options list
125122
swig_opts = ['-c++', '-python', '-builtin', '-doxygen',
126123
'-fastdispatch', '-fastproxy', '-Wextra', '-Werror',
@@ -131,7 +128,8 @@ def main():
131128
swig_opts.append('-D{}'.format(k))
132129
else:
133130
swig_opts.append('-D{}={}'.format(k, v))
134-
swig_opts += ['-I' + copy_dir, '-outdir', output_dir]
131+
swig_opts += ['-I' + copy_dir, '-I' + os.path.dirname(incl_dir),
132+
'-outdir', output_dir]
135133
# do each swig module
136134
for ext_name in ext_names:
137135
cmd = ['swig'] + swig_opts

0 commit comments

Comments
 (0)