Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#22354 closed enhancement (fixed)

Install both python 2 & 3 by default

Reported by: vbraun Owned by:
Priority: major Milestone: sage-7.6
Component: python3 Keywords:
Cc: Merged in:
Authors: Volker Braun Reviewers: John Palmieri
Report Upstream: N/A Work issues:
Branch: c133592 (Commits, GitHub, GitLab) Commit:
Dependencies: Stopgaps:

Status badges


As long as we don't change the python symlink this has very little potential for errors. But it'll allow us to add 2/3 regression tests, e.g. check that all sources can be compiled by python3 (though not on this ticket).

Change History (15)

comment:1 Changed 4 years ago by vbraun

  • Branch set to u/vbraun/install_both_python_2_and_3_by_default

comment:2 Changed 4 years ago by vbraun

  • Authors set to Volker Braun
  • Commit set to 80e64a238d51dca84e5a9ccd5db7868732bf7af8
  • Status changed from new to needs_review

New commits:

80e64a2Always build Python 2 and 3

comment:3 Changed 4 years ago by jhpalmieri

I guess Python 3 doesn't take that long to build, but most users won't ever use it, so why make it standard? Why not make it optional instead (including the other changes here so that installing Python 3 won't break Sage)?

The variable SAGE_PYTHON3 needs to be documented. It should have been documented before, but it was only used in the top level configure file. In this ticket it is starting to be used more widely, so documentation is more important.

comment:4 Changed 4 years ago by vbraun

Hopefully most users WILL use Python 3 in the future ;-)

The advantage of having it by default is that we can use it for regression testing so that the part that already works with Python 3 will keep working during the transition period: #22357

comment:5 Changed 4 years ago by chapoton

Some time ago, at least one person did not want that SAGE_PYTHON3 get documented : #20912.

comment:6 Changed 4 years ago by jhpalmieri

For the documentation, how about something like this:

  • src/doc/en/installation/source.rst

    diff --git a/src/doc/en/installation/source.rst b/src/doc/en/installation/source.rst
    index 1539260..d265cab 100644
    a b Here are some of the more commonly used variables affecting the build process: 
    11211121  supports :envvar:`SAGE_SUDO`, into a root-owned installation
    11221122  hierarchy (:envvar:`SAGE_LOCAL`).
     1124- :envvar:`SAGE_PYTHON3` - set this to ``yes`` to build Sage using
     1125  Python 3 rather than Python 2.
     1127  .. WARNING::
     1129     This will probably break your Sage installation!
     1131  .. WARNING::
     1133     This environment variable may not be supported in future versions
     1134     of Sage; it may be replaced by (for example) ``configure``
     1135     options.
    11241137Variables to set if you're trying to build Sage with an unusual setup, e.g.,
    11251138an unsupported machine or an unusual compiler:

comment:7 Changed 4 years ago by vbraun

Fine with me; I'd be less hesitant in saying that it will definitely be removed in 2020 together with python 2 ;-)

comment:8 Changed 4 years ago by jhpalmieri

  • Branch changed from u/vbraun/install_both_python_2_and_3_by_default to u/jhpalmieri/install_both_python_2_and_3_by_default

comment:9 Changed 4 years ago by jhpalmieri

  • Commit changed from 80e64a238d51dca84e5a9ccd5db7868732bf7af8 to c133592a8d511178c556f0015544e4a4256e831a

Okay, I've added the documentation to the branch. I'm okay with the rest of it.

New commits:

c133592document SAGE_PYTHON3

comment:10 Changed 4 years ago by vbraun

  • Status changed from needs_review to positive_review

comment:11 Changed 4 years ago by vbraun

  • Reviewers set to John Palmieri

comment:12 Changed 4 years ago by vbraun

  • Branch changed from u/jhpalmieri/install_both_python_2_and_3_by_default to c133592a8d511178c556f0015544e4a4256e831a
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:13 Changed 4 years ago by jdemeyer

  • Commit c133592a8d511178c556f0015544e4a4256e831a deleted

This broke building with SAGE_PYTHON3=yes: #22638.

comment:14 Changed 4 years ago by jhpalmieri

See #22756 for a followup: Python3 seems to be broken on OS X.

comment:15 Changed 4 years ago by jhpalmieri

See #22770 for an easy to review followup to this ticket: this ticket introduced an error in the functools32 spkg-install script, fixed at #22770.

Note: See TracTickets for help on using tickets.