Remove ppc from compilation flags in python setup scripts

前端 未结 2 902
[愿得一人]
[愿得一人] 2021-02-04 17:10

I\'m trying to install PIL on an Intel Mac OS X Leopard machine. Unfortunately, \"setup.py build\" thinks it should be compiling for ppc.

gcc -arch ppc -arch i3         


        
相关标签:
2条回答
  • 2021-02-04 17:18

    The easiest solution (for a single or a few C files) is to copy the compiler line, edit it, and invoke it manually, then run setup.py again - it should notice that this step was already done.

    To make setup.py not use these options anymore, you need to change the Makefile in Python's config directory, and remove the options.

    0 讨论(0)
  • 2021-02-04 17:27

    The solution that worked for me was:

    ARCHFLAGS="-arch i386 -arch x86_64" python setup.py build

    Just pass the values for the flag right in the command line.

    0 讨论(0)
提交回复
热议问题