mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
osx: python 3.2 fixes
This commit is contained in:
parent
f8b3a4b946
commit
2fa27b0460
14
osx/patches/boost_python1_46_1_for_3.2.diff
Normal file
14
osx/patches/boost_python1_46_1_for_3.2.diff
Normal file
@ -0,0 +1,14 @@
|
||||
Index: libs/python/src/converter/builtin_converters.cpp
|
||||
===================================================================
|
||||
--- libs/python/src/converter/builtin_converters.cpp (revision 56305)
|
||||
+++ libs/python/src/converter/builtin_converters.cpp (revision 71050)
|
||||
@@ -432,5 +432,8 @@
|
||||
{
|
||||
int err = PyUnicode_AsWideChar(
|
||||
- (PyUnicodeObject *)intermediate
|
||||
+#if PY_VERSION_HEX < 0x03020000
|
||||
+ (PyUnicodeObject *)
|
||||
+#endif
|
||||
+ intermediate
|
||||
, &result[0]
|
||||
, result.size());
|
||||
@ -14,22 +14,24 @@ if ! darwin in [ feature.values <toolset> ]
|
||||
project : default-build <toolset>darwin ;
|
||||
using python
|
||||
: %(ver)s # version
|
||||
: %(system)s/Library/Frameworks/Python.framework/Versions/%(ver)s/bin/python%(ver)s # cmd-or-prefix
|
||||
: %(system)s/Library/Frameworks/Python.framework/Versions/%(ver)s/include/python%(ver)s # includes
|
||||
: %(system)s/Library/Frameworks/Python.framework/Versions/%(ver)s/lib/python%(ver)s/config # a lib actually symlink
|
||||
: %(system)s/Library/Frameworks/Python.framework/Versions/%(ver)s/bin/python%(ver)s%(variant)s # cmd-or-prefix
|
||||
: %(system)s/Library/Frameworks/Python.framework/Versions/%(ver)s/include/python%(ver)s%(variant)s # includes
|
||||
: %(system)s/Library/Frameworks/Python.framework/Versions/%(ver)s/lib/python%(ver)s/config%(variant)s # a lib actually symlink
|
||||
: <toolset>darwin # condition
|
||||
;
|
||||
libraries = --with-python ;
|
||||
"""
|
||||
|
||||
def compile_lib(ver,arch='32_64'):
|
||||
if ver in ('2.5','2.6'):
|
||||
if ver in ('3.2'):
|
||||
open('user-config.jam','w').write(USER_JAM % {'ver':ver,'system':'','variant':'m'})
|
||||
elif ver in ('2.5','2.6'):
|
||||
# build against system pythons so we can reliably link against FAT binaries
|
||||
open('user-config.jam','w').write(USER_JAM % {'ver':ver,'system':'/System'})
|
||||
open('user-config.jam','w').write(USER_JAM % {'ver':ver,'system':'/System','variant':''})
|
||||
else:
|
||||
# for 2.7 and above hope that python.org provides 64 bit ready binaries...
|
||||
open('user-config.jam','w').write(USER_JAM % {'ver':ver,'system':''})
|
||||
cmd = "./bjam -q --with-python -a -j2 --ignore-site-config --user-config=user-config.jam link=shared toolset=darwin -d2 address-model=%s architecture=x86 release stage" % arch#linkflags=-search_paths_first
|
||||
open('user-config.jam','w').write(USER_JAM % {'ver':ver,'system':'','variant':''})
|
||||
cmd = "./bjam -q --with-python -a -j2 --ignore-site-config --user-config=user-config.jam link=shared toolset=darwin -d2 address-model=%s architecture=x86 variant=release stage" % arch#linkflags=-search_paths_first
|
||||
print cmd
|
||||
os.system(cmd)
|
||||
|
||||
|
||||
@ -15,4 +15,7 @@ wget http://www.python.org/ftp/python/2.7.1/python-2.7.1-macosx10.6.dmg
|
||||
wget http://www.python.org/ftp/python/3.1.3/python-3.1.3-macosx10.3.dmg
|
||||
|
||||
# 3.1.2 sources
|
||||
wget http://www.python.org/ftp/python/3.1.2/Python-3.1.2.tar.bz2
|
||||
wget http://www.python.org/ftp/python/3.1.2/Python-3.1.2.tar.bz2
|
||||
|
||||
# 3.2
|
||||
wget http://www.python.org/ftp/python/3.2/python-3.2-macosx10.6.dmg
|
||||
Loading…
x
Reference in New Issue
Block a user