Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.io.base
Commits
082ebcf6
Commit
082ebcf6
authored
Feb 11, 2015
by
Manuel Günther
Browse files
Use pkg-config after own search to be able to use our externals.
parent
c0cd02df
Changes
1
Hide whitespace changes
Inline
Side-by-side
setup.py
View file @
082ebcf6
...
...
@@ -50,18 +50,10 @@ class hdf5:
import
os
self
.
name
=
'hdf5'
# try to use pkg_config first
try
:
pkg
=
pkgconfig
(
'hdf5'
)
self
.
include_directories
=
pkg
.
include_directories
()
version_header
=
os
.
path
.
join
(
self
.
include_directories
[
0
],
'H5pubconf.h'
)
self
.
version
=
libhdf5_version
(
version_header
)
self
.
libraries
=
pkg
.
libraries
()
self
.
library_directories
=
pkg
.
library_directories
()
except
RuntimeError
:
# locate pkg-config on our own
# try to locate pkg-config on our own first
try
:
header
=
'hdf5.h'
candidates
=
find_header
(
header
)
...
...
@@ -124,6 +116,16 @@ class hdf5:
# library path
self
.
library_directories
=
[
os
.
path
.
dirname
(
candidates
[
0
])]
except
RuntimeError
:
# now, we try to use pkg-config, which seems to be only available on Debian
pkg
=
pkgconfig
(
'hdf5'
)
self
.
include_directories
=
pkg
.
include_directories
()
version_header
=
os
.
path
.
join
(
self
.
include_directories
[
0
],
'H5pubconf.h'
)
self
.
version
=
libhdf5_version
(
version_header
)
self
.
libraries
=
pkg
.
libraries
()
self
.
library_directories
=
pkg
.
library_directories
()
def
macros
(
self
):
return
[
(
'HAVE_%s'
%
self
.
name
.
upper
(),
'1'
),
...
...
Write
Preview
Markdown
is supported
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