diff options
author | Steve Chaplin <> | 2010-09-18 04:29:45 +0800 |
---|---|---|
committer | Steve Chaplin <> | 2010-09-18 04:29:45 +0800 |
commit | 2fbc506f34ea0844b9cda366a8031dd022efcc09 (patch) | |
tree | 03247b5dc6c08ff9b248c4cde3b60e52adbcba73 | |
parent | 390da53d5eb74fb9fa7c47277ff1e841bbeaf2fd (diff) | |
download | pycairo-2fbc506f34ea0844b9cda366a8031dd022efcc09.tar.gz |
Add support for
./waf configure --libdir=XXX
Fixes #30230.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | INSTALL | 3 | ||||
-rw-r--r-- | src/wscript | 7 | ||||
-rw-r--r-- | wscript | 13 |
4 files changed, 13 insertions, 11 deletions
@@ -8,3 +8,4 @@ *.pyo *.svg .waf* +build_directory @@ -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 @@ -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(): |