Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
3a1a4609
Commit
3a1a4609
authored
Feb 22, 2006
by
Olivier Aubert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mediacontrol-python: allow to build in a separate builddir
parent
81c1cc5e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
11 deletions
+36
-11
bindings/mediacontrol-python/Makefile.am
bindings/mediacontrol-python/Makefile.am
+5
-2
bindings/mediacontrol-python/setup.py
bindings/mediacontrol-python/setup.py
+31
-9
No files found.
bindings/mediacontrol-python/Makefile.am
View file @
3a1a4609
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
# Building the Python binding
# Building the Python binding
###############################################################################
###############################################################################
if
HAVE_WIN32
if
HAVE_WIN32
COMPILERARG
=
--compiler
=
mingw32
COMPILERARG
=
--compiler
=
mingw32
else
else
...
@@ -11,10 +12,12 @@ endif
...
@@ -11,10 +12,12 @@ endif
if
BUILD_PYTHON
if
BUILD_PYTHON
all
:
all
:
python setup.py build
$(COMPILERARG)
srcdir
=
"
$(srcdir)
"
top_builddir
=
"
$(top_builddir)
"
python
"
$(srcdir)
/setup.py"
build
$(COMPILERARG)
"--build-base=
$(top_builddir)
/bindings/mediacontrol-python"
"--build-temp=
$(top_builddir)
/bindings/mediacontrol-python"
# FIXME: python setup.py install does not have any option to install from a different build directory
# so this will not work in a separate builddir
install
:
install
:
python setup.py
install
python
$(srcdir)
/
setup.py
install
clean
:
clean
:
$(RM)
-rf
build
$(RM)
-rf
build
...
...
bindings/mediacontrol-python/setup.py
View file @
3a1a4609
from
distutils.core
import
setup
,
Extension
from
distutils.core
import
setup
,
Extension
import
os
import
os
# Get build variables (buildir, srcdir)
try
:
top_builddir
=
os
.
environ
[
'top_builddir'
]
except
KeyError
:
# Note: do not initialize here, so that we get
# a correct default value if the env. var is
# defined but empty
top_builddir
=
None
if
not
top_builddir
:
top_builddir
=
os
.
path
.
join
(
'..'
,
'..'
)
os
.
environ
[
'top_builddir'
]
=
top_builddir
try
:
srcdir
=
os
.
environ
[
'srcdir'
]
except
KeyError
:
# Note: same as above
srcdir
=
None
if
not
srcdir
:
srcdir
=
'.'
if
os
.
sys
.
platform
in
(
'win32'
,
'darwin'
):
if
os
.
sys
.
platform
in
(
'win32'
,
'darwin'
):
# Do not use PIC version on win32 and Mac OS X
# Do not use PIC version on win32 and Mac OS X
vlclib
=
'../../src/libvlc.a'
vlclib
=
os
.
path
.
join
(
top_builddir
,
'src'
,
'libvlc.a'
)
picflag
=
''
picflag
=
''
else
:
else
:
vlclib
=
'../../src/libvlc_pic.a'
vlclib
=
os
.
path
.
join
(
top_builddir
,
'src'
,
'libvlc_pic.a'
)
picflag
=
'pic'
picflag
=
'pic'
def
get_vlcconfig
():
def
get_vlcconfig
():
vlcconfig
=
None
vlcconfig
=
None
for
n
in
(
'vlc-config'
,
for
n
in
(
'vlc-config'
,
os
.
path
.
sep
.
join
(
(
'..'
,
'..'
,
'vlc-config'
)
)):
os
.
path
.
join
(
top_builddir
,
'vlc-config'
)):
if
os
.
path
.
exists
(
n
):
if
os
.
path
.
exists
(
n
):
vlcconfig
=
n
vlcconfig
=
n
break
break
...
@@ -44,7 +64,6 @@ def get_ldflags():
...
@@ -44,7 +64,6 @@ def get_ldflags():
if
vlcconfig
is
None
:
if
vlcconfig
is
None
:
return
[]
return
[]
else
:
else
:
os
.
environ
[
'top_builddir'
]
=
'../..'
ldflags
=
[]
ldflags
=
[]
if
os
.
sys
.
platform
==
'darwin'
:
if
os
.
sys
.
platform
==
'darwin'
:
ldflags
=
"-read_only_relocs warning"
.
split
()
ldflags
=
"-read_only_relocs warning"
.
split
()
...
@@ -57,17 +76,20 @@ def get_ldflags():
...
@@ -57,17 +76,20 @@ def get_ldflags():
# To compile in a local vlc tree
# To compile in a local vlc tree
vlclocal
=
Extension
(
'vlc'
,
vlclocal
=
Extension
(
'vlc'
,
sources
=
[
'vlcglue.c'
,
sources
=
[
os
.
path
.
join
(
srcdir
,
'vlcglue.c'
),
'../../src/control/mediacontrol_init.c'
],
os
.
path
.
join
(
srcdir
,
'../../src/control/mediacontrol_init.c'
)],
include_dirs
=
[
'../../include'
,
'../../'
,
'/usr/win32/include'
],
include_dirs
=
[
top_builddir
,
os
.
path
.
join
(
srcdir
,
'../../include'
),
os
.
path
.
join
(
srcdir
,
'../../'
,
'/usr/win32/include'
)
],
extra_objects
=
[
vlclib
],
extra_objects
=
[
vlclib
],
extra_compile_args
=
get_cflags
(),
extra_compile_args
=
get_cflags
(),
extra_link_args
=
[
'-L
../..'
]
+
get_ldflags
(),
extra_link_args
=
[
'-L
'
+
top_builddir
]
+
get_ldflags
(),
)
)
setup
(
name
=
'MediaControl'
,
setup
(
name
=
'MediaControl'
,
version
=
get_vlc_version
(),
version
=
get_vlc_version
(),
scripts
=
[
'vlcdebug.py'
],
scripts
=
[
os
.
path
.
join
(
srcdir
,
'vlcdebug.py'
)
],
keywords
=
[
'vlc'
,
'video'
],
keywords
=
[
'vlc'
,
'video'
],
license
=
"GPL"
,
license
=
"GPL"
,
description
=
"""VLC bindings for python.
description
=
"""VLC bindings for python.
...
...
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