- Prerequisite: The GAUSS Engine must first be installed. The default paths will be
C:\mteng19for Windows and
~/mteng19for non-Windows installations.
- You must have a g.gkf file, normally provided by Aptech Systems when a license is acquired. Please contact us if you need this. This file is what will allow a third-party user to run your GAUSS code without using your own license.
- This assumes you also have the Python package built from the gsoop project. The topics mentioned on this page were tested with Python 3.6 on Windows
The following sub-sections show the contents of the files we'll be dealing with.
redist.txt lists the minimum required GAUSS dependencies for redistribution.
redist.bat is a simple script for copying the specified files into a new directory for staging purposes.
The GAUSS file must predeclare any symbols that we will be modifying through Python. They can be declared with the
declare keyword as shown, or through a simple assignment call (
x = 0) if you wish to have default values for them.
The Python module we are using for this testing scenario. This specific implementation assumes that the MTENGHOME environment variable home is set. Two other initialization options are shown here if desired.
Unzip the redist.zip file into your GAUSS installation directory.
Set Environment Variables
Set up the paths you'd like to use for the rest of the commands, including adding Python to your system PATH.
C:\>set PATH=C:\Python36;%PATH% C:\>set DESTDIR=C:\development\GEPythonProject C:\>set MTENGHOME=C:\mteng19
C:\mteng19>redist.bat %DESTDIR% C:\mteng19>xcopy myproc.gss.gcg %DESTDIR% C:\mteng19>xcopy test_proc.py %DESTDIR%
Your directory structure should look like this now:
C:\ └── development\ └── GEPythonProject\ ├── cityhash.dll ├── cql.dll ├── cql_stubs.dll ├── gauss.cfg ├── gauss.dll ├── g.gkf ├── gla.dll ├── gsgraphics.dll ├── gsgraphics_stubs.dll ├── hdf5.dll ├── iconv.dll ├── icudt57.dll ├── icuin57.dll ├── icuuc57.dll ├── libiomp5md.dll ├── libxl.dll ├── mtengrt.dll ├── myproc.gss.gcg ├── pthreadVC2.dll ├── readstat.dll ├── szip.dll ├── tbb.dll ├── test_proc.py ├── xls.dll └── zlib.dll
Install Python GE/GERT package
C:\mteng19>python.exe -m easy_install ge-0.3.1-py3.6-win-amd64.egg
Test final directory and Python file
C:\mteng19>chdir %DESTDIR% C:\development\GEPythonProject>set MTENGHOME=%CD% C:\development\GEPythonProject>python.exe test_proc.py
C:\>set PATH=C:\Python36;%PATH% C:\>set DESTDIR=C:\development\GEPythonProject C:\>set MTENGHOME=C:\mteng19 C:\>chdir %MTENGHOME% C:\mteng19>gc.exe myproc.gss C:\mteng19>redist.bat %DESTDIR% C:\mteng19>xcopy myproc.gss.gcg %DESTDIR% C:\mteng19>xcopy test_proc.py %DESTDIR% C:\mteng19>python.exe -m easy_install ge-0.3.1-py3.6-win-amd64.egg C:\mteng19>chdir %DESTDIR% C:\development\GEPythonProject>set MTENGHOME=%CD% C:\development\GEPythonProject>python.exe test_proc.py
After successfully verifying that the test_proc.py file runs, you can now zip up that entire directory and distribute/run it on third-party systems.
Updating GAUSS code
To update the GAUSS code, make the desired changes, recompile myproc.gss and copy it to the staging directory.