Add build script.

This commit is contained in:
luxick
2018-02-19 22:56:31 +01:00
parent f90930c617
commit 2e8411c6b4
181 changed files with 288 additions and 284 deletions

17
build.py Normal file
View File

@@ -0,0 +1,17 @@
"""
Package cardvault using zipapp into an executable zip archive
"""
import os
import zipapp
INTERPRETER = '/usr/bin/env python3'
TARGET_FILENAME = 'cardvault'
# The bundled file should be placed into the build directory
target_path = os.path.join(os.path.dirname(__file__), 'build')
# Make sure it exists
if not os.path.isdir(target_path):
os.mkdir(target_path)
target = os.path.join(target_path, TARGET_FILENAME)
# Create archive
zipapp.create_archive(source='cardvault', target=target, interpreter=INTERPRETER)