我们从Python开源项目中,提取了以下4个代码示例,用于说明如何使用setuptools.command.sdist.sdist.make_release_tree()。
def make_release_tree(self, base_dir, files): import os sdist.make_release_tree(self, base_dir, files) version_file = os.path.join(base_dir, 'VERSION') print('updating %s' % (version_file,)) # Write to temporary file first and rename over permanent not # just to avoid atomicity issues (not likely an issue since if # interrupted the whole sdist directory is only partially # written) but because the upstream sdist may have made a hard # link, so overwriting in place will edit the source tree. with open(version_file + '.tmp', 'wb') as f: f.write('%s\n' % (pkg_version,)) os.rename(version_file + '.tmp', version_file) # XXX These should be attributes of `setup', but helpful distutils # doesn't pass them through when it doesn't know about them a priori.
def make_release_tree(self, basedir, files): _sdist.make_release_tree(self, basedir, files) self.execute(_run_build_tables, (basedir,), msg="Build the lexing/parsing tables")
def make_release_tree(self, basedir, files): clean_tables() build_tables() sdist.make_release_tree(self, basedir, files)