pytorch/torch
Xuehai Pan 4dce5b71a0 [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
2025-07-09 11:24:27 +00:00
..
_awaits
_C fix type hints for interpolation functions (#157202) 2025-07-09 03:11:37 +00:00
_C_flatbuffer
_custom_op pyfmt lint torch/_custom_op/* (#155782) 2025-06-12 23:04:11 +00:00
_decomp Revert "Fix full_like decomposition to preserve strides (#144765)" 2025-07-02 13:56:03 +00:00
_dispatch Improve torch.ops typing (#154555) 2025-06-22 15:52:27 +00:00
_dynamo [dynamo] removing string literals for weblink generation (#157820) 2025-07-08 23:08:06 +00:00
_export [export] Fix lift constants bug (#157719) 2025-07-08 20:33:53 +00:00
_functorch [inductor] Quiesce Triton compile worker pool after each dynamo compile (#156187) 2025-07-08 22:53:13 +00:00
_higher_order_ops [BE][12/16] fix typos in torch/ (#156602) 2025-07-02 22:55:29 +00:00
_inductor [Optimus] Fix normalization pass in the aten IR (#157857) 2025-07-09 05:38:15 +00:00
_lazy
_library [BE][PYFMT] migrate PYFMT for torch/_[a-h]*/ to ruff format (#144551) 2025-06-25 06:16:06 +00:00
_logging [BE][PYFMT] migrate PYFMT for torch/_[a-h]*/ to ruff format (#144551) 2025-06-25 06:16:06 +00:00
_numpy [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
_prims [remove untyped defs] batch 1 (#157011) 2025-06-30 23:54:40 +00:00
_prims_common python definitely_contiguous-> is_contiguous_or_false (#156515) 2025-06-30 17:31:51 +00:00
_refs _broadcast_shapes gso generalizations (#157008) 2025-07-04 05:56:42 +00:00
_strobelight [BE][PYFMT] migrate PYFMT for torch/_[a-h]*/ to ruff format (#144551) 2025-06-25 06:16:06 +00:00
_subclasses [fake tensor] fix issue of no attribute tags (#156689) 2025-07-03 01:16:01 +00:00
_vendor
accelerator Revert "Add unified memory APIs for torch.accelerator (#152932)" 2025-06-25 00:11:35 +00:00
amp [BE][PYFMT] migrate PYFMT for torch/[a-c]*/ to ruff format (#144554) 2025-07-03 18:56:07 +00:00
ao remove allow-untyped-defs from torch/ao/nn/quantized/modules/rnn.py (#157234) 2025-07-08 00:11:52 +00:00
autograd [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
backends [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
compiler [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
contrib
cpu
csrc [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
cuda [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
distributed [BE] fix typo in torch/distributed/tensor/: childs -> children (#156609) 2025-07-09 11:02:23 +00:00
distributions [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
export [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
fft [BE][PYFMT] migrate PYFMT for torch/[e-n]*/ to ruff format (#144553) 2025-06-17 08:18:47 +00:00
func
futures Simplify the base classes of _PyFutureMeta (#157757) 2025-07-08 15:39:56 +00:00
fx Add flag to fx.passes.split_module to normalize input names (#157733) 2025-07-08 13:47:24 +00:00
headeronly Reapply D77381084 / #156964: Rename torch::standalone to headeronly (#157251) 2025-06-30 23:25:30 +00:00
jit [BE][12/16] fix typos in torch/ (#156602) 2025-07-02 22:55:29 +00:00
legacy
lib [2/N] Fix cppcoreguidelines-init-variables suppression (#146237) 2025-06-19 23:26:42 +00:00
linalg Fix for ambiguity in linalg.norm()'s ord argument of +2 & -2 (#155148) 2025-06-04 21:15:20 +00:00
masked [Pyrefly][Refactor] Replace dict() calls with literal dict syntax for improved readability (#157735) 2025-07-08 18:10:33 +00:00
monitor
mps [BE][12/16] fix typos in torch/ (#156602) 2025-07-02 22:55:29 +00:00
mtia [BE][PYFMT] migrate PYFMT for torch/[e-n]*/ to ruff format (#144553) 2025-06-17 08:18:47 +00:00
multiprocessing [BE][12/16] fix typos in torch/ (#156602) 2025-07-02 22:55:29 +00:00
nativert [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
nested [BE][12/16] fix typos in torch/ (#156602) 2025-07-02 22:55:29 +00:00
nn fix type hints for interpolation functions (#157202) 2025-07-09 03:11:37 +00:00
onnx [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
optim [Pyrefly][Refactor] Replace dict() calls with literal dict syntax for improved readability (#157735) 2025-07-08 18:10:33 +00:00
package [BE][6/16] fix typos in torch/ (#156316) 2025-06-23 02:57:34 +00:00
profiler [profiler] add more CUDA API for kernel launcher (#156016) 2025-07-03 15:26:42 +00:00
quantization [BE][6/16] fix typos in torch/ (#156316) 2025-06-23 02:57:34 +00:00
signal [BE][6/16] fix typos in torch/ (#156316) 2025-06-23 02:57:34 +00:00
sparse [build] modernize build-frontend: python setup.py develop/install -> [uv ]pip install --no-build-isolation [-e ]. (#156027) 2025-07-09 11:24:27 +00:00
special [BE][6/16] fix typos in torch/ (#156316) 2025-06-23 02:57:34 +00:00
testing Add stack trace of exception to MultiProcContinousTest (#157589) 2025-07-08 17:54:35 +00:00
utils Revert "Deprecate DataLoader pin_memory_device param (#146821)" 2025-07-09 10:29:31 +00:00
xpu [BE][6/16] fix typos in torch/ (#156316) 2025-06-23 02:57:34 +00:00
__config__.py
__future__.py
__init__.py [build] modernize build-frontend: python setup.py develop/install -> [uv ]pip install --no-build-isolation [-e ]. (#156027) 2025-07-09 11:24:27 +00:00
_appdirs.py
_classes.py remove allow-untyped-defs from torch/_classes.py (#157231) 2025-07-08 00:11:52 +00:00
_compile.py [precompile] Ensure @disable()-ed function won't trigger recompile from precompile bytecode. (#155363) 2025-06-10 16:13:38 +00:00
_custom_ops.py
_deploy.py
_environment.py
_guards.py [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
_jit_internal.py [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
_linalg_utils.py
_lobpcg.py [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
_lowrank.py [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
_meta_registrations.py [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
_namedtensor_internals.py
_ops.py [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
_python_dispatcher.py Typo fixes for "overridden" in comments and function names (#155944) 2025-06-14 03:37:38 +00:00
_size_docs.py
_sources.py
_storage_docs.py Fix docstring for torch.UntypedStorage.from_file (#155067) 2025-06-05 14:30:49 +00:00
_streambase.py
_tensor_docs.py [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
_tensor_str.py fix tensor print behavior for MAIA (#155609) 2025-06-14 01:04:12 +00:00
_tensor.py Upgrade to DLPack 1.0. (#145000) 2025-06-30 16:58:06 +00:00
_thread_safe_fork.py
_torch_docs.py [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
_utils_internal.py [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
_utils.py [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
_VF.py
_vmap_internals.py
_weights_only_unpickler.py
CMakeLists.txt [1/N] Don't use CUDA.cmake module (#157188) 2025-07-08 03:05:35 +00:00
custom_class_detail.h
custom_class.h [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
extension.h
functional.py [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
header_only_apis.txt Reapply D77381084 / #156964: Rename torch::standalone to headeronly (#157251) 2025-06-30 23:25:30 +00:00
hub.py [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
library.h [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
library.py [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
overrides.py [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
py.typed
quasirandom.py
random.py
return_types.py
script.h
serialization.py [BE][1/16] fix typos in torch/ (#156311) 2025-07-09 11:02:22 +00:00
storage.py mypy 1.16.0 (#155821) 2025-06-14 18:18:43 +00:00
torch_version.py
types.py
version.py.tpl