Skip to content

Commit e1f28d4

Browse files
authored
Packaging improvements for 0.2.0 (#199)
Based off of #198 but nightly specific changes were dropped. Signed-off-by: Edward Z. Yang <ezyang@fb.com>
1 parent 77cdb00 commit e1f28d4

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

build_tools/packaging/wheel/build_from_source.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ popd
2828

2929
# build mad, statically
3030
pushd 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
3335
make -s -j && make install

build_tools/packaging/wheel/linux_manywheel.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ export PREFIX="/tmp"
2727
cd /tmp/audio
2828

2929
for 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

build_tools/packaging/wheel/osx_wheel.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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
66
rm -rf ~/minconda_wheel_env_tmp
77
wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh && \
@@ -40,8 +40,7 @@ do
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

0 commit comments

Comments
 (0)