From b2f61a79c58b255798e6a475195b67b2615c6d65 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 11 Oct 2018 23:55:16 +0000 Subject: [PATCH 1/2] Generated from 9b600032de6a6be615607a574ced70a11341ba20 Adding Scope job states to job spec --- .../models/data_lake_analytics_job_management_client_enums.py | 2 ++ .../azure/mgmt/datalake/analytics/job/models/job_information.py | 2 +- .../mgmt/datalake/analytics/job/models/job_information_basic.py | 2 +- .../datalake/analytics/job/models/job_information_basic_py3.py | 2 +- .../mgmt/datalake/analytics/job/models/job_information_py3.py | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/data_lake_analytics_job_management_client_enums.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/data_lake_analytics_job_management_client_enums.py index e0003269cb7e..e81ed60f32da 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/data_lake_analytics_job_management_client_enums.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/data_lake_analytics_job_management_client_enums.py @@ -41,6 +41,8 @@ class JobState(str, Enum): starting = "Starting" paused = "Paused" waiting_for_capacity = "WaitingForCapacity" + yielded = "Yielded" + finalizing = "Finalizing" class JobResult(str, Enum): diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information.py index 27df71588346..ef22598b1451 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information.py @@ -50,7 +50,7 @@ class JobInformation(JobInformationBasic): :ivar state: The job state. When the job is in the Ended state, refer to Result and ErrorMessage for details. Possible values include: 'Accepted', 'Compiling', 'Ended', 'New', 'Queued', 'Running', 'Scheduling', - 'Starting', 'Paused', 'WaitingForCapacity' + 'Starting', 'Paused', 'WaitingForCapacity', 'Yielded', 'Finalizing' :vartype state: str or ~azure.mgmt.datalake.analytics.job.models.JobState :ivar result: The result of job execution or the current result of the running job. Possible values include: 'None', 'Succeeded', 'Cancelled', diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_basic.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_basic.py index 30c25bbd4343..6dc6be5769d1 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_basic.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_basic.py @@ -49,7 +49,7 @@ class JobInformationBasic(Model): :ivar state: The job state. When the job is in the Ended state, refer to Result and ErrorMessage for details. Possible values include: 'Accepted', 'Compiling', 'Ended', 'New', 'Queued', 'Running', 'Scheduling', - 'Starting', 'Paused', 'WaitingForCapacity' + 'Starting', 'Paused', 'WaitingForCapacity', 'Yielded', 'Finalizing' :vartype state: str or ~azure.mgmt.datalake.analytics.job.models.JobState :ivar result: The result of job execution or the current result of the running job. Possible values include: 'None', 'Succeeded', 'Cancelled', diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_basic_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_basic_py3.py index 31dd596b40c8..18ce3252ad3e 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_basic_py3.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_basic_py3.py @@ -49,7 +49,7 @@ class JobInformationBasic(Model): :ivar state: The job state. When the job is in the Ended state, refer to Result and ErrorMessage for details. Possible values include: 'Accepted', 'Compiling', 'Ended', 'New', 'Queued', 'Running', 'Scheduling', - 'Starting', 'Paused', 'WaitingForCapacity' + 'Starting', 'Paused', 'WaitingForCapacity', 'Yielded', 'Finalizing' :vartype state: str or ~azure.mgmt.datalake.analytics.job.models.JobState :ivar result: The result of job execution or the current result of the running job. Possible values include: 'None', 'Succeeded', 'Cancelled', diff --git a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_py3.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_py3.py index f5b4b927c2eb..fc67bdcf4d0b 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_py3.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_information_py3.py @@ -50,7 +50,7 @@ class JobInformation(JobInformationBasic): :ivar state: The job state. When the job is in the Ended state, refer to Result and ErrorMessage for details. Possible values include: 'Accepted', 'Compiling', 'Ended', 'New', 'Queued', 'Running', 'Scheduling', - 'Starting', 'Paused', 'WaitingForCapacity' + 'Starting', 'Paused', 'WaitingForCapacity', 'Yielded', 'Finalizing' :vartype state: str or ~azure.mgmt.datalake.analytics.job.models.JobState :ivar result: The result of job execution or the current result of the running job. Possible values include: 'None', 'Succeeded', 'Cancelled', From 1e14e6f34f84df05172fac4bb73a89682c036e58 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Fri, 12 Oct 2018 00:09:55 +0000 Subject: [PATCH 2/2] Packaging update of azure-mgmt-datalake-analytics --- azure-mgmt-datalake-analytics/MANIFEST.in | 1 - .../azure/__init__.py | 2 +- .../azure/mgmt/__init__.py | 2 +- .../azure/mgmt/datalake/__init__.py | 2 +- .../azure_bdist_wheel.py | 54 ------------------- azure-mgmt-datalake-analytics/setup.cfg | 1 - azure-mgmt-datalake-analytics/setup.py | 18 ++++--- 7 files changed, 13 insertions(+), 67 deletions(-) delete mode 100644 azure-mgmt-datalake-analytics/azure_bdist_wheel.py diff --git a/azure-mgmt-datalake-analytics/MANIFEST.in b/azure-mgmt-datalake-analytics/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-datalake-analytics/MANIFEST.in +++ b/azure-mgmt-datalake-analytics/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-datalake-analytics/azure/__init__.py b/azure-mgmt-datalake-analytics/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-datalake-analytics/azure/__init__.py +++ b/azure-mgmt-datalake-analytics/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-datalake-analytics/azure/mgmt/__init__.py b/azure-mgmt-datalake-analytics/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/__init__.py +++ b/azure-mgmt-datalake-analytics/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-datalake-analytics/azure/mgmt/datalake/__init__.py b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-datalake-analytics/azure/mgmt/datalake/__init__.py +++ b/azure-mgmt-datalake-analytics/azure/mgmt/datalake/__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-datalake-analytics/azure_bdist_wheel.py b/azure-mgmt-datalake-analytics/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-datalake-analytics/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-datalake-analytics/setup.cfg b/azure-mgmt-datalake-analytics/setup.cfg index e6761b2e2518..3c6e79cf31da 100644 --- a/azure-mgmt-datalake-analytics/setup.cfg +++ b/azure-mgmt-datalake-analytics/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-mgmt-datalake-nspkg \ No newline at end of file diff --git a/azure-mgmt-datalake-analytics/setup.py b/azure-mgmt-datalake-analytics/setup.py index d712ed3d445e..4ddc6df0bf02 100644 --- a/azure-mgmt-datalake-analytics/setup.py +++ b/azure-mgmt-datalake-analytics/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-datalake-analytics" @@ -76,11 +70,19 @@ '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', + 'azure.mgmt.datalake', + ]), 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-datalake-nspkg'], + } )