Last active
January 1, 2016 23:09
-
-
Save torufurukawa/8214373 to your computer and use it in GitHub Desktop.
俺のブートストラップ
This file contains hidden or 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
#!/bin/sh | |
curl -o Makefile https://gist.github.com/torufurukawa/8214373/raw/1e21d1a4eca1e4de1bd93aaa6642500ff7c701fc/Makefile | |
make |
This file contains hidden or 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
.PHONY : all venv py-packages | |
VENV_DIR = venv | |
BIN_DIR = $(VENV_DIR)/bin | |
BASE_PYTHON = python3.4 | |
PIP = $(BIN_DIR)/pip | |
ACTIVATE = $(BIN_DIR)/activate | |
PYTHON = $(BIN_DIR)/python | |
PIP_REQUIREMENTS = pip-requirements.txt | |
PY_PACKAGES = Flask | |
all: venv py-packages | |
venv: $(ACTIVATE) | |
$(ACTIVATE): | |
test -d $(VENV_DIR) || $(BASE_PYTHON) -m venv $(VENV_DIR) | |
touch $@ | |
py-packages: $(PIP_REQUIREMENTS) | |
$(PIP) install -r $< | |
$(PIP_REQUIREMENTS): | |
$(PIP) install $(PY_PACKAGES) | |
$(PIP) freeze > $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment