Enlightenment CVS committal

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

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


Modified Files:
        README setup.py 


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

 - moved headers (.pxd) to include directory
 - changed README and setup.py to use Cython
 - fixed namespace and typo issues

===================================================================
RCS file: /cvs/e/e17/proto/python-efl/python-emotion/README,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- README      24 Jul 2007 15:14:46 -0000      1.4
+++ README      30 Sep 2007 22:43:10 -0000      1.5
@@ -7,7 +7,7 @@
  * Evas >= 0.9.9.040  (indirect, Emotion dependency)
  * Ecore >= 0.9.9.040 (indirect, Emotion dependency)
  * Python-Evas
- * Pyrex >= 0.9.5
+ * Cython from Mercurial repository (http://www.cython.org/hg/)
  * Python >= 2.4
  * Python-setuptools >= 0.6_rc3
 
@@ -19,7 +19,6 @@
 
 Build::
 
-        python setup.py build_ext
         python setup.py build
 
 Install::
@@ -27,7 +26,7 @@
         python setup.py install
 
 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
 
@@ -39,19 +38,19 @@
 
 If you get the following error during build_ext:
 
-        emotion.c_emotion.pxd:1:8: 'evas.c_evas.pxd' not found
-        emotion.c_emotion.pxd:53:4: 'Evas_Object' is not declared
+        include/emotion/c_emotion.pxd:1:8: 'evas.c_evas.pxd' not found
 
-Means that either evas.c_evas.pxd was not installed or it is placed
+Means that either evas/c_evas.pxd was not installed or it is placed
 at an non-standard place.
 
 If it's not installed at all, please do so by:
 
         # copy and extract python-evas to 'src/python-evas', then:
         cd src/python-evas
+        # read README
         python setup.py install_headers
 
-If it's installed at a non-standard place, you can specify it with
-"build_ext --include-dirs":
+If it's installed at a non-standard place, you can specify the same path you
+used to install python-evas to build_ext with "--include-dirs":
 
-        python setup.py build_ext --include-dirs $EVAS_PXD_PATH
+        python setup.py build_ext --include-dirs <path>
===================================================================
RCS file: /cvs/e/e17/proto/python-efl/python-emotion/setup.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- setup.py    4 Sep 2007 18:50:39 -0000       1.5
+++ setup.py    30 Sep 2007 22:43:10 -0000      1.6
@@ -4,12 +4,11 @@
 from ez_setup import use_setuptools
 use_setuptools('0.6c3')
 
-import distutils.sysconfig
 from setuptools import setup, find_packages, Extension
+from distutils.sysconfig import get_python_inc
 import commands
 
-
-python_inc = distutils.sysconfig.get_python_inc()
+from Cython.Distutils import build_ext
 
 
 def pkgconfig(*packages, **kw):
@@ -29,14 +28,11 @@
 emotionmodule = Extension('emotion.c_emotion',
                           sources=['emotion/emotion.c_emotion.pyx',
                                    ],
-                          depends=['emotion/emotion.c_emotion.pxd',
+                          depends=['include/emotion/c_emotion.pxd',
                                    ],
                           **pkgconfig('"emotion >= 0.0.1.007"'))
 
 
-include_dirs = [os.path.join(python_inc, "python-evas")]
-
-
 trove_classifiers = [
     "Development Status :: 3 - Alpha",
     "Environment :: Console :: Framebuffer",
@@ -51,6 +47,7 @@
     "Topic :: Software Development :: User Interfaces",
     ]
 
+
 long_description = """\
 Python bindings for Emotion, part of Enlightenment Foundation Libraries.
 
@@ -61,6 +58,13 @@
 MPEG2, etc) is avalible using Emotion.
 """
 
+
+class emotion_build_ext(build_ext):
+    def finalize_options(self):
+        build_ext.finalize_options(self)
+        self.include_dirs.extend(['include', get_python_inc()])
+
+
 setup(name='python-emotion',
       version='0.1.1',
       license='BSD',
@@ -72,9 +76,9 @@
       keywords='wrapper binding enlightenment graphics raster evas canvas 
multimida playback xine gstreamer',
       classifiers=trove_classifiers,
       packages=find_packages(),
-      include_dirs=include_dirs,
       install_requires=['python-evas>=0.1.1'],
       setup_requires=['python-evas>=0.1.1'],
       ext_modules=[emotionmodule],
       zip_safe=False,
+      cmdclass={'build_ext': emotion_build_ext,},
       )



-------------------------------------------------------------------------
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