The attached python.patch file fixes a problem with python-2.4.3
which we have been using in a hybrid Release 2.5 system, and
fixes a problem in the setup.py file that prevented the tkinter
extension from building.  It simply sets dotversion to blank in
the section where setup.py is looking for the tcl and tk headers.

A more general fix that would require less fiddling with programs
that expect the tcl and tk include files to have the version
appended would be to make an appropriate symlink in the tcl
package:

        ln -s %{l_prefix}/include/tcl %{l_prefix}/include/tcl8.4

The naming in the tcl package now is inconsistent with the
version number appended to the %{l_prefix}/lib/tcl8.4 directory,
but not the %{l_prefix}/include/tcl directory.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Systems, Inc.
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``It will be of little avail to the people that the laws are made by men of
their own choice if the laws be so voluminous that they cannot be read, or
so incoherent that they cannot be understood.''
    -James Madison, Federalist Paper #62
diff -uNr ../python-2.4.3-20060330/Include/pyport.h ./Include/pyport.h
--- ../python-2.4.3-20060330/Include/pyport.h   2005-09-14 10:54:39.000000000 
-0700
+++ ./Include/pyport.h  2006-10-10 16:49:32.537152750 -0700
@@ -251,8 +251,12 @@
  * config to #define Py_HUGE_VAL to something that works on your platform.
  */
 #ifndef Py_HUGE_VAL
+#if defined (__SVR4) && defined (__sun)
+#define Py_HUGE_VAL HUGE
+#else
 #define Py_HUGE_VAL HUGE_VAL
 #endif
+#endif
 
 /* Py_OVERFLOWED(X)
  * Return 1 iff a libm function overflowed.  Set errno to 0 before calling
diff -uNr ../python-2.4.3-20060330/setup.py ./setup.py
--- ../python-2.4.3-20060330/setup.py   2006-03-23 11:07:46.000000000 -0800
+++ ./setup.py  2006-10-10 16:50:22.864298000 -0700
@@ -1006,6 +1006,9 @@
                 dotversion = dotversion[:-1] + '.' + dotversion[-1]
             tcl_include_sub = []
             tk_include_sub = []
+            # OpenPKG doesn't append version to include
+            # directory.
+            dotversion = ''
             for dir in inc_dirs:
                 tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
                 tk_include_sub += [dir + os.sep + "tk" + dotversion]

Reply via email to