def test_std_install(self, data, tmpdir): self.prep(data, tmpdir) wheel.install_unpacked_wheel( self.name, self.src, scheme=self.scheme, req_description=str(self.req), ) self.assert_installed()
def move_wheel_files( self, wheeldir, # type: str scheme, # type: Mapping[str, str] warn_script_location=True, # type: bool pycompile=True # type: bool ): # type: (...) -> None wheel.install_unpacked_wheel( self.name, wheeldir, scheme=scheme, req_description=str(self.req), pycompile=pycompile, warn_script_location=warn_script_location, )
def test_dist_info_contains_empty_dir(self, data, tmpdir): """ Test that empty dirs are not installed """ # e.g. https://github.com/pypa/pip/issues/1632#issuecomment-38027275 self.prep(data, tmpdir) src_empty_dir = os.path.join( self.src_dist_info, 'empty_dir', 'empty_dir') os.makedirs(src_empty_dir) assert os.path.isdir(src_empty_dir) wheel.install_unpacked_wheel( self.name, self.src, scheme=self.scheme, req_description=str(self.req), ) self.assert_installed() assert not os.path.isdir( os.path.join(self.dest_dist_info, 'empty_dir'))
def test_install_prefix(self, data, tmpdir): prefix = os.path.join(os.path.sep, 'some', 'path') self.prep(data, tmpdir) scheme = distutils_scheme( self.name, user=False, home=None, root=tmpdir, isolated=False, prefix=prefix, ) wheel.install_unpacked_wheel( self.name, self.src, scheme=scheme, req_description=str(self.req), ) bin_dir = 'Scripts' if WINDOWS else 'bin' assert os.path.exists(os.path.join(tmpdir, 'some', 'path', bin_dir)) assert os.path.exists(os.path.join(tmpdir, 'some', 'path', 'my_data'))