Skip to content

Commit

Permalink
[cli] Remove the never used 'tid' command (#1494)
Browse files Browse the repository at this point in the history
* [cli] Remove never used 'tid' entry script

* /usr/bin/env python3

* [skip ci] why-cannot-a-non-CUDA use-ti-dist

* revert to PYTHON_EXECUTABLE since it's only for dev mode

* fix typo
  • Loading branch information
archibate authored Jul 16, 2020
1 parent 102d9b8 commit 43c32b8
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 16 deletions.
2 changes: 0 additions & 2 deletions cmake/PythonNumpyPybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ endif()
# Creating python enters
file(MAKE_DIRECTORY bin)
file(WRITE ${CMAKE_SOURCE_DIR}/bin/ti "#!${PYTHON_EXECUTABLE_PATH}\nimport taichi\nexit(taichi.main())")
file(WRITE ${CMAKE_SOURCE_DIR}/bin/tid "#!${PYTHON_EXECUTABLE_PATH}\nimport taichi\nexit(taichi.main(debug=True))")
execute_process(COMMAND chmod +x ${CMAKE_SOURCE_DIR}/bin/ti)
execute_process(COMMAND chmod +x ${CMAKE_SOURCE_DIR}/bin/tid)
execute_process(COMMAND cp ${CMAKE_SOURCE_DIR}/bin/ti ${CMAKE_SOURCE_DIR}/bin/taichi)


Expand Down
4 changes: 0 additions & 4 deletions python/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ def get_python_executable():
print('Only the wheel with clang will be released to PyPI.')
sys.exit(-1)

if not gpu:
print('Linux release must ship with the CUDA backend.')
sys.exit(-1)

with open('../setup.py') as fin:
with open('setup.py', 'w') as fout:
project_name = 'taichi'
Expand Down
10 changes: 1 addition & 9 deletions python/taichi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def register(func):

@registerableCLI
class TaichiMain:
def __init__(self, debug: bool = False, test_mode: bool = False):
def __init__(self, test_mode: bool = False):
self.banner = f"\n{'*' * 43}\n** Taichi Programming Language **\n{'*' * 43}"
print(self.banner)

Expand All @@ -62,9 +62,6 @@ def __init__(self, debug: bool = False, test_mode: bool = False):
raise ValueError(
"Environment variable TI_DEBUG can only have value 0 or 1."
)
if debug:
print(f"\n{'*' * 17} Debug Mode {'*' * 17}\n")
os.environ['TI_DEBUG'] = '1'

parser = argparse.ArgumentParser(description="Taichi CLI",
usage=self._usage())
Expand Down Expand Up @@ -1012,10 +1009,5 @@ def main():
return cli()


def main_debug():
cli = TaichiMain(debug=True)
return cli()


if __name__ == "__main__":
sys.exit(main())
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
entry_points={
'console_scripts': [
'ti=taichi.main:main',
'tid=taichi.main:main_debug',
],
},
classifiers=classifiers,
Expand Down

0 comments on commit 43c32b8

Please sign in to comment.