diff --git a/.gitignore b/.gitignore index 391e2d17..0f4e1e4e 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ azdev.egg-info/ .tox/ *.idea pip-wheel-metadata/* +build/ +dist/ diff --git a/HISTORY.rst b/HISTORY.rst index 44508473..f5055993 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.1.1 +++++++ +* `azdev cli/extension create`: Fix issue where supporting files were not included. Adjust generation logic. + 0.1.0 ++++++ * Update for compatability with azure-cli 2.0.68's new package structure. diff --git a/MANIFEST.in b/MANIFEST.in index bfcbacae..8386ec35 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,5 @@ include LICENSE.txt include HISTORY.rst -include README.md \ No newline at end of file +include README.md +recursive-include azdev/config * +recursive-include azdev/mod_templates * diff --git a/azdev/__init__.py b/azdev/__init__.py index 8a174ec0..cb3251b8 100644 --- a/azdev/__init__.py +++ b/azdev/__init__.py @@ -4,4 +4,4 @@ # license information. # ----------------------------------------------------------------------------- -__VERSION__ = '0.1.0' +__VERSION__ = '0.1.1' diff --git a/azdev/mod_templates/MANIFEST.in b/azdev/mod_templates/MANIFEST.in deleted file mode 100644 index bb37a272..00000000 --- a/azdev/mod_templates/MANIFEST.in +++ /dev/null @@ -1 +0,0 @@ -include *.rst diff --git a/azdev/mod_templates/azext_metadata.json b/azdev/mod_templates/azext_metadata.json index 16cd4d08..865ee74e 100644 --- a/azdev/mod_templates/azext_metadata.json +++ b/azdev/mod_templates/azext_metadata.json @@ -1,5 +1,5 @@ { {% if is_preview %}"azext.isPreview": true,{% endif %} - "azext.minCliCoreVersion": "2.0.66", + "azext.minCliCoreVersion": "2.0.67", "azext.maxCliCoreVersion": "2.1.0" } \ No newline at end of file diff --git a/azdev/mod_templates/azure_bdist_wheel.py b/azdev/mod_templates/azure_bdist_wheel.py deleted file mode 100644 index 867581a2..00000000 --- a/azdev/mod_templates/azure_bdist_wheel.py +++ /dev/null @@ -1,53 +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/azdev/operations/code_gen.py b/azdev/operations/code_gen.py index f3b6c91f..313320a9 100644 --- a/azdev/operations/code_gen.py +++ b/azdev/operations/code_gen.py @@ -262,16 +262,14 @@ def _create_package(prefix, repo_path, is_ext, name='test', display_name=None, d # generate code for root level dest_path = new_package_path - root_files = [ - 'HISTORY.rst', - 'MANIFEST.in', - 'README.rst', - 'setup.cfg', - 'setup.py' - ] - if not is_ext: - root_files.append('azure_bdist_wheel.py') - _generate_files(env, kwargs, root_files, dest_path) + if is_ext: + root_files = [ + 'HISTORY.rst', + 'README.rst', + 'setup.cfg', + 'setup.py' + ] + _generate_files(env, kwargs, root_files, dest_path) dest_path = dest_path if not is_ext else os.path.join(dest_path, ext_folder) module_files = [