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.io.image
Commits
2f203d4f
Commit
2f203d4f
authored
Jun 23, 2014
by
Manuel Günther
Browse files
Merge branch 'master' of
https://github.com/bioidiap/bob.io.image
parents
8fea0e14
621e9ede
Changes
1
Hide whitespace changes
Inline
Side-by-side
setup.py
View file @
2f203d4f
...
...
@@ -25,6 +25,12 @@ def libjpeg_version(header):
minor
=
int
(
version
[
1
].
group
(
2
))
return
'%d.%d'
%
(
major
,
minor
)
def
libjpeg_turbo_version
(
header
):
version
=
egrep
(
header
,
r
"#\s*define\s+LIBJPEG_TURBO_VERSION\s+([\d\.]+)"
)
if
not
len
(
version
):
return
None
return
version
[
0
].
group
(
1
)
+
' (turbo)'
class
jpeg
:
def
__init__
(
self
,
requirement
=
''
,
only_static
=
False
):
...
...
@@ -59,6 +65,13 @@ class jpeg:
if
not
requirement
:
self
.
include_directory
=
os
.
path
.
dirname
(
candidates
[
0
])
self
.
version
=
libjpeg_version
(
candidates
[
0
])
# special condition (using libjpeg-turbo instead)
if
self
.
version
is
None
:
turbo_candidates
=
find_header
(
'jconfig.h'
)
if
turbo_candidates
:
self
.
version
=
libjpeg_turbo_version
(
turbo_candidates
[
0
])
found
=
True
else
:
...
...
@@ -407,6 +420,7 @@ setup(
packages
=
find_packages
(),
include_package_data
=
True
,
zip_safe
=
False
,
install_requires
=
[
'setuptools'
,
...
...
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