Skip to content

Commit

Permalink
Use PYTHRANRC='' for Meson
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Jan 18, 2024
1 parent 0a41852 commit 025a20d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ bar = custom_target(
'bar',
output: ['bar.cpp'],
input: 'bar.py',
command: [pythran, '-E', '--config', 'pythran.complex_hook=pythran_complex_hook', '@INPUT@', '-o', '@OUTDIR@/bar.cpp']
command: [pythran, '-E', '--config', 'pythran.complex_hook=pythran_complex_hook', '@INPUT@', '-o', '@OUTDIR@/bar.cpp'],
env: ['PYTHRANRC='],
)

bar = py.extension_module(
Expand All @@ -13,14 +14,15 @@ bar = py.extension_module(
dependencies: [pythran_dep, np_dep],
# link_args: version_link_args,
install: true,
subdir: 'package_for_test_meson/__pythran__'
subdir: 'package_for_test_meson/__pythran__',
)

foo = custom_target(
'foo',
output: ['foo.cpp'],
input: 'foo.py',
command: [pythran, '-E', '--config', 'pythran.complex_hook=pythran_complex_hook', '@INPUT@', '-o', '@OUTDIR@/foo.cpp']
command: [pythran, '-E', '--config', 'pythran.complex_hook=pythran_complex_hook', '@INPUT@', '-o', '@OUTDIR@/foo.cpp'],
env: ['PYTHRANRC='],
)

foo = py.extension_module(
Expand All @@ -30,5 +32,5 @@ foo = py.extension_module(
dependencies: [pythran_dep, np_dep],
# link_args: version_link_args,
install: true,
subdir: 'package_for_test_meson/__pythran__'
subdir: 'package_for_test_meson/__pythran__',
)
5 changes: 3 additions & 2 deletions src/transonic/backends/pythran.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def make_meson_code(self, file_names, subdir):
'{name}',
output: ['{name}.cpp'],
input: '{name}.py',
command: [pythran, '-E', '--config', 'pythran.complex_hook=pythran_complex_hook', '@INPUT@', '-o', '@OUTDIR@/{name}.cpp']
command: [pythran, '-E', '--config', 'pythran.complex_hook=pythran_complex_hook', '@INPUT@', '-o', '@OUTDIR@/{name}.cpp'],
env: ['PYTHRANRC='],
)
{name} = py.extension_module(
Expand All @@ -72,7 +73,7 @@ def make_meson_code(self, file_names, subdir):
dependencies: [pythran_dep, np_dep],
# link_args: version_link_args,
install: true,
subdir: '{subdir}'
subdir: '{subdir}',
)
"""
)
Expand Down

0 comments on commit 025a20d

Please sign in to comment.