, added patch-gestaltmodule.c.diff

This commit is contained in:
utahta
2010-11-21 18:23:42 +09:00
parent c5f31138c1
commit 88157a4a96
78 changed files with 46 additions and 4520 deletions
@@ -1,11 +0,0 @@
K 25
svn:wc:ra_dav:version-url
V 62
/repository/macports/!svn/ver/69520/trunk/dports/lang/python25
END
Portfile
K 25
svn:wc:ra_dav:version-url
V 71
/repository/macports/!svn/ver/69520/trunk/dports/lang/python25/Portfile
END
@@ -1,65 +0,0 @@
10
dir
73426
http://svn.macports.org/repository/macports/trunk/dports/lang/python25
http://svn.macports.org/repository/macports
2010-07-08T20:19:52.476265Z
69520
jmr@macports.org
d073be05-634f-4543-b044-5fe20cf6d1d6
files
dir
Portfile
file
2010-11-13T11:26:29.000000Z
ca4390c343e6a0ff2dff18fd4e3cc961
2010-07-08T20:19:52.476265Z
69520
jmr@macports.org
has-props
7650
@@ -1,9 +0,0 @@
K 13
svn:eol-style
V 6
native
K 12
svn:keywords
V 2
Id
END
@@ -1,194 +0,0 @@
# $Id$
PortSystem 1.0
PortGroup select 1.0
name python25
version 2.5.5
revision 1
set branch [join [lrange [split ${version} .] 0 1] .]
categories lang
platforms darwin
maintainers jwa openmaintainer
description An interpreted, object-oriented programming language
long_description Python is an interpreted, interactive, object-oriented \
programming language.
homepage http://www.python.org/
master_sites http://ftp.python.org/ftp/python/${version}/
distname Python-${version}
use_bzip2 yes
checksums md5 1d00e2fb19418e486c30b850df625aa3 \
sha1 dcf1abd94a1ab4155dcd3668cca42c5bfc81159f \
rmd160 4754238d415142466778560d989582464385654c
# patch-Lib-distutils-dist.py.diff comes from
# <http://bugs.python.org/issue1180>
patchfiles patch-Makefile.pre.in.diff \
patch-Lib-cgi.py.diff \
patch-Lib-distutils-dist.py.diff \
patch-setup.py.diff \
patch-configure-badcflags.diff \
patch-configure-arch_only.diff \
patch-64bit.diff
depends_lib port:gettext port:zlib port:openssl port:tk \
port:sqlite3 port:db46 port:bzip2 \
port:gdbm port:readline port:ncurses
configure.args --enable-shared \
--enable-framework=${frameworks_dir} \
--mandir=${prefix}/share/man \
--enable-ipv6 \
--with-cxx=${configure.cxx}
configure.cppflags-append -I${prefix}/include/ncurses
post-patch {
reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py \
${worksrcpath}/setup.py
reinplace "s|/Applications/MacPython|${applications_dir}/MacPython|g" \
${worksrcpath}/Mac/Makefile.in \
${worksrcpath}/Mac/IDLE/Makefile.in \
${worksrcpath}/Mac/Tools/Doc/setup.py \
${worksrcpath}/Mac/PythonLauncher/Makefile.in \
${worksrcpath}/Mac/BuildScript/build-installer.py
reinplace "s|xargs -0 rm -r|xargs -0 rm -rf|g" \
${worksrcpath}/Mac/PythonLauncher/Makefile.in
}
build.target all
# TODO: From python24, do we still need this?
# Workaround for case-sensitive file systems
post-build {
if { ![file exists ${worksrcpath}/python.exe] } {
ln -s python ${worksrcpath}/python.exe
}
}
test.run yes
test.target test
destroot.target frameworkinstall maninstall
# ensure that correct compiler is used
build.args-append MAKE="${build.cmd}" CC="${configure.cc}"
destroot.args-append MAKE="${destroot.cmd}" CC="${configure.cc}"
select.group python
select.file ${filespath}/python[string map {. {}} ${branch}]
platform macosx {
post-destroot {
set framewpath ${frameworks_dir}/Python.framework
set framewdir ${framewpath}/Versions/${branch}
# Without this, LINKFORSHARED is set to
# ... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
# (this becomes Python.framework/Versions/2.5/Python) which doesn't
# quite work (see ticket #15099); instead specifically list the
# full path to the proper Python framework file (which becomes
# ${prefix}/Library/Frameworks/Python.framework/Versions/2.5/Python)
reinplace {s|^\(LINKFORSHARED=.*\)$(PYTHONFRAMEWORKDIR).*$|\1 $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)|} ${destroot}${framewdir}/lib/python${branch}/config/Makefile
foreach dir { lib include } {
file rename ${destroot}${framewdir}/${dir}/python${branch} ${destroot}${prefix}/${dir}
ln -s ${prefix}/${dir}/python${branch} ${destroot}${framewdir}/${dir}/python${branch}
}
ln -s ${prefix}/share ${destroot}${framewdir}/share
ln -s ${framewdir}/Python ${destroot}${prefix}/lib/libpython${branch}.dylib
file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python${branch}.1
# delete symlinks without version suffix, use python_select instead to choose version
foreach bin { python pythonw idle pydoc smtpd.py python-config } {
file delete ${destroot}${prefix}/bin/${bin}
}
foreach bin [list python${branch} pythonw${branch} idle${branch} pydoc${branch} smtpd${branch}.py python${branch}-config] {
file rename -force ${destroot}${framewdir}/bin/${bin} ${destroot}${prefix}/bin
ln -s ${prefix}/bin/${bin} ${destroot}${framewdir}/bin/${bin}
}
foreach dir { Headers Resources Python Versions/Current } {
file delete ${destroot}${framewpath}/${dir}
}
# Fix incorrectly-pointed libpython2.5.a symlink, see
# http://trac.macports.org/ticket/19906
set python_staticlink ${destroot}${prefix}/lib/python${branch}/config/libpython${branch}.a
file delete ${python_staticlink}
ln -s ${framewdir}/Python ${python_staticlink}
}
}
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"
}
platform darwin {
post-configure {
# See http://trac.macports.org/ticket/18376
system "cd ${worksrcpath} && ed - pyconfig.h < ${filespath}/pyconfig.ed"
}
}
platform darwin 8 {
patchfiles-append patch-FSIORefNum.diff
}
platform darwin 9 {
configure.cppflags-append -D__DARWIN_UNIX03
}
platform darwin 10 {
configure.cppflags-append -D_DARWIN_C_SOURCE
patchfiles-append patch-pyconfig.h.in.diff
}
platform puredarwin {
patchfiles-append patch-Modules-posixmodule.c.diff
configure.args-delete --enable-framework=${frameworks_dir}
configure.args-append --disable-toolbox-glue --disable-framework
destroot.target install maninstall
post-build {
# thin dynamic library to have the same arch as static lib, even after -lSystemStubs
system "lipo ${worksrcpath}/libpython${branch}.dylib -output ${worksrcpath}/libpython${branch}.dylib -thin `lipo -info ${worksrcpath}/libpython${branch}.a | tail -n 1 | sed -e 's/.*architecture: \\(.*\\)/\\1/'`"
}
post-destroot {
# delete symlinks without version suffix, use python_select instead to choose version
foreach bin { python pythonw idle pydoc smtpd.py python-config } {
file delete ${destroot}${prefix}/bin/${bin}
}
file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python${branch}.1
# install select file for python_select
xinstall -m 755 -d ${destroot}${prefix}/etc/select/python
xinstall -m 644 ${filespath}/python[string map {. {}} ${branch}] ${destroot}${prefix}/etc/select/python/
}
}
configure.universal_archs i386 ppc
variant universal {
if {${configure.sdkroot} == ""} {
configure.args-append --enable-universalsdk=/
} else {
configure.args-append --enable-universalsdk=${configure.sdkroot}
}
}
livecheck.type regex
livecheck.url ${homepage}download/releases/
livecheck.regex Python (${branch}.\[0-9\]+)
-194
View File
@@ -1,194 +0,0 @@
# $Id: Portfile 69520 2010-07-08 20:19:52Z jmr@macports.org $
PortSystem 1.0
PortGroup select 1.0
name python25
version 2.5.5
revision 1
set branch [join [lrange [split ${version} .] 0 1] .]
categories lang
platforms darwin
maintainers jwa openmaintainer
description An interpreted, object-oriented programming language
long_description Python is an interpreted, interactive, object-oriented \
programming language.
homepage http://www.python.org/
master_sites http://ftp.python.org/ftp/python/${version}/
distname Python-${version}
use_bzip2 yes
checksums md5 1d00e2fb19418e486c30b850df625aa3 \
sha1 dcf1abd94a1ab4155dcd3668cca42c5bfc81159f \
rmd160 4754238d415142466778560d989582464385654c
# patch-Lib-distutils-dist.py.diff comes from
# <http://bugs.python.org/issue1180>
patchfiles patch-Makefile.pre.in.diff \
patch-Lib-cgi.py.diff \
patch-Lib-distutils-dist.py.diff \
patch-setup.py.diff \
patch-configure-badcflags.diff \
patch-configure-arch_only.diff \
patch-64bit.diff
depends_lib port:gettext port:zlib port:openssl port:tk \
port:sqlite3 port:db46 port:bzip2 \
port:gdbm port:readline port:ncurses
configure.args --enable-shared \
--enable-framework=${frameworks_dir} \
--mandir=${prefix}/share/man \
--enable-ipv6 \
--with-cxx=${configure.cxx}
configure.cppflags-append -I${prefix}/include/ncurses
post-patch {
reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py \
${worksrcpath}/setup.py
reinplace "s|/Applications/MacPython|${applications_dir}/MacPython|g" \
${worksrcpath}/Mac/Makefile.in \
${worksrcpath}/Mac/IDLE/Makefile.in \
${worksrcpath}/Mac/Tools/Doc/setup.py \
${worksrcpath}/Mac/PythonLauncher/Makefile.in \
${worksrcpath}/Mac/BuildScript/build-installer.py
reinplace "s|xargs -0 rm -r|xargs -0 rm -rf|g" \
${worksrcpath}/Mac/PythonLauncher/Makefile.in
}
build.target all
# TODO: From python24, do we still need this?
# Workaround for case-sensitive file systems
post-build {
if { ![file exists ${worksrcpath}/python.exe] } {
ln -s python ${worksrcpath}/python.exe
}
}
test.run yes
test.target test
destroot.target frameworkinstall maninstall
# ensure that correct compiler is used
build.args-append MAKE="${build.cmd}" CC="${configure.cc}"
destroot.args-append MAKE="${destroot.cmd}" CC="${configure.cc}"
select.group python
select.file ${filespath}/python[string map {. {}} ${branch}]
platform macosx {
post-destroot {
set framewpath ${frameworks_dir}/Python.framework
set framewdir ${framewpath}/Versions/${branch}
# Without this, LINKFORSHARED is set to
# ... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
# (this becomes Python.framework/Versions/2.5/Python) which doesn't
# quite work (see ticket #15099); instead specifically list the
# full path to the proper Python framework file (which becomes
# ${prefix}/Library/Frameworks/Python.framework/Versions/2.5/Python)
reinplace {s|^\(LINKFORSHARED=.*\)$(PYTHONFRAMEWORKDIR).*$|\1 $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)|} ${destroot}${framewdir}/lib/python${branch}/config/Makefile
foreach dir { lib include } {
file rename ${destroot}${framewdir}/${dir}/python${branch} ${destroot}${prefix}/${dir}
ln -s ${prefix}/${dir}/python${branch} ${destroot}${framewdir}/${dir}/python${branch}
}
ln -s ${prefix}/share ${destroot}${framewdir}/share
ln -s ${framewdir}/Python ${destroot}${prefix}/lib/libpython${branch}.dylib
file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python${branch}.1
# delete symlinks without version suffix, use python_select instead to choose version
foreach bin { python pythonw idle pydoc smtpd.py python-config } {
file delete ${destroot}${prefix}/bin/${bin}
}
foreach bin [list python${branch} pythonw${branch} idle${branch} pydoc${branch} smtpd${branch}.py python${branch}-config] {
file rename -force ${destroot}${framewdir}/bin/${bin} ${destroot}${prefix}/bin
ln -s ${prefix}/bin/${bin} ${destroot}${framewdir}/bin/${bin}
}
foreach dir { Headers Resources Python Versions/Current } {
file delete ${destroot}${framewpath}/${dir}
}
# Fix incorrectly-pointed libpython2.5.a symlink, see
# http://trac.macports.org/ticket/19906
set python_staticlink ${destroot}${prefix}/lib/python${branch}/config/libpython${branch}.a
file delete ${python_staticlink}
ln -s ${framewdir}/Python ${python_staticlink}
}
}
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"
}
platform darwin {
post-configure {
# See http://trac.macports.org/ticket/18376
system "cd ${worksrcpath} && ed - pyconfig.h < ${filespath}/pyconfig.ed"
}
}
platform darwin 8 {
patchfiles-append patch-FSIORefNum.diff
}
platform darwin 9 {
configure.cppflags-append -D__DARWIN_UNIX03
}
platform darwin 10 {
configure.cppflags-append -D_DARWIN_C_SOURCE
patchfiles-append patch-pyconfig.h.in.diff
}
platform puredarwin {
patchfiles-append patch-Modules-posixmodule.c.diff
configure.args-delete --enable-framework=${frameworks_dir}
configure.args-append --disable-toolbox-glue --disable-framework
destroot.target install maninstall
post-build {
# thin dynamic library to have the same arch as static lib, even after -lSystemStubs
system "lipo ${worksrcpath}/libpython${branch}.dylib -output ${worksrcpath}/libpython${branch}.dylib -thin `lipo -info ${worksrcpath}/libpython${branch}.a | tail -n 1 | sed -e 's/.*architecture: \\(.*\\)/\\1/'`"
}
post-destroot {
# delete symlinks without version suffix, use python_select instead to choose version
foreach bin { python pythonw idle pydoc smtpd.py python-config } {
file delete ${destroot}${prefix}/bin/${bin}
}
file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python${branch}.1
# install select file for python_select
xinstall -m 755 -d ${destroot}${prefix}/etc/select/python
xinstall -m 644 ${filespath}/python[string map {. {}} ${branch}] ${destroot}${prefix}/etc/select/python/
}
}
configure.universal_archs i386 ppc
variant universal {
if {${configure.sdkroot} == ""} {
configure.args-append --enable-universalsdk=/
} else {
configure.args-append --enable-universalsdk=${configure.sdkroot}
}
}
livecheck.type regex
livecheck.url ${homepage}download/releases/
livecheck.regex Python (${branch}.\[0-9\]+)
@@ -1,89 +0,0 @@
K 25
svn:wc:ra_dav:version-url
V 68
/repository/macports/!svn/ver/60380/trunk/dports/lang/python25/files
END
patch-Misc-setuid-prog.c.diff
K 25
svn:wc:ra_dav:version-url
V 98
/repository/macports/!svn/ver/34379/trunk/dports/lang/python25/files/patch-Misc-setuid-prog.c.diff
END
patch-FSIORefNum.diff
K 25
svn:wc:ra_dav:version-url
V 90
/repository/macports/!svn/ver/57516/trunk/dports/lang/python25/files/patch-FSIORefNum.diff
END
patch-Lib-cgi.py.diff
K 25
svn:wc:ra_dav:version-url
V 90
/repository/macports/!svn/ver/34379/trunk/dports/lang/python25/files/patch-Lib-cgi.py.diff
END
patch-configure-arch_only.diff
K 25
svn:wc:ra_dav:version-url
V 99
/repository/macports/!svn/ver/52864/trunk/dports/lang/python25/files/patch-configure-arch_only.diff
END
patch-Modules-posixmodule.c.diff
K 25
svn:wc:ra_dav:version-url
V 101
/repository/macports/!svn/ver/34379/trunk/dports/lang/python25/files/patch-Modules-posixmodule.c.diff
END
patch-Lib-distutils-dist.py.diff
K 25
svn:wc:ra_dav:version-url
V 101
/repository/macports/!svn/ver/42997/trunk/dports/lang/python25/files/patch-Lib-distutils-dist.py.diff
END
patch-configure.diff
K 25
svn:wc:ra_dav:version-url
V 89
/repository/macports/!svn/ver/34379/trunk/dports/lang/python25/files/patch-configure.diff
END
pyconfig.ed
K 25
svn:wc:ra_dav:version-url
V 80
/repository/macports/!svn/ver/60380/trunk/dports/lang/python25/files/pyconfig.ed
END
python25
K 25
svn:wc:ra_dav:version-url
V 77
/repository/macports/!svn/ver/50424/trunk/dports/lang/python25/files/python25
END
patch-configure-badcflags.diff
K 25
svn:wc:ra_dav:version-url
V 99
/repository/macports/!svn/ver/40837/trunk/dports/lang/python25/files/patch-configure-badcflags.diff
END
patch-Makefile.pre.in.diff
K 25
svn:wc:ra_dav:version-url
V 95
/repository/macports/!svn/ver/43000/trunk/dports/lang/python25/files/patch-Makefile.pre.in.diff
END
patch-setup.py.diff
K 25
svn:wc:ra_dav:version-url
V 88
/repository/macports/!svn/ver/57388/trunk/dports/lang/python25/files/patch-setup.py.diff
END
patch-64bit.diff
K 25
svn:wc:ra_dav:version-url
V 85
/repository/macports/!svn/ver/57388/trunk/dports/lang/python25/files/patch-64bit.diff
END
patch-pyconfig.h.in.diff
K 25
svn:wc:ra_dav:version-url
V 93
/repository/macports/!svn/ver/55669/trunk/dports/lang/python25/files/patch-pyconfig.h.in.diff
END
@@ -1,504 +0,0 @@
10
dir
73426
http://svn.macports.org/repository/macports/trunk/dports/lang/python25/files
http://svn.macports.org/repository/macports
2009-11-10T14:40:06.347802Z
60380
jmr@macports.org
d073be05-634f-4543-b044-5fe20cf6d1d6
patch-Misc-setuid-prog.c.diff
file
2010-11-13T11:26:29.000000Z
2bc1e6606dde7390fd8240b131bdf4ec
2008-02-22T23:26:05.539782Z
34379
mww@macports.org
410
patch-FSIORefNum.diff
file
2010-11-13T11:26:29.000000Z
8084ec041a99e7cb661772f009df15a7
2009-09-12T06:14:57.000179Z
57516
jmr@macports.org
399
patch-Lib-cgi.py.diff
file
2010-11-13T11:26:29.000000Z
82a8c9d18f4280a8bbb8a6cbf5868a8a
2008-02-22T23:26:05.539782Z
34379
mww@macports.org
808
patch-configure-arch_only.diff
file
2010-11-13T11:26:29.000000Z
14c3bb850c180ab737a46d59bc82d6a0
2009-06-24T22:01:14.810769Z
52864
landonf@macports.org
941
patch-Modules-posixmodule.c.diff
file
2010-11-13T11:26:29.000000Z
10bf449d661c9721211c94b5c3acd7fb
2008-02-22T23:26:05.539782Z
34379
mww@macports.org
571
patch-Lib-distutils-dist.py.diff
file
2010-11-13T11:26:29.000000Z
92eea653ba7debcbfd848b3e95fa664e
2008-12-03T05:16:31.085444Z
42997
blb@macports.org
2050
patch-configure.diff
file
2010-11-13T11:26:29.000000Z
758a0b524c7089e1367b9304628b7f33
2008-02-22T23:26:05.539782Z
34379
mww@macports.org
956
pyconfig.ed
file
2010-11-13T11:26:29.000000Z
674a4842ff1491cf7669c37d9b0b95bc
2009-11-10T14:40:06.347802Z
60380
jmr@macports.org
49
python25
file
2010-11-13T11:26:29.000000Z
00706fcdb40c3ab1242bd33ffcaecf00
2009-04-30T21:04:30.747761Z
50424
jmr@macports.org
340
patch-configure-badcflags.diff
file
2010-11-13T11:26:29.000000Z
0270e74fe78847844dbd13831777d22c
2008-10-16T01:47:43.712585Z
40837
toby@macports.org
460
patch-Makefile.pre.in.diff
file
2010-11-13T11:26:29.000000Z
715099f836a2265992b3b1842f05d2a2
2008-12-03T06:04:11.934031Z
43000
blb@macports.org
1449
patch-setup.py.diff
file
2010-11-13T11:26:29.000000Z
36831c5d2729aee54fe424ba32776ace
2009-09-10T13:23:37.201201Z
57388
jmr@macports.org
3814
patch-64bit.diff
file
2010-11-13T11:26:29.000000Z
5f7cfee7ab539a15e7997224f51e8b97
2009-09-10T13:23:37.201201Z
57388
jmr@macports.org
37004
patch-pyconfig.h.in.diff
file
2010-11-13T11:26:29.000000Z
df5999ec974fbe1a2716a63c882b4639
2009-08-16T18:17:13.357907Z
55669
landonf@macports.org
396
@@ -1,11 +0,0 @@
--- Mac/Modules/file/_Filemodule.c.orig 2009-09-12 15:55:59.000000000 +1000
+++ Mac/Modules/file/_Filemodule.c 2009-09-12 16:12:07.000000000 +1000
@@ -7,6 +7,8 @@
#include "pymactoolbox.h"
+typedef SInt16 FSIORefNum;
+
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
PyErr_SetString(PyExc_NotImplementedError, \
@@ -1,18 +0,0 @@
--- 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.5
-# 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.
@@ -1,51 +0,0 @@
--- Lib/distutils/dist.py.orig 2005-03-23 11:54:36.000000000 -0700
+++ Lib/distutils/dist.py 2008-07-25 21:27:15.000000000 -0600
@@ -57,6 +57,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
@@ -264,6 +265,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__ ()
@@ -324,6 +331,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()
@@ -343,7 +353,7 @@
user_filename = "pydistutils.cfg"
# And look for the user config file
- if os.environ.has_key('HOME'):
+ if self.want_user_cfg and os.environ.has_key('HOME'):
user_file = os.path.join(os.environ.get('HOME'), user_filename)
if os.path.isfile(user_file):
files.append(user_file)
@@ -353,6 +363,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 ()
@@ -1,31 +0,0 @@
--- Makefile.pre.in.orig 2007-12-05 13:43:57.000000000 -0700
+++ Makefile.pre.in 2008-07-25 21:41:02.000000000 -0600
@@ -348,8 +348,8 @@
# Build the shared modules
sharedmods: $(BUILDPYTHON)
case $$MAKEFLAGS in \
- *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
+ *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q --no-user-cfg build;; \
+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py --no-user-cfg build;; \
esac
# Build static library
@@ -894,7 +904,7 @@
# Install the dynamically loadable modules
# This goes into $(exec_prefix)
sharedinstall:
- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
+ $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py --no-user-cfg install \
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
@@ -968,7 +978,7 @@
# This installs a few of the useful scripts in Tools/scripts
scriptsinstall:
SRCDIR=$(srcdir) $(RUNSHARED) \
- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
+ ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py --no-user-cfg install \
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
--root=/$(DESTDIR)
@@ -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 */
@@ -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
@@ -1,20 +0,0 @@
--- configure.orig 2009-06-24 13:57:38.000000000 -0700
+++ configure 2009-06-24 13:58:38.000000000 -0700
@@ -11362,7 +11362,7 @@
if test "${enable_universalsdk}"; then
:
else
- LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `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)';;
@@ -11374,7 +11374,7 @@
else
LIBTOOL_CRUFT=""
fi
- LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `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
@@ -1,11 +0,0 @@
--- configure.orig 2008-10-15 18:00:59.000000000 -0700
+++ configure 2008-10-15 18:02:47.000000000 -0700
@@ -4538,7 +4538,7 @@
;;
# is there any other compiler on Darwin besides gcc?
Darwin*)
- BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
+ BASECFLAGS="$BASECFLAGS -mno-fused-madd"
if test "${enable_universalsdk}"; then
BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
fi
@@ -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
@@ -1,13 +0,0 @@
--- pyconfig.h.in.orig 2009-08-16 10:22:50.000000000 -0700
+++ pyconfig.h.in 2009-08-16 10:23:24.000000000 -0700
@@ -4,6 +4,10 @@
#ifndef Py_PYCONFIG_H
#define Py_PYCONFIG_H
+// Required on Darwin 10+
+#ifndef _DARWIN_C_SOURCE
+#define _DARWIN_C_SOURCE
+#endif
/* Define for AIX if your compiler is a genuine IBM xlC/xlC_r and you want
support for AIX C++ shared extension modules. */
@@ -1,80 +0,0 @@
--- setup.py.orig 2008-10-16 12:58:19.000000000 -0600
+++ setup.py 2009-06-07 20:55:17.000000000 -0600
@@ -609,7 +609,7 @@
# a release. Most open source OSes come with one or more
# versions of BerkeleyDB already installed.
- max_db_ver = (4, 5)
+ max_db_ver = (4, 6)
# NOTE: while the _bsddb.c code links against BerkeleyDB 4.6.x
# we leave that version disabled by default as it has proven to be
# quite a buggy library release on many platforms.
@@ -636,6 +636,7 @@
db_inc_paths.append('/usr/local/include/db4%d' % x)
db_inc_paths.append('/pkg/db-4.%d/include' % x)
db_inc_paths.append('/opt/db-4.%d/include' % x)
+ db_inc_paths.append('__PREFIX__/include/db4%d' % x)
# 3.x minor number specific paths
for x in (3,):
db_inc_paths.append('/usr/include/db3%d' % x)
@@ -711,6 +712,7 @@
# check lib directories parallel to the location of the header
db_dirs_to_check = [
+ os.path.join('__PREFIX__', 'lib', 'db46'),
os.path.join(db_incdir, '..', 'lib64'),
os.path.join(db_incdir, '..', 'lib'),
os.path.join(db_incdir, '..', '..', 'lib64'),
@@ -1212,13 +1214,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
--- setup.py.orig 2009-09-10 19:41:32.000000000 +1000
+++ setup.py 2009-09-10 19:48:30.000000000 +1000
@@ -1197,7 +1197,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']
ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'],
@@ -1262,17 +1262,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':
@@ -1,2 +0,0 @@
g,.*\(HAVE_POLL[_A-Z]*\).*,s,,/* #undef \1 */,
w
@@ -1,12 +0,0 @@
bin/python2.5
bin/pythonw2.5
bin/python2.5-config
bin/idle2.5
bin/pydoc2.5
bin/smtpd2.5.py
-
share/man/man1/python2.5.1.gz
${frameworks_dir}/Python.framework/Versions/2.5
${frameworks_dir}/Python.framework/Versions/2.5/Headers
${frameworks_dir}/Python.framework/Versions/2.5/Resources
${frameworks_dir}/Python.framework/Versions/2.5/Python
@@ -1,2 +0,0 @@
g,.*\(HAVE_POLL[_A-Z]*\).*,s,,/* #undef \1 */,
w
@@ -1,12 +0,0 @@
bin/python2.5
bin/pythonw2.5
bin/python2.5-config
bin/idle2.5
bin/pydoc2.5
bin/smtpd2.5.py
-
share/man/man1/python2.5.1.gz
${frameworks_dir}/Python.framework/Versions/2.5
${frameworks_dir}/Python.framework/Versions/2.5/Headers
${frameworks_dir}/Python.framework/Versions/2.5/Resources
${frameworks_dir}/Python.framework/Versions/2.5/Python
@@ -0,0 +1,19 @@
*** Mac/Modules/gestaltmodule.c 2010-11-21 14:34:58.000000000 +0900
--- Mac/Modules/gestaltmodule.c.new 2010-11-21 14:38:30.000000000 +0900
***************
*** 34,40 ****
{
OSErr iErr;
OSType selector;
! long response;
if (!PyArg_ParseTuple(args, "O&", PyMac_GetOSType, &selector))
return NULL;
iErr = Gestalt ( selector, &response );
--- 34,40 ----
{
OSErr iErr;
OSType selector;
! SInt32 response;
if (!PyArg_ParseTuple(args, "O&", PyMac_GetOSType, &selector))
return NULL;
iErr = Gestalt ( selector, &response );