pixi.py
Go to the documentation of this file.
1 #! /usr/bin/env python3
2 import sys
3 
4 try:
5  import tomlkit
6 except ImportError as e:
7  print(
8  "tomlkit not found. Please make sure to install the package.\n"
9  "If it is already installed, make sure that it is included in the search path."
10  )
11  raise e
12 
13 
14 def update_pixi_version(version):
15  with open("pixi.toml") as f:
16  doc = tomlkit.load(f)
17  possible_keys = {"project", "workspace"}
18  keys = possible_keys.intersection(set(doc.keys()))
19  keys = [key for key in keys if "version" in doc[key]]
20  if len(keys) == 0:
21  print("pixi.toml doesn't contain [project.version] or [workpace.version] keys")
22  return
23  for key in keys:
24  doc[key]["version"] = version
25  with open("pixi.toml", "w") as f:
26  tomlkit.dump(doc, f)
27 
28 
29 if __name__ == "__main__":
30  if len(sys.argv) == 2:
31  update_pixi_version(sys.argv[1])
32  else:
33  print("you must provide the version as argument.")
34  exit(1)
set
void set(bool ownStorage, Vec3f *points_, unsigned int num_points_)
append-urdf-model-with-another-model.open
open
Definition: append-urdf-model-with-another-model.py:78
pixi::update_pixi_version
def update_pixi_version(version)


pinocchio
Author(s):
autogenerated on Wed May 28 2025 02:41:21