pypy: fix build (ZHF)
This commit is contained in:
parent
25e60feb72
commit
1c5c4e91d7
@ -49,16 +49,25 @@ let
|
||||
--replace "libraries=['curses']" "libraries=['ncurses']"
|
||||
|
||||
# tkinter hints
|
||||
substituteInPlace lib_pypy/_tkinter/tklib.py \
|
||||
substituteInPlace lib_pypy/_tkinter/tklib_build.py \
|
||||
--replace "'/usr/include/tcl'" "'${tk}/include', '${tcl}/include'" \
|
||||
--replace "linklibs=['tcl', 'tk']" "linklibs=['${tcl.libPrefix}', '${tk.libPrefix}']" \
|
||||
--replace "linklibs = ['tcl' + _ver, 'tk' + _ver]" "linklibs=['${tcl.libPrefix}', '${tk.libPrefix}']" \
|
||||
--replace "libdirs = []" "libdirs = ['${tk}/lib', '${tcl}/lib']"
|
||||
|
||||
sed -i "s@libraries=\['sqlite3'\]\$@libraries=['sqlite3'], include_dirs=['${sqlite}/include'], library_dirs=['${sqlite}/lib']@" lib_pypy/_sqlite3.py
|
||||
sed -i "s@libraries=\['sqlite3'\]\$@libraries=['sqlite3'], include_dirs=['${sqlite}/include'], library_dirs=['${sqlite}/lib']@" lib_pypy/_sqlite3_build.py
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
postBuild = ''
|
||||
cd ./lib_pypy
|
||||
../pypy-c ./_audioop_build.py
|
||||
../pypy-c ./_curses_build.py
|
||||
../pypy-c ./_sqlite3_build.py
|
||||
../pypy-c ./_tkinter/tklib_build.py
|
||||
cd ..
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
export TERMINFO="${ncurses}/share/terminfo/";
|
||||
|
@ -1,12 +1,12 @@
|
||||
addPythonPath() {
|
||||
addToSearchPathWithCustomDelimiter : PYTHONPATH $1/lib/pypy2.5/site-packages
|
||||
addToSearchPathWithCustomDelimiter : PYTHONPATH $1/lib/pypy2.6/site-packages
|
||||
}
|
||||
|
||||
toPythonPath() {
|
||||
local paths="$1"
|
||||
local result=
|
||||
for i in $paths; do
|
||||
p="$i/lib/pypy2.5/site-packages"
|
||||
p="$i/lib/pypy2.6/site-packages"
|
||||
result="${result}${result:+:}$p"
|
||||
done
|
||||
echo $result
|
||||
|
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
||||
''
|
||||
dst=$out/lib/${python.libPrefix}/site-packages
|
||||
mkdir -p $dst
|
||||
PYTHONPATH="$dst:$PYTHONPATH"
|
||||
export PYTHONPATH="$dst:$PYTHONPATH"
|
||||
${python}/bin/${python.executable} setup.py install --prefix=$out --install-lib=$out/lib/${python.libPrefix}/site-packages
|
||||
wrapPythonPrograms
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user