[lxml-dev] lxml Mac installation idea

Michael Guntsche mike at it-loops.com
Mon Nov 17 19:51:02 CET 2008


On Nov 17, 2008, at 19:33, Paul Everitt wrote:

> I got a new trunk, the patched buildlibxml.py, and very quickly got:
>
> $ python setup.py build --static-deps
> Traceback (most recent call last):
>  File "setup.py", line 13, in ?
>    import pkg_resources
>  File "/Users/paul/venvs/lxmltrunk/lib/python2.4/site-packages/ 
> setuptools-0.6c9-py2.4.egg/pkg_resources.py", line 657, in ?
>    class Environment(object):
>  File "/Users/paul/venvs/lxmltrunk/lib/python2.4/site-packages/ 
> setuptools-0.6c9-py2.4.egg/pkg_resources.py", line 660, in Environment
>    def __init__(self, search_path=None,  
> platform=get_supported_platform(), python=PY_MAJOR):
>  File "/Users/paul/venvs/lxmltrunk/lib/python2.4/site-packages/ 
> setuptools-0.6c9-py2.4.egg/pkg_resources.py", line 55, in  
> get_supported_platform
>    plat = get_build_platform(); m = macosVersionString.match(plat)
>  File "/Users/paul/venvs/lxmltrunk/lib/python2.4/site-packages/ 
> setuptools-0.6c9-py2.4.egg/pkg_resources.py", line 187, in  
> get_build_platform
>    plat = get_platform()
>  File "/Users/paul/opt/Python-2.4.5/lib/python2.4/distutils/ 
> util.py", line 78, in get_platform
>    cfgvars = get_config_vars()
>  File "/Users/paul/opt/Python-2.4.5/lib/python2.4/distutils/ 
> sysconfig.py", line 488, in get_config_vars
>    func()
>  File "/Users/paul/opt/Python-2.4.5/lib/python2.4/distutils/ 
> sysconfig.py", line 373, in _init_posix
>    raise DistutilsPlatformError(my_msg)
> distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET  
> mismatch: now "10.3" but "10.5" during configure
>


Here a new patch that should fix the mismatch...

Please try the following:

1.) Only apply the first part of the patch that changes the TARGET
Try to compile that

2.) Apply the complete patch and try to compile it.

Thank you very much for testing this. I really cannot reproduce this  
in my testing rig here....


Index: buildlibxml.py
===================================================================
--- buildlibxml.py	(revision 59948)
+++ buildlibxml.py	(working copy)
@@ -174,7 +174,7 @@
              call_setup['env'] = {
                  'CFLAGS' : "-arch ppc -arch i386 -isysroot / 
Developer/SDKs/MacOSX10.4u.sdk -O2",
                  'LDFLAGS' : "-arch ppc -arch i386 -isysroot / 
Developer/SDKs/MacOSX10.4u.sdk",
-                'MACOSX_DEPLOYMENT_TARGET' : "10.3"
+                'MACOSX_DEPLOYMENT_TARGET' :  
sysconfig.parse_makefile(sysconfig.get_makefile_filename()) 
['MACOSX_DEPLOYMENT_TARGET']
                  }

          # We may loose the link to iconv, so make sure it's there
@@ -188,7 +188,7 @@
                       ]
      call_subprocess(configure_cmd, cwd=libxml2_dir, **call_setup)
      call_subprocess(
-        ['make'], cwd=libxml2_dir)
+        ['make'], cwd=libxml2_dir, **call_setup)
      call_subprocess(
          ['make', 'install'], cwd=libxml2_dir)

@@ -202,7 +202,7 @@

      call_subprocess(libxslt_configure_cmd, cwd=libxslt_dir,  
**call_setup)
      call_subprocess(
-        ['make'], cwd=libxslt_dir)
+        ['make'], cwd=libxslt_dir, **call_setup)
      call_subprocess(
          ['make', 'install'], cwd=libxslt_dir)




More information about the lxml-dev mailing list