From e90646231464a14a59b567ce81b736d9abf18b3b Mon Sep 17 00:00:00 2001 From: jrx Date: Fri, 31 May 2024 17:50:45 +0200 Subject: [PATCH] macos tooling --- justfile | 36 ++++++++++++++++++++++++++---------- py_scnr/requirements.txt | 1 + 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/justfile b/justfile index 9de5d3c..e74521c 100644 --- a/justfile +++ b/justfile @@ -11,13 +11,6 @@ o________________INIT_COMMANDS: _default clean: cargo clean -install_python_venv: - cd py_scnr && python3 -m venv .venv - cd py_scnr && pip install -r requirements.txt - # cd py_scnr && pip freeze > requirements.txt - echo "now call ---->" - echo "source ./py_scnr/.venv/bin/activate" - # execute all commands to check workspace health, if this command pass, CI should pass as well all: clean test check check_deny install @@ -40,7 +33,9 @@ docs: cargo doc --workspace --no-deps --open build_py_dev: - cd py_scnr && virtualenv .venv && maturin develop + #!/usr/bin/env bash + source .venv/bin/activate + cd py_scnr && && python3 -m virtualenv .venv && maturin develop # ================================================================================================== # ================================================================================================== @@ -104,10 +99,31 @@ install: # ================================================================================================== o________________DEPS_COMMANDS: _default -# Installs build tools & dependencies -install_tooling: +# Installs cargo tools +install_cargo_tools: cargo install cargo-deny cargo install --locked maturin + + +# Installs python virtual env requirements +install_python_venv: + cd py_scnr && python3 -m venv .venv + cd py_scnr && pip install -r requirements.txt + # cd py_scnr && pip freeze > requirements.txt + echo "now call ---->" + echo "source ./py_scnr/.venv/bin/activate" + +# Installs build tools & dependencies +[linux] +install_tooling: install_cargo_tools && install_python_venv sudo apt install python3-venv sudo apt install python3-pip pip install virtualenv + +# Installs build tools & dependencies +[macos] +install_tooling: install_cargo_tools && install_python_venv + brew install python pipx + pipx ensurepath + pipx install pip + pip install virtualenv diff --git a/py_scnr/requirements.txt b/py_scnr/requirements.txt index 2dbbe3d..7bce869 100644 --- a/py_scnr/requirements.txt +++ b/py_scnr/requirements.txt @@ -1 +1,2 @@ maturin==1.4.0 +virtualenv