File tree Expand file tree Collapse file tree 3 files changed +14
-11
lines changed
build_tools/packaging/wheel Expand file tree Collapse file tree 3 files changed +14
-11
lines changed Original file line number Diff line number Diff line change 2828
2929# build mad, statically
3030pushd libmad-0.15.1b
31+ # See https://stackoverflow.com/a/12864879/23845
32+ sed -i.bak ' s/-march=i486//' configure
3133./configure --disable-shared --enable-static --prefix=" $PREFIX /audio/third_party/mad" CFLAGS=-fPIC CXXFLAGS=-fPIC \
3234 --with-pic --disable-debug --disable-dependency-tracking
3335make -s -j && make install
Original file line number Diff line number Diff line change @@ -27,13 +27,15 @@ export PREFIX="/tmp"
2727cd /tmp/audio
2828
2929for PYDIR in " ${python_installations[@]} " ; do
30- # wheels for numba does not work with python 2.7
31- if [[ " $PYDIR " == " /opt/python/cp27-cp27m/" || " $PYDIR " == " /opt/python/cp27-cp27mu/" ]]; then
32- continue ;
33- fi
3430 export PATH=$PYDIR /bin:$OLD_PATH
31+ # For true hermetic builds, you ought to be constructing the docker
32+ # from scratch each time. But this makes things marginally safer if
33+ # you aren't doing this.
34+ pip uninstall -y torch || true
3535 pip install --upgrade pip
36- pip install -r requirements.txt
36+ pip install numpy future torch
37+ # NB: do not actually install requirements.txt; that is only needed for
38+ # testing
3739 IS_WHEEL=1 python setup.py clean
3840 IS_WHEEL=1 python setup.py bdist_wheel
3941 mkdir -p $OUT_DIR
Original file line number Diff line number Diff line change 1- if [[ " : $PATH : " == * " conda " * ]] ; then
2- echo " existing anaconda install in PATH, remove it and run script "
3- exit 1
4- fi
1+ #! /bin/bash
2+
3+ set -ex
4+
55# download and activate anaconda
66rm -rf ~ /minconda_wheel_env_tmp
77wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh && \
4040 conda create -yn $env_name python=" $desired_python "
4141 conda activate $env_name
4242
43- # install torchaudio dependencies
44- pip install -r requirements.txt
43+ pip install torch numpy future
4544
4645 IS_WHEEL=1 python setup.py clean
4746 IS_WHEEL=1 python setup.py bdist_wheel
You can’t perform that action at this time.
0 commit comments