Skip to content

Commit

Permalink
Use transonic-get-include provided by transonic 0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Feb 7, 2024
1 parent 3373512 commit a18a9e0
Show file tree
Hide file tree
Showing 3 changed files with 193 additions and 176 deletions.
33 changes: 2 additions & 31 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -25,40 +25,11 @@ endif

use_pythran = backend.contains('pythran')
if use_pythran
incdir_numpy = run_command(
py,
[
'-c',
'''import os
import numpy as np
try:
incdir = os.path.relpath(np.get_include())
except Exception:
incdir = np.get_include()
print(incdir)'''
],
check: true
).stdout().strip()

incdir_numpy = run_command('transonic-get-include', 'numpy', check: true).stdout().strip()
inc_np = include_directories(incdir_numpy)
np_dep = declare_dependency(include_directories: inc_np)

incdir_pythran = run_command(
py,
[
'-c',
'''import os
import pythran;
incdir = os.path.dirname(pythran.__file__)
try:
incdir = os.path.relpath(incdir)
except Exception:
pass
print(incdir)'''
],
check: true
).stdout().strip()

incdir_pythran = run_command('transonic-get-include', 'pythran', check: true).stdout().strip()
pythran = find_program('pythran', native: true)

cpp_args_pythran = [
Expand Down
Loading

0 comments on commit a18a9e0

Please sign in to comment.