Commits

Ronald Oussoren committed f1586ed

Generic setup.py; don't hardcode setuptools/distribute versions

Comments (0)

Files changed (2)

pyobjc-framework-InterfaceBuilderKit/Lib/InterfaceBuilderKit/PyObjC.bridgesupport

     <method selector='ibIsChildInitiallySelectable:' type='B@:@' />
     <method selector='ibIsChildViewUserMovable:' type='B@:@' />
     <method selector='ibIsChildViewUserSizable:' type='B@:@' />
-    <method selector='ibObjectAtLocation:inWindowController:' type='@@:{_NSPoint=ff}@' type64='@@:{_NSPoint=dd}@' />
+    <method selector='ibObjectAtLocation:inWindowController:' type='@@:{_NSPoint=ff}@' type64='@@:{CGPoint=dd}@' />
     <method selector='ibPopulateAttributeInspectorClasses:' type='v@:@' />
     <method selector='ibPopulateKeyPaths:' type='v@:@' />
-    <method selector='ibRectForChild:inWindowController:' type='{_NSRect={_NSPoint=ff}{_NSSize=ff}}@:@@' type64='{_NSRect={_NSPoint=dd}{_NSSize=dd}}@:@@' />
+    <method selector='ibRectForChild:inWindowController:' type='{_NSRect={_NSPoint=ff}{_NSSize=ff}}@:@@' type64='{CGRect={CGPoint=dd}{CGSize=dd}}@:@@' />
   </informal_protocol>
   <class name='IBDocument'>
     <method selector='addObject:toParent:'>
     </method>
     <method selector='ibObjectAtLocation:inWindowController:'>
       <retval type='@' />
-      <arg index='0' type='{_NSPoint=ff}' type64='{_NSPoint=dd}' />
+      <arg index='0' type='{_NSPoint=ff}' type64='{CGPoint=dd}' />
       <arg index='1' type='@' />
     </method>
     <method selector='ibPopulateAttributeInspectorClasses:'>
       <arg index='0' type='@' />
     </method>
     <method selector='ibRectForChild:inWindowController:'>
-      <retval type='{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='{_NSRect={_NSPoint=dd}{_NSSize=dd}}' />
+      <retval type='{_NSRect={_NSPoint=ff}{_NSSize=ff}}' type64='{CGRect={CGPoint=dd}{CGSize=dd}}' />
       <arg index='0' type='@' />
       <arg index='1' type='@' />
     </method>
       <retval type='{IBInsetTag=ffff}' />
     </method>
     <method selector='ibMaximumSize'>
-      <retval type='{_NSSize=ff}' type64='{_NSSize=dd}' />
+      <retval type='{_NSSize=ff}' type64='{CGSize=dd}' />
     </method>
     <method selector='ibMinimumSize'>
-      <retval type='{_NSSize=ff}' type64='{_NSSize=dd}' />
+      <retval type='{_NSSize=ff}' type64='{CGSize=dd}' />
     </method>
     <method selector='ibPreferredDesignSize'>
-      <retval type='{_NSSize=ff}' type64='{_NSSize=dd}' />
+      <retval type='{_NSSize=ff}' type64='{CGSize=dd}' />
     </method>
     <method selector='ibPreferredResizeDirection'>
       <retval type='i' />

pyobjc-framework-InterfaceBuilderKit/pyobjc_setup.py

 __all__ = ('setup', 'Extension', 'Command')
 
 import sys
-if sys.version_info[:2] < (3, 0):
-    import ez_setup
-    ez_setup.use_setuptools()
 
-    from setuptools.command.test import test as oc_test
-    from setuptools.command.build_py import build_py as oc_build_py
+try:
+    import setuptools
 
-    extra_args = {}
-
-
-else:
+except ImportError:
     import distribute_setup
     distribute_setup.use_setuptools()
 
-    from setuptools.command import test
-    from setuptools.command import build_py
+from setuptools.command import test
+from setuptools.command import build_py
 
-    from distutils import log
+from distutils import log
 
-    extra_args=dict(
-        use_2to3 = True,
-    )
+extra_args=dict(
+    use_2to3 = True,
+)
 
 
-    class oc_build_py (build_py.build_py):
-        def build_packages(self):
-            log.info("Overriding build_packages to copy PyObjCTest")
-            p = self.packages
-            self.packages = list(self.packages) + ['PyObjCTest']
-            try:
-                build_py.build_py.build_packages(self)
-            finally:
-                self.packages = p
+class oc_build_py (build_py.build_py):
+    def build_packages(self):
+        log.info("Overriding build_packages to copy PyObjCTest")
+        p = self.packages
+        self.packages = list(self.packages) + ['PyObjCTest']
+        try:
+            build_py.build_py.build_packages(self)
+        finally:
+            self.packages = p
 
 
 
-    class oc_test (test.test):
-        def run_tests(self):
-            import sys, os
+class oc_test (test.test):
+    def run_tests(self):
+        import sys, os
 
-            rootdir =  os.path.dirname(os.path.abspath(__file__))
-            if rootdir in sys.path:
-                sys.path.remove(rootdir)
+        rootdir =  os.path.dirname(os.path.abspath(__file__))
+        if rootdir in sys.path:
+            sys.path.remove(rootdir)
 
-            import PyObjCTest
-            import unittest
-            from pkg_resources import EntryPoint
-            loader_ep = EntryPoint.parse("x="+self.test_loader)
-            loader_class = loader_ep.load(require=False)
+        import PyObjCTest
+        import unittest
+        from pkg_resources import EntryPoint
+        loader_ep = EntryPoint.parse("x="+self.test_loader)
+        loader_class = loader_ep.load(require=False)
 
-            unittest.main(None, None, [unittest.__file__]+self.test_args, testLoader=loader_class())
+        unittest.main(None, None, [unittest.__file__]+self.test_args, testLoader=loader_class())