music-dl/scripts/prepare_zipversion.py

20 lines
438 B
Python
Raw Permalink Normal View History

#! /usr/bin/env python# -*- coding: iso-8859-1 -*-
import shutil
import os
import sys
def create_archive():
os.chdir("..\\src")
print("Creating zip archive...")
if sys.version[0] == "3":
folder = "dist/main"
else:
folder = "dist"
shutil.make_archive("music_dl", "zip", folder)
2018-12-29 11:32:05 -06:00
# if os.path.exists("dist"):
# shutil.rmtree("dist")
if os.path.exists("build"):
shutil.rmtree("build")
os.chdir("..\\scripts")
create_archive()