Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 5.01 KB | None | 0 0
  1. diff --git a/CMakeLists.txt b/CMakeLists.txt
  2. index 4e326c66..53b9d678 100644
  3. --- a/CMakeLists.txt
  4. +++ b/CMakeLists.txt
  5. @@ -4,7 +4,7 @@
  6.  cmake_minimum_required(VERSION 2.8.11)
  7.  project(azure_iot_sdk-python)
  8.  
  9. -set(build_python "2.7" CACHE build_python "2.7")
  10. +set(build_python "3.6" CACHE build_python "3.6")
  11.  
  12.  add_subdirectory(c)
  13.  
  14. diff --git a/build_all/linux/setup.sh b/build_all/linux/setup.sh
  15. index 0762724f..05cc2fe8 100755
  16. --- a/build_all/linux/setup.sh
  17. +++ b/build_all/linux/setup.sh
  18. @@ -45,5 +45,5 @@ deps_install ()
  19.      sudo apt-get install -y $deps
  20.  }
  21.  
  22. -deps_install
  23. +#deps_install
  24.  
  25. diff --git a/c b/c
  26. --- a/c
  27. +++ b/c
  28. @@ -1 +1 @@
  29. -Subproject commit 297dd732588210f2792ccf92c9d92a2ff4235096
  30. +Subproject commit 297dd732588210f2792ccf92c9d92a2ff4235096-dirty
  31. diff --git a/device/iothub_client_python/CMakeLists.txt b/device/iothub_client_python/CMakeLists.txt
  32. index bfa790cf..a79a812d 100644
  33. --- a/device/iothub_client_python/CMakeLists.txt
  34. +++ b/device/iothub_client_python/CMakeLists.txt
  35. @@ -41,7 +41,8 @@ else()
  36.      else()
  37.          # Remove the period from python version for boost component
  38.          string(REPLACE "." "" boost_python ${build_python})
  39. -        find_package(Boost COMPONENTS "python-py${boost_python}")
  40. +#        find_package(Boost COMPONENTS "python-py${boost_python}")
  41. +        find_package(Boost COMPONENTS "python3")
  42.      endif()
  43.  endif()
  44.  
  45. diff --git a/device/samples/iothub_client_args.py b/device/samples/iothub_client_args.py
  46. index 8ab329d1..af72ba93 100644
  47. --- a/device/samples/iothub_client_args.py
  48. +++ b/device/samples/iothub_client_args.py
  49. @@ -5,25 +5,17 @@
  50.  import getopt
  51.  from iothub_client import IoTHubTransportProvider
  52.  
  53. -
  54.  class OptionError(Exception):
  55. -
  56.      def __init__(self, value):
  57.          self.value = value
  58.  
  59.      def __str__(self):
  60.          return repr(self.value)
  61.  
  62. -
  63. -def get_iothub_opt(
  64. -        argv,
  65. -        connection_string,
  66. -        protocol=IoTHubTransportProvider.MQTT):
  67. +def get_iothub_opt(argv, connection_string, protocol=IoTHubTransportProvider.MQTT):
  68.      if len(argv) > 0:
  69.          try:
  70. -            opts, args = getopt.getopt(
  71. -                argv, "hp:c:", [
  72. -                    "protocol=", "connectionstring="])
  73. +            opts, args = getopt.getopt(argv, "hp:c:", ["protocol=", "connectionstring="])
  74.          except getopt.GetoptError as opt_error:
  75.              raise OptionError("Error: %s" % opt_error.msg)
  76.          for opt, arg in opts:
  77. @@ -37,39 +29,32 @@ def get_iothub_opt(
  78.                          protocol = IoTHubTransportProvider.HTTP
  79.                      else:
  80.                          raise OptionError("Error: HTTP protocol is not supported")
  81. -
  82.                  elif protocol_string == "amqp":
  83.                      if hasattr(IoTHubTransportProvider, "AMQP"):
  84.                          protocol = IoTHubTransportProvider.AMQP
  85.                      else:
  86.                          raise OptionError("Error: AMQP protocol is not supported")
  87. -
  88.                  elif protocol_string == "amqp_ws":
  89.                      if hasattr(IoTHubTransportProvider, "AMQP_WS"):
  90.                          protocol = IoTHubTransportProvider.AMQP_WS
  91.                      else:
  92.                          raise OptionError("Error: AMQP_WS protocol is not supported")
  93. -
  94.                  elif protocol_string == "mqtt":
  95.                      if hasattr(IoTHubTransportProvider, "MQTT"):
  96.                          protocol = IoTHubTransportProvider.MQTT
  97.                      else:
  98.                          raise OptionError("Error: MQTT protocol is not supported")
  99. -
  100.                  elif hasattr(IoTHubTransportProvider, "MQTT_WS"):
  101.                      if hasattr(IoTHubTransportProvider, "MQTT_WS"):
  102.                          protocol = IoTHubTransportProvider.MQTT_WS
  103.                      else:
  104.                          raise OptionError("Error: MQTT_WS protocol is not supported")
  105.                  else:
  106. -                    raise OptionError(
  107. -                        "Error: unknown protocol %s" %
  108. -                        protocol_string)
  109. +                    raise OptionError("Error: unknown protocol %s" % protocol_string)
  110.              elif opt in ("-c", "--connectionstring"):
  111.                  connection_string = arg
  112.  
  113.      if connection_string.find("HostName") < 0:
  114. -        raise OptionError(
  115. -            "Error: Hostname not found, not a valid connection string")
  116. +        raise OptionError("Error: Hostname not found, not a valid connection string")
  117.  
  118.      return connection_string, protocol
  119. diff --git a/service/CMakeLists.txt b/service/CMakeLists.txt
  120. index 9849d64a..a7cfa465 100644
  121. --- a/service/CMakeLists.txt
  122. +++ b/service/CMakeLists.txt
  123. @@ -41,7 +41,8 @@ else()
  124.      else()
  125.          # Remove the period from python version for boost component
  126.          string(REPLACE "." "" boost_python ${build_python})
  127. -        find_package(Boost COMPONENTS "python-py${boost_python}")
  128. +#        find_package(Boost COMPONENTS "python-py${boost_python}")
  129. +        find_package(Boost COMPONENTS "python3")
  130.      endif()
  131.  endif()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement