Fix mainfile option in setup.py

This commit is contained in:
Mitchell Stokes 2016-11-02 15:20:36 -07:00
parent e9ae6b5bb1
commit df7e3f03e2

View File

@ -19,7 +19,8 @@ class build(distutils.command.build.build):
def run(self): def run(self):
distutils.command.build.build.run(self) distutils.command.build.build.run(self)
basename = os.path.abspath(os.path.join(self.build_base, self.distribution.get_fullname())) basename = os.path.abspath(os.path.join(self.build_base, self.distribution.get_fullname()))
startfile = self.distribution.mainfile gamedir = self.distribution.game_dir
startfile = os.path.join(gamedir, self.distribution.mainfile)
if not os.path.exists(self.build_base): if not os.path.exists(self.build_base):
os.makedirs(self.build_base) os.makedirs(self.build_base)
@ -30,7 +31,6 @@ class build(distutils.command.build.build):
freezer.done(addStartupModules=True) freezer.done(addStartupModules=True)
freezer.generateRuntimeFromStub(basename) freezer.generateRuntimeFromStub(basename)
gamedir = self.distribution.game_dir
for item in os.listdir(gamedir): for item in os.listdir(gamedir):
if item in ('__pycache__', startfile): if item in ('__pycache__', startfile):
continue continue