pythonInterpreters.pypy39_prebuilt: fix `tests` eval (#278950)

Without the change `test-pythonPackagesExtensions` test fails the eval
as:

$ nix build -f. pythonInterpreters.pypy39_prebuilt.tests --show-trace
error:
… while evaluating an attribute name
at pkgs/development/interpreters/python/tests.nix:151:16:
150| });
151| in pkgs_.${python.pythonAttr}.pkgs.foo;
| ^
152| });

error: value is null while a string was expected

This happens because `pypy39_prebuilt` exposes `pythonAttr` attribute,
but it has a `null` value. Fix the test to filter out prebuilt pypy.

authored by Sergei Trofimovich and committed by GitHub c64c04e8 a6671578

+7 -1
+7 -1
pkgs/development/interpreters/python/tests.nix
··· 125 125 extension = self: super: { 126 126 foobar = super.numpy; 127 127 }; 128 + # `pythonInterpreters.pypy39_prebuilt` does not expose an attribute 129 + # name (is not present in top-level `pkgs`). 130 + is_prebuilt = python: python.pythonAttr == null; 128 131 in lib.optionalAttrs (python.isPy3k) ({ 129 132 test-packageOverrides = let 130 133 myPython = let ··· 138 141 # test-overrideScope = let 139 142 # myPackages = python.pkgs.overrideScope extension; 140 143 # in assert myPackages.foobar == myPackages.numpy; myPackages.python.withPackages(ps: with ps; [ foobar ]); 141 - } // lib.optionalAttrs (python ? pythonAttr) { 144 + # 145 + # Have to skip prebuilt python as it's not present in top-level 146 + # `pkgs` as an attribute. 147 + } // lib.optionalAttrs (python ? pythonAttr && !is_prebuilt python) { 142 148 # Test applying overrides using pythonPackagesOverlays. 143 149 test-pythonPackagesExtensions = let 144 150 pkgs_ = pkgs.extend(final: prev: {