mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Eliminate setup.py install/develop in the codebose (#162329)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/162329 Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
3cda34ebde
commit
047ae24e34
@ -10,5 +10,5 @@ COMMIT_DATE=$(echo "$NIGHTLY_PATCH" | grep '^Date:' | sed -E 's/Date: .*, ([0-9]
|
||||
VERSION_STRING="2.9.0.dev${COMMIT_DATE}+cpu"
|
||||
git rev-parse HEAD > /tmp/orig_work.txt
|
||||
git reset --hard $COMMIT
|
||||
USE_NIGHTLY=$VERSION_STRING python setup.py develop
|
||||
USE_NIGHTLY=$VERSION_STRING python -m pip install --no-build-isolation -v -e .
|
||||
echo "source $PWD/.venv/bin/activate" >> ~/.bashrc
|
||||
|
@ -5696,8 +5696,7 @@ def install_cpp_extension(extension_root):
|
||||
shutil.rmtree(d)
|
||||
|
||||
# Build the extension
|
||||
setup_py_path = os.path.join(extension_root, "setup.py")
|
||||
cmd = [sys.executable, setup_py_path, "install", "--root", install_dir]
|
||||
cmd = [sys.executable, "-m", "pip", "install", "--no-build-isolation", "-v", ".", "--root", install_dir]
|
||||
return_code = shell(cmd, cwd=extension_root, env=os.environ)
|
||||
if return_code != 0:
|
||||
raise RuntimeError(f"build failed for cpp extension at {extension_root}")
|
||||
|
Reference in New Issue
Block a user