Skip to content

Commit

Permalink
Updates SWIG to 3.0.2 and fixes issue in algorithms interface file to…
Browse files Browse the repository at this point in the history
… work with new SWIG.
  • Loading branch information
scottpurdy committed Nov 3, 2014
1 parent 5aa6058 commit 17d2253
Show file tree
Hide file tree
Showing 706 changed files with 31,327 additions and 13,726 deletions.
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ html/

Servers/

# Build files
build/
include/
bin/
lib/

conf/default/nupic-site.xml

# /
Expand Down
7 changes: 1 addition & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -535,13 +535,8 @@ string(REGEX REPLACE "\\\\" "/" NUMPY_INCLUDE_DIR ${NUMPY_INCLUDE_DIR})
execute_process(COMMAND ${PYTHON} -c "import sys;import numpy;sys.stdout.write(numpy.__version__)"
OUTPUT_VARIABLE NUMPY_VERSION)

#
# Checks if Swig is installed and gets its variables.
# Minimum version of Swig is 1.3.36 -- earlier versions *will* fail
# Later versions greater than 2.0.3 also *will* fail (SWIGPY_SLICE_ARG bug)
#
set(SWIG_EXECUTABLE "${REPOSITORY_DIR}/external/${NTA_PLATFORM_OS}/bin/swig")
set(SWIG_DIR "${REPOSITORY_DIR}/external/common/share/swig/1.3.36")
set(SWIG_DIR "${REPOSITORY_DIR}/external/common/share/swig/3.0.2")
execute_process(COMMAND ${SWIG_EXECUTABLE} -version OUTPUT_VARIABLE SWIG_VERSION)
string(REGEX REPLACE ".*SWIG Version[^0-9.]*\([0-9.]+\).*" "\\1" SWIG_VERSION ${SWIG_VERSION})
include(${CMAKE_ROOT}/Modules/UseSWIG.cmake)
Expand Down
7 changes: 7 additions & 0 deletions extensions/bindings/py/algorithms/AlgorithmsImpl.i
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ _ALGORITHMS = _algorithms
#include <py_support/PythonStream.hpp>
#include <py_support/PyHelpers.hpp>

// Hack to fix SWIGPY_SLICE_ARG not found bug
#if PY_VERSION_HEX >= 0x03020000
# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj))
#else
# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj))
#endif

/// %template(_InSynapse) nta::algorithms::Cells3::InSynapse<nta::UInt32, nta::Real32>;
/// %template(Segment3_32) nta::algorithms::Cells3::Segment<nta::UInt32, nta::Real32>;
/// %template(Cell3_32) nta::algorithms::Cells3::Cell<nta::UInt32, nta::Real32>;
Expand Down
175 changes: 0 additions & 175 deletions external/common/share/swig/1.3.36/csharp/std_map.i

This file was deleted.

Loading

0 comments on commit 17d2253

Please sign in to comment.