@@ -121,6 +121,9 @@ stdenv.mkDerivation rec {
121121 dontPatchShebangs = true ;
122122 disallowedReferences = [ python ] ;
123123
124+ # fix compiler error in curses cffi module, where char* != const char*
125+ NIX_CFLAGS_COMPILE =
126+ if stdenv . cc . isClang then "-Wno-error=incompatible-function-pointer-types" else null ;
124127 C_INCLUDE_PATH = lib . makeSearchPathOutput "dev" "include" buildInputs ;
125128 LIBRARY_PATH = lib . makeLibraryPath buildInputs ;
126129 LD_LIBRARY_PATH = lib . makeLibraryPath (
@@ -192,13 +195,18 @@ stdenv.mkDerivation rec {
192195 mkdir -p $out/${ executable } -c/pypy/bin
193196 mv $out/bin/${ executable } $out/${ executable } -c/pypy/bin/${ executable }
194197 ln -s $out/${ executable } -c/pypy/bin/${ executable } $out/bin/${ executable }
198+ ''
199+ # _testcapi is compiled dynamically, into the store.
200+ # This would fail if we don't do it here.
201+ + lib . optionalString ( stdenv . buildPlatform . canExecute stdenv . hostPlatform ) ''
202+ pushd /
203+ $out/bin/${ executable } -c "from test import support"
204+ popd
195205 '' ;
196206
197207 setupHook = python-setup-hook sitePackages ;
198208
199- # TODO: A bunch of tests are failing as of 7.1.1, please feel free to
200- # fix and re-enable if you have the patience and tenacity.
201- doCheck = false ;
209+ # TODO: Investigate why so many tests are failing.
202210 checkPhase =
203211 let
204212 disabledTests =
@@ -213,6 +221,9 @@ stdenv.mkDerivation rec {
213221 "test_urllib2net"
214222 "test_urllibnet"
215223 "test_urllib2_localnet"
224+ # test_subclass fails with "internal error"
225+ # test_load_default_certs_env fails for unknown reason
226+ "test_ssl"
216227 ]
217228 ++ lib . optionals isPy3k [
218229 # disable asyncio due to https://github.com/NixOS/nix/issues/1238
@@ -226,6 +237,88 @@ stdenv.mkDerivation rec {
226237 # disable __all__ because of spurious imp/importlib warning and
227238 # warning-to-error test policy
228239 "test___all__"
240+ # fail for multiple reasons, TODO: investigate
241+ "test__opcode"
242+ "test_ast"
243+ "test_audit"
244+ "test_builtin"
245+ "test_c_locale_coercion"
246+ "test_call"
247+ "test_class"
248+ "test_cmd_line"
249+ "test_cmd_line_script"
250+ "test_code"
251+ "test_code_module"
252+ "test_codeop"
253+ "test_compile"
254+ "test_coroutines"
255+ "test_cprofile"
256+ "test_ctypes"
257+ "test_embed"
258+ "test_exceptions"
259+ "test_extcall"
260+ "test_frame"
261+ "test_generators"
262+ "test_grammar"
263+ "test_idle"
264+ "test_iter"
265+ "test_itertools"
266+ "test_list"
267+ "test_marshal"
268+ "test_memoryio"
269+ "test_memoryview"
270+ "test_metaclass"
271+ "test_mmap"
272+ "test_multibytecodec"
273+ "test_opcache"
274+ "test_pdb"
275+ "test_peepholer"
276+ "test_positional_only_arg"
277+ "test_print"
278+ "test_property"
279+ "test_pyclbr"
280+ "test_range"
281+ "test_re"
282+ "test_readline"
283+ "test_regrtest"
284+ "test_repl"
285+ "test_rlcompleter"
286+ "test_signal"
287+ "test_sort"
288+ "test_source_encoding"
289+ "test_ssl"
290+ "test_string_literals"
291+ "test_structseq"
292+ "test_subprocess"
293+ "test_super"
294+ "test_support"
295+ "test_syntax"
296+ "test_sys"
297+ "test_sys_settrace"
298+ "test_tcl"
299+ "test_termios"
300+ "test_threading"
301+ "test_trace"
302+ "test_tty"
303+ "test_unpack_ex"
304+ "test_utf8_mode"
305+ "test_weakref"
306+ "test_capi"
307+ "test_concurrent_futures"
308+ "test_dataclasses"
309+ "test_doctest"
310+ "test_future_stmt"
311+ "test_importlib"
312+ "test_inspect"
313+ "test_pydoc"
314+ "test_warnings"
315+ ]
316+ ++ lib . optionals isPy310 [
317+ "test_contextlib_async"
318+ "test_future"
319+ "test_lzma"
320+ "test_module"
321+ "test_typing"
229322 ] ;
230323 in
231324 ''
@@ -264,6 +357,7 @@ stdenv.mkDerivation rec {
264357
265358 meta = with lib ; {
266359 homepage = "https://www.pypy.org/" ;
360+ changelog = "https://doc.pypy.org/en/stable/release-v${ version } .html" ;
267361 description = "Fast, compliant alternative implementation of the Python language (${ pythonVersion } )" ;
268362 mainProgram = "pypy" ;
269363 license = licenses . mit ;
@@ -274,6 +368,9 @@ stdenv.mkDerivation rec {
274368 "x86_64-darwin"
275369 ] ;
276370 broken = optimizationLevel == "0" ; # generates invalid code
277- maintainers = with maintainers ; [ andersk ] ;
371+ maintainers = with maintainers ; [
372+ andersk
373+ fliegendewurst
374+ ] ;
278375 } ;
279376}
0 commit comments