From: Jason Tishler Date: Wed, 14 Aug 2002 11:13:52 +0000 (+0000) Subject: Patch #588564: _locale library patch X-Git-Tag: v2.3c1~4482 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d28216b279743ed680d84fe37da190e9754e6be4;p=python Patch #588564: _locale library patch This patch enables setup.py to find gettext routines when they are located in libintl instead of libc. Although I developed this patch for Cygwin, I hope that it can be easily updated to support other platforms (if necessary). I tested this patch under Cygwin and Red Hat Linux 7.1. --- diff --git a/setup.py b/setup.py index bad5130417..03a5c20e71 100644 --- a/setup.py +++ b/setup.py @@ -302,7 +302,12 @@ class PyBuildExt(build_ext): if have_unicode: exts.append( Extension('unicodedata', ['unicodedata.c']) ) # access to ISO C locale support - exts.append( Extension('_locale', ['_localemodule.c']) ) + if platform in ['cygwin']: + locale_libs = ['intl'] + else: + locale_libs = [] + exts.append( Extension('_locale', ['_localemodule.c'], + libraries=locale_libs ) ) # Modules with some UNIX dependencies -- on by default: # (If you have a really backward UNIX, select and socket may not be