[71167] trunk/dports/lang

jwa at macports.org jwa at macports.org
Fri Sep 3 09:08:47 PDT 2010


Revision: 71167
          http://trac.macports.org/changeset/71167
Author:   jwa at macports.org
Date:     2010-09-03 09:08:47 -0700 (Fri, 03 Sep 2010)
Log Message:
-----------
New port: Python 3.2 in alpha 1

Added Paths:
-----------
    trunk/dports/lang/python32/
    trunk/dports/lang/python32/files/
    trunk/dports/lang/python32/files/patch-Lib-cgi.py.diff
    trunk/dports/lang/python32/files/patch-Lib-distutils-dist.py.diff
    trunk/dports/lang/python32/files/patch-Makefile.pre.in.diff
    trunk/dports/lang/python32/files/patch-configure-arch_only.diff
    trunk/dports/lang/python32/files/patch-setup.py.diff
    trunk/dports/lang/python32/files/patch-setup_no_tkinter.py.diff
    trunk/dports/lang/python32/files/pyconfig.ed
    trunk/dports/lang/python32/files/python32
    trunk/dports/lang/python32/files/version.plist

Added: trunk/dports/lang/python32/files/patch-Lib-cgi.py.diff
===================================================================
--- trunk/dports/lang/python32/files/patch-Lib-cgi.py.diff	                        (rev 0)
+++ trunk/dports/lang/python32/files/patch-Lib-cgi.py.diff	2010-09-03 16:08:47 UTC (rev 71167)
@@ -0,0 +1,18 @@
+--- Lib/cgi.py.orig	2006-08-10 19:41:07.000000000 +0200
++++ Lib/cgi.py	2007-08-21 15:36:54.000000000 +0200
+@@ -1,13 +1,6 @@
+-#! /usr/local/bin/python
++#! @@PREFIX@@/bin/python3.2
+ 
+-# NOTE: the above "/usr/local/bin/python" is NOT a mistake.  It is
+-# intentionally NOT "/usr/bin/env python".  On many systems
+-# (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI
+-# scripts, and /usr/local/bin is the default directory where Python is
+-# installed, so /usr/bin/env would be unable to find python.  Granted,
+-# binary installations by Linux vendors often install Python in
+-# /usr/bin.  So let those vendors patch cgi.py to match their choice
+-# of installation.
++# NOTE: /usr/local/bin/python patched for MacPorts installation
+ 
+ """Support module for CGI (Common Gateway Interface) scripts.
+ 

Added: trunk/dports/lang/python32/files/patch-Lib-distutils-dist.py.diff
===================================================================
--- trunk/dports/lang/python32/files/patch-Lib-distutils-dist.py.diff	                        (rev 0)
+++ trunk/dports/lang/python32/files/patch-Lib-distutils-dist.py.diff	2010-09-03 16:08:47 UTC (rev 71167)
@@ -0,0 +1,51 @@
+--- Lib/distutils/dist.py.orig	2008-07-26 16:09:45.000000000 -0400
++++ Lib/distutils/dist.py	2009-01-31 11:37:17.000000000 -0500
+@@ -54,6 +54,7 @@
+                       ('quiet', 'q', "run quietly (turns verbosity off)"),
+                       ('dry-run', 'n', "don't actually do anything"),
+                       ('help', 'h', "show detailed help message"),
++                      ('no-user-cfg', None,'ignore pydistutils.cfg in your home directory'),
+                      ]
+ 
+     # 'common_usage' is a short (2-3 line) string describing the common
+@@ -260,6 +261,12 @@
+                     else:
+                         sys.stderr.write(msg + "\n")
+ 
++        # no-user-cfg is handled before other command line args
++        # because other args override the config files, and this
++        # one is needed before we can load the config files.
++        # If attrs['script_args'] wasn't passed, assume false.
++        self.want_user_cfg = '--no-user-cfg' not in (self.script_args or [])
++
+         self.finalize_options()
+ 
+     def get_option_dict(self, command):
+@@ -315,6 +322,9 @@
+         Distutils __inst__.py file lives), a file in the user's home
+         directory named .pydistutils.cfg on Unix and pydistutils.cfg
+         on Windows/Mac, and setup.cfg in the current directory.
++
++        The file in the user's home directory can be disabled with the
++        --no-user-cfg option.
+         """
+         files = []
+         check_environ()
+@@ -335,7 +345,7 @@
+ 
+         # And look for the user config file
+         user_file = os.path.join(os.path.expanduser('~'), user_filename)
+-        if os.path.isfile(user_file):
++        if self.want_user_cfg and os.path.isfile(user_file):
+             files.append(user_file)
+ 
+         # All platforms support local setup.cfg
+@@ -343,6 +353,8 @@
+         if os.path.isfile(local_file):
+             files.append(local_file)
+ 
++        if DEBUG:
++            print("using config files: %s" % ', '.join(files))
+         return files
+ 
+     def parse_config_files(self, filenames=None):

