You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2016/02/09 18:11:29 UTC

[12/12] lucy-clownfish git commit: Merge branch 'CLOWNFISH-66-stub-py-runtime'

Merge branch 'CLOWNFISH-66-stub-py-runtime'

Stub out Python bindings for the Clownfish runtime.

* Compile the core runtime code into a static archive.
* Stub out Python versions of host-specific functions.
* Define the hostdefs for Python.
* Autogenerate a C module file.
* Add a simple Python test file which loads the module.
* Add `setup.py` with `build`, `test`, and `clean` targets.

To test, run `python3 setup.py test` under `compiler/python`, then again
under `runtime/python`. Afterwards, clean up using `python3 setup.py
clean --all`.

The build is fragile and incomplete, but the test passes on OS X with
Python 3.5.1.

This closes #55.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/9debabe4
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/9debabe4
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/9debabe4

Branch: refs/heads/master
Commit: 9debabe4dba6fce1d0c54f898d302fbfb5d151e7
Parents: c75ee92 bebd244
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Tue Feb 9 09:07:33 2016 -0800
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Tue Feb 9 09:07:33 2016 -0800

----------------------------------------------------------------------
 compiler/include/CFC.h                    |   2 +
 compiler/python/clownfish/_cfc.c          | 400 -------------------
 compiler/python/clownfish/cfc/__init__.py |  29 --
 compiler/python/setup.py                  |   9 +-
 compiler/python/src/cfc/__init__.py       |  29 ++
 compiler/python/src/cfc/_cfc.c            | 515 +++++++++++++++++++++++++
 compiler/python/test/test_cfc.py          |   2 +-
 compiler/src/CFCPyTypeMap.c               |  71 ++++
 compiler/src/CFCPyTypeMap.h               |  43 +++
 compiler/src/CFCPython.c                  | 175 +++++++++
 compiler/src/CFCPython.h                  |  63 +++
 runtime/common/charmonizer.c              |  11 +-
 runtime/common/charmonizer.main           |  11 +-
 runtime/python/cfext/CFBind.c             | 241 ++++++++++++
 runtime/python/cfext/CFBind.h             |  32 ++
 runtime/python/setup.py                   | 219 +++++++++++
 runtime/python/src/clownfish/__init__.py  |  18 +
 runtime/python/test/test_clownfish.py     |  27 ++
 18 files changed, 1461 insertions(+), 436 deletions(-)
----------------------------------------------------------------------