Итак, у меня есть класс C ++, для которого я сделал оболочки Python, и я создал файл setup.py для его компиляции, чтобы использовать его в Python. Когда я пытаюсь запустить python setup.py install, я получаю следующую ошибку:
lipo: can't create output file: build/temp.macosx-10.5-fat3-2.7/../tools/transport-stream/TransportStreamPacket_py.o (No such file or directory)
error: command 'gcc-4.0' failed with exit status 1
Не думаю, что проблема в том, что файл компилируется, я думаю, что я неправильно настраивал setup.py. Вот как выглядит мой файл setup.py:
from distutils.core import setup, Extension
module1 = Extension('CL_TransportStreamPacket_py',
sources = ['../tools/transport-stream/TransportStreamPacket_py.cpp'],
include_dirs = ['.',
'../common',
'../tools/transport-stream'],
library_dirs = ['common',
'../tools/transport-stream'],
libraries = ['Common',
'TransportStream']
)
setup (name = 'CL_TransportStreamPacket_py',
version = '1.0',
description = 'This is the transport stream packet parser',
ext_modules = [module1])