Skip to content

Commit

Permalink
use pip-compile for pinning release dependencies (#138)
Browse files Browse the repository at this point in the history
* use pip-compile for pinning release dependencies
  • Loading branch information
edaniszewski committed Apr 16, 2018
1 parent 82ab2e2 commit 45ec2c1
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 11 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export GIT_VER := $(shell /bin/sh -c "git log --pretty=format:'%h' -n 1 || echo


HAS_PY36 := $(shell which python3.6 || python -V 2>&1 | grep 3.6 || python3 -V 2>&1 | grep 3.6)
HAS_PIP_COMPILE := $(shell which pip-compile)

# Docker Image tags
DEFAULT_TAGS = ${IMG_NAME}:latest ${IMG_NAME}:${PKG_VER} ${IMG_NAME}:${GIT_VER}
Expand Down Expand Up @@ -150,6 +151,13 @@ else
docker-compose -f compose/synse.yml -f compose/test.yml -f compose/test_end_to_end.yml down
endif

.PHONY: update-deps
update-deps: ## Update the frozen pip dependencies (requirements.txt)
ifndef HAS_PIP_COMPILE
pip install pip-tools
endif
pip-compile --output-file requirements.txt setup.py

.PHONY: translations
translations: ## (Re)generate the translations.
tox -e translations
Expand Down
23 changes: 18 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
aiocache>=0.8.0
grpcio>=1.8.6
pyyaml>=3.12
sanic>=0.7.0
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file requirements.txt setup.py
#
aiocache==0.8.0
aiofiles==0.3.2 # via sanic
bison==0.0.5
grpcio==1.10.1
httptools==0.0.11 # via sanic
protobuf==3.5.2.post1 # via grpcio
pyyaml==3.12
sanic==0.7.0
six==1.11.0 # via grpcio, protobuf
synse-plugin==0.0.3
bison>=0.0.5
ujson==1.35 # via sanic
uvloop==0.9.1 # via sanic
websockets==4.0.1 # via sanic
14 changes: 8 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
with open('README.md', 'r') as f:
readme = f.read()

# Load the requirements
with open('requirements.txt', 'r') as f:
requirements = f.read().split('\n')


setup(
name=pkg['__title__'],
version=pkg['__version__'],
Expand All @@ -38,7 +33,14 @@
include_package_data=True,
package_data={'': ['LICENSE']},
python_requires='==3.6',
install_requires=requirements,
install_requires=[
'aiocache',
'grpcio',
'pyyaml',
'sanic',
'synse-plugin',
'bison>=0.0.5'
],
zip_safe=False,
classifiers=[
'Natural Language :: English',
Expand Down

0 comments on commit 45ec2c1

Please sign in to comment.