diff --git a/azure-mgmt-cdn/MANIFEST.in b/azure-mgmt-cdn/MANIFEST.in index 9ecaeb15de50..6ceb27f7a96e 100644 --- a/azure-mgmt-cdn/MANIFEST.in +++ b/azure-mgmt-cdn/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-cdn/README.rst b/azure-mgmt-cdn/README.rst index 3943e79785f4..a5684161b0d1 100644 --- a/azure-mgmt-cdn/README.rst +++ b/azure-mgmt-cdn/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure CDN Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/azure-mgmt-cdn/azure/__init__.py b/azure-mgmt-cdn/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-cdn/azure/__init__.py +++ b/azure-mgmt-cdn/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-cdn/azure/mgmt/__init__.py b/azure-mgmt-cdn/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-cdn/azure/mgmt/__init__.py +++ b/azure-mgmt-cdn/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-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py index 733f37ee6e40..43cd9fa3b5cf 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py @@ -30,7 +30,7 @@ class CacheExpirationActionParameters(Model): :ivar cache_type: Required. The level at which the content needs to be cached. Default value: "All" . :vartype cache_type: str - :param cache_duration: The duration for which the the content needs to be + :param cache_duration: The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss :type cache_duration: str """ diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py index b962f37e0b09..1b178db8df95 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py @@ -30,7 +30,7 @@ class CacheExpirationActionParameters(Model): :ivar cache_type: Required. The level at which the content needs to be cached. Default value: "All" . :vartype cache_type: str - :param cache_duration: The duration for which the the content needs to be + :param cache_duration: The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss :type cache_duration: str """ diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py index ae5f039a3f00..ad3794a745d9 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py @@ -40,7 +40,7 @@ class Endpoint(TrackedResource): default. :type origin_host_header: str :param origin_path: A directory path on the origin that CDN can use to - retreive content from, e.g. contoso.cloudapp.net/originpath. + retrieve content from, e.g. contoso.cloudapp.net/originpath. :type origin_path: str :param content_types_to_compress: List of content types on which compression applies. The value should be a valid MIME type. @@ -78,8 +78,8 @@ class Endpoint(TrackedResource): routes for the CDN. This is relative to the origin path. :type probe_path: str :param geo_filters: List of rules defining the user's geo access within a - CDN endpoint. Each geo filter defines an acess rule to a specified path or - content, e.g. block APAC for path /pictures/ + CDN endpoint. Each geo filter defines an access rule to a specified path + or content, e.g. block APAC for path /pictures/ :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] :param delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py index 2f44460c0f4b..f7fc54af476a 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py @@ -40,7 +40,7 @@ class Endpoint(TrackedResource): default. :type origin_host_header: str :param origin_path: A directory path on the origin that CDN can use to - retreive content from, e.g. contoso.cloudapp.net/originpath. + retrieve content from, e.g. contoso.cloudapp.net/originpath. :type origin_path: str :param content_types_to_compress: List of content types on which compression applies. The value should be a valid MIME type. @@ -78,8 +78,8 @@ class Endpoint(TrackedResource): routes for the CDN. This is relative to the origin path. :type probe_path: str :param geo_filters: List of rules defining the user's geo access within a - CDN endpoint. Each geo filter defines an acess rule to a specified path or - content, e.g. block APAC for path /pictures/ + CDN endpoint. Each geo filter defines an access rule to a specified path + or content, e.g. block APAC for path /pictures/ :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] :param delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py index 36ec115ceb78..0a1ed8c7706d 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py @@ -24,7 +24,7 @@ class EndpointUpdateParameters(Model): default. :type origin_host_header: str :param origin_path: A directory path on the origin that CDN can use to - retreive content from, e.g. contoso.cloudapp.net/originpath. + retrieve content from, e.g. contoso.cloudapp.net/originpath. :type origin_path: str :param content_types_to_compress: List of content types on which compression applies. The value should be a valid MIME type. @@ -62,8 +62,8 @@ class EndpointUpdateParameters(Model): routes for the CDN. This is relative to the origin path. :type probe_path: str :param geo_filters: List of rules defining the user's geo access within a - CDN endpoint. Each geo filter defines an acess rule to a specified path or - content, e.g. block APAC for path /pictures/ + CDN endpoint. Each geo filter defines an access rule to a specified path + or content, e.g. block APAC for path /pictures/ :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] :param delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py index ed4a7fdd9d60..e18452cae71f 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py @@ -24,7 +24,7 @@ class EndpointUpdateParameters(Model): default. :type origin_host_header: str :param origin_path: A directory path on the origin that CDN can use to - retreive content from, e.g. contoso.cloudapp.net/originpath. + retrieve content from, e.g. contoso.cloudapp.net/originpath. :type origin_path: str :param content_types_to_compress: List of content types on which compression applies. The value should be a valid MIME type. @@ -62,8 +62,8 @@ class EndpointUpdateParameters(Model): routes for the CDN. This is relative to the origin path. :type probe_path: str :param geo_filters: List of rules defining the user's geo access within a - CDN endpoint. Each geo filter defines an acess rule to a specified path or - content, e.g. block APAC for path /pictures/ + CDN endpoint. Each geo filter defines an access rule to a specified path + or content, e.g. block APAC for path /pictures/ :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] :param delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response.py index 2e1c74ac09c5..f5e34718e3e3 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response.py @@ -14,7 +14,7 @@ class ErrorResponse(Model): - """Error reponse indicates CDN service is not able to process the incoming + """Error response indicates CDN service is not able to process the incoming request. The reason is provided in the error message. Variables are only populated by the server, and will be ignored when diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response_py3.py index 89e755f309dc..5bf98d6b9075 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response_py3.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response_py3.py @@ -14,7 +14,7 @@ class ErrorResponse(Model): - """Error reponse indicates CDN service is not able to process the incoming + """Error response indicates CDN service is not able to process the incoming request. The reason is provided in the error message. Variables are only populated by the server, and will be ignored when diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py index 7d7e44df89b4..2105bf40dd5c 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py @@ -115,7 +115,7 @@ def internal_paging(next_link=None, raw=False): def get( self, resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers=None, raw=False, **operation_config): - """Gets an exisitng custom domain within an endpoint. + """Gets an existing custom domain within an endpoint. :param resource_group_name: Name of the Resource group within the Azure subscription. diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py index 27ca812bea6c..7a90cfb55deb 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py @@ -529,7 +529,7 @@ def get_long_running_output(response): def generate_sso_uri( self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): """Generates a dynamic SSO URI used to sign in to the CDN supplemental - portal. Supplemnetal portal is used to configure advanced feature + portal. Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The SSO diff --git a/azure-mgmt-cdn/azure_bdist_wheel.py b/azure-mgmt-cdn/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-cdn/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-cdn/setup.cfg b/azure-mgmt-cdn/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-cdn/setup.cfg +++ b/azure-mgmt-cdn/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-cdn/setup.py b/azure-mgmt-cdn/setup.py index e2b7e3b2b712..c8d3a63ebfee 100644 --- a/azure-mgmt-cdn/setup.py +++ b/azure-mgmt-cdn/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-cdn" @@ -72,13 +66,22 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', '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=[ - 'msrestazure>=0.4.27,<2.0.0', + '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'], + } )