Skip to content

Instantly share code, notes, and snippets.

@torufurukawa
Last active January 1, 2016 23:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torufurukawa/8214373 to your computer and use it in GitHub Desktop.
Save torufurukawa/8214373 to your computer and use it in GitHub Desktop.
俺のブートストラップ
#!/bin/sh
curl -o Makefile https://gist.github.com/torufurukawa/8214373/raw/1e21d1a4eca1e4de1bd93aaa6642500ff7c701fc/Makefile
make
.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