-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(retspy): update helper scripts
- Loading branch information
Showing
6 changed files
with
96 additions
and
6 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 |
---|---|---|
@@ -1,11 +1,37 @@ | ||
## | ||
## Build the package for deployment | ||
## Build the project | ||
## | ||
|
||
# Activate the environment | ||
# To build a single executable: | ||
# .\build.ps1 -UseOneFile | ||
# | ||
# To build with separate files: | ||
# .\build.ps1 | ||
|
||
param ( | ||
[switch]$UseOneFile | ||
) | ||
|
||
# Activate the virtual environment | ||
|
||
& ./.venv/Scripts/Activate.ps1 | ||
|
||
# Build the package | ||
# Install/Update the `pyinstaller` tool package | ||
|
||
pip install pyinstaller --upgrade | ||
|
||
# Set the PyInstaller option based on user choice | ||
|
||
if ($UseOneFile) { | ||
|
||
# Build the application as a single executable | ||
|
||
pyinstaller --onefile --name cbrpy cbrpy.py | ||
|
||
} else { | ||
|
||
# Build the application with separate files | ||
|
||
pyinstaller --onedir --name cbrpy cbrpy.py | ||
|
||
python -m build -n # --wheel | ||
} |
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,18 @@ | ||
## | ||
## Generate model schema files | ||
## | ||
|
||
# Activate the environment | ||
|
||
& ./.venv/Scripts/Activate.ps1 | ||
|
||
# Install/Update the `datamodel-code-generator` tool package | ||
|
||
pip install datamodel-code-generator --upgrade | ||
|
||
# Generate schema files | ||
|
||
$schema = ./schema | ||
$models = ./models | ||
|
||
datamodel-codegen --input $schema --output $models --field-constraints --input-file-type jsonschema --target-python-version 3.12 --output-model-type pydantic_v2.BaseModel |
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,41 @@ | ||
## | ||
## Build the package for deployment | ||
## | ||
|
||
# To build a wheel: | ||
# .\pack.ps1 -Wheel | ||
# | ||
# To build a .tar.gz: | ||
# .\build.ps1 | ||
|
||
param ( | ||
[switch]$Wheel | ||
) | ||
|
||
# Activate the environment | ||
|
||
& ./.venv/Scripts/Activate.ps1 | ||
|
||
# Build the package based on user choice | ||
|
||
if ($Wheel) { | ||
|
||
# Install/Update the `build` and `wheel` tools packages | ||
|
||
pip install build wheel --upgrade | ||
|
||
# Build the package as a wheel | ||
|
||
python -m build -n --wheel | ||
|
||
} else { | ||
|
||
# Install/Update the `build` tool package | ||
|
||
pip install build --upgrade | ||
|
||
# Build the package as a .tar.gz | ||
|
||
python -m build -n | ||
|
||
} |
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 @@ | ||
./dist/retspy-radar.exe --help |