8000 Add initial support for pipenv · flask-api/flask-api@f288095 · GitHub
[go: up one dir, main page]

Skip to content

Commit f288095

Browse files
committed
Add initial support for pipenv
1 parent 9874a2f commit f288095

File tree

5 files changed

+166
-1
lines changed

5 files changed

+166
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.env/
2+
.venv/
23
env/
34
dist/
45
htmlcov/

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ env:
1515
# - FLASK_VERSION=0.10.2
1616
- FLASK_VERSION=0.11.0
1717

18+
before_install:
19+
- pip install pipenv
20+
1821
install:
19-
- pip install -r requirements.txt
22+
- pipenv install --dev --system
2023
- pip install flask==${FLASK_VERSION} # override version for the build matrix
2124
- pip install coverage==3.6
2225
- pip install python-coveralls==2.4.0

Makefile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.PHONY: all
2+
all: install
3+
4+
# PROJECT DEPENDENCIES #########################################################
5+
6+
export PIPENV_SHELL_COMPAT=true
7+
export PIPENV_VENV_IN_PROJECT=true
8+
9+
ENV := .venv
10+
DEPENDENCIES := $(ENV)/.installed
11+
PIP := $(ENV)/bin/pip
12+
13+
.PHONY: install
14+
install: $(DEPENDENCIES)
15+
16+
$(DEPENDENCIES): $(PIP) Pipfile*
17+
pipenv install --dev --ignore-hashes
18+
@ touch $@
19+
20+
$(PIP):
21+
pipenv --python=python3.6
22+
23+
# VALIDATION TARGETS ###########################################################
24+
25+
.PHONY: test
26+
test: install ## Run tests and linters
27+
pipenv run nosetests flask_api
28+
pipenv run flake8 flask_api --ignore=E128,E501 --exclude=__init__.py
29+
30+
# CLEANUP ######################################################################
31+
32+
.PHONY: clean
33+
clean:
34+
rm -rf $(ENV)

Pipfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[[source]]
2+
url = "https://pypi.python.org/simple"
3+
verify_ssl = true
4+
5+
[packages]
6+
Flask = "~=0.10.1"
7+
8+
[dev-packages]
9+
nose = "*"
10+
coverage = "~=3.7.1"
11+
flake8 = "~=2.1"
12+
mkdocs = "~=0.12"
13+
tox = "~=2.0"

Pipfile.lock

Lines changed: 114 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0