-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[py] BUILD_ROOT environment var to minimise pollution in the source repo
- Loading branch information
Showing
5 changed files
with
25 additions
and
25 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
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,12 +1,18 @@ | ||
#!/usr/bin/env bash | ||
set -eu | ||
cd $(dirname $0) | ||
source py_env.sh | ||
|
||
BUILDDIR=${BUILD_ROOT:-$(realpath $(dirname $0))/build}/$(basename $(pwd))-$(echo $(basename $0) | sed 's/build_*\(.*\).sh/\1/')-$(uname)-$(uname -m)-venv | ||
if [ ! -d $BUILDDIR ] ; then | ||
python3 -m venv $BUILDDIR | ||
$BUILDDIR/bin/pip install pysdl2 pysdl2-dll | ||
fi | ||
source $BUILDDIR/bin/activate | ||
|
||
cat >rosettaboy-release <<EOD | ||
#!/usr/bin/env bash | ||
set -eu | ||
source "\$(dirname \$0)/py_env.sh" | ||
source $BUILDDIR/bin/activate | ||
PYTHONPATH="\$(dirname \$0)" exec python3 -c "from src.main import main ; import sys ; sys.exit(main(sys.argv))" \$* | ||
EOD | ||
chmod +x rosettaboy-release |
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 was deleted.
Oops, something went wrong.