
Hello, This week end I built GHC from the source, and everything ran smoothly. However, I cannot figure out how to set python2 as the python executable to build the documentation or to run the testsuite. How do you proceed ? Adrien

Do you need it only for build time or also for usage by end users?
If the switch to python2 is needed only for build time you can create a
symlink named "python" which would point to python2, and add the location
to the path before /usr/bin. This way in the build environment "python"
would be python2.
I hope I understood your question correctly :)
On Tue, May 1, 2012 at 8:34 PM, Adrien Haxaire
Hello,
This week end I built GHC from the source, and everything ran smoothly.
However, I cannot figure out how to set python2 as the python executable to build the documentation or to run the testsuite.
How do you proceed ?
Adrien
_______________________________________________ arch-haskell mailing list arch-haskell@haskell.org http://www.haskell.org/mailman/listinfo/arch-haskell

On Tue, May 01, 2012 at 07:34:57PM +0200, Adrien Haxaire wrote:
Hello,
This week end I built GHC from the source, and everything ran smoothly.
However, I cannot figure out how to set python2 as the python executable to build the documentation or to run the testsuite.
How do you proceed ?
In the GHC package in ArchHaskell we simply patch up the source: check() { cd ghc-${pkgver} # python2 rename sed -e 's/PYTHON = python/&2/' -i testsuite/mk/boilerplate.mk sed -e 's_#!/usr/bin/env python_&2_' -i testsuite/timeout/calibrate testsuite/timeout/timeout.py make THREADS=9 test } /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus Perl is another example of filling a tiny, short-term need, and then being a real problem in the longer term. -- Alan Kay

Thank you Jonathan and Magnus. I did not think it could be as simple as creating a symlink. I was somehow expecting that the python2 libraries wouldn't be found with a symlink, but they are, and I can run the tests now. I just need it to run the tests locally and create the documentation, i.e. at compile time, so the symlink is a good solution. I will maybe go for the more automatic/stable renaming for the long run, it is a nice thing to know. I'll see what I find most convenient depending on my workflow. Anyway, both versions are simple enough to put in a simple script. Thanks again! Adrien On 05/01/2012 10:18 PM, Magnus Therning wrote:
On Tue, May 01, 2012 at 07:34:57PM +0200, Adrien Haxaire wrote:
Hello,
This week end I built GHC from the source, and everything ran smoothly.
However, I cannot figure out how to set python2 as the python executable to build the documentation or to run the testsuite.
How do you proceed ?
In the GHC package in ArchHaskell we simply patch up the source:
check() { cd ghc-${pkgver}
# python2 rename sed -e 's/PYTHON = python/&2/' -i testsuite/mk/boilerplate.mk sed -e 's_#!/usr/bin/env python_&2_' -i testsuite/timeout/calibrate testsuite/timeout/timeout.py
make THREADS=9 test }
/M
_______________________________________________ arch-haskell mailing list arch-haskell@haskell.org http://www.haskell.org/mailman/listinfo/arch-haskell
participants (3)
-
Adrien Haxaire
-
Jonathan Lahav
-
Magnus Therning