Commit e6de60a3 authored by R. Andrew Ohana's avatar R. Andrew Ohana

Add the option to specify the directory for output files

parent 7538ecd2
......@@ -627,6 +627,14 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
new_sources = []
for source in m.sources:
base, ext = os.path.splitext(source)
if hasattr(options, 'build_dir'):
base = os.path.join(options.build_dir, base)
input_dir = os.path.dirname(source)
output_dir = os.path.dirname(base)
if not os.path.isdir(output_dir):
os.makedirs(output_dir)
for header in extended_iglob(os.path.join(input_dir, '*.h')):
shutil.copy(header, output_dir)
if ext in ('.pyx', '.py'):
if m.language == 'c++':
c_file = base + '.cpp'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment