From fc8007f765f81ca864fb8de72abc5a7b49357ec2 Mon Sep 17 00:00:00 2001 From: Cedric Gustin Date: Wed, 28 Jun 2006 09:01:19 +0000 Subject: Set datarootdir in .pc file. 2006-06-28 Cedric Gustin * dsextras.py (InstallData): Set datarootdir in .pc file. * pygobject_postinstall.py (replace_prefix): Do not parse pygtk-codegen-2.0 as it is part of pygtk. * setup.py: Create gobject extension as gobject._gobject. Add pygoptioncontext.c and pygoptiongroup.c to the list of source files. Add option.py to the module files. Changed name of distutils package from pygtk to pygobject. --- ChangeLog | 12 ++++++++++++ dsextras.py | 2 ++ pygobject_postinstall.py | 6 +----- setup.py | 7 +++++-- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index eb8eed8..0f8acde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2006-06-28 Cedric Gustin + + * dsextras.py (InstallData): Set datarootdir in .pc file. + + * pygobject_postinstall.py (replace_prefix): Do not parse + pygtk-codegen-2.0 as it is part of pygtk. + + * setup.py: Create gobject extension as gobject._gobject. Add + pygoptioncontext.c and pygoptiongroup.c to the list of source + files. Add option.py to the module files. Changed name of + distutils package from pygtk to pygobject. + 2006-06-24 Gustavo J. A. M. Carneiro * gobject/gobjectmodule.c (pyg_filename_from_utf8): Wrap diff --git a/dsextras.py b/dsextras.py index 0f8fa62..006e5d6 100644 --- a/dsextras.py +++ b/dsextras.py @@ -179,12 +179,14 @@ class InstallData(install_data): self.exec_prefix = '${prefix}/bin' self.includedir = '${prefix}/include' self.libdir = '${prefix}/lib' + self.datarootdir = '${prefix}/share' self.datadir = '${prefix}/share' self.add_template_option('prefix', self.prefix) self.add_template_option('exec_prefix', self.exec_prefix) self.add_template_option('includedir', self.includedir) self.add_template_option('libdir', self.libdir) + self.add_template_option('datarootdir', self.datarootdir) self.add_template_option('datadir', self.datadir) self.add_template_option('PYTHON', sys.executable) self.add_template_option('THREADING_CFLAGS', '') diff --git a/pygobject_postinstall.py b/pygobject_postinstall.py index b6e9d7a..0175d00 100644 --- a/pygobject_postinstall.py +++ b/pygobject_postinstall.py @@ -6,20 +6,16 @@ Local configuration files were successfully updated.""" import os, re, sys prefix_pattern=re.compile("^prefix=.*") -exec_pattern=re.compile("^exec\s.*") def replace_prefix(s): if prefix_pattern.match(s): s='prefix='+sys.prefix.replace("\\","\\\\")+'\n' - if exec_pattern.match(s): - s=('exec '+sys.prefix+'\\python.exe '+ - '$codegendir/codegen.py \"$@\"\n').replace("\\","\\\\") return s if len(sys.argv) == 2 and sys.argv[1] == "-install": - filenames=['lib/pkgconfig/pygtk-2.0.pc','bin/pygtk-codegen-2.0'] + filenames=['lib/pkgconfig/pygobject-2.0.pc'] for filename in filenames: pkgconfig_file = os.path.normpath( os.path.join(sys.prefix,filename)) diff --git a/setup.py b/setup.py index 2aaaadf..3cced9f 100755 --- a/setup.py +++ b/setup.py @@ -105,7 +105,7 @@ PyGObjectBuild.user_options.append(('enable-threading', None, 'enable threading support')) # GObject -gobject = PkgConfigExtension(name='_gobject', pkc_name='gobject-2.0', +gobject = PkgConfigExtension(name='gobject._gobject', pkc_name='gobject-2.0', pkc_version=GOBJECT_REQUIRED, pygobject_pkc=None, sources=['gobject/gobjectmodule.c', @@ -115,6 +115,8 @@ gobject = PkgConfigExtension(name='_gobject', pkc_name='gobject-2.0', 'gobject/pygobject.c', 'gobject/pygmaincontext.c', 'gobject/pygmainloop.c', + 'gobject/pygoptioncontext.c', + 'gobject/pygoptiongroup.c', 'gobject/pygparamspec.c', 'gobject/pygpointer.c', 'gobject/pygtype.c', @@ -126,6 +128,7 @@ data_files = [] ext_modules = [] py_modules = [] py_modules.append('dsextras') +py_modules.append('gobject.option') if not have_pkgconfig(): print "Error, could not find pkg-config" @@ -177,7 +180,7 @@ doclines = __doc__.split("\n") options = {"bdist_wininst": {"install_script": "pygobject_postinstall.py"}} -setup(name="pygtk", +setup(name="pygobject", url='http://www.pygtk.org/', version=VERSION, license='LGPL', -- cgit