1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Setup script for distributing SIFT as a stand-alone executable
# SIFT is the Signal and Image Filtering Tool
# Simple signal and image processing application based on guiqwt and guidata
# (see guiqwt/tests/sift.py)
"""Create a stand-alone executable"""
try:
from guidata.utils.disthelpers import Distribution
except ImportError:
raise ImportError("This script requires guidata 1.4+")
# Importing modules to be bundled
from guiqwt.tests import sift
def create_executable():
"""Build executable using ``guidata.utils.disthelpers``"""
dist = Distribution()
dist.setup(
name="Sift",
version=sift.VERSION,
description="Signal and Image Filtering Tool",
script="sift.pyw",
target_name="sift.exe",
target_dir="%s-%s" % ("Sift", sift.VERSION),
icon="sift.ico",
)
dist.add_modules("guidata", "guiqwt")
dist.excludes += ["IPython"]
# Building executable
dist.build("cx_Freeze", create_archive="move")
if __name__ == "__main__":
create_executable()
|