def test_install_wheel_with_prefix(script, data):
 prefix_dir = (script.scratch_path / 'prefix')
 result = script.pip('install', 'simple.dist==0.1', '--prefix', prefix_dir, '--no-index', ('--find-links=' + data.find_links))
 if hasattr(sys, 'pypy_version_info'):
  lib = ((Path('scratch') / 'prefix') / 'site-packages')
 else:
  lib = ((Path('scratch') / 'prefix') / 'lib')
 assert (lib in result.files_created)

def test_install_wheel_with_prefix ( script , data ) : prefix_dir = ( script . scratch_path / 'prefix' ) result = script . pip ( 'install' , 'simple.dist==0.1' , '--prefix' , prefix_dir , '--no-index' , ( '--find-links=' + data . find_links ) ) if hasattr ( sys , 'pypy_version_info' ) : lib = ( ( Path ( 'scratch' ) / 'prefix' ) / 'site-packages' ) else : lib = ( ( Path ( 'scratch' ) / 'prefix' ) / 'lib' ) assert ( lib in result . files_created )
test installing a wheel using pip install --prefix .