Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.ip.flandmark
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
Model registry
Operate
Environments
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.ip.flandmark
Commits
ae831088
Commit
ae831088
authored
12 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
Simplified setup infrastructure
parent
ba3c860d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
buildout.cfg
+11
-24
11 additions, 24 deletions
buildout.cfg
setup.py
+11
-85
11 additions, 85 deletions
setup.py
with
22 additions
and
109 deletions
buildout.cfg
+
11
−
24
View file @
ae831088
...
@@ -3,32 +3,19 @@
...
@@ -3,32 +3,19 @@
; Mon 16 Apr 08:29:18 2012 CEST
; Mon 16 Apr 08:29:18 2012 CEST
[buildout]
[buildout]
parts
=
env
flandmark
external tests python
parts
=
xbob.
flandmark
scripts
e
ggs
=
bob
e
xtensions
=
mr.developer
xbob.flandmark
auto-checkout
=
*
newest
=
false
newest
=
false
eggs
=
xbob.flandmark
prefixes
=
/Users/andre/work/bob/b/dbg
; Path to Bob's root - No need setting this if Bob is installed centrally
[sources]
bob
=
/idiap/group/torch5spro/nightlies/last/install/linux-x86_64-release
x
bob
.buildout
=
git git@github.com:bioidiap/xbob.buildout
[env]
[xbob.flandmark]
recipe
=
collective.recipe.environment
recipe
=
xbob.buildout:develop
PKG_CONFIG_PATH
=
${buildout:bob}/lib/pkgconfig
[flandmark]
[scripts]
recipe
=
zc.recipe.egg:develop
recipe
=
xbob.buildout:scripts
setup
=
.
[external]
recipe
=
xbob.buildout:external
egg-directories
=
${buildout:bob}/lib
[tests]
recipe
=
xbob.buildout:nose
eggs
=
${buildout:eggs}
script
=
tests.py
[python]
recipe
=
zc.recipe.egg
interpreter
=
python
interpreter
=
python
eggs
=
${buildout:eggs}
This diff is collapsed.
Click to expand it.
setup.py
+
11
−
85
View file @
ae831088
...
@@ -6,90 +6,8 @@
...
@@ -6,90 +6,8 @@
"""
Bindings for flandmark
"""
Bindings for flandmark
"""
"""
import
sys
import
subprocess
from
setuptools
import
setup
,
find_packages
from
setuptools
import
setup
,
find_packages
from
distutils.extension
import
Extension
from
xbob.extension
import
Extension
def
pkgconfig
(
package
):
def
uniq
(
seq
,
idfun
=
None
):
# order preserving
if
idfun
is
None
:
def
idfun
(
x
):
return
x
seen
=
{}
result
=
[]
for
item
in
seq
:
marker
=
idfun
(
item
)
# in old Python versions:
# if seen.has_key(marker)
# but in new ones:
if
marker
in
seen
:
continue
seen
[
marker
]
=
1
result
.
append
(
item
)
return
result
flag_map
=
{
'
-I
'
:
'
include_dirs
'
,
'
-L
'
:
'
library_dirs
'
,
'
-l
'
:
'
libraries
'
,
}
cmd
=
[
'
pkg-config
'
,
'
--libs
'
,
'
--cflags
'
,
package
,
]
proc
=
subprocess
.
Popen
(
cmd
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
output
=
proc
.
communicate
()[
0
]
if
proc
.
returncode
!=
0
:
raise
RuntimeError
,
"
PkgConfig did not find package %s. Output:
\n
%s
"
%
\
(
package
,
output
.
strip
())
kw
=
{}
for
token
in
output
.
split
():
if
flag_map
.
has_key
(
token
[:
2
]):
kw
.
setdefault
(
flag_map
.
get
(
token
[:
2
]),
[]).
append
(
token
[
2
:])
elif
token
[
0
]
==
'
-
'
:
# throw others to extra_link_args
kw
.
setdefault
(
'
extra_compile_args
'
,
[]).
append
(
token
)
else
:
# these are maybe libraries
if
os
.
path
.
exists
(
token
):
dirname
=
os
.
path
.
dirname
(
token
)
if
dirname
not
in
kw
.
get
(
'
library_dirs
'
,
[]):
kw
.
setdefault
(
'
library_dirs
'
,
[]).
append
(
dirname
)
bname
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
token
))[
0
][
3
:]
if
bname
not
in
kw
.
get
(
'
libraries
'
,
[]):
kw
.
setdefault
(
'
libraries
'
,
[]).
append
(
bname
)
for
k
,
v
in
kw
.
iteritems
():
# remove duplicated
kw
[
k
]
=
uniq
(
v
)
return
kw
def
setup_bob_extension
(
ext_name
,
sources
):
"""
Sets up a given C++ extension that depends on Bob
"""
bob
=
pkgconfig
(
'
bob-python
'
)
ocv
=
pkgconfig
(
'
opencv
'
)
return
Extension
(
ext_name
,
sources
=
sources
,
language
=
"
c++
"
,
include_dirs
=
bob
.
get
(
'
include_dirs
'
,[])
+
ocv
.
get
(
'
include_dirs
'
,[]),
library_dirs
=
bob
.
get
(
'
library_dirs
'
,[])
+
ocv
.
get
(
'
library_dirs
'
,
[]),
runtime_library_dirs
=
bob
.
get
(
'
library_dirs
'
,[])
+
ocv
.
get
(
'
library_dirs
'
,
[]),
libraries
=
bob
.
get
(
'
libraries
'
,[])
+
ocv
.
get
(
'
libraries
'
,[]),
)
setup
(
setup
(
...
@@ -110,6 +28,10 @@ setup(
...
@@ -110,6 +28,10 @@ setup(
"
xbob
"
,
"
xbob
"
,
],
],
setup_requires
=
[
'
xbob.extension
'
,
],
install_requires
=
[
install_requires
=
[
'
setuptools
'
,
'
setuptools
'
,
'
bob
'
,
'
bob
'
,
...
@@ -122,12 +44,16 @@ setup(
...
@@ -122,12 +44,16 @@ setup(
},
},
ext_modules
=
[
ext_modules
=
[
setup_bob_e
xtension
(
"
xbob.flandmark._flandmark
"
,
E
xtension
(
"
xbob.flandmark._flandmark
"
,
[
[
"
xbob/flandmark/ext/flandmark_detector.cpp
"
,
"
xbob/flandmark/ext/flandmark_detector.cpp
"
,
"
xbob/flandmark/ext/liblbp.cpp
"
,
"
xbob/flandmark/ext/liblbp.cpp
"
,
"
xbob/flandmark/ext/ext.cpp
"
,
"
xbob/flandmark/ext/ext.cpp
"
,
])
],
bob_modules
=
[
'
opencv
'
,
]
)
],
],
classifiers
=
[
classifiers
=
[
...
...
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