Skip to content

Commit a3c1594

Browse files
ejguanfacebook-github-bot
authored andcommitted
Replace easy_install by pip install to fix CI for MacOS (meta-pytorch#951)
Summary: Fixes meta-pytorch#948 ### Changes - To fix MacOS CI, uses `pip install .` or `pip install -e .` to replace `python setup.py install` or `python setup.py develop` - `pip install` would use an isolated environment to prevent the problem in our CI - Add `ninja` to [`pyproject.toml`](https://github.com/pytorch/data/blob/main/pyproject.toml) to make sure CMake works properly using `pip install` - Easy install is deprecated https://setuptools.pypa.io/en/latest/deprecated/easy_install.html#easy-install - Change documents to advocate `pip install` rather than `python setup.py` Pull Request resolved: meta-pytorch#951 Reviewed By: NivekT Differential Revision: D42648547 Pulled By: ejguan fbshipit-source-id: 77aa181d34651034e4c73459958b5658a18c82f9
1 parent f64ea9a commit a3c1594

11 files changed

Lines changed: 11 additions & 10 deletions

File tree

.github/workflows/_build_test_upload.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ jobs:
481481
fi
482482
483483
pip3 install -r requirements.txt
484-
python3 setup.py install
484+
pip3 install .
485485
- name: Check env
486486
run: echo `which spinx-build`
487487
- name: Build the docset

.github/workflows/aistore_ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
uses: NVIDIA/aistore@master
5353
- name: Build TorchData
5454
run: |
55-
python setup.py install
55+
pip3 install .
5656
- name: Install test requirements
5757
run: pip3 install -r test/requirements_aistore.txt
5858
- name: Run AIStore DataPipe tests with pytest

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
echo "/home/runner/.local/bin" >> $GITHUB_PATH
7474
- name: Build TorchData
7575
run: |
76-
python setup.py install
76+
pip3 install .
7777
env:
7878
BUILD_S3: 1
7979
- name: Install test requirements

.github/workflows/domain_ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Install torchdata
4242
run: |
4343
pip install -r requirements.txt
44-
python setup.py install
44+
pip install .
4545
4646
- name: Install test requirements
4747
run: pip install pytest pytest-mock scipy iopath pycocotools h5py

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
pip3 install mypy==0.960 numpy types-requests
5959
- name: Build TorchData
6060
run: |
61-
python setup.py develop
61+
pip3 install .
6262
- name: Run mypy
6363
env:
6464
MYPY_FORCE_COLOR: 1

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ conda install pytorch -c pytorch-nightly
5151
```bash
5252
git clone https://github.com/pytorch/data.git
5353
cd data
54-
python setup.py develop
54+
pip install -e .
5555
pip install flake8 typing mypy pytest expecttest
5656
```
5757

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ You can then proceed to run [our examples](https://github.com/pytorch/data/tree/
101101
### From source
102102

103103
```bash
104-
python setup.py install
104+
pip install .
105105
```
106106

107107
If you'd like to include the S3 IO datapipes and aws-sdk-cpp, you may also follow

packaging/torchdata/bld.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ git config --system core.longpaths true
1111
git submodule update --init --recursive
1212
if errorlevel 1 exit /b 1
1313

14-
python setup.py install --single-version-externally-managed --record=record.txt
14+
pip install .
1515
if errorlevel 1 exit /b 1

packaging/torchdata/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
set -ex
99

1010
git submodule update --init --recursive
11-
python setup.py install --single-version-externally-managed --record=record.txt
11+
pip install .

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ target-version = ["py37"]
1111
requires = [
1212
"setuptools",
1313
"wheel",
14+
"ninja",
1415
"cmake",
1516
"torch",
1617
]

0 commit comments

Comments
 (0)