From 8cb98eeb74fc5c95726d6c1807e851d1163a46fe Mon Sep 17 00:00:00 2001 From: "Hanzhang Zeng (Roger)" Date: Fri, 4 Jun 2021 12:18:18 -0700 Subject: [PATCH] Fix namespace packaging --- azure_functions_worker/utils/dependency.py | 3 +-- pack/templates/nix_env_gen.yml | 6 ------ pack/templates/win_env_gen.yml | 6 ------ pack/utils/__init__.py | 4 ---- 4 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 pack/utils/__init__.py diff --git a/azure_functions_worker/utils/dependency.py b/azure_functions_worker/utils/dependency.py index 04a26300..4cf2ebd4 100644 --- a/azure_functions_worker/utils/dependency.py +++ b/azure_functions_worker/utils/dependency.py @@ -1,4 +1,3 @@ -from azure_functions_worker.utils.common import is_true_like from typing import List, Optional from types import ModuleType import importlib @@ -15,7 +14,7 @@ from ..constants import ( PYTHON_ISOLATE_WORKER_DEPENDENCIES_DEFAULT, PYTHON_ISOLATE_WORKER_DEPENDENCIES_DEFAULT_39 ) -from ..utils.common import is_python_version +from ..utils.common import is_python_version, is_true_like from ..utils.wrappers import enable_feature_by diff --git a/pack/templates/nix_env_gen.yml b/pack/templates/nix_env_gen.yml index 45d72a8c..80597e02 100644 --- a/pack/templates/nix_env_gen.yml +++ b/pack/templates/nix_env_gen.yml @@ -12,12 +12,6 @@ steps: inputs: disableAutoCwd: true scriptPath: 'pack/scripts/nix_deps.sh' -- task: CopyFiles@2 - inputs: - contents: | - pack/utils/__init__.py - targetFolder: '$(Build.ArtifactStagingDirectory)/azure' - flattenFolders: true - task: CopyFiles@2 inputs: contents: | diff --git a/pack/templates/win_env_gen.yml b/pack/templates/win_env_gen.yml index 4f51bbe5..b0f838a7 100644 --- a/pack/templates/win_env_gen.yml +++ b/pack/templates/win_env_gen.yml @@ -12,12 +12,6 @@ steps: - task: PowerShell@2 inputs: filePath: 'pack\scripts\win_deps.ps1' -- task: CopyFiles@2 - inputs: - contents: | - pack\utils\__init__.py - targetFolder: '$(Build.ArtifactStagingDirectory)\azure' - flattenFolders: true - task: CopyFiles@2 inputs: contents: | diff --git a/pack/utils/__init__.py b/pack/utils/__init__.py deleted file mode 100644 index 71c83533..00000000 --- a/pack/utils/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# Needed to make azure a namespace for package discovery -from pkgutil import extend_path -import typing -__path__: typing.Iterable[str] = extend_path(__path__, __name__)