[42841] trunk/dports/lang/python26

blb at macports.org blb at macports.org
Sun Nov 30 23:12:48 PST 2008


Revision: 42841
          http://trac.macports.org/changeset/42841
Author:   blb at macports.org
Date:     2008-11-30 23:12:48 -0800 (Sun, 30 Nov 2008)
Log Message:
-----------
lang/python26 - bring in all the split-out modules (bsddb, bz2, curses,
curses_panel, gdbm, hashlib, readline, sqlite3, ssl, and tkinter) back to the
port itself (yes, it does make it more dependency heavy) as people have
certain expectations of Python and what is available with it.  Also, when
using py-* modules to add them back in, they are placed in the site-packages
dir, which then excludes their use if python is run with -S (see ticket
#12369).

Fix an issue with the config/Makefile python installs, where LINKFORSHARED
is set to a value not usable (see ticket #15099).

Finally, remove a few patches which aren't used anymore.

Modified Paths:
--------------
    trunk/dports/lang/python26/Portfile
    trunk/dports/lang/python26/files/patch-setup.py.diff

Removed Paths:
-------------
    trunk/dports/lang/python26/files/patch-Misc-setuid-prog.c.diff
    trunk/dports/lang/python26/files/patch-Modules-posixmodule.c.diff
    trunk/dports/lang/python26/files/patch-configure.diff

Modified: trunk/dports/lang/python26/Portfile
===================================================================
--- trunk/dports/lang/python26/Portfile	2008-12-01 06:51:55 UTC (rev 42840)
+++ trunk/dports/lang/python26/Portfile	2008-12-01 07:12:48 UTC (rev 42841)
@@ -4,7 +4,7 @@
 
 name                    python26
 version                 2.6
-revision                4
+revision                5
 set major               [lindex [split $version .] 0]
 set branch              [join [lrange [split ${version} .] 0 1] .]
 categories              lang
@@ -47,7 +47,9 @@
                         patch-Mac-PythonLauncher-Makefile.in.diff \
                         patch-Mac-Tools-Doc-setup.py.diff
 
-depends_lib             port:gettext  port:zlib
+depends_lib             port:gettext port:zlib port:openssl port:tk \
+                        port:sqlite3 port:db46 port:ncurses port:gdbm \
+                        port:bzip2 port:readline
 
 configure.args          --enable-shared \
                         --enable-framework=${frameworks_dir} \
@@ -87,13 +89,18 @@
    # install select file for python_select
    xinstall -m 755 -d ${destroot}${prefix}/etc/select/python
    xinstall -m 644 ${filespath}/${name} ${destroot}${prefix}/etc/select/python/
+
+   # Without this, LINKFORSHARED is set to 
+   # ... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
+   # which is bad (see ticket #15099); so instead we set -F to the right
+   # location then add '-framework Python' here
+   reinplace "s|^\\(LINKFORSHARED=.*\\)\\\$(PYTHONFRAMEWORKDIR).*\$|\\1 -F${frameworks_dir} -framework Python|" ${destroot}${framewdir}/lib/python${branch}/config/Makefile
 }
 
 post-activate {
    ui_msg "\nTo fully complete your installation and make python $branch the default, please run
 \n\tsudo port install python_select \
 \n\tsudo python_select $name\n"
-   ui_msg "The program IDLE will not run until py26-tkinter is installed.\n"
 }
 
 platform darwin 7 {

Deleted: trunk/dports/lang/python26/files/patch-Misc-setuid-prog.c.diff
===================================================================
--- trunk/dports/lang/python26/files/patch-Misc-setuid-prog.c.diff	2008-12-01 06:51:55 UTC (rev 42840)
+++ trunk/dports/lang/python26/files/patch-Misc-setuid-prog.c.diff	2008-12-01 07:12:48 UTC (rev 42841)
@@ -1,16 +0,0 @@
---- Misc/setuid-prog.c.orig	Sat Dec 11 14:29:22 2004
-+++ Misc/setuid-prog.c	Sat Dec 11 14:30:13 2004
-@@ -70,6 +70,12 @@
- #define environ _environ
- #endif
- 
-+#if defined(__APPLE__)
-+#include <sys/time.h>
-+#include <crt_externs.h>
-+#define environ (*_NSGetEnviron())
-+#endif
-+
- /* don't change def_IFS */
- char def_IFS[] = "IFS= \t\n";
- /* you may want to change def_PATH, but you should really change it in */
-

Deleted: trunk/dports/lang/python26/files/patch-Modules-posixmodule.c.diff
===================================================================
--- trunk/dports/lang/python26/files/patch-Modules-posixmodule.c.diff	2008-12-01 06:51:55 UTC (rev 42840)
+++ trunk/dports/lang/python26/files/patch-Modules-posixmodule.c.diff	2008-12-01 07:12:48 UTC (rev 42841)
@@ -1,21 +0,0 @@
---- Modules/posixmodule.c.orig	Sat Dec 11 14:27:52 2004
-+++ Modules/posixmodule.c	Sat Dec 11 14:28:17 2004
-@@ -339,7 +339,7 @@
- #endif
- 
- /* Return a dictionary corresponding to the POSIX environment table */
--#ifdef WITH_NEXT_FRAMEWORK
-+#ifdef __APPLE__
- /* On Darwin/MacOSX a shared library or framework has no access to
- ** environ directly, we must obtain it with _NSGetEnviron().
- */
-@@ -357,7 +357,7 @@
- 	d = PyDict_New();
- 	if (d == NULL)
- 		return NULL;
--#ifdef WITH_NEXT_FRAMEWORK
-+#ifdef __APPLE__
- 	if (environ == NULL)
- 		environ = *_NSGetEnviron();
- #endif
-

Deleted: trunk/dports/lang/python26/files/patch-configure.diff
===================================================================
--- trunk/dports/lang/python26/files/patch-configure.diff	2008-12-01 06:51:55 UTC (rev 42840)
+++ trunk/dports/lang/python26/files/patch-configure.diff	2008-12-01 07:12:48 UTC (rev 42841)
@@ -1,28 +0,0 @@
---- configure.in.orig	2007-09-28 21:07:32.000000000 +0200
-+++ configure.in	2007-09-28 21:08:12.000000000 +0200
-@@ -669,6 +669,11 @@
- 	  BLDLIBRARY='-L. -lpython$(VERSION)'
- 	  RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
- 	  ;;
-+	Darwin*)
-+	  LDLIBRARY='libpython$(VERSION).dylib'
-+	  BLDLIBRARY='-L. -lpython$(VERSION)'
-+	  RUNSHARED=DYLD_LIBRARY_PATH="`pwd`:${DYLD_LIBRARY_PATH}"
-+	  ;;
-   esac
- else # shared is disabled
-   case $ac_sys_system in
---- configure.orig	2007-09-28 21:07:26.000000000 +0200
-+++ configure	2007-09-28 21:07:33.000000000 +0200
-@@ -3445,6 +3445,11 @@
- 	  BLDLIBRARY='-L. -lpython$(VERSION)'
- 	  RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
- 	  ;;
-+	Darwin*)
-+	  LDLIBRARY='libpython$(VERSION).dylib'
-+	  BLDLIBRARY='-L. -lpython$(VERSION)'
-+	  RUNSHARED=DYLD_LIBRARY_PATH="`pwd`:${DYLD_LIBRARY_PATH}"
-+	  ;;
-   esac
- else # shared is disabled
-   case $ac_sys_system in

