aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/sdist.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/command/sdist.py')
-rwxr-xr-xsetuptools/command/sdist.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py
index 0292efe2..4cc0ae1f 100755
--- a/setuptools/command/sdist.py
+++ b/setuptools/command/sdist.py
@@ -173,18 +173,18 @@ class sdist(_sdist):
)
-
-
-
-
-
-
-
-
-
-
-
-
+ def make_release_tree(self, base_dir, files):
+ _sdist.make_release_tree(self, base_dir, files)
+
+ # Save any egg_info command line options used to create this sdist
+ dest = os.path.join(base_dir, 'setup.cfg')
+ if hasattr(os,'link') and os.path.exists(dest):
+ # unlink and re-copy, since it might be hard-linked, and
+ # we don't want to change the source version
+ os.unlink(dest)
+ self.copy_file('setup.cfg', dest)
+
+ self.get_finalized_command('egg_info').save_version_info(dest)