Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .chronus/changes/python-fix-2024-04-16-2025-3-16-12-37-31.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: fix
packages:
- "@typespec/http-client-python"
---

Fix for setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
from .base_serializer import BaseSerializer

VERSION_MAP = {
"msrest": "0.7.1",
"isodate": "0.6.1",
"azure-mgmt-core": "1.3.2",
"azure-core": "1.30.0",
"typing-extensions": "4.6.0",
"corehttp": "1.0.0b6",
"msrest": "0.7.1",
"isodate": "0.6.1",
"azure-mgmt-core": "1.3.2",
"azure-core": "1.30.0",
"typing-extensions": "4.6.0",
"corehttp": "1.0.0b6",
}

MIN_PYTHON_VERSION = "3.9"
Expand All @@ -34,7 +34,11 @@ class GeneralSerializer(BaseSerializer):

def serialize_setup_file(self) -> str:
template = self.env.get_template("packaging_templates/setup.py.jinja2")
params = {}
params = {
"VERSION_MAP": VERSION_MAP,
"MIN_PYTHON_VERSION": MIN_PYTHON_VERSION,
"MAX_PYTHON_VERSION": MAX_PYTHON_VERSION,
}
params.update(self.code_model.options)
return template.render(code_model=self.code_model, **params)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ setup(
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
{% for version in range(min_version, max_version) %}
{% for version in range(min_version, max_version + 1) %}
"Programming Language :: Python :: 3.{{ version }}",
{% endfor %}
"License :: OSI Approved :: MIT License",
Expand Down
Loading