]> SALOME platform Git repositories - tools/yacsgen.git/commitdiff
Salome HOME
CCAR: add example with component and doc only (pydoc1)
authorcaremoli <caremoli>
Wed, 9 Feb 2011 08:29:00 +0000 (08:29 +0000)
committercaremoli <caremoli>
Wed, 9 Feb 2011 08:29:00 +0000 (08:29 +0000)
reference all files to $HOME in context.py and makefile.inc files

Examples/context.py
Examples/makefile.inc
Examples/pydoc1/Makefile [new file with mode: 0644]
Examples/pydoc1/components.py [new file with mode: 0644]
Examples/pydoc1/exec.png [new file with mode: 0644]
Examples/pydoc1/index.rst [new file with mode: 0644]
Examples/pydoc1/using.rst [new file with mode: 0644]

index d1e63ad06502a642225ee27e7e4e964694059728..3b85cbda577c0b83976be87d3c8b20c4e2cb39f4 100644 (file)
 import os,sys
 sys.path.insert(0,"../..")
 
-KERNEL_ROOT_DIR=os.getenv("KERNEL_ROOT_DIR","/local/cchris/Salome/Install/KERNEL_V6")
-GUI_ROOT_DIR=os.getenv("GUI_ROOT_DIR","/local/cchris/Salome/Install/GUI_V6")
-YACS_ROOT_DIR=os.getenv("YACS_ROOT_DIR","/local/cchris/Salome/Install/YACS_V6")
-GEOM_ROOT_DIR=os.getenv("GEOM_ROOT_DIR","/local/cchris/Salome/Install/GEOM_V6")
+SALOME_ROOT=os.path.expanduser("~/Salome/Install")
+SALOME_PREREQ=os.path.expanduser("~/.packages.d/envSalome6main")
+
+KERNEL_ROOT_DIR=os.getenv("KERNEL_ROOT_DIR",os.path.join(SALOME_ROOT,"KERNEL_V6"))
+GUI_ROOT_DIR=os.getenv("GUI_ROOT_DIR",os.path.join(SALOME_ROOT,"GUI_V6"))
+YACS_ROOT_DIR=os.getenv("YACS_ROOT_DIR",os.path.join(SALOME_ROOT,"YACS_V6"))
+GEOM_ROOT_DIR=os.getenv("GEOM_ROOT_DIR",os.path.join(SALOME_ROOT,"GEOM_V6"))
 
 context={'update':1,
          "makeflags":"",
-         "prerequisites":"/local/cchris/.packages.d/envSalome6main",
+         "prerequisites":SALOME_PREREQ,
          "kernel":KERNEL_ROOT_DIR,
          "gui":GUI_ROOT_DIR,
          "geom":GEOM_ROOT_DIR,
         }
 
 
-aster_home="/local/cchris/Aster/V10.1/aster"
+aster_home=os.path.expanduser("~/Aster/V10.1/aster")
 aster_version="STA10.1"
-#aster_home="/local/cchris/Aster/V10/Install"
-#aster_version="STA10.0"
-
-
index e659cb24bad25a9d78d1e1ebb43941635b27cae1..d3e354bcf2da0461ded9e4fd9aa14cfafc2b0ffe 100644 (file)
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-KERNEL_ROOT_DIR=/local/cchris/Salome/Install/KERNEL_V6
+KERNEL_ROOT_DIR=$(HOME)/Salome/Install/KERNEL_V6
 
-ASTER_ROOT=/local/cchris/Aster/V10.1/aster
+ASTER_ROOT=$(HOME)/Aster/V10.1/aster
 ASTER_VERSION=STA10.1
-#ASTER_ROOT=/local/cchris/Aster/V10/Install
-#ASTER_VERSION=STA10.0
 
 FC=gfortran
diff --git a/Examples/pydoc1/Makefile b/Examples/pydoc1/Makefile
new file mode 100644 (file)
index 0000000..fddce0a
--- /dev/null
@@ -0,0 +1,21 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+clean:
+       rm -rf *.pyc pycompos_SRC pycompos_SRC.bak appli appli.bak install install.bak traceExec_proc
diff --git a/Examples/pydoc1/components.py b/Examples/pydoc1/components.py
new file mode 100644 (file)
index 0000000..a10f5bf
--- /dev/null
@@ -0,0 +1,55 @@
+#  Copyright (C) 2009-2010  EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+import os
+
+#import context from ..
+execfile("../context.py")
+
+from module_generator import *
+
+defs="""
+"""
+
+body="""
+      c=a+b
+      d=a-b
+"""
+
+c1=PYComponent("pycompos",services=[
+          Service("s1",inport=[("a","double"),("b","double")],
+                       outport=[("c","double"),("d","double")],
+                       defs=defs,body=body,
+                 ),
+         ],
+         )
+
+modul=Module("pycompos",components=[c1],prefix="./install",
+              doc=["*.rst","*.png",],
+            )
+
+g=Generator(modul,context)
+g.generate()
+g.bootstrap()
+g.configure()
+g.make()
+g.install()
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
+
+
diff --git a/Examples/pydoc1/exec.png b/Examples/pydoc1/exec.png
new file mode 100644 (file)
index 0000000..16a20c1
Binary files /dev/null and b/Examples/pydoc1/exec.png differ
diff --git a/Examples/pydoc1/index.rst b/Examples/pydoc1/index.rst
new file mode 100644 (file)
index 0000000..ff84846
--- /dev/null
@@ -0,0 +1,23 @@
+.. pycompos documentation master file, created by
+   sphinx-quickstart on Sun Sep 19 16:20:14 2010.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Welcome to pycompos's documentation!
+=======================================
+
+Contents:
+
+.. toctree::
+   :maxdepth: 2
+
+   using.rst
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
diff --git a/Examples/pydoc1/using.rst b/Examples/pydoc1/using.rst
new file mode 100644 (file)
index 0000000..8321bf3
--- /dev/null
@@ -0,0 +1,20 @@
+
+GUI components
+===================
+
+Object Browser
+--------------
+The Object Browser is a reusable GUI component.
+
+The Object Browser is only used to publish the run of the schema as a whole.
+
+
+.. centered:: **Object Browser tab**
+
+The Object Browser is in a tab, with tree_view
+
+Other
+----------
+.. image:: exec.png
+  :align: center
+