[Pyobjc-dev] Install pyObjC on Snow Leopard / Quartz CGEventTapCreate
Brought to you by:
ronaldoussoren
From: schneo <sc...@gm...> - 2011-05-19 12:26:09
|
Hello, I’m porting an Open Source Python recording/podcasting application i wrote on Windows to Mac OS X (i’m pretty new to this platform). http://sites.google.com/site/audiovideocours/english-home Everything is now finished except the essential events hook which is used for synced screen capturing and finishing recording (and that’s where pyObjC communicate with Quartz for the events tap). Unfortunately i had errors here and after searching i saw there’s a bug in the currently implemented pyobjc lib shipping with Snow Leopard: https://sourceforge.net/mailarchive/message.php?msg_id=22904885 So far i fail at installing the new corrected version of pyobjc. What would be the simplest way for me to have a good version of pyobjc for my purposes ? (if possible i’d like to stay with the python version shipping with OS X) So far i tried, 1) to find the official pyobjc sources file (shipped by Apple) and make the changes you describe on that file (after a backup of those files) but i can’t find them on Snow Leopard. 2) to install pyobjc form the pyobjc website a) i did a trunk checkout and tried “python setup.py install” which ended up in (see more details at the end of the mail) [...] Reading http://pypi.python.org/simple/pyobjc-framework-ServiceManagement/ Reading http://pyobjc.sourceforge.net No local packages or download links found for pyobjc-framework-ServiceManagement==2.4a0 error: Could not find suitable distribution for Requirement.parse('pyobjc-framework-ServiceManagement==2.4a0') b) i tried “easy_install pyobjc” Searching for pyobjc Best match: pyobjc 2.4a0 Processing pyobjc-2.4a0-py2.6.egg pyobjc 2.4a0 is already the active version in easy-install.pth Using /Library/Python/2.6/site-packages/pyobjc-2.4a0-py2.6.egg Processing dependencies for pyobjc Searching for pyobjc-framework-ServiceManagement==2.4a0 Reading http://pypi.python.org/simple/pyobjc-framework-ServiceManagement/ Reading http://pyobjc.sourceforge.net No local packages or download links found for pyobjc-framework-ServiceManagement==2.4a0 error: Could not find suitable distribution for Requirement.parse('pyobjc-framework-ServiceManagement==2.4a0') 3) i tried installing pyobjc from macports This did apparently install a the macport python26 and pyobjc libs in “/opt/local/var/macports/software” without errors: $ ls [...] py26-pyobjc py26-pyobjc-cocoa python26 if i launch in a shell “python2.6” or "/opt/local/var/macports/software/python26/2.6.6_3/opt/local/bin/python2.6", i can do an “import Foundation” but an “import Quartz” states that there’s no library of that name. 4) Is it possible to just drag and drop a pyobjc folder in my dev. folder so that i’m sure it’s going to use it or is it necessary to build something? All help would be greatly appreciated and thanks a lot for your work on this essential bridge :) PS: Is the pyobjc shipping soon in OS X Lion will have this bug fixed? Thanks again. Francois. /////////////////////////////////////////////////////////// This is the full log when i tried “python setup.py install” wifi-osiris-sec-181-140:pyobjc dundun$ python setup.py install running install running bdist_egg running egg_info creating pyobjc.egg-info writing requirements to pyobjc.egg-info/requires.txt writing pyobjc.egg-info/PKG-INFO writing top-level names to pyobjc.egg-info/top_level.txt writing dependency_links to pyobjc.egg-info/dependency_links.txt writing manifest file 'pyobjc.egg-info/SOURCES.txt' unrecognized .svn/entries format in reading manifest file 'pyobjc.egg-info/SOURCES.txt' writing manifest file 'pyobjc.egg-info/SOURCES.txt' installing library code to build/bdist.macosx-10.6-universal/egg running install_lib warning: install_lib: 'build/lib' does not exist -- no Python modules to install creating build creating build/bdist.macosx-10.6-universal creating build/bdist.macosx-10.6-universal/egg creating build/bdist.macosx-10.6-universal/egg/EGG-INFO copying pyobjc.egg-info/PKG-INFO -> build/bdist.macosx-10.6-universal/egg/EGG-INFO copying pyobjc.egg-info/SOURCES.txt -> build/bdist.macosx-10.6-universal/egg/EGG-INFO copying pyobjc.egg-info/dependency_links.txt -> build/bdist.macosx-10.6-universal/egg/EGG-INFO copying pyobjc.egg-info/requires.txt -> build/bdist.macosx-10.6-universal/egg/EGG-INFO copying pyobjc.egg-info/top_level.txt -> build/bdist.macosx-10.6-universal/egg/EGG-INFO copying pyobjc.egg-info/zip-safe -> build/bdist.macosx-10.6-universal/egg/EGG-INFO creating dist creating 'dist/pyobjc-2.4a0-py2.6.egg' and adding 'build/bdist.macosx-10.6-universal/egg' to it removing 'build/bdist.macosx-10.6-universal/egg' (and everything under it) Processing pyobjc-2.4a0-py2.6.egg Copying pyobjc-2.4a0-py2.6.egg to /Library/Python/2.6/site-packages Adding pyobjc 2.4a0 to easy-install.pth file Installed /Library/Python/2.6/site-packages/pyobjc-2.4a0-py2.6.egg Processing dependencies for pyobjc==2.4a0 Searching for pyobjc-framework-ServiceManagement==2.4a0 Reading http://pypi.python.org/simple/pyobjc-framework-ServiceManagement/ Reading http://pyobjc.sourceforge.net No local packages or download links found for pyobjc-framework-ServiceManagement==2.4a0 error: Could not find suitable distribution for Requirement.parse('pyobjc-framework-ServiceManagement==2.4a0') |