예제 #1
0
 def get_dist_info(self, zf):
     # find the correct name of the .dist-info dir in the wheel file
     for member in zf.namelist():
         dirname = posixpath.dirname(member)
         if dirname.endswith(".dist-info") and canonicalize_name(
                 dirname).startswith(canonicalize_name(self.project_name)):
             return dirname
     raise ValueError("unsupported wheel format. .dist-info not found")
예제 #2
0
 def get_dist_info(self, zf):
     # find the correct name of the .dist-info dir in the wheel file
     for member in zf.namelist():
         dirname = posixpath.dirname(member)
         if (dirname.endswith('.dist-info') and
                 canonicalize_name(dirname).startswith(
                     canonicalize_name(self.project_name))):
             return dirname
     raise ValueError("unsupported wheel format. .dist-info not found")
예제 #3
0
def test_wheel_install_pep_503():
    project_name = 'Foo_Bar'  # PEP 503 canonicalized name is "foo-bar"
    version = '1.0'
    with build_wheel(
            name=project_name,
            version=version,
    ) as filename, tempdir() as install_dir:
        new_filename = filename.replace(project_name,
                                        canonicalize_name(project_name))
        shutil.move(filename, new_filename)
        _check_wheel_install(new_filename, install_dir, None,
                             canonicalize_name(project_name), version, None)
예제 #4
0
def test_wheel_install_pep_503():
    project_name = 'Foo_Bar'    # PEP 503 canonicalized name is "foo-bar"
    version = '1.0'
    with build_wheel(
        name=project_name,
        version=version,
    ) as filename, tempdir() as install_dir:
        new_filename = filename.replace(project_name,
                                        canonicalize_name(project_name))
        shutil.move(filename, new_filename)
        _check_wheel_install(new_filename, install_dir, None,
                             canonicalize_name(project_name),
                             version, None)