forked from PyAV-Org/PyAV
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-debug-python
More file actions
executable file
·33 lines (23 loc) · 919 Bytes
/
Copy pathbuild-debug-python
File metadata and controls
executable file
·33 lines (23 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
#!/bin/bash
export PYAV_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.."; pwd)"
export PYAV_PYTHON_VERSION="2.7.13"
export PYAV_PLATFORM_SLUG="$(uname -s).$(uname -r)"
export PYAV_VENV_NAME="$PYAV_PLATFORM_SLUG.cpython-$PYAV_PYTHON_VERSION-debug"
export PYAV_VENV="$PYAV_ROOT/venvs/$PYAV_VENV_NAME"
export PYAV_PYTHON_SRC="$PYAV_ROOT/vendor/Python-$PYAV_PYTHON_VERSION"
if [[ ! -d "$PYAV_PYTHON_SRC" ]]; then
url="https://www.python.org/ftp/python/$PYAV_PYTHON_VERSION/Python-$PYAV_PYTHON_VERSION.tgz"
echo "Downloading $url"
wget -O "$PYAV_PYTHON_SRC.tgz" "$url" || exit 2
tar -C "$PYAV_ROOT/vendor" -xvzf "$PYAV_PYTHON_SRC.tgz" || exit 3
fi
cd "$PYAV_PYTHON_SRC" || exit 4
# TODO: Make generic.
export CPPFLAGS="-I$(brew --prefix openssl)/include"
export LDFLAGS="-L$(brew --prefix openssl)/lib"
# --with-pymalloc \
./configure \
--with-pydebug \
--prefix "$PYAV_VENV" \
|| exit 5
make -j 12 || exit 6