From 083da063d31d20d9b3051e46173d36eb4260bf63 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Wed, 29 Nov 2023 16:31:09 -0600 Subject: [PATCH] Add package script --- .gitignore | 1 + script/package | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100755 script/package diff --git a/.gitignore b/.gitignore index 7ffe984..3d4ec4f 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ venv/ *.egg-info/ /local/ +/dist/ diff --git a/script/package b/script/package new file mode 100755 index 0000000..1f04c1f --- /dev/null +++ b/script/package @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 +import subprocess +import venv +from pathlib import Path + +_DIR = Path(__file__).parent +_PROGRAM_DIR = _DIR.parent +_VENV_DIR = _PROGRAM_DIR / ".venv" + +context = venv.EnvBuilder().ensure_directories(_VENV_DIR) +subprocess.check_call([context.env_exe, _PROGRAM_DIR / "setup.py", "bdist_wheel"])