Skip to content

Commit 3ad78e2

Browse files
authored
Replace direct calls to setup.py with pip equivalents (#4009)
1 parent 9b57c7b commit 3ad78e2

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

.github/scripts/unittest-linux/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ conda install --quiet -y ninja cmake
8282

8383
printf "* Installing torchaudio\n"
8484
export BUILD_CPP_TEST=1
85-
python setup.py install
85+
pip install . -v --no-build-isolation
8686

8787
# 3. Install Test tools
8888
printf "* Installing test tools\n"

.github/scripts/unittest-windows/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ printf "* Installing fsspec\n"
4646
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org fsspec
4747

4848
printf "* Installing torchaudio\n"
49-
"$root_dir/packaging/vc_env_helper.bat" python setup.py install
49+
"$root_dir/packaging/vc_env_helper.bat" pip install . -v --no-build-isolation
5050

5151
# 3. Install Test tools
5252
printf "* Installing test tools\n"

.github/workflows/integration-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# python -m pip install --quiet --upgrade pip
3030
# python -m pip install --quiet --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
3131
# python -m pip install --quiet pytest requests cmake ninja deep-phonemizer sentencepiece flashlight-text git+https://github.com/kpu/kenlm
32-
# python setup.py install
32+
# python -m pip install . -v --no-build-isolation
3333
# - name: Run integration test
3434
# run: |
3535
# cd test && pytest integration_tests -v --use-tmp-hub-dir

docs/source/build.linux.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Here, we install nightly build.
3737

3838
.. code-block::
3939
40-
python setup.py develop
40+
pip install -e . -v --no-build-isolation
4141
4242
.. note::
4343
Due to the complexity of build process, TorchAudio only supports in-place build.
@@ -57,4 +57,4 @@ To build single version FFmpeg extension, FFmpeg binaries must be provided by us
5757
.. code-block::
5858
5959
conda install -c conda-forge ffmpeg
60-
FFMPEG_ROOT=${CONDA_PREFIX} python setup.py develop
60+
FFMPEG_ROOT=${CONDA_PREFIX} pip install -e . -v --no-build-isolation

docs/source/build.windows.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ Now that we have everything ready, we can build TorchAudio.
119119
.. code-block::
120120
121121
# In Command Prompt
122-
python setup.py develop
122+
pip install -e . -v --no-build-isolation
123123
124124
.. code-block::
125125
126126
# In Bash
127-
python setup.py develop
127+
pip install -e . -v --no-build-isolation
128128
129129
.. note::
130130
Due to the complexity of build process, TorchAudio only supports in-place build.
@@ -144,7 +144,7 @@ To build single version FFmpeg extension, FFmpeg binaries must be provided by us
144144
.. code-block::
145145
146146
conda install -c conda-forge ffmpeg
147-
FFMPEG_ROOT=${CONDA_PREFIX}/Library python setup.py develop
147+
FFMPEG_ROOT=${CONDA_PREFIX}/Library pip install -e . -v --no-build-isolation
148148
149149
150150
[Optional] Building FFmpeg from source

packaging/torchaudio/bld.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
set IS_CONDA=1
44

5-
python setup.py install --single-version-externally-managed --record=record.txt
5+
python -m pip install . -vv

packaging/torchaudio/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ if [ "${USE_CUDA}" == "1" ] ; then
1414
fi
1515
fi
1616
shopt -u nocasematch
17-
python setup.py install --single-version-externally-managed --record=record.txt
17+
python -m pip install . -vv --no-build-isolation

tools/travis/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pip install -r requirements.txt
5454
# Install the following only if running tests
5555
if [[ "$SKIP_INSTALL" != "true" ]]; then
5656
# TorchAudio CPP Extensions
57-
python setup.py install
57+
python -m pip install . -vv --no-build-isolation
5858
fi
5959

6060
if [[ "$RUN_EXAMPLE_TESTS" == "true" ]]; then

0 commit comments

Comments
 (0)