[cairo-commit] pycairo ChangeLog,1.240,1.241 setup.py,1.11,1.12

Steve Chaplin commit at pdx.freedesktop.org
Thu Sep 21 21:00:18 PDT 2006


Committed by: stevech1097

Update of /cvs/cairo/pycairo
In directory kemper:/tmp/cvs-serv16467

Modified Files:
	ChangeLog setup.py 
Log Message:
'SC'

Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/pycairo/ChangeLog,v
retrieving revision 1.240
retrieving revision 1.241
diff -u -d -r1.240 -r1.241
--- ChangeLog	21 Sep 2006 12:15:09 -0000	1.240
+++ ChangeLog	22 Sep 2006 04:00:15 -0000	1.241
@@ -1,4 +1,9 @@
-2006-09-18  Cedric Gustin  <cedric.gustin at gmail.com>
+2006-09-22  Cedric Gustin  <cedric.gustin at gmail.com>
+
+	* setup.py: Fixes for win32. Install pycairo.pc and pycairo.h as
+	data_files.
+
+2006-09-21  Cedric Gustin  <cedric.gustin at gmail.com>
 
 	* cairo/pycairo-path.c: Initialize PycairoPathiter_Type.tp_iter in
 	init_cairo (cairomodule.c) to avoid "non-const initializer" errors

Index: setup.py
===================================================================
RCS file: /cvs/cairo/pycairo/setup.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- setup.py	21 Aug 2006 03:32:28 -0000	1.11
+++ setup.py	22 Sep 2006 04:00:15 -0000	1.12
@@ -31,10 +31,30 @@
 
 
 pkg_config_version_check ('cairo', cairo_version_required)
+if sys.platform == 'win32':
+    runtime_library_dirs = []
+else:
+    runtime_library_dirs = pkg_config_parse('--libs-only-L', 'cairo')
+
+pkgconfig_file='pycairo.pc'
+print 'creating %s' % pkgconfig_file
+fo = open (pkgconfig_file, 'w')
+fo.write ("""\
+prefix=%s
+
+Name: Pycairo
+Description: Python bindings for cairo
+Version: %s
+Requires: cairo
+Cflags: -I${prefix}/include/pycairo
+Libs:
+""" % (sys.prefix, pycairo_version)
+          )
+fo.close()
 
 cairo = dic.Extension(
     name = 'cairo._cairo',
-    sources = ['cairo/cairomodule.c',
+     sources = ['cairo/cairomodule.c',
                'cairo/pycairo-context.c',
                'cairo/pycairo-font.c',
                'cairo/pycairo-matrix.c',
@@ -45,7 +65,7 @@
     include_dirs = pkg_config_parse('--cflags-only-I', 'cairo'),
     library_dirs = pkg_config_parse('--libs-only-L', 'cairo'),
     libraries    = pkg_config_parse('--libs-only-l', 'cairo'),
-    runtime_library_dirs = pkg_config_parse('--libs-only-L', 'cairo'),
+    runtime_library_dirs = runtime_library_dirs,
     )
 
 dic.setup(
@@ -54,25 +74,6 @@
     description = "python interface for cairo",
     packages = ['cairo'],
     ext_modules = [cairo],
+    data_files=[('include/pycairo',['cairo/pycairo.h']),
+                ('lib/pkgconfig',[pkgconfig_file])],
     )
-
-pkgconfig_dir  = os.path.join (sys.prefix, 'lib', 'pkgconfig')
-pkgconfig_file = os.path.join (pkgconfig_dir, 'pycairo.pc')
-print 'creating %s' % pkgconfig_file
-fo = file (pkgconfig_file, 'w')
-fo.write ("""\
-prefix=%s
-
-Name: Pycairo
-Description: Python bindings for cairo
-Version: %s
-Requires: cairo
-Cflags: -I${prefix}/include/pycairo
-Libs:
-""" % (sys.prefix, pycairo_version)
-          )
-fo.close()
-
-includedir = os.path.join (sys.prefix, 'include', 'pycairo')
-dut.mkpath (includedir, verbose=True)
-fut.copy_file ('cairo/pycairo.h', includedir, verbose=True)



More information about the cairo-commit mailing list