Opened 17 years ago

Closed 16 years ago

#39 closed task (fixed)

FDO API: Add Python Wrappers for API

Reported by: gregboone Owned by: gregboone
Priority: major Milestone: 3.3.0
Component: FDO API Version: 3.3.0
Severity: 3 Keywords: Python SWIG FDO
Cc: jacklee External ID:

Description

A set of Python wrappers for the FDO API are available. The wrappers were generated using SWIG. These wrappers will be submitted into the FDO subversion and incorporated into the FDO build process.

Change History (6)

comment:1 by gregboone, 17 years ago

Status: newassigned

comment:2 by gregboone, 17 years ago

Cc: jacklee added
Keywords: Python SWIG FDO added

comment:3 by gregboone, 17 years ago

Author: gregboone Date: 2007-03-13 19:42:45 -0400 (Tue, 13 Mar 2007) New Revision: 2682

Added:

trunk/Fdo/Python/ trunk/Fdo/Python/FdoWrapper.vcproj trunk/Fdo/Python/Fdo_Inc/ trunk/Fdo/Python/Fdo_Inc/Common/ trunk/Fdo/Python/Fdo_Inc/Common/StringCollection.h trunk/Fdo/Python/Fdo_Inc/Common/Vector.h trunk/Fdo/Python/Fdo_Inc/Fdo/ trunk/Fdo/Python/Fdo_Inc/Fdo/Commands/ trunk/Fdo/Python/Fdo_Inc/Fdo/Commands/LongTransaction/ trunk/Fdo/Python/Fdo_Inc/Fdo/Commands/LongTransaction/LongTransactionConstants.h trunk/Fdo/Python/Fdo_Inc/Fdo/Xml/ trunk/Fdo/Python/Fdo_Inc/Fdo/Xml/ClassMapping.h trunk/Fdo/Python/Fdo_Inc/Fdo/Xml/ElementMapping.h trunk/Fdo/Python/Fdo_Inc/Fdo/Xml/FeatureFlags.h trunk/Fdo/Python/Fdo_Inc/Fdo/Xml/Flags.h trunk/Fdo/Python/Fdo_Inc/Fdo/Xml/SpatialContextFlags.h trunk/Fdo/Python/Inc/ trunk/Fdo/Python/Inc/Common/ trunk/Fdo/Python/Inc/Common/FdoProxyConnectionManager.h trunk/Fdo/Python/Inc/Common/FdowStd.h trunk/Fdo/Python/Inc/Common/StringBuffer.h trunk/Fdo/Python/Inc/Common/utils.h trunk/Fdo/Python/Inc/Fdo/ trunk/Fdo/Python/Inc/Fdo/PhysicalSchemaMappingCasts.h trunk/Fdo/Python/Inc/stdafx.h trunk/Fdo/Python/PythonWrappers.sln trunk/Fdo/Python/README.txt trunk/Fdo/Python/Resource/ trunk/Fdo/Python/Resource/FdoWrapper.rc trunk/Fdo/Python/Resource/FdoWrapperResource.h trunk/Fdo/Python/Src/ trunk/Fdo/Python/Src/Common/ trunk/Fdo/Python/Src/Common/FdoProxyConnectionManager.cpp trunk/Fdo/Python/Src/Common/StringBuffer.cpp trunk/Fdo/Python/Src/Common/stdafx.cpp trunk/Fdo/Python/Src/Common/utils.cpp trunk/Fdo/Python/Src/Fdo/ trunk/Fdo/Python/Src/Fdo/PhysicalSchemaMappingCasts.cpp trunk/Fdo/Python/Swig/ trunk/Fdo/Python/Swig/Common/ trunk/Fdo/Python/Swig/Common/CommonExceptions.i trunk/Fdo/Python/Swig/Common/CommonInit.i trunk/Fdo/Python/Swig/Common/CommonTypemaps.i trunk/Fdo/Python/Swig/Fdo/ trunk/Fdo/Python/Swig/Fdo/CommonIncludes.i trunk/Fdo/Python/Swig/Fdo/FdoIncludes.i trunk/Fdo/Python/Swig/Fdo/FdoPointercasts.i trunk/Fdo/Python/Swig/Fdo/FdoTypemaps.i trunk/Fdo/Python/Swig/Fdo/GeometryIncludes.i trunk/Fdo/Python/Swig/Fdo/Main.i trunk/Fdo/Python/UnitTest/ trunk/Fdo/Python/UnitTest/Input/ trunk/Fdo/Python/UnitTest/Input/UnitTestConfig.ini trunk/Fdo/Python/UnitTest/Input/clock.avi trunk/Fdo/Python/UnitTest/Lib/ trunk/Fdo/Python/UnitTest/Lib/SdfConnectionFactory.py trunk/Fdo/Python/UnitTest/Lib/SdfFileCreationParams.py trunk/Fdo/Python/UnitTest/Lib/SdfFileFactory.py trunk/Fdo/Python/UnitTest/SetEnvironment.bat trunk/Fdo/Python/UnitTest/Src/ trunk/Fdo/Python/UnitTest/Src/ApplySchemaTest.py trunk/Fdo/Python/UnitTest/Src/CapabilitiesTest.py trunk/Fdo/Python/UnitTest/Src/ClientServicesTest.py trunk/Fdo/Python/UnitTest/Src/CommandTest.py trunk/Fdo/Python/UnitTest/Src/LOBTest.py trunk/Fdo/Python/UnitTest/Src/StringBufferTest.py trunk/Fdo/Python/UnitTest/Src/TypeMapTest.py trunk/Fdo/Python/UnitTest/Src/main.py trunk/Fdo/Python/UnitTest/UnitTests.cmd trunk/Fdo/Python/UnitTest/providers.xml trunk/Fdo/Python/build.cmd trunk/Thirdparty/gsar/ trunk/Thirdparty/gsar/bin/ trunk/Thirdparty/gsar/bin/gsar.exe trunk/Thirdparty/gsar/contrib/ trunk/Thirdparty/gsar/contrib/gsar/ trunk/Thirdparty/gsar/contrib/gsar/1.12/ trunk/Thirdparty/gsar/contrib/gsar/1.12/depends-GnuWin32.lst trunk/Thirdparty/gsar/contrib/gsar/1.12/gsar-1.12-GnuWin32.README trunk/Thirdparty/gsar/contrib/gsar/1.12/gsar-1.12/ trunk/Thirdparty/gsar/contrib/gsar/1.12/gsar-1.12/copying trunk/Thirdparty/gsar/man/ trunk/Thirdparty/gsar/man/cat1/ trunk/Thirdparty/gsar/man/cat1/gsar.1.txt trunk/Thirdparty/gsar/manifest/ trunk/Thirdparty/gsar/manifest/gsar-1.12-bin.mft trunk/Thirdparty/gsar/manifest/gsar-1.12-bin.ver

