mirror of
https://github.com/master-of-zen/Av1an.git
synced 2024-11-24 18:18:06 +00:00
separate main package and cli
This commit is contained in:
parent
5f340af3aa
commit
287ac21841
4 changed files with 22 additions and 2 deletions
2
av1an.py
2
av1an.py
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
if __name__ == "__main__":
|
||||
from av1an.__main__ import main
|
||||
from cli.__main__ import main
|
||||
|
||||
main()
|
||||
|
|
1
cli/__init__.py
Normal file
1
cli/__init__.py
Normal file
|
@ -0,0 +1 @@
|
|||
|
19
cli/__main__.py
Normal file
19
cli/__main__.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env python3
|
||||
from av1an.arg_parse import Args
|
||||
from av1an.manager import Manager
|
||||
from av1an.startup.setup import startup_check
|
||||
|
||||
|
||||
def main():
|
||||
"""
|
||||
Running Av1an CLI
|
||||
"""
|
||||
parser = Args()
|
||||
project = parser.get_project()
|
||||
startup_check(project)
|
||||
manager = Manager.Main(project)
|
||||
manager.run()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
2
setup.py
2
setup.py
|
@ -49,7 +49,7 @@ setuptools.setup(
|
|||
py_modules=["av1an"],
|
||||
rust_extensions=[RustExtension("av1an.av1an", "Cargo.toml", binding=Binding.PyO3)],
|
||||
include_package_data=True,
|
||||
entry_points={"console_scripts": ["av1an=av1an:main"]},
|
||||
entry_points={"console_scripts": ["av1an=cli:main"]},
|
||||
classifiers=[
|
||||
"Programming Language :: Python :: 3",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
|
|
Loading…
Reference in a new issue