Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.io.base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.io.base
Commits
423da5ce
Commit
423da5ce
authored
10 years ago
by
Manuel Günther
Browse files
Options
Downloads
Patches
Plain Diff
Added function to retrieve HDF5 header directories
parent
820444f4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/io/base/__init__.py
+20
-0
20 additions, 0 deletions
bob/io/base/__init__.py
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
21 additions
and
1 deletion
bob/io/base/__init__.py
+
20
−
0
View file @
423da5ce
...
...
@@ -214,5 +214,25 @@ def get_config():
return
retval
.
strip
()
def
get_include_directories
():
"""
Returns a list of include directories for dependent libraries, such as HDF5.
"""
from
bob.extension
import
pkgconfig
# try to use pkg_config first
try
:
pkg
=
pkgconfig
(
'
hdf5
'
)
return
pkg
.
include_directories
()
except
RuntimeError
:
from
bob.extension.utils
import
find_header
# locate pkg-config on our own
header
=
'
hdf5.h
'
candidates
=
find_header
(
header
)
if
not
candidates
:
raise
RuntimeError
(
"
could not find %s
'
s `%s
'
- have you installed %s on this machine?
"
%
(
'
hdf5
'
,
header
,
'
hdf5
'
))
return
[
os
.
path
.
dirname
(
candidates
[
0
])]
# gets sphinx autodoc done right - don't remove it
__all__
=
[
_
for
_
in
dir
()
if
not
_
.
startswith
(
'
_
'
)]
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
423da5ce
...
...
@@ -8,7 +8,7 @@ bob_packages = ['bob.core']
from
setuptools
import
setup
,
find_packages
,
dist
dist
.
Distribution
(
dict
(
setup_requires
=
[
'
bob.extension
'
,
'
bob.blitz
'
]
+
bob_packages
))
from
bob.extension.utils
import
egrep
,
find_header
,
find_library
from
bob.extension
.pkgconfig
import
pkgconfig
from
bob.extension
import
pkgconfig
from
bob.blitz.extension
import
Extension
,
Library
,
build_ext
from
bob.extension.utils
import
load_requirements
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment