-
-
Notifications
You must be signed in to change notification settings - Fork 826
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
Updating brew install command to build _tkinter #893
Conversation
I am using Mac OS Catalina 10.15.7. This is to avoid getting the following message: > The necessary bits to build these optional modules were not found: > _tkinter
Verified on: - 3.12 - 3.11 - 3.10 - 3.9 - 3.8 - 3.7
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.
Both instructions for 3.11+ and 3.7-3.9 work in 3.10. I suggest using the latest (and simplified) version for 3.10.
No. Please read up on the previous discussion. We changed configure and setup.py in 3.11. You can not use the same instructions on 3.10 (and before) and in 3.11 and newer. Also, if you build in-tree (as I expect you do), you need to clean everything when you switch between revisions. This is extremely important. You can clean your source tree by executing $ git clone https://github.com/python/cpython.git cpython.git
$ cd cpython.git
$ ./configure && make
$ git checkout origin/3.10
$ git clean -fdx # <= this is important! make clean is _not_ enough
$ ./configure && make |
I did the following: $ rm -rf cpython
$ git clone https://github.com/python/cpython
$ cd cpython
$ git checkout origin/3.10
$ PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" ./configure --with-pydebug --with-openssl=$(brew --prefix openssl@1.1)
$ make -j
$ ./python.exe --version Selected output:
Running
Therefore, I still believe that the instructions for 3.11+ works in 3.10. |
Ah, yes, there were basic support for pkg-config for Tcl/Tk in |
I think the point is to have a nice and compact way to get the job done. $ PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \
./configure --with-pydebug --with-openssl=$(brew --prefix openssl) vs $ export PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig"
$ ./configure --with-pydebug \
--with-openssl=$(brew --prefix openssl) \
--with-tcltk-libs="$(pkg-config --libs tcl tk)" \
--with-tcltk-includes="$(pkg-config --cflags tcl tk)" They are not the same. The latter includes 2 commands instead of 1 command to run + forces I would agree it doesn't matter if it takes a lot of effort, but the fix is already here: #893 (review) |
I've updated the instructions to include 3.10. Thanks. |
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.
The PR looks good to me. I don't think the 3.6 section needs to be included, so you can remove that.
Thanks all, for helping improving the devguide! |
…cl/Tk (python#893) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
I am using Mac OS Catalina 10.15.7.
This is to avoid getting the following message:
The solution was provided by @erlend-aasland.
Issue number: python/cpython#93659