Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
00d98acd
Commit
00d98acd
authored
May 27, 2016
by
Aleksandr Mezin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python-lxc: pass include/library dirs as arguments to setup.py
Signed-off-by:
Aleksandr Mezin
<
mezin.alexander@gmail.com
>
parent
58a44782
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
32 deletions
+11
-32
.gitignore
.gitignore
+0
-1
configure.ac
configure.ac
+0
-1
Makefile.am
src/python-lxc/Makefile.am
+9
-5
setup.py
src/python-lxc/setup.py
+2
-25
No files found.
.gitignore
View file @
00d98acd
...
...
@@ -66,7 +66,6 @@ src/lxc/lxc-wait
src/lxc/lxc-user-nic
src/lxc/version.h
src/python-lxc/setup.py
src/python-lxc/build/
src/python-lxc/lxc/__pycache__/
...
...
configure.ac
View file @
00d98acd
...
...
@@ -847,7 +847,6 @@ AC_CONFIG_FILES([
src/lxc/lxc.functions
src/lxc/version.h
src/python-lxc/Makefile
src/python-lxc/setup.py
src/lua-lxc/Makefile
...
...
src/python-lxc/Makefile.am
View file @
00d98acd
...
...
@@ -6,21 +6,25 @@ else
DISTSETUPOPTS
=
endif
INSTALL_OPTS
:=
install
--prefix
=
$(prefix)
--no-compile
$(DISTSETUPOPTS)
CALL_SETUP_PY
:=
cd
@srcdir@
&&
$(PYTHON)
setup.py build
-b
@abs_builddir@/build
all
:
$(
PYTHON)
setup.py build
$(
CALL_SETUP_PY)
build_ext
-I
@abs_top_srcdir@/src
-L
@abs_top_builddir@/src/lxc
install
:
if
[
"
$(DESTDIR)
"
=
"
"
]
;
then
\
$(
PYTHON)
setup.py
install
--prefix
=
$(prefix)
--no-compile
$(DISTSETUP
OPTS)
;
\
if
[
-z
"
$(DESTDIR)
"
]
;
then
\
$(
CALL_SETUP_PY)
$(INSTALL_
OPTS)
;
\
else
\
$(
PYTHON)
setup.py
install
--root
=
$(DESTDIR)
--prefix
=
$(prefix)
--no-compile
$(DISTSETUPOPTS
)
;
\
$(
CALL_SETUP_PY)
$(INSTALL_OPTS)
--root
=
$(DESTDIR
)
;
\
fi
clean-local
:
rm
-rf
build
rm
-rf
@builddir@/
build
endif
EXTRA_DIST
=
\
setup.py
\
lxc.c
\
lxc/__init__.py
\
examples/api_test.py
\
...
...
src/python-lxc/setup.py
.in
→
src/python-lxc/setup.py
View file @
00d98acd
...
...
@@ -22,36 +22,13 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA
import
os
,
os
.
path
from
distutils.core
import
setup
,
Extension
# Distutils doesn't cope well with source files that have relative paths going
# up in the directory tree: it tries to navigate outside of the build dir and
# fails miserably. Therefore, we will instead cd to the source directory,
# run this script from there, but write the build products to the correct path.
#
# Since we will be changing directories before building, we must transform
# all the path variables to their forms relative to srcdir.
srcdir
,
builddir
,
top_srcdir
,
top_builddir
=
map
(
os
.
path
.
abspath
,
[
"@srcdir@"
,
"@builddir@"
,
"@top_srcdir@"
,
"@top_builddir@"
])
builddir
,
top_srcdir
,
top_builddir
=
map
(
lambda
d
:
os
.
path
.
relpath
(
d
,
srcdir
),
[
builddir
,
top_srcdir
,
top_builddir
])
os
.
chdir
(
srcdir
)
module
=
Extension
(
'_lxc'
,
sources
=
[
'lxc.c'
],
include_dirs
=
[
os
.
path
.
join
(
top_srcdir
,
'src'
),
os
.
path
.
join
(
top_builddir
,
'src'
)],
library_dirs
=
[
os
.
path
.
join
(
top_builddir
,
'src/lxc'
)],
libraries
=
[
'lxc'
])
setup
(
name
=
'_lxc'
,
version
=
'0.1'
,
description
=
'LXC'
,
packages
=
[
'lxc'
],
package_dir
=
{
'lxc'
:
'lxc'
},
ext_modules
=
[
module
],
options
=
{
'build'
:
{
'build_base'
:
os
.
path
.
join
(
builddir
,
'build'
)}}
)
ext_modules
=
[
Extension
(
'_lxc'
,
sources
=
[
'lxc.c'
],
libraries
=
[
'lxc'
])
],
)
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