Repository navigation
python3Packages.setuptools, thrift: Fix setuptools to give thrift python 3.12 support - #328415
kfollesdal wants to merge 2 commits into
Conversation
|
I prefer having to make the dependency on distutils explicit. |
He he ... see we comments on each other PR ;-) I can understand you point.But think it is better to make If you need to add |
c01c298 to
3d498dc
Compare
|
As I understand it I’m ambivalent between this and #328379. I prefer to source our |
|
I forgot that in #326321 we discovered that you can hold I’d still like to work on getting rid of all these references at some point though… |
Are you worried about it breaking due to incompatible versions? I doubt that would happen as the distutils code probably doesn't change.
Not really. There are probably many packages that indirectly depend on setuptools but don't import it because they use e.g. poetry instead. Those shouldn't be able to use distutils either. |
I dunno, there’s a whole bunch of commits in the repository you were using that postdate 3.12’s release. Fair point about the indirect dependencies thing. |
But that is the behavior in a normal python setup. If you have |
No, only after you |
|
@dotlambda try to make a normal plain vanilla python venv.
|
|
I think I lean towards @dotlambda’s updated PR at this point, but I’m wondering if anyone has any idea how we could just make the imports work as intended? Could we just make |
|
Instead of patching setuptools and requiring a gigantic rebuild of packages that do not need the changes, instead, why not make a patch for thrift? I've submitted one at apache/thrift#3007 , feel free to use the commit there as a patch. I've confirmed that it applies cleanly to the v0.20.0 tag, though it may require using fetchFromGitHub instead of fetchPypi to apply properly. |
Thanks 😊, that is also a possibility, have also an earlier PR where I just fix thrift, #328246 But there are multiple packages that loose python 3.12 support for sam reason. So why not fix nixpkgs setuptools so it behave as vanilla setuptools? |
… at the moment Depends on thrift that do not support python 3.12 at the moment. See PR NixOS#328415
setuptools have a trick/hack that make distutils avaliable for import. This do not work in nix build phase. This commit fix this.
3d498dc to
731a9d1
Compare
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
|
Use |
|
Was apparently fixed in 3a30db4 |
Description of changes
distutilswas removed in python 3.12.setuptoolsgive backwards compatibility fordistutils, by a trick/hack that makedistutilsavailable/importable whensetuptoolsare installed. But this do not work in nix build phase.This break some python 3.12 packages builds in nixpkgs. For example the python package
thriftis broken for python 3.12 but also other examples #328379.This PR make the
setuptoolssupport fordistutilsbehave as expected, by symlink thedistutilspackage insetuptoolstodistutilsin site-packages.One concern, this touches
setuptoolsimplies big rebuild. But will makesetuptoolsbehave as expected and avoid confusions. There are as suggestion in #328379 to adddistutilsas it own package, but think it is better to fixsetuptools, then introducing a packages that is gone.My earlier proposal:
#328182
Alternativ only fix thrift:
#328246
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.