[Pythonmac-SIG] XCode fails to see py2app

Nehemiah Dacres vivacarlie at gmail.com
Tue Mar 20 22:32:50 CET 2007


The interesting thing i might add to this is that I couldn't import pyobjc
for a while "from objc import *" in python 2.5
I had to spesificly invoke python 2.4 (% python2.4 ) in order import objc or
wx after a package install. I also noticed that the
pyobjc.sourceforge.netpage is down, all the links now just download
the disk Image (dmg)

On 1/14/07, Dennis Ng <ngcc_hk at yahoo.com> wrote:
>
> Dear all,
> Following the examples http://developer.apple.com/cocoa/pyobjc.html as
> well as using PyObjC 1.4 installer for (Universal) Python 2.4 on Mac OS X
> 10.4  I have got  an error message that Xcode cannot find py2app.  There
> is a thread on this topic but there is no answer on how to deal with it.
> So I raised it again.  It seems that it is a common problem to newbie and
> for newly installed environment.
>
> It is noted if one run the source manually i.e. follow the instruction
> using Xcode, interface builder, drop to terminal and do the
>
> python setup.py py2app
>
> The program will works but if you compile it under Xcode, it cannot:
>
> The details is as below and you may note that somehow Xcode can only
> points to the Java and nothing Python in the compile environment:
>
>
> *Building target "Development" of project "PyAverager" with configuration
> "Development" — (1 error)*
>     cd /
>     setenv ACTION
>     setenv APPLE_INTERNAL_DEVELOPER_DIR /AppleInternal/Developer
>     setenv APPLE_INTERNAL_DIR /AppleInternal
>     setenv APPLE_INTERNAL_DOCUMENTATION_DIR /AppleInternal/Documentation
>     setenv APPLE_INTERNAL_LIBRARY_DIR /AppleInternal/Library
>     setenv APPLE_INTERNAL_TOOLS /AppleInternal/Developer/Tools
>     setenv BUILD_COMPONENTS "headers build"
>     setenv BUILD_DIR "/Users/testuser/Desktop/pyObjC - averager/build"
>     setenv BUILD_ROOT "/Users/testuser/Desktop/pyObjC - averager/build"
>     setenv BUILD_STYLE Development
>     setenv BUILD_VARIANTS normal
>     setenv BUILT_PRODUCTS_DIR "/Users/testuser/Desktop/pyObjC -
> averager/build/Development"
>     setenv CC /usr/bin/cc
>     setenv CLASS_FILE_DIR "/Users/testuser/Desktop/pyObjC -
> averager/build/PyAverager.build/Development/Development.build/JavaClasses"
>     setenv CLONE_HEADERS NO
>     setenv CONFIGURATION Development
>     setenv CONFIGURATION_BUILD_DIR "/Users/testuser/Desktop/pyObjC -
> averager/build/Development"
>     setenv CONFIGURATION_TEMP_DIR "/Users/testuser/Desktop/pyObjC -
> averager/build/PyAverager.build/Development"
>     setenv COPY_PHASE_STRIP NO
>     setenv DEBUGGING_SYMBOLS YES
>     setenv DERIVED_FILES_DIR
>     setenv DERIVED_FILE_DIR "/Users/testuser/Desktop/pyObjC -
> averager/build/PyAverager.build/Development/Development.build/DerivedSources"
>     setenv DERIVED_SOURCES_DIR "/Users/testuser/Desktop/pyObjC -
> averager/build/PyAverager.build/Development/Development.build/DerivedSources"
>     setenv DEVELOPMENT_LANGUAGE English
>     setenv DO_HEADER_SCANNING_IN_JAM NO
>     setenv DSTROOT /tmp/PyAverager.dst
>     setenv ENABLE_HEADER_DEPENDENCIES YES
>     setenv FILE_LIST "/Users/testuser/Desktop/pyObjC -
> averager/build/PyAverager.build/Development/Development.build/Objects/LinkFileList"
>     setenv FRAMEWORK_VERSION A
>     setenv GCC3_VERSION 3.3
>     setenv GROUP testuser
>     setenv HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT YES
>     setenv HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES YES
>     setenv HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS YES
>     setenv HEADERMAP_INCLUDES_PROJECT_HEADERS YES
>     setenv INSTALL_DIR "/tmp/PyAverager.dst/(INSTALL_PATH)"
>     setenv INSTALL_GROUP testuser
>     setenv INSTALL_MODE_FLAG a-w,a+rX
>     setenv INSTALL_OWNER testuser
>     setenv INSTALL_ROOT /tmp/PyAverager.dst
>     setenv JAVA_APP_STUB
> /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub
>     setenv JAVA_ARCHIVE_CLASSES YES
>     setenv JAVA_ARCHIVE_TYPE JAR
>     setenv JAVA_COMPILER /usr/bin/javac
>     setenv JAVA_FRAMEWORK_RESOURCES_DIRS Resources
>     setenv JAVA_JAR_FLAGS cv
>     setenv JAVA_SOURCE_SUBDIR .
>     setenv JAVA_USE_DEPENDENCIES YES
>     setenv JAVA_ZIP_FLAGS -urg
>     setenv LOCAL_ADMIN_APPS_DIR /Applications/Utilities
>     setenv LOCAL_APPS_DIR /Applications
>     setenv LOCAL_DEVELOPER_DIR /Library/Developer
>     setenv LOCAL_LIBRARY_DIR /Library
>     setenv NATIVE_ARCH i386
>     setenv OBJECT_FILE_DIR "/Users/testuser/Desktop/pyObjC -
> averager/build/PyAverager.build/Development/Development.build/Objects"
>     setenv OBJROOT "/Users/testuser/Desktop/pyObjC - averager/build"
>     setenv OPTIMIZATION_LEVEL 0
>     setenv OS MACOS
>     setenv PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES "/usr/include
> /usr/local/include /System/Library/Frameworks
> /System/Library/PrivateFrameworks /Developer/Headers"
>     setenv PRODUCT_NAME
>     setenv PROFILING_CODE NO
>     setenv PROJECT PyAverager
>     setenv PROJECT_DERIVED_FILE_DIR "/Users/testuser/Desktop/pyObjC -
> averager/build/PyAverager.build/DerivedSources"
>     setenv PROJECT_DIR "/Users/testuser/Desktop/pyObjC - averager"
>     setenv PROJECT_FILE_PATH "/Users/testuser/Desktop/pyObjC -
> averager/PyAverager.xcodeproj"
>     setenv PROJECT_NAME PyAverager
>     setenv PROJECT_TEMP_DIR "/Users/testuser/Desktop/pyObjC -
> averager/build/PyAverager.build"
>     setenv REMOVE_CVS_FROM_RESOURCES YES
>     setenv REMOVE_SVN_FROM_RESOURCES YES
>     setenv SDKROOT
>     setenv SHARED_DERIVED_FILE_DIR "/Users/testuser/Desktop/pyObjC -
> averager/build/Development/DerivedSources"
>     setenv SOURCE_ROOT "/Users/testuser/Desktop/pyObjC - averager"
>     setenv SRCROOT "/Users/testuser/Desktop/pyObjC - averager"
>     setenv STRIP_INSTALLED_PRODUCT YES
>     setenv SYMROOT "/Users/testuser/Desktop/pyObjC - averager/build"
>     setenv SYSTEM_ADMIN_APPS_DIR /Applications/Utilities
>     setenv SYSTEM_APPS_DIR /Applications
>     setenv SYSTEM_CORE_SERVICES_DIR /System/Library/CoreServices
>     setenv SYSTEM_DEMOS_DIR /Applications/Extras
>     setenv SYSTEM_DEVELOPER_APPS_DIR /Developer/Applications
>     setenv SYSTEM_DEVELOPER_DEMOS_DIR
> "/Developer/Applications/Utilities/Built Examples"
>     setenv SYSTEM_DEVELOPER_DIR /Developer
>     setenv SYSTEM_DEVELOPER_DOC_DIR "/Developer/ADC Reference Library"
>     setenv SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR
> "/Developer/Applications/Graphics Tools"
>     setenv SYSTEM_DEVELOPER_JAVA_TOOLS_DIR "/Developer/Applications/Java
> Tools"
>     setenv SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR
> "/Developer/Applications/Performance Tools"
>     setenv SYSTEM_DEVELOPER_RELEASENOTES_DIR "/Developer/ADC Reference
> Library/releasenotes"
>     setenv SYSTEM_DEVELOPER_TOOLS /Developer/Tools
>     setenv SYSTEM_DEVELOPER_TOOLS_DOC_DIR "/Developer/ADC Reference
> Library/documentation/DeveloperTools"
>     setenv SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR "/Developer/ADC
> Reference Library/releasenotes/DeveloperTools"
>     setenv SYSTEM_DEVELOPER_UTILITIES_DIR
> /Developer/Applications/Utilities
>     setenv SYSTEM_DOCUMENTATION_DIR /Library/Documentation
>     setenv SYSTEM_LIBRARY_DIR /System/Library
>     setenv TARGETNAME Development
>     setenv TARGET_BUILD_DIR "/Users/testuser/Desktop/pyObjC -
> averager/build/Development"
>     setenv TARGET_NAME Development
>     setenv TARGET_TEMP_DIR "/Users/testuser/Desktop/pyObjC -
> averager/build/PyAverager.build/Development/Development.build"
>     setenv TEMP_DIR "/Users/testuser/Desktop/pyObjC -
> averager/build/PyAverager.build/Development/Development.build"
>     setenv TEMP_FILES_DIR
>     setenv TEMP_FILE_DIR "/Users/testuser/Desktop/pyObjC -
> averager/build/PyAverager.build/Development/Development.build"
>     setenv TEMP_ROOT "/Users/testuser/Desktop/pyObjC - averager/build"
>     setenv USER testuser
>     setenv USER_APPS_DIR /Users/testuser/Applications
>     setenv USER_LIBRARY_DIR /Users/testuser/Library
>     setenv XCODE_APP_SUPPORT_DIR "/Library/Application
> Support/Apple/Developer Tools"
>     /usr/bin/env /Users/testuser/Desktop/pyObjC\ -\ averager/setup.py
> py2app --alias
> *Traceback (most recent call last):*
> *  File "/Users/testuser/Desktop/pyObjC - averager/setup.py", line 38, in
> ?*
> *    import py2app*
> *ImportError: No module named py2app*
>  *ImportError: No module named py2app*
>  *ImportError: No module named py2app*
>  *ImportError: No module named py2app*
>  *ImportError: No module named py2app*
>  *ImportError: No module named py2app*
> Build failed (1 error)
> *
> *
>
> Somehow the py2app cannot be found.  My environment is quite common for
> macbook (Intel) i.e.
>
> it has the current version Python in
>
> /Library/Frameworks/Python.framework/Versions/2.4/
>
> as well as an older library in
>
> /Library/Python/2.3/
>
> but calling python would use the newer library
>
> The newly installed PyObjC has this:
>
> /Developer/Python/py2app/
> /Developer/Python/PyObjC/
>
> The py2app example like TinyTinyEdit run ok under terminal compile method.
>
> Somehow the setup script cannot find the two libraries pyobjC installed
> and seems to use Java environment.
>
> Any hint?
>
> Best regards.
>
> Dennis
>
>
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>
>


-- 

"lalalalala! it's not broken because I can use it"

http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&mode=thread&cid=15927703
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20070320/726916c7/attachment-0001.html 


More information about the Pythonmac-SIG mailing list