pixi-ros 0.3.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 +42 -29
- pixi_ros/data/conda-forge.yaml +4 -0
- pixi_ros/init.py +324 -198
- pixi_ros/mappings.py +39 -30
- pixi_ros/validator.py +245 -0
- {pixi_ros-0.3.0.dist-info → pixi_ros-0.4.0.dist-info}/METADATA +83 -26
- pixi_ros-0.4.0.dist-info/RECORD +17 -0
- pixi_ros-0.3.0.dist-info/RECORD +0 -16
- {pixi_ros-0.3.0.dist-info → pixi_ros-0.4.0.dist-info}/WHEEL +0 -0
- {pixi_ros-0.3.0.dist-info → pixi_ros-0.4.0.dist-info}/entry_points.txt +0 -0
- {pixi_ros-0.3.0.dist-info → pixi_ros-0.4.0.dist-info}/licenses/LICENSE +0 -0
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
|
|
@@ -77,6 +78,7 @@ def init(
|
|
|
77
78
|
# If platforms not provided, prompt user to select
|
|
78
79
|
if platforms is None or len(platforms) == 0:
|
|
79
80
|
available_platforms = get_platforms()
|
|
81
|
+
current_platform = Platform.current()
|
|
80
82
|
typer.echo("\nAvailable target platforms:")
|
|
81
83
|
for i, p in enumerate(available_platforms, 1):
|
|
82
84
|
typer.echo(f" {i}. {p}")
|
|
@@ -85,6 +87,7 @@ def init(
|
|
|
85
87
|
selection = typer.prompt(
|
|
86
88
|
"\nSelect platforms (enter numbers or names, comma or space separated)",
|
|
87
89
|
type=str,
|
|
90
|
+
default=str(current_platform),
|
|
88
91
|
)
|
|
89
92
|
|
|
90
93
|
# Parse selection (can be numbers or names, comma or space separated)
|
|
@@ -92,35 +95,45 @@ def init(
|
|
|
92
95
|
# Split by comma or space
|
|
93
96
|
selections = selection.replace(",", " ").split()
|
|
94
97
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
|
pixi_ros/data/conda-forge.yaml
CHANGED
|
@@ -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:
|
|
@@ -914,6 +916,8 @@ python3-texttable:
|
|
|
914
916
|
pixi: [texttable]
|
|
915
917
|
python3-tk:
|
|
916
918
|
pixi: [tk]
|
|
919
|
+
python3-torch:
|
|
920
|
+
pixi: [pytorch]
|
|
917
921
|
python3-tornado:
|
|
918
922
|
pixi: [tornado]
|
|
919
923
|
python3-transforms3d:
|