def test_parse_recursive(self): """Parse a manifest with recursive rules """ data = parse_manifest(get_test_file('manifest_recursive.ini')) self.assertEqual( data, ({'./': ['setup.py']}, {'src/': ['*.txt', '*.ini'], './': ['*.py']}))
def manifest(self): manifest_name = DEFAULT_MANIFEST egginfo = self.configuration['egginfo'] if 'manifest' in egginfo: manifest_name = egginfo['manifest'].as_file() files = Paths(verify=False) files.listdir(self.prefix) return files.as_manifest(*parse_manifest(manifest_name))
def test_parse_simple(self): """Parse a manifest with only simple rules """ data = parse_manifest(get_test_file('manifest_simple.ini')) self.assertEqual( data, ({'src/package/': ['__init__.py'], 'src/': ['README.txt'], './': ['setup.py']}, {}))
def install(self, path): egg_info = self.configuration['egginfo'] manifest_url = egg_info['manifest'].as_file() files = Paths(verify=False) files.listdir(self.distribution.package_path) prefixes = [] if 'source' in egg_info: prefixes = [egg_info['source'].as_text()] for filename, info in files.as_manifest(*parse_manifest(manifest_url), prefixes=prefixes): install_file(info['full'], os.path.join(path, filename)) # XXX This needs review # if self.distribution.extensions: # builder.install( # self.distribution, install_path, self.interpretor) write_egg_info(self.distribution, package_path=path)