Skip to content

Commit 5096768

Browse files
authored
Moving commits from master to v0.2.0 (#181)
1 parent 1bb0112 commit 5096768

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

build_tools/packaging/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Linux
66

77
```bash
8+
# NB: We don't actually need CUDA; you don't have to run this on nvidia-docker
89
nvidia-docker run -it --ipc=host --rm -v $(pwd):/remote soumith/conda-cuda bash
910
pushd remote/conda
1011
conda config --add channels pytorch

build_tools/packaging/wheel/build_from_source.sh

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,39 @@ cd source_code
55
wget -q -O sox-14.4.2.tar.bz2 "http://downloads.sourceforge.net/project/sox/sox/14.4.2/sox-14.4.2.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fsox%2Ffiles%2Fsox%2F14.4.2%2F&ts=1416316415&use_mirror=heanet"
66
wget -q -O lame-3.99.5.tar.gz "http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flame%2Ffiles%2Flame%2F3.99%2F&ts=1416316457&use_mirror=kent"
77
wget -q -O flac-1.3.2.tar.xz "https://superb-dca2.dl.sourceforge.net/project/flac/flac-src/flac-1.3.2.tar.xz"
8+
wget -q -O libmad-0.15.1b.tar.gz "https://downloads.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz"
89

910
# unpack the dependencies
1011
tar xfp sox-14.4.2.tar.bz2
1112
tar xfp lame-3.99.5.tar.gz
1213
tar xfp flac-1.3.2.tar.xz
14+
tar xfp libmad-0.15.1b.tar.gz
1315

1416
# build lame, statically
1517
pushd lame-3.99.5
1618
./configure --disable-shared --enable-static --prefix="$PREFIX/audio/third_party/lame" CFLAGS=-fPIC CXXFLAGS=-fPIC --with-pic --disable-debug --disable-dependency-tracking --enable-nasm
17-
make -s && make install
19+
make -s -j && make install
1820
popd
1921

2022
# build flac, statically
2123
pushd flac-1.3.2
2224
./configure --disable-shared --enable-static --prefix="$PREFIX/audio/third_party/flac" CFLAGS=-fPIC CXXFLAGS=-fPIC \
23-
--with-pic --disable-debug --disable-dependency-tracking
24-
make -s && make install
25+
--with-pic --disable-debug --disable-dependency-tracking
26+
make -s -j && make install
27+
popd
28+
29+
# build mad, statically
30+
pushd libmad-0.15.1b
31+
./configure --disable-shared --enable-static --prefix="$PREFIX/audio/third_party/mad" CFLAGS=-fPIC CXXFLAGS=-fPIC \
32+
--with-pic --disable-debug --disable-dependency-tracking
33+
make -s -j && make install
2534
popd
2635

2736
# build sox, statically
2837
pushd sox-14.4.2
2938
./configure --disable-shared --enable-static --prefix="$PREFIX/audio/third_party/sox" \
30-
LDFLAGS="-L$PREFIX/audio/third_party/lame/lib -L$PREFIX/audio/third_party/flac/lib" \
31-
CPPFLAGS="-I$PREFIX/audio/third_party/lame/include -I$PREFIX/audio/third_party/flac/include" \
32-
--with-lame --with-flac --without-oggvorbis --without-oss --without-sndfile CFLAGS=-fPIC CXXFLAGS=-fPIC --with-pic --disable-debug --disable-dependency-tracking
33-
make -s && make install
39+
LDFLAGS="-L$PREFIX/audio/third_party/lame/lib -L$PREFIX/audio/third_party/flac/lib -L$PREFIX/audio/third_party/mad/lib" \
40+
CPPFLAGS="-I$PREFIX/audio/third_party/lame/include -I$PREFIX/audio/third_party/flac/include -I$PREFIX/audio/third_party/mad/include" \
41+
--with-lame --with-flac --with-mad --without-oggvorbis --without-oss --without-sndfile CFLAGS=-fPIC CXXFLAGS=-fPIC --with-pic --disable-debug --disable-dependency-tracking
42+
make -s -j && make install
3443
popd

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ def check_env_flag(name, default=''):
7676
f.write("__version__ = '{}'\n".format(version))
7777
f.write("git_version = {}\n".format(repr(sha)))
7878

79+
pytorch_package_name = os.getenv('TORCHAUDIO_PYTORCH_DEPENDENCY_NAME', 'torch')
80+
7981
setup(
8082
name="torchaudio",
8183
version="0.2",
@@ -111,5 +113,5 @@ def check_env_flag(name, default=''):
111113
extra_link_args=ela),
112114
],
113115
cmdclass={'build_ext': BuildExtension},
114-
install_requires=['torch']
116+
install_requires=[pytorch_package_name]
115117
)

0 commit comments

Comments
 (0)