Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/CMakeLists.txt b/CMakeLists.txt
- index 4e326c66..53b9d678 100644
- --- a/CMakeLists.txt
- +++ b/CMakeLists.txt
- @@ -4,7 +4,7 @@
- cmake_minimum_required(VERSION 2.8.11)
- project(azure_iot_sdk-python)
- -set(build_python "2.7" CACHE build_python "2.7")
- +set(build_python "3.6" CACHE build_python "3.6")
- add_subdirectory(c)
- diff --git a/build_all/linux/setup.sh b/build_all/linux/setup.sh
- index 0762724f..05cc2fe8 100755
- --- a/build_all/linux/setup.sh
- +++ b/build_all/linux/setup.sh
- @@ -45,5 +45,5 @@ deps_install ()
- sudo apt-get install -y $deps
- }
- -deps_install
- +#deps_install
- diff --git a/c b/c
- --- a/c
- +++ b/c
- @@ -1 +1 @@
- -Subproject commit 297dd732588210f2792ccf92c9d92a2ff4235096
- +Subproject commit 297dd732588210f2792ccf92c9d92a2ff4235096-dirty
- diff --git a/device/iothub_client_python/CMakeLists.txt b/device/iothub_client_python/CMakeLists.txt
- index bfa790cf..a79a812d 100644
- --- a/device/iothub_client_python/CMakeLists.txt
- +++ b/device/iothub_client_python/CMakeLists.txt
- @@ -41,7 +41,8 @@ else()
- else()
- # Remove the period from python version for boost component
- string(REPLACE "." "" boost_python ${build_python})
- - find_package(Boost COMPONENTS "python-py${boost_python}")
- +# find_package(Boost COMPONENTS "python-py${boost_python}")
- + find_package(Boost COMPONENTS "python3")
- endif()
- endif()
- diff --git a/device/samples/iothub_client_args.py b/device/samples/iothub_client_args.py
- index 8ab329d1..af72ba93 100644
- --- a/device/samples/iothub_client_args.py
- +++ b/device/samples/iothub_client_args.py
- @@ -5,25 +5,17 @@
- import getopt
- from iothub_client import IoTHubTransportProvider
- -
- class OptionError(Exception):
- -
- def __init__(self, value):
- self.value = value
- def __str__(self):
- return repr(self.value)
- -
- -def get_iothub_opt(
- - argv,
- - connection_string,
- - protocol=IoTHubTransportProvider.MQTT):
- +def get_iothub_opt(argv, connection_string, protocol=IoTHubTransportProvider.MQTT):
- if len(argv) > 0:
- try:
- - opts, args = getopt.getopt(
- - argv, "hp:c:", [
- - "protocol=", "connectionstring="])
- + opts, args = getopt.getopt(argv, "hp:c:", ["protocol=", "connectionstring="])
- except getopt.GetoptError as opt_error:
- raise OptionError("Error: %s" % opt_error.msg)
- for opt, arg in opts:
- @@ -37,39 +29,32 @@ def get_iothub_opt(
- protocol = IoTHubTransportProvider.HTTP
- else:
- raise OptionError("Error: HTTP protocol is not supported")
- -
- elif protocol_string == "amqp":
- if hasattr(IoTHubTransportProvider, "AMQP"):
- protocol = IoTHubTransportProvider.AMQP
- else:
- raise OptionError("Error: AMQP protocol is not supported")
- -
- elif protocol_string == "amqp_ws":
- if hasattr(IoTHubTransportProvider, "AMQP_WS"):
- protocol = IoTHubTransportProvider.AMQP_WS
- else:
- raise OptionError("Error: AMQP_WS protocol is not supported")
- -
- elif protocol_string == "mqtt":
- if hasattr(IoTHubTransportProvider, "MQTT"):
- protocol = IoTHubTransportProvider.MQTT
- else:
- raise OptionError("Error: MQTT protocol is not supported")
- -
- elif hasattr(IoTHubTransportProvider, "MQTT_WS"):
- if hasattr(IoTHubTransportProvider, "MQTT_WS"):
- protocol = IoTHubTransportProvider.MQTT_WS
- else:
- raise OptionError("Error: MQTT_WS protocol is not supported")
- else:
- - raise OptionError(
- - "Error: unknown protocol %s" %
- - protocol_string)
- + raise OptionError("Error: unknown protocol %s" % protocol_string)
- elif opt in ("-c", "--connectionstring"):
- connection_string = arg
- if connection_string.find("HostName") < 0:
- - raise OptionError(
- - "Error: Hostname not found, not a valid connection string")
- + raise OptionError("Error: Hostname not found, not a valid connection string")
- return connection_string, protocol
- diff --git a/service/CMakeLists.txt b/service/CMakeLists.txt
- index 9849d64a..a7cfa465 100644
- --- a/service/CMakeLists.txt
- +++ b/service/CMakeLists.txt
- @@ -41,7 +41,8 @@ else()
- else()
- # Remove the period from python version for boost component
- string(REPLACE "." "" boost_python ${build_python})
- - find_package(Boost COMPONENTS "python-py${boost_python}")
- +# find_package(Boost COMPONENTS "python-py${boost_python}")
- + find_package(Boost COMPONENTS "python3")
- endif()
- endif()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement