diff --git a/build_tools/packaging/wheel/build_from_source.sh b/build_tools/packaging/wheel/build_from_source.sh index 665d3cfece..31279ac4ed 100755 --- a/build_tools/packaging/wheel/build_from_source.sh +++ b/build_tools/packaging/wheel/build_from_source.sh @@ -28,16 +28,21 @@ popd # build mad, statically pushd libmad-0.15.1b +# See https://stackoverflow.com/a/12864879/23845 +sed -i.bak 's/-march=i486//' configure ./configure --disable-shared --enable-static --prefix="$PREFIX/audio/third_party/mad" CFLAGS=-fPIC CXXFLAGS=-fPIC \ --with-pic --disable-debug --disable-dependency-tracking make -s -j && make install popd # build sox, statically +# --without-png makes OS X build less hazardous; somehow the build +# finds png and enables it. We don't want it; we'd need to package +# it statically if we do. pushd sox-14.4.2 ./configure --disable-shared --enable-static --prefix="$PREFIX/audio/third_party/sox" \ LDFLAGS="-L$PREFIX/audio/third_party/lame/lib -L$PREFIX/audio/third_party/flac/lib -L$PREFIX/audio/third_party/mad/lib" \ CPPFLAGS="-I$PREFIX/audio/third_party/lame/include -I$PREFIX/audio/third_party/flac/include -I$PREFIX/audio/third_party/mad/include" \ - --with-lame --with-flac --with-mad --without-oggvorbis --without-oss --without-sndfile CFLAGS=-fPIC CXXFLAGS=-fPIC --with-pic --disable-debug --disable-dependency-tracking + --with-lame --with-flac --with-mad --without-png --without-oggvorbis --without-oss --without-sndfile CFLAGS=-fPIC CXXFLAGS=-fPIC --with-pic --disable-debug --disable-dependency-tracking make -s -j && make install popd diff --git a/build_tools/packaging/wheel/linux_manywheel.sh b/build_tools/packaging/wheel/linux_manywheel.sh index 66e7daf7f5..9540a1ff5c 100755 --- a/build_tools/packaging/wheel/linux_manywheel.sh +++ b/build_tools/packaging/wheel/linux_manywheel.sh @@ -5,7 +5,7 @@ if [ "$#" -ne 1 ]; then fi export CUVER="$1" # cu90 cu100 cpu -export TORCHAUDIO_BUILD_VERSION="0.2.0" +export TORCHAUDIO_BUILD_VERSION="0.3.0" export TORCHAUDIO_BUILD_NUMBER="1" export OUT_DIR="/remote/$CUVER" @@ -27,13 +27,18 @@ export PREFIX="/tmp" cd /tmp/audio for PYDIR in "${python_installations[@]}"; do - # wheels for numba does not work with python 2.7 - if [[ "$PYDIR" == "/opt/python/cp27-cp27m/" || "$PYDIR" == "/opt/python/cp27-cp27mu/" ]]; then - continue; - fi export PATH=$PYDIR/bin:$OLD_PATH pip install --upgrade pip - pip install -r requirements.txt + + # For true hermetic builds, you ought to be constructing the docker + # from scratch each time. But this makes things marginally safer if + # you aren't doing this. + pip uninstall -y torch || true + pip uninstall -y torch_nightly || true + + # NB: do not actually install requirements.txt; that is only needed for + # testing + pip install torch numpy future IS_WHEEL=1 python setup.py clean IS_WHEEL=1 python setup.py bdist_wheel mkdir -p $OUT_DIR diff --git a/build_tools/packaging/wheel/osx_wheel.sh b/build_tools/packaging/wheel/osx_wheel.sh index 7f4cc53a9f..b018bb7ffe 100755 --- a/build_tools/packaging/wheel/osx_wheel.sh +++ b/build_tools/packaging/wheel/osx_wheel.sh @@ -11,7 +11,7 @@ wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh & . ~/minconda_wheel_env_tmp/bin/activate -export TORCHAUDIO_BUILD_VERSION="0.2.0" +export TORCHAUDIO_BUILD_VERSION="0.3.0" export TORCHAUDIO_BUILD_NUMBER="1" export OUT_DIR=~/torchaudio_wheels @@ -40,9 +40,7 @@ do conda create -yn $env_name python="$desired_python" conda activate $env_name - # install torchaudio dependencies - pip install -r requirements.txt - + pip install torch numpy future IS_WHEEL=1 python setup.py clean IS_WHEEL=1 python setup.py bdist_wheel mkdir -p $OUT_DIR