Created
October 26, 2024 17:40
-
-
Save kborovik/aa766e98a2a3996ecec64cb65037b2cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.EXPORT_ALL_VARIABLES: | |
.ONESHELL: | |
.SILENT: | |
MAKEFLAGS += --no-builtin-rules --no-builtin-variables | |
PATH := $(abspath .venv)/bin:$(PATH) | |
python_packages := streamlit pandas | |
help: | |
$(info ==> Help <==) | |
$(info make pip-install - Install Python packages) | |
$(info make pip-upgrade - Upgrade Python packages) | |
$(info make pip-list - List Python packages) | |
$(info make pip-clean - Remove cached Python package files) | |
$(info ) | |
$(info ==> Python Packages <==) | |
$(info $(python_packages)) | |
pip-install: requirements.txt | |
$(info ==> Install requirements <==) | |
pip install -r requirements.txt | |
pip install ruff | |
pip-list: requirements.txt | |
pip list | |
pip-clean: | |
$(info ==> Remove cached Python package files <==) | |
rm -rf .venv requirements.txt | |
pip-upgrade: pip-clean pip-install | |
.gitignore: | |
cat << EOF > $@ | |
.venv | |
EOF | |
.venv: .gitignore | |
$(info ==> Create Python virtual environment <==) | |
python3 -m venv .venv | |
requirements.txt: .venv | |
$(info ==> Upgrade Python packages <==) | |
pip install --upgrade pip $(python_packages) | |
pip freeze >| $(@) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment