-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding pyinstaller and scripts to generate release
- Loading branch information
Showing
7 changed files
with
63 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ _data/ | |
__pycache__ | ||
*.egg-info | ||
bin | ||
dist | ||
dist | ||
build | ||
releases |
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,3 @@ | ||
from PyInstaller.utils.hooks import copy_metadata, collect_data_files | ||
|
||
datas = copy_metadata('zbarlight') |
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,33 @@ | ||
# -*- mode: python -*- | ||
|
||
block_cipher = None | ||
|
||
|
||
a = Analysis(['pypaperbak/__main__.py'], | ||
pathex=['/home/user/projetos/pypaperbak'], | ||
binaries=[], | ||
datas=[('README.md', '.'), ('LICENSE.md', '.'), ('samples', 'samples')], | ||
hiddenimports=['png'], | ||
hookspath=['pyinstaller-hooks'], | ||
runtime_hooks=[], | ||
excludes=[], | ||
win_no_prefer_redirects=False, | ||
win_private_assemblies=False, | ||
cipher=block_cipher) | ||
pyz = PYZ(a.pure, a.zipped_data, | ||
cipher=block_cipher) | ||
exe = EXE(pyz, | ||
a.scripts, | ||
exclude_binaries=True, | ||
name='pypaperbak', | ||
debug=False, | ||
strip=False, | ||
upx=True, | ||
console=True ) | ||
coll = COLLECT(exe, | ||
a.binaries, | ||
a.zipfiles, | ||
a.datas, | ||
strip=False, | ||
upx=True, | ||
name='pypaperbak') |
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
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,14 @@ | ||
#!/bin/env python | ||
|
||
import os | ||
import shutil | ||
|
||
exec(open('pypaperbak/_version.py').read()) | ||
|
||
shutil.rmtree('build', True) | ||
shutil.rmtree('dist', True) | ||
os.makedirs('releases', exist_ok=True) | ||
|
||
|
||
os.system('pyinstaller pypaperbak.spec') | ||
os.system('tar -C dist -cjf releases/pypaperbak-%s-linux-x64.tar.bz2 pypaperbak' % __version__) |