forked from hoffstadt/DearPyGui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuildPythonForLinux.sh
More file actions
executable file
·43 lines (36 loc) · 919 Bytes
/
BuildPythonForLinux.sh
File metadata and controls
executable file
·43 lines (36 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
set -e
# Allow user to set number of jobs when compiling
while getopts 'j:' OPTION; do
case "$OPTION" in
j)
jobs="-j $OPTARG"
;;
?)
exit 1
;;
esac
shift $(($OPTIND - 1))
done
cd $(dirname $0) # Make sure we start in the Scripts directory
cd ../thirdparty/cpython
# Run `./BuildPythonForLinux.sh clean` to clean up the build directory
if [ "$1" = "clean" ]; then
rm -r build
exit 0
fi
# Default is to do a debug build
target="debug"
configure_args="--with-pydebug --enable-shared"
if [ "$1" = "release" ]; then
target="release"
configure_args=""
fi
# Build in build/ so cpython's .gitignore hides the build output
mkdir -p "build/$target"
cd "build/$target"
# Reconfiguring is time-consuming. Skip if it's already been done
if [ ! -f Makefile ]; then
/bin/bash ../../configure $configure_args
fi
make $jobs