1''' 2Wrappers for the core Cocoa frameworks: CoreFoundation, Foundation and 3AppKit. 4 5These wrappers don't include documentation, please check Apple's documention 6for information on how to use these frameworks and PyObjC's documentation 7for general tips and tricks regarding the translation between Python 8and (Objective-)C frameworks 9 10NEWS 11==== 12 132.4 14----- 15 16- Fix wrappers for a number of NSBitmap methods, those got broken while 17 introducing Python 3 support. 18 19- Add wrapper for [NSBitmapImageRep -initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:] 20''' 21from pyobjc_setup import setup, Extension 22import os 23 24setup( 25 name='pyobjc-framework-Cocoa', 26 version="2.3.2a0", 27 description = "Wrappers for the Cocoa frameworks on Mac OS X", 28 packages = [ "Cocoa", "CoreFoundation", "Foundation", "AppKit", "PyObjCTools" ], 29 namespace_packages = ['PyObjCTools'], 30 install_requires = [ 31 'pyobjc-core>=2.3.2a0', 32 ], 33 ext_modules = [ 34 # CoreFoundation 35 Extension('CoreFoundation._inlines', 36 [ 'Modules/_CoreFoundation_inlines.m' ], 37 extra_link_args=['-framework', 'CoreFoundation']), 38 Extension('CoreFoundation._CoreFoundation', 39 [ 'Modules/_CoreFoundation.m' ], 40 extra_link_args=['-framework', 'CoreFoundation'], 41 depends=[ 42 os.path.join('Modules', fn) 43 for fn in os.listdir('Modules') 44 if fn.startswith('_CoreFoundation') ]), 45 46 # Foundation 47 Extension('Foundation._inlines', 48 [ 'Modules/_Foundation_inlines.m' ], 49 extra_link_args=['-framework', 'Foundation']), 50 Extension('Foundation._Foundation', 51 [ 'Modules/_Foundation.m' ], 52 extra_link_args=['-framework', 'Foundation'], 53 depends=[ 54 os.path.join('Modules', fn) 55 for fn in os.listdir('Modules') 56 if fn.startswith('_Foundation') ]), 57 58 # AppKit 59 Extension("AppKit._inlines", 60 [ "Modules/_AppKit_inlines.m" ], 61 extra_link_args=["-framework", "AppKit"]), 62 Extension("AppKit._AppKit", 63 [ "Modules/_AppKit.m" ], 64 extra_link_args=["-framework", "AppKit"], 65 depends=[ 66 os.path.join('Modules', fn) 67 for fn in os.listdir('Modules') 68 if fn.startswith('_AppKit') ]), 69 70 71 # 72 # Test support 73 # 74 Extension("PyObjCTest.testhelper", 75 [ "Modules/testhelper.m"], 76 extra_link_args=["-framework", "Foundation"]), 77 ], 78) 79