Add setuptools as a dependency for pkg_resources module, and update build scripts to properly delete last build

This commit is contained in:
Micah Lee 2020-11-09 18:36:31 -08:00
parent 055942142f
commit c83c37d53b
6 changed files with 149 additions and 147 deletions

View file

@ -33,6 +33,12 @@ def main():
cli_dir = os.path.join(root, "cli")
desktop_dir = os.path.join(root, "desktop")
print("○ Clean up from last build")
if os.path.exist(os.path.join(cli_dir, "dist")):
shutil.rmtree(os.path.join(cli_dir, "dist"))
if os.path.exists(os.path.join(desktop_dir, "macOS")):
shutil.rmtree(os.path.join(desktop_dir, "macOS"))
print("○ Building onionshare-cli")
run(["poetry", "install"], cli_dir)
run(["poetry", "build"], cli_dir)
@ -40,10 +46,6 @@ def main():
whl_basename = os.path.basename(whl_filename)
shutil.copyfile(whl_filename, os.path.join(desktop_dir, whl_basename))
print("○ Clean up from last build")
if os.path.exists(os.path.join(desktop_dir, "macOS")):
shutil.rmtree(os.path.join(desktop_dir, "macOS"))
print("○ Create app bundle")
run(["briefcase", "create"], desktop_dir)
app_path = os.path.join(desktop_dir, "macOS", "OnionShare", "OnionShare.app")