From c1d00c1443f943cd0ddb0b382491b3dd2375e967 Mon Sep 17 00:00:00 2001 From: AnuGayan Date: Wed, 2 Jan 2019 13:34:00 +0530 Subject: [PATCH] Add PySiddhi support for siddhi 4.3.x and minor fixes --- Tests/SPTests/EventSimulatorTests.py | 22 +++++++++---------- .../Resources/Extensions4/pom.xml | 2 +- __PySiddhi4Proxy/pom.xml | 12 ++++++++-- __PySiddhi4Proxy/threadfix_c_code/makefile | 3 ++- setup.py | 8 ++++--- 5 files changed, 29 insertions(+), 18 deletions(-) diff --git a/Tests/SPTests/EventSimulatorTests.py b/Tests/SPTests/EventSimulatorTests.py index eaa1076..7043b2e 100644 --- a/Tests/SPTests/EventSimulatorTests.py +++ b/Tests/SPTests/EventSimulatorTests.py @@ -349,7 +349,7 @@ def testDBSimulationOneSource(self): "simulationType": "DATABASE_SIMULATION", "streamName": "FooStream", "siddhiAppName": "TestSiddhiApp", - "dataSourceLocation": "jdbc:mysql://localhost:3306/DatabaseFeedSimulation", + "dataSourceLocation": "jdbc:mysql://localhost:3306/DatabaseFeedSimulation?useSSL=false", "driver": "com.mysql.jdbc.Driver", "username": "root", "password": "root", @@ -372,7 +372,7 @@ def testDBSimulationOneSource(self): s1 = SimulationSource(simulationType=SimulationSource.Type.DATABASE_SIMULATION) s1.streamName = "FooStream" s1.siddhiAppName = "TestSiddhiApp" - s1.dataSourceLocation = "jdbc:mysql://localhost:3306/DatabaseFeedSimulation" + s1.dataSourceLocation = "jdbc:mysql://localhost:3306/DatabaseFeedSimulation?useSSL=false" s1.driver = "com.mysql.jdbc.Driver" s1.username = "root" s1.password = "root" @@ -411,7 +411,7 @@ def testDBSimulationTwoSource(self): s1 = SimulationSource(simulationType=SimulationSource.Type.DATABASE_SIMULATION) s1.streamName = "FooStream" s1.siddhiAppName = "TestSiddhiApp" - s1.dataSourceLocation = "jdbc:mysql://localhost:3306/DatabaseFeedSimulation" + s1.dataSourceLocation = "jdbc:mysql://localhost:3306/DatabaseFeedSimulation?useSSL=false" s1.driver = "com.mysql.jdbc.Driver" s1.username = "root" s1.password = "root" @@ -438,7 +438,7 @@ def testDBSimulationTwoSource(self): "simulationType": "DATABASE_SIMULATION", "streamName": "FooStream", "siddhiAppName": "TestSiddhiApp", - "dataSourceLocation": "jdbc:mysql://localhost:3306/DatabaseFeedSimulation", + "dataSourceLocation": "jdbc:mysql://localhost:3306/DatabaseFeedSimulation?useSSL=false", "driver": "com.mysql.jdbc.Driver", "username": "root", "password": "root", @@ -450,7 +450,7 @@ def testDBSimulationTwoSource(self): "simulationType": "DATABASE_SIMULATION", "streamName": "FooStream", "siddhiAppName": "TestSiddhiApp", - "dataSourceLocation": "jdbc:mysql://localhost:3306/Simulation", + "dataSourceLocation": "jdbc:mysql://localhost:3306/Simulation?useSSL=false", "driver": "com.mysql.jdbc.Driver", "username": "root", "password": "root", @@ -469,7 +469,7 @@ def testDBSimulationTwoSource(self): s1 = SimulationSource(simulationType=SimulationSource.Type.DATABASE_SIMULATION) s1.streamName = "FooStream" s1.siddhiAppName = "TestSiddhiApp" - s1.dataSourceLocation = "jdbc:mysql://localhost:3306/DatabaseFeedSimulation" + s1.dataSourceLocation = "jdbc:mysql://localhost:3306/DatabaseFeedSimulation?useSSL=false" s1.driver = "com.mysql.jdbc.Driver" s1.username = "root" s1.password = "root" @@ -481,7 +481,7 @@ def testDBSimulationTwoSource(self): s2 = SimulationSource(simulationType=SimulationSource.Type.DATABASE_SIMULATION) s2.streamName = "FooStream" s2.siddhiAppName = "TestSiddhiApp" - s2.dataSourceLocation = "jdbc:mysql://localhost:3306/Simulation" + s2.dataSourceLocation = "jdbc:mysql://localhost:3306/Simulation?useSSL=false" s2.driver = "com.mysql.jdbc.Driver" s2.username = "root" s2.password = "root" @@ -520,7 +520,7 @@ def testDBSimulationOneSourceWOColumnNames(self): "simulationType": "DATABASE_SIMULATION", "streamName": "FooStream", "siddhiAppName": "TestSiddhiApp", - "dataSourceLocation": "jdbc:mysql://localhost:3306/DatabaseFeedSimulation", + "dataSourceLocation": "jdbc:mysql://localhost:3306/DatabaseFeedSimulation?useSSL=false", "driver": "com.mysql.jdbc.Driver", "username": "root", "password": "root", @@ -542,7 +542,7 @@ def testDBSimulationOneSourceWOColumnNames(self): s1 = SimulationSource(simulationType=SimulationSource.Type.DATABASE_SIMULATION) s1.streamName = "FooStream" s1.siddhiAppName = "TestSiddhiApp" - s1.dataSourceLocation = "jdbc:mysql://localhost:3306/DatabaseFeedSimulation" + s1.dataSourceLocation = "jdbc:mysql://localhost:3306/DatabaseFeedSimulation?useSSL=false" s1.driver = "com.mysql.jdbc.Driver" s1.username = "root" s1.password = "root" @@ -752,7 +752,7 @@ def testDBandCSVSimulation(self): "simulationType": "DATABASE_SIMULATION", "streamName": "FooStream", "siddhiAppName": "TestSiddhiApp", - "dataSourceLocation": "jdbc:mysql://localhost:3306/DatabaseFeedSimulation", + "dataSourceLocation": "jdbc:mysql://localhost:3306/DatabaseFeedSimulation?useSSL=false", "driver": "com.mysql.jdbc.Driver", "username": "root", "password": "root", @@ -783,7 +783,7 @@ def testDBandCSVSimulation(self): s1 = SimulationSource(simulationType=SimulationSource.Type.DATABASE_SIMULATION) s1.streamName = "FooStream" s1.siddhiAppName = "TestSiddhiApp" - s1.dataSourceLocation = "jdbc:mysql://localhost:3306/DatabaseFeedSimulation" + s1.dataSourceLocation = "jdbc:mysql://localhost:3306/DatabaseFeedSimulation?useSSL=false" s1.driver = "com.mysql.jdbc.Driver" s1.username = "root" s1.password = "root" diff --git a/Tests/SiddhiCoreTests/Resources/Extensions4/pom.xml b/Tests/SiddhiCoreTests/Resources/Extensions4/pom.xml index ba6b44d..92bab9c 100644 --- a/Tests/SiddhiCoreTests/Resources/Extensions4/pom.xml +++ b/Tests/SiddhiCoreTests/Resources/Extensions4/pom.xml @@ -24,7 +24,7 @@ org.wso2.siddhi-python-api siddhi-python-api-extensions-downloader-for-tests - 1.0.1 + 1.1.0 Downloads extensions (JARS) used by Siddhi Python API Tests pom diff --git a/__PySiddhi4Proxy/pom.xml b/__PySiddhi4Proxy/pom.xml index 7766c4e..42bd7d1 100644 --- a/__PySiddhi4Proxy/pom.xml +++ b/__PySiddhi4Proxy/pom.xml @@ -24,13 +24,13 @@ org.wso2.siddhi-python-api siddhi-python-api-proxy-4 - 1.0.1 + 1.1.0 org.wso2.siddhi siddhi-core - 4.1.17 + 4.3.7 @@ -123,6 +123,14 @@ + + org.apache.maven.plugins + maven-compiler-plugin + + 1.7 + 1.7 + + diff --git a/__PySiddhi4Proxy/threadfix_c_code/makefile b/__PySiddhi4Proxy/threadfix_c_code/makefile index de953be..c739367 100644 --- a/__PySiddhi4Proxy/threadfix_c_code/makefile +++ b/__PySiddhi4Proxy/threadfix_c_code/makefile @@ -23,7 +23,8 @@ JAVAHOME = ${JAVA_HOME} LINUX_PYTHON_PATH = /usr/include/python -MACOS_PYTHON_PATH = /usr/local/var/homebrew/linked/python/Frameworks/Python.framework/Versions/3.6/include/python3.6m +# Please provide the python path according to the python version of the machine +MACOS_PYTHON_PATH = /usr/local/var/homebrew/linked/python/Frameworks/Python.framework/Versions/3.7/include/python3.7m OS = ${shell uname} diff --git a/setup.py b/setup.py index dcabb85..e5a002c 100644 --- a/setup.py +++ b/setup.py @@ -43,10 +43,10 @@ def run(self): setup( name="PySiddhi4", - version="1.0.1", + version="1.1.0", packages=filtered_packages, - python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <4', - install_requires=["requests","pyjnius", "future", "enum34 ; python_version<'3.4'"], + python_requires='>=2.7, ~=3.5', + install_requires=["requests","pyjnius", "future", "enum34 ; python_version<'4'"], package_data={ "PySiddhi4": ["../__PySiddhi4Proxy/target/lib/*.jar", "../__PySiddhi4Proxy/target/*.jar", @@ -69,11 +69,13 @@ def run(self): 'Natural Language :: English', 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX :: Linux', + 'Operating System :: MacOS' 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Topic :: Software Development :: Libraries :: Java Libraries' ] )