Skip to content

Commit

Permalink
chore: fix poetry version check in sync_env make target
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBredehoft committed Jan 15, 2024
1 parent 7f81901 commit 5a4e984
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,17 @@ setup_env:
"$(MAKE)" fix_omp_issues_for_intel_mac

.PHONY: sync_env # Synchronise the environment
sync_env: check_poetry_version
if [[ $$(uname) != "Linux" ]] && [[ $$(uname) != "Darwin" ]]; then \
poetry install --remove-untracked --only dev; \
sync_env:
if [[ $$(poetry --version) != "Poetry (version $(POETRY_VERSION))" ]];then \
echo "Current Poetry version is different than $(POETRY_VERSION). Please update it.";\
else \
poetry install --remove-untracked; \
if [[ $$(uname) != "Linux" ]] && [[ $$(uname) != "Darwin" ]]; then \
poetry install --remove-untracked --only dev; \
else \
poetry install --remove-untracked; \
fi; \
"$(MAKE)" setup_env; \
fi
"$(MAKE)" setup_env

.PHONY: fix_omp_issues_for_intel_mac # Fix OMP issues for macOS Intel, https://github.com/zama-ai/concrete-ml-internal/issues/3951
fix_omp_issues_for_intel_mac:
Expand Down Expand Up @@ -90,15 +94,6 @@ reinstall_env:
echo "source $${SOURCE_VENV_PATH}"; \
fi

.PHONY: check_poetry_version # Check poetry's version
check_poetry_version:
if [[ $$(poetry --version) == "Poetry (version $(POETRY_VERSION))" ]];then \
echo "Poetry version is ok";\
else\
echo "Expected poetry version is not the expected one: $(POETRY_VERSION)"\
exit 1;\
fi

.PHONY: python_format # Apply python formatting
python_format:
poetry run env bash ./script/source_format/format_python.sh \
Expand Down

0 comments on commit 5a4e984

Please sign in to comment.