Skip to content

Support editable install with setuptools>=80.0.0 #9428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 10, 2025
Merged

Conversation

tengyifei
Copy link
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
@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