Added: trunk/dports/lang/python32/files/patch-Makefile.pre.in.diff
===================================================================
--- trunk/dports/lang/python32/files/patch-Makefile.pre.in.diff	                        (rev 0)
+++ trunk/dports/lang/python32/files/patch-Makefile.pre.in.diff	2010-09-03 16:08:47 UTC (rev 71167)
@@ -0,0 +1,15 @@
+--- Makefile.pre.in.orig	2009-06-11 17:54:11.000000000 -0500
++++ Makefile.pre.in	2009-06-30 06:31:51.000000000 -0500
+@@ -463,10 +463,10 @@
+ 			-install_name $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) \
+ 			-compatibility_version $(VERSION) \
+ 			-current_version $(VERSION) \
+-			-framework CoreFoundation $(LIBS); \
++			-framework CoreFoundation $(LIBS) $(LDFLAGS); \
+         else \
+ 		/usr/bin/libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) \
+-			@LIBTOOL_CRUFT@ -framework CoreFoundation $(LIBS);\
++			@LIBTOOL_CRUFT@ -framework CoreFoundation $(LIBS) $(LDFLAGS);\
+ 	fi
+ 	$(INSTALL) -d -m $(DIRMODE)  \
+ 		$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj

Added: trunk/dports/lang/python32/files/patch-configure-arch_only.diff
===================================================================
--- trunk/dports/lang/python32/files/patch-configure-arch_only.diff	                        (rev 0)
+++ trunk/dports/lang/python32/files/patch-configure-arch_only.diff	2010-09-03 16:08:47 UTC (rev 71167)
@@ -0,0 +1,20 @@
+--- configure.orig	2009-06-09 07:22:57.000000000 +1000
++++ configure	2009-09-01 08:21:21.000000000 +1000
+@@ -13255,7 +13255,7 @@
+     if test "${enable_universalsdk}"; then
+ 	    :
+     else
+-        LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
++        LIBTOOL_CRUFT="${LIBTOOL_CRUFT}"
+     fi
+     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
+@@ -13267,7 +13267,7 @@
+ 	#ARCH_RUN_32BIT="true"
+     fi
+ 
+-    LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
++    LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs"
+     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
+ esac

Added: trunk/dports/lang/python32/files/patch-setup.py.diff
===================================================================
--- trunk/dports/lang/python32/files/patch-setup.py.diff	                        (rev 0)
+++ trunk/dports/lang/python32/files/patch-setup.py.diff	2010-09-03 16:08:47 UTC (rev 71167)
@@ -0,0 +1,53 @@
+--- setup.py.orig	2009-05-24 03:13:14.000000000 +1000
++++ setup.py	2009-09-03 13:51:47.000000000 +1000
+@@ -1265,7 +1265,7 @@
+         # For 8.4a2, the X11 headers are not included. Rather than include a
+         # complicated search, this is a hard-coded path. It could bail out
+         # if X11 libs are not found...
+-        include_dirs.append('/usr/X11R6/include')
++        #include_dirs.append('/usr/X11R6/include')
+         frameworks = ['-framework', 'Tcl', '-framework', 'Tk']
+ 
+         # All existing framework builds of Tcl/Tk don't support 64-bit
+@@ -1300,13 +1300,7 @@
+     def detect_tkinter(self, inc_dirs, lib_dirs):
+         # The _tkinter module.
+ 
+-        # 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
+ 
+         # Assume we haven't found any of the libraries or include files
+         # The versions with dots are used on Unix, and the versions without
+@@ -1354,17 +1348,17 @@
+         if platform == 'sunos5':
+             include_dirs.append('/usr/openwin/include')
+             added_lib_dirs.append('/usr/openwin/lib')
+-        elif os.path.exists('/usr/X11R6/include'):
+-            include_dirs.append('/usr/X11R6/include')
+-            added_lib_dirs.append('/usr/X11R6/lib64')
+-            added_lib_dirs.append('/usr/X11R6/lib')
+-        elif os.path.exists('/usr/X11R5/include'):
+-            include_dirs.append('/usr/X11R5/include')
+-            added_lib_dirs.append('/usr/X11R5/lib')
+-        else:
++        #elif os.path.exists('/usr/X11R6/include'):
++        #    include_dirs.append('/usr/X11R6/include')
++        #    added_lib_dirs.append('/usr/X11R6/lib64')
++        #    added_lib_dirs.append('/usr/X11R6/lib')
++        #elif os.path.exists('/usr/X11R5/include'):
++        #    include_dirs.append('/usr/X11R5/include')
++        #    added_lib_dirs.append('/usr/X11R5/lib')
++        #else:
+             # Assume default location for X11
+-            include_dirs.append('/usr/X11/include')
+-            added_lib_dirs.append('/usr/X11/lib')
++        #    include_dirs.append('/usr/X11/include')
++        #    added_lib_dirs.append('/usr/X11/lib')
+ 
+         # If Cygwin, then verify that X is installed before proceeding
+         if platform == 'cygwin':

