Skip to content

Commit

Permalink
Add --install argument for gen_all.py
Browse files Browse the repository at this point in the history
  • Loading branch information
shBLOCK committed Apr 9, 2024
1 parent 408bf9a commit b320e75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
run: python gen_all.py
working-directory: codegen

- name: Copy outputs to src
run: copy "codegen\output\*" "src\gdmath"
# - name: Copy outputs to src
# run: copy "codegen\output\*" "src\gdmath"

# - name: Validate
# run: pip install .
Expand Down
7 changes: 3 additions & 4 deletions codegen/gen_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
# exit()
codegen.step_gen_stub("_gdmath.pyx", "_gdmath.pyi")

import os
if os.getenv("CI") != "true":
import sys
if "--install" in sys.argv:
print("#"*15 + " Install " + "#"*15)
codegen.step_move_to_dest("../src/gdmath/", "_gdmath", ".pyx")
codegen.step_move_to_dest("../src/gdmath/", "_gdmath", ".pyi")

Expand All @@ -18,5 +19,3 @@
subprocess.call(f"{sys.executable} -m pip uninstall gdmath -y", stdout=sys.stdout)
print("#"*15 + "pip install -v -v -v .." + "#"*15)
subprocess.call(f"{sys.executable} -m pip install -v -v -v ..", stdout=sys.stdout, stderr=sys.stdout)
else:
print("Running in CI platform!")

0 comments on commit b320e75

Please sign in to comment.