From 1d2295faade4225032448f0798593dc9a81c23b2 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sat, 19 Apr 2014 19:18:51 +0200 Subject: [PATCH] Add support for flake8, wheel --- Makefile | 46 ++++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 3 ++- setup.cfg | 7 +++++++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 Makefile create mode 100644 setup.cfg diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a813a48 --- /dev/null +++ b/Makefile @@ -0,0 +1,46 @@ +.PHONY: clean-pyc clean-build docs + +help: + @echo "clean-build - remove build artifacts" + @echo "clean-pyc - remove Python file artifacts" + @echo "lint - check style with flake8" + @echo "test - run tests quickly with the default Python" + @echo "testall - run tests on every Python version with tox" + @echo "coverage - check code coverage quickly with the default Python" + @echo "release - package and upload a release" + @echo "sdist - package" + +clean: clean-build clean-pyc + +clean-build: + rm -fr build/ + rm -fr dist/ + rm -fr *.egg-info + +clean-pyc: + find . -name '*.pyc' -exec rm -f {} + + find . -name '*.pyo' -exec rm -f {} + + find . -name '*~' -exec rm -f {} + + +lint: + flake8 djangocms_blog + +test: + python runtests.py test + +test-all: + tox + +coverage: + coverage run --source djangocms-blog setup.py test + coverage report -m + coverage html + open htmlcov/index.html + +release: clean + python setup.py sdist upload + python setup.py bdist_wheel upload + +sdist: clean + python setup.py sdist + ls -l dist \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index ecf975e..72a189b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ --e . \ No newline at end of file +-e . +wheel \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..f3c0451 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,7 @@ +[wheel] +universal = 1 + +[flake8] +max-line-length = 100 +ignore = E501 +exclude = djangocms_blog/migrations/* \ No newline at end of file