anchor.diff:      ln -s "$out/bin/python3" "$out/bin/python"
       ln -s "$out/bin/python3-config" "$out/bin/python-config"
       ln -s "$out/lib/pkgconfig/python3.pc" "$out/lib/pkgconfig/python.pc"
  +
  +    # Determinism: rebuild all bytecode
  +    # We exclude lib2to3 because that's Python 2 code which fails
  +    # We rebuild three times, once for each optimization level
  +    find $out -name "*.py" | $out/bin/python -m compileall -q -f -x "lib2to3" -i -
  +    find $out -name "*.py" | $out/bin/python -O -m compileall -q -f -x "lib2to3" -i -
  +    find $out -name "*.py" | $out/bin/python -OO -m compileall -q -f -x "lib2to3" -i -
     '';
   
     postFixup = ''
  
positive.code: 
    NIX_LDFLAGS = optionalString stdenv.isLinux "-lgcc_s";
  
    prePatch = optionalString stdenv.isDarwin ''
      substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"'
      substituteInPlace configure --replace '-Wl,-stack_size,1000000' ' '
    '';
  
    postPatch = optionalString (x11Support && (tix != null)) ''
      substituteInPlace "Lib/tkinter/tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
    ''
      # Avoid picking up getentropy() from glibc >= 2.25, as that would break
      # on older kernels.  http://bugs.python.org/issue29157
      + optionalString stdenv.isLinux
        ''
          substituteInPlace Python/random.c --replace 'defined(HAVE_GETENTROPY)' '0'
          cat Python/random.c
        '';
  
    preConfigure = ''
      for i in /usr /sw /opt /pkg; do	# improve purity
  
negative.code:     # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
      echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
  
      # Determinism: Windows installers were not deterministic.
      # We're also not interested in building Windows installers.
      find "$out" -name 'wininst*.exe' | xargs -r rm -f
  
      # Use Python3 as default python
      ln -s "$out/bin/idle3" "$out/bin/idle"
      ln -s "$out/bin/pip3" "$out/bin/pip"
  