-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
kicad: python2 -> python3 #72813
kicad: python2 -> python3 #72813
Conversation
Built it via nix-review,
Also, you're aware pkgs/top-level/all-packages.nix calls kicad with |
@evils-devils are you referring to the I'm not familiar with |
FYI, checked out your branch, ran Additionally, it seems to build and fail identically with |
Ah ok yes I am seeing that issue. Only see it when I add --pure. Thanks for bringing this to my attention. I'll look into it. |
FWIW, i've had a go at fixing this here. |
I'll take a look more closely when I have time tomorrow. However, does this work without the |
@evils-devils those changes look good to me. My comment above on the kicad scripting flag isn't an issue since cmake sets this automatically if phoenix and scripting are set. I've also added a dependency on the six python package which is needed in order to get python scripting to work. The new commit reflects all changes. |
i'm not sure it's a great idea for you to commit my changes as your own... |
@evils-devils, sorry about that, I haven't encountered this situation before so I'm not familiar with the normal process. What do you think is the best way to handle it? From the few previous PRs I've done here it seems like this would normally be 1 commit. I guess given our combined contributions to this package we could make it 3? My original change, your change and then my addition of the six python package. Let me know your thoughts. |
that sounds fine to me |
This is needed for python scripting support.
@@ -103,11 +94,17 @@ in stdenv.mkDerivation rec { | |||
done | |||
''; | |||
|
|||
# GSETTINGS_SCHEMAS_PATH includes gtk twice, so wrapProgram with ${wxGTK.gtk} is used instead of wrapGApp | |||
# since wrapGApp needs most of these set explicitly anyway (with dontWrapGApps = true;), lets not depend on it | |||
preFixup = '' | |||
buildPythonPath "$out $pythonPath" | |||
gappsWrapperArgs+=(--set PYTHONPATH "$program_PYTHONPATH") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doh, this line (101) isn't used anymore, the --set should either be added to wrapProgram
or it's not needed, you found scripting to work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't given it thorough testing, but yes it appears to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i can't launch the python shell from pcbnew, got something working, just cleaning up the commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, fixed here
also had to wrap pcbnew, otherwise python doesn't work if you run it directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me. i've included it in the pr
@@ -23817,8 +23817,10 @@ in | |||
fped = callPackage ../applications/science/electronics/fped { }; | |||
|
|||
kicad = callPackage ../applications/science/electronics/kicad { | |||
wxGTK = wxGTK30; | |||
boost = boost160; | |||
wxGTK = wxGTK30.override { withGtk2 = false; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If #73145 gets merged before this, the override part of this can be removed.
Motivation for this change
Python2 is EOL and KiCad supports Python 3.
Things done
Bump python version to 3, wx_python to Phoenix and gtk2 to gtk3.
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @