diff --git a/.travis.yml b/.travis.yml index 437b74e..d2c1f62 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,61 +25,65 @@ jobs: language: python env: PYENV_VERSION=2.6.9 TOXENV=py26 - <<: *linux - env: PYENV_VERSION=2.7.17 TOXENV=py27 + env: PYENV_VERSION=2.7.18 TOXENV=py27 - <<: *linux env: PYENV_VERSION=2.7-dev TOXENV=py27 - <<: *linux env: PYENV_VERSION=3.4.10 TOXENV=py34 - <<: *linux - env: PYENV_VERSION=3.5.8 TOXENV=py35 + env: PYENV_VERSION=3.5.10 TOXENV=py35 - <<: *linux env: PYENV_VERSION=3.5-dev TOXENV=py35 - <<: *linux - env: PYENV_VERSION=3.6.9 TOXENV=py36 DEPLOY=1 + env: PYENV_VERSION=3.6.12 TOXENV=py36 DEPLOY=1 - <<: *linux env: PYENV_VERSION=3.6-dev TOXENV=py36 - <<: *linux - env: PYENV_VERSION=3.7.5 TOXENV=py37 + env: PYENV_VERSION=3.7.9 TOXENV=py37 - <<: *linux env: PYENV_VERSION=3.7-dev TOXENV=py37 - <<: *linux - env: PYENV_VERSION=3.8.0 TOXENV=py38 + env: PYENV_VERSION=3.8.6 TOXENV=py38 - <<: *linux env: PYENV_VERSION=3.8-dev TOXENV=py38 + - <<: *linux + env: PYENV_VERSION=3.9.0 TOXENV=py39 - <<: *linux env: PYENV_VERSION=3.9-dev TOXENV=py39 - <<: *linux - env: PYENV_VERSION=pypy2.7-7.2.0 TOXENV=pypy + env: PYENV_VERSION=pypy2.7-7.3.1 TOXENV=pypy - <<: *linux - env: PYENV_VERSION=pypy3.6-7.2.0 TOXENV=pypy3 + env: PYENV_VERSION=pypy3.6-7.3.1 TOXENV=pypy3 - &osx os: osx language: generic - env: PYENV_VERSION=2.7.17 TOXENV=py27 + env: PYENV_VERSION=2.7.18 TOXENV=py27 - <<: *osx env: PYENV_VERSION=2.7-dev TOXENV=py27 - <<: *osx - env: PYENV_VERSION=3.5.8 TOXENV=py35 + env: PYENV_VERSION=3.5.10 TOXENV=py35 - <<: *osx env: PYENV_VERSION=3.5-dev TOXENV=py35 - <<: *osx - env: PYENV_VERSION=3.6.9 TOXENV=py36 + env: PYENV_VERSION=3.6.12 TOXENV=py36 - <<: *osx env: PYENV_VERSION=3.6-dev TOXENV=py36 - <<: *osx - env: PYENV_VERSION=3.7.5 TOXENV=py37 + env: PYENV_VERSION=3.7.9 TOXENV=py37 - <<: *osx env: PYENV_VERSION=3.7-dev TOXENV=py37 - <<: *osx - env: PYENV_VERSION=3.8.0 TOXENV=py38 + env: PYENV_VERSION=3.8.6 TOXENV=py38 - <<: *osx env: PYENV_VERSION=3.8-dev TOXENV=py38 + - <<: *osx + env: PYENV_VERSION=3.9.0 TOXENV=py39 - <<: *osx env: PYENV_VERSION=3.9-dev TOXENV=py39 - <<: *osx - env: PYENV_VERSION=pypy2.7-7.2.0 TOXENV=pypy + env: PYENV_VERSION=pypy2.7-7.3.1 TOXENV=pypy - <<: *osx - env: PYENV_VERSION=pypy3.6-7.2.0 TOXENV=pypy3 + env: PYENV_VERSION=pypy3.6-7.3.1 TOXENV=pypy3 allow_failures: - env: PYENV_VERSION=2.7-dev TOXENV=py27 - env: PYENV_VERSION=3.5-dev TOXENV=py35 @@ -90,12 +94,12 @@ jobs: before_install: - mkdir -p ${HOME}/.cache/pyenv - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update && (brew upgrade pyenv || true) && (brew install openssl || true); fi + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update && (brew upgrade pyenv || true) && (brew install openssl || true) && (brew install readline || true) && (brew install xz || true); fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then git -C "$(pyenv root)" fetch && git -C "$(pyenv root)" checkout master && git -C "$(pyenv root)" pull; fi install: - python -m pip install -r travis-requirements.txt - - pyenv install $(pyenv exec python --version >/dev/null 2>&1 && echo "--skip-existing" || echo "--force") "${PYENV_VERSION}" + - pyenv install $(pyenv exec python --version >/dev/null 2>&1 && echo "--skip-existing" || echo "--force") "${PYENV_VERSION}" script: - python -m tox -vv -- --cov-report=xml diff --git a/README.rst b/README.rst index 5390d57..3f2f1ee 100644 --- a/README.rst +++ b/README.rst @@ -1,23 +1,27 @@ -.. image:: https://img.shields.io/pypi/v/git-archive-all.svg +| |pypi| |homebrew| +| |implementations| |versions| +| |travis| |coverage| + +.. |pypi| image:: https://img.shields.io/pypi/v/git-archive-all.svg :target: https://pypi.python.org/pypi/git-archive-all :alt: PyPI -.. image:: https://img.shields.io/homebrew/v/git-archive-all.svg +.. |homebrew| image:: https://img.shields.io/homebrew/v/git-archive-all.svg :target: https://formulae.brew.sh/formula/git-archive-all :alt: Homebrew -.. image:: https://travis-ci.org/Kentzo/git-archive-all.svg?branch=master - :target: https://travis-ci.org/Kentzo/git-archive-all - :alt: Travis -.. image:: https://codecov.io/gh/Kentzo/git-archive-all/branch/master/graph/badge.svg - :target: https://codecov.io/gh/Kentzo/git-archive-all/branch/master - :alt: Coverage -.. image:: https://img.shields.io/pypi/pyversions/git-archive-all.svg +.. |versions| image:: https://img.shields.io/pypi/pyversions/git-archive-all.svg :target: https://pypi.python.org/pypi/git-archive-all :alt: Supported Python versions -.. image:: https://img.shields.io/pypi/implementation/git-archive-all.svg +.. |implementations| image:: https://img.shields.io/pypi/implementation/git-archive-all.svg :target: https://pypi.python.org/pypi/git-archive-all :alt: Supported Python implementations +.. |travis| image:: https://travis-ci.org/Kentzo/git-archive-all.svg?branch=master + :target: https://travis-ci.org/Kentzo/git-archive-all + :alt: Travis +.. |coverage| image:: https://codecov.io/gh/Kentzo/git-archive-all/branch/master/graph/badge.svg + :target: https://codecov.io/gh/Kentzo/git-archive-all/branch/master + :alt: Coverage -Archive repository with all its submodules. +Archive a repository with all its submodules. :: @@ -42,7 +46,7 @@ Archive repository with all its submodules. --force-submodules force `git submodule init && git submodule update` at each level before iterating submodules - --include=EXTRA additional files to include in the archive + --include=EXTRA additional files to include in the archive --dry-run show files to be archived without actually creating the archive diff --git a/setup.cfg b/setup.cfg index 410156b..ac0e9e8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,6 +27,7 @@ classifiers = Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 Topic :: Software Development :: Version Control Topic :: System :: Archiving platforms = @@ -56,7 +57,8 @@ tests_require = zipp==1.1.0; python_version >= "2.7" and python_version < "3.6" [tool:pytest] -addopts= --cov=git_archive_all --cov-report=term --cov-branch --showlocals -vv +addopts = --cov=git_archive_all --cov-report=term --cov-branch --showlocals -vv +filterwarnings = error [tox:tox] envlist = diff --git a/test_git_archive_all.py b/test_git_archive_all.py index b16413f..957ee24 100644 --- a/test_git_archive_all.py +++ b/test_git_archive_all.py @@ -10,6 +10,7 @@ from subprocess import check_call import sys from tarfile import TarFile, PAX_FORMAT +import warnings import pycodestyle import pytest @@ -384,8 +385,13 @@ def test_ignore(contents, exclude, tmpdir, git_env, monkeypatch): """ Ensure that GitArchiver respects export-ignore. """ - for name, value in git_env.items(): - monkeypatch.setenv(name, value) + + # On Python 2.7 contained code raises pytest.PytestWarning warning for no good reason. + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + + for name, value in git_env.items(): + monkeypatch.setenv(name, value) repo_path = os_path_join(tmpdir.strpath, 'repo') repo = Repo(repo_path)