Skip to content

Commit

Permalink
update template of setup.py to pass CI (Azure#27109)
Browse files Browse the repository at this point in the history
* Update setup.py

* Update main.py

* Update main.py
  • Loading branch information
msyyc authored Oct 27, 2022
1 parent 02a90ed commit 57c8a4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/auto_release/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def check_changelog_file(self):
@staticmethod
def get_need_dependency() -> List[str]:
template_path = Path('tools/azure-sdk-tools/packaging_tools/templates/setup.py')
items = ["msrest>", "azure-mgmt-core", "typing_extensions"]
items = ["msrest>", "azure-mgmt-core", "typing-extensions"]
with open(template_path, 'r') as fr:
content = fr.readlines()
dependencies = []
Expand All @@ -408,7 +408,7 @@ def insert_line_num(content: List[str]) -> int:
def check_ci_file_proc(self, dependency: str):
def edit_ci_file(content: List[str]):
new_line = f'#override azure-mgmt-{self.package_name} {dependency}'
dependency_name = re.compile("[a-zA-Z-_]*").findall(dependency)[0]
dependency_name = re.compile("[a-zA-Z-]*").findall(dependency)[0]
for i in range(len(content)):
if new_line in content[i]:
return
Expand Down
2 changes: 1 addition & 1 deletion tools/azure-sdk-tools/packaging_tools/templates/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
{%- endif %}
{%- if need_azuremgmtcore %}
"azure-mgmt-core>=1.3.2,<2.0.0",
"typing_extensions>=4.3.0; python_version<'3.8.0'",
"typing-extensions>=4.3.0; python_version<'3.8.0'",
{%- endif %}
],
python_requires=">=3.7"
Expand Down

0 comments on commit 57c8a4c

Please sign in to comment.