-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to pyinstaller for windows builds
- Loading branch information
Showing
5 changed files
with
20 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
rmdir /S /Q dist | ||
|
||
pyinstaller --noupx --onefile --noconfirm ^ | ||
--exclude-module Tkconstants ^ | ||
--exclude-module Tkinter ^ | ||
--exclude-module matplotlib ^ | ||
sushi.py | ||
|
||
mkdir dist\licenses | ||
copy /Y licenses\* dist\licenses\* | ||
copy LICENSE dist\licenses\Sushi.txt | ||
copy README.md dist\readme.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pyinstaller | ||
colorama |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,12 @@ | ||
from distutils.core import setup | ||
import os | ||
try: | ||
import py2exe | ||
except ImportError: | ||
pass | ||
import sys | ||
import sushi | ||
|
||
setup( | ||
name='Sushi', | ||
description='Automatic subtitle shifter based on audio', | ||
version='0.5.0', | ||
version=sushi.VERSION, | ||
url='https://github.com/tp7/Sushi', | ||
console=['sushi.py'], | ||
license='MIT', | ||
options={ | ||
'py2exe': { | ||
'compressed': True, | ||
'optimize': 2, | ||
"excludes": ["translation", "Tkconstants", "Tkinter", "tcl", 'pyreadline', 'email', | ||
'numpy.core.multiarray_tests', 'numpy.core.operand_flag_tests', 'numpy.core.struct_ufunc_test', | ||
'numpy.core.umath_tests', 'numpy.core._dotblas', 'matplotlib'], | ||
"dll_excludes": ['w9xpopen.exe', 'AVICAP32.dll', 'AVIFIL32.dll', 'MSACM32.dll', 'MSVFW32.dll'], | ||
} | ||
}, | ||
zipfile='lib/library.zip', | ||
data_files=[ | ||
('', ('readme.md', 'LICENSE')), | ||
('licenses', ('licenses/OpenCV.txt', 'licenses/SciPy.txt')) | ||
] | ||
license='MIT' | ||
) | ||
|
||
try: | ||
dist_dir = next(sys.argv[i + 1].strip('"') for i, arg in enumerate(sys.argv) if arg.lower() == '-d') | ||
except StopIteration: | ||
dist_dir = 'dist' | ||
|
||
# move our license to the right directory | ||
license_output_path = os.path.join(dist_dir, 'licenses', 'Sushi.txt') | ||
if os.path.exists(license_output_path): | ||
os.remove(license_output_path) | ||
os.rename(os.path.join(dist_dir, 'LICENSE'), license_output_path) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters