문제

나는 구축 할 수 없었습니다 p4python Intel Mac OS x 10.5.5 용.

이것들은 내 단계입니다.

  1. p4python.tgz를 다운로드했습니다 (Fromhttp://filehost.perforce.com/perforce/r07.3/tools/) 그리고 그것을 "p4python-2007.3"로 확장했습니다.
  2. p4api.tar를 다운로드했습니다 (Fromhttp://filehost.perforce.com/perforce/r07.3/bin.macosx104x86/) 및 "P4API-2007.3.143793"으로 확장했습니다.
  3. "p4api-2007.3.143793"을 "p4python-2007.3"에 넣고 setup.cfg를 편집하여 "p4_api =./p4api-2007.3.143793"을 설정했습니다.
  4. Setup.py에 'extra_link_args = [ "-framework", "Carbon"]'을 다음과 같이 추가했습니다.

    elif unameOut[0] == "Darwin":
        unix = "MACOSX"
        release = "104"
        platform = self.architecture(unameOut[4])
    
  5. 나는 달렸다 python setup.py build 그리고 GOT :

$ python setup.py 빌드

API Release 2007.3
running build
running build_py
running build_ext
building 'P4API' extension
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DID_OS="MACOSX104X86" -DID_REL="2007.3" -DID_PATCH="151416" -DID_API="2007.3" -DID_Y="2008" -DID_M="04" -DID_D="09" -I./p4api-2007.3.143793 -I./p4api-2007.3.143793/include/p4 -I/build/toolchain/mac32/python-2.4.3/include/python2.4 -c P4API.cpp -o build/temp.darwin-9.5.0-i386-2.4/P4API.o -DOS_MACOSX -DOS_MACOSX104 -DOS_MACOSXX86 -DOS_MACOSX104X86
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
P4API.cpp: In function âint P4Adapter_init(P4Adapter*, PyObject*, PyObject*)â:
P4API.cpp:105: error: âPy_ssize_tâ was not declared in this scope
P4API.cpp:105: error: expected `;' before âposâ
P4API.cpp:107: error: âposâ was not declared in this scope
P4API.cpp: In function âPyObject* P4Adapter_run(P4Adapter*, PyObject*)â:
P4API.cpp:177: error: âPy_ssize_tâ was not declared in this scope
P4API.cpp:177: error: expected `;' before âiâ
P4API.cpp:177: error: âiâ was not declared in this scope
error: command 'gcc' failed with exit status 1

which gcc 반환/usr/bin/gcc 및 gcc -v 보고:

Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure
--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=i686-apple-darwin9 --with-arch=apple --with-tune=generic
--host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)

python -V 파이썬 2.4.3을 반환합니다.

도움이 되었습니까?

해결책

최신 버전 2008.1은 Python 2.4로 구축됩니다.

P4PyThon 페이지에 필요한 사소한 변경 사항을 게시했지만 공식 버전으로 롤링되었습니다.

로버트

다른 팁

에서 http://bugs.mymediasystem.org/?do=details&task_id=676 PY_SSIZE_T는 Python 2.5에 추가되었으므로 Python 2.4와 함께 작동하지 않습니다 (일부 수정없이).

자신의 Python 2.5/2.6 사본을 설치/컴파일하거나 P4Python을 변경하는 방법을 찾거나 대체 Python-Perforce 라이브러리를 찾으십시오.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top