Skip to content

Conversation

@XuehaiPan
Copy link
Collaborator

@XuehaiPan XuehaiPan commented Jun 15, 2025

Modernize the development installation:

# 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:

python setup.py install is deprecated and will emit a warning during run. The warning will become an error on October 31, 2025.

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),
)

Additional Resource:

Stack from ghstack (oldest at bottom):

cc @seemethere @malfet @osalpekar @atalman

[ghstack-poisoned]
@XuehaiPan XuehaiPan requested a review from a team as a code owner June 15, 2025 16:22
@pytorch-bot pytorch-bot bot added the release notes: onnx torch.onnx related changes that should show up in the release notes label Jun 15, 2025
@pytorch-bot
Copy link

pytorch-bot bot commented Jun 15, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/156027

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 New Failures

As of commit 872688b with merge base 476874b (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Jun 15, 2025
@XuehaiPan XuehaiPan added module: binaries Anything related to official binaries that we release to users module: build Build system issues ciflow/binaries Trigger all binary build and upload jobs on the PR ciflow/trunk Trigger trunk jobs on your pull request release notes: releng release notes category release notes: build release notes category ciflow/binaries_wheel Trigger binary build and upload jobs for wheel on the PR ciflow/binaries_libtorch Trigger binary build and upload jobs for libtorch on the PR topic: build and removed oncall: jit Add this issue/PR to JIT oncall triage queue release notes: onnx torch.onnx related changes that should show up in the release notes labels Jun 15, 2025
[ghstack-poisoned]
[ghstack-poisoned]
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Jun 15, 2025
…> `[uv ]pip install[ -e] .`

Modernize the development installation:

```bash
python -m pip install -e .

python -m pip install .
```


ghstack-source-id: 6127c08
Pull-Request: pytorch#156027
[ghstack-poisoned]
[ghstack-poisoned]
@XuehaiPan
Copy link
Collaborator Author

@pytorchbot merge -i

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 2 checks: Build Official Docker Images / build (12.9, 12.9.1, 9, runtime, linux/amd64), Build Official Docker Images / build (12.9, 12.9.1, 9, devel, linux/amd64)

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command
For more information see pytorch-bot wiki.

@XuehaiPan
Copy link
Collaborator Author

@pytorchbot merge -i

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 2 checks: Build Official Docker Images / build (12.9, 12.9.1, 9, runtime, linux/amd64), Build Official Docker Images / build (12.9, 12.9.1, 9, devel, linux/amd64)

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Jul 9, 2025
…> `[uv ]pip install --no-build-isolation [-e ].`

Modernize the development installation:

```bash
python -m pip install --no-build-isolation -e .

python -m pip install --no-build-isolation .
```

ghstack-source-id: c2d1f33
Pull-Request: pytorch#156027
@albanD
Copy link
Collaborator

albanD commented Jul 22, 2025

@XuehaiPan @ezyang doesn't this new recommendation break ccache due to folder randomization?
Why do we recommend that??

@rgommers
Copy link
Collaborator

It shouldn't, pip just defaults to building in the build folder nowadays, that was changed several years ago. uv does the same.

@albanD
Copy link
Collaborator

albanD commented Jul 22, 2025

@rgommers
Copy link
Collaborator

rgommers commented Jul 22, 2025

Those vllm instructions omit --no-build-isolation in their default instructions, which is a really bad idea: it re-installs all build dependencies on each invocation into a temporary venv, and yes that does change to a random path which will break ccache.

Doing an editable build with build isolation never really makes sense when dealing with compiled code, you'll never be able to do an incremental build.

@github-actions github-actions bot deleted the gh/XuehaiPan/283/head branch August 22, 2025 02:14
pytorchmergebot pushed a commit that referenced this pull request Sep 4, 2025
#156027 already replaced most use of `python setup.py develop`. This PR only adds a few more occurrences.

Pull Request resolved: #156710
Approved by: https://github.com/atalman
markc-614 pushed a commit to markc-614/pytorch that referenced this pull request Sep 17, 2025
pytorch#156027 already replaced most use of `python setup.py develop`. This PR only adds a few more occurrences.

Pull Request resolved: pytorch#156710
Approved by: https://github.com/atalman
mansiag05 pushed a commit to mansiag05/pytorch that referenced this pull request Sep 22, 2025
pytorch#156027 already replaced most use of `python setup.py develop`. This PR only adds a few more occurrences.

Pull Request resolved: pytorch#156710
Approved by: https://github.com/atalman
dsashidh pushed a commit to dsashidh/pytorch that referenced this pull request Sep 26, 2025
pytorch#156027 already replaced most use of `python setup.py develop`. This PR only adds a few more occurrences.

Pull Request resolved: pytorch#156710
Approved by: https://github.com/atalman
pytorchmergebot pushed a commit that referenced this pull request Sep 29, 2025
#156027 already replaced most use of `python setup.py install`.
This PR only adds a few more occurrences and adds `--no-build-isolation` in a few places.

Pull Request resolved: #156711
Approved by: https://github.com/atalman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/binaries_libtorch Trigger binary build and upload jobs for libtorch on the PR ciflow/binaries_wheel Trigger binary build and upload jobs for wheel on the PR ciflow/binaries Trigger all binary build and upload jobs on the PR ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request Merged module: binaries Anything related to official binaries that we release to users module: build Build system issues open source release notes: build release notes category release notes: releng release notes category topic: build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setup.py develop command is disappearing soon from setuptools

9 participants