Пример #1
0
 def pkg_with_mixed_case(site_dir):
     """
     Create minimal metadata for a package with mixed case
     in the name.
     """
     metadata_dir = site_dir / 'CherryPy.dist-info'
     metadata_dir.mkdir()
     metadata = metadata_dir / 'METADATA'
     with metadata.open('w') as strm:
         strm.write('Version: 1.0\n')
     return 'CherryPy'
Пример #2
0
 def pkg_with_non_ascii_description(site_dir):
     """
     Create minimal metadata for a package with non-ASCII in
     the description.
     """
     metadata_dir = site_dir / 'portend.dist-info'
     metadata_dir.mkdir()
     metadata = metadata_dir / 'METADATA'
     with metadata.open('w', encoding='utf-8') as fp:
         fp.write('Description: pôrˈtend\n')
     return 'portend'
Пример #3
0
 def pkg_with_dashes(site_dir):
     """
     Create minimal metadata for a package with dashes
     in the name (and thus underscores in the filename).
     """
     metadata_dir = site_dir / 'my_pkg.dist-info'
     metadata_dir.mkdir()
     metadata = metadata_dir / 'METADATA'
     with metadata.open('w') as strm:
         strm.write('Version: 1.0\n')
     return 'my-pkg'
Пример #4
0
    def pkg_with_non_ascii_description_egg_info(site_dir):
        """
        Create minimal metadata for an egg-info package with
        non-ASCII in the description.
        """
        metadata_dir = site_dir / 'portend.dist-info'
        metadata_dir.mkdir()
        metadata = metadata_dir / 'METADATA'
        with metadata.open('w', encoding='utf-8') as fp:
            fp.write(textwrap.dedent("""
                Name: portend

                pôrˈtend
                """).lstrip())
        return 'portend'