-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from takkii/develop
Update.
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |