[Pythonmac-SIG] Can't build 2.4.3 against X11 Tcl/Tk

Kevin Walzer kw at kevin-walzer.com
Sun Jun 18 15:54:22 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ronald Oussoren wrote:
> 

> For 2.5 --universalsdk also works for normal unix builds and I don't
> think I changed anything substantial for that.
> 
> Are you (Kevin) sure that the build picks up the right copy of tcl/tk?
> /usr/local/tcl-tk-unix/ isn't on the default search path and setup.py
> ignores extra CFLAGS and LDFLAGS when looking for libraries.
> 
> 

Why does it ignore extra CFLAGS and LDFLAGS? I see code in def
detect_modules in setup.py that seems to register the extra flags:

if platform == 'darwin':
            # Actually any unix-y platform will do :-)
            # This picks up additional library and include directories
            # from the user-specified CFLAGS.
            # XXX: shouldn't this be in distutils?
            opt, = sysconfig.get_config_vars('OPT')
            cppflags, = sysconfig.get_config_vars('CPPFLAGS')
            for item in (opt.split() + cppflags.split()):
                if item.startswith('-I'):
                    inc_dirs.append(item[2:])
            ldflags, = sysconfig.get_config_vars('LDFLAGS')
            for item in ldflags.split():
                if item.startswith('-L'):
                    lib_dirs.append(item[2:])

However, in light of what you've said, I've hacked the universal
setup.py with some code from the current 2.4.3 setup.py that hard-codes
some additional search paths for my specialized stuff (derived from code
that searches for Fink and DarwinPorts):

 if sys.platform == "darwin":
            # kevin's custom build of tcl/tk installs
            add_dir_to_list(self.compiler.library_dirs,
'/usr/local/tcl-tk-unix/lib')
            add_dir_to_list(self.compiler.include_dirs,
'/usr/local/tcl-tk-unix/include')


I will report back if this works.

- --
Kevin Walzer
Poetic Code
http://www.kevin-walzer.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFElVsNrTC5hIgjqTMRAnH9AJ9c7G3sE0yyWPMGX2wdPw/wfnA3NQCglJpy
x89aLcnjn9B6kJscmt3eIVU=
=t4v3
-----END PGP SIGNATURE-----


More information about the Pythonmac-SIG mailing list