Skip to content

Commit 98938c9

Browse files
lithomas1topper-123
authored andcommitted
BLD: Fix compiling pandas with a venv located in the src dir (pandas-dev#53489)
1 parent d1b5024 commit 98938c9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

pandas/meson.build

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
incdir_numpy = run_command(py,
22
[
33
'-c',
4-
'import os; os.chdir(".."); import numpy; print(numpy.get_include())'
4+
'''
5+
import os
6+
import numpy as np
7+
try:
8+
# Check if include directory is inside the pandas dir
9+
# e.g. a venv created inside the pandas dir
10+
# If so, convert it to a relative path
11+
incdir = os.path.relpath(np.get_include())
12+
except Exception:
13+
incdir = np.get_include()
14+
print(incdir)
15+
'''
516
],
617
check: true
718
).stdout().strip()

0 commit comments

Comments
 (0)