Skip to content

Commit

Permalink
Merge pull request #41 from takkii/develop
Browse files Browse the repository at this point in the history
Update.
  • Loading branch information
takkii authored Mar 3, 2024
2 parents 31e342c + 11e891a commit c6a3ac0
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env python
# vim: filetype=python

# pake is python makefile.
with open('./pake.py') as pk:
pkcmd = pk.read()
exec(pkcmd)
45 changes: 45 additions & 0 deletions pake.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import gc
import sys

from typing import Optional

try:
# It doesn't support python4 yet.
py_mj: Optional[int] = sys.version_info[0]
py_mi: Optional[int] = sys.version_info[1]

# 3.5 and higher, 4.x or less,python version is required.
if (py_mj == 3 and py_mi > 4) or (py_mj < 4):
print('--------------------------------------------------------------')

# Run, unit/timestamp.py
with open('./unit/timestamp.py') as ti:
cmd = ti.read()
exec(cmd)

print('--------------------------------------------------------------')

# Run, unit/xunit.py
with open('./unit/xunit.py') as xut:
xcmd = xut.read()
exec(xcmd)

print('--------------------------------------------------------------')

# Run, unit/unit.py
with open('./unit/unit.py') as ut:
cmd = ut.read()
exec(cmd)

# Python_VERSION: 3.5 or higher and 4.x or less.
else:
raise ValueError("VERSION: 3.5 or higher and 4.x or less")

# Custom Exception.
except ValueError as e:
print(e)
raise RuntimeError from None

finally:
# GC collection.
gc.collect()

0 comments on commit c6a3ac0

Please sign in to comment.