File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
eng/tools/azure-sdk-tools/packaging_tools Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,18 @@ def generate_packaging_files(package_name, folder_name):
167167 setup_py .unlink ()
168168
169169 call_build_config (package_name , folder_name )
170+
171+ # load pyproject.toml and replace "azure-core" with "azure-mgmt" (after codegen fix bug, we could remove this logic)
172+ if pyproject_toml .exists ():
173+ with open (pyproject_toml , "rb" ) as f :
174+ pyproject_content = toml .load (f )
175+ if pyproject_content .get ("project" ):
176+ for idx in range (len (pyproject_content ["project" ].get ("dependencies" , []))):
177+ if pyproject_content ["project" ]["dependencies" ][idx ].startswith ("azure-core" ):
178+ pyproject_content ["project" ]["dependencies" ][idx ] = "azure-mgmt-core>=1.5.0"
179+
180+ with open (pyproject_toml , "wb" ) as f :
181+ tomlw .dump (pyproject_content , f )
170182 else :
171183 if not pyproject_toml .exists ():
172184 with open (pyproject_toml , "w" ) as file_out :
You can’t perform that action at this time.
0 commit comments