Skip to content

Commit

Permalink
update Makefile, travis and tox configs
Browse files Browse the repository at this point in the history
  • Loading branch information
nir0s committed Dec 24, 2017
1 parent 94ec541 commit 7d3955b
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 32 deletions.
37 changes: 23 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
sudo: false
language: python
python:
- "2.7"

matrix:
include:
- python: 3.5
env:
- TOX_ENV=py35
- python: 2.7
env: TOXENV=flake8
- python: 3.6
env: TOXENV=py3flake8
- python: 2.7
env: TOXENV=py27
- python: 3.4
env:
- TOX_ENV=py34
env:
- TOX_ENV=flake8
- TOX_ENV=py27
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: pypy
env: TOXENV=pypy
# This should be tested. Problem is, Travis are using Python 3.2 for pypy3 which is no longer supported by pip
# - python: pypy3
# env: TOXENV=pypy3

before_install:
- pip install codecov
install:
- pip install tox
- pip install codecov
- pip install tox
script:
- tox -e $TOX_ENV
- tox
after_success:
- codecov
- codecov
55 changes: 38 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,56 @@
# Name of this package
PACKAGENAME = backtrace

# Default tox env when running `make testone`
TOX_ENV ?= py36


.PHONY: help
help:
@echo 'Please use "make <target>" where <target> is one of'
@echo " release - build a release and publish it"
@echo " dev - prepare a development environment (includes tests)"
@echo " instdev - prepare a development environment (no tests)"
@echo " install - install into current Python environment"
@echo " build - build the package"
@echo " test - test from this directory using tox, including test coverage"
@echo " publish - upload to PyPI"
@echo " clean - remove any temporary build products"
@echo " dry-run - perform all action required for a release without actually releasing"

.PHONY: release
release: publish
release: test clean build publish
@echo "$@ done."

.PHONY: test
test:
pip install 'tox>=1.7.2'
tox
@echo "$@ done."

.PHONY: testone
testone:
pip install 'tox>=1.7.2'
tox -e $(TOX_ENV)
@echo "$@ done."

.PHONY: clean
clean:
rm -rf dist build $(PACKAGENAME).egg-info
@echo "$@ done."

.PHONY: build
build:
python setup.py sdist bdist_wheel

.PHONY: publish
publish:
pip install twine
twine upload -r pypi dist/$(PACKAGENAME)-*
@echo "$@ done."

.PHONY: dry-run
dry-run: test clean build
@echo "$@ done."

.PHONY: dev
Expand All @@ -44,19 +81,3 @@ instdev:
install:
python setup.py install
@echo "$@ done."

.PHONY: test
test:
sudo pip install 'tox>=1.7.2'
tox
@echo "$@ done."

.PHONY: publish
publish:
python setup.py sdist upload
@echo "$@ done; uploaded the package to PyPI."

.PHONY: clean
clean:
rm -rf build $(PACKAGENAME).egg-info
@echo "$@ done."
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# content of: tox.ini , put in same dir as setup.py
[tox]
envlist = flake8,py27,py34,py35
envlist = flake8,py27,py34,py35,py36
skip_missing_interpreters = true

[testenv]
Expand Down

0 comments on commit 7d3955b

Please sign in to comment.