Modified:

trunk/Fdo/build.bat trunk/License_README.txt trunk/OpenSourceBuildREADME.txt trunk/build.bat trunk/setenvironment.bat

Log: Ticket #39 - Add Python Wrappers for FDO API (Windows Only)

comment:4 by gregboone, 17 years ago

This submission adds Python scripting support to the FDO API. The FDO build process now allows for the generation of a set of Python wrapper scripts for the FDO API using SWIG.

Python support is currently supported on Windows only. Support on Linux will be implemented in a separate submission.

In order to build the Python wrappers, users will have to install Python and SWIG.

To install SWIG, refer to: http://www.swig.org/
To install Python, refer to: http://www.python.org/

The FDO python scripts have been tested using SWIG 1.3.31 and Python 2.4.4.

NOTE: Python 2.5 is not currently supported.

Once SWIG and Python have been installed, set the PYTHON_HOME and SWIG_HOME environment variables to point to the Python and SWIG installation locations. These variables are contained in the .\setenvironment.bat script with the default installation directories of:

PYTHON - C:\Program Files\Python24
SWIG - C:\Program Files\swigwin-1.3.31

Building the python scripts is an option in the FDO scripts and must be explicitly invoked. To build the Python scripts, follow the following steps:

call setenvironment.bat
call build –p=build OR call build –p=build –w=fdo

To run the python unit tests,

cd Fdo\Python\UnitTest
call UnitTests.cmd

comment:5 by gregboone, 17 years ago

This submission adds additional Python scripting support to the FDO API. The FDO build process now allows for the generation of a set of Python wrapper scripts for the FDO API using SWIG on Linux.

In order to build the Python wrappers, users will have to install Python and SWIG.

To install SWIG, refer to: http://www.swig.org/ To install Python, refer to: http://www.python.org/

The FDO python scripts have been tested using SWIG 1.3.31 and Python 2.4.4.

NOTE: Python 2.5 is not currently supported.

Once SWIG and python have been installed, set the PYTHON_LIB_PATH and PYTHON_INCLUDE_PATH environment variables to point to the locations of the Python Include and Library files.

e.g.

export PYTHON_INCLUDE_PATH=/usr/include/python2.4 export PYTHON_LIB_PATH=/usr/lib/python2.4

These variables are maintained in the [FDO OpenSource]/setenvironment.sh script.

In order to build the FDO Python Wrappers, build and install the FDO libraries in /usr/local/fdo-3.3.0/lib using the directions outlined in OpenSourceBuild__README.txt.

cd [FDO OpenSource] source ./setenvironment.sh ./build_thirdparty.sh ./build_linux.sh

Once the FDO install is complete, cd to [FDO OpenSource]/Fdo/Python and run the build_linux.sh script. The Python components will be also be installed in /usr/local/fdo-3.3.0/lib.

cd [FDO OpenSource]/Fdo/Python ./build_linux.sh

To run the python unit tests,

cd [FDO OpenSource]/Fdo/Python/UnitTest ./UnitTests.sh

"Comments"

1) The Python script generation process is not yet supported from the top level [FDO OpenSource]/build_linux.sh script

2) The Python script generation process uses a hard-coded Makefile and does yet support configure.

3) The install places the FDO.py script into /usr/local/fdo-3.3.0/lib. This needs to be verified.


Author: gregboone

Date: 2007-03-19 23:28:38 -0400 (Mon, 19 Mar 2007) New Revisions: 2691-2693, 2696-2699

Added:

trunk/Fdo/Python/Makefile trunk/Fdo/Python/build_linux.sh trunk/Fdo/Python/UnitTest/UnitTests.sh trunk/Fdo/Python/Inc/Common/StringCollection.h trunk/Fdo/Python/Inc/Common/Vector.h

Modified:

trunk/setenvironment.sh trunk/Fdo/Python/Inc/stdafx.h trunk/Fdo/Python/Src/Common/StringBuffer.cpp trunk/Fdo/Python/UnitTest/Src/ApplySchemaTest.py trunk/Fdo/Python/UnitTest/Src/ClientServicesTest.py trunk/Fdo/Python/UnitTest/Src/LOBTest.py trunk/Fdo/Python/README.txt trunk/OpenSourceBuild__README.txt

comment:6 by gregboone, 16 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.