pypy{27,310}: 7.3.17 -> 7.3.19, pypy311: init at 7.3.19

This commit is contained in:
FliegendeWurst
2025-05-09 08:53:22 +02:00
parent 59ea1ff74a
commit 2d23255ff5
4 changed files with 153 additions and 20 deletions
@@ -121,6 +121,9 @@ stdenv.mkDerivation rec {
dontPatchShebangs = true;
disallowedReferences = [ python ];
# fix compiler error in curses cffi module, where char* != const char*
NIX_CFLAGS_COMPILE =
if stdenv.cc.isClang then "-Wno-error=incompatible-function-pointer-types" else null;
C_INCLUDE_PATH = lib.makeSearchPathOutput "dev" "include" buildInputs;
LIBRARY_PATH = lib.makeLibraryPath buildInputs;
LD_LIBRARY_PATH = lib.makeLibraryPath (
@@ -192,13 +195,18 @@ stdenv.mkDerivation rec {
mkdir -p $out/${executable}-c/pypy/bin
mv $out/bin/${executable} $out/${executable}-c/pypy/bin/${executable}
ln -s $out/${executable}-c/pypy/bin/${executable} $out/bin/${executable}
''
# _testcapi is compiled dynamically, into the store.
# This would fail if we don't do it here.
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
pushd /
$out/bin/${executable} -c "from test import support"
popd
'';
setupHook = python-setup-hook sitePackages;
# TODO: A bunch of tests are failing as of 7.1.1, please feel free to
# fix and re-enable if you have the patience and tenacity.
doCheck = false;
# TODO: Investigate why so many tests are failing.
checkPhase =
let
disabledTests =
@@ -213,6 +221,9 @@ stdenv.mkDerivation rec {
"test_urllib2net"
"test_urllibnet"
"test_urllib2_localnet"
# test_subclass fails with "internal error"
# test_load_default_certs_env fails for unknown reason
"test_ssl"
]
++ lib.optionals isPy3k [
# disable asyncio due to https://github.com/NixOS/nix/issues/1238
@@ -226,6 +237,88 @@ stdenv.mkDerivation rec {
# disable __all__ because of spurious imp/importlib warning and
# warning-to-error test policy
"test___all__"
# fail for multiple reasons, TODO: investigate
"test__opcode"
"test_ast"
"test_audit"
"test_builtin"
"test_c_locale_coercion"
"test_call"
"test_class"
"test_cmd_line"
"test_cmd_line_script"
"test_code"
"test_code_module"
"test_codeop"
"test_compile"
"test_coroutines"
"test_cprofile"
"test_ctypes"
"test_embed"
"test_exceptions"
"test_extcall"
"test_frame"
"test_generators"
"test_grammar"
"test_idle"
"test_iter"
"test_itertools"
"test_list"
"test_marshal"
"test_memoryio"
"test_memoryview"
"test_metaclass"
"test_mmap"
"test_multibytecodec"
"test_opcache"
"test_pdb"
"test_peepholer"
"test_positional_only_arg"
"test_print"
"test_property"
"test_pyclbr"
"test_range"
"test_re"
"test_readline"
"test_regrtest"
"test_repl"
"test_rlcompleter"
"test_signal"
"test_sort"
"test_source_encoding"
"test_ssl"
"test_string_literals"
"test_structseq"
"test_subprocess"
"test_super"
"test_support"
"test_syntax"
"test_sys"
"test_sys_settrace"
"test_tcl"
"test_termios"
"test_threading"
"test_trace"
"test_tty"
"test_unpack_ex"
"test_utf8_mode"
"test_weakref"
"test_capi"
"test_concurrent_futures"
"test_dataclasses"
"test_doctest"
"test_future_stmt"
"test_importlib"
"test_inspect"
"test_pydoc"
"test_warnings"
]
++ lib.optionals isPy310 [
"test_contextlib_async"
"test_future"
"test_lzma"
"test_module"
"test_typing"
];
in
''
@@ -264,6 +357,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://www.pypy.org/";
changelog = "https://doc.pypy.org/en/stable/release-v${version}.html";
description = "Fast, compliant alternative implementation of the Python language (${pythonVersion})";
mainProgram = "pypy";
license = licenses.mit;
@@ -274,6 +368,9 @@ stdenv.mkDerivation rec {
"x86_64-darwin"
];
broken = optimizationLevel == "0"; # generates invalid code
maintainers = with maintainers; [ andersk ];
maintainers = with maintainers; [
andersk
fliegendewurst
];
};
}
@@ -100,7 +100,6 @@ stdenv.mkDerivation {
mv -t $out bin include lib-python lib_pypy site-packages
mv $out/bin/libpypy*-c${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/
${lib.optionalString stdenv.hostPlatform.isLinux ''
mv lib/libffi.so.6* $out/lib/
rm $out/bin/*.debug
''}