Added: trunk/dports/lang/python32/files/patch-setup_no_tkinter.py.diff
===================================================================
--- trunk/dports/lang/python32/files/patch-setup_no_tkinter.py.diff	                        (rev 0)
+++ trunk/dports/lang/python32/files/patch-setup_no_tkinter.py.diff	2010-09-03 16:08:47 UTC (rev 71167)
@@ -0,0 +1,11 @@
+--- setup.py.orig	2009-03-31 12:20:48.000000000 -0600
++++ setup.py	2009-09-17 00:33:12.000000000 -0600
+@@ -17,7 +17,7 @@
+ from distutils.command.install_lib import install_lib
+ 
+ # This global variable is used to hold the list of modules to be disabled.
+-disabled_module_list = []
++disabled_module_list = ["_tkinter"]
+ 
+ def add_dir_to_list(dirlist, dir):
+     """Add the directory 'dir' to the list 'dirlist' (at the front) if

Added: trunk/dports/lang/python32/files/pyconfig.ed
===================================================================
--- trunk/dports/lang/python32/files/pyconfig.ed	                        (rev 0)
+++ trunk/dports/lang/python32/files/pyconfig.ed	2010-09-03 16:08:47 UTC (rev 71167)
@@ -0,0 +1,2 @@
+g,.*\(HAVE_POLL[_A-Z]*\).*,s,,/* #undef \1 */,
+w

Added: trunk/dports/lang/python32/files/python32
===================================================================
--- trunk/dports/lang/python32/files/python32	                        (rev 0)
+++ trunk/dports/lang/python32/files/python32	2010-09-03 16:08:47 UTC (rev 71167)
@@ -0,0 +1,12 @@
+bin/python3.2
+bin/pythonw3.2
+bin/python-config3.2
+bin/idle3.2
+bin/pydoc3.2
+bin/smtpd3.2.py
+-
+share/man/man1/python3.2a1.gz
+${frameworks_dir}/Python.framework/Versions/3.2
+${frameworks_dir}/Python.framework/Versions/3.2/Headers
+${frameworks_dir}/Python.framework/Versions/3.2/Resources
+${frameworks_dir}/Python.framework/Versions/3.2/Python

Added: trunk/dports/lang/python32/files/version.plist
===================================================================
--- trunk/dports/lang/python32/files/version.plist	                        (rev 0)
+++ trunk/dports/lang/python32/files/version.plist	2010-09-03 16:08:47 UTC (rev 71167)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>BuildVersion</key>
+	<string>1</string>
+	<key>CFBundleShortVersionString</key>
+	<string>3.2a1</string>
+	<key>CFBundleVersion</key>
+	<string>3.2a1</string>
+	<key>ProjectName</key>
+	<string>Python</string>
+	<key>SourceVersion</key>
+	<string>3.2a1</string>
+</dict>
+</plist>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100903/8cbc4043/attachment-0001.html>


More information about the macports-changes mailing list