goome-cli 0.5.3__tar.gz → 0.5.4__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: goome-cli
3
- Version: 0.5.3
3
+ Version: 0.5.4
4
4
  Summary: goome new makes a new goome project from a template, goome build --web puts an app in the browser. One file, no dependencies.
5
5
  Project-URL: Homepage, https://github.com/goome-ui/goome-cli
6
6
  Project-URL: Documentation, https://goome-ui.github.io/docs/
@@ -87,7 +87,7 @@ python goome.py new my-app --lang c
87
87
 
88
88
  <p align="center">
89
89
  On windows thats <code>irm https://raw.githubusercontent.com/goome-ui/goome-cli/main/goome.py -OutFile goome.py</code> in powershell, then <code>python goome.py new ...</code>.<br> <br>
90
- For a certain version use <code>pip install goome-cli==0.5.3</code>, or put the tag after an <code>@</code> to get it from git, like <code>pip install git+https://github.com/goome-ui/goome-cli@v0.5.3</code>.
90
+ For a certain version use <code>pip install goome-cli==0.5.4</code>, or put the tag after an <code>@</code> to get it from git, like <code>pip install git+https://github.com/goome-ui/goome-cli@v0.5.4</code>.
91
91
  </p>
92
92
  </details>
93
93
 
@@ -61,7 +61,7 @@ python goome.py new my-app --lang c
61
61
 
62
62
  <p align="center">
63
63
  On windows thats <code>irm https://raw.githubusercontent.com/goome-ui/goome-cli/main/goome.py -OutFile goome.py</code> in powershell, then <code>python goome.py new ...</code>.<br> <br>
64
- For a certain version use <code>pip install goome-cli==0.5.3</code>, or put the tag after an <code>@</code> to get it from git, like <code>pip install git+https://github.com/goome-ui/goome-cli@v0.5.3</code>.
64
+ For a certain version use <code>pip install goome-cli==0.5.4</code>, or put the tag after an <code>@</code> to get it from git, like <code>pip install git+https://github.com/goome-ui/goome-cli@v0.5.4</code>.
65
65
  </p>
66
66
  </details>
67
67
 
@@ -15,7 +15,7 @@ import time
15
15
  import urllib.error
16
16
  import urllib.request
17
17
 
18
- __version__ = "0.5.3"
18
+ __version__ = "0.5.4"
19
19
 
20
20
  ORG = "goome-ui"
21
21
  PYPI_URL = "https://pypi.org/pypi/goome-cli/json"
@@ -58,8 +58,17 @@ def names(name):
58
58
  return dict(zip(TOKENS, (title, "-".join(lower), "_".join(lower), pascal, flat)))
59
59
 
60
60
 
61
- def next_steps(lang, folder, kebab):
61
+ def rockspec_in(root):
62
+ if root and os.path.isdir(root):
63
+ found = sorted(f for f in os.listdir(root) if f.endswith(".rockspec"))
64
+ if found:
65
+ return found[-1]
66
+ return None
67
+
68
+
69
+ def next_steps(lang, folder, kebab, root=None):
62
70
  cd = "cd " + (folder if " " not in folder else '"%s"' % folder)
71
+ spec = rockspec_in(root)
63
72
  steps = {
64
73
  "c": [cd, "cc -O2 -o %s main.c goome.c" % kebab, "./" + kebab, "",
65
74
  "or with cmake (windows too):", "cmake -S . -B build", "cmake --build build"],
@@ -72,7 +81,7 @@ def next_steps(lang, folder, kebab):
72
81
  "node": [cd, "npm install", "node main.js"],
73
82
  "go": [cd, "go run ."],
74
83
  "zig": [cd, "zig build run"],
75
- "lua": [cd, "luarocks install --local goome-0.5.0-1.rockspec",
84
+ "lua": [cd, "luarocks install --local " + spec if spec else "luarocks make --local",
76
85
  "eval \"$(luarocks path)\" (on windows run luarocks path and do what it prints)", "lua main.lua"],
77
86
  }
78
87
  return steps[lang]
@@ -185,7 +194,7 @@ def write_readme(dest, lang, template, table):
185
194
  title = table["My Goome App"]
186
195
  lines = ["# " + title, "",
187
196
  "Made with [goome](https://goome-ui.github.io/docs/), from the %s %s template." % (lang, template), "",
188
- "```sh"] + [s for s in next_steps(lang, ".", table["my-goome-app"])[1:] if s and not s.endswith(":")] + ["```", ""]
197
+ "```sh"] + [s for s in next_steps(lang, ".", table["my-goome-app"], dest)[1:] if s and not s.endswith(":")] + ["```", ""]
189
198
  with open(os.path.join(dest, "README.md"), "w") as f:
190
199
  f.write("\n".join(lines))
191
200
 
@@ -223,7 +232,7 @@ def cmd_new(a):
223
232
  print("made %s (%s, %s template, from %s)" % (folder, a.lang, a.template, got))
224
233
  print("")
225
234
  print("next:")
226
- for s in next_steps(a.lang, folder, table["my-goome-app"]):
235
+ for s in next_steps(a.lang, folder, table["my-goome-app"], dest):
227
236
  print(" " + s if s else "")
228
237
  return 0
229
238
 
File without changes
File without changes
File without changes