mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Add dependency-groups.dev to pyproject.toml (#161216)
[PEP 735](https://peps.python.org/pep-0735) introduces the [dependency-groups] table for a number of use-cases one of which includes specifying development dependencies for projects. Pull Request resolved: https://github.com/pytorch/pytorch/pull/161216 Approved by: https://github.com/seemethere
This commit is contained in:
committed by
PyTorch MergeBot
parent
019fed39aa
commit
43b7c86a2c
@ -129,7 +129,7 @@ source venv/bin/activate # or `& .\venv\Scripts\Activate.ps1` on Windows
|
||||
git clean -xdf
|
||||
python setup.py clean
|
||||
git submodule update --init --recursive
|
||||
python -m pip install -r requirements.txt
|
||||
python -m pip install --group dev
|
||||
python -m pip install --no-build-isolation -v -e .
|
||||
```
|
||||
4. The main step within `python -m pip install -e . -v --no-build-isolation` is running `make` from the `build` directory. If you want to
|
||||
@ -294,7 +294,7 @@ The following packages should be installed with `pip`:
|
||||
- `pytest` - recommended to run tests more selectively
|
||||
Running
|
||||
```
|
||||
pip install -r requirements.txt
|
||||
pip install --group dev
|
||||
```
|
||||
will install these dependencies for you.
|
||||
|
||||
|
@ -243,7 +243,7 @@ git submodule update --init --recursive
|
||||
|
||||
```bash
|
||||
# Run this command from the PyTorch directory after cloning the source code using the “Get the PyTorch Source“ section above
|
||||
pip install -r requirements.txt
|
||||
pip install --group dev
|
||||
```
|
||||
|
||||
**On Linux**
|
||||
|
@ -16,6 +16,39 @@ requires = [
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
# This list should be kept in sync with the requirements-build.txt
|
||||
# in PyTorch root until the project fully migrates to pyproject.toml
|
||||
# after which this can be removed as it is already specified in the
|
||||
# [build-system] section
|
||||
"setuptools>=70.1.0,<80.0", # setuptools develop deprecated on 80.0
|
||||
"cmake>=3.27",
|
||||
"ninja",
|
||||
"numpy",
|
||||
"packaging",
|
||||
"pyyaml",
|
||||
"requests",
|
||||
"six", # dependency chain: NNPACK -> PeachPy -> six
|
||||
"typing-extensions>=4.10.0",
|
||||
|
||||
# This list should be kept in sync with the requirements.txt in
|
||||
# PyTorch root until the project fully migrates to pyproject.toml
|
||||
"build[uv]",
|
||||
"expecttest>=0.3.0",
|
||||
"filelock",
|
||||
"fsspec>=0.8.5",
|
||||
"hypothesis",
|
||||
"jinja2",
|
||||
"lintrunner; platform_machine != 's390x' and platform_machine != 'riscv64'",
|
||||
"networkx>=2.5.1",
|
||||
"optree>=0.13.0",
|
||||
"psutil",
|
||||
"sympy>=1.13.3",
|
||||
"typing-extensions>=4.13.2",
|
||||
"wheel",
|
||||
]
|
||||
|
||||
[project]
|
||||
name = "torch"
|
||||
description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration"
|
||||
|
Reference in New Issue
Block a user