我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用setuptools.command.sdist.walk_revctrl()。
def add_defaults(self): sdist.add_defaults(self) self.filelist.append(self.template) self.filelist.append(self.manifest) rcfiles = list(walk_revctrl()) if rcfiles: self.filelist.extend(rcfiles) elif os.path.exists(self.manifest): self.read_manifest() ei_cmd = self.get_finalized_command('egg_info') self.filelist.graft(ei_cmd.egg_info)
def add_defaults(self): sdist.add_defaults(self) self.filelist.append(self.template) self.filelist.append(self.manifest) rcfiles = list(walk_revctrl()) if rcfiles: self.filelist.extend(rcfiles) elif os.path.exists(self.manifest): self.read_manifest() ei_cmd = self.get_finalized_command('egg_info') self.filelist.include_pattern("*", prefix=ei_cmd.egg_info)
def test_walksvn(self): if self.base_version >= (1, 6): folder2 = 'third party2' folder3 = 'third party3' else: folder2 = 'third_party2' folder3 = 'third_party3' #TODO is this right expected = set([ os.path.join('a file'), os.path.join(folder2, 'Changes.txt'), os.path.join(folder2, 'MD5SUMS'), os.path.join(folder2, 'README.txt'), os.path.join(folder3, 'Changes.txt'), os.path.join(folder3, 'MD5SUMS'), os.path.join(folder3, 'README.txt'), os.path.join(folder3, 'TODO.txt'), os.path.join(folder3, 'fin'), os.path.join('third_party', 'README.txt'), os.path.join('folder', folder2, 'Changes.txt'), os.path.join('folder', folder2, 'MD5SUMS'), os.path.join('folder', folder2, 'WatashiNiYomimasu.txt'), os.path.join('folder', folder3, 'Changes.txt'), os.path.join('folder', folder3, 'fin'), os.path.join('folder', folder3, 'MD5SUMS'), os.path.join('folder', folder3, 'oops'), os.path.join('folder', folder3, 'WatashiNiYomimasu.txt'), os.path.join('folder', folder3, 'ZuMachen.txt'), os.path.join('folder', 'third_party', 'WatashiNiYomimasu.txt'), os.path.join('folder', 'lalala.txt'), os.path.join('folder', 'quest.txt'), # The example will have a deleted file # (or should) but shouldn't return it ]) self.assertEqual(set(x for x in walk_revctrl()), expected)
def add_defaults(self): sdist.add_defaults(self) self.filelist.append(self.template) self.filelist.append(self.manifest) rcfiles = list(walk_revctrl()) if rcfiles: self.filelist.extend(rcfiles) elif os.path.exists(self.manifest): self.read_manifest() ei_cmd = self.get_finalized_command('egg_info') self._add_egg_info(cmd=ei_cmd) self.filelist.include_pattern("*", prefix=ei_cmd.egg_info)