mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[build] modernize build-frontend: python setup.py develop/install
-> [uv ]pip install --no-build-isolation [-e ].
(#156027)
Modernize the development installation:
```bash
# python setup.py develop
python -m pip install --no-build-isolation -e .
# python setup.py install
python -m pip install --no-build-isolation .
```
Now, the `python setup.py develop` is a wrapper around `python -m pip install -e .` since `setuptools>=80.0`:
- pypa/setuptools#4955
`python setup.py install` is deprecated and will emit a warning during run. The warning will become an error on October 31, 2025.
- 9c4d383631/setuptools/command/install.py (L58-L67)
> ```python
> SetuptoolsDeprecationWarning.emit(
> "setup.py install is deprecated.",
> """
> Please avoid running ``setup.py`` directly.
> Instead, use pypa/build, pypa/installer or other
> standards-based tools.
> """,
> see_url="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html",
> due_date=(2025, 10, 31),
> )
> ```
- pypa/setuptools#3849
Additional Resource:
- [Why you shouldn't invoke setup.py directly](https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/156027
Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
fc0376e8b1
commit
4dce5b71a0
@ -148,7 +148,7 @@ class TestCppExtensionAOT(common.TestCase):
|
||||
|
||||
@unittest.skipIf(IS_WINDOWS, "Not available on Windows")
|
||||
def test_no_python_abi_suffix_sets_the_correct_library_name(self):
|
||||
# For this test, run_test.py will call `python setup.py install` in the
|
||||
# For this test, run_test.py will call `python -m pip install .` in the
|
||||
# cpp_extensions/no_python_abi_suffix_test folder, where the
|
||||
# `BuildExtension` class has a `no_python_abi_suffix` option set to
|
||||
# `True`. This *should* mean that on Python 3, the produced shared
|
||||
|
Reference in New Issue
Block a user