From b591dfcc8b8f2f2ffaa362022f420bfb36f85f24 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 22 Apr 2013 18:07:55 +0100 Subject: [PATCH] modified: release.sh modified: setup.py modified: tox --- release.sh | 20 +++++++------------- setup.py | 4 ++-- tox | 18 +++++++++++++++--- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/release.sh b/release.sh index 89cf2ef..b26b8be 100755 --- a/release.sh +++ b/release.sh @@ -1,28 +1,23 @@ #!/bin/bash -set -e +set -ex VERSION=$(python -c "from src.wstools.version import __version__ ; print __version__") echo Preparing to release version $VERSION -pip install -q --upgrade pep8 autopep8 -#pip install -q --upgrade autopep8 +#source tox + +#pip install --upgrade pep8 autopep8 docutils + +echo === Testings === if ! python setup.py test; then echo "The test suite failed. Fix it!" exit 1 fi +echo === Chechink that all changes are commited and pushed === git pull -u -python setup.py check --restructuredtext --strict - -autopep8 -i -r src/*.py - -# commented some errors temporarly, TODO: remove them and fix the code -pep8 --max-line-length=180 --ignore=E502,E128,E123,E127,E125 src - -sleep 1 - git diff # Disallow unstaged changes in the working tree if ! git diff-files --check --exit-code --ignore-submodules -- >&2 @@ -40,7 +35,6 @@ git diff fi - echo "Please don't run this as a user. This generates a new release for PyPI. Press ^C to exit or Enter to continue." read diff --git a/setup.py b/setup.py index 253c11b..4626367 100644 --- a/setup.py +++ b/setup.py @@ -29,6 +29,6 @@ setup( packages=find_packages('src'), package_dir={'': 'src'}, include_package_data=True, - install_requires=[], - tests_require=['virtualenv>=1.8.4','pytest'], + install_requires=['docutils'], + tests_require=['virtualenv>=1.8.4', 'pytest'], ) diff --git a/tox b/tox index c327080..fe64228 100755 --- a/tox +++ b/tox @@ -12,7 +12,6 @@ else fi fi - if [ -z "$VIRTUAL_ENV" ] then virtualenv .tox/tox @@ -27,8 +26,21 @@ then exit 1 fi -pip install tox --upgrade -v +easy_install "tox>=1.3" +#pip install tox --upgrade -v # pytest pytest-cov -tox -v +python setup.py check --restructuredtext --strict + +autopep8 -i -r src/*.py + +# commented some errors temporarly, TODO: remove them and fix the code +pep8 --max-line-length=180 --ignore=E502,E128,E123,E127,E125 src +tox -v $@ + +if [ $? -ne 0 ]; then +echo "Error: tox returned error code $?" +else +echo "Done." +fi