diff --git a/.gitignore b/.gitignore index aeac92c5b51b..4ef924506f5c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ __pycache__/ *.pyc .pytest_cache +.mypy_cache +.cache # Virtual environment env*/ @@ -26,7 +28,7 @@ build/ # Test results TestResults/ -# Credentials +# Credentials credentials_real.json testsettings_local.json testsettings_local.cfg diff --git a/azure-applicationinsights/MANIFEST.in b/azure-applicationinsights/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-applicationinsights/MANIFEST.in +++ b/azure-applicationinsights/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-applicationinsights/README.rst b/azure-applicationinsights/README.rst index 47d9a1fe69b3..01181cde9839 100644 --- a/azure-applicationinsights/README.rst +++ b/azure-applicationinsights/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Application Insights 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-applicationinsights/azure/__init__.py b/azure-applicationinsights/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-applicationinsights/azure/__init__.py +++ b/azure-applicationinsights/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-applicationinsights/azure_bdist_wheel.py b/azure-applicationinsights/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-applicationinsights/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-applicationinsights/setup.cfg b/azure-applicationinsights/setup.cfg index 669e94e63df3..3c6e79cf31da 100644 --- a/azure-applicationinsights/setup.cfg +++ b/azure-applicationinsights/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-nspkg \ No newline at end of file diff --git a/azure-applicationinsights/setup.py b/azure-applicationinsights/setup.py index ea6a093aaec1..80142e19f197 100644 --- a/azure-applicationinsights/setup.py +++ b/azure-applicationinsights/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-applicationinsights" @@ -76,10 +70,16 @@ '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', + ]), install_requires=[ - 'msrest>=0.5.4,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-nspkg'], + } ) diff --git a/azure-batch/azure/__init__.py b/azure-batch/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-batch/azure/__init__.py +++ b/azure-batch/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-cognitiveservices-language-luis/MANIFEST.in b/azure-cognitiveservices-language-luis/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-cognitiveservices-language-luis/MANIFEST.in +++ b/azure-cognitiveservices-language-luis/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-cognitiveservices-language-luis/azure/__init__.py b/azure-cognitiveservices-language-luis/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-cognitiveservices-language-luis/azure/__init__.py +++ b/azure-cognitiveservices-language-luis/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-cognitiveservices-language-luis/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-cognitiveservices-language-luis/azure/cognitiveservices/__init__.py +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/__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-cognitiveservices-language-luis/azure/cognitiveservices/language/__init__.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/__init__.py +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/__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-cognitiveservices-language-luis/azure_bdist_wheel.py b/azure-cognitiveservices-language-luis/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-cognitiveservices-language-luis/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-cognitiveservices-language-luis/setup.cfg b/azure-cognitiveservices-language-luis/setup.cfg index 2d986195ea2f..3c6e79cf31da 100644 --- a/azure-cognitiveservices-language-luis/setup.cfg +++ b/azure-cognitiveservices-language-luis/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-cognitiveservices-language-nspkg \ No newline at end of file diff --git a/azure-cognitiveservices-language-luis/setup.py b/azure-cognitiveservices-language-luis/setup.py index 6b7cacb95092..c47a8246eabf 100644 --- a/azure-cognitiveservices-language-luis/setup.py +++ b/azure-cognitiveservices-language-luis/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-cognitiveservices-language-luis" @@ -76,10 +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.cognitiveservices', + 'azure.cognitiveservices.language', + ]), install_requires=[ 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-cognitiveservices-language-nspkg'], + } ) diff --git a/azure-cognitiveservices-language-nspkg/README.rst b/azure-cognitiveservices-language-nspkg/README.rst index d31aed0f9ae6..5dea106b65bb 100644 --- a/azure-cognitiveservices-language-nspkg/README.rst +++ b/azure-cognitiveservices-language-nspkg/README.rst @@ -5,6 +5,9 @@ This is the Microsoft Azure Cognitive Services Language namespace package. This package is not intended to be installed directly by the end user. +Since version 3.0, this is Python 2 package only, Python 3.x SDKs will use `PEP420 ` as namespace package strategy. +This package will use `python_requires` to enforce Python 2 installation. This implies that you might see this package on Python 3 environment if you have pip < 9.0 or setuptools < 24.2.0. + It provides the necessary files for other packages to extend the azure.cognitiveservices.language namespace. If you are looking to install the Azure client libraries, see the diff --git a/azure-cognitiveservices-language-nspkg/azure/__init__.py b/azure-cognitiveservices-language-nspkg/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/azure-cognitiveservices-language-nspkg/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-cognitiveservices-language-nspkg/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-language-nspkg/azure/cognitiveservices/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/azure-cognitiveservices-language-nspkg/azure/cognitiveservices/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-cognitiveservices-language-nspkg/azure/cognitiveservices/language/__init__.py b/azure-cognitiveservices-language-nspkg/azure/cognitiveservices/language/__init__.py index e69de29bb2d1..0260537a02bb 100644 --- a/azure-cognitiveservices-language-nspkg/azure/cognitiveservices/language/__init__.py +++ b/azure-cognitiveservices-language-nspkg/azure/cognitiveservices/language/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-cognitiveservices-language-nspkg/sdk_packaging.toml b/azure-cognitiveservices-language-nspkg/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/azure-cognitiveservices-language-nspkg/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/azure-cognitiveservices-language-nspkg/setup.py b/azure-cognitiveservices-language-nspkg/setup.py index 999d83b53703..93fb63183266 100644 --- a/azure-cognitiveservices-language-nspkg/setup.py +++ b/azure-cognitiveservices-language-nspkg/setup.py @@ -25,7 +25,7 @@ setup( name='azure-cognitiveservices-language-nspkg', - version='2.0.0', + version='3.0.0', description='Microsoft Azure Cognitive Services Language Namespace Package [Internal]', long_description=open('README.rst', 'r').read(), license='MIT License', @@ -37,19 +37,14 @@ 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, packages=[ - 'azure', - 'azure.cognitiveservices', 'azure.cognitiveservices.language', ], + python_requires='<3', install_requires=[ - 'azure-cognitiveservices-nspkg>=2.0.0', + 'azure-cognitiveservices-nspkg>=3.0.0', ] ) diff --git a/azure-cognitiveservices-language-spellcheck/MANIFEST.in b/azure-cognitiveservices-language-spellcheck/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-cognitiveservices-language-spellcheck/MANIFEST.in +++ b/azure-cognitiveservices-language-spellcheck/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-cognitiveservices-language-spellcheck/README.rst b/azure-cognitiveservices-language-spellcheck/README.rst index 2c240139e4b4..dceb5241f7bf 100644 --- a/azure-cognitiveservices-language-spellcheck/README.rst +++ b/azure-cognitiveservices-language-spellcheck/README.rst @@ -1,9 +1,9 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure Cognitive Services Bing Spell Check Client Library. +This is the Microsoft Azure Cognitive Services Spellcheck Client Library. -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 a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -30,9 +30,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Spell Check +For code examples, see `Cognitive Services Spellcheck `__ -on readthedocs.org. +on docs.microsoft.com. Provide Feedback diff --git a/azure-cognitiveservices-language-spellcheck/azure/__init__.py b/azure-cognitiveservices-language-spellcheck/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-cognitiveservices-language-spellcheck/azure/__init__.py +++ b/azure-cognitiveservices-language-spellcheck/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-cognitiveservices-language-spellcheck/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-language-spellcheck/azure/cognitiveservices/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-cognitiveservices-language-spellcheck/azure/cognitiveservices/__init__.py +++ b/azure-cognitiveservices-language-spellcheck/azure/cognitiveservices/__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-cognitiveservices-language-spellcheck/azure/cognitiveservices/language/__init__.py b/azure-cognitiveservices-language-spellcheck/azure/cognitiveservices/language/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-cognitiveservices-language-spellcheck/azure/cognitiveservices/language/__init__.py +++ b/azure-cognitiveservices-language-spellcheck/azure/cognitiveservices/language/__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-cognitiveservices-language-spellcheck/azure_bdist_wheel.py b/azure-cognitiveservices-language-spellcheck/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-cognitiveservices-language-spellcheck/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-cognitiveservices-language-spellcheck/sdk_packaging.toml b/azure-cognitiveservices-language-spellcheck/sdk_packaging.toml new file mode 100644 index 000000000000..6a638b7c31ef --- /dev/null +++ b/azure-cognitiveservices-language-spellcheck/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-cognitiveservices-language-spellcheck" +package_nspkg = "azure-cognitiveservices-language-nspkg" +package_pprint_name = "Cognitive Services Spellcheck" +package_doc_id = "cognitive-services" +is_stable = true +is_arm = false diff --git a/azure-cognitiveservices-language-spellcheck/setup.cfg b/azure-cognitiveservices-language-spellcheck/setup.cfg index 2d986195ea2f..3c6e79cf31da 100644 --- a/azure-cognitiveservices-language-spellcheck/setup.cfg +++ b/azure-cognitiveservices-language-spellcheck/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-cognitiveservices-language-nspkg \ No newline at end of file diff --git a/azure-cognitiveservices-language-spellcheck/setup.py b/azure-cognitiveservices-language-spellcheck/setup.py index 3b538a6d4c99..013c2c21f08e 100644 --- a/azure-cognitiveservices-language-spellcheck/setup.py +++ b/azure-cognitiveservices-language-spellcheck/setup.py @@ -10,16 +10,10 @@ 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-cognitiveservices-language-spellcheck" -PACKAGE_PPRINT_NAME = "Cognitive Services Bing Spell Check" +PACKAGE_PPRINT_NAME = "Cognitive Services Spellcheck" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') @@ -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.cognitiveservices', + 'azure.cognitiveservices.language', + ]), install_requires=[ - 'msrest>=0.4.28,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-cognitiveservices-language-nspkg'], + } ) diff --git a/azure-cognitiveservices-language-textanalytics/MANIFEST.in b/azure-cognitiveservices-language-textanalytics/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-cognitiveservices-language-textanalytics/MANIFEST.in +++ b/azure-cognitiveservices-language-textanalytics/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-cognitiveservices-language-textanalytics/README.rst b/azure-cognitiveservices-language-textanalytics/README.rst index c26973cad3a0..1f148fb859e8 100644 --- a/azure-cognitiveservices-language-textanalytics/README.rst +++ b/azure-cognitiveservices-language-textanalytics/README.rst @@ -3,13 +3,7 @@ Microsoft Azure SDK for Python This is the Microsoft Azure Cognitive Services Text Analytics 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.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. For a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -33,6 +27,14 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: pip uninstall azure +Usage +===== + +For code examples, see `Cognitive Services Text Analytics +`__ +on docs.microsoft.com. + + Provide Feedback ================ diff --git a/azure-cognitiveservices-language-textanalytics/azure/__init__.py b/azure-cognitiveservices-language-textanalytics/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-language-textanalytics/azure/__init__.py +++ b/azure-cognitiveservices-language-textanalytics/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-cognitiveservices-language-textanalytics/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-language-textanalytics/azure/cognitiveservices/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-language-textanalytics/azure/cognitiveservices/__init__.py +++ b/azure-cognitiveservices-language-textanalytics/azure/cognitiveservices/__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-cognitiveservices-language-textanalytics/azure/cognitiveservices/language/__init__.py b/azure-cognitiveservices-language-textanalytics/azure/cognitiveservices/language/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-language-textanalytics/azure/cognitiveservices/language/__init__.py +++ b/azure-cognitiveservices-language-textanalytics/azure/cognitiveservices/language/__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-cognitiveservices-language-textanalytics/azure_bdist_wheel.py b/azure-cognitiveservices-language-textanalytics/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-cognitiveservices-language-textanalytics/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-cognitiveservices-language-textanalytics/sdk_packaging.toml b/azure-cognitiveservices-language-textanalytics/sdk_packaging.toml new file mode 100644 index 000000000000..8e4a121a7f7c --- /dev/null +++ b/azure-cognitiveservices-language-textanalytics/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-cognitiveservices-language-textanalytics" +package_nspkg = "azure-cognitiveservices-language-nspkg" +package_pprint_name = "Cognitive Services Text Analytics" +package_doc_id = "cognitive-services" +is_stable = false +is_arm = false diff --git a/azure-cognitiveservices-language-textanalytics/setup.cfg b/azure-cognitiveservices-language-textanalytics/setup.cfg index 2d986195ea2f..3c6e79cf31da 100644 --- a/azure-cognitiveservices-language-textanalytics/setup.cfg +++ b/azure-cognitiveservices-language-textanalytics/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-cognitiveservices-language-nspkg \ No newline at end of file diff --git a/azure-cognitiveservices-language-textanalytics/setup.py b/azure-cognitiveservices-language-textanalytics/setup.py index d7e918673dfa..f022d8306378 100644 --- a/azure-cognitiveservices-language-textanalytics/setup.py +++ b/azure-cognitiveservices-language-textanalytics/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-cognitiveservices-language-textanalytics" @@ -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.cognitiveservices', + 'azure.cognitiveservices.language', + ]), install_requires=[ - 'msrest>=0.4.24,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-cognitiveservices-language-nspkg'], + } ) diff --git a/azure-cognitiveservices-nspkg/README.rst b/azure-cognitiveservices-nspkg/README.rst index ad7c260bffb3..cee9edfb04fd 100644 --- a/azure-cognitiveservices-nspkg/README.rst +++ b/azure-cognitiveservices-nspkg/README.rst @@ -5,6 +5,9 @@ This is the Microsoft Azure Cognitive Services namespace package. This package is not intended to be installed directly by the end user. +Since version 3.0, this is Python 2 package only, Python 3.x SDKs will use `PEP420 ` as namespace package strategy. +This package will use `python_requires` to enforce Python 2 installation. This implies that you might see this package on Python 3 environment if you have pip < 9.0 or setuptools < 24.2.0. + It provides the necessary files for other packages to extend the azure.cognitiveservices namespace. If you are looking to install the Azure client libraries, see the diff --git a/azure-cognitiveservices-nspkg/azure/__init__.py b/azure-cognitiveservices-nspkg/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/azure-cognitiveservices-nspkg/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-cognitiveservices-nspkg/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-nspkg/azure/cognitiveservices/__init__.py index e69de29bb2d1..0260537a02bb 100644 --- a/azure-cognitiveservices-nspkg/azure/cognitiveservices/__init__.py +++ b/azure-cognitiveservices-nspkg/azure/cognitiveservices/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-cognitiveservices-nspkg/sdk_packaging.toml b/azure-cognitiveservices-nspkg/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/azure-cognitiveservices-nspkg/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/azure-cognitiveservices-nspkg/setup.py b/azure-cognitiveservices-nspkg/setup.py index 854dc5a95143..ca45bfb2ebf3 100644 --- a/azure-cognitiveservices-nspkg/setup.py +++ b/azure-cognitiveservices-nspkg/setup.py @@ -25,7 +25,7 @@ setup( name='azure-cognitiveservices-nspkg', - version='2.0.0', + version='3.0.0', description='Microsoft Azure Cognitive Services Namespace Package [Internal]', long_description=open('README.rst', 'r').read(), license='MIT License', @@ -37,18 +37,14 @@ 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, packages=[ - 'azure', 'azure.cognitiveservices', ], + python_requires='<3', install_requires=[ - 'azure-nspkg>=2.0.0', + 'azure-nspkg>=3.0.0', ] ) diff --git a/azure-cognitiveservices-search-autosuggest/MANIFEST.in b/azure-cognitiveservices-search-autosuggest/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-cognitiveservices-search-autosuggest/MANIFEST.in +++ b/azure-cognitiveservices-search-autosuggest/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-cognitiveservices-search-autosuggest/azure/__init__.py b/azure-cognitiveservices-search-autosuggest/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-cognitiveservices-search-autosuggest/azure/__init__.py +++ b/azure-cognitiveservices-search-autosuggest/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-cognitiveservices-search-autosuggest/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-search-autosuggest/azure/cognitiveservices/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-cognitiveservices-search-autosuggest/azure/cognitiveservices/__init__.py +++ b/azure-cognitiveservices-search-autosuggest/azure/cognitiveservices/__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-cognitiveservices-search-autosuggest/azure/cognitiveservices/search/__init__.py b/azure-cognitiveservices-search-autosuggest/azure/cognitiveservices/search/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-cognitiveservices-search-autosuggest/azure/cognitiveservices/search/__init__.py +++ b/azure-cognitiveservices-search-autosuggest/azure/cognitiveservices/search/__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-cognitiveservices-search-autosuggest/azure_bdist_wheel.py b/azure-cognitiveservices-search-autosuggest/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-cognitiveservices-search-autosuggest/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-cognitiveservices-search-autosuggest/setup.cfg b/azure-cognitiveservices-search-autosuggest/setup.cfg index 4659976f991c..3c6e79cf31da 100644 --- a/azure-cognitiveservices-search-autosuggest/setup.cfg +++ b/azure-cognitiveservices-search-autosuggest/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-cognitiveservices-search-nspkg \ No newline at end of file diff --git a/azure-cognitiveservices-search-autosuggest/setup.py b/azure-cognitiveservices-search-autosuggest/setup.py index 1b656cc93ee8..c8d0f0923eeb 100644 --- a/azure-cognitiveservices-search-autosuggest/setup.py +++ b/azure-cognitiveservices-search-autosuggest/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-cognitiveservices-search-autosuggest" @@ -76,10 +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.cognitiveservices', + 'azure.cognitiveservices.search', + ]), install_requires=[ - 'msrest>=0.4.28,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-cognitiveservices-search-nspkg'], + } ) diff --git a/azure-cognitiveservices-search-customsearch/MANIFEST.in b/azure-cognitiveservices-search-customsearch/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-cognitiveservices-search-customsearch/MANIFEST.in +++ b/azure-cognitiveservices-search-customsearch/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-cognitiveservices-search-customsearch/README.rst b/azure-cognitiveservices-search-customsearch/README.rst index a2a36aef21d2..aba29e496e9f 100644 --- a/azure-cognitiveservices-search-customsearch/README.rst +++ b/azure-cognitiveservices-search-customsearch/README.rst @@ -1,15 +1,9 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure CustomSearch Client Library. +This is the Microsoft Azure Cognitive Services Custom Search 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. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. For a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -36,9 +30,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `CustomSearch -`__ -on readthedocs.org. +For code examples, see `Cognitive Services Custom Search +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-cognitiveservices-search-customsearch/azure/__init__.py b/azure-cognitiveservices-search-customsearch/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-customsearch/azure/__init__.py +++ b/azure-cognitiveservices-search-customsearch/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-cognitiveservices-search-customsearch/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-search-customsearch/azure/cognitiveservices/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-customsearch/azure/cognitiveservices/__init__.py +++ b/azure-cognitiveservices-search-customsearch/azure/cognitiveservices/__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-cognitiveservices-search-customsearch/azure/cognitiveservices/search/__init__.py b/azure-cognitiveservices-search-customsearch/azure/cognitiveservices/search/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-customsearch/azure/cognitiveservices/search/__init__.py +++ b/azure-cognitiveservices-search-customsearch/azure/cognitiveservices/search/__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-cognitiveservices-search-customsearch/azure_bdist_wheel.py b/azure-cognitiveservices-search-customsearch/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-cognitiveservices-search-customsearch/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-cognitiveservices-search-customsearch/sdk_packaging.toml b/azure-cognitiveservices-search-customsearch/sdk_packaging.toml new file mode 100644 index 000000000000..d97eacc3aaab --- /dev/null +++ b/azure-cognitiveservices-search-customsearch/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-cognitiveservices-search-customsearch" +package_nspkg = "azure-cognitiveservices-search-nspkg" +package_pprint_name = "Cognitive Services Custom Search" +package_doc_id = "cognitive-services" +is_stable = false +is_arm = false diff --git a/azure-cognitiveservices-search-customsearch/setup.cfg b/azure-cognitiveservices-search-customsearch/setup.cfg index 4659976f991c..3c6e79cf31da 100644 --- a/azure-cognitiveservices-search-customsearch/setup.cfg +++ b/azure-cognitiveservices-search-customsearch/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-cognitiveservices-search-nspkg \ No newline at end of file diff --git a/azure-cognitiveservices-search-customsearch/setup.py b/azure-cognitiveservices-search-customsearch/setup.py index d4cb316c821d..44c8e77c68b7 100644 --- a/azure-cognitiveservices-search-customsearch/setup.py +++ b/azure-cognitiveservices-search-customsearch/setup.py @@ -10,16 +10,10 @@ 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-cognitiveservices-search-customsearch" -PACKAGE_PPRINT_NAME = "CustomSearch" +PACKAGE_PPRINT_NAME = "Cognitive Services Custom Search" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') @@ -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.cognitiveservices', + 'azure.cognitiveservices.search', + ]), install_requires=[ - 'msrest>=0.4.24,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-cognitiveservices-search-nspkg'], + } ) diff --git a/azure-cognitiveservices-search-entitysearch/MANIFEST.in b/azure-cognitiveservices-search-entitysearch/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-cognitiveservices-search-entitysearch/MANIFEST.in +++ b/azure-cognitiveservices-search-entitysearch/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-cognitiveservices-search-entitysearch/README.rst b/azure-cognitiveservices-search-entitysearch/README.rst index cb7449a6e773..4e7a1c9a0a0d 100644 --- a/azure-cognitiveservices-search-entitysearch/README.rst +++ b/azure-cognitiveservices-search-entitysearch/README.rst @@ -3,7 +3,7 @@ Microsoft Azure SDK for Python This is the Microsoft Azure Cognitive Services Entity Search Client Library. -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 a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -30,9 +30,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Entity Search +For code examples, see `Cognitive Services Entity Search `__ -on readthedocs.org. +on docs.microsoft.com. Provide Feedback diff --git a/azure-cognitiveservices-search-entitysearch/azure/__init__.py b/azure-cognitiveservices-search-entitysearch/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/__init__.py +++ b/azure-cognitiveservices-search-entitysearch/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-cognitiveservices-search-entitysearch/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/__init__.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/__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-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/__init__.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/__init__.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/__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-cognitiveservices-search-entitysearch/azure_bdist_wheel.py b/azure-cognitiveservices-search-entitysearch/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-cognitiveservices-search-entitysearch/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-cognitiveservices-search-entitysearch/sdk_packaging.toml b/azure-cognitiveservices-search-entitysearch/sdk_packaging.toml new file mode 100644 index 000000000000..8046fb73aa1a --- /dev/null +++ b/azure-cognitiveservices-search-entitysearch/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-cognitiveservices-search-entitysearch" +package_nspkg = "azure-cognitiveservices-search-nspkg" +package_pprint_name = "Cognitive Services Entity Search" +package_doc_id = "cognitive-services" +is_stable = true +is_arm = false diff --git a/azure-cognitiveservices-search-entitysearch/setup.cfg b/azure-cognitiveservices-search-entitysearch/setup.cfg index 4659976f991c..3c6e79cf31da 100644 --- a/azure-cognitiveservices-search-entitysearch/setup.cfg +++ b/azure-cognitiveservices-search-entitysearch/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-cognitiveservices-search-nspkg \ No newline at end of file diff --git a/azure-cognitiveservices-search-entitysearch/setup.py b/azure-cognitiveservices-search-entitysearch/setup.py index 04f29eff4382..00b00ddd7b05 100644 --- a/azure-cognitiveservices-search-entitysearch/setup.py +++ b/azure-cognitiveservices-search-entitysearch/setup.py @@ -10,16 +10,10 @@ 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-cognitiveservices-search-entitysearch" -PACKAGE_PPRINT_NAME = "Cognitive Services EntitySearch" +PACKAGE_PPRINT_NAME = "Cognitive Services Entity Search" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') @@ -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.cognitiveservices', + 'azure.cognitiveservices.search', + ]), install_requires=[ - 'msrest>=0.4.28,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-cognitiveservices-search-nspkg'], + } ) diff --git a/azure-cognitiveservices-search-imagesearch/MANIFEST.in b/azure-cognitiveservices-search-imagesearch/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-cognitiveservices-search-imagesearch/MANIFEST.in +++ b/azure-cognitiveservices-search-imagesearch/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-cognitiveservices-search-imagesearch/README.rst b/azure-cognitiveservices-search-imagesearch/README.rst index ca389b6dff29..26360c01f780 100644 --- a/azure-cognitiveservices-search-imagesearch/README.rst +++ b/azure-cognitiveservices-search-imagesearch/README.rst @@ -1,9 +1,9 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure ImageSearch Client Library. +This is the Microsoft Azure Cognitive Services Image Search Client Library. -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 a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -30,9 +30,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Image Search +For code examples, see `Cognitive Services Image Search `__ -on readthedocs.org. +on docs.microsoft.com. Provide Feedback diff --git a/azure-cognitiveservices-search-imagesearch/azure/__init__.py b/azure-cognitiveservices-search-imagesearch/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-imagesearch/azure/__init__.py +++ b/azure-cognitiveservices-search-imagesearch/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-cognitiveservices-search-imagesearch/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/__init__.py +++ b/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/__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-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/__init__.py b/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/__init__.py +++ b/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/__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-cognitiveservices-search-imagesearch/azure_bdist_wheel.py b/azure-cognitiveservices-search-imagesearch/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-cognitiveservices-search-imagesearch/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-cognitiveservices-search-imagesearch/sdk_packaging.toml b/azure-cognitiveservices-search-imagesearch/sdk_packaging.toml new file mode 100644 index 000000000000..4d1c39e6380b --- /dev/null +++ b/azure-cognitiveservices-search-imagesearch/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-cognitiveservices-search-imagesearch" +package_nspkg = "azure-cognitiveservices-search-nspkg" +package_pprint_name = "Cognitive Services Image Search" +package_doc_id = "cognitive-services" +is_stable = true +is_arm = false diff --git a/azure-cognitiveservices-search-imagesearch/setup.cfg b/azure-cognitiveservices-search-imagesearch/setup.cfg index 4659976f991c..3c6e79cf31da 100644 --- a/azure-cognitiveservices-search-imagesearch/setup.cfg +++ b/azure-cognitiveservices-search-imagesearch/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-cognitiveservices-search-nspkg \ No newline at end of file diff --git a/azure-cognitiveservices-search-imagesearch/setup.py b/azure-cognitiveservices-search-imagesearch/setup.py index 7503e47dbd95..a2bd4197c30b 100644 --- a/azure-cognitiveservices-search-imagesearch/setup.py +++ b/azure-cognitiveservices-search-imagesearch/setup.py @@ -10,16 +10,10 @@ 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-cognitiveservices-search-imagesearch" -PACKAGE_PPRINT_NAME = "ImageSearch" +PACKAGE_PPRINT_NAME = "Cognitive Services Image Search" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') @@ -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.cognitiveservices', + 'azure.cognitiveservices.search', + ]), install_requires=[ - 'msrest>=0.4.28,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-cognitiveservices-search-nspkg'], + } ) diff --git a/azure-cognitiveservices-search-newssearch/MANIFEST.in b/azure-cognitiveservices-search-newssearch/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-cognitiveservices-search-newssearch/MANIFEST.in +++ b/azure-cognitiveservices-search-newssearch/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-cognitiveservices-search-newssearch/README.rst b/azure-cognitiveservices-search-newssearch/README.rst index 81f27501afe5..3231e0d52496 100644 --- a/azure-cognitiveservices-search-newssearch/README.rst +++ b/azure-cognitiveservices-search-newssearch/README.rst @@ -1,9 +1,9 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure NewsSearch Client Library. +This is the Microsoft Azure Cognitive Services News Search Client Library. -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 a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -30,9 +30,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `News Search +For code examples, see `Cognitive Services News Search `__ -on readthedocs.org. +on docs.microsoft.com. Provide Feedback diff --git a/azure-cognitiveservices-search-newssearch/azure/__init__.py b/azure-cognitiveservices-search-newssearch/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-newssearch/azure/__init__.py +++ b/azure-cognitiveservices-search-newssearch/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-cognitiveservices-search-newssearch/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-search-newssearch/azure/cognitiveservices/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-newssearch/azure/cognitiveservices/__init__.py +++ b/azure-cognitiveservices-search-newssearch/azure/cognitiveservices/__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-cognitiveservices-search-newssearch/azure/cognitiveservices/search/__init__.py b/azure-cognitiveservices-search-newssearch/azure/cognitiveservices/search/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-newssearch/azure/cognitiveservices/search/__init__.py +++ b/azure-cognitiveservices-search-newssearch/azure/cognitiveservices/search/__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-cognitiveservices-search-newssearch/azure_bdist_wheel.py b/azure-cognitiveservices-search-newssearch/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-cognitiveservices-search-newssearch/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-cognitiveservices-search-newssearch/sdk_packaging.toml b/azure-cognitiveservices-search-newssearch/sdk_packaging.toml new file mode 100644 index 000000000000..7266bf210330 --- /dev/null +++ b/azure-cognitiveservices-search-newssearch/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-cognitiveservices-search-newssearch" +package_nspkg = "azure-cognitiveservices-search-nspkg" +package_pprint_name = "Cognitive Services News Search" +package_doc_id = "cognitive-services" +is_stable = true +is_arm = false diff --git a/azure-cognitiveservices-search-newssearch/setup.cfg b/azure-cognitiveservices-search-newssearch/setup.cfg index 4659976f991c..3c6e79cf31da 100644 --- a/azure-cognitiveservices-search-newssearch/setup.cfg +++ b/azure-cognitiveservices-search-newssearch/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-cognitiveservices-search-nspkg \ No newline at end of file diff --git a/azure-cognitiveservices-search-newssearch/setup.py b/azure-cognitiveservices-search-newssearch/setup.py index 06a8b47a4891..02d898c25520 100644 --- a/azure-cognitiveservices-search-newssearch/setup.py +++ b/azure-cognitiveservices-search-newssearch/setup.py @@ -10,16 +10,10 @@ 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-cognitiveservices-search-newssearch" -PACKAGE_PPRINT_NAME = "NewsSearch" +PACKAGE_PPRINT_NAME = "Cognitive Services News Search" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') @@ -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.cognitiveservices', + 'azure.cognitiveservices.search', + ]), install_requires=[ - 'msrest>=0.4.28,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-cognitiveservices-search-nspkg'], + } ) diff --git a/azure-cognitiveservices-search-nspkg/README.rst b/azure-cognitiveservices-search-nspkg/README.rst index 3e2199a6bbbe..8250270c5bbc 100644 --- a/azure-cognitiveservices-search-nspkg/README.rst +++ b/azure-cognitiveservices-search-nspkg/README.rst @@ -5,6 +5,9 @@ This is the Microsoft Azure Cognitive Services Search namespace package. This package is not intended to be installed directly by the end user. +Since version 3.0, this is Python 2 package only, Python 3.x SDKs will use `PEP420 ` as namespace package strategy. +This package will use `python_requires` to enforce Python 2 installation. This implies that you might see this package on Python 3 environment if you have pip < 9.0 or setuptools < 24.2.0. + It provides the necessary files for other packages to extend the azure.cognitiveservices.search namespace. If you are looking to install the Azure client libraries, see the diff --git a/azure-cognitiveservices-search-nspkg/azure/__init__.py b/azure-cognitiveservices-search-nspkg/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/azure-cognitiveservices-search-nspkg/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-cognitiveservices-search-nspkg/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-search-nspkg/azure/cognitiveservices/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/azure-cognitiveservices-search-nspkg/azure/cognitiveservices/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-cognitiveservices-search-nspkg/azure/cognitiveservices/search/__init__.py b/azure-cognitiveservices-search-nspkg/azure/cognitiveservices/search/__init__.py index e69de29bb2d1..0260537a02bb 100644 --- a/azure-cognitiveservices-search-nspkg/azure/cognitiveservices/search/__init__.py +++ b/azure-cognitiveservices-search-nspkg/azure/cognitiveservices/search/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-cognitiveservices-search-nspkg/sdk_packaging.toml b/azure-cognitiveservices-search-nspkg/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/azure-cognitiveservices-search-nspkg/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/azure-cognitiveservices-search-nspkg/setup.py b/azure-cognitiveservices-search-nspkg/setup.py index 561b8f86c348..115c48a6dde0 100644 --- a/azure-cognitiveservices-search-nspkg/setup.py +++ b/azure-cognitiveservices-search-nspkg/setup.py @@ -25,7 +25,7 @@ setup( name='azure-cognitiveservices-search-nspkg', - version='2.0.0', + version='3.0.0', description='Microsoft Azure Cognitive Services Search Namespace Package [Internal]', long_description=open('README.rst', 'r').read(), license='MIT License', @@ -37,19 +37,14 @@ 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, packages=[ - 'azure', - 'azure.cognitiveservices', 'azure.cognitiveservices.search', ], + python_requires='<3', install_requires=[ - 'azure-cognitiveservices-nspkg>=2.0.0', + 'azure-cognitiveservices-nspkg>=3.0.0', ] ) diff --git a/azure-cognitiveservices-search-videosearch/MANIFEST.in b/azure-cognitiveservices-search-videosearch/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-cognitiveservices-search-videosearch/MANIFEST.in +++ b/azure-cognitiveservices-search-videosearch/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-cognitiveservices-search-videosearch/README.rst b/azure-cognitiveservices-search-videosearch/README.rst index 0639e8736007..d74b2f5f64fd 100644 --- a/azure-cognitiveservices-search-videosearch/README.rst +++ b/azure-cognitiveservices-search-videosearch/README.rst @@ -3,7 +3,7 @@ Microsoft Azure SDK for Python This is the Microsoft Azure Cognitive Services Video Search Client Library. -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 a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -30,9 +30,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Video Search +For code examples, see `Cognitive Services Video Search `__ -on readthedocs.org. +on docs.microsoft.com. Provide Feedback diff --git a/azure-cognitiveservices-search-videosearch/azure/__init__.py b/azure-cognitiveservices-search-videosearch/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-videosearch/azure/__init__.py +++ b/azure-cognitiveservices-search-videosearch/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-cognitiveservices-search-videosearch/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-search-videosearch/azure/cognitiveservices/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-videosearch/azure/cognitiveservices/__init__.py +++ b/azure-cognitiveservices-search-videosearch/azure/cognitiveservices/__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-cognitiveservices-search-videosearch/azure/cognitiveservices/search/__init__.py b/azure-cognitiveservices-search-videosearch/azure/cognitiveservices/search/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-videosearch/azure/cognitiveservices/search/__init__.py +++ b/azure-cognitiveservices-search-videosearch/azure/cognitiveservices/search/__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-cognitiveservices-search-videosearch/azure_bdist_wheel.py b/azure-cognitiveservices-search-videosearch/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-cognitiveservices-search-videosearch/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-cognitiveservices-search-videosearch/sdk_packaging.toml b/azure-cognitiveservices-search-videosearch/sdk_packaging.toml new file mode 100644 index 000000000000..9ec2c0acaeeb --- /dev/null +++ b/azure-cognitiveservices-search-videosearch/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-cognitiveservices-search-videosearch" +package_nspkg = "azure-cognitiveservices-search-nspkg" +package_pprint_name = "Cognitive Services Video Search" +package_doc_id = "cognitive-services" +is_stable = true +is_arm = false diff --git a/azure-cognitiveservices-search-videosearch/setup.cfg b/azure-cognitiveservices-search-videosearch/setup.cfg index 4659976f991c..3c6e79cf31da 100644 --- a/azure-cognitiveservices-search-videosearch/setup.cfg +++ b/azure-cognitiveservices-search-videosearch/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-cognitiveservices-search-nspkg \ No newline at end of file diff --git a/azure-cognitiveservices-search-videosearch/setup.py b/azure-cognitiveservices-search-videosearch/setup.py index 6d3f83d35bbf..ab90266b7623 100644 --- a/azure-cognitiveservices-search-videosearch/setup.py +++ b/azure-cognitiveservices-search-videosearch/setup.py @@ -10,16 +10,10 @@ 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-cognitiveservices-search-videosearch" -PACKAGE_PPRINT_NAME = "Cognitive Services VideoSearch" +PACKAGE_PPRINT_NAME = "Cognitive Services Video Search" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') @@ -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.cognitiveservices', + 'azure.cognitiveservices.search', + ]), install_requires=[ - 'msrest>=0.4.28,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-cognitiveservices-search-nspkg'], + } ) diff --git a/azure-cognitiveservices-search-visualsearch/MANIFEST.in b/azure-cognitiveservices-search-visualsearch/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-cognitiveservices-search-visualsearch/MANIFEST.in +++ b/azure-cognitiveservices-search-visualsearch/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-cognitiveservices-search-visualsearch/README.rst b/azure-cognitiveservices-search-visualsearch/README.rst index 800f91d3eeb5..353d78c5b606 100644 --- a/azure-cognitiveservices-search-visualsearch/README.rst +++ b/azure-cognitiveservices-search-visualsearch/README.rst @@ -1,9 +1,9 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure Cognitive Services VisualSearch Client Library. +This is the Microsoft Azure Cognitive Services Visual Search Client Library. -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 a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -30,9 +30,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Visual Search +For code examples, see `Cognitive Services Visual Search `__ -on readthedocs.org. +on docs.microsoft.com. Provide Feedback diff --git a/azure-cognitiveservices-search-visualsearch/azure/__init__.py b/azure-cognitiveservices-search-visualsearch/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-visualsearch/azure/__init__.py +++ b/azure-cognitiveservices-search-visualsearch/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-cognitiveservices-search-visualsearch/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/__init__.py +++ b/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/__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-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/__init__.py b/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/__init__.py +++ b/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/__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-cognitiveservices-search-visualsearch/azure_bdist_wheel.py b/azure-cognitiveservices-search-visualsearch/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-cognitiveservices-search-visualsearch/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-cognitiveservices-search-visualsearch/sdk_packaging.toml b/azure-cognitiveservices-search-visualsearch/sdk_packaging.toml new file mode 100644 index 000000000000..269e6996fa9b --- /dev/null +++ b/azure-cognitiveservices-search-visualsearch/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-cognitiveservices-search-visualsearch" +package_nspkg = "azure-cognitiveservices-search-nspkg" +package_pprint_name = "Cognitive Services Visual Search" +package_doc_id = "cognitive-services" +is_stable = false +is_arm = false diff --git a/azure-cognitiveservices-search-visualsearch/setup.cfg b/azure-cognitiveservices-search-visualsearch/setup.cfg index 4659976f991c..3c6e79cf31da 100644 --- a/azure-cognitiveservices-search-visualsearch/setup.cfg +++ b/azure-cognitiveservices-search-visualsearch/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-cognitiveservices-search-nspkg \ No newline at end of file diff --git a/azure-cognitiveservices-search-visualsearch/setup.py b/azure-cognitiveservices-search-visualsearch/setup.py index c815f23999c0..1526e0ed3aa5 100644 --- a/azure-cognitiveservices-search-visualsearch/setup.py +++ b/azure-cognitiveservices-search-visualsearch/setup.py @@ -10,16 +10,10 @@ 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-cognitiveservices-search-visualsearch" -PACKAGE_PPRINT_NAME = "Cognitive Services VisualSearch" +PACKAGE_PPRINT_NAME = "Cognitive Services Visual Search" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') @@ -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.cognitiveservices', + 'azure.cognitiveservices.search', + ]), install_requires=[ - 'msrest>=0.4.28,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-cognitiveservices-search-nspkg'], + } ) diff --git a/azure-cognitiveservices-search-websearch/MANIFEST.in b/azure-cognitiveservices-search-websearch/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-cognitiveservices-search-websearch/MANIFEST.in +++ b/azure-cognitiveservices-search-websearch/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-cognitiveservices-search-websearch/README.rst b/azure-cognitiveservices-search-websearch/README.rst index 1c4ca851b42c..6963a49a6ece 100644 --- a/azure-cognitiveservices-search-websearch/README.rst +++ b/azure-cognitiveservices-search-websearch/README.rst @@ -1,9 +1,9 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure Cognitive Services WebSearch Client Library. +This is the Microsoft Azure Cognitive Services Web Search Client Library. -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 a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -30,9 +30,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Web Search +For code examples, see `Cognitive Services Web Search `__ -on readthedocs.org. +on docs.microsoft.com. Provide Feedback diff --git a/azure-cognitiveservices-search-websearch/azure/__init__.py b/azure-cognitiveservices-search-websearch/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-websearch/azure/__init__.py +++ b/azure-cognitiveservices-search-websearch/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-cognitiveservices-search-websearch/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-search-websearch/azure/cognitiveservices/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-websearch/azure/cognitiveservices/__init__.py +++ b/azure-cognitiveservices-search-websearch/azure/cognitiveservices/__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-cognitiveservices-search-websearch/azure/cognitiveservices/search/__init__.py b/azure-cognitiveservices-search-websearch/azure/cognitiveservices/search/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-search-websearch/azure/cognitiveservices/search/__init__.py +++ b/azure-cognitiveservices-search-websearch/azure/cognitiveservices/search/__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-cognitiveservices-search-websearch/azure_bdist_wheel.py b/azure-cognitiveservices-search-websearch/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-cognitiveservices-search-websearch/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-cognitiveservices-search-websearch/sdk_packaging.toml b/azure-cognitiveservices-search-websearch/sdk_packaging.toml new file mode 100644 index 000000000000..ee6f13253357 --- /dev/null +++ b/azure-cognitiveservices-search-websearch/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-cognitiveservices-search-websearch" +package_nspkg = "azure-cognitiveservices-search-nspkg" +package_pprint_name = "Cognitive Services Web Search" +package_doc_id = "cognitive-services" +is_stable = true +is_arm = false diff --git a/azure-cognitiveservices-search-websearch/setup.cfg b/azure-cognitiveservices-search-websearch/setup.cfg index 4659976f991c..3c6e79cf31da 100644 --- a/azure-cognitiveservices-search-websearch/setup.cfg +++ b/azure-cognitiveservices-search-websearch/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-cognitiveservices-search-nspkg \ No newline at end of file diff --git a/azure-cognitiveservices-search-websearch/setup.py b/azure-cognitiveservices-search-websearch/setup.py index 27dfd82c49a0..c92251cf0f5c 100644 --- a/azure-cognitiveservices-search-websearch/setup.py +++ b/azure-cognitiveservices-search-websearch/setup.py @@ -10,16 +10,10 @@ 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-cognitiveservices-search-websearch" -PACKAGE_PPRINT_NAME = "Cognitive Services WebSearch" +PACKAGE_PPRINT_NAME = "Cognitive Services Web Search" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') @@ -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.cognitiveservices', + 'azure.cognitiveservices.search', + ]), install_requires=[ - 'msrest>=0.4.28,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-cognitiveservices-search-nspkg'], + } ) diff --git a/azure-cognitiveservices-vision-computervision/MANIFEST.in b/azure-cognitiveservices-vision-computervision/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-cognitiveservices-vision-computervision/MANIFEST.in +++ b/azure-cognitiveservices-vision-computervision/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-cognitiveservices-vision-computervision/README.rst b/azure-cognitiveservices-vision-computervision/README.rst index ee1ba86cf7c0..eee101b4fb52 100644 --- a/azure-cognitiveservices-vision-computervision/README.rst +++ b/azure-cognitiveservices-vision-computervision/README.rst @@ -3,7 +3,7 @@ Microsoft Azure SDK for Python This is the Microsoft Azure Cognitive Services Computer Vision Client Library. -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 a more complete set of Azure libraries, see the `azure `__ bundle package. diff --git a/azure-cognitiveservices-vision-computervision/azure/__init__.py b/azure-cognitiveservices-vision-computervision/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-vision-computervision/azure/__init__.py +++ b/azure-cognitiveservices-vision-computervision/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-cognitiveservices-vision-computervision/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/__init__.py +++ b/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/__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-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/__init__.py b/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/__init__.py +++ b/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/__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-cognitiveservices-vision-computervision/azure_bdist_wheel.py b/azure-cognitiveservices-vision-computervision/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-cognitiveservices-vision-computervision/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-cognitiveservices-vision-computervision/setup.cfg b/azure-cognitiveservices-vision-computervision/setup.cfg index 6197b40d106e..3c6e79cf31da 100644 --- a/azure-cognitiveservices-vision-computervision/setup.cfg +++ b/azure-cognitiveservices-vision-computervision/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-cognitiveservices-vision-nspkg \ No newline at end of file diff --git a/azure-cognitiveservices-vision-computervision/setup.py b/azure-cognitiveservices-vision-computervision/setup.py index 7402c1967c37..500702758cf2 100644 --- a/azure-cognitiveservices-vision-computervision/setup.py +++ b/azure-cognitiveservices-vision-computervision/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-cognitiveservices-vision-computervision" @@ -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.cognitiveservices', + 'azure.cognitiveservices.vision', + ]), install_requires=[ - 'msrest>=0.4.29,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-cognitiveservices-vision-nspkg'], + } ) diff --git a/azure-cognitiveservices-vision-contentmoderator/MANIFEST.in b/azure-cognitiveservices-vision-contentmoderator/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-cognitiveservices-vision-contentmoderator/MANIFEST.in +++ b/azure-cognitiveservices-vision-contentmoderator/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-cognitiveservices-vision-contentmoderator/README.rst b/azure-cognitiveservices-vision-contentmoderator/README.rst index 71b89a9adbf1..655bc03184d3 100644 --- a/azure-cognitiveservices-vision-contentmoderator/README.rst +++ b/azure-cognitiveservices-vision-contentmoderator/README.rst @@ -3,13 +3,7 @@ Microsoft Azure SDK for Python This is the Microsoft Azure Cognitive Services Content Moderator 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.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. For a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -33,6 +27,14 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: pip uninstall azure +Usage +===== + +For code examples, see `Cognitive Services Content Moderator +`__ +on docs.microsoft.com. + + Provide Feedback ================ diff --git a/azure-cognitiveservices-vision-contentmoderator/azure/__init__.py b/azure-cognitiveservices-vision-contentmoderator/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-vision-contentmoderator/azure/__init__.py +++ b/azure-cognitiveservices-vision-contentmoderator/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-cognitiveservices-vision-contentmoderator/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-vision-contentmoderator/azure/cognitiveservices/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-vision-contentmoderator/azure/cognitiveservices/__init__.py +++ b/azure-cognitiveservices-vision-contentmoderator/azure/cognitiveservices/__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-cognitiveservices-vision-contentmoderator/azure/cognitiveservices/vision/__init__.py b/azure-cognitiveservices-vision-contentmoderator/azure/cognitiveservices/vision/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-vision-contentmoderator/azure/cognitiveservices/vision/__init__.py +++ b/azure-cognitiveservices-vision-contentmoderator/azure/cognitiveservices/vision/__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-cognitiveservices-vision-contentmoderator/azure_bdist_wheel.py b/azure-cognitiveservices-vision-contentmoderator/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-cognitiveservices-vision-contentmoderator/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-cognitiveservices-vision-contentmoderator/sdk_packaging.toml b/azure-cognitiveservices-vision-contentmoderator/sdk_packaging.toml new file mode 100644 index 000000000000..07907c5ade98 --- /dev/null +++ b/azure-cognitiveservices-vision-contentmoderator/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-cognitiveservices-vision-contentmoderator" +package_nspkg = "azure-cognitiveservices-vision-nspkg" +package_pprint_name = "Cognitive Services Content Moderator" +package_doc_id = "cognitive-services" +is_stable = false +is_arm = false diff --git a/azure-cognitiveservices-vision-contentmoderator/setup.cfg b/azure-cognitiveservices-vision-contentmoderator/setup.cfg index 6197b40d106e..3c6e79cf31da 100644 --- a/azure-cognitiveservices-vision-contentmoderator/setup.cfg +++ b/azure-cognitiveservices-vision-contentmoderator/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-cognitiveservices-vision-nspkg \ No newline at end of file diff --git a/azure-cognitiveservices-vision-contentmoderator/setup.py b/azure-cognitiveservices-vision-contentmoderator/setup.py index 8111d4a03e2c..1f33265792a5 100644 --- a/azure-cognitiveservices-vision-contentmoderator/setup.py +++ b/azure-cognitiveservices-vision-contentmoderator/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-cognitiveservices-vision-contentmoderator" @@ -69,17 +63,25 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', '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.cognitiveservices', + 'azure.cognitiveservices.vision', + ]), install_requires=[ - 'msrest>=0.4.24,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-cognitiveservices-vision-nspkg'], + } ) diff --git a/azure-cognitiveservices-vision-customvision/MANIFEST.in b/azure-cognitiveservices-vision-customvision/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-cognitiveservices-vision-customvision/MANIFEST.in +++ b/azure-cognitiveservices-vision-customvision/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-cognitiveservices-vision-customvision/README.rst b/azure-cognitiveservices-vision-customvision/README.rst index d8c393a73675..637b670d39ad 100644 --- a/azure-cognitiveservices-vision-customvision/README.rst +++ b/azure-cognitiveservices-vision-customvision/README.rst @@ -3,7 +3,7 @@ Microsoft Azure SDK for Python This is the Microsoft Azure Custom Vision Client Library. -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 a more complete set of Azure libraries, see the `azure `__ bundle package. diff --git a/azure-cognitiveservices-vision-customvision/azure/__init__.py b/azure-cognitiveservices-vision-customvision/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-cognitiveservices-vision-customvision/azure/__init__.py +++ b/azure-cognitiveservices-vision-customvision/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-cognitiveservices-vision-customvision/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/__init__.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/__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-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/__init__.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/__init__.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/__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-cognitiveservices-vision-customvision/azure_bdist_wheel.py b/azure-cognitiveservices-vision-customvision/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-cognitiveservices-vision-customvision/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-cognitiveservices-vision-customvision/setup.cfg b/azure-cognitiveservices-vision-customvision/setup.cfg index 6197b40d106e..3c6e79cf31da 100644 --- a/azure-cognitiveservices-vision-customvision/setup.cfg +++ b/azure-cognitiveservices-vision-customvision/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-cognitiveservices-vision-nspkg \ No newline at end of file diff --git a/azure-cognitiveservices-vision-customvision/setup.py b/azure-cognitiveservices-vision-customvision/setup.py index af4df99dddaf..96db640f2a90 100644 --- a/azure-cognitiveservices-vision-customvision/setup.py +++ b/azure-cognitiveservices-vision-customvision/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-cognitiveservices-vision-customvision" @@ -76,10 +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.cognitiveservices', + 'azure.cognitiveservices.vision', + ]), install_requires=[ - 'msrest>=0.4.28,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-cognitiveservices-vision-nspkg'], + } ) diff --git a/azure-cognitiveservices-vision-face/MANIFEST.in b/azure-cognitiveservices-vision-face/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-cognitiveservices-vision-face/MANIFEST.in +++ b/azure-cognitiveservices-vision-face/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-cognitiveservices-vision-face/README.rst b/azure-cognitiveservices-vision-face/README.rst index 2775509d3801..072d2c22386f 100644 --- a/azure-cognitiveservices-vision-face/README.rst +++ b/azure-cognitiveservices-vision-face/README.rst @@ -3,13 +3,7 @@ Microsoft Azure SDK for Python This is the Microsoft Azure Cognitive Services Face 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.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. For a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -33,6 +27,14 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: pip uninstall azure +Usage +===== + +For code examples, see `Cognitive Services Face +`__ +on docs.microsoft.com. + + Provide Feedback ================ diff --git a/azure-cognitiveservices-vision-face/azure/__init__.py b/azure-cognitiveservices-vision-face/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-vision-face/azure/__init__.py +++ b/azure-cognitiveservices-vision-face/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-cognitiveservices-vision-face/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-vision-face/azure/cognitiveservices/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-vision-face/azure/cognitiveservices/__init__.py +++ b/azure-cognitiveservices-vision-face/azure/cognitiveservices/__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-cognitiveservices-vision-face/azure/cognitiveservices/vision/__init__.py b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/__init__.py +++ b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/__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-cognitiveservices-vision-face/azure_bdist_wheel.py b/azure-cognitiveservices-vision-face/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-cognitiveservices-vision-face/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-cognitiveservices-vision-face/sdk_packaging.toml b/azure-cognitiveservices-vision-face/sdk_packaging.toml new file mode 100644 index 000000000000..3755264a50f4 --- /dev/null +++ b/azure-cognitiveservices-vision-face/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-cognitiveservices-vision-face" +package_nspkg = "azure-cognitiveservices-vision-nspkg" +package_pprint_name = "Cognitive Services Face" +package_doc_id = "cognitive-services" +is_stable = false +is_arm = false diff --git a/azure-cognitiveservices-vision-face/setup.cfg b/azure-cognitiveservices-vision-face/setup.cfg index 6197b40d106e..3c6e79cf31da 100644 --- a/azure-cognitiveservices-vision-face/setup.cfg +++ b/azure-cognitiveservices-vision-face/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-cognitiveservices-vision-nspkg \ No newline at end of file diff --git a/azure-cognitiveservices-vision-face/setup.py b/azure-cognitiveservices-vision-face/setup.py index 71868eea4aa0..f7ab200174d8 100644 --- a/azure-cognitiveservices-vision-face/setup.py +++ b/azure-cognitiveservices-vision-face/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-cognitiveservices-vision-face" @@ -69,17 +63,25 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', '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.cognitiveservices', + 'azure.cognitiveservices.vision', + ]), install_requires=[ - 'msrest>=0.4.24,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-cognitiveservices-vision-nspkg'], + } ) diff --git a/azure-cognitiveservices-vision-nspkg/README.rst b/azure-cognitiveservices-vision-nspkg/README.rst index c879ffe500c3..1d12e0a19abc 100644 --- a/azure-cognitiveservices-vision-nspkg/README.rst +++ b/azure-cognitiveservices-vision-nspkg/README.rst @@ -5,6 +5,9 @@ This is the Microsoft Azure Cognitive Services Vision namespace package. This package is not intended to be installed directly by the end user. +Since version 3.0, this is Python 2 package only, Python 3.x SDKs will use `PEP420 ` as namespace package strategy. +This package will use `python_requires` to enforce Python 2 installation. This implies that you might see this package on Python 3 environment if you have pip < 9.0 or setuptools < 24.2.0. + It provides the necessary files for other packages to extend the azure.cognitiveservices.vision namespace. If you are looking to install the Azure client libraries, see the diff --git a/azure-cognitiveservices-vision-nspkg/azure/__init__.py b/azure-cognitiveservices-vision-nspkg/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/azure-cognitiveservices-vision-nspkg/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-cognitiveservices-vision-nspkg/azure/cognitiveservices/__init__.py b/azure-cognitiveservices-vision-nspkg/azure/cognitiveservices/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/azure-cognitiveservices-vision-nspkg/azure/cognitiveservices/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-cognitiveservices-vision-nspkg/azure/cognitiveservices/vision/__init__.py b/azure-cognitiveservices-vision-nspkg/azure/cognitiveservices/vision/__init__.py index e69de29bb2d1..0260537a02bb 100644 --- a/azure-cognitiveservices-vision-nspkg/azure/cognitiveservices/vision/__init__.py +++ b/azure-cognitiveservices-vision-nspkg/azure/cognitiveservices/vision/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-cognitiveservices-vision-nspkg/sdk_packaging.toml b/azure-cognitiveservices-vision-nspkg/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/azure-cognitiveservices-vision-nspkg/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/azure-cognitiveservices-vision-nspkg/setup.py b/azure-cognitiveservices-vision-nspkg/setup.py index 4b8a51fec2c3..0e81a91d639d 100644 --- a/azure-cognitiveservices-vision-nspkg/setup.py +++ b/azure-cognitiveservices-vision-nspkg/setup.py @@ -25,7 +25,7 @@ setup( name='azure-cognitiveservices-vision-nspkg', - version='2.0.0', + version='3.0.0', description='Microsoft Azure Cognitive Services Vision Namespace Package [Internal]', long_description=open('README.rst', 'r').read(), license='MIT License', @@ -37,19 +37,14 @@ 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, packages=[ - 'azure', - 'azure.cognitiveservices', 'azure.cognitiveservices.vision', ], + python_requires='<3', install_requires=[ - 'azure-cognitiveservices-nspkg>=2.0.0', + 'azure-cognitiveservices-nspkg>=3.0.0', ] ) diff --git a/azure-common/MANIFEST.in b/azure-common/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-common/MANIFEST.in +++ b/azure-common/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-common/azure/__init__.py b/azure-common/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-common/azure/__init__.py +++ b/azure-common/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-common/azure/common/__init__.py b/azure-common/azure/common/__init__.py index 95d844e06829..6fbc7a2dcdbf 100644 --- a/azure-common/azure/common/__init__.py +++ b/azure-common/azure/common/__init__.py @@ -3,9 +3,10 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- +from ._version import VERSION as _VERSION __author__ = 'Microsoft Corp. ' -__version__ = '1.1.15' +__version__ = _VERSION class AzureException(Exception): diff --git a/azure-common/azure/common/_version.py b/azure-common/azure/common/_version.py new file mode 100644 index 000000000000..dcf0eeefa5bd --- /dev/null +++ b/azure-common/azure/common/_version.py @@ -0,0 +1,7 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +VERSION = "1.1.15" \ No newline at end of file diff --git a/azure-common/azure_bdist_wheel.py b/azure-common/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-common/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-common/sdk_packaging.toml b/azure-common/sdk_packaging.toml index e7687fdae93b..c1ee830cf824 100644 --- a/azure-common/sdk_packaging.toml +++ b/azure-common/sdk_packaging.toml @@ -1,2 +1,8 @@ [packaging] -auto_update = false \ No newline at end of file +auto_update = false +package_name = "azure-common" +package_nspkg = "azure-nspkg" +package_pprint_name = "MyService Management" +package_doc_id = "" +is_stable = false +is_arm = true diff --git a/azure-common/setup.cfg b/azure-common/setup.cfg index ccdace23b2d5..3c6e79cf31da 100644 --- a/azure-common/setup.cfg +++ b/azure-common/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-nspkg diff --git a/azure-common/setup.py b/azure-common/setup.py index e3e03a2794ae..b073af1354d7 100644 --- a/azure-common/setup.py +++ b/azure-common/setup.py @@ -6,16 +6,18 @@ # license information. #-------------------------------------------------------------------------- +import re +import os.path from io import open from setuptools import setup -import sys -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-common" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') # azure v0.x is not compatible with this package # azure v0.x used to have a __version__ attribute (newer versions don't) @@ -32,14 +34,22 @@ except ImportError: pass +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + with open('README.rst', encoding='utf-8') as f: readme = f.read() with open('HISTORY.rst', encoding='utf-8') as f: history = f.read() setup( - name='azure-common', - version='1.1.15', + name=PACKAGE_NAME, + version=version, description='Microsoft Azure Client Library for Python (Common)', long_description=readme + '\n\n' + history, license='MIT License', @@ -60,14 +70,13 @@ ], zip_safe=False, packages=[ - 'azure', 'azure.common', 'azure.profiles', ], extras_require={ + ":python_version<'3.0'": ['azure-nspkg'], 'autorest':[ 'msrestazure>=0.4.0,<2.0.0', ] - }, - cmdclass=cmdclass + } ) diff --git a/azure-eventgrid/MANIFEST.in b/azure-eventgrid/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-eventgrid/MANIFEST.in +++ b/azure-eventgrid/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-eventgrid/azure/__init__.py b/azure-eventgrid/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-eventgrid/azure/__init__.py +++ b/azure-eventgrid/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-eventgrid/azure_bdist_wheel.py b/azure-eventgrid/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-eventgrid/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-eventgrid/setup.cfg b/azure-eventgrid/setup.cfg index 669e94e63df3..3c6e79cf31da 100644 --- a/azure-eventgrid/setup.cfg +++ b/azure-eventgrid/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-nspkg \ No newline at end of file diff --git a/azure-eventgrid/setup.py b/azure-eventgrid/setup.py index b5ded43b0ed7..35c7d8087e6a 100644 --- a/azure-eventgrid/setup.py +++ b/azure-eventgrid/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-eventgrid" @@ -76,11 +70,17 @@ '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', + ]), 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-nspkg'], + } ) diff --git a/azure-graphrbac/MANIFEST.in b/azure-graphrbac/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-graphrbac/MANIFEST.in +++ b/azure-graphrbac/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-graphrbac/README.rst b/azure-graphrbac/README.rst index 53909d4c5595..378e69472679 100644 --- a/azure-graphrbac/README.rst +++ b/azure-graphrbac/README.rst @@ -3,13 +3,7 @@ Microsoft Azure SDK for Python This is the Microsoft Azure Graph RBAC 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. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. For a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -36,7 +30,7 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `GraphRBAC +For code examples, see `Graph RBAC `__ on docs.microsoft.com. diff --git a/azure-graphrbac/azure/__init__.py b/azure-graphrbac/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-graphrbac/azure/__init__.py +++ b/azure-graphrbac/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-graphrbac/azure_bdist_wheel.py b/azure-graphrbac/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-graphrbac/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-graphrbac/sdk_packaging.toml b/azure-graphrbac/sdk_packaging.toml new file mode 100644 index 000000000000..90a577aebd86 --- /dev/null +++ b/azure-graphrbac/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-graphrbac" +package_nspkg = "azure-nspkg" +package_pprint_name = "Graph RBAC" +package_doc_id = "activedirectory" +is_stable = false +is_arm = false diff --git a/azure-graphrbac/setup.cfg b/azure-graphrbac/setup.cfg index 669e94e63df3..3c6e79cf31da 100644 --- a/azure-graphrbac/setup.cfg +++ b/azure-graphrbac/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-nspkg \ No newline at end of file diff --git a/azure-graphrbac/setup.py b/azure-graphrbac/setup.py index 1ea4679ce3e1..c805471af0bb 100644 --- a/azure-graphrbac/setup.py +++ b/azure-graphrbac/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-graphrbac" @@ -72,13 +66,21 @@ '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', + ]), install_requires=[ - 'msrestazure>=0.4.20,<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-nspkg'], + } ) diff --git a/azure-keyvault/MANIFEST.in b/azure-keyvault/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-keyvault/MANIFEST.in +++ b/azure-keyvault/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-keyvault/README.rst b/azure-keyvault/README.rst index 6b7b5ab5bc08..75129f4f2d60 100644 --- a/azure-keyvault/README.rst +++ b/azure-keyvault/README.rst @@ -3,7 +3,7 @@ Microsoft Azure SDK for Python This is the Microsoft Azure Key Vault Client Library. -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 a more complete set of Azure libraries, see the `azure `__ bundle package. diff --git a/azure-keyvault/azure/__init__.py b/azure-keyvault/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-keyvault/azure/__init__.py +++ b/azure-keyvault/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-keyvault/azure_bdist_wheel.py b/azure-keyvault/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-keyvault/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-keyvault/sdk_packaging.toml b/azure-keyvault/sdk_packaging.toml index 5c2041749c30..a8ce4869ae3b 100644 --- a/azure-keyvault/sdk_packaging.toml +++ b/azure-keyvault/sdk_packaging.toml @@ -1,5 +1,7 @@ [packaging] +auto_update = false package_name = "azure-keyvault" package_pprint_name = "Key Vault" package_doc_id = "key-vault" is_stable = false +is_arm = false diff --git a/azure-keyvault/setup.cfg b/azure-keyvault/setup.cfg index 669e94e63df3..3c6e79cf31da 100644 --- a/azure-keyvault/setup.cfg +++ b/azure-keyvault/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-nspkg \ No newline at end of file diff --git a/azure-keyvault/setup.py b/azure-keyvault/setup.py index 337388a1eb9c..ddf1892e19f8 100644 --- a/azure-keyvault/setup.py +++ b/azure-keyvault/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-keyvault" @@ -72,10 +66,15 @@ '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', + ]), install_requires=[ 'msrest>=0.5.0', 'msrestazure>=0.4.32,<2.0.0', @@ -83,5 +82,7 @@ 'cryptography>=2.1.4', 'requests>=2.18.4' ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-nspkg'], + } ) diff --git a/azure-loganalytics/MANIFEST.in b/azure-loganalytics/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-loganalytics/MANIFEST.in +++ b/azure-loganalytics/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-loganalytics/README.rst b/azure-loganalytics/README.rst index f4f4204ffd17..874a0adc79f2 100644 --- a/azure-loganalytics/README.rst +++ b/azure-loganalytics/README.rst @@ -3,7 +3,7 @@ Microsoft Azure SDK for Python This is the Microsoft Azure Log Analytics Client Library. -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 a more complete set of Azure libraries, see the `azure `__ bundle package. diff --git a/azure-loganalytics/azure/__init__.py b/azure-loganalytics/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-loganalytics/azure/__init__.py +++ b/azure-loganalytics/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-loganalytics/azure_bdist_wheel.py b/azure-loganalytics/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-loganalytics/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-loganalytics/setup.cfg b/azure-loganalytics/setup.cfg index 669e94e63df3..3c6e79cf31da 100644 --- a/azure-loganalytics/setup.cfg +++ b/azure-loganalytics/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-nspkg \ No newline at end of file diff --git a/azure-loganalytics/setup.py b/azure-loganalytics/setup.py index 49882c7bc2ec..87ff80807710 100644 --- a/azure-loganalytics/setup.py +++ b/azure-loganalytics/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-loganalytics" @@ -76,10 +70,16 @@ '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', + ]), install_requires=[ - 'msrest>=0.4.29,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-nspkg'], + } ) diff --git a/azure-mgmt-advisor/MANIFEST.in b/azure-mgmt-advisor/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-advisor/MANIFEST.in +++ b/azure-mgmt-advisor/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-advisor/README.rst b/azure-mgmt-advisor/README.rst index 5946a96dcaa1..710a4d0adf42 100644 --- a/azure-mgmt-advisor/README.rst +++ b/azure-mgmt-advisor/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Advisor 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. @@ -37,7 +37,7 @@ Usage ===== For code examples, see `Advisor -`__ +`__ on docs.microsoft.com. diff --git a/azure-mgmt-advisor/azure/__init__.py b/azure-mgmt-advisor/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-advisor/azure/__init__.py +++ b/azure-mgmt-advisor/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-advisor/azure/mgmt/__init__.py b/azure-mgmt-advisor/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-advisor/azure/mgmt/__init__.py +++ b/azure-mgmt-advisor/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-advisor/azure_bdist_wheel.py b/azure-mgmt-advisor/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-advisor/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-advisor/sdk_packaging.toml b/azure-mgmt-advisor/sdk_packaging.toml new file mode 100644 index 000000000000..861b42f1ee21 --- /dev/null +++ b/azure-mgmt-advisor/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-advisor" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Advisor" +package_doc_id = "advisor" +is_stable = false +is_arm = true diff --git a/azure-mgmt-advisor/setup.cfg b/azure-mgmt-advisor/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-advisor/setup.cfg +++ b/azure-mgmt-advisor/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-advisor/setup.py b/azure-mgmt-advisor/setup.py index 0d889dd9d886..0a41844d4184 100644 --- a/azure-mgmt-advisor/setup.py +++ b/azure-mgmt-advisor/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-advisor" @@ -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.20,<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'], + } ) diff --git a/azure-mgmt-alertsmanagement/MANIFEST.in b/azure-mgmt-alertsmanagement/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-alertsmanagement/MANIFEST.in +++ b/azure-mgmt-alertsmanagement/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-alertsmanagement/azure/__init__.py b/azure-mgmt-alertsmanagement/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-alertsmanagement/azure/__init__.py +++ b/azure-mgmt-alertsmanagement/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-alertsmanagement/azure/mgmt/__init__.py b/azure-mgmt-alertsmanagement/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-alertsmanagement/azure/mgmt/__init__.py +++ b/azure-mgmt-alertsmanagement/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-alertsmanagement/azure_bdist_wheel.py b/azure-mgmt-alertsmanagement/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-alertsmanagement/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-alertsmanagement/setup.cfg b/azure-mgmt-alertsmanagement/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-alertsmanagement/setup.cfg +++ b/azure-mgmt-alertsmanagement/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-alertsmanagement/setup.py b/azure-mgmt-alertsmanagement/setup.py index 42249bcfcac5..129b94c14ea7 100644 --- a/azure-mgmt-alertsmanagement/setup.py +++ b/azure-mgmt-alertsmanagement/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-alertsmanagement" @@ -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'], + } ) diff --git a/azure-mgmt-applicationinsights/MANIFEST.in b/azure-mgmt-applicationinsights/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-applicationinsights/MANIFEST.in +++ b/azure-mgmt-applicationinsights/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-applicationinsights/README.rst b/azure-mgmt-applicationinsights/README.rst index f100e9cd0d92..64548862ddbe 100644 --- a/azure-mgmt-applicationinsights/README.rst +++ b/azure-mgmt-applicationinsights/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Application Insights 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. @@ -37,7 +37,7 @@ Usage ===== For code examples, see `Application Insights Management -`__ +`__ on docs.microsoft.com. diff --git a/azure-mgmt-applicationinsights/azure/__init__.py b/azure-mgmt-applicationinsights/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-applicationinsights/azure/__init__.py +++ b/azure-mgmt-applicationinsights/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-applicationinsights/azure/mgmt/__init__.py b/azure-mgmt-applicationinsights/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-applicationinsights/azure/mgmt/__init__.py +++ b/azure-mgmt-applicationinsights/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-applicationinsights/azure_bdist_wheel.py b/azure-mgmt-applicationinsights/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-applicationinsights/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-applicationinsights/sdk_packaging.toml b/azure-mgmt-applicationinsights/sdk_packaging.toml new file mode 100644 index 000000000000..a61dd3a61142 --- /dev/null +++ b/azure-mgmt-applicationinsights/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-applicationinsights" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Application Insights Management" +package_doc_id = "" +is_stable = false +is_arm = true diff --git a/azure-mgmt-applicationinsights/setup.cfg b/azure-mgmt-applicationinsights/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-applicationinsights/setup.cfg +++ b/azure-mgmt-applicationinsights/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-applicationinsights/setup.py b/azure-mgmt-applicationinsights/setup.py index 09a51a75c023..5f95dcc02668 100644 --- a/azure-mgmt-applicationinsights/setup.py +++ b/azure-mgmt-applicationinsights/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-applicationinsights" @@ -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.20,<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'], + } ) diff --git a/azure-mgmt-authorization/MANIFEST.in b/azure-mgmt-authorization/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-authorization/MANIFEST.in +++ b/azure-mgmt-authorization/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-authorization/README.rst b/azure-mgmt-authorization/README.rst index efa1778dcf2c..8c6bb060adbc 100644 --- a/azure-mgmt-authorization/README.rst +++ b/azure-mgmt-authorization/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Authorization 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-authorization/azure/__init__.py b/azure-mgmt-authorization/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-authorization/azure/__init__.py +++ b/azure-mgmt-authorization/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-authorization/azure/mgmt/__init__.py b/azure-mgmt-authorization/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-authorization/azure/mgmt/__init__.py +++ b/azure-mgmt-authorization/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-authorization/azure_bdist_wheel.py b/azure-mgmt-authorization/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-authorization/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-authorization/setup.cfg b/azure-mgmt-authorization/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-authorization/setup.cfg +++ b/azure-mgmt-authorization/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-authorization/setup.py b/azure-mgmt-authorization/setup.py index a53daab9138c..2cf7b12ae953 100644 --- a/azure-mgmt-authorization/setup.py +++ b/azure-mgmt-authorization/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-authorization" @@ -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', - 'azure-common~=1.1,>=1.1.12', + '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'], + } ) diff --git a/azure-mgmt-batch/MANIFEST.in b/azure-mgmt-batch/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-batch/MANIFEST.in +++ b/azure-mgmt-batch/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-batch/README.rst b/azure-mgmt-batch/README.rst index ac09ede98675..afb9cf4da8d3 100644 --- a/azure-mgmt-batch/README.rst +++ b/azure-mgmt-batch/README.rst @@ -3,7 +3,15 @@ Microsoft Azure SDK for Python This is the Microsoft Azure Batch Management Client Library. -This package has been tested with Python 2.7, 3.3, 3.4 and 3.5. +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, 3.6 and 3.7. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. Compatibility @@ -28,9 +36,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `the Batch samples repo -`__ -on GitHub. +For code examples, see `Batch Management +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-batch/azure/__init__.py b/azure-mgmt-batch/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-batch/azure/__init__.py +++ b/azure-mgmt-batch/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-batch/azure/mgmt/__init__.py b/azure-mgmt-batch/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-batch/azure/mgmt/__init__.py +++ b/azure-mgmt-batch/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-batch/azure_bdist_wheel.py b/azure-mgmt-batch/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-batch/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-batch/setup.cfg b/azure-mgmt-batch/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-batch/setup.cfg +++ b/azure-mgmt-batch/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-batch/setup.py b/azure-mgmt-batch/setup.py index 3498c2e0f75c..b40cb2d0f575 100644 --- a/azure-mgmt-batch/setup.py +++ b/azure-mgmt-batch/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-batch" @@ -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'], + } ) diff --git a/azure-mgmt-batchai/MANIFEST.in b/azure-mgmt-batchai/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-batchai/MANIFEST.in +++ b/azure-mgmt-batchai/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-batchai/README.rst b/azure-mgmt-batchai/README.rst index d562999e29b7..65fcfec76e3a 100644 --- a/azure-mgmt-batchai/README.rst +++ b/azure-mgmt-batchai/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Batch AI 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-batchai/azure/__init__.py b/azure-mgmt-batchai/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-batchai/azure/__init__.py +++ b/azure-mgmt-batchai/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-batchai/azure/mgmt/__init__.py b/azure-mgmt-batchai/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-batchai/azure/mgmt/__init__.py +++ b/azure-mgmt-batchai/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-batchai/azure_bdist_wheel.py b/azure-mgmt-batchai/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-batchai/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-batchai/sdk_packaging.toml b/azure-mgmt-batchai/sdk_packaging.toml new file mode 100644 index 000000000000..37777a8441e4 --- /dev/null +++ b/azure-mgmt-batchai/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-batchai" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Batch AI Management" +package_doc_id = "batchai" +is_stable = true +is_arm = true diff --git a/azure-mgmt-batchai/setup.cfg b/azure-mgmt-batchai/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-batchai/setup.cfg +++ b/azure-mgmt-batchai/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-batchai/setup.py b/azure-mgmt-batchai/setup.py index dbd12ff17775..e79c25c9fb6d 100644 --- a/azure-mgmt-batchai/setup.py +++ b/azure-mgmt-batchai/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-batchai" @@ -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.20,<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'], + } ) diff --git a/azure-mgmt-billing/MANIFEST.in b/azure-mgmt-billing/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-billing/MANIFEST.in +++ b/azure-mgmt-billing/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-billing/README.rst b/azure-mgmt-billing/README.rst index 945a404aaa53..7fbd5ada9c50 100644 --- a/azure-mgmt-billing/README.rst +++ b/azure-mgmt-billing/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Billing 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. @@ -37,7 +37,7 @@ Usage ===== For code examples, see `Billing -`__ +`__ on docs.microsoft.com. diff --git a/azure-mgmt-billing/azure/__init__.py b/azure-mgmt-billing/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-billing/azure/__init__.py +++ b/azure-mgmt-billing/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-billing/azure/mgmt/__init__.py b/azure-mgmt-billing/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-billing/azure/mgmt/__init__.py +++ b/azure-mgmt-billing/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-billing/azure_bdist_wheel.py b/azure-mgmt-billing/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-billing/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-billing/sdk_packaging.toml b/azure-mgmt-billing/sdk_packaging.toml new file mode 100644 index 000000000000..d3bfbb1072b0 --- /dev/null +++ b/azure-mgmt-billing/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-billing" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Billing" +package_doc_id = "billing" +is_stable = false +is_arm = true diff --git a/azure-mgmt-billing/setup.cfg b/azure-mgmt-billing/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-billing/setup.cfg +++ b/azure-mgmt-billing/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-billing/setup.py b/azure-mgmt-billing/setup.py index e7e8f635cd99..8d3585c49983 100644 --- a/azure-mgmt-billing/setup.py +++ b/azure-mgmt-billing/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-billing" @@ -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.20,<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'], + } ) diff --git a/azure-mgmt-botservice/MANIFEST.in b/azure-mgmt-botservice/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-botservice/MANIFEST.in +++ b/azure-mgmt-botservice/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-botservice/azure/__init__.py b/azure-mgmt-botservice/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-botservice/azure/__init__.py +++ b/azure-mgmt-botservice/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-botservice/azure/mgmt/__init__.py b/azure-mgmt-botservice/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-botservice/azure/mgmt/__init__.py +++ b/azure-mgmt-botservice/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-botservice/azure_bdist_wheel.py b/azure-mgmt-botservice/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-botservice/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-botservice/setup.cfg b/azure-mgmt-botservice/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-botservice/setup.cfg +++ b/azure-mgmt-botservice/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-botservice/setup.py b/azure-mgmt-botservice/setup.py index 55d4f7b6312e..872ed3e7cb2b 100644 --- a/azure-mgmt-botservice/setup.py +++ b/azure-mgmt-botservice/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-botservice" @@ -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'], + } ) diff --git a/azure-mgmt-cdn/MANIFEST.in b/azure-mgmt-cdn/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-cdn/MANIFEST.in +++ b/azure-mgmt-cdn/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file 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_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'], + } ) diff --git a/azure-mgmt-cognitiveservices/MANIFEST.in b/azure-mgmt-cognitiveservices/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-cognitiveservices/MANIFEST.in +++ b/azure-mgmt-cognitiveservices/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-cognitiveservices/README.rst b/azure-mgmt-cognitiveservices/README.rst index 0ea301b72b84..70de0c6a776f 100644 --- a/azure-mgmt-cognitiveservices/README.rst +++ b/azure-mgmt-cognitiveservices/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Cognitive Services 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-cognitiveservices/azure/__init__.py b/azure-mgmt-cognitiveservices/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-cognitiveservices/azure/__init__.py +++ b/azure-mgmt-cognitiveservices/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-cognitiveservices/azure/mgmt/__init__.py b/azure-mgmt-cognitiveservices/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/__init__.py +++ b/azure-mgmt-cognitiveservices/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-cognitiveservices/azure_bdist_wheel.py b/azure-mgmt-cognitiveservices/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-cognitiveservices/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-cognitiveservices/sdk_packaging.toml b/azure-mgmt-cognitiveservices/sdk_packaging.toml new file mode 100644 index 000000000000..e859b4f24624 --- /dev/null +++ b/azure-mgmt-cognitiveservices/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-cognitiveservices" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Cognitive Services Management" +package_doc_id = "cognitive-services" +is_stable = true +is_arm = true diff --git a/azure-mgmt-cognitiveservices/setup.cfg b/azure-mgmt-cognitiveservices/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-cognitiveservices/setup.cfg +++ b/azure-mgmt-cognitiveservices/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-cognitiveservices/setup.py b/azure-mgmt-cognitiveservices/setup.py index f6e9b649508b..ff87dc89f78c 100644 --- a/azure-mgmt-cognitiveservices/setup.py +++ b/azure-mgmt-cognitiveservices/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-cognitiveservices" @@ -64,7 +58,7 @@ author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', @@ -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'], + } ) diff --git a/azure-mgmt-commerce/MANIFEST.in b/azure-mgmt-commerce/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-commerce/MANIFEST.in +++ b/azure-mgmt-commerce/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-commerce/README.rst b/azure-mgmt-commerce/README.rst index e33143e5977a..5a3024744fe4 100644 --- a/azure-mgmt-commerce/README.rst +++ b/azure-mgmt-commerce/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Commerce 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-commerce/azure/__init__.py b/azure-mgmt-commerce/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-commerce/azure/__init__.py +++ b/azure-mgmt-commerce/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-commerce/azure/mgmt/__init__.py b/azure-mgmt-commerce/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-commerce/azure/mgmt/__init__.py +++ b/azure-mgmt-commerce/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-commerce/azure_bdist_wheel.py b/azure-mgmt-commerce/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-commerce/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-commerce/sdk_packaging.toml b/azure-mgmt-commerce/sdk_packaging.toml new file mode 100644 index 000000000000..30fa31f5124e --- /dev/null +++ b/azure-mgmt-commerce/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-commerce" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Commerce" +package_doc_id = "commerce" +is_stable = false +is_arm = true diff --git a/azure-mgmt-commerce/setup.cfg b/azure-mgmt-commerce/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-commerce/setup.cfg +++ b/azure-mgmt-commerce/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-commerce/setup.py b/azure-mgmt-commerce/setup.py index 21a666668786..c6a09509f430 100644 --- a/azure-mgmt-commerce/setup.py +++ b/azure-mgmt-commerce/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-commerce" @@ -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.20,<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'], + } ) diff --git a/azure-mgmt-compute/MANIFEST.in b/azure-mgmt-compute/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-compute/MANIFEST.in +++ b/azure-mgmt-compute/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-compute/azure/__init__.py b/azure-mgmt-compute/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-compute/azure/__init__.py +++ b/azure-mgmt-compute/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-compute/azure/mgmt/__init__.py b/azure-mgmt-compute/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-compute/azure/mgmt/__init__.py +++ b/azure-mgmt-compute/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-compute/azure_bdist_wheel.py b/azure-mgmt-compute/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-compute/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-compute/setup.cfg b/azure-mgmt-compute/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-compute/setup.cfg +++ b/azure-mgmt-compute/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-compute/setup.py b/azure-mgmt-compute/setup.py index 090ca2ca4a52..ca24ecb6904a 100644 --- a/azure-mgmt-compute/setup.py +++ b/azure-mgmt-compute/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-compute" @@ -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'], + } ) diff --git a/azure-mgmt-consumption/MANIFEST.in b/azure-mgmt-consumption/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-consumption/MANIFEST.in +++ b/azure-mgmt-consumption/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-consumption/README.rst b/azure-mgmt-consumption/README.rst index 2ae9c2f9ef87..c5aa4878cecc 100644 --- a/azure-mgmt-consumption/README.rst +++ b/azure-mgmt-consumption/README.rst @@ -1,12 +1,12 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure Consumption Management Client Library. +This is the Microsoft Azure Consumption 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. @@ -36,7 +36,7 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Consumption Management +For code examples, see `Consumption `__ on docs.microsoft.com. diff --git a/azure-mgmt-consumption/azure/__init__.py b/azure-mgmt-consumption/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-consumption/azure/__init__.py +++ b/azure-mgmt-consumption/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-consumption/azure/mgmt/__init__.py b/azure-mgmt-consumption/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-consumption/azure/mgmt/__init__.py +++ b/azure-mgmt-consumption/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-consumption/azure_bdist_wheel.py b/azure-mgmt-consumption/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-consumption/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-consumption/sdk_packaging.toml b/azure-mgmt-consumption/sdk_packaging.toml new file mode 100644 index 000000000000..9d22f9d91e8e --- /dev/null +++ b/azure-mgmt-consumption/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-consumption" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Consumption" +package_doc_id = "consumption" +is_stable = false +is_arm = true diff --git a/azure-mgmt-consumption/setup.cfg b/azure-mgmt-consumption/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-consumption/setup.cfg +++ b/azure-mgmt-consumption/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-consumption/setup.py b/azure-mgmt-consumption/setup.py index 9823c27b0e60..78596402b36d 100644 --- a/azure-mgmt-consumption/setup.py +++ b/azure-mgmt-consumption/setup.py @@ -10,16 +10,10 @@ 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-consumption" -PACKAGE_PPRINT_NAME = "Consumption Management" +PACKAGE_PPRINT_NAME = "Consumption" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') @@ -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.20,<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'], + } ) diff --git a/azure-mgmt-containerinstance/MANIFEST.in b/azure-mgmt-containerinstance/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-containerinstance/MANIFEST.in +++ b/azure-mgmt-containerinstance/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-containerinstance/azure/__init__.py b/azure-mgmt-containerinstance/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-containerinstance/azure/__init__.py +++ b/azure-mgmt-containerinstance/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-containerinstance/azure/mgmt/__init__.py b/azure-mgmt-containerinstance/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/__init__.py +++ b/azure-mgmt-containerinstance/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-containerinstance/azure_bdist_wheel.py b/azure-mgmt-containerinstance/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-containerinstance/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-containerinstance/setup.cfg b/azure-mgmt-containerinstance/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-containerinstance/setup.cfg +++ b/azure-mgmt-containerinstance/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-containerinstance/setup.py b/azure-mgmt-containerinstance/setup.py index 72097fec5cdd..5d32ceb7f0bc 100644 --- a/azure-mgmt-containerinstance/setup.py +++ b/azure-mgmt-containerinstance/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-containerinstance" @@ -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'], + } ) diff --git a/azure-mgmt-containerregistry/MANIFEST.in b/azure-mgmt-containerregistry/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-containerregistry/MANIFEST.in +++ b/azure-mgmt-containerregistry/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-containerregistry/azure/__init__.py b/azure-mgmt-containerregistry/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-containerregistry/azure/__init__.py +++ b/azure-mgmt-containerregistry/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-containerregistry/azure/mgmt/__init__.py b/azure-mgmt-containerregistry/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/__init__.py +++ b/azure-mgmt-containerregistry/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-containerregistry/azure_bdist_wheel.py b/azure-mgmt-containerregistry/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-containerregistry/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-containerregistry/setup.cfg b/azure-mgmt-containerregistry/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-containerregistry/setup.cfg +++ b/azure-mgmt-containerregistry/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-containerregistry/setup.py b/azure-mgmt-containerregistry/setup.py index 4d7c29c7ba79..188d56267ad0 100644 --- a/azure-mgmt-containerregistry/setup.py +++ b/azure-mgmt-containerregistry/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-containerregistry" @@ -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'], + } ) diff --git a/azure-mgmt-containerservice/MANIFEST.in b/azure-mgmt-containerservice/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-containerservice/MANIFEST.in +++ b/azure-mgmt-containerservice/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-containerservice/azure/__init__.py b/azure-mgmt-containerservice/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-containerservice/azure/__init__.py +++ b/azure-mgmt-containerservice/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-containerservice/azure/mgmt/__init__.py b/azure-mgmt-containerservice/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-containerservice/azure/mgmt/__init__.py +++ b/azure-mgmt-containerservice/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-containerservice/azure_bdist_wheel.py b/azure-mgmt-containerservice/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-containerservice/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-containerservice/setup.cfg b/azure-mgmt-containerservice/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-containerservice/setup.cfg +++ b/azure-mgmt-containerservice/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-containerservice/setup.py b/azure-mgmt-containerservice/setup.py index eb48b95424f6..647197cde70e 100644 --- a/azure-mgmt-containerservice/setup.py +++ b/azure-mgmt-containerservice/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-containerservice" @@ -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'], + } ) diff --git a/azure-mgmt-cosmosdb/MANIFEST.in b/azure-mgmt-cosmosdb/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-cosmosdb/MANIFEST.in +++ b/azure-mgmt-cosmosdb/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-cosmosdb/README.rst b/azure-mgmt-cosmosdb/README.rst index 4a958d34b8db..82bd979c7bf5 100644 --- a/azure-mgmt-cosmosdb/README.rst +++ b/azure-mgmt-cosmosdb/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Cosmos DB 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. @@ -36,7 +36,7 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `CosmosDB Management +For code examples, see `Cosmos DB Management `__ on docs.microsoft.com. diff --git a/azure-mgmt-cosmosdb/azure/__init__.py b/azure-mgmt-cosmosdb/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-cosmosdb/azure/__init__.py +++ b/azure-mgmt-cosmosdb/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-cosmosdb/azure/mgmt/__init__.py b/azure-mgmt-cosmosdb/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/__init__.py +++ b/azure-mgmt-cosmosdb/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-cosmosdb/azure_bdist_wheel.py b/azure-mgmt-cosmosdb/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-cosmosdb/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-cosmosdb/sdk_packaging.toml b/azure-mgmt-cosmosdb/sdk_packaging.toml new file mode 100644 index 000000000000..fca0c23c016e --- /dev/null +++ b/azure-mgmt-cosmosdb/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-cosmosdb" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Cosmos DB Management" +package_doc_id = "cosmosdb" +is_stable = false +is_arm = true diff --git a/azure-mgmt-cosmosdb/setup.cfg b/azure-mgmt-cosmosdb/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-cosmosdb/setup.cfg +++ b/azure-mgmt-cosmosdb/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-cosmosdb/setup.py b/azure-mgmt-cosmosdb/setup.py index e6eefb660f17..4bec3ee72d0e 100644 --- a/azure-mgmt-cosmosdb/setup.py +++ b/azure-mgmt-cosmosdb/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-cosmosdb" @@ -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.20,<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'], + } ) diff --git a/azure-mgmt-datafactory/MANIFEST.in b/azure-mgmt-datafactory/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-datafactory/MANIFEST.in +++ b/azure-mgmt-datafactory/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-datafactory/README.rst b/azure-mgmt-datafactory/README.rst index 1d331b91cec5..04ec9cafb387 100644 --- a/azure-mgmt-datafactory/README.rst +++ b/azure-mgmt-datafactory/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Data Factory 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. @@ -36,7 +36,7 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `DataFactory Management +For code examples, see `Data Factory Management `__ on docs.microsoft.com. diff --git a/azure-mgmt-datafactory/azure/__init__.py b/azure-mgmt-datafactory/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-datafactory/azure/__init__.py +++ b/azure-mgmt-datafactory/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-datafactory/azure/mgmt/__init__.py b/azure-mgmt-datafactory/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-datafactory/azure/mgmt/__init__.py +++ b/azure-mgmt-datafactory/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-datafactory/azure_bdist_wheel.py b/azure-mgmt-datafactory/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-datafactory/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-datafactory/sdk_packaging.toml b/azure-mgmt-datafactory/sdk_packaging.toml new file mode 100644 index 000000000000..9aeaa41a975a --- /dev/null +++ b/azure-mgmt-datafactory/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-datafactory" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Data Factory Management" +package_doc_id = "datafactory" +is_stable = false +is_arm = true diff --git a/azure-mgmt-datafactory/setup.cfg b/azure-mgmt-datafactory/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-datafactory/setup.cfg +++ b/azure-mgmt-datafactory/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-datafactory/setup.py b/azure-mgmt-datafactory/setup.py index 94a4f2de250d..4b3ca4777aca 100644 --- a/azure-mgmt-datafactory/setup.py +++ b/azure-mgmt-datafactory/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-datafactory" @@ -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.20,<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'], + } ) 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/README.rst b/azure-mgmt-datalake-analytics/README.rst index 692903b9d072..54acd0daecf2 100644 --- a/azure-mgmt-datalake-analytics/README.rst +++ b/azure-mgmt-datalake-analytics/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Data Lake Analytics 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-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 c2cb4f55906d..68f340388091 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" @@ -72,13 +66,23 @@ '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', + 'azure.mgmt.datalake', + ]), 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-datalake-nspkg'], + } ) diff --git a/azure-mgmt-datalake-nspkg/README.rst b/azure-mgmt-datalake-nspkg/README.rst index 49c7fe633b17..8cea9797ff9f 100644 --- a/azure-mgmt-datalake-nspkg/README.rst +++ b/azure-mgmt-datalake-nspkg/README.rst @@ -5,6 +5,9 @@ This is the Microsoft Azure Data Lake Management namespace package. This package is not intended to be installed directly by the end user. +Since version 3.0, this is Python 2 package only, Python 3.x SDKs will use `PEP420 ` as namespace package strategy. +This package will use `python_requires` to enforce Python 2 installation. This implies that you might see this package on Python 3 environment if you have pip < 9.0 or setuptools < 24.2.0. + It provides the necessary files for other packages to extend the azure.mgmt.datalake namespace. If you are looking to install the Azure client libraries, see the diff --git a/azure-mgmt-datalake-nspkg/azure/mgmt/datalake/__init__.py b/azure-mgmt-datalake-nspkg/azure/mgmt/datalake/__init__.py index e69de29bb2d1..0260537a02bb 100644 --- a/azure-mgmt-datalake-nspkg/azure/mgmt/datalake/__init__.py +++ b/azure-mgmt-datalake-nspkg/azure/mgmt/datalake/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-datalake-nspkg/sdk_packaging.toml b/azure-mgmt-datalake-nspkg/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/azure-mgmt-datalake-nspkg/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/azure-mgmt-datalake-nspkg/setup.py b/azure-mgmt-datalake-nspkg/setup.py index de929d8e734e..c6a6e1b38883 100644 --- a/azure-mgmt-datalake-nspkg/setup.py +++ b/azure-mgmt-datalake-nspkg/setup.py @@ -25,25 +25,21 @@ setup( name='azure-mgmt-datalake-nspkg', - version='2.0.0', + version='3.0.0', description='Microsoft Azure Data Lake Management Namespace Package [Internal]', long_description=open('README.rst', 'r').read(), license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], + python_requires='<3', zip_safe=False, packages=[ 'azure', @@ -51,6 +47,6 @@ 'azure.mgmt.datalake', ], install_requires=[ - 'azure-mgmt-nspkg>=2.0.0', + 'azure-mgmt-nspkg>=3.0.0', ], ) diff --git a/azure-mgmt-datalake-store/MANIFEST.in b/azure-mgmt-datalake-store/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-datalake-store/MANIFEST.in +++ b/azure-mgmt-datalake-store/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-datalake-store/README.rst b/azure-mgmt-datalake-store/README.rst index dd4607d585af..6b24c7857dc9 100644 --- a/azure-mgmt-datalake-store/README.rst +++ b/azure-mgmt-datalake-store/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Data Lake Store 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-datalake-store/azure/__init__.py b/azure-mgmt-datalake-store/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-datalake-store/azure/__init__.py +++ b/azure-mgmt-datalake-store/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-store/azure/mgmt/__init__.py b/azure-mgmt-datalake-store/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/__init__.py +++ b/azure-mgmt-datalake-store/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-store/azure/mgmt/datalake/__init__.py b/azure-mgmt-datalake-store/azure/mgmt/datalake/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-datalake-store/azure/mgmt/datalake/__init__.py +++ b/azure-mgmt-datalake-store/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-store/azure_bdist_wheel.py b/azure-mgmt-datalake-store/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-datalake-store/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-store/setup.cfg b/azure-mgmt-datalake-store/setup.cfg index e6761b2e2518..3c6e79cf31da 100644 --- a/azure-mgmt-datalake-store/setup.cfg +++ b/azure-mgmt-datalake-store/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-store/setup.py b/azure-mgmt-datalake-store/setup.py index b60626b64aef..fe17d91a300b 100644 --- a/azure-mgmt-datalake-store/setup.py +++ b/azure-mgmt-datalake-store/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-store" @@ -72,13 +66,23 @@ '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', + 'azure.mgmt.datalake', + ]), 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-datalake-nspkg'], + } ) diff --git a/azure-mgmt-datamigration/MANIFEST.in b/azure-mgmt-datamigration/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-datamigration/MANIFEST.in +++ b/azure-mgmt-datamigration/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-datamigration/azure/__init__.py b/azure-mgmt-datamigration/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-datamigration/azure/__init__.py +++ b/azure-mgmt-datamigration/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-datamigration/azure/mgmt/__init__.py b/azure-mgmt-datamigration/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-datamigration/azure/mgmt/__init__.py +++ b/azure-mgmt-datamigration/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-datamigration/azure_bdist_wheel.py b/azure-mgmt-datamigration/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-datamigration/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-datamigration/setup.cfg b/azure-mgmt-datamigration/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-datamigration/setup.cfg +++ b/azure-mgmt-datamigration/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-datamigration/setup.py b/azure-mgmt-datamigration/setup.py index 6ea65fd1db4f..135749ea6bc3 100644 --- a/azure-mgmt-datamigration/setup.py +++ b/azure-mgmt-datamigration/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-datamigration" @@ -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'], + } ) diff --git a/azure-mgmt-devspaces/MANIFEST.in b/azure-mgmt-devspaces/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-devspaces/MANIFEST.in +++ b/azure-mgmt-devspaces/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-devspaces/azure/__init__.py b/azure-mgmt-devspaces/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-devspaces/azure/__init__.py +++ b/azure-mgmt-devspaces/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-devspaces/azure/mgmt/__init__.py b/azure-mgmt-devspaces/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-devspaces/azure/mgmt/__init__.py +++ b/azure-mgmt-devspaces/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-devspaces/azure_bdist_wheel.py b/azure-mgmt-devspaces/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-devspaces/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-devspaces/setup.cfg b/azure-mgmt-devspaces/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-devspaces/setup.cfg +++ b/azure-mgmt-devspaces/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-devspaces/setup.py b/azure-mgmt-devspaces/setup.py index 3fad3248177b..e14033a3af4b 100644 --- a/azure-mgmt-devspaces/setup.py +++ b/azure-mgmt-devspaces/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-devspaces" @@ -76,10 +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'], + } ) diff --git a/azure-mgmt-devtestlabs/MANIFEST.in b/azure-mgmt-devtestlabs/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-devtestlabs/MANIFEST.in +++ b/azure-mgmt-devtestlabs/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-devtestlabs/README.rst b/azure-mgmt-devtestlabs/README.rst index 0fc0da3a061f..09b0c54db4db 100644 --- a/azure-mgmt-devtestlabs/README.rst +++ b/azure-mgmt-devtestlabs/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure DevTestLabs 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-devtestlabs/azure/__init__.py b/azure-mgmt-devtestlabs/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-devtestlabs/azure/__init__.py +++ b/azure-mgmt-devtestlabs/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-devtestlabs/azure/mgmt/__init__.py b/azure-mgmt-devtestlabs/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-devtestlabs/azure/mgmt/__init__.py +++ b/azure-mgmt-devtestlabs/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-devtestlabs/azure_bdist_wheel.py b/azure-mgmt-devtestlabs/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-devtestlabs/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-devtestlabs/sdk_packaging.toml b/azure-mgmt-devtestlabs/sdk_packaging.toml new file mode 100644 index 000000000000..8bcd468c8d60 --- /dev/null +++ b/azure-mgmt-devtestlabs/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-devtestlabs" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "DevTestLabs Management" +package_doc_id = "devtest-labs" +is_stable = true +is_arm = true diff --git a/azure-mgmt-devtestlabs/setup.cfg b/azure-mgmt-devtestlabs/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-devtestlabs/setup.cfg +++ b/azure-mgmt-devtestlabs/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-devtestlabs/setup.py b/azure-mgmt-devtestlabs/setup.py index c4275b45c75b..c74bcc7d5281 100644 --- a/azure-mgmt-devtestlabs/setup.py +++ b/azure-mgmt-devtestlabs/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-devtestlabs" @@ -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.20,<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'], + } ) diff --git a/azure-mgmt-dns/MANIFEST.in b/azure-mgmt-dns/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-dns/MANIFEST.in +++ b/azure-mgmt-dns/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-dns/azure/__init__.py b/azure-mgmt-dns/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-dns/azure/__init__.py +++ b/azure-mgmt-dns/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-dns/azure/mgmt/__init__.py b/azure-mgmt-dns/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-dns/azure/mgmt/__init__.py +++ b/azure-mgmt-dns/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-dns/azure_bdist_wheel.py b/azure-mgmt-dns/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-dns/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-dns/setup.cfg b/azure-mgmt-dns/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-dns/setup.cfg +++ b/azure-mgmt-dns/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-dns/setup.py b/azure-mgmt-dns/setup.py index 7f52550571f4..d292c8aaacff 100644 --- a/azure-mgmt-dns/setup.py +++ b/azure-mgmt-dns/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-dns" @@ -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'], + } ) diff --git a/azure-mgmt-documentdb/azure/__init__.py b/azure-mgmt-documentdb/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-documentdb/azure/__init__.py +++ b/azure-mgmt-documentdb/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-documentdb/azure/mgmt/__init__.py b/azure-mgmt-documentdb/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-documentdb/azure/mgmt/__init__.py +++ b/azure-mgmt-documentdb/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-documentdb/sdk_packaging.toml b/azure-mgmt-documentdb/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/azure-mgmt-documentdb/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/azure-mgmt-eventgrid/MANIFEST.in b/azure-mgmt-eventgrid/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-eventgrid/MANIFEST.in +++ b/azure-mgmt-eventgrid/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-eventgrid/README.rst b/azure-mgmt-eventgrid/README.rst index 1ec01a03bffe..7792414c6dda 100644 --- a/azure-mgmt-eventgrid/README.rst +++ b/azure-mgmt-eventgrid/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure EventGrid 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. @@ -37,7 +37,7 @@ Usage ===== For code examples, see `EventGrid Management -`__ +`__ on docs.microsoft.com. diff --git a/azure-mgmt-eventgrid/azure/__init__.py b/azure-mgmt-eventgrid/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-eventgrid/azure/__init__.py +++ b/azure-mgmt-eventgrid/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-eventgrid/azure/mgmt/__init__.py b/azure-mgmt-eventgrid/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-eventgrid/azure/mgmt/__init__.py +++ b/azure-mgmt-eventgrid/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-eventgrid/azure_bdist_wheel.py b/azure-mgmt-eventgrid/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-eventgrid/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-eventgrid/sdk_packaging.toml b/azure-mgmt-eventgrid/sdk_packaging.toml new file mode 100644 index 000000000000..e23ce4df07ab --- /dev/null +++ b/azure-mgmt-eventgrid/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-eventgrid" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "EventGrid Management" +package_doc_id = "event-grid" +is_stable = false +is_arm = true diff --git a/azure-mgmt-eventgrid/setup.cfg b/azure-mgmt-eventgrid/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-eventgrid/setup.cfg +++ b/azure-mgmt-eventgrid/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-eventgrid/setup.py b/azure-mgmt-eventgrid/setup.py index 8323ed33996b..8fd5d1b00bde 100644 --- a/azure-mgmt-eventgrid/setup.py +++ b/azure-mgmt-eventgrid/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-eventgrid" @@ -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'], + } ) diff --git a/azure-mgmt-eventhub/MANIFEST.in b/azure-mgmt-eventhub/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-eventhub/MANIFEST.in +++ b/azure-mgmt-eventhub/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-eventhub/azure/__init__.py b/azure-mgmt-eventhub/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-eventhub/azure/__init__.py +++ b/azure-mgmt-eventhub/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-eventhub/azure/mgmt/__init__.py b/azure-mgmt-eventhub/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-eventhub/azure/mgmt/__init__.py +++ b/azure-mgmt-eventhub/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-eventhub/azure_bdist_wheel.py b/azure-mgmt-eventhub/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-eventhub/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-eventhub/setup.cfg b/azure-mgmt-eventhub/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-eventhub/setup.cfg +++ b/azure-mgmt-eventhub/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-eventhub/setup.py b/azure-mgmt-eventhub/setup.py index 08d1540be539..c816b44375be 100644 --- a/azure-mgmt-eventhub/setup.py +++ b/azure-mgmt-eventhub/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-eventhub" @@ -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'], + } ) diff --git a/azure-mgmt-hanaonazure/MANIFEST.in b/azure-mgmt-hanaonazure/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-hanaonazure/MANIFEST.in +++ b/azure-mgmt-hanaonazure/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-hanaonazure/azure/__init__.py b/azure-mgmt-hanaonazure/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-hanaonazure/azure/__init__.py +++ b/azure-mgmt-hanaonazure/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-hanaonazure/azure/mgmt/__init__.py b/azure-mgmt-hanaonazure/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/__init__.py +++ b/azure-mgmt-hanaonazure/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-hanaonazure/azure_bdist_wheel.py b/azure-mgmt-hanaonazure/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-hanaonazure/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-hanaonazure/setup.cfg b/azure-mgmt-hanaonazure/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-hanaonazure/setup.cfg +++ b/azure-mgmt-hanaonazure/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-hanaonazure/setup.py b/azure-mgmt-hanaonazure/setup.py index 54224fd5fc36..9f44001ba520 100644 --- a/azure-mgmt-hanaonazure/setup.py +++ b/azure-mgmt-hanaonazure/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-hanaonazure" @@ -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'], + } ) diff --git a/azure-mgmt-hdinsight/MANIFEST.in b/azure-mgmt-hdinsight/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-hdinsight/MANIFEST.in +++ b/azure-mgmt-hdinsight/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-hdinsight/azure/__init__.py b/azure-mgmt-hdinsight/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-hdinsight/azure/__init__.py +++ b/azure-mgmt-hdinsight/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-hdinsight/azure/mgmt/__init__.py b/azure-mgmt-hdinsight/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/__init__.py +++ b/azure-mgmt-hdinsight/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-hdinsight/azure_bdist_wheel.py b/azure-mgmt-hdinsight/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-hdinsight/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-hdinsight/setup.cfg b/azure-mgmt-hdinsight/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-hdinsight/setup.cfg +++ b/azure-mgmt-hdinsight/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-hdinsight/setup.py b/azure-mgmt-hdinsight/setup.py index feee8754877b..2f83fd18f271 100644 --- a/azure-mgmt-hdinsight/setup.py +++ b/azure-mgmt-hdinsight/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-hdinsight" @@ -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'], + } ) diff --git a/azure-mgmt-iotcentral/MANIFEST.in b/azure-mgmt-iotcentral/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-iotcentral/MANIFEST.in +++ b/azure-mgmt-iotcentral/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file 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_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'], + } ) diff --git a/azure-mgmt-iothub/MANIFEST.in b/azure-mgmt-iothub/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-iothub/MANIFEST.in +++ b/azure-mgmt-iothub/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-iothub/azure/__init__.py b/azure-mgmt-iothub/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-iothub/azure/__init__.py +++ b/azure-mgmt-iothub/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-iothub/azure/mgmt/__init__.py b/azure-mgmt-iothub/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-iothub/azure/mgmt/__init__.py +++ b/azure-mgmt-iothub/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-iothub/azure_bdist_wheel.py b/azure-mgmt-iothub/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-iothub/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-iothub/setup.cfg b/azure-mgmt-iothub/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-iothub/setup.cfg +++ b/azure-mgmt-iothub/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-iothub/setup.py b/azure-mgmt-iothub/setup.py index e37489b5355f..b74fae46b4b5 100644 --- a/azure-mgmt-iothub/setup.py +++ b/azure-mgmt-iothub/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-iothub" @@ -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'], + } ) diff --git a/azure-mgmt-iothubprovisioningservices/MANIFEST.in b/azure-mgmt-iothubprovisioningservices/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-iothubprovisioningservices/MANIFEST.in +++ b/azure-mgmt-iothubprovisioningservices/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-iothubprovisioningservices/README.rst b/azure-mgmt-iothubprovisioningservices/README.rst index 8866c376cdbe..875e40fd73d3 100644 --- a/azure-mgmt-iothubprovisioningservices/README.rst +++ b/azure-mgmt-iothubprovisioningservices/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure IoTHub Provisioning Services 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-iothubprovisioningservices/azure/__init__.py b/azure-mgmt-iothubprovisioningservices/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-iothubprovisioningservices/azure/__init__.py +++ b/azure-mgmt-iothubprovisioningservices/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-iothubprovisioningservices/azure/mgmt/__init__.py b/azure-mgmt-iothubprovisioningservices/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-iothubprovisioningservices/azure/mgmt/__init__.py +++ b/azure-mgmt-iothubprovisioningservices/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-iothubprovisioningservices/azure_bdist_wheel.py b/azure-mgmt-iothubprovisioningservices/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-iothubprovisioningservices/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-iothubprovisioningservices/sdk_packaging.toml b/azure-mgmt-iothubprovisioningservices/sdk_packaging.toml new file mode 100644 index 000000000000..4a5b1deca17f --- /dev/null +++ b/azure-mgmt-iothubprovisioningservices/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-iothubprovisioningservices" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "IoTHub Provisioning Services" +package_doc_id = "iot" +is_stable = false +is_arm = true diff --git a/azure-mgmt-iothubprovisioningservices/setup.cfg b/azure-mgmt-iothubprovisioningservices/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-iothubprovisioningservices/setup.cfg +++ b/azure-mgmt-iothubprovisioningservices/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-iothubprovisioningservices/setup.py b/azure-mgmt-iothubprovisioningservices/setup.py index f8d19f74c507..456f8bc235cb 100644 --- a/azure-mgmt-iothubprovisioningservices/setup.py +++ b/azure-mgmt-iothubprovisioningservices/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-iothubprovisioningservices" @@ -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.20,<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'], + } ) diff --git a/azure-mgmt-keyvault/MANIFEST.in b/azure-mgmt-keyvault/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-keyvault/MANIFEST.in +++ b/azure-mgmt-keyvault/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-keyvault/README.rst b/azure-mgmt-keyvault/README.rst index ae12064e473d..b7ee4573a02a 100644 --- a/azure-mgmt-keyvault/README.rst +++ b/azure-mgmt-keyvault/README.rst @@ -6,7 +6,10 @@ This is the Microsoft Azure Key Vault 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. For a more complete set of Azure libraries, see the `azure `__ bundle package. diff --git a/azure-mgmt-keyvault/azure/__init__.py b/azure-mgmt-keyvault/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-keyvault/azure/__init__.py +++ b/azure-mgmt-keyvault/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-keyvault/azure/mgmt/__init__.py b/azure-mgmt-keyvault/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-keyvault/azure/mgmt/__init__.py +++ b/azure-mgmt-keyvault/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-keyvault/azure_bdist_wheel.py b/azure-mgmt-keyvault/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-keyvault/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-keyvault/setup.cfg b/azure-mgmt-keyvault/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-keyvault/setup.cfg +++ b/azure-mgmt-keyvault/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-keyvault/setup.py b/azure-mgmt-keyvault/setup.py index 32d32dd760d3..68ca6c9980c4 100644 --- a/azure-mgmt-keyvault/setup.py +++ b/azure-mgmt-keyvault/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-keyvault" @@ -61,10 +55,10 @@ long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='azurekeyvault@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 5 - Production/Stable', + 'Development Status :: 4 - Beta', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', @@ -72,14 +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=[ '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'], + } ) diff --git a/azure-mgmt-kusto/MANIFEST.in b/azure-mgmt-kusto/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-kusto/MANIFEST.in +++ b/azure-mgmt-kusto/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-kusto/azure/__init__.py b/azure-mgmt-kusto/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-kusto/azure/__init__.py +++ b/azure-mgmt-kusto/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-kusto/azure/mgmt/__init__.py b/azure-mgmt-kusto/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-kusto/azure/mgmt/__init__.py +++ b/azure-mgmt-kusto/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-kusto/azure_bdist_wheel.py b/azure-mgmt-kusto/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-kusto/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-kusto/setup.cfg b/azure-mgmt-kusto/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-kusto/setup.cfg +++ b/azure-mgmt-kusto/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-kusto/setup.py b/azure-mgmt-kusto/setup.py index 2fd9420d8af1..112eab2cff1b 100644 --- a/azure-mgmt-kusto/setup.py +++ b/azure-mgmt-kusto/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-kusto" @@ -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'], + } ) diff --git a/azure-mgmt-loganalytics/MANIFEST.in b/azure-mgmt-loganalytics/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-loganalytics/MANIFEST.in +++ b/azure-mgmt-loganalytics/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-loganalytics/README.rst b/azure-mgmt-loganalytics/README.rst index b2a999cb07a1..1dfa343cdad7 100644 --- a/azure-mgmt-loganalytics/README.rst +++ b/azure-mgmt-loganalytics/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Log Analytics 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-loganalytics/azure/__init__.py b/azure-mgmt-loganalytics/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-loganalytics/azure/__init__.py +++ b/azure-mgmt-loganalytics/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-loganalytics/azure/mgmt/__init__.py b/azure-mgmt-loganalytics/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/__init__.py +++ b/azure-mgmt-loganalytics/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-loganalytics/azure_bdist_wheel.py b/azure-mgmt-loganalytics/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-loganalytics/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-loganalytics/setup.cfg b/azure-mgmt-loganalytics/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-loganalytics/setup.cfg +++ b/azure-mgmt-loganalytics/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-loganalytics/setup.py b/azure-mgmt-loganalytics/setup.py index 96f4ca887a06..1b9006391b22 100644 --- a/azure-mgmt-loganalytics/setup.py +++ b/azure-mgmt-loganalytics/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-loganalytics" @@ -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'], + } ) diff --git a/azure-mgmt-logic/MANIFEST.in b/azure-mgmt-logic/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-logic/MANIFEST.in +++ b/azure-mgmt-logic/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-logic/README.rst b/azure-mgmt-logic/README.rst index 095902143154..c380cdb9816d 100644 --- a/azure-mgmt-logic/README.rst +++ b/azure-mgmt-logic/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Logic Apps 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-logic/azure/__init__.py b/azure-mgmt-logic/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-logic/azure/__init__.py +++ b/azure-mgmt-logic/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-logic/azure/mgmt/__init__.py b/azure-mgmt-logic/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-logic/azure/mgmt/__init__.py +++ b/azure-mgmt-logic/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-logic/azure_bdist_wheel.py b/azure-mgmt-logic/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-logic/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-logic/setup.cfg b/azure-mgmt-logic/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-logic/setup.cfg +++ b/azure-mgmt-logic/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-logic/setup.py b/azure-mgmt-logic/setup.py index 17ac0d37f0d3..760812b2cf0b 100644 --- a/azure-mgmt-logic/setup.py +++ b/azure-mgmt-logic/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-logic" @@ -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'], + } ) diff --git a/azure-mgmt-machinelearningcompute/MANIFEST.in b/azure-mgmt-machinelearningcompute/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-machinelearningcompute/MANIFEST.in +++ b/azure-mgmt-machinelearningcompute/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-machinelearningcompute/README.rst b/azure-mgmt-machinelearningcompute/README.rst index 2faf43ef630d..dc9bdb64b890 100644 --- a/azure-mgmt-machinelearningcompute/README.rst +++ b/azure-mgmt-machinelearningcompute/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Machine Learning Compute 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-machinelearningcompute/azure/__init__.py b/azure-mgmt-machinelearningcompute/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-machinelearningcompute/azure/__init__.py +++ b/azure-mgmt-machinelearningcompute/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-machinelearningcompute/azure/mgmt/__init__.py b/azure-mgmt-machinelearningcompute/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-machinelearningcompute/azure/mgmt/__init__.py +++ b/azure-mgmt-machinelearningcompute/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-machinelearningcompute/azure_bdist_wheel.py b/azure-mgmt-machinelearningcompute/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-machinelearningcompute/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-machinelearningcompute/setup.cfg b/azure-mgmt-machinelearningcompute/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-machinelearningcompute/setup.cfg +++ b/azure-mgmt-machinelearningcompute/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-machinelearningcompute/setup.py b/azure-mgmt-machinelearningcompute/setup.py index dd0ec4d9388e..3c98c5242388 100644 --- a/azure-mgmt-machinelearningcompute/setup.py +++ b/azure-mgmt-machinelearningcompute/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-machinelearningcompute" @@ -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'], + } ) diff --git a/azure-mgmt-managementgroups/MANIFEST.in b/azure-mgmt-managementgroups/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-managementgroups/MANIFEST.in +++ b/azure-mgmt-managementgroups/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-managementgroups/README.rst b/azure-mgmt-managementgroups/README.rst index 972b9e4942b3..706430e52cfc 100644 --- a/azure-mgmt-managementgroups/README.rst +++ b/azure-mgmt-managementgroups/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Management Groups 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-managementgroups/azure/__init__.py b/azure-mgmt-managementgroups/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-managementgroups/azure/__init__.py +++ b/azure-mgmt-managementgroups/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-managementgroups/azure/mgmt/__init__.py b/azure-mgmt-managementgroups/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-managementgroups/azure/mgmt/__init__.py +++ b/azure-mgmt-managementgroups/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-managementgroups/azure_bdist_wheel.py b/azure-mgmt-managementgroups/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-managementgroups/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-managementgroups/setup.cfg b/azure-mgmt-managementgroups/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-managementgroups/setup.cfg +++ b/azure-mgmt-managementgroups/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-managementgroups/setup.py b/azure-mgmt-managementgroups/setup.py index 0149e4864dfa..1c1d1caa9200 100644 --- a/azure-mgmt-managementgroups/setup.py +++ b/azure-mgmt-managementgroups/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-managementgroups" @@ -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'], + } ) diff --git a/azure-mgmt-managementpartner/MANIFEST.in b/azure-mgmt-managementpartner/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-managementpartner/MANIFEST.in +++ b/azure-mgmt-managementpartner/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-managementpartner/README.rst b/azure-mgmt-managementpartner/README.rst index d1e577c52b27..1a9601ca680c 100644 --- a/azure-mgmt-managementpartner/README.rst +++ b/azure-mgmt-managementpartner/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure ManagementPartner 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.3, 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. @@ -36,7 +36,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -no examples yet +For code examples, see `ManagementPartner Management +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-managementpartner/azure/__init__.py b/azure-mgmt-managementpartner/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-managementpartner/azure/__init__.py +++ b/azure-mgmt-managementpartner/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-managementpartner/azure/mgmt/__init__.py b/azure-mgmt-managementpartner/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-managementpartner/azure/mgmt/__init__.py +++ b/azure-mgmt-managementpartner/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-managementpartner/azure_bdist_wheel.py b/azure-mgmt-managementpartner/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-managementpartner/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-managementpartner/sdk_packaging.toml b/azure-mgmt-managementpartner/sdk_packaging.toml new file mode 100644 index 000000000000..c3130a663044 --- /dev/null +++ b/azure-mgmt-managementpartner/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-managementpartner" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "ManagementPartner Management" +package_doc_id = "" +is_stable = false +is_arm = true diff --git a/azure-mgmt-managementpartner/setup.cfg b/azure-mgmt-managementpartner/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-managementpartner/setup.cfg +++ b/azure-mgmt-managementpartner/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-managementpartner/setup.py b/azure-mgmt-managementpartner/setup.py index 0691da19ad35..4f2d5c01c87a 100644 --- a/azure-mgmt-managementpartner/setup.py +++ b/azure-mgmt-managementpartner/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-managementpartner" @@ -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.20,<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'], + } ) diff --git a/azure-mgmt-maps/MANIFEST.in b/azure-mgmt-maps/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-maps/MANIFEST.in +++ b/azure-mgmt-maps/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-maps/README.rst b/azure-mgmt-maps/README.rst index dce98f14d369..b5d13ab9f75c 100644 --- a/azure-mgmt-maps/README.rst +++ b/azure-mgmt-maps/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Maps 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. @@ -37,7 +37,7 @@ Usage ===== For code examples, see `Maps -`__ +`__ on docs.microsoft.com. diff --git a/azure-mgmt-maps/azure/__init__.py b/azure-mgmt-maps/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-maps/azure/__init__.py +++ b/azure-mgmt-maps/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-maps/azure/mgmt/__init__.py b/azure-mgmt-maps/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-maps/azure/mgmt/__init__.py +++ b/azure-mgmt-maps/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-maps/azure_bdist_wheel.py b/azure-mgmt-maps/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-maps/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-maps/sdk_packaging.toml b/azure-mgmt-maps/sdk_packaging.toml new file mode 100644 index 000000000000..d5bdfdc4180e --- /dev/null +++ b/azure-mgmt-maps/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-maps" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Maps" +package_doc_id = "" +is_stable = false +is_arm = true diff --git a/azure-mgmt-maps/setup.cfg b/azure-mgmt-maps/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-maps/setup.cfg +++ b/azure-mgmt-maps/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-maps/setup.py b/azure-mgmt-maps/setup.py index c9454a079e72..b2a19d8b995d 100644 --- a/azure-mgmt-maps/setup.py +++ b/azure-mgmt-maps/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-maps" @@ -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'], + } ) diff --git a/azure-mgmt-marketplaceordering/MANIFEST.in b/azure-mgmt-marketplaceordering/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-marketplaceordering/MANIFEST.in +++ b/azure-mgmt-marketplaceordering/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-marketplaceordering/README.rst b/azure-mgmt-marketplaceordering/README.rst index 328e2c3e28f5..beb100b029fc 100644 --- a/azure-mgmt-marketplaceordering/README.rst +++ b/azure-mgmt-marketplaceordering/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Market Place Ordering 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. @@ -37,7 +37,7 @@ Usage ===== For code examples, see `Market Place Ordering -`__ +`__ on docs.microsoft.com. diff --git a/azure-mgmt-marketplaceordering/azure/__init__.py b/azure-mgmt-marketplaceordering/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-marketplaceordering/azure/__init__.py +++ b/azure-mgmt-marketplaceordering/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-marketplaceordering/azure/mgmt/__init__.py b/azure-mgmt-marketplaceordering/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-marketplaceordering/azure/mgmt/__init__.py +++ b/azure-mgmt-marketplaceordering/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-marketplaceordering/azure_bdist_wheel.py b/azure-mgmt-marketplaceordering/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-marketplaceordering/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-marketplaceordering/sdk_packaging.toml b/azure-mgmt-marketplaceordering/sdk_packaging.toml new file mode 100644 index 000000000000..11e17b4459cd --- /dev/null +++ b/azure-mgmt-marketplaceordering/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-marketplaceordering" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Market Place Ordering" +package_doc_id = "" +is_stable = false +is_arm = true diff --git a/azure-mgmt-marketplaceordering/setup.cfg b/azure-mgmt-marketplaceordering/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-marketplaceordering/setup.cfg +++ b/azure-mgmt-marketplaceordering/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-marketplaceordering/setup.py b/azure-mgmt-marketplaceordering/setup.py index 7d54ced52576..14af2b977719 100644 --- a/azure-mgmt-marketplaceordering/setup.py +++ b/azure-mgmt-marketplaceordering/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-marketplaceordering" @@ -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.20,<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'], + } ) diff --git a/azure-mgmt-media/MANIFEST.in b/azure-mgmt-media/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-media/MANIFEST.in +++ b/azure-mgmt-media/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-media/azure/__init__.py b/azure-mgmt-media/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-media/azure/__init__.py +++ b/azure-mgmt-media/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-media/azure/mgmt/__init__.py b/azure-mgmt-media/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-media/azure/mgmt/__init__.py +++ b/azure-mgmt-media/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-media/azure_bdist_wheel.py b/azure-mgmt-media/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-media/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-media/setup.cfg b/azure-mgmt-media/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-media/setup.cfg +++ b/azure-mgmt-media/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-media/setup.py b/azure-mgmt-media/setup.py index 49be05b7b104..63b9945fed94 100644 --- a/azure-mgmt-media/setup.py +++ b/azure-mgmt-media/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-media" @@ -76,10 +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'], + } ) diff --git a/azure-mgmt-monitor/MANIFEST.in b/azure-mgmt-monitor/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-monitor/MANIFEST.in +++ b/azure-mgmt-monitor/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-monitor/README.rst b/azure-mgmt-monitor/README.rst index dbfab2bfccfb..04af85e3ba61 100644 --- a/azure-mgmt-monitor/README.rst +++ b/azure-mgmt-monitor/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Monitor 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-monitor/azure/__init__.py b/azure-mgmt-monitor/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-monitor/azure/__init__.py +++ b/azure-mgmt-monitor/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-monitor/azure/mgmt/__init__.py b/azure-mgmt-monitor/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-monitor/azure/mgmt/__init__.py +++ b/azure-mgmt-monitor/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-monitor/azure_bdist_wheel.py b/azure-mgmt-monitor/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-monitor/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-monitor/setup.cfg b/azure-mgmt-monitor/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-monitor/setup.cfg +++ b/azure-mgmt-monitor/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-monitor/setup.py b/azure-mgmt-monitor/setup.py index 6c95e69612cd..e26e0db3cc39 100644 --- a/azure-mgmt-monitor/setup.py +++ b/azure-mgmt-monitor/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-monitor" @@ -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'], + } ) diff --git a/azure-mgmt-msi/MANIFEST.in b/azure-mgmt-msi/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-msi/MANIFEST.in +++ b/azure-mgmt-msi/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-msi/README.rst b/azure-mgmt-msi/README.rst index 6d2ecf1dd4b2..5ffcdf2d16fa 100644 --- a/azure-mgmt-msi/README.rst +++ b/azure-mgmt-msi/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure MSI 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-msi/azure/__init__.py b/azure-mgmt-msi/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-msi/azure/__init__.py +++ b/azure-mgmt-msi/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-msi/azure/mgmt/__init__.py b/azure-mgmt-msi/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-msi/azure/mgmt/__init__.py +++ b/azure-mgmt-msi/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-msi/azure_bdist_wheel.py b/azure-mgmt-msi/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-msi/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-msi/setup.cfg b/azure-mgmt-msi/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-msi/setup.cfg +++ b/azure-mgmt-msi/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-msi/setup.py b/azure-mgmt-msi/setup.py index 54211cbc9f6b..9cb911bb28bb 100644 --- a/azure-mgmt-msi/setup.py +++ b/azure-mgmt-msi/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-msi" @@ -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'], + } ) diff --git a/azure-mgmt-network/MANIFEST.in b/azure-mgmt-network/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-network/MANIFEST.in +++ b/azure-mgmt-network/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-network/azure/__init__.py b/azure-mgmt-network/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-network/azure/__init__.py +++ b/azure-mgmt-network/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-network/azure/mgmt/__init__.py b/azure-mgmt-network/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-network/azure/mgmt/__init__.py +++ b/azure-mgmt-network/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-network/azure_bdist_wheel.py b/azure-mgmt-network/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-network/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-network/setup.cfg b/azure-mgmt-network/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-network/setup.cfg +++ b/azure-mgmt-network/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-network/setup.py b/azure-mgmt-network/setup.py index 6148dcdc0212..90b9416272f1 100644 --- a/azure-mgmt-network/setup.py +++ b/azure-mgmt-network/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-network" @@ -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'], + } ) diff --git a/azure-mgmt-notificationhubs/MANIFEST.in b/azure-mgmt-notificationhubs/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-notificationhubs/MANIFEST.in +++ b/azure-mgmt-notificationhubs/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-notificationhubs/README.rst b/azure-mgmt-notificationhubs/README.rst index c2993d6f867c..d9d406e03c22 100644 --- a/azure-mgmt-notificationhubs/README.rst +++ b/azure-mgmt-notificationhubs/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Notification Hubs 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-notificationhubs/azure/__init__.py b/azure-mgmt-notificationhubs/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-notificationhubs/azure/__init__.py +++ b/azure-mgmt-notificationhubs/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-notificationhubs/azure/mgmt/__init__.py b/azure-mgmt-notificationhubs/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/__init__.py +++ b/azure-mgmt-notificationhubs/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-notificationhubs/azure_bdist_wheel.py b/azure-mgmt-notificationhubs/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-notificationhubs/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-notificationhubs/setup.cfg b/azure-mgmt-notificationhubs/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-notificationhubs/setup.cfg +++ b/azure-mgmt-notificationhubs/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-notificationhubs/setup.py b/azure-mgmt-notificationhubs/setup.py index ddd7cd1693b1..605d8a7bc905 100644 --- a/azure-mgmt-notificationhubs/setup.py +++ b/azure-mgmt-notificationhubs/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-notificationhubs" @@ -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'], + } ) diff --git a/azure-mgmt-nspkg/README.rst b/azure-mgmt-nspkg/README.rst index 8a67977e4025..7af965daea5f 100644 --- a/azure-mgmt-nspkg/README.rst +++ b/azure-mgmt-nspkg/README.rst @@ -5,6 +5,9 @@ This is the Microsoft Azure Management namespace package. This package is not intended to be installed directly by the end user. +Since version 3.0, this is Python 2 package only, Python 3.x SDKs will use `PEP420 ` as namespace package strategy. +This package will use `python_requires` to enforce Python 2 installation. This implies that you might see this package on Python 3 environment if you have pip < 9.0 or setuptools < 24.2.0. + It provides the necessary files for other packages to extend the azure.mgmt namespace. If you are looking to install the Azure client libraries, see the diff --git a/azure-mgmt-nspkg/azure/__init__.py b/azure-mgmt-nspkg/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/azure-mgmt-nspkg/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-nspkg/azure/mgmt/__init__.py b/azure-mgmt-nspkg/azure/mgmt/__init__.py index e69de29bb2d1..0260537a02bb 100644 --- a/azure-mgmt-nspkg/azure/mgmt/__init__.py +++ b/azure-mgmt-nspkg/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-nspkg/sdk_packaging.toml b/azure-mgmt-nspkg/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/azure-mgmt-nspkg/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/azure-mgmt-nspkg/setup.py b/azure-mgmt-nspkg/setup.py index f6a01ad91c0c..b1e5221c88b8 100644 --- a/azure-mgmt-nspkg/setup.py +++ b/azure-mgmt-nspkg/setup.py @@ -25,31 +25,26 @@ setup( name='azure-mgmt-nspkg', - version='2.0.0', + version='3.0.0', description='Microsoft Azure Resource Management Namespace Package [Internal]', long_description=open('README.rst', 'r').read(), license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, packages=[ - 'azure', 'azure.mgmt', ], + python_requires='<3', install_requires=[ - 'azure-nspkg>=2.0.0', + 'azure-nspkg>=3.0.0', ] ) diff --git a/azure-mgmt-policyinsights/MANIFEST.in b/azure-mgmt-policyinsights/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-policyinsights/MANIFEST.in +++ b/azure-mgmt-policyinsights/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-policyinsights/README.rst b/azure-mgmt-policyinsights/README.rst index ed70aaf0537f..9fbe107ff456 100644 --- a/azure-mgmt-policyinsights/README.rst +++ b/azure-mgmt-policyinsights/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Policy Insights 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. @@ -37,7 +37,7 @@ Usage ===== For code examples, see `Policy Insights -`__ +`__ on docs.microsoft.com. diff --git a/azure-mgmt-policyinsights/azure/__init__.py b/azure-mgmt-policyinsights/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-policyinsights/azure/__init__.py +++ b/azure-mgmt-policyinsights/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-policyinsights/azure/mgmt/__init__.py b/azure-mgmt-policyinsights/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-policyinsights/azure/mgmt/__init__.py +++ b/azure-mgmt-policyinsights/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-policyinsights/azure_bdist_wheel.py b/azure-mgmt-policyinsights/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-policyinsights/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-policyinsights/sdk_packaging.toml b/azure-mgmt-policyinsights/sdk_packaging.toml new file mode 100644 index 000000000000..b1f106a899ce --- /dev/null +++ b/azure-mgmt-policyinsights/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-policyinsights" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Policy Insights" +package_doc_id = "" +is_stable = false +is_arm = true diff --git a/azure-mgmt-policyinsights/setup.cfg b/azure-mgmt-policyinsights/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-policyinsights/setup.cfg +++ b/azure-mgmt-policyinsights/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-policyinsights/setup.py b/azure-mgmt-policyinsights/setup.py index ed08d1623368..f8a123157ec8 100644 --- a/azure-mgmt-policyinsights/setup.py +++ b/azure-mgmt-policyinsights/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-policyinsights" @@ -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'], + } ) diff --git a/azure-mgmt-powerbiembedded/MANIFEST.in b/azure-mgmt-powerbiembedded/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-powerbiembedded/MANIFEST.in +++ b/azure-mgmt-powerbiembedded/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-powerbiembedded/README.rst b/azure-mgmt-powerbiembedded/README.rst index f75a904d0183..b896fa1385d3 100644 --- a/azure-mgmt-powerbiembedded/README.rst +++ b/azure-mgmt-powerbiembedded/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Power BI Embedded 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-powerbiembedded/azure/__init__.py b/azure-mgmt-powerbiembedded/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-powerbiembedded/azure/__init__.py +++ b/azure-mgmt-powerbiembedded/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-powerbiembedded/azure/mgmt/__init__.py b/azure-mgmt-powerbiembedded/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/__init__.py +++ b/azure-mgmt-powerbiembedded/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-powerbiembedded/azure_bdist_wheel.py b/azure-mgmt-powerbiembedded/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-powerbiembedded/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-powerbiembedded/setup.cfg b/azure-mgmt-powerbiembedded/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-powerbiembedded/setup.cfg +++ b/azure-mgmt-powerbiembedded/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-powerbiembedded/setup.py b/azure-mgmt-powerbiembedded/setup.py index 90d75208fd7e..15725453bd9f 100644 --- a/azure-mgmt-powerbiembedded/setup.py +++ b/azure-mgmt-powerbiembedded/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-powerbiembedded" @@ -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'], + } ) diff --git a/azure-mgmt-rdbms/MANIFEST.in b/azure-mgmt-rdbms/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-rdbms/MANIFEST.in +++ b/azure-mgmt-rdbms/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-rdbms/azure/__init__.py b/azure-mgmt-rdbms/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-rdbms/azure/__init__.py +++ b/azure-mgmt-rdbms/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-rdbms/azure/mgmt/__init__.py b/azure-mgmt-rdbms/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-rdbms/azure/mgmt/__init__.py +++ b/azure-mgmt-rdbms/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-rdbms/azure_bdist_wheel.py b/azure-mgmt-rdbms/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-rdbms/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-rdbms/setup.cfg b/azure-mgmt-rdbms/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-rdbms/setup.cfg +++ b/azure-mgmt-rdbms/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-rdbms/setup.py b/azure-mgmt-rdbms/setup.py index 8dd6109a94ff..5c6360c76ff9 100644 --- a/azure-mgmt-rdbms/setup.py +++ b/azure-mgmt-rdbms/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-rdbms" @@ -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'], + } ) diff --git a/azure-mgmt-recoveryservices/MANIFEST.in b/azure-mgmt-recoveryservices/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-recoveryservices/MANIFEST.in +++ b/azure-mgmt-recoveryservices/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-recoveryservices/README.rst b/azure-mgmt-recoveryservices/README.rst index 469de038ba8d..1b3fbc27f7fb 100644 --- a/azure-mgmt-recoveryservices/README.rst +++ b/azure-mgmt-recoveryservices/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Recovery Services 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-recoveryservices/azure/__init__.py b/azure-mgmt-recoveryservices/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-recoveryservices/azure/__init__.py +++ b/azure-mgmt-recoveryservices/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-recoveryservices/azure/mgmt/__init__.py b/azure-mgmt-recoveryservices/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/__init__.py +++ b/azure-mgmt-recoveryservices/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-recoveryservices/azure_bdist_wheel.py b/azure-mgmt-recoveryservices/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-recoveryservices/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-recoveryservices/setup.cfg b/azure-mgmt-recoveryservices/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-recoveryservices/setup.cfg +++ b/azure-mgmt-recoveryservices/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-recoveryservices/setup.py b/azure-mgmt-recoveryservices/setup.py index 3b8c97efed35..6e4d331da6a3 100644 --- a/azure-mgmt-recoveryservices/setup.py +++ b/azure-mgmt-recoveryservices/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-recoveryservices" @@ -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'], + } ) diff --git a/azure-mgmt-recoveryservicesbackup/MANIFEST.in b/azure-mgmt-recoveryservicesbackup/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-recoveryservicesbackup/MANIFEST.in +++ b/azure-mgmt-recoveryservicesbackup/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-recoveryservicesbackup/README.rst b/azure-mgmt-recoveryservicesbackup/README.rst index 940d0af77f11..5594cc03800d 100644 --- a/azure-mgmt-recoveryservicesbackup/README.rst +++ b/azure-mgmt-recoveryservicesbackup/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Recovery Services Backup 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-recoveryservicesbackup/azure/__init__.py b/azure-mgmt-recoveryservicesbackup/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/__init__.py +++ b/azure-mgmt-recoveryservicesbackup/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-recoveryservicesbackup/azure/mgmt/__init__.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/__init__.py +++ b/azure-mgmt-recoveryservicesbackup/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-recoveryservicesbackup/azure_bdist_wheel.py b/azure-mgmt-recoveryservicesbackup/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-recoveryservicesbackup/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-recoveryservicesbackup/setup.cfg b/azure-mgmt-recoveryservicesbackup/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-recoveryservicesbackup/setup.cfg +++ b/azure-mgmt-recoveryservicesbackup/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-recoveryservicesbackup/setup.py b/azure-mgmt-recoveryservicesbackup/setup.py index e375e8a291f5..e6d4f870be26 100644 --- a/azure-mgmt-recoveryservicesbackup/setup.py +++ b/azure-mgmt-recoveryservicesbackup/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-recoveryservicesbackup" @@ -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'], + } ) diff --git a/azure-mgmt-redis/MANIFEST.in b/azure-mgmt-redis/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-redis/MANIFEST.in +++ b/azure-mgmt-redis/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-redis/README.rst b/azure-mgmt-redis/README.rst index af688d055ff0..a9fad04b31f7 100644 --- a/azure-mgmt-redis/README.rst +++ b/azure-mgmt-redis/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Redis Cache 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-redis/azure/__init__.py b/azure-mgmt-redis/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-redis/azure/__init__.py +++ b/azure-mgmt-redis/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-redis/azure/mgmt/__init__.py b/azure-mgmt-redis/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-redis/azure/mgmt/__init__.py +++ b/azure-mgmt-redis/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-redis/azure_bdist_wheel.py b/azure-mgmt-redis/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-redis/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-redis/sdk_packaging.toml b/azure-mgmt-redis/sdk_packaging.toml new file mode 100644 index 000000000000..697bf3080149 --- /dev/null +++ b/azure-mgmt-redis/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-redis" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Redis Cache Management" +package_doc_id = "redis" +is_stable = true +is_arm = true diff --git a/azure-mgmt-redis/setup.cfg b/azure-mgmt-redis/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-redis/setup.cfg +++ b/azure-mgmt-redis/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-redis/setup.py b/azure-mgmt-redis/setup.py index 17430393a548..e9f9148f8e99 100644 --- a/azure-mgmt-redis/setup.py +++ b/azure-mgmt-redis/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-redis" @@ -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.20,<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'], + } ) diff --git a/azure-mgmt-relay/MANIFEST.in b/azure-mgmt-relay/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-relay/MANIFEST.in +++ b/azure-mgmt-relay/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-relay/README.rst b/azure-mgmt-relay/README.rst index b1ceb983533c..ce87a46bd7c7 100644 --- a/azure-mgmt-relay/README.rst +++ b/azure-mgmt-relay/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Relay 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. @@ -37,7 +37,7 @@ Usage ===== For code examples, see `Relay -`__ +`__ on docs.microsoft.com. diff --git a/azure-mgmt-relay/azure/__init__.py b/azure-mgmt-relay/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-relay/azure/__init__.py +++ b/azure-mgmt-relay/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-relay/azure/mgmt/__init__.py b/azure-mgmt-relay/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-relay/azure/mgmt/__init__.py +++ b/azure-mgmt-relay/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-relay/azure_bdist_wheel.py b/azure-mgmt-relay/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-relay/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-relay/sdk_packaging.toml b/azure-mgmt-relay/sdk_packaging.toml new file mode 100644 index 000000000000..cef981a1a9f1 --- /dev/null +++ b/azure-mgmt-relay/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-relay" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Relay" +package_doc_id = "relay" +is_stable = false +is_arm = true diff --git a/azure-mgmt-relay/setup.cfg b/azure-mgmt-relay/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-relay/setup.cfg +++ b/azure-mgmt-relay/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-relay/setup.py b/azure-mgmt-relay/setup.py index b7242e80f597..eca5fb38f120 100644 --- a/azure-mgmt-relay/setup.py +++ b/azure-mgmt-relay/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-relay" @@ -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.20,<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'], + } ) diff --git a/azure-mgmt-reservations/MANIFEST.in b/azure-mgmt-reservations/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-reservations/MANIFEST.in +++ b/azure-mgmt-reservations/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-reservations/azure/__init__.py b/azure-mgmt-reservations/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-reservations/azure/__init__.py +++ b/azure-mgmt-reservations/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-reservations/azure/mgmt/__init__.py b/azure-mgmt-reservations/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-reservations/azure/mgmt/__init__.py +++ b/azure-mgmt-reservations/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-reservations/azure_bdist_wheel.py b/azure-mgmt-reservations/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-reservations/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-reservations/setup.cfg b/azure-mgmt-reservations/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-reservations/setup.cfg +++ b/azure-mgmt-reservations/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-reservations/setup.py b/azure-mgmt-reservations/setup.py index f6a88ee8d422..99195938af80 100644 --- a/azure-mgmt-reservations/setup.py +++ b/azure-mgmt-reservations/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-reservations" @@ -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'], + } ) diff --git a/azure-mgmt-resource/MANIFEST.in b/azure-mgmt-resource/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-resource/MANIFEST.in +++ b/azure-mgmt-resource/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-resource/README.rst b/azure-mgmt-resource/README.rst index 93b3aeb0ff3e..82592b0b6674 100644 --- a/azure-mgmt-resource/README.rst +++ b/azure-mgmt-resource/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Resource 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-resource/azure/__init__.py b/azure-mgmt-resource/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-resource/azure/__init__.py +++ b/azure-mgmt-resource/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-resource/azure/mgmt/__init__.py b/azure-mgmt-resource/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-resource/azure/mgmt/__init__.py +++ b/azure-mgmt-resource/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-resource/azure_bdist_wheel.py b/azure-mgmt-resource/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-resource/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-resource/setup.cfg b/azure-mgmt-resource/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-resource/setup.cfg +++ b/azure-mgmt-resource/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-resource/setup.py b/azure-mgmt-resource/setup.py index 39abbc5af67c..0b6289c9ebda 100644 --- a/azure-mgmt-resource/setup.py +++ b/azure-mgmt-resource/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-resource" @@ -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', - 'azure-common~=1.1,>=1.1.9', + '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'], + } ) diff --git a/azure-mgmt-resourcegraph/MANIFEST.in b/azure-mgmt-resourcegraph/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-resourcegraph/MANIFEST.in +++ b/azure-mgmt-resourcegraph/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-resourcegraph/azure/__init__.py b/azure-mgmt-resourcegraph/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-resourcegraph/azure/__init__.py +++ b/azure-mgmt-resourcegraph/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-resourcegraph/azure/mgmt/__init__.py b/azure-mgmt-resourcegraph/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-resourcegraph/azure/mgmt/__init__.py +++ b/azure-mgmt-resourcegraph/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-resourcegraph/azure_bdist_wheel.py b/azure-mgmt-resourcegraph/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-resourcegraph/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-resourcegraph/setup.cfg b/azure-mgmt-resourcegraph/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-resourcegraph/setup.cfg +++ b/azure-mgmt-resourcegraph/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-resourcegraph/setup.py b/azure-mgmt-resourcegraph/setup.py index 74d098629703..8670749de729 100644 --- a/azure-mgmt-resourcegraph/setup.py +++ b/azure-mgmt-resourcegraph/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-resourcegraph" @@ -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'], + } ) diff --git a/azure-mgmt-scheduler/MANIFEST.in b/azure-mgmt-scheduler/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-scheduler/MANIFEST.in +++ b/azure-mgmt-scheduler/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-scheduler/README.rst b/azure-mgmt-scheduler/README.rst index af814a002139..f7eafff0aff6 100644 --- a/azure-mgmt-scheduler/README.rst +++ b/azure-mgmt-scheduler/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Scheduler 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-scheduler/azure/__init__.py b/azure-mgmt-scheduler/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-scheduler/azure/__init__.py +++ b/azure-mgmt-scheduler/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-scheduler/azure/mgmt/__init__.py b/azure-mgmt-scheduler/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-scheduler/azure/mgmt/__init__.py +++ b/azure-mgmt-scheduler/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-scheduler/azure_bdist_wheel.py b/azure-mgmt-scheduler/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-scheduler/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-scheduler/setup.cfg b/azure-mgmt-scheduler/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-scheduler/setup.cfg +++ b/azure-mgmt-scheduler/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-scheduler/setup.py b/azure-mgmt-scheduler/setup.py index da4e8c3223d3..878bb1ec3635 100644 --- a/azure-mgmt-scheduler/setup.py +++ b/azure-mgmt-scheduler/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-scheduler" @@ -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'], + } ) diff --git a/azure-mgmt-search/MANIFEST.in b/azure-mgmt-search/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-search/MANIFEST.in +++ b/azure-mgmt-search/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-search/README.rst b/azure-mgmt-search/README.rst index 20f634c32590..d0a245b81b69 100644 --- a/azure-mgmt-search/README.rst +++ b/azure-mgmt-search/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Search 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-search/azure/__init__.py b/azure-mgmt-search/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-search/azure/__init__.py +++ b/azure-mgmt-search/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-search/azure/mgmt/__init__.py b/azure-mgmt-search/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-search/azure/mgmt/__init__.py +++ b/azure-mgmt-search/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-search/azure_bdist_wheel.py b/azure-mgmt-search/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-search/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-search/sdk_packaging.toml b/azure-mgmt-search/sdk_packaging.toml new file mode 100644 index 000000000000..da7f6badb68b --- /dev/null +++ b/azure-mgmt-search/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-search" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Search Management" +package_doc_id = "search" +is_stable = false +is_arm = true diff --git a/azure-mgmt-search/setup.cfg b/azure-mgmt-search/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-search/setup.cfg +++ b/azure-mgmt-search/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-search/setup.py b/azure-mgmt-search/setup.py index d9147216639b..e429c58e6314 100644 --- a/azure-mgmt-search/setup.py +++ b/azure-mgmt-search/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-search" @@ -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'], + } ) diff --git a/azure-mgmt-servermanager/MANIFEST.in b/azure-mgmt-servermanager/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-servermanager/MANIFEST.in +++ b/azure-mgmt-servermanager/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-servermanager/README.rst b/azure-mgmt-servermanager/README.rst index c898ad31f4da..2d88769cf9a5 100644 --- a/azure-mgmt-servermanager/README.rst +++ b/azure-mgmt-servermanager/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Server Manager 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-servermanager/azure/__init__.py b/azure-mgmt-servermanager/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-servermanager/azure/__init__.py +++ b/azure-mgmt-servermanager/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-servermanager/azure/mgmt/__init__.py b/azure-mgmt-servermanager/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-servermanager/azure/mgmt/__init__.py +++ b/azure-mgmt-servermanager/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-servermanager/azure_bdist_wheel.py b/azure-mgmt-servermanager/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-servermanager/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-servermanager/setup.cfg b/azure-mgmt-servermanager/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-servermanager/setup.cfg +++ b/azure-mgmt-servermanager/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-servermanager/setup.py b/azure-mgmt-servermanager/setup.py index 0e4332d6a2b1..02913d1a459b 100644 --- a/azure-mgmt-servermanager/setup.py +++ b/azure-mgmt-servermanager/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-servermanager" @@ -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'], + } ) diff --git a/azure-mgmt-servicebus/MANIFEST.in b/azure-mgmt-servicebus/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-servicebus/MANIFEST.in +++ b/azure-mgmt-servicebus/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-servicebus/README.rst b/azure-mgmt-servicebus/README.rst index 928e43f1d77f..cdfd9e5bab7f 100644 --- a/azure-mgmt-servicebus/README.rst +++ b/azure-mgmt-servicebus/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Service Bus 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-servicebus/azure/__init__.py b/azure-mgmt-servicebus/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-servicebus/azure/__init__.py +++ b/azure-mgmt-servicebus/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-servicebus/azure/mgmt/__init__.py b/azure-mgmt-servicebus/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-servicebus/azure/mgmt/__init__.py +++ b/azure-mgmt-servicebus/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-servicebus/azure_bdist_wheel.py b/azure-mgmt-servicebus/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-servicebus/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-servicebus/setup.cfg b/azure-mgmt-servicebus/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-servicebus/setup.cfg +++ b/azure-mgmt-servicebus/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-servicebus/setup.py b/azure-mgmt-servicebus/setup.py index f644ec4bbccd..01b326350489 100644 --- a/azure-mgmt-servicebus/setup.py +++ b/azure-mgmt-servicebus/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-servicebus" @@ -76,10 +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=[ - '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'], + } ) diff --git a/azure-mgmt-servicefabric/MANIFEST.in b/azure-mgmt-servicefabric/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-servicefabric/MANIFEST.in +++ b/azure-mgmt-servicefabric/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-servicefabric/azure/__init__.py b/azure-mgmt-servicefabric/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-servicefabric/azure/__init__.py +++ b/azure-mgmt-servicefabric/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-servicefabric/azure/mgmt/__init__.py b/azure-mgmt-servicefabric/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-servicefabric/azure/mgmt/__init__.py +++ b/azure-mgmt-servicefabric/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-servicefabric/azure_bdist_wheel.py b/azure-mgmt-servicefabric/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-servicefabric/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-servicefabric/setup.cfg b/azure-mgmt-servicefabric/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-servicefabric/setup.cfg +++ b/azure-mgmt-servicefabric/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-servicefabric/setup.py b/azure-mgmt-servicefabric/setup.py index 8be8b72dd098..16470da78edc 100644 --- a/azure-mgmt-servicefabric/setup.py +++ b/azure-mgmt-servicefabric/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-servicefabric" @@ -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'], + } ) diff --git a/azure-mgmt-signalr/MANIFEST.in b/azure-mgmt-signalr/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-signalr/MANIFEST.in +++ b/azure-mgmt-signalr/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-signalr/azure/__init__.py b/azure-mgmt-signalr/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-signalr/azure/__init__.py +++ b/azure-mgmt-signalr/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-signalr/azure/mgmt/__init__.py b/azure-mgmt-signalr/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-signalr/azure/mgmt/__init__.py +++ b/azure-mgmt-signalr/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-signalr/azure_bdist_wheel.py b/azure-mgmt-signalr/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-signalr/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-signalr/setup.cfg b/azure-mgmt-signalr/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-signalr/setup.cfg +++ b/azure-mgmt-signalr/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-signalr/setup.py b/azure-mgmt-signalr/setup.py index 26d7dc636996..9d0098a3cc8e 100644 --- a/azure-mgmt-signalr/setup.py +++ b/azure-mgmt-signalr/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-signalr" @@ -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'], + } ) diff --git a/azure-mgmt-sql/MANIFEST.in b/azure-mgmt-sql/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-sql/MANIFEST.in +++ b/azure-mgmt-sql/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-sql/README.rst b/azure-mgmt-sql/README.rst index be2356da21f0..ba4322ebd16e 100644 --- a/azure-mgmt-sql/README.rst +++ b/azure-mgmt-sql/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure SQL 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-sql/azure/__init__.py b/azure-mgmt-sql/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-sql/azure/__init__.py +++ b/azure-mgmt-sql/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-sql/azure/mgmt/__init__.py b/azure-mgmt-sql/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-sql/azure/mgmt/__init__.py +++ b/azure-mgmt-sql/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-sql/azure_bdist_wheel.py b/azure-mgmt-sql/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-sql/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-sql/setup.cfg b/azure-mgmt-sql/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-sql/setup.cfg +++ b/azure-mgmt-sql/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-sql/setup.py b/azure-mgmt-sql/setup.py index c4492c11a4a0..16c6c1db50a8 100644 --- a/azure-mgmt-sql/setup.py +++ b/azure-mgmt-sql/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-sql" @@ -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'], + } ) diff --git a/azure-mgmt-storage/MANIFEST.in b/azure-mgmt-storage/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-storage/MANIFEST.in +++ b/azure-mgmt-storage/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-storage/azure/__init__.py b/azure-mgmt-storage/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-storage/azure/__init__.py +++ b/azure-mgmt-storage/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-storage/azure/mgmt/__init__.py b/azure-mgmt-storage/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-storage/azure/mgmt/__init__.py +++ b/azure-mgmt-storage/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-storage/azure_bdist_wheel.py b/azure-mgmt-storage/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-storage/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-storage/setup.cfg b/azure-mgmt-storage/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-storage/setup.cfg +++ b/azure-mgmt-storage/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-storage/setup.py b/azure-mgmt-storage/setup.py index 67df7c1540bd..09b444b48d6c 100644 --- a/azure-mgmt-storage/setup.py +++ b/azure-mgmt-storage/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-storage" @@ -76,10 +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,>=1.1.10', + 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } ) diff --git a/azure-mgmt-subscription/MANIFEST.in b/azure-mgmt-subscription/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-subscription/MANIFEST.in +++ b/azure-mgmt-subscription/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-subscription/README.rst b/azure-mgmt-subscription/README.rst index 24a1ed35f195..7b10f46ab760 100644 --- a/azure-mgmt-subscription/README.rst +++ b/azure-mgmt-subscription/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Subscription 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. @@ -37,7 +37,7 @@ Usage ===== For code examples, see `Subscription Management -`__ +`__ on docs.microsoft.com. diff --git a/azure-mgmt-subscription/azure/__init__.py b/azure-mgmt-subscription/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-subscription/azure/__init__.py +++ b/azure-mgmt-subscription/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-subscription/azure/mgmt/__init__.py b/azure-mgmt-subscription/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-subscription/azure/mgmt/__init__.py +++ b/azure-mgmt-subscription/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-subscription/azure_bdist_wheel.py b/azure-mgmt-subscription/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-subscription/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-subscription/sdk_packaging.toml b/azure-mgmt-subscription/sdk_packaging.toml new file mode 100644 index 000000000000..2f5ab7bab8bd --- /dev/null +++ b/azure-mgmt-subscription/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-mgmt-subscription" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Subscription Management" +package_doc_id = "" +is_stable = false +is_arm = true diff --git a/azure-mgmt-subscription/setup.cfg b/azure-mgmt-subscription/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-subscription/setup.cfg +++ b/azure-mgmt-subscription/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-subscription/setup.py b/azure-mgmt-subscription/setup.py index e390e5391cd6..65141593bea4 100644 --- a/azure-mgmt-subscription/setup.py +++ b/azure-mgmt-subscription/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-subscription" @@ -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.20,<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'], + } ) diff --git a/azure-mgmt-trafficmanager/MANIFEST.in b/azure-mgmt-trafficmanager/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-trafficmanager/MANIFEST.in +++ b/azure-mgmt-trafficmanager/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-trafficmanager/README.rst b/azure-mgmt-trafficmanager/README.rst index 947b56fed25d..f88aa0a76dbd 100644 --- a/azure-mgmt-trafficmanager/README.rst +++ b/azure-mgmt-trafficmanager/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Traffic Manager 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-trafficmanager/azure/__init__.py b/azure-mgmt-trafficmanager/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-trafficmanager/azure/__init__.py +++ b/azure-mgmt-trafficmanager/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-trafficmanager/azure/mgmt/__init__.py b/azure-mgmt-trafficmanager/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/__init__.py +++ b/azure-mgmt-trafficmanager/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-trafficmanager/azure_bdist_wheel.py b/azure-mgmt-trafficmanager/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-trafficmanager/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-trafficmanager/setup.cfg b/azure-mgmt-trafficmanager/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-trafficmanager/setup.cfg +++ b/azure-mgmt-trafficmanager/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-trafficmanager/setup.py b/azure-mgmt-trafficmanager/setup.py index c126f5565201..d063a2765fa8 100644 --- a/azure-mgmt-trafficmanager/setup.py +++ b/azure-mgmt-trafficmanager/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-trafficmanager" @@ -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'], + } ) diff --git a/azure-mgmt-web/MANIFEST.in b/azure-mgmt-web/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-web/MANIFEST.in +++ b/azure-mgmt-web/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-web/azure/__init__.py b/azure-mgmt-web/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-web/azure/__init__.py +++ b/azure-mgmt-web/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-web/azure/mgmt/__init__.py b/azure-mgmt-web/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-web/azure/mgmt/__init__.py +++ b/azure-mgmt-web/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-web/azure_bdist_wheel.py b/azure-mgmt-web/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-web/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-web/setup.cfg b/azure-mgmt-web/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-web/setup.cfg +++ b/azure-mgmt-web/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-web/setup.py b/azure-mgmt-web/setup.py index 03617fe25f5b..66576ec32411 100644 --- a/azure-mgmt-web/setup.py +++ b/azure-mgmt-web/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-web" @@ -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'], + } ) diff --git a/azure-mgmt/sdk_packaging.toml b/azure-mgmt/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/azure-mgmt/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/azure-nspkg/MANIFEST.in b/azure-nspkg/MANIFEST.in new file mode 100644 index 000000000000..bb37a2723dae --- /dev/null +++ b/azure-nspkg/MANIFEST.in @@ -0,0 +1 @@ +include *.rst diff --git a/azure-nspkg/README.rst b/azure-nspkg/README.rst index 0600e296bfdf..7dfb7c304ce0 100644 --- a/azure-nspkg/README.rst +++ b/azure-nspkg/README.rst @@ -5,6 +5,9 @@ This is the Microsoft Azure namespace package. This package is not intended to be installed directly by the end user. +Since version 3.0, this is Python 2 package only, Python 3.x SDKs will use `PEP420 ` as namespace package strategy. +This package will use `python_requires` to enforce Python 2 installation. This implies that you might see this package on Python 3 environment if you have pip < 9.0 or setuptools < 24.2.0. + It provides the necessary files for other packages to extend the azure namespace. If you are looking to install the Azure client libraries, see the diff --git a/azure-nspkg/azure/__init__.py b/azure-nspkg/azure/__init__.py index 5f282702bb03..0260537a02bb 100644 --- a/azure-nspkg/azure/__init__.py +++ b/azure-nspkg/azure/__init__.py @@ -1 +1 @@ - \ No newline at end of file +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-nspkg/sdk_packaging.toml b/azure-nspkg/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/azure-nspkg/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/azure-nspkg/setup.py b/azure-nspkg/setup.py index 67337a82f326..3914cc06c2d7 100644 --- a/azure-nspkg/setup.py +++ b/azure-nspkg/setup.py @@ -25,25 +25,21 @@ setup( name='azure-nspkg', - version='2.0.0', + version='3.0.0', description='Microsoft Azure Namespace Package [Internal]', long_description=open('README.rst', 'r').read(), license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], + python_requires='<3', zip_safe=False, packages=[ 'azure', diff --git a/azure-sdk-tools/packaging_tools/__init__.py b/azure-sdk-tools/packaging_tools/__init__.py index 9b5b2f01a791..d8ac6cfb6c12 100644 --- a/azure-sdk-tools/packaging_tools/__init__.py +++ b/azure-sdk-tools/packaging_tools/__init__.py @@ -1,3 +1,4 @@ +from contextlib import suppress import logging import os from pathlib import Path @@ -23,10 +24,20 @@ def build_config(config : Dict[str, Any]) -> Dict[str, str]: result["classifier"] = "Development Status :: 4 - Beta" # Manage the nspkg package_name = result["package_name"] - result["package_nspkg"] = package_name[:package_name.rindex('-')]+"-nspkg" + result["package_nspkg"] = result.pop( + "package_nspkg", + package_name[:package_name.rindex('-')]+"-nspkg" + ) # ARM? result['is_arm'] = result.pop("is_arm", True) + # Pre-compute some Jinja variable that are complicated to do inside the templates + package_parts = result["package_nspkg"][:-len('-nspkg')].split('-') + result['nspkg_names'] = [ + ".".join(package_parts[:i+1]) + for i in range(len(package_parts)) + ] + # Return result return result @@ -86,15 +97,13 @@ def build_packaging_by_package_name(package_name: str, output_folder: str, build # __init__.py is a weird one if template_name == "__init__.py": - split_package_name = package_name.split("-") + split_package_name = package_name.split("-")[:-1] for i in range(len(split_package_name)): init_path = Path(output_folder).joinpath( package_name, *split_package_name[:i+1], template_name ) - if init_path.exists(): - break with open(init_path, "w") as fd: fd.write(result) @@ -102,5 +111,9 @@ def build_packaging_by_package_name(package_name: str, output_folder: str, build with open(future_filepath, "w") as fd: fd.write(result) + # azure_bdist_wheel had been removed, but need to delete it manually + with suppress(FileNotFoundError): + (Path(output_folder) / package_name / "azure_bdist_wheel.py").unlink() + _LOGGER.info("Template done %s", package_name) \ No newline at end of file diff --git a/azure-sdk-tools/packaging_tools/conf.py b/azure-sdk-tools/packaging_tools/conf.py index 783de37c1f51..2059ccfdddac 100644 --- a/azure-sdk-tools/packaging_tools/conf.py +++ b/azure-sdk-tools/packaging_tools/conf.py @@ -12,6 +12,7 @@ # Default conf _CONFIG = { "package_name": "packagename", + "package_nspkg": "packagenspkg", "package_pprint_name": "MyService Management", "package_doc_id": "", "is_stable": False, @@ -35,6 +36,7 @@ def build_default_conf(folder: Path, package_name: str) -> None: _LOGGER.info("Build default conf for %s", package_name) conf = {_SECTION: _CONFIG.copy()} conf[_SECTION]["package_name"] = package_name + conf[_SECTION]["package_nspkg"] = package_name[:package_name.rindex('-')]+"-nspkg" with open(conf_path, "w") as fd: toml.dump(conf, fd) diff --git a/azure-sdk-tools/packaging_tools/templates/MANIFEST.in b/azure-sdk-tools/packaging_tools/templates/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-sdk-tools/packaging_tools/templates/MANIFEST.in +++ b/azure-sdk-tools/packaging_tools/templates/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-sdk-tools/packaging_tools/templates/__init__.py b/azure-sdk-tools/packaging_tools/templates/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-sdk-tools/packaging_tools/templates/__init__.py +++ b/azure-sdk-tools/packaging_tools/templates/__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-sdk-tools/packaging_tools/templates/azure_bdist_wheel.py b/azure-sdk-tools/packaging_tools/templates/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-sdk-tools/packaging_tools/templates/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-sdk-tools/packaging_tools/templates/setup.cfg b/azure-sdk-tools/packaging_tools/templates/setup.cfg index 57c8683c0b05..3c6e79cf31da 100644 --- a/azure-sdk-tools/packaging_tools/templates/setup.cfg +++ b/azure-sdk-tools/packaging_tools/templates/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package={{package_nspkg}} \ No newline at end of file diff --git a/azure-sdk-tools/packaging_tools/templates/setup.py b/azure-sdk-tools/packaging_tools/templates/setup.py index eeb4bd3d35ce..89be50d5dfb9 100644 --- a/azure-sdk-tools/packaging_tools/templates/setup.py +++ b/azure-sdk-tools/packaging_tools/templates/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 = "{{package_name}}" @@ -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 + {%- for nspkg_name in nspkg_names %} + '{{ nspkg_name }}', + {%- endfor %} + ]), 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'": ['{{package_nspkg}}'], + } ) diff --git a/azure-servicebus/azure/__init__.py b/azure-servicebus/azure/__init__.py index 849489fca33c..56200e1b95c5 100644 --- a/azure-servicebus/azure/__init__.py +++ b/azure-servicebus/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-servicefabric/MANIFEST.in b/azure-servicefabric/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-servicefabric/MANIFEST.in +++ b/azure-servicefabric/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-servicefabric/README.rst b/azure-servicefabric/README.rst index cdb9d23af0aa..4fffdefcfcc5 100644 --- a/azure-servicefabric/README.rst +++ b/azure-servicefabric/README.rst @@ -3,13 +3,7 @@ Microsoft Azure SDK for Python This is the Microsoft Azure Service Fabric 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, 3.6, and 3.7. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. For a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -37,7 +31,7 @@ Usage ===== For code examples, see `Service Fabric -`__ +`__ on docs.microsoft.com. diff --git a/azure-servicefabric/azure/__init__.py b/azure-servicefabric/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-servicefabric/azure/__init__.py +++ b/azure-servicefabric/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-servicefabric/azure_bdist_wheel.py b/azure-servicefabric/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-servicefabric/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-servicefabric/sdk_packaging.toml b/azure-servicefabric/sdk_packaging.toml new file mode 100644 index 000000000000..c1ff0e94edcf --- /dev/null +++ b/azure-servicefabric/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +package_name = "azure-servicefabric" +package_nspkg = "azure-nspkg" +package_pprint_name = "Service Fabric" +package_doc_id = "servicefabric" +is_stable = true +is_arm = false diff --git a/azure-servicefabric/setup.cfg b/azure-servicefabric/setup.cfg index 669e94e63df3..3c6e79cf31da 100644 --- a/azure-servicefabric/setup.cfg +++ b/azure-servicefabric/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-nspkg \ No newline at end of file diff --git a/azure-servicefabric/setup.py b/azure-servicefabric/setup.py index 97cd51c0089d..ae9d865d3229 100644 --- a/azure-servicefabric/setup.py +++ b/azure-servicefabric/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-servicefabric" @@ -64,7 +58,7 @@ author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', @@ -76,10 +70,16 @@ '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', + ]), install_requires=[ - 'msrest>=0.4.26,<2.0.0', + 'msrest>=0.5.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-nspkg'], + } ) diff --git a/azure-servicemanagement-legacy/azure/__init__.py b/azure-servicemanagement-legacy/azure/__init__.py index 849489fca33c..56200e1b95c5 100644 --- a/azure-servicemanagement-legacy/azure/__init__.py +++ b/azure-servicemanagement-legacy/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/sdk_packaging.toml b/azure/sdk_packaging.toml new file mode 100644 index 000000000000..e7687fdae93b --- /dev/null +++ b/azure/sdk_packaging.toml @@ -0,0 +1,2 @@ +[packaging] +auto_update = false \ No newline at end of file diff --git a/scripts/dev_setup.py b/scripts/dev_setup.py index 3bf6b74d720a..df018002b902 100644 --- a/scripts/dev_setup.py +++ b/scripts/dev_setup.py @@ -15,14 +15,15 @@ root_dir = os.path.abspath(os.path.join(os.path.abspath(__file__), '..', '..')) -def pip_command(command): +def pip_command(command, error_ok=False): try: print('Executing: ' + command) check_call([sys.executable, '-m', 'pip'] + command.split(), cwd=root_dir) print() except CalledProcessError as err: print(err, file=sys.stderr) - sys.exit(1) + if not error_ok: + sys.exit(1) packages = [os.path.dirname(p) for p in glob.glob('azure*/setup.py')] @@ -30,13 +31,13 @@ def pip_command(command): nspkg_packages = [p for p in packages if "nspkg" in p] nspkg_packages.sort(key = lambda x: len([c for c in x if c == '-'])) -# Consider "azure-common" as a power nspkg : has to be installed after nspkg -nspkg_packages.append("azure-common") - # Manually push meta-packages at the end, in reverse dependency order meta_packages = ['azure-mgmt', 'azure'] content_packages = [p for p in packages if p not in nspkg_packages+meta_packages] +# Put azure-common in front +content_packages.remove("azure-common") +content_packages.insert(0, "azure-common") print('Running dev setup...') print('Root directory \'{}\'\n'.format(root_dir)) @@ -47,13 +48,18 @@ def pip_command(command): whl_list = ' '.join([os.path.join(privates_dir, f) for f in os.listdir(privates_dir)]) pip_command('install {}'.format(whl_list)) +# install nspkg only on py2, but in wheel mode (not editable mode) +if sys.version_info < (3, ): + for package_name in nspkg_packages: + pip_command('install ./{}/'.format(package_name)) + # install packages -for package_list in [nspkg_packages, content_packages]: - for package_name in package_list: - pip_command('install -e {}'.format(package_name)) - -# Ensure that the site package's azure/__init__.py has the old style namespace -# package declaration by installing the old namespace package -pip_command('install --force-reinstall azure-mgmt-nspkg==1.0.0') -pip_command('install --force-reinstall azure-nspkg==1.0.0') +for package_name in content_packages: + pip_command('install --ignore-requires-python -e {}'.format(package_name)) + +# On Python 3, uninstall azure-nspkg if he got installed +if sys.version_info >= (3, ): + pip_command('uninstall -y azure-nspkg', error_ok=True) + + print('Finished dev setup.')