Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.extension
Commits
f98d9deb
Commit
f98d9deb
authored
Jun 12, 2014
by
André Anjos
💬
Browse files
Allows searching in architecture specific header paths
parent
1bdf4f6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
bob/extension/utils.py
View file @
f98d9deb
...
...
@@ -117,11 +117,20 @@ def find_header(name, subpaths=None, prefixes=None):
description.
"""
headerpaths
=
[
'include'
]
if
platform
.
architecture
()[
0
]
==
'32bit'
:
headerpaths
.
append
(
os
.
path
.
join
(
'include'
,
'i386-linux-gnu'
))
else
:
headerpaths
.
append
(
os
.
path
.
join
(
'include'
,
'x86_64-linux-gnu'
))
# Exhaustive combination of paths and subpaths
if
subpaths
:
my_subpaths
=
[
os
.
path
.
join
(
'include'
,
k
)
for
k
in
subpaths
]
my_subpaths
=
[]
for
hp
in
headerpaths
:
my_subpaths
+=
[
os
.
path
.
join
(
hp
,
k
)
for
k
in
subpaths
]
else
:
my_subpaths
=
[
'include'
]
my_subpaths
=
headerpaths
return
find_file
(
name
,
my_subpaths
,
prefixes
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment