Skip to content

Commit

Permalink
chore(api): Update pipenv and use pipenv sync (#2501)
Browse files Browse the repository at this point in the history
Pipenv sync was added here: pypa/pipenv#1463 and had a
subsequent bug in it where it would sometimes update pipfile.lock, but that’s
fixed now.

There’s now a solid three part workflow to pipenv, as there should be:

- If you want to change the dependencies of a project, you use pipenv
  install/uninstall or edit Pipfile
- When you want to crystallize those dependencies and check in, you use pipenv
  lock to generate the lockfile
- When you want to install the dependencies, as in when you checkout from scm,
  you use pipenv sync
  • Loading branch information
sfoster1 committed Oct 17, 2018
1 parent 86239a7 commit fc809e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ install: install-py install-js

.PHONY: install-py
install-py:
$(OT_PYTHON) -m pip install pipenv==11.6.8
$(OT_PYTHON) -m pip install pipenv==2018.10.9
$(MAKE) -C $(API_DIR) install
$(MAKE) -C $(UPDATE_SERVER_DIR) install

Expand Down
4 changes: 2 additions & 2 deletions api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ python := pipenv run python
pip := pipenv run pip
pytest := pipenv run py.test
pipenv_opts := --dev
pipenv_opts += $(and $(CI),--ignore-pipfile)
pipenv_opts += $(and $(CI),--keep-outdated)

tests ?= tests
test_opts ?=

.PHONY: install
install:
pipenv install $(pipenv_opts)
pipenv sync $(pipenv_opts)

.PHONY: all
all: lint test
Expand Down
4 changes: 2 additions & 2 deletions update-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ PATH := $(shell cd .. && yarn bin):$(PATH)

python := pipenv run python
pipenv_opts := --dev
pipenv_opts += $(and $(CI),--ignore-pipfile)
pipenv_opts += $(and $(CI),--keep-outdated)
port ?= 34000

# make bootstrap wheel file (= rather than := to expand at every use)
wheel = $(wildcard dist/*.whl)

.PHONY: install
install:
pipenv install $(pipenv_opts)
pipenv sync $(pipenv_opts)

.PHONY: dev
dev: export ENABLE_VIRTUAL_SMOOTHIE := true
Expand Down

0 comments on commit fc809e2

Please sign in to comment.