Skip to content

Commit

Permalink
Update python versions again. Change script to non-inclusive max.
Browse files Browse the repository at this point in the history
  • Loading branch information
corey committed Dec 10, 2023
1 parent 35bcaab commit 323344e
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion python/origen/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ generate-setup-file = false
origen = 'origen.__bin__:run_origen'

[tool.poetry.dependencies]
python = ">=3.7.0,<=3.12.*"
python = ">=3.7.0,<3.13"
origen_metal = "= 0.4.0"
termcolor = ">= 1.1.0"
colorama = "^0.4"
Expand Down
2 changes: 1 addition & 1 deletion python/origen_metal/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include = [
]

[tool.poetry.dependencies]
python = ">=3.7.0,<=3.12.*"
python = ">=3.7.0,<3.13"
pyreadline3 = { version="^3.3", platform="win32" }
termcolor = ">= 1.1.0"
colorama = ">= 0.4.4" # Note: colorama is usually installed on the system already, but it isn't actually required (e.g. WSL won't have this by default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub (crate) fn update_supported_python_cmd<'a>() -> SubCmd<'a> {
.takes_value(true)
.required(true)
)
.arg(Arg::new("max_version")
.arg(Arg::new("non_inclusive_max_version")
.takes_value(true)
.required(true)
)
Expand All @@ -24,10 +24,16 @@ pub (crate) fn update_supported_python_cmd<'a>() -> SubCmd<'a> {

pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> {
let min = invocation.get_one::<String>("min_version").unwrap();
let max = invocation.get_one::<String>("max_version").unwrap();
let version_str = format!("python = \">={min},<={max}\"");
let max = invocation.get_one::<String>("non_inclusive_max_version").unwrap();
let version_str = format!("python = \">={min},<{max}\"");
let mv_min = min.split('.').collect::<Vec<&str>>()[1].parse::<u8>()?;
let mv_max = max.split('.').collect::<Vec<&str>>()[1].parse::<u8>()?;
let max_parts = max.split('.').collect::<Vec<&str>>();
let mv_max;
if max_parts.len() == 2 {
mv_max = max_parts[1].parse::<u8>()? - 1;
} else {
mv_max = max_parts[1].parse::<u8>()?;
}

// Update pyprojects
// origen/metal pyproject
Expand Down
2 changes: 1 addition & 1 deletion test_apps/no_workspace/templates/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Origen Installation Test"
authors = ["Origen-SDK"]

[tool.poetry.dependencies]
python = ">=3.7.0,<=3.12.*"
python = ">=3.7.0,<3.13"
{% if local_origen %}
origen = { path = "{{ o2_root.joinpath("python/origen").as_posix() }}", develop = true }
origen_metal = { path = "{{ o2_root.joinpath("python/origen_metal").as_posix() }}", develop = true }
Expand Down
2 changes: 1 addition & 1 deletion test_apps/no_workspace/user_install/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Origen Installation Test"
authors = ["Origen-SDK"]

[tool.poetry.dependencies]
python = ">=3.7.0,<=3.12.*"
python = ">=3.7.0,<3.13"

origen = { path = "../../../python/origen", develop = true }
origen_metal = { path = "../../../python/origen_metal", develop = true }
Expand Down
2 changes: 1 addition & 1 deletion test_apps/pl_ext_cmds/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Plugin Extending Cmds"
authors = ["Origen-SDK"]

[tool.poetry.dependencies]
python = ">=3.7.0,<=3.12.*"
python = ">=3.7.0,<3.13"
origen = { path = "../../python/origen", develop = true }
origen_metal = ">=0.0.0"

Expand Down
2 changes: 1 addition & 1 deletion test_apps/python_app/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = ""
authors = ["Origen-SDK"]

[tool.poetry.dependencies]
python = ">=3.7.0,<=3.12.*"
python = ">=3.7.0,<3.13"
origen = "= 2.0.0.dev5"
python_plugin = { path = "../python_plugin", develop = true }
test_apps_shared_test_helpers = { path = "../test_apps_shared_test_helpers", develop = true }
Expand Down
2 changes: 1 addition & 1 deletion test_apps/python_no_app/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "O2 workspace without an application"
authors = ["Origen-SDK"]

[tool.poetry.dependencies]
python = ">=3.7.0,<=3.12.*"
python = ">=3.7.0,<3.13"
origen = { path = "../../python/origen", develop = true }
origen_metal = { path = "../../python/origen_metal", develop = true }
python_plugin = { path = "../python_plugin", develop = true }
Expand Down
2 changes: 1 addition & 1 deletion test_apps/python_plugin/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Example Origen Plugin"
authors = ["Origen-SDK"]

[tool.poetry.dependencies]
python = ">=3.7.0,<=3.12.*"
python = ">=3.7.0,<3.13"
origen = { path = "../../python/origen", develop = true }

[tool.poetry.dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion test_apps/python_plugin_no_cmds/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Example Origen Plugin Without Any Commands"
authors = ["Origen-SDK"]

[tool.poetry.dependencies]
python = ">=3.7.0,<=3.12.*"
python = ">=3.7.0,<3.13"
origen = { path = "../../python/origen", develop = true }
origen_metal = { path = "../../python/origen_metal", develop = true }

Expand Down
2 changes: 1 addition & 1 deletion test_apps/python_plugin_the_second/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Another Example Origen Plugin"
authors = ["Origen-SDK"]

[tool.poetry.dependencies]
python = ">=3.7.0,<=3.12.*"
python = ">=3.7.0,<3.13"
origen = { path = "../../python/origen", develop = true }
origen_metal = { path = "../../python/origen_metal", develop = true }

Expand Down
2 changes: 1 addition & 1 deletion test_apps/test_apps_shared_test_helpers/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Shared Regression Test Helpers for Test Apps"
authors = ["Origen-SDK"]

[tool.poetry.dependencies]
python = ">=3.7.0,<=3.12.*"
python = ">=3.7.0,<3.13"
pytest = ">=7.2.1"
origen = { path = "../../python/origen", develop = true }
pl_ext_cmds = { path = "../pl_ext_cmds", develop = true }
Expand Down

0 comments on commit 323344e

Please sign in to comment.