[~] add host_deps command
This commit is contained in:
parent
cadec5376a
commit
bd9878335a
3
Makefile
3
Makefile
@ -1,3 +1,6 @@
|
|||||||
|
host_deps:
|
||||||
|
./m host_deps
|
||||||
|
|
||||||
python_clean:
|
python_clean:
|
||||||
rm -fr \
|
rm -fr \
|
||||||
~/.local/bin/env3 \
|
~/.local/bin/env3 \
|
||||||
|
14
_m.py
14
_m.py
@ -259,9 +259,17 @@ def inside_env() -> bool:
|
|||||||
# ruff = 'ruff'
|
# ruff = 'ruff'
|
||||||
# m2 = 'm2'
|
# m2 = 'm2'
|
||||||
|
|
||||||
Command_args = ['js', 'mypy', 'env', 'ruff', 'm2']
|
def host_deps(argv: list[str]) -> None:
|
||||||
|
if sys.platform in ['linux']:
|
||||||
|
subprocess.check_call(r'''
|
||||||
|
exec yay -S $(cat requirements-archlinux.txt)
|
||||||
|
''', shell=True,)
|
||||||
|
else:
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
Command : TypeAlias = Literal['js', 'mypy', 'env', 'ruff', 'm2']
|
Command_args = ['js', 'mypy', 'env', 'ruff', 'm2', 'host_deps',]
|
||||||
|
|
||||||
|
Command : TypeAlias = Literal['js', 'mypy', 'env', 'ruff', 'm2', 'host_deps',]
|
||||||
|
|
||||||
def run(argv: Optional[list[str]] = None) -> None:
|
def run(argv: Optional[list[str]] = None) -> None:
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
@ -297,6 +305,8 @@ def run(argv: Optional[list[str]] = None) -> None:
|
|||||||
|
|
||||||
if options.command == 'js':
|
if options.command == 'js':
|
||||||
js(args)
|
js(args)
|
||||||
|
elif options.command == 'host_deps':
|
||||||
|
host_deps(args)
|
||||||
elif options.command == 'env':
|
elif options.command == 'env':
|
||||||
env(args)
|
env(args)
|
||||||
elif options.command == 'mypy':
|
elif options.command == 'mypy':
|
||||||
|
1
requirements-archlinux.txt
Normal file
1
requirements-archlinux.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
python-build
|
Loading…
Reference in New Issue
Block a user