pixi-ros 0.2.0__py3-none-any.whl → 0.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pixi_ros/cli.py CHANGED
@@ -3,6 +3,7 @@
3
3
  from typing import Annotated
4
4
 
5
5
  import typer
6
+ from rattler import Platform
6
7
 
7
8
  from pixi_ros.init import init_workspace
8
9
  from pixi_ros.mappings import get_platforms, get_ros_distros
@@ -32,7 +33,8 @@ def init(
32
33
  typer.Option(
33
34
  "--platform",
34
35
  "-p",
35
- help="Target platforms (e.g., linux-64, osx-arm64, win-64). Can be specified multiple times.",
36
+ help="Target platforms (e.g., linux-64, osx-arm64, win-64)."
37
+ " Can be specified multiple times.",
36
38
  ),
37
39
  ] = None,
38
40
  ):
@@ -76,6 +78,7 @@ def init(
76
78
  # If platforms not provided, prompt user to select
77
79
  if platforms is None or len(platforms) == 0:
78
80
  available_platforms = get_platforms()
81
+ current_platform = Platform.current()
79
82
  typer.echo("\nAvailable target platforms:")
80
83
  for i, p in enumerate(available_platforms, 1):
81
84
  typer.echo(f" {i}. {p}")
@@ -84,6 +87,7 @@ def init(
84
87
  selection = typer.prompt(
85
88
  "\nSelect platforms (enter numbers or names, comma or space separated)",
86
89
  type=str,
90
+ default=str(current_platform),
87
91
  )
88
92
 
89
93
  # Parse selection (can be numbers or names, comma or space separated)
@@ -91,36 +95,45 @@ def init(
91
95
  # Split by comma or space
92
96
  selections = selection.replace(",", " ").split()
93
97
 
94
- for sel in selections:
95
- sel = sel.strip()
96
- if not sel:
97
- continue
98
-
99
- try:
100
- # Try parsing as number
101
- sel_num = int(sel)
102
- if 1 <= sel_num <= len(available_platforms):
103
- platforms.append(available_platforms[sel_num - 1])
104
- else:
105
- typer.echo(
106
- f"Error: Invalid selection {sel_num}. Please choose 1-{len(available_platforms)}",
107
- err=True,
108
- )
109
- raise typer.Exit(code=1)
110
- except ValueError:
111
- # User entered a name instead of number
112
- if sel in available_platforms:
113
- platforms.append(sel)
114
- else:
115
- typer.echo(
116
- f"Error: '{sel}' is not a valid platform", err=True
117
- )
118
- typer.echo(f"Available: {', '.join(available_platforms)}", err=True)
119
- raise typer.Exit(code=1)
120
-
121
- if not platforms:
122
- typer.echo("Error: No platforms selected", err=True)
123
- raise typer.Exit(code=1)
98
+ # If nothing is selected, default to current platform
99
+ if not selections:
100
+ typer.echo(
101
+ f"No platforms selected, "
102
+ f"defaulting to current platform: {current_platform}."
103
+ )
104
+ platforms.append(str(current_platform))
105
+ else:
106
+ for sel in selections:
107
+ sel = sel.strip()
108
+ if not sel:
109
+ continue
110
+
111
+ try:
112
+ # Try parsing as number
113
+ sel_num = int(sel)
114
+ if 1 <= sel_num <= len(available_platforms):
115
+ platforms.append(available_platforms[sel_num - 1])
116
+ else:
117
+ typer.echo(
118
+ f"Error: Invalid selection {sel_num}."
119
+ + f"Please choose 1-{len(available_platforms)}",
120
+ err=True,
121
+ )
122
+ raise typer.Exit(code=1)
123
+ except ValueError as err:
124
+ # User entered a name instead of number
125
+ if sel in available_platforms:
126
+ platforms.append(sel)
127
+ else:
128
+ typer.echo(f"Error: '{sel}' is not a valid platform", err=True)
129
+ typer.echo(
130
+ f"Available: {', '.join(available_platforms)}", err=True
131
+ )
132
+ raise typer.Exit(code=1) from err
133
+
134
+ if not platforms:
135
+ typer.echo("Error: No platforms selected", err=True)
136
+ raise typer.Exit(code=1)
124
137
 
125
138
  init_workspace(distro, platforms=platforms)
126
139
 
@@ -64,6 +64,8 @@ cppunit:
64
64
  win64: []
65
65
  cppzmq:
66
66
  pixi: [cppzmq]
67
+ crypto++:
68
+ pixi: [cryptopp]
67
69
  curl:
68
70
  pixi: [libcurl]
69
71
  cython:
@@ -792,6 +794,8 @@ python3-importlib-resources:
792
794
  pixi: [importlib_resources]
793
795
  python3-jinja2:
794
796
  pixi: [jinja2]
797
+ python3-jsonschema:
798
+ pixi: [jsonschema]
795
799
  python3-kitchen:
796
800
  pixi: [kitchen]
797
801
  python3-lark-parser:
@@ -912,6 +916,8 @@ python3-texttable:
912
916
  pixi: [texttable]
913
917
  python3-tk:
914
918
  pixi: [tk]
919
+ python3-torch:
920
+ pixi: [pytorch]
915
921
  python3-tornado:
916
922
  pixi: [tornado]
917
923
  python3-transforms3d: