Enlightenment CVS committal Author : ulisses Project : e17 Module : proto/python-efl
Dir : e17/proto/python-efl/python-ecore Modified Files: README setup.cfg setup.py Log Message: Organized and changed code to use Cython instead of Pyrex. - moved headers (.pxd) to include directory - changed README and setup.* to use Cython - using python.pxd from python-evas - fixed some typos =================================================================== RCS file: /cvs/e/e17/proto/python-efl/python-ecore/README,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- README 2 Sep 2007 15:11:54 -0000 1.5 +++ README 30 Sep 2007 22:18:51 -0000 1.6 @@ -5,7 +5,7 @@ * Evas >= 0.9.9.040 * Ecore >= 0.9.9.040 - * Pyrex >= 0.9.5 + * Cython from Mercurial repository (http://www.cython.org/hg/) * Python-Evas * Python >= 2.4 * Python-setuptools >= 0.6_rc3 @@ -25,7 +25,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 @@ -37,18 +37,19 @@ If you get the following error during build_ext: - ecore/ecore.c_ecore.c:14:31: error: python_evas_utils.h: No such file or directory + ecore/ecore.c_ecore.pyx:1:8: 'evas.python.pxd' not found -Means that either python_evas_utils.h was not installed or it is placed +Means that either evas/python.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 $PYTHON_EVAS_UTILS_H_PATH + python setup.py build_ext --include-dirs <path> =================================================================== RCS file: /cvs/e/e17/proto/python-efl/python-ecore/setup.cfg,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- setup.cfg 24 Jul 2007 14:42:04 -0000 1.4 +++ setup.cfg 30 Sep 2007 22:18:51 -0000 1.5 @@ -6,6 +6,3 @@ build_requires=ecore >= 0.9.9.040, evas >= 0.9.9.040 group=System Environment/Libraries release=1 - -[build_ext] -include_dirs=ecore:ecore/evas =================================================================== RCS file: /cvs/e/e17/proto/python-efl/python-ecore/setup.py,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- setup.py 4 Sep 2007 18:50:39 -0000 1.13 +++ setup.py 30 Sep 2007 22:18:51 -0000 1.14 @@ -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): @@ -34,15 +33,14 @@ 'ecore/ecore.c_ecore_idle_enterer.pxi', 'ecore/ecore.c_ecore_idle_exiter.pxi', 'ecore/ecore.c_ecore_fd_handler.pxi', - 'ecore/ecore.c_ecore.pxd', - 'ecore/python.pxd', + 'include/ecore/c_ecore.pxd', ], **pkgconfig('"ecore >= 0.9.9.040"')) + ecoreevasmodule = Extension('ecore.evas.c_ecore_evas', sources=['ecore/evas/ecore.evas.c_ecore_evas.pyx'], - depends=['ecore/evas/ecore.evas.c_ecore_evas.pxd', - 'ecore/evas/ecore.evas.c_ecore_evas_base.pxi', + depends=['ecore/evas/ecore.evas.c_ecore_evas_base.pxi', 'ecore/evas/ecore.evas.c_ecore_evas_software_x11.pxi', 'ecore/evas/ecore.evas.c_ecore_evas_gl_x11.pxi', 'ecore/evas/ecore.evas.c_ecore_evas_xrender_x11.pxi', @@ -50,11 +48,10 @@ # 'ecore/evas/ecore.evas.c_ecore_evas_directfb.pxi', 'ecore/evas/ecore.evas.c_ecore_evas_buffer.pxi', 'ecore/evas/ecore.evas.c_ecore_evas_software_x11_16.pxi', - 'ecore/python.pxd', + 'include/ecore/evas/c_ecore_evas.pxd', ], **pkgconfig('"ecore-evas >= 0.9.9.040"')) -include_dirs = [os.path.join(python_inc, "python-evas")] trove_classifiers = [ "Development Status :: 3 - Alpha", @@ -70,6 +67,7 @@ "Topic :: Software Development :: User Interfaces", ] + long_description = """\ Python bindings for Ecore and Ecore/Evas, part of Enlightenment Foundation Libraries. @@ -87,6 +85,13 @@ other parameters. """ + +class ecore_build_ext(build_ext): + def finalize_options(self): + build_ext.finalize_options(self) + self.include_dirs.extend(['include', get_python_inc()]) + + setup(name='python-ecore', version='0.1.1', license='BSD', @@ -100,7 +105,7 @@ packages=find_packages(), install_requires=['python-evas>=0.1.1'], setup_requires=['python-evas>=0.1.1'], - include_dirs=include_dirs, ext_modules=[ecoremodule, ecoreevasmodule], zip_safe=False, + cmdclass={'build_ext': ecore_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