Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Commit 5720c74

Browse files
committed
Use make to drive building and testing.
1 parent ec0284c commit 5720c74

File tree

7 files changed

+82
-1
lines changed

7 files changed

+82
-1
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ dist
66
build
77
*.swp
88
env
9+
htmlcov
10+
*.egg
11+
.coverage
12+
.tox

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ python:
55
- "3.2"
66
- "3.3"
77
install: "pip install -r requirements.pip --use-mirrors"
8-
script: nosetests
8+
script: "make test"
99
notifications:
1010
email:
1111

Makefile

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#
2+
# Makefile
3+
#
4+
5+
help:
6+
@echo "Helper commands for working with the colorific codebase:"
7+
@echo
8+
@echo "clean-build remove build artifacts"
9+
@echo "clean-pyc remove Python file artifacts"
10+
@echo "lint check style with flake8"
11+
@echo "test run tests quickly with the default Python"
12+
@echo "test-all run tests on every Python version with tox"
13+
@echo "coverage check code coverage quickly with the default Python"
14+
@echo "docs generate Sphinx HTML documentation, including API docs"
15+
@echo "release package and upload a release"
16+
@echo "sdist package"
17+
@echo
18+
19+
env: requirements.pip
20+
test -d env || virtualenv env
21+
env/bin/pip install -r requirements.pip
22+
23+
clean: clean-build clean-pyc
24+
rm -fr htmlcov/
25+
26+
clean-build:
27+
rm -fr build/
28+
rm -fr dist/
29+
rm -fr *.egg-info
30+
31+
clean-pyc:
32+
find . -name '*.pyc' -exec rm -f {} +
33+
find . -name '*.pyo' -exec rm -f {} +
34+
find . -name '*~' -exec rm -f {} +
35+
36+
env/bin/flake8: env
37+
env/bin/pip install flake8
38+
39+
lint: env/bin/flake8
40+
env/bin/flake8 colorific tests
41+
42+
test: env
43+
env/bin/python setup.py test
44+
45+
env/bin/tox: env
46+
env/bin/pip install tox
47+
48+
test-all: env/bin/tox
49+
env/bin/tox
50+
51+
env/bin/coverage: env
52+
env/bin/pip install coverage
53+
54+
coverage: env/bin/coverage
55+
env/bin/coverage run --source colorific setup.py test
56+
env/bin/coverage report -m
57+
env/bin/coverage html
58+
open htmlcov/index.html
59+
60+
release: clean
61+
python setup.py sdist upload
62+
python setup.py bdist_wheel upload
63+
64+
dist: clean
65+
python setup.py sdist
66+
python setup.py bdist_wheel
67+
ls -l dist

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@
3939
zip_safe=False,
4040
install_requires=[i.strip() for i in file(REQUIREMENTS_PATH).readlines()],
4141
entry_points={'console_scripts': ['colorific = colorific.script:main']},
42+
test_suite='tests',
4243
)

tests/__init__.py

Whitespace-only changes.
File renamed without changes.

tox.ini

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[tox]
2+
envlist = py26, py27, py33
3+
4+
[testenv]
5+
setenv =
6+
PYTHONPATH = {toxinidir}:{toxinidir}/colorific
7+
commands = python setup.py test
8+
deps =
9+
-r{toxinidir}/requirements.pip

0 commit comments

Comments
 (0)