python3Packages.setuptools, thrift: Fix setuptools to give thrift python 3.12 support#328182
Closed
kfollesdal wants to merge 2 commits intoNixOS:masterfrom
Closed
python3Packages.setuptools, thrift: Fix setuptools to give thrift python 3.12 support#328182kfollesdal wants to merge 2 commits intoNixOS:masterfrom
kfollesdal wants to merge 2 commits intoNixOS:masterfrom
Conversation
…mpile This fix solve python 3.12 support for python3Packages.thrift. And maybe other?
Commit ## fix python 3.12 support.
Member
|
Let's wait whether upstream agrees with the approach. Marking as draft, since it also targets the wrong branch (master, instead of staging). |
wegank
reviewed
Jul 18, 2024
| # PR: https://github.com/pypa/setuptools/pull/4484 | ||
| # Fix error, ModuleNotFoundError: No module named 'distutils', for function byte_compile | ||
| name = "fix-byte-complie.patch"; | ||
| url = "https://patch-diff.githubusercontent.com/raw/pypa/setuptools/pull/4484.patch"; |
Member
There was a problem hiding this comment.
It is not clear whether upstream will accept the patch as is, because there's a clear separation between what's in setuptools/_distutils (which does not depend on setuptools, and whose patches should be sent to https://github.com/pypa/distutils) and the rest. I'd suggest putting the patch in the Nixpkgs tree.
13 tasks
Contributor
Author
|
Close this PR for now. Found a simpler solutions with less impact: #328246 |
Closed
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
The python package
thriftis broken for python 3.12. The reason is thatthriftusedistutilsthat was removed in 3.12, to build.But
setuptoolsgive backwards compatibility fordistutils. But it was a bug insetuptoolsthat broke the build process forthrift.See PR in
setuptools, that we use as a patch insetuptoolsto solve the problem: pypa/setuptools#4484One concern, since this touches
setuptoolsthat many python packages depend on, implies big rebuild.Is this something we will backport to 24.05 to give python.3.12 support for
thrift?This can maybe solve python 3.12 for other packages also.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.