Skip to content

Commit

Permalink
- Generate python stubs in stubs folder.
Browse files Browse the repository at this point in the history
- Added the setup.py script to install python API.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@11453 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Mar 16, 2012
1 parent 60cef44 commit b5a78a9
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 989 deletions.
7 changes: 4 additions & 3 deletions Compiler/Makefile.in
Expand Up @@ -66,9 +66,10 @@ $(PROGP): omc_profiler

install_scripts:
cd scripts; cp $(SCRIPT_FILES) ../$(builddir_scripts)
cd scripts; cp -p ompython/OMPython.py ../$(builddir_scripts)/ompython/
cd scripts; cp -p ompython/README.txt ../$(builddir_scripts)/ompython/
cd scripts; cp -p ompython/OMParser/__init__.py ../$(builddir_scripts)/ompython/OMParser/
cd scripts; cp -p PythonInterface/README.txt ../$(builddir_scripts)/PythonInterface/
cd scripts; cp -p PythonInterface/setup.py ../$(builddir_scripts)/PythonInterface/
cd scripts; cp -p PythonInterface/OMPython/__init__.py ../$(builddir_scripts)/PythonInterface/OMPython/
cd scripts; cp -p PythonInterface/OMPython/OMParser/__init__.py ../$(builddir_scripts)/PythonInterface/OMPython/OMParser/

install: install_scripts $(PROG)
cp OpenModelicaBootstrappingHeader.h $(top_builddir)/build/include/omc/
Expand Down
4 changes: 2 additions & 2 deletions Compiler/runtime/Makefile.common
Expand Up @@ -48,9 +48,9 @@ libomcruntime.a : $(OMC_OBJ)

omc_communication.cc omc_communication.h : omc_communication.idl
$(IDL) omc_communication.idl
$(builddir_share)/omc/scripts/ompython/omc_communication_idl.py : omc_communication.idl
$(builddir_share)/omc/scripts/PythonInterface/stubs/omc_communication_idl.py : omc_communication.idl
# Cannot force macports to install omniORB +python2X as a dependency. We don't know what python is the default, and we cannot force variant dependencies, so let's just let this one slide if it fails, eh?
$(IDLPYTHON) -C$(builddir_share)/omc/scripts/ompython omc_communication.idl || test "`uname`" = "Darwin"
$(IDLPYTHON) -C$(builddir_share)/omc/scripts/PythonInterface/stubs omc_communication.idl || test "`uname`" = "Darwin"

omc_communication.h: omc_communication_impl.cpp corbaimpl.cpp

Expand Down
2 changes: 1 addition & 1 deletion Compiler/runtime/Makefile.in
Expand Up @@ -13,7 +13,7 @@ ifdef USE_CORBA
CORBASRC = omc_communication.cc omc_communication_impl.cpp Corba_rml.cpp
CORBAINCL = @CORBACFLAGS@
OMCCORBASRC = omc_communication.o omc_communication_impl.o Corba_omc.o
IDLPYTHONTARGET = $(builddir_share)/omc/scripts/ompython/omc_communication_idl.py
IDLPYTHONTARGET = $(builddir_share)/omc/scripts/PythonInterface/stubs/omc_communication_idl.py
else
CORBASRC = corbaimpl_stub.cpp
CORBAINCL =
Expand Down

0 comments on commit b5a78a9

Please sign in to comment.