Skip to content

Commit

Permalink
set dependencies to up to date versions
Browse files Browse the repository at this point in the history
  • Loading branch information
vvmruder committed May 27, 2019
1 parent b9683a0 commit c15506f
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@ docs/_build/
# PyBuilder
target/

/venv/
/.venv/
/.vscode/
78 changes: 78 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Check if running on CI
ifeq ($(CI),true)
PIP_REQUIREMENTS=requirements.timestamp
VENV_BIN=
else
PIP_REQUIREMENTS=.venv/requirements.timestamp
VENV_BIN=.venv/bin/
endif

# ********************
# Variable definitions
# ********************

# Set pip and setuptools versions
PIP_VERSION ?= pip>=7,<8
SETUPTOOL_VERSION ?= setuptools>=12

# Development switch
DEVELOPMENT ?= FALSE

# Package name
PKG = pyramid_georest

# Build dependencies
BUILD_DEPS +=

requirements.timestamp: requirements.txt
pip install '$(PIP_VERSION)' '$(SETUPTOOL_VERSION)'
pip install --upgrade -r requirements.txt
touch $@

.venv/.timestamp:
virtualenv .venv
$(VENV_BIN)pip install '$(PIP_VERSION)' '$(SETUPTOOL_VERSION)'
touch $@

.venv/requirements.timestamp: .venv/.timestamp requirements.txt setup.py
$(VENV_BIN)pip install -r requirements.txt --trusted-host www.geo.bl.ch
touch $@

# **************
# Common targets
# **************

.PHONY: clean
clean:
rm -rf build
rm -rf dist
rm -rf .tox
rm -rf .cache
rm -f .coverage

.PHONY: clean-all
clean-all: clean
rm -rf .venv
rm -rf $(PKG).egg-info

.PHONY: git-attributes
git-attributes:
git --no-pager diff --check `git log --oneline | tail -1 | cut --fields=1 --delimiter=' '`

.PHONY: lint
lint: $(PIP_REQUIREMENTS) setup.cfg $(SRC_PY)
$(VENV_BIN)flake8

.PHONY: test
test: $(PIP_REQUIREMENTS) $(SRC_PY) $(CONFIG_FILE)
$(VENV_BIN)py.test -vv --cov-config .coveragerc --cov $(PKG) --cov-report term-missing:skip-covered test/py

.PHONY: tox
tox: $(PIP_REQUIREMENTS) tox.ini $(SRC_PY) $(CONFIG_FILE)
$(VENV_BIN)tox --recreate --skip-missing-interpreters

.PHONY: check
check: git-attributes lint tox

.PHONY: build
build: $(BUILD_DEPS)
20 changes: 20 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
PyYAML==3.12
tox==2.9.1
pytest==3.4.0
pytest-cov==2.5.1
pluggy==0.6.0
pyflakes==1.6.0
flake8==3.5.0
pycodestyle==2.3.1
pyramid_debugtoolbar==4.3
c2c.template==1.5.1
pyramid==1.9.1
SQLAlchemy==1.2.4
GeoAlchemy2==0.4.2
psycopg2==2.7.4
shapely==1.6.3
dicttoxml==1.7.4
transaction==2.3.0
waitress==1.3.0
zope.sqlalchemy==1.1
simplejson==3.16.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
'SQLAlchemy',
'shapely',
'dicttoxml',
'geoalchemy2',
'GeoAlchemy2',
'transaction',
'waitress',
'pyramid_debugtoolbar',
Expand Down

0 comments on commit c15506f

Please sign in to comment.