Enlightenment CVS committal Author : ulisses Project : e17 Module : proto/python-efl
Dir : e17/proto/python-efl/python-edje 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 - using python.pxd from python-evas - fixed namespace issue =================================================================== RCS file: /cvs/e/e17/proto/python-efl/python-edje/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 22:35:31 -0000 1.4 @@ -9,7 +9,7 @@ * Ecore >= 0.9.9.040 (indirect, Edje dependency) * Evas >= 0.9.9.040 * Python-Evas - * Pyrex >= 0.9.5 + * Cython from Mercurial repository (http://www.cython.org/hg/) * Python >= 2.4 * Python-setuptools >= 0.6_rc3 @@ -21,7 +21,6 @@ Build:: - python setup.py build_ext python setup.py build Install:: @@ -29,7 +28,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 @@ -41,19 +40,19 @@ If you get the following error during build_ext: - edje.c_edje.pxd:1:8: 'evas.c_evas.pxd' not found - edje.c_edje.pxd:104:4: 'Evas_List' is not declared + include/edje/c_edje.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-edje/setup.py,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- setup.py 4 Sep 2007 18:50:39 -0000 1.6 +++ setup.py 30 Sep 2007 22:35:31 -0000 1.7 @@ -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,13 +28,12 @@ edjemodule = Extension('edje.c_edje', sources=['edje/edje.c_edje.pyx', ], - depends=['edje/edje.c_edje.pxd', - 'edje/python.pxd', + depends=['edje/edje.c_edje_object.pxi', + 'edje/edje.c_edje_message.pxi', + 'include/edje/c_edje.pxd', ], **pkgconfig('"edje >= 0.5.0.040"')) -include_dirs = [os.path.join(python_inc, "python-evas")] - trove_classifiers = [ "Development Status :: 3 - Alpha", @@ -51,6 +49,7 @@ "Topic :: Software Development :: User Interfaces", ] + long_description = """\ Python bindings for Edje, part of Enlightenment Foundation Libraries. @@ -93,6 +92,12 @@ """ +class edje_build_ext(build_ext): + def finalize_options(self): + build_ext.finalize_options(self) + self.include_dirs.extend(['include', get_python_inc()]) + + setup(name='python-edje', version='0.1.1', license='BSD', @@ -106,7 +111,7 @@ packages=find_packages(), install_requires=['python-evas>=0.1.1'], setup_requires=['python-evas>=0.1.1'], - include_dirs=include_dirs, ext_modules=[edjemodule], zip_safe=False, + cmdclass={'build_ext': edje_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