fix windows exit(0) to sys.exit(0), add pyisntaller functionality

This commit is contained in:
moritz 2019-05-29 12:45:08 +02:00
parent b6a8433973
commit ff36d821a9
7 changed files with 43 additions and 4 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
build/* build/*
dist/*

5
build.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
mkdir -p build
cd build
pyinstaller --distpath=../dist --workpath=../build ../src/have_I_b33n_pwned.py

View File

@ -1,3 +0,0 @@
#!/bin/bash
python -m pyinstaller --distpath=dist --workpath=build src/have_I_b€€n_pwned.py

0
dist/foo vendored
View File

36
have_I_b33n_pwned.spec Normal file
View File

@ -0,0 +1,36 @@
# -*- mode: python -*-
block_cipher = None
a = Analysis(['..\\src\\have_I_b33n_pwned.py'],
pathex=['C:\\Users\\AmP\\have_i_b33n_pwned'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name='have_I_b33n_pwned',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='have_I_b33n_pwned')

View File

@ -27,7 +27,7 @@
from sys import argv, stdout from sys import argv, stdout, exit
from hashlib import sha1 from hashlib import sha1
from getpass import getpass from getpass import getpass
from requests import get from requests import get

View File