summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Chaplin <>2010-09-18 04:29:45 +0800
committerSteve Chaplin <>2010-09-18 04:29:45 +0800
commit2fbc506f34ea0844b9cda366a8031dd022efcc09 (patch)
tree03247b5dc6c08ff9b248c4cde3b60e52adbcba73
parent390da53d5eb74fb9fa7c47277ff1e841bbeaf2fd (diff)
downloadpycairo-2fbc506f34ea0844b9cda366a8031dd022efcc09.tar.gz
Add support for
./waf configure --libdir=XXX Fixes #30230.
-rw-r--r--.gitignore1
-rw-r--r--INSTALL3
-rw-r--r--src/wscript7
-rw-r--r--wscript13
4 files changed, 13 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index 73448e4..13034aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@
*.pyo
*.svg
.waf*
+build_directory
diff --git a/INSTALL b/INSTALL
index 724f1cb..19a3a38 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,8 @@
Install Procedure
-----------------
$ ./waf --help # shows available waf options
-$ ./waf configure # use '--prefix=PREFIX' if needed
+$ ./waf configure # use --prefix and --libdir if necessary
+ # --prefix=/usr --libdir=/usr/lib64 for Fedora 64-bit
$ ./waf build
$ ./waf install
diff --git a/src/wscript b/src/wscript
index 7fdeffc..ca51a88 100644
--- a/src/wscript
+++ b/src/wscript
@@ -7,12 +7,15 @@ d = 'src'
def build(ctx):
print(' %s/build()' %d)
+ pycairoLibDir = os.path.join(ctx.env['LIBDIR'],
+ 'python'+ctx.env['PYTHON_VERSION'],
+ 'site-packages', 'cairo')
# .py files
ctx.new_task_gen(
features = 'py',
source = '__init__.py',
- install_path = '${PYTHONDIR}/cairo',
+ install_path = pycairoLibDir,
)
# C extension module
@@ -22,7 +25,7 @@ def build(ctx):
target = '_cairo',
includes = '.',
uselib = 'CAIRO',
- install_path = '${PYTHONDIR}/cairo',
+ install_path = pycairoLibDir,
)
# C API
diff --git a/wscript b/wscript
index 91ebe93..a55ae55 100644
--- a/wscript
+++ b/wscript
@@ -13,6 +13,7 @@ cairo_version_required = '1.8.10'
def set_options(ctx):
print(' %s/set_options()' %d)
+ ctx.tool_options('gnu_dirs')
ctx.tool_options('compiler_cc')
ctx.tool_options('python') # options for disabling pyc or pyo compilation
@@ -28,6 +29,7 @@ def configure(ctx):
print(' %s/configure()' %d)
env = ctx.env
+ ctx.check_tool('gnu_dirs')
ctx.check_tool('misc')
ctx.check_tool('compiler_cc')
ctx.check_tool('python')
@@ -48,8 +50,8 @@ def configure(ctx):
ctx.write_config_header('src/config.h')
- import Options
- print("%-40s : %s" % ('Prefix', Options.options.prefix))
+ print("%-40s : %s" % ('PREFIX', env['PREFIX']))
+ print("%-40s : %s" % ('LIBDIR', env['LIBDIR']))
def build(ctx):
@@ -65,12 +67,7 @@ def build(ctx):
'prefix' : ctx.env['PREFIX'],
'includedir': os.path.join(ctx.env['PREFIX'], 'include'),
}
- obj.install_path = os.path.join(ctx.env['PREFIX'], 'lib', 'pkgconfig')
-
-
-#def dist(): # create archives of project
-# print(' %s/dist()' %d)
-# dist is predefined
+ obj.install_path = os.path.join(ctx.env['LIBDIR'], 'pkgconfig')
def dist_hook():