From fcfe6ef3b7a49f68a9d732558ad80a7afe98aaa9 Mon Sep 17 00:00:00 2001 From: Shashank Singh Date: Sun, 28 Oct 2018 12:47:43 -0400 Subject: Add setup.py to egg-info by default Fixes GH issue #1506 --- setuptools/command/egg_info.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'setuptools/command/egg_info.py') diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index e1022d31..d9fe3da3 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -575,6 +575,12 @@ class manifest_maker(sdist): self.filelist.extend(rcfiles) elif os.path.exists(self.manifest): self.read_manifest() + + if os.path.exists("setup.py"): + # setup.py should be included by default, even if it's not + # the script called to create the sdist + self.filelist.append("setup.py") + ei_cmd = self.get_finalized_command('egg_info') self.filelist.graft(ei_cmd.egg_info) -- cgit v1.2.1