Skip to content
This repository has been archived by the owner on Apr 1, 2019. It is now read-only.

Commit

Permalink
Creating a Makefil
Browse files Browse the repository at this point in the history
  • Loading branch information
kolanos committed Aug 9, 2012
1 parent e4764ff commit 9650e44
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 14 deletions.
11 changes: 7 additions & 4 deletions .travis.yml
@@ -1,6 +1,9 @@
language: python
python:
- "2.7"
- "2.6"
install: pip install -r requirements.txt
script: python runtests.py
- 2.6
- 2.7
- 3.2
script: make travis
install:
- pip install nose
- pip install . --use-mirrors
58 changes: 58 additions & 0 deletions Makefile
@@ -0,0 +1,58 @@
SHELL := /bin/bash

# these files should pass pyflakes
# exclude ./env/, which may contain virtualenv packages
PYFLAKES_WHITELIST=$(shell find . -name "*.py" ! -path "./docs/*" ! -path "./tests/*" \
! -path "./requests/packages/*" ! -path "./env/*" \
! -path "./requests/__init__.py" ! -path "./requests/compat.py")

# hack: if pyflakes is available, set this to the location of pyflakes
# if it's not, e.g., in the Python 3 or PyPy Jenkins environments, set it to
# the location of the no-op `true` command.
PYFLAKES_IF_AVAILABLE=$(shell if which pyflakes > /dev/null ; \
then which pyflakes; \
else which true; fi )

# test_requests_ext.py depends on external services, and async doesn't work under Python 3
# Travis/Jenkins should be ensuring that all other tests pass on all supported versions
CI_TESTS=$(shell find ,/ -name "*.py" ! -name "test_requests_ext.py" ! -name "test_requests_async.py")

init:
python setup.py develop
pip install -r requirements.txt

test:
nosetests ./

lazy:
nosetests --with-color ./

simple:
nosetests ./

pyflakes:
pyflakes ${PYFLAKES_WHITELIST}

cipyflakes:
${PYFLAKES_IF_AVAILABLE} ${PYFLAKES_WHITELIST}

citests:
nosetests ${CI_TESTS} --with-xunit --xunit-file=junit-report.xml

ci: citests cipyflakes

travis: citests

# compute statistics of various kinds
lemonade:
-pyflakes vaporize > violations.pyflakes.txt
# HTML output will be available in the default location, ./cover/
nosetests --with-coverage --cover-html --cover-package=vaporize ${CI_TESTS} ./tests/*

site:
cd docs; make html

clean:
git clean -Xfd

docs: site
10 changes: 0 additions & 10 deletions runtests.py

This file was deleted.

File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions vaporize/tests/test_servers.py → tests/test_servers.py
Expand Up @@ -3,6 +3,10 @@

from .mock import mock, handle_request_mock

import sys
import os
sys.path.insert(0, os.path.abspath('..'))

import vaporize


Expand Down

0 comments on commit 9650e44

Please sign in to comment.