diff --git a/azure-mgmt-iotcentral/MANIFEST.in b/azure-mgmt-iotcentral/MANIFEST.in index 9ecaeb15de50..6ceb27f7a96e 100644 --- a/azure-mgmt-iotcentral/MANIFEST.in +++ b/azure-mgmt-iotcentral/MANIFEST.in @@ -1,2 +1,4 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/azure-mgmt-iotcentral/azure/__init__.py b/azure-mgmt-iotcentral/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-iotcentral/azure/__init__.py +++ b/azure-mgmt-iotcentral/azure/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-iotcentral/azure/mgmt/__init__.py b/azure-mgmt-iotcentral/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/__init__.py +++ b/azure-mgmt-iotcentral/azure/mgmt/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py index dc2d42d83462..2819b4e949e1 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py @@ -14,26 +14,27 @@ from .app_py3 import App from .app_patch_py3 import AppPatch from .resource_py3 import Resource + from .error_response_body_py3 import ErrorResponseBody from .error_details_py3 import ErrorDetails, ErrorDetailsException from .operation_display_py3 import OperationDisplay from .operation_py3 import Operation from .operation_inputs_py3 import OperationInputs - from .app_name_availability_info_py3 import AppNameAvailabilityInfo + from .app_availability_info_py3 import AppAvailabilityInfo except (SyntaxError, ImportError): from .app_sku_info import AppSkuInfo from .app import App from .app_patch import AppPatch from .resource import Resource + from .error_response_body import ErrorResponseBody from .error_details import ErrorDetails, ErrorDetailsException from .operation_display import OperationDisplay from .operation import Operation from .operation_inputs import OperationInputs - from .app_name_availability_info import AppNameAvailabilityInfo + from .app_availability_info import AppAvailabilityInfo from .app_paged import AppPaged from .operation_paged import OperationPaged from .iot_central_client_enums import ( AppSku, - AppNameUnavailabilityReason, ) __all__ = [ @@ -41,13 +42,13 @@ 'App', 'AppPatch', 'Resource', + 'ErrorResponseBody', 'ErrorDetails', 'ErrorDetailsException', 'OperationDisplay', 'Operation', 'OperationInputs', - 'AppNameAvailabilityInfo', + 'AppAvailabilityInfo', 'AppPaged', 'OperationPaged', 'AppSku', - 'AppNameUnavailabilityReason', ] diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_name_availability_info.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_availability_info.py similarity index 68% rename from azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_name_availability_info.py rename to azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_availability_info.py index 5121fecc7259..b690919a286d 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_name_availability_info.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_availability_info.py @@ -12,9 +12,9 @@ from msrest.serialization import Model -class AppNameAvailabilityInfo(Model): - """The properties indicating whether a given IoT Central application name is - available. +class AppAvailabilityInfo(Model): + """The properties indicating whether a given IoT Central application name or + subdomain is available. Variables are only populated by the server, and will be ignored when sending a request. @@ -22,27 +22,26 @@ class AppNameAvailabilityInfo(Model): :ivar name_available: The value which indicates whether the provided name is available. :vartype name_available: bool - :ivar reason: The reason for unavailability. Possible values include: - 'Invalid', 'AlreadyExists' - :vartype reason: str or - ~azure.mgmt.iotcentral.models.AppNameUnavailabilityReason - :param message: The detailed reason message. - :type message: str + :ivar reason: The reason for unavailability. + :vartype reason: str + :ivar message: The detailed reason message. + :vartype message: str """ _validation = { 'name_available': {'readonly': True}, 'reason': {'readonly': True}, + 'message': {'readonly': True}, } _attribute_map = { 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'AppNameUnavailabilityReason'}, + 'reason': {'key': 'reason', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, } def __init__(self, **kwargs): - super(AppNameAvailabilityInfo, self).__init__(**kwargs) + super(AppAvailabilityInfo, self).__init__(**kwargs) self.name_available = None self.reason = None - self.message = kwargs.get('message', None) + self.message = None diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_name_availability_info_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_availability_info_py3.py similarity index 66% rename from azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_name_availability_info_py3.py rename to azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_availability_info_py3.py index 7549acd0baee..64c94d994ad1 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_name_availability_info_py3.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_availability_info_py3.py @@ -12,9 +12,9 @@ from msrest.serialization import Model -class AppNameAvailabilityInfo(Model): - """The properties indicating whether a given IoT Central application name is - available. +class AppAvailabilityInfo(Model): + """The properties indicating whether a given IoT Central application name or + subdomain is available. Variables are only populated by the server, and will be ignored when sending a request. @@ -22,27 +22,26 @@ class AppNameAvailabilityInfo(Model): :ivar name_available: The value which indicates whether the provided name is available. :vartype name_available: bool - :ivar reason: The reason for unavailability. Possible values include: - 'Invalid', 'AlreadyExists' - :vartype reason: str or - ~azure.mgmt.iotcentral.models.AppNameUnavailabilityReason - :param message: The detailed reason message. - :type message: str + :ivar reason: The reason for unavailability. + :vartype reason: str + :ivar message: The detailed reason message. + :vartype message: str """ _validation = { 'name_available': {'readonly': True}, 'reason': {'readonly': True}, + 'message': {'readonly': True}, } _attribute_map = { 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'AppNameUnavailabilityReason'}, + 'reason': {'key': 'reason', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, *, message: str=None, **kwargs) -> None: - super(AppNameAvailabilityInfo, self).__init__(**kwargs) + def __init__(self, **kwargs) -> None: + super(AppAvailabilityInfo, self).__init__(**kwargs) self.name_available = None self.reason = None - self.message = message + self.message = None diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details.py index a4886654fbff..b7f72f1b01b8 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details.py @@ -25,6 +25,8 @@ class ErrorDetails(Model): :vartype message: str :ivar target: The target of the particular error. :vartype target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.iotcentral.models.ErrorResponseBody] """ _validation = { @@ -34,9 +36,10 @@ class ErrorDetails(Model): } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + 'target': {'key': 'error.target', 'type': 'str'}, + 'details': {'key': 'error.details', 'type': '[ErrorResponseBody]'}, } def __init__(self, **kwargs): @@ -44,6 +47,7 @@ def __init__(self, **kwargs): self.code = None self.message = None self.target = None + self.details = kwargs.get('details', None) class ErrorDetailsException(HttpOperationError): diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details_py3.py index c219c199294e..fadfc552be75 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details_py3.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details_py3.py @@ -25,6 +25,8 @@ class ErrorDetails(Model): :vartype message: str :ivar target: The target of the particular error. :vartype target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.iotcentral.models.ErrorResponseBody] """ _validation = { @@ -34,16 +36,18 @@ class ErrorDetails(Model): } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + 'target': {'key': 'error.target', 'type': 'str'}, + 'details': {'key': 'error.details', 'type': '[ErrorResponseBody]'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, details=None, **kwargs) -> None: super(ErrorDetails, self).__init__(**kwargs) self.code = None self.message = None self.target = None + self.details = details class ErrorDetailsException(HttpOperationError): diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_response_body.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_response_body.py new file mode 100644 index 000000000000..2eb41a34cfe7 --- /dev/null +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_response_body.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorResponseBody(Model): + """Details of error response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The target of the particular error. + :vartype target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.iotcentral.models.ErrorResponseBody] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = kwargs.get('details', None) diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_response_body_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_response_body_py3.py new file mode 100644 index 000000000000..1e7115c11cb7 --- /dev/null +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_response_body_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorResponseBody(Model): + """Details of error response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The target of the particular error. + :vartype target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.iotcentral.models.ErrorResponseBody] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, *, details=None, **kwargs) -> None: + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = details diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/iot_central_client_enums.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/iot_central_client_enums.py index 91780df77e5f..8883b672464f 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/iot_central_client_enums.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/iot_central_client_enums.py @@ -16,9 +16,3 @@ class AppSku(str, Enum): f1 = "F1" s1 = "S1" - - -class AppNameUnavailabilityReason(str, Enum): - - invalid = "Invalid" - already_exists = "AlreadyExists" diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py index 71bb28eb8639..e04c6fb8a4ad 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py @@ -20,16 +20,21 @@ class OperationInputs(Model): :param name: Required. The name of the IoT Central application instance to check. :type name: str + :param type: The type of the IoT Central resource to query. Default value: + "IoTApps" . + :type type: str """ _validation = { - 'name': {'required': True}, + 'name': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__(self, **kwargs): super(OperationInputs, self).__init__(**kwargs) self.name = kwargs.get('name', None) + self.type = kwargs.get('type', "IoTApps") diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py index e99d4a561bc4..b5ac59194737 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py @@ -20,16 +20,21 @@ class OperationInputs(Model): :param name: Required. The name of the IoT Central application instance to check. :type name: str + :param type: The type of the IoT Central resource to query. Default value: + "IoTApps" . + :type type: str """ _validation = { - 'name': {'required': True}, + 'name': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, name: str, **kwargs) -> None: + def __init__(self, *, name: str, type: str="IoTApps", **kwargs) -> None: super(OperationInputs, self).__init__(**kwargs) self.name = name + self.type = type diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py index 55a0ccce7828..72c8f74b58ad 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py @@ -521,24 +521,26 @@ def internal_paging(next_link=None, raw=False): list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/IoTApps'} def check_name_availability( - self, name, custom_headers=None, raw=False, **operation_config): + self, name, type="IoTApps", custom_headers=None, raw=False, **operation_config): """Check if an IoT Central application name is available. :param name: The name of the IoT Central application instance to check. :type name: str + :param type: The type of the IoT Central resource to query. + :type type: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: AppNameAvailabilityInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.iotcentral.models.AppNameAvailabilityInfo or + :return: AppAvailabilityInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iotcentral.models.AppAvailabilityInfo or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorDetailsException` """ - operation_inputs = models.OperationInputs(name=name) + operation_inputs = models.OperationInputs(name=name, type=type) # Construct URL url = self.check_name_availability.metadata['url'] @@ -575,7 +577,7 @@ def check_name_availability( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AppNameAvailabilityInfo', response) + deserialized = self._deserialize('AppAvailabilityInfo', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -583,3 +585,69 @@ def check_name_availability( return deserialized check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkNameAvailability'} + + def check_subdomain_availability( + self, name, type="IoTApps", custom_headers=None, raw=False, **operation_config): + """Check if an IoT Central application subdomain is available. + + :param name: The name of the IoT Central application instance to + check. + :type name: str + :param type: The type of the IoT Central resource to query. + :type type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppAvailabilityInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iotcentral.models.AppAvailabilityInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + operation_inputs = models.OperationInputs(name=name, type=type) + + # Construct URL + url = self.check_subdomain_availability.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(operation_inputs, 'OperationInputs') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppAvailabilityInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_subdomain_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkSubdomainAvailability'} diff --git a/azure-mgmt-iotcentral/azure_bdist_wheel.py b/azure-mgmt-iotcentral/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-iotcentral/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/azure-mgmt-iotcentral/setup.cfg b/azure-mgmt-iotcentral/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-iotcentral/setup.cfg +++ b/azure-mgmt-iotcentral/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/azure-mgmt-iotcentral/setup.py b/azure-mgmt-iotcentral/setup.py index 2bab09e942b9..632e3aab0ccb 100644 --- a/azure-mgmt-iotcentral/setup.py +++ b/azure-mgmt-iotcentral/setup.py @@ -10,12 +10,6 @@ import os.path from io import open from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-iotcentral" @@ -76,11 +70,18 @@ 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(exclude=["tests"]), + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), install_requires=[ 'msrest>=0.5.0', 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } )