From 47c1ef99a1f2e9b6cd7df3cab35260e0a7632eb6 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Thu, 26 Jan 2017 08:32:40 -0800 Subject: [PATCH 1/4] Don't uninstall setuptools34 deps --- pip_faster.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pip_faster.py b/pip_faster.py index 7df07cd..7621563 100644 --- a/pip_faster.py +++ b/pip_faster.py @@ -33,6 +33,7 @@ from pip.index import HTMLPage from pip.index import Link from pip.index import PackageFinder +from pip.req import InstallRequirement from pip.wheel import Wheel from venv_update import colorize @@ -311,7 +312,6 @@ def trace_requirements(requirements): # TODO: pip does no validation of extras. should we? extras = [extra for extra in req.extras if extra in dist.extras] for sub_req in sorted(dist.requires(extras=extras), key=lambda req: req.key): - from pip.req import InstallRequirement sub_req = InstallRequirement(sub_req, req) if req_cycle(sub_req): @@ -388,8 +388,7 @@ def run(self, options, args): reqnames(previously_installed) - reqnames(required) - reqnames(successfully_installed) - - # TODO: instead of this, add `venv-update` to the `required`, and let trace-requirements do its work - set(['venv-update', 'virtualenv', 'pip', 'setuptools', 'wheel', 'argparse']) # the stage1 bootstrap packages + reqnames(trace_requirements([InstallRequirement.from_line('venv-update')])) # the stage1 bootstrap packages ) if extraneous: From d0a6a7960c32482a4b378603891986472a26a884 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Thu, 26 Jan 2017 08:47:17 -0800 Subject: [PATCH 2/4] pre-commit autoupdate --tags-only --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index df16240..3e26bb5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ - repo: git://github.com/pre-commit/pre-commit-hooks - sha: 5edf945ca57abe10a8f090f18e575eabb6a9585a + sha: v0.7.0 hooks: - id: autopep8-wrapper - id: check-added-large-files @@ -10,14 +10,14 @@ - id: check-yaml - id: debug-statements - id: detect-private-key - exclude: '^\.activate\.sh$' + exclude: ^\.activate\.sh$ - id: double-quote-string-fixer - id: end-of-file-fixer - exclude: '^\.activate\.sh$' + exclude: ^\.activate\.sh$ - id: flake8 exclude: ^docs/ - repo: git://github.com/asottile/reorder_python_imports - sha: 8b583ac1beb0dd0f14c4bceb0a53bb1023cb3dd7 + sha: v0.3.1 hooks: - id: reorder-python-imports args: From d75f0bfaea13e61cb40f213bee2165167775d2e5 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Thu, 26 Jan 2017 09:24:43 -0800 Subject: [PATCH 3/4] Fix setuptools bitrot --- tests/functional/faster.py | 7 ++++ tests/functional/get_installed_test.py | 5 ++- tests/functional/pip_faster.py | 41 +++++++++++++++++++++- tests/functional/simple_test.py | 48 +++++++++++++++++++++++--- tests/testing/__init__.py | 2 +- 5 files changed, 95 insertions(+), 8 deletions(-) diff --git a/tests/functional/faster.py b/tests/functional/faster.py index 99f2779..4e8b837 100644 --- a/tests/functional/faster.py +++ b/tests/functional/faster.py @@ -43,13 +43,20 @@ def venv_setup(): yield expected = '\n'.join(( + 'appdirs==1.4.0', 'dependant-package==1', 'implicit-dependency==1', 'many-versions-package==2.1', + 'packaging==16.8', + 'pip==9.0.1', 'project-with-c==0.1.0', 'pure-python-package==0.2.1', + 'pyparsing==2.1.10', + 'setuptools==34.0.2', + 'six==1.10.0', 'slow-python-package==0.1.0', 'venv-update==%s' % __version__, + 'wheel==0.29.0', '' )) assert pip_freeze() == expected diff --git a/tests/functional/get_installed_test.py b/tests/functional/get_installed_test.py index bcce4a8..ec312b1 100644 --- a/tests/functional/get_installed_test.py +++ b/tests/functional/get_installed_test.py @@ -7,7 +7,10 @@ from testing import run from venv_update import __version__ -ALWAYS = set(['pip', 'venv-update', 'setuptools', 'wheel']) +ALWAYS = set(( + 'appdirs', 'packaging', 'pip', 'pyparsing', 'six', 'setuptools', + 'venv-update', 'wheel', +)) def get_installed(): diff --git a/tests/functional/pip_faster.py b/tests/functional/pip_faster.py index 24528b3..ef1c653 100644 --- a/tests/functional/pip_faster.py +++ b/tests/functional/pip_faster.py @@ -32,8 +32,15 @@ def it_installs_stuff(tmpdir): install_coverage(venv) assert pip_freeze(str(venv)) == '''\ +appdirs==1.4.0 coverage==4.3.4 coverage-enable-subprocess==1.0 +packaging==16.8 +pip==9.0.1 +pyparsing==2.1.10 +setuptools==34.0.2 +six==1.10.0 +wheel==0.29.0 ''' pip = venv.join('bin/pip').strpath @@ -42,7 +49,18 @@ def it_installs_stuff(tmpdir): assert [ req.split('==')[0] for req in pip_freeze(str(venv)).split() - ] == ['coverage', 'coverage-enable-subprocess', 'venv-update'] + ] == [ + 'appdirs', + 'coverage', + 'coverage-enable-subprocess', + 'packaging', + 'pip', + 'pyparsing', + 'setuptools', + 'six', + 'venv-update', + 'wheel', + ] run(str(venv.join('bin/pip-faster')), 'install', 'pure_python_package') @@ -88,9 +106,16 @@ def it_installs_stuff_with_dash_e_without_wheeling(tmpdir): frozen_requirements = pip_freeze(str(venv)).split('\n') assert set(frozen_requirements) == set([ '-e git://github.com/Yelp/dumb-init.git@87545be699a13d0fd31f67199b7782ebd446437e#egg=dumb_init', # noqa + 'appdirs==1.4.0', 'coverage-enable-subprocess==1.0', 'coverage==4.3.4', + 'packaging==16.8', + 'pip==9.0.1', + 'pyparsing==2.1.10', + 'setuptools==34.0.2', + 'six==1.10.0', 'venv-update==' + __version__, + 'wheel==0.29.0', '', ]) @@ -133,13 +158,20 @@ def it_doesnt_wheel_local_dirs(tmpdir): frozen_requirements = pip_freeze(str(venv)).split('\n') assert set(frozen_requirements) == set([ + 'appdirs==1.4.0', 'coverage==4.3.4', 'coverage-enable-subprocess==1.0', 'dependant-package==1', 'implicit-dependency==1', 'many-versions-package==3', + 'packaging==16.8', + 'pip==9.0.1', 'pure-python-package==0.2.1', + 'pyparsing==2.1.10', + 'setuptools==34.0.2', + 'six==1.10.0', 'venv-update==' + __version__, + 'wheel==0.29.0', '', ]) @@ -166,10 +198,17 @@ def it_doesnt_wheel_git_repos(tmpdir): frozen_requirements = pip_freeze(str(venv)).split('\n') assert set(frozen_requirements) == set([ + 'appdirs==1.4.0', 'coverage-enable-subprocess==1.0', 'coverage==4.3.4', 'dumb-init==0.5.0', + 'packaging==16.8', + 'pip==9.0.1', + 'pyparsing==2.1.10', + 'setuptools==34.0.2', + 'six==1.10.0', 'venv-update==' + __version__, + 'wheel==0.29.0', '', ]) diff --git a/tests/functional/simple_test.py b/tests/functional/simple_test.py index 01dc230..ef213d0 100644 --- a/tests/functional/simple_test.py +++ b/tests/functional/simple_test.py @@ -39,14 +39,21 @@ def test_install_custom_path_and_requirements(tmpdir): requirements file.""" tmpdir.chdir() requirements( - 'six==1.8.0\n', + 'mccabe==0.6.0\n', path='requirements2.txt', ) enable_coverage() venv_update('venv=', 'venv2', 'install=', '-r', 'requirements2.txt') assert pip_freeze('venv2') == '\n'.join(( - 'six==1.8.0', + 'appdirs==1.4.0', + 'mccabe==0.6.0', + 'packaging==16.8', + 'pip==9.0.1', + 'pyparsing==2.1.10', + 'setuptools==34.0.2', + 'six==1.10.0', 'venv-update==' + __version__, + 'wheel==0.29.0', '' )) @@ -324,13 +331,20 @@ def flake8_older(): ''' % TOP) venv_update() assert pip_freeze() == '\n'.join(( + 'appdirs==1.4.0', 'coverage==4.3.4', 'coverage-enable-subprocess==1.0', 'flake8==2.0', 'mccabe==0.3', + 'packaging==16.8', 'pep8==1.5.7', + 'pip==9.0.1', 'pyflakes==0.7.3', + 'pyparsing==2.1.10', + 'setuptools==34.0.2', + 'six==1.10.0', 'venv-update==' + __version__, + 'wheel==0.29.0', '' )) @@ -349,13 +363,20 @@ def flake8_newer(): ''' % TOP) venv_update() assert pip_freeze() == '\n'.join(( + 'appdirs==1.4.0', 'coverage==4.3.4', 'coverage-enable-subprocess==1.0', 'flake8==2.2.5', 'mccabe==0.3', + 'packaging==16.8', 'pep8==1.5.7', + 'pip==9.0.1', 'pyflakes==0.8.1', + 'pyparsing==2.1.10', + 'setuptools==34.0.2', + 'six==1.10.0', 'venv-update==' + __version__, + 'wheel==0.29.0', '' )) @@ -410,7 +431,14 @@ def test_override_requirements_file(tmpdir): assert '\n Successfully uninstalled pure-python-package-0.2.1\n' in out expected = '\n'.join(( - 'venv-update==%s' % __version__, + 'appdirs==1.4.0', + 'packaging==16.8', + 'pip==9.0.1', + 'pyparsing==2.1.10', + 'setuptools==34.0.2', + 'six==1.10.0', + 'venv-update==' + __version__, + 'wheel==0.29.0', '' )) assert pip_freeze() == expected @@ -434,7 +462,10 @@ def test_cant_wheel_package(tmpdir): Running setup.py install for cant-wheel-package ... done Successfully installed cant-wheel-package-0.1.0 pure-python-package-0.2.1 ''' in out # noqa - assert pip_freeze().startswith('cant-wheel-package==0.1.0\n') + assert pip_freeze().startswith( + 'appdirs==1.4.0\n' + 'cant-wheel-package==0.1.0\n' + ) @pytest.mark.usefixtures('pypi_server') @@ -448,9 +479,16 @@ def test_has_extras(tmpdir): venv_update() expected = '\n'.join(( + 'appdirs==1.4.0', 'implicit-dependency==1', + 'packaging==16.8', + 'pip==9.0.1', 'pure-python-package==0.2.1', - 'venv-update==%s' % __version__, + 'pyparsing==2.1.10', + 'setuptools==34.0.2', + 'six==1.10.0', + 'venv-update==' + __version__, + 'wheel==0.29.0', '' )) assert pip_freeze() == expected diff --git a/tests/testing/__init__.py b/tests/testing/__init__.py index d89dd46..999f4bf 100644 --- a/tests/testing/__init__.py +++ b/tests/testing/__init__.py @@ -97,7 +97,7 @@ def uncolor(text): def pip_freeze(venv='venv'): from os.path import join - out, err = run(join(venv, 'bin', 'pip'), 'freeze', '--local') + out, err = run(join(venv, 'bin', 'pip'), 'freeze', '--local', '--all') # Most python distributions which have argparse in the stdlib fail to # expose it to setuptools as an installed package (it seems all but ubuntu From 6e8e439ebb59508c0de98e1642d4152348c1abae Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Thu, 26 Jan 2017 12:23:53 -0800 Subject: [PATCH 4/4] Remove circle-ci: travis is faster and not broken in 2.6 --- CI/circle/install-python | 18 ------------ CI/circle/main | 49 ------------------------------- CI/circle/runlint | 5 ---- CI/circle/runtest | 12 -------- CI/circle/timestamp | 2 -- CI/coverage | 2 +- README.md | 2 -- circle.yml | 13 -------- docs/source/_templates/about.html | 9 ------ docs/source/index.rst | 2 +- 10 files changed, 2 insertions(+), 112 deletions(-) delete mode 100755 CI/circle/install-python delete mode 100755 CI/circle/main delete mode 100755 CI/circle/runlint delete mode 100755 CI/circle/runtest delete mode 100755 CI/circle/timestamp delete mode 100644 circle.yml diff --git a/CI/circle/install-python b/CI/circle/install-python deleted file mode 100755 index a6a7e93..0000000 --- a/CI/circle/install-python +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -set -eu -PYTHON="$1" -PYENV="$HOME/.pyenv" -CACHE="$HOME/.cache/pyenv" - -set -x -if ! [ -d $CACHE/$PYTHON ]; then - mkdir -p $CACHE/ - if [ -d $PYENV/versions/$PYTHON ]; then - ln -sf $PYENV/versions/$PYTHON $CACHE/$PYTHON - else - $PYENV/plugins/python-build/bin/python-build $PYTHON $CACHE/$PYTHON - fi -fi - -ln -sf $CACHE/$PYTHON/bin/* ./bin/ -rm -f ./bin/virtualenv* ./bin/pip* diff --git a/CI/circle/main b/CI/circle/main deleted file mode 100755 index 7ed5103..0000000 --- a/CI/circle/main +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -set -eu - -### definitions -source CI/env -PATH=$PWD/CI/circle:$PATH -trap timestamp EXIT - -### main -set -x -: $TOX_TESTENV_PASSENV - -### machine -lsb_release -a -test $CIRCLE_NODE_TOTAL -eq 4 - -timestamp -sudo apt-get update -sudo apt-get install -y python2.7-dev python3.4-dev - -### per-node actions -timestamp -case $CIRCLE_NODE_INDEX in -0) ## 13m - ./CI/circle/install-python 2.7.10 - PYTHON=python2.7 runtest # 6m - - ./CI/circle/install-python 2.6.8 - PYTHON=python2.6 runtest # 7m - ;; -1) ## ??? - ./CI/circle/install-python 3.5.0 - PYTHON=python3.5 runtest # 7.5m - ;; -2) ## ??? - # using python3.4.3 from the system - PYTHON=python3.4 runlint # 40s - - ./CI/circle/install-python 2.7.10 - PYTHON=python2.7 runlint # 40s - - # using python3.4.3 from the system - PYTHON=python3.4 runtest # 6m - ;; -3) ## ??? - ./CI/circle/install-python pypy-4.0.1 - PYTHON=pypy runtest # 9m - ;; -esac diff --git a/CI/circle/runlint b/CI/circle/runlint deleted file mode 100755 index 9d01d8b..0000000 --- a/CI/circle/runlint +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -set -eux -timestamp -touch Makefile -REQUIREMENTS=requirements.d/lint.txt exec make lint diff --git a/CI/circle/runtest b/CI/circle/runtest deleted file mode 100755 index 1f1b217..0000000 --- a/CI/circle/runtest +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -eux -timestamp -touch Makefile -# gives better labelling in codecov.io -export CIRCLE_NODE_INDEX="$CIRCLE_NODE_INDEX:$PYTHON" -export PYTEST_OPTIONS=" - --junit-xml=$CIRCLE_TEST_REPORTS/pytest/$CIRCLE_NODE_INDEX.xml - --junit-prefix=$CIRCLE_NODE_INDEX: -" -export REQUIREMENTS=requirements.d/test.txt -exec make test diff --git a/CI/circle/timestamp b/CI/circle/timestamp deleted file mode 100755 index 26cd4f2..0000000 --- a/CI/circle/timestamp +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -exec date +"%F %T.%N" diff --git a/CI/coverage b/CI/coverage index 082f4db..790f698 100755 --- a/CI/coverage +++ b/CI/coverage @@ -5,4 +5,4 @@ export TOP=$PWD coverage xml pip-faster install codecov # pending https://github.com/codecov/codecov-python/pull/57 -codecov -e CIRCLECI TRAVIS PYTHON --file coverage.xml +codecov -e TRAVIS PYTHON --file coverage.xml diff --git a/README.md b/README.md index 6bfac76..612a426 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@ Quickly and exactly synchronize a large python project's virtualenv with its [![PyPI version](https://badge.fury.io/py/venv-update.svg)] (https://pypi.python.org/pypi/venv-update) -[![Circle CI](https://circleci.com/gh/Yelp/venv-update/tree/master.svg?style=shield)] -(https://circleci.com/gh/Yelp/venv-update/tree/master) [![Travis CI](https://img.shields.io/travis/Yelp/venv-update/master.svg?label=travis-ci)] (https://travis-ci.org/Yelp/venv-update/branches) [![Coverage](https://codecov.io/github/Yelp/venv-update/coverage.svg?branch=master)] diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 9b1ca4a..0000000 --- a/circle.yml +++ /dev/null @@ -1,13 +0,0 @@ -dependencies: - # the cache will only save files created during this stage - cache_directories: - - ~/.pre-commit - - ~/.cache - override: - - true dun need no stinkin deps - -test: - override: - # see https://circleci.com/docs/parallel-manual-setup - - ./CI/circle/main: - parallel: true diff --git a/docs/source/_templates/about.html b/docs/source/_templates/about.html index f6a763e..79ed5e4 100644 --- a/docs/source/_templates/about.html +++ b/docs/source/_templates/about.html @@ -18,12 +18,3 @@ />

- -

- - https://circleci.com/gh/Yelp/venv-update/tree/master.svg?style=shield - -

diff --git a/docs/source/index.rst b/docs/source/index.rst index d2286b9..243409d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,7 +2,7 @@ venv-update: quick, exact ========================= `Issues `_ | `Github `_ | -`CI `_ | +`CI `_ | `PyPI `_ Release v\ |release| (:ref:`Installation`)