[Pyrex] Pyrex setting MACOSX_DEPLOYMENT_TARGET

Adam Mercer ramercer at gmail.com
Sun Jan 18 06:40:24 CET 2009


Hi

I've noticed that on Mac OS X Pyrex is setting the
MACOSX_DEPLOYMENT_TARGET environment variable to 10.3  in
Pyrex/Mac/DarwinSystem.py. This is causing build errors with other
packages that use Pyrex, such as glewpy, in MacPorts:

Command output: Traceback (most recent call last):
  File "setup.py", line 43, in ?
    cmdclass = {'build_ext': build_ext}
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/core.py",
line 123, in setup
    dist.parse_config_files()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/dist.py",
line 339, in parse_config_files
    filenames = self.find_config_files()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/dist.py",
line 302, in find_config_files
    check_environ()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/util.py",
line 209, in check_environ
    os.environ['PLAT'] = get_platform()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/util.py",
line 78, in get_platform
    cfgvars = get_config_vars()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/sysconfig.py",
line 488, in get_config_vars
    func()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/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

If I remove the line that sets the deployment target then the build
fails with a different error:

creating build
creating build/lib.macosx-10.5-i386-2.4
creating build/lib.macosx-10.5-i386-2.4/glew
copying src/__init__.py -> build/lib.macosx-10.5-i386-2.4/glew
creating build/lib.macosx-10.5-i386-2.4/glew/gl
copying src/gl/__init__.py -> build/lib.macosx-10.5-i386-2.4/glew/gl
creating build/lib.macosx-10.5-i386-2.4/glew/glx
copying src/glx/__init__.py -> build/lib.macosx-10.5-i386-2.4/glew/glx
creating build/lib.macosx-10.5-i386-2.4/glew/wgl
copying src/wgl/__init__.py -> build/lib.macosx-10.5-i386-2.4/glew/wgl
running build_ext
pyrexc src/glew.pyx --> src/glew.c
/opt/local/var/macports/build/_Users_ram_opt_macports_python_py-glewpy/work/glewpy-0.7.4/src/glew.pyx:32:25:
Cannot convert 'src.glew.GLbyte *' to Python object
/opt/local/var/macports/build/_Users_ram_opt_macports_python_py-glewpy/work/glewpy-0.7.4/src/glew.pyx:38:30:
Cannot convert 'src.glew.GLbyte *' to Python object
building 'glew' extension
creating build/temp.macosx-10.5-i386-2.4
creating build/temp.macosx-10.5-i386-2.4/src
/usr/bin/gcc-4.0 -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
-fno-common -fno-common -dynamic -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -I/opt/local/include
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4
-c src/glew.c -o build/temp.macosx-10.5-i386-2.4/src/glew.o
src/glew.c:1:2: error: #error Do not use this file, it is the result
of a failed Pyrex compilation.
error: command '/usr/bin/gcc-4.0' failed with exit status 1

Is this problem due to Pyrex or glewpy?

Cheers

Adam



More information about the Pyrex mailing list