def pypi_packages(): package_temp = TOP.join('build/test-packages') with TOP.as_cwd(): run( sys.executable, 'tests/testing/make_sdists.py', 'tests/testing/packages', '.', # we need venv-update to be installable too str(package_temp), ) yield package_temp
def it_doesnt_wheel_local_dirs(tmpdir): venv = tmpdir.join('venv') install_coverage(venv) pip = venv.join('bin/pip').strpath run(pip, 'install', 'venv-update==' + __version__) run( venv.join('bin/pip-faster').strpath, 'install', TOP.join('tests/testing/packages/dependant_package').strpath, ) frozen_requirements = pip_freeze(str(venv)).split('\n') assert set(frozen_requirements) == { 'coverage==ANY', 'coverage-enable-subprocess==1.0', 'dependant-package==1', 'implicit-dependency==1', 'many-versions-package==3', 'pure-python-package==0.2.1', 'venv-update==' + __version__, '', } assert {wheel.name for wheel in cached_wheels(tmpdir)} == { 'implicit-dependency', 'many-versions-package', 'pure-python-package', }
def it_doesnt_wheel_local_dirs(tmpdir): venv = tmpdir.join('venv') install_coverage(venv) pip = venv.join('bin/pip').strpath run(pip, 'install', 'venv-update==' + __version__) run( venv.join('bin/pip-faster').strpath, 'install', TOP.join('tests/testing/packages/dependant_package').strpath, ) frozen_requirements = pip_freeze(str(venv)).split('\n') assert set(frozen_requirements) == set([ 'coverage==4.0.3', 'coverage-enable-subprocess==0', 'dependant-package==1', 'implicit-dependency==1', 'many-versions-package==3', 'pure-python-package==0.2.0', 'venv-update==' + __version__, 'wheel==0.29.0', '', ]) wheelhouse = tmpdir.join('home', '.cache', 'pip-faster', 'wheelhouse') assert set(Wheel(f.basename).name for f in wheelhouse.listdir()) == set([ 'implicit-dependency', 'many-versions-package', 'pure-python-package', ])
def enable_coverage(tmpdir): venv = tmpdir.join('virtualenv_run') if not venv.isdir(): run('virtualenv', venv.strpath) run( venv.join('bin/python').strpath, '-m', 'pip.__main__', 'install', '-r', TOP.join('requirements.d/coverage.txt').strpath, )
def pypi_packages(tmpdir_factory): package_temp = tmpdir_factory.ensuretemp("venv-update-packages") with TOP.as_cwd(): run( sys.executable, "tests/testing/make_sdists.py", "tests/testing/packages", ".", # we need pip-faster to be installable too str(package_temp), ) yield package_temp
def pypi_packages(tmpdir_factory): package_temp = tmpdir_factory.ensuretemp('venv-update-packages') with TOP.as_cwd(): run( sys.executable, 'tests/testing/make_sdists.py', 'tests/testing/packages', '.', # we need pip-faster to be installable too str(package_temp), ) yield package_temp
def it_doesnt_wheel_local_dirs(tmpdir): from pip.wheel import Wheel tmpdir.chdir() venv = enable_coverage(tmpdir, 'venv') pip = venv.join('bin/pip').strpath run(pip, 'install', 'pip-faster==' + __version__) run( venv.join('bin/pip-faster').strpath, 'install', TOP.join('tests/testing/packages/dependant_package').strpath, ) frozen_requirements = pip_freeze(str(venv)).split('\n') assert set(frozen_requirements) == set([ 'coverage==4.0.3', 'coverage-enable-subprocess==0', 'dependant-package==1', 'implicit-dependency==1', 'many-versions-package==3', 'pip-faster==' + __version__, 'pure-python-package==0.2.0', 'virtualenv==1.11.6', 'wheel==0.29.0', '', ]) wheelhouse = tmpdir.join('home', '.cache', 'pip-faster', 'wheelhouse') assert set(Wheel(f.basename).name for f in wheelhouse.listdir()) == set([ 'coverage', 'coverage-enable-subprocess', 'implicit-dependency', 'many-versions-package', 'pure-python-package', ])
def it_doesnt_wheel_local_dirs(tmpdir): venv = tmpdir.join('venv') install_coverage(venv) pip = venv.join('bin/pip').strpath run(pip, 'install', 'venv-update==' + __version__) run( venv.join('bin/pip-faster').strpath, 'install', TOP.join('tests/testing/packages/dependant_package').strpath, ) 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.1.1', 'six==1.10.0', 'venv-update==' + __version__, 'wheel==0.29.0', '', ]) assert set(wheel.name for wheel in cached_wheels(tmpdir)) == set(( 'implicit-dependency', 'many-versions-package', 'pure-python-package', ))