[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
This commit is contained in:
parent
c317dc55c7
commit
3eefe5562e
|
@ -16,6 +16,9 @@ language: cpp
|
||||||
sudo: false
|
sudo: false
|
||||||
compiler:
|
compiler:
|
||||||
- clang
|
- clang
|
||||||
|
install:
|
||||||
|
- pyenv install 3.6.3
|
||||||
|
- pyenv global 3.6.3
|
||||||
before_script:
|
before_script:
|
||||||
- CHECKOUT_DIR=$PWD && cd ..
|
- CHECKOUT_DIR=$PWD && cd ..
|
||||||
- chmod a+x $CHECKOUT_DIR/support/checkout-deps.sh
|
- chmod a+x $CHECKOUT_DIR/support/checkout-deps.sh
|
||||||
|
@ -23,5 +26,5 @@ before_script:
|
||||||
script:
|
script:
|
||||||
- mkdir build && cd build
|
- mkdir build && cd build
|
||||||
- PATH="~/.local/bin:$PATH"
|
- PATH="~/.local/bin:$PATH"
|
||||||
- CC=clang-3.7 CXX=clang-3.7 python ../configure.py --enable-optimize
|
- CC=clang-3.7 CXX=clang-3.7 python3 ../configure.py --enable-optimize
|
||||||
- ambuild
|
- ambuild
|
||||||
|
|
|
@ -92,19 +92,15 @@ repo="https://github.com/alliedmodders/hlsdk"
|
||||||
origin=
|
origin=
|
||||||
checkout
|
checkout
|
||||||
|
|
||||||
python_cmd=`command -v python`
|
|
||||||
if [ -z "$python_cmd" ]; then
|
|
||||||
python_cmd=`command -v python3`
|
python_cmd=`command -v python3`
|
||||||
|
|
||||||
if [ -z "$python_cmd" ]; then
|
if [ -z "$python_cmd" ]; then
|
||||||
echo "No suitable installation of Python detected"
|
echo "No suitable installation of Python detected. Min required is 3.6"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
`$python_cmd -c "import ambuild2"` 2>&1 1>/dev/null
|
`$python_cmd -c "import ambuild2"` 2>&1 1>/dev/null
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
echo "AMBuild is required to build SourceMod"
|
echo "AMBuild is required to build AMXModX"
|
||||||
|
|
||||||
`$python_cmd -m pip --version` 2>&1 1>/dev/null
|
`$python_cmd -m pip --version` 2>&1 1>/dev/null
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user