def make_release_tree(self, base_dir, files):
        sdist_orig.make_release_tree(self, base_dir, files)
        target = os.path.join(base_dir, 'setup.py')
        with open(__file__) as fp:
            template = fp.read()
        ver = self.distribution.version
        if not ver:
            from setuptools_scm import get_version
            ver = get_version(**scm_config())

        finalized = template.replace(
            'use_scm_version=scm_config,\n',
            'version="%s",\n' % ver)
        os.remove(target)
        with open(target, 'w') as fp:
            fp.write(finalized)
dataset/ETHPy150Open blue-yonder/pyscaffold/pyscaffold/contrib/setuptools_scm/setup.py/sdist.make_release_tree/original