Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ rich = "*"
requests-cache = "*"
pyinstaller = "*"
numpy = "*"
macholib = "*"
cattrs = "*"

[dev-packages]

Expand All @@ -17,6 +19,7 @@ python_version = "3.10"

[scripts]
build = "./devtools/build.sh"
build_macos = "./devtools/build_macos.sh"
build_windows = "./devtools/build_windows.sh"
cfscripts = "python ./src/main.py"
comuaccount = "python ./src/scripts/ComuACCount/main.py"
Expand Down
27 changes: 27 additions & 0 deletions devtools/build_macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
mkdir -p ./bin ./_dist ./_specs ./_build

BIN=$(realpath ./bin)
DIST=$(realpath ./_dist)
SPECS=$(realpath ./_specs)
BUILD=$(realpath ./_build)

function pyinstall {
pyinstaller --distpath $DIST --workpath $BUILD --specpath $SPECS -F -p ./src $@
}

function python_build {
pyinstall -n $1 src/scripts/$2
}

# scripts linux
python_build dailyacs DailyACs/main.py
python_build comuaccount ComuACCount/main.py
python_build rangerank RangeRank/main.py
python_build virtualperformance VirtualPerformance/main.py
python_build unsolvedcontestproblems UnsolvedContestProblems/main.py
python_build whatif WhatIf/main.py

# cfscripts linux
pyinstall -n cfscripts ./src/main.py
cp $DIST/cfscripts $BIN/cfscripts