added patch-python26

This commit is contained in:
Yuta
2011-05-02 17:30:59 +09:00
parent 3bc8c36aaa
commit 20027a4a36
19 changed files with 221 additions and 83 deletions
@@ -0,0 +1,3 @@
g/defined(__APPLE__)/s//0/g
w
@@ -0,0 +1,3 @@
g/'darwin', /s///
w
@@ -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/python2.6
-# 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.
@@ -0,0 +1,11 @@
--- Lib/ctypes/macholib/dyld.py.orig 2008-02-21 11:52:20.000000000 -0700
+++ Lib/ctypes/macholib/dyld.py 2009-10-11 02:42:21.000000000 -0600
@@ -26,7 +26,7 @@
DEFAULT_LIBRARY_FALLBACK = [
os.path.expanduser("~/lib"),
- "/usr/local/lib",
+ "@@PREFIX@@/lib",
"/lib",
"/usr/lib",
]
@@ -0,0 +1,51 @@
--- Lib/distutils/dist.py.orig 2008-09-03 05:13:56.000000000 -0600
+++ Lib/distutils/dist.py 2008-10-03 18:33:47.000000000 -0600
@@ -60,6 +60,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
@@ -267,6 +268,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()
# __init__ ()
@@ -327,6 +334,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()
@@ -347,7 +357,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
@@ -355,6 +365,8 @@
if os.path.isfile(local_file):
files.append(local_file)
+ if DEBUG:
+ print "using config files: %s" % ', '.join(files)
return files
# find_config_files ()
@@ -0,0 +1,20 @@
--- Mac/IDLE/Makefile.in.orig 2009-01-02 04:47:17.000000000 -0700
+++ Mac/IDLE/Makefile.in 2009-04-16 00:54:43.000000000 -0600
@@ -22,7 +22,7 @@
BUNDLEBULDER=$(srcdir)/../../Lib/plat-mac/bundlebuilder.py
-PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION)
+PYTHONAPPSDIR=@@APPLICATIONS_DIR@@/$(PYTHONFRAMEWORK) $(VERSION)
all: IDLE.app
@@ -42,7 +42,7 @@
$(srcdir)/../Icons/PythonSource.icns \
$(srcdir)/../Icons/PythonCompiled.icns Info.plist
rm -fr IDLE.app
- $(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(BUNDLEBULDER) \
+ PYTHONHOME=$(DESTDIR)$(prefix) $(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(BUNDLEBULDER) \
--builddir=. \
--name=IDLE \
--link-exec \
@@ -0,0 +1,20 @@
--- Mac/Makefile.in.orig 2009-03-30 13:58:41.000000000 -0600
+++ Mac/Makefile.in 2009-04-16 00:54:26.000000000 -0600
@@ -19,7 +19,7 @@
# These are normally glimpsed from the previous set
bindir=$(prefix)/bin
-PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION)
+PYTHONAPPSDIR=@@APPLICATIONS_DIR@@/$(PYTHONFRAMEWORK) $(VERSION)
APPINSTALLDIR=$(prefix)/Resources/Python.app
# Variables for installing the "normal" unix binaries
@@ -224,7 +224,7 @@
cd IDLE && make install
install_BuildApplet:
- $(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(srcdir)/scripts/BuildApplet.py \
+ PYTHONHOME=$(DESTDIR)$(prefix) $(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(srcdir)/scripts/BuildApplet.py \
--destroot "$(DESTDIR)" \
--python=$(prefix)/Resources/Python.app/Contents/MacOS/$(PYTHONFRAMEWORK)`test -f "$(DESTDIR)$(prefix)/Resources/Python.app/Contents/MacOS/$(PYTHONFRAMEWORK)-32" && echo "-32"` \
--output "$(DESTDIR)$(PYTHONAPPSDIR)/Build Applet.app" \
@@ -0,0 +1,25 @@
--- Mac/PythonLauncher/Makefile.in.orig 2009-01-02 04:47:17.000000000 -0700
+++ Mac/PythonLauncher/Makefile.in 2009-04-16 00:55:11.000000000 -0600
@@ -1,3 +1,4 @@
+prefix=@prefix@
CC=@CC@
LD=@CC@
BASECFLAGS=@BASECFLAGS@
@@ -21,7 +22,7 @@
BUNDLEBULDER=$(srcdir)/../../Lib/plat-mac/bundlebuilder.py
-PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION)
+PYTHONAPPSDIR=@@APPLICATIONS_DIR@@/$(PYTHONFRAMEWORK) $(VERSION)
OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o
all: Python\ Launcher.app
@@ -42,7 +43,7 @@
$(srcdir)/../Icons/PythonCompiled.icns \
$(srcdir)/factorySettings.plist
rm -fr "Python Launcher.app"
- $(RUNSHARED) $(BUILDPYTHON) $(BUNDLEBULDER) \
+ PYTHONHOME=$(DESTDIR)$(prefix) $(RUNSHARED) $(BUILDPYTHON) $(BUNDLEBULDER) \
--builddir=. \
--name="Python Launcher" \
--executable="Python Launcher" \
@@ -0,0 +1,11 @@
--- Mac/Tools/Doc/setup.py.diff 2008-03-29 09:24:25.000000000 -0600
+++ Mac/Tools/Doc/setup.py 2008-10-04 19:53:40.000000000 -0600
@@ -30,7 +30,7 @@
MAJOR_VERSION='2.4'
MINOR_VERSION='2.4.1'
-DESTDIR='/Applications/MacPython-%s/PythonIDE.app/Contents/Resources/English.lproj/PythonDocumentation' % MAJOR_VERSION
+DESTDIR='@@APPLICATIONS_DIR@@/MacPython-%s/PythonIDE.app/Contents/Resources/English.lproj/PythonDocumentation' % MAJOR_VERSION
class DocBuild(build):
def initialize_options(self):
@@ -0,0 +1,11 @@
--- setup.py.orig 2010-10-19 22:33:25.000000000 +0200
+++ setup.py 2010-10-19 22:33:54.000000000 +0200
@@ -799,7 +799,7 @@
# BerkeleyDB 4.6.x is not stable on many architectures.
arch = platform_machine()
if arch not in ('i386', 'i486', 'i586', 'i686',
- 'x86_64', 'ia64'):
+ 'x86_64', 'ia64', 'Power Macintosh'):
return False
return True
@@ -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