Modified: trunk/dports/lang/python26/files/patch-setup.py.diff
===================================================================
--- trunk/dports/lang/python26/files/patch-setup.py.diff	2008-12-01 06:51:55 UTC (rev 42840)
+++ trunk/dports/lang/python26/files/patch-setup.py.diff	2008-12-01 07:12:48 UTC (rev 42841)
@@ -1,11 +1,16 @@
---- setup.py	2006-08-10 01:42:18.000000000 +0200
-+++ setup.py	2007-02-17 16:57:24.000000000 +0100
-@@ -15,7 +15,7 @@
- from distutils.command.install_lib import install_lib
+--- setup.py.orig	2008-09-29 18:15:45.000000000 -0600
++++ setup.py	2008-11-30 23:13:09.000000000 -0700
+@@ -1506,13 +1506,7 @@
+     def detect_tkinter(self, inc_dirs, lib_dirs):
+         # The _tkinter module.
  
- # This global variable is used to hold the list of modules to be disabled.
--disabled_module_list = []
-+disabled_module_list = ["_hashlib","_ssl","_bsddb","_sqlite3","_tkinter","bz2","gdbm","readline","_curses","_curses_panel"]
+-        # Rather than complicate the code below, detecting and building
+-        # AquaTk is a separate method. Only one Tkinter will be built on
+-        # Darwin - either AquaTk, if it is found, or X11 based Tk.
+         platform = self.get_platform()
+-        if (platform == 'darwin' and
+-            self.detect_tkinter_darwin(inc_dirs, lib_dirs)):
+-            return
  
- def add_dir_to_list(dirlist, dir):
-     """Add the directory 'dir' to the list 'dirlist' (at the front) if
+         # Assume we haven't found any of the libraries or include files
+         # The versions with dots are used on Unix, and the versions without
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081130/7b080f5c/attachment.html>


More information about the macports-changes mailing list