Skip to content

Support editable install with setuptools>=80.0.0#9428

Merged
bhavya01 merged 6 commits intomasterfrom
yifeit/py312
Jul 10, 2025
Merged

Support editable install with setuptools>=80.0.0#9428
bhavya01 merged 6 commits intomasterfrom
yifeit/py312

Conversation

@tengyifei
Copy link
Copy Markdown
Collaborator

@tengyifei tengyifei commented Jul 1, 2025

Setuptools>=80.0.0 relies on python -m pip install -e . to build a package for editing in an isolated pip environment. That means we need a pyproject.toml file declaring which packages setup.py depends on, which is added in this PR.

Also setup.py depends on torch to get the C++11 ABI status but that just won't work so that logic is adjusted accordingly. We need a bunch of other fixes due to the isolated environment.

TEST: scripts/build_developer.sh -a -t

This PR defaults the dev container to Python 3.12 because Python 3.10 is
soon unusable with future JAX versions.

Python 3.12 builds a package for editing in an isolated pip environment.
That means we need a pyproject.toml file declaring which packages
setup.py depends on, which is added in this PR.

Also setup.py depends on torch to get the C++11 ABI status but that just
won't work in Python 3.12 so that logic is adjusted accordingly. We need
a bunch of other fixes due to the isolated environment change in Python
3.12.

Finally, we need to add `12` into the list of Python versions when
generating JAX dependencies.

TEST: `scripts/build_developer.sh -a -t`
@tengyifei tengyifei marked this pull request as ready for review July 1, 2025 09:47
@tengyifei tengyifei requested a review from bhavya01 July 1, 2025 09:47
Comment thread setup.py
@tengyifei tengyifei changed the title Actually make Python 3.12 work Support Python 3.12 editable install Jul 1, 2025
tengyifei added a commit that referenced this pull request Jul 2, 2025
Split out of #9428

Without this, we _definitely_ won't be able to use Pallas kernels on Python 3.12

This should also be cherry-picked into r2.8
@bhavya01 bhavya01 changed the title Support Python 3.12 editable install Support editable install with setuptools>=80.0.0 Jul 10, 2025
@bhavya01 bhavya01 merged commit 156d913 into master Jul 10, 2025
22 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants