Skip to content

Commit 3eefe55

Browse files
[Build] Migrate to Python3 (#1000)
* Configure Travis build env for Py3 Using default available version of 3.6.3 in `xenial` dist * Migrate to py3 * Fix documentation
1 parent c317dc5 commit 3eefe55

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@ language: cpp
1616
sudo: false
1717
compiler:
1818
- clang
19+
install:
20+
- pyenv install 3.6.3
21+
- pyenv global 3.6.3
1922
before_script:
2023
- CHECKOUT_DIR=$PWD && cd ..
2124
- chmod a+x $CHECKOUT_DIR/support/checkout-deps.sh
2225
- $CHECKOUT_DIR/support/checkout-deps.sh && cd $CHECKOUT_DIR
2326
script:
2427
- mkdir build && cd build
2528
- PATH="~/.local/bin:$PATH"
26-
- CC=clang-3.7 CXX=clang-3.7 python ../configure.py --enable-optimize
29+
- CC=clang-3.7 CXX=clang-3.7 python3 ../configure.py --enable-optimize
2730
- ambuild

support/checkout-deps.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,15 @@ repo="https://github.com/alliedmodders/hlsdk"
9292
origin=
9393
checkout
9494

95-
python_cmd=`command -v python`
95+
python_cmd=`command -v python3`
9696
if [ -z "$python_cmd" ]; then
97-
python_cmd=`command -v python3`
98-
99-
if [ -z "$python_cmd" ]; then
100-
echo "No suitable installation of Python detected"
101-
exit 1
102-
fi
97+
echo "No suitable installation of Python detected. Min required is 3.6"
98+
exit 1
10399
fi
104100

105101
`$python_cmd -c "import ambuild2"` 2>&1 1>/dev/null
106102
if [ $? -eq 1 ]; then
107-
echo "AMBuild is required to build SourceMod"
103+
echo "AMBuild is required to build AMXModX"
108104

109105
`$python_cmd -m pip --version` 2>&1 1>/dev/null
110106
if [ $? -eq 1 ]; then

0 commit comments

Comments
 (0)