Enlightenment CVS committal

Author  : ulisses
Project : e17
Module  : proto/python-efl

Dir     : e17/proto/python-efl/python-evas


Modified Files:
        README setup.py 


Log Message:
Organized and changed code to use Cython instead of Pyrex.

 - moved headers (.pxd and .h) to include directory
 - changed README and setup.py to use Cython

===================================================================
RCS file: /cvs/e/e17/proto/python-efl/python-evas/README,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- README      24 Jul 2007 14:42:04 -0000      1.3
+++ README      30 Sep 2007 21:57:17 -0000      1.4
@@ -4,7 +4,7 @@
 ============
 
  * Evas >= 0.9.9.040
- * Pyrex >= 0.9.5
+ * Cython from Mercurial repository (http://www.cython.org/hg/)
  * Python >= 2.4
  * Python-setuptools >= 0.6_rc3
 
@@ -24,10 +24,10 @@
         python setup.py install_headers
 
 The last step, "install_headers", is required to enable build of other
-modules that depends on this, like python-edje and python-emotion.
+modules that depend on this, like python-ecore, python-edje and python-emotion.
 
 You can choose where to install by using command options, see output
-of "python setup.py $COMMAND --help", example:
+of "python setup.py <command> --help", example:
 
         python setup.py install --help
         python setup.py install_headers --help
===================================================================
RCS file: /cvs/e/e17/proto/python-efl/python-evas/setup.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- setup.py    4 Sep 2007 18:50:39 -0000       1.15
+++ setup.py    30 Sep 2007 21:57:17 -0000      1.16
@@ -5,8 +5,12 @@
 use_setuptools('0.6c3')
 
 from setuptools import setup, find_packages, Extension
+from distutils.command.install_headers import install_headers
+from distutils.sysconfig import get_python_inc
 import commands
 
+from Cython.Distutils import build_ext
+
 
 def pkgconfig(*packages, **kw):
     flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'}
@@ -25,8 +29,7 @@
 evasmodule = Extension('evas.c_evas',
                        sources=['evas/evas.c_evas.pyx',
                                 ],
-                       depends=['evas/evas.c_evas.pxd',
-                                'evas/evas.c_evas_canvas.pxi',
+                       depends=['evas/evas.c_evas_canvas.pxi',
                                 'evas/evas.c_evas_object.pxi',
                                 'evas/evas.c_evas_object_smart.pxi',
                                 'evas/evas.c_evas_object_rectangle.pxi',
@@ -35,15 +38,20 @@
                                 'evas/evas.c_evas_object_gradient.pxi',
                                 'evas/evas.c_evas_object_polygon.pxi',
                                 'evas/evas.c_evas_object_text.pxi',
-                                'evas/python.pxd',
+                                'include/evas/c_evas.pxd',
+                                'include/python.pxd',
                                 ],
-                       **pkgconfig('"evas >= 0.9.9.040"'))
+                       **pkgconfig('"evas >= 0.9.9.040"')
+                       )
+
 
-headers = ['evas/evas.c_evas.pxd',
-           'evas/evas.c_evas.h',
-           'evas/python_evas_utils.h',
+headers = ['evas/evas.c_evas.h',
+           'include/evas/python_evas_utils.h',
+           'include/evas/c_evas.pxd',
+           'include/python.pxd',
            ]
 
+
 trove_classifiers = [
     "Development Status :: 3 - Alpha",
     "Environment :: Console :: Framebuffer",
@@ -58,6 +66,7 @@
     "Topic :: Software Development :: User Interfaces",
     ]
 
+
 long_description = """\
 Python bindings for Evas, part of Enlightenment Foundation Libraries.
 
@@ -80,6 +89,24 @@
 15, 16, 24 and 32bit color.
 """
 
+
+class evas_build_ext(build_ext):
+    def finalize_options(self):
+        build_ext.finalize_options(self)
+        self.include_dirs.append('include')
+
+
+class evas_install_headers(install_headers):
+    def finalize_options(self):
+        if self.install_dir is None:
+            instd = get_python_inc()
+        else:
+            instd = self.install_dir
+
+        self.install_dir = os.path.join(instd, 'evas')
+        install_headers.finalize_options(self)
+
+
 setup(name='python-evas',
       version='0.1.1',
       license='BSD',
@@ -94,4 +121,6 @@
       headers=headers,
       ext_modules=[evasmodule],
       zip_safe=False,
+      cmdclass={'build_ext': evas_build_ext,
+                'install_headers': evas_install_headers},
       )



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to