Skip to content
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

add support for free-threaded wheels #955

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ngoldbaum
Copy link
Contributor

See this actions run on my fork.

Let me know if using setup-python on MacOS is problematic for some reason.

Fixes #913.

@alex
Copy link
Member

alex commented Jan 20, 2025

I believe we intentionally wanted to build against python.org Python's, but I absolutely do not remember why. Do you @reaperhulk ?

@ngoldbaum
Copy link
Contributor Author

ngoldbaum commented Jan 20, 2025

Maybe related to the note about MacOS here and the difference in behavior on Python < 3.11?

I'd need to figure out how to trigger a free-threaded install using the installer, but happy to switch it back if that was a load-bearing choice :)

@reaperhulk
Copy link
Member

Probably macOS SDK compatibility, although I don’t recall if there was another reason.

@ngoldbaum
Copy link
Contributor Author

ngoldbaum commented Jan 20, 2025

I couldn't figure out a way to include the necessary plist file into the actions workflow definition directly, so I added actions/checkout to the MacOS wheel builder workflow and chose to store the plist file in the bcrypt repo, alongside the github actions configuration. Let me know if that's problematic.

@ngoldbaum
Copy link
Contributor Author

All the plist manipulation is cribbed from @colesbury's PR adding free-threading support to actions/python-versions: https://github.com/actions/python-versions/pull/319/files

@ngoldbaum
Copy link
Contributor Author

I think the test failure is unrelated

Comment on lines +148 to +152
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# The tag to build or the tag received by the tag event
ref: ${{ github.event.inputs.version || github.ref }}
persist-credentials: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we clone only the one file we need?

- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203
with:
toolchain: stable
# Add the arm64 target in addition to the native arch (x86_64)
target: aarch64-apple-darwin

- run: ${{ matrix.PYTHON.BIN_PATH }} -m venv venv
- run: python -m venv venv
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? Won't this use the system python, and not the one we just installed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support the free-threaded build
3 participants