Ensure we use python 3 everywhere

This commit is contained in:
Edouard Oger 2019-07-23 19:18:46 -04:00
Родитель f72942a6a4
Коммит ca9d690f23
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: A2F740742307674A
7 изменённых файлов: 21 добавлений и 22 удалений

Просмотреть файл

@ -104,7 +104,7 @@ commands:
pushd ..
git clone https://chromium.googlesource.com/external/gyp.git
pushd gyp
python setup.py install
python3 setup.py install
popd
popd
- build-libs:

Просмотреть файл

@ -114,7 +114,7 @@ tasks:
- --login
- -cx
- >-
pip3 install --upgrade pip &&
python3 -m pip install --upgrade pip &&
python3 -m pip install pyyaml &&
git init repo &&
cd repo &&

Просмотреть файл

@ -120,7 +120,6 @@ def desktop_win32_x86_64_libs(deploy_environment):
task = (
linux_build_task("Desktop libs (win32-x86-64): build")
.with_script("""
apt-get install --quiet --yes --no-install-recommends mingw-w64
pushd libs
./build-all.sh win32-x86-64
popd
@ -325,12 +324,7 @@ def linux_build_task(name):
.with_script("""
rustup toolchain install stable
rustup default stable
# rustup target add x86_64-unknown-linux-gnu # See https://github.com/rust-lang-nursery/rustup.rs/issues/1533.
rustup target add x86_64-linux-android
rustup target add i686-linux-android
rustup target add armv7-linux-androideabi
rustup target add aarch64-linux-android
rustup target add x86_64-linux-android i686-linux-android armv7-linux-androideabi aarch64-linux-android
""")
.with_script("""
test -d $ANDROID_NDK_TOOLCHAIN_DIR/arm-$ANDROID_NDK_API_VERSION || $ANDROID_NDK_ROOT/build/tools/make_standalone_toolchain.py --arch="arm" --api="$ANDROID_NDK_API_VERSION" --install-dir="$ANDROID_NDK_TOOLCHAIN_DIR/arm-$ANDROID_NDK_API_VERSION" --deprecated-headers --force
@ -376,7 +370,6 @@ def linux_cross_compile_build_task(name):
# For ring's use of `cc`.
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_CFLAGS_x86_64_apple_darwin="-B /tmp/cctools/bin -target x86_64-darwin11 -isysroot /tmp/MacOSX10.11.sdk -Wl,-syslibroot,/tmp/MacOSX10.11.sdk -Wl,-dead_strip"
apt-get install --quiet --yes --no-install-recommends mingw-w64
rustup target add x86_64-pc-windows-gnu
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_PC_WINDOWS_GNU_RUSTFLAGS="-C linker=x86_64-w64-mingw32-gcc"
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_PC_WINDOWS_GNU_AR=x86_64-w64-mingw32-ar

Просмотреть файл

@ -6,7 +6,7 @@
# We also use that same version in decisionlib.py
FROM ubuntu:bionic-20180821
MAINTAINER Nick Alexander "nalexander@mozilla.com"
MAINTAINER Edouard Oger "eoger@mozilla.com"
# Configuration
@ -44,9 +44,10 @@ RUN apt-get update -qq \
# For `cc` crates; see https://github.com/jwilm/alacritty/issues/1440.
g++ \
clang \
python \
python-pip \
python-setuptools \
python3 \
python3-pip \
# taskcluster > mohawk > setuptools.
python3-setuptools \
locales \
unzip \
xz-utils \
@ -54,6 +55,8 @@ RUN apt-get update -qq \
tclsh \
patch \
file \
# For windows cross-compilation.
mingw-w64 \
# NSS build dependencies
gyp \
ninja-build \
@ -65,9 +68,10 @@ RUN apt-get update -qq \
# End of NSS build dependencies
&& apt-get clean
RUN pip install --upgrade pip
RUN pip install 'taskcluster>=4,<5'
RUN pip install pyyaml
RUN pip3 install --upgrade pip
RUN pip3 install \
'taskcluster>=4,<5' \
pyyaml
RUN locale-gen en_US.UTF-8
@ -123,12 +127,14 @@ RUN set -eux; \
ENV PATH=/root/.cargo/bin:$PATH
# sccache
RUN \
curl --silent --show-error --fail --location --retry 5 --retry-delay 10 \
https://github.com/mozilla/sccache/releases/download/0.2.8/sccache-0.2.8-x86_64-unknown-linux-musl.tar.gz \
| tar -xz --strip-components=1 -C /usr/local/bin/ \
sccache-0.2.8-x86_64-unknown-linux-musl/sccache
# tooltool
RUN \
curl --location --retry 10 --retry-delay 10 \
-o /usr/local/bin/tooltool.py \

Просмотреть файл

@ -43,10 +43,10 @@ for i in "${!TARGET_ARCHS[@]}"; do
export OBJCOPY="${ANDROID_NDK_TOOLCHAIN_DIR}/${TARGET_ARCHS[${i}]}-${ANDROID_NDK_API_VERSION}/bin/${OBJCOPY_BINS[${i}]}"
JNI_SO_PATH="${PROJECT_PATH}/build/rustJniLibs/android/${JNI_LIBS_TARGETS[${i}]}"
for sofile in "${JNI_SO_PATH}"/*.so; do
python automation/symbols-generation/symbolstore.py -c -s . --vcs-info "${DUMP_SYMS_DIR}"/dump_syms "${OUTPUT_FOLDER}" "${sofile}"
python3 automation/symbols-generation/symbolstore.py -c -s . --vcs-info "${DUMP_SYMS_DIR}"/dump_syms "${OUTPUT_FOLDER}" "${sofile}"
done
done
# 2. Upload them.
pip install -r automation/symbols-generation/requirements.txt
python automation/symbols-generation/upload_symbols.py "${OUTPUT_FOLDER}"
pip3 install -r automation/symbols-generation/requirements.txt
python3 automation/symbols-generation/upload_symbols.py "${OUTPUT_FOLDER}"

Просмотреть файл

@ -141,7 +141,7 @@ You will need the following tools in WSL:
* unzip - `sudo apt install unzip`
* python - `sudo apt install python`
* python 3 - `sudo apt install python3`
* java - you may already have it? try `java -version`. Java ended up causing me grief (stuck at 100% CPU doing nothing), but google pointed at one popular way of installing java:

Просмотреть файл

@ -35,7 +35,7 @@ echo ""
for ARCH in "${TARGET_ARCHS[@]}"; do
if [ ! -d "${ANDROID_NDK_TOOLCHAIN_DIR}/${ARCH}-${ANDROID_NDK_API_VERSION}" ]; then
echo "Installing ${ARCH} toolchain..."
python "${ANDROID_NDK_ROOT}/build/tools/make_standalone_toolchain.py" --arch="${ARCH}" --api="${ANDROID_NDK_API_VERSION}" --install-dir="${ANDROID_NDK_TOOLCHAIN_DIR}/${ARCH}-${ANDROID_NDK_API_VERSION}" --deprecated-headers --force
python3 "${ANDROID_NDK_ROOT}/build/tools/make_standalone_toolchain.py" --arch="${ARCH}" --api="${ANDROID_NDK_API_VERSION}" --install-dir="${ANDROID_NDK_TOOLCHAIN_DIR}/${ARCH}-${ANDROID_NDK_API_VERSION}" --deprecated-headers --force
else
echo "${ARCH} toolchain already exists. Skipping installation."
fi