Get Python3 to build its ssl and tkinter modules on macOS

86 views
Skip to first unread message

Samuel Lelievre

unread,
Mar 29, 2020, 6:09:26 PM3/29/20
to sage-devel
Dear sage-devel,

on macOS, is there a recommendation on how to
get Python3 to build its ssl and tkinter modules
when building Sage from source?

I'm using macOS 10.14.6 Mojave.

Regarding ssl, if I run `make openssl` before
running `make`, then Python3 gets built with
its ssl module. I just have to remember to do that,
otherwise I then have to run `make openssl`
followed by `sage -f python3`.

Regarding tkinter, I have run `brew install tcl-tk`
to install Tcl/Tk using Homebrew, but it does not
seem to help. I also tried installing Tcl and Tk
from source, but it still does not seem to get
picked up at the time of building Python3.

Kind regards,
Samuel Lelièvre

Nathan Dunfield

unread,
Mar 29, 2020, 11:44:44 PM3/29/20
to sage-devel


On Sunday, March 29, 2020 at 5:09:26 PM UTC-5, Samuel Lelievre wrote:
Dear sage-devel,

on macOS, is there a recommendation on how to
get Python3 to build its ssl and tkinter modules
when building Sage from source?

I'm using macOS 10.14.6 Mojave.

This is not quite answering your question, but Marc Culler built a version of Tk 8.6.10 (all but very recent versions have issues on 10.14 and 10.15) and posted it here 


together with a small package "mac_sage9.tgz" which installs a version of "tkinter" and "openssl".  It targets the binary release, but should work if you build from source.

Best,

Nathan

Dima Pasechnik

unread,
Mar 30, 2020, 12:55:43 AM3/30/20
to sage-devel
On Mon, Mar 30, 2020 at 6:09 AM Samuel Lelievre
<samuel....@gmail.com> wrote:
>
> Dear sage-devel,
>
> on macOS, is there a recommendation on how to
> get Python3 to build its ssl and tkinter modules
> when building Sage from source?

The latest beta allows you to use Python3 from (say) Homebrew.
By looking at https://github.com/Homebrew/homebrew-core/blob/master/Formula/python.rb
I gather it comes with ssl.

You can modify Homebrew's formula to include tcl-tk in its deps, too, cf e.g.
https://gist.github.com/iexa/2ac761bfd96ab78988b76c030d54a5b8
(although the latter needs a modification if you need Python 3.7, not
Python 3.8 (and Sage needs 3.7))
- go over revisions of this gist to get 3.7, I guess

HTH
Dima

>
> I'm using macOS 10.14.6 Mojave.
>
> Regarding ssl, if I run `make openssl` before
> running `make`, then Python3 gets built with
> its ssl module. I just have to remember to do that,
> otherwise I then have to run `make openssl`
> followed by `sage -f python3`.
>
> Regarding tkinter, I have run `brew install tcl-tk`
> to install Tcl/Tk using Homebrew, but it does not
> seem to help. I also tried installing Tcl and Tk
> from source, but it still does not seem to get
> picked up at the time of building Python3.
>
> Kind regards,
> Samuel Lelièvre
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/de5807d1-57a4-46ea-b9d5-a04804e099f2%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages