[GHC] #9184: Allow the use of Python 3 when building GHC

GHC ghc-devs at haskell.org
Fri Jun 13 23:09:56 UTC 2014


#9184: Allow the use of Python 3 when building GHC
-------------------------------+-------------------------------------------
        Reporter:  aspidites   |            Owner:
            Type:  feature     |           Status:  new
  request                      |        Milestone:
        Priority:  normal      |          Version:  7.8.2
       Component:  Build       |         Keywords:  python
  System                       |     Architecture:  Unknown/Multiple
      Resolution:              |       Difficulty:  Easy (less than 1 hour)
Operating System:              |       Blocked By:
  Unknown/Multiple             |  Related Tickets:
 Type of failure:              |
  None/Unknown                 |
       Test Case:              |
        Blocking:              |
-------------------------------+-------------------------------------------

Comment (by monoidal):

 There's one more tuple unpacking in your patch: `lambda b, d, n`.

 I'm afraid there are more things to change for full compatibility.

 It seems we run the testsuite using python2 if it is detected (see defn of
 `PYTHON` in `testsuite/mk/boilerplate.mk`). If I change it to `PYTHON =
 python3`, I get several errors with `sh validate --testsuite-only`:
 `execfile` is no longer available (should become something like `with
 open(..., 'r') as f: exec(f.read())`), `from string import join` should
 become string's `join` method, `reduce` is no longer builtin (needs import
 from functools), `import thread` should become `import _thread` for 3,
 `sys.stdout = os.fdopen(sys.__stdout__.fileno(), "w", 0)` fails (I stopped
 at that one). Would you be willing to take a look?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9184#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list