Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.

Commit 1ed2bc5

Browse files
committed
ROOT6
1 parent 90e0f6a commit 1ed2bc5

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

setup.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@
3838

3939

4040
def root_flags(root_config='root-config'):
41-
root_inc = subprocess.Popen([root_config, '--incdir'],
42-
stdout=subprocess.PIPE).communicate()[0].strip()
41+
root_cflags = subprocess.Popen([root_config, '--cflags'],
42+
stdout=subprocess.PIPE).communicate()[0].strip().split(' ')
4343
root_ldflags = subprocess.Popen([root_config, '--libs'],
4444
stdout=subprocess.PIPE).communicate()[0].strip().split(' ')
45-
return root_inc, root_ldflags
45+
return root_cflags, root_ldflags
4646

4747
try:
48-
root_inc, root_ldflags = root_flags()
48+
root_cflags, root_ldflags = root_flags()
4949
except OSError:
5050
rootsys = os.getenv('ROOTSYS', None)
5151
if rootsys is None:
@@ -54,7 +54,7 @@ def root_flags(root_config='root-config'):
5454
"Is ROOT installed and setup properly?")
5555
try:
5656
root_config = os.path.join(rootsys, 'bin', 'root-config')
57-
root_inc, root_ldflags = root_flags(root_config)
57+
root_cflags, root_ldflags = root_flags(root_config)
5858
except OSError:
5959
raise RuntimeError(
6060
"ROOTSYS is {0} but running {1} failed".format(
@@ -68,9 +68,8 @@ def root_flags(root_config='root-config'):
6868
language='c++',
6969
include_dirs=[
7070
np.get_include(),
71-
root_inc,
7271
'root_numpy/src'],
73-
extra_compile_args=['-Wno-unused-function'],
72+
extra_compile_args=root_cflags + ['-Wno-unused-function'],
7473
extra_link_args=root_ldflags + ['-lTreePlayer'])
7574

7675
# check for custom args

0 commit comments

Comments
 (0)