Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another batch of Python 2 clean-ups #76488

Merged
merged 16 commits into from Jan 6, 2020
Merged

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Dec 25, 2019

Continued from #75668

I was digging through my system’s build-time closure using nix-store -q --graph $(nix-instantiate -I nixos-config=/etc/nixos/configuration.nix -I nixpkgs=$PWD '<nixpkgs/nixos>' -A system) | dijkstra -da $(nix-instantiate '<nixpkgs>' -A python2) | gvpr -c 'N[dist>1000.0]{delete(NULL, $)}' | xdot - and eliminating Python 2 from derivations referencing it by replacing it with Python 3 whenever possible.

Testing

Some packages were not handled in #75668:

New findings not covered here or in the previous PR:

  • crda now patched

    error
      GEN  keys-gcrypt.c
      Trusted pubkeys: pubkeys/sforshee.key.pub.pem pubkeys/linville.key.pub.pem
      File "./utils/key2pub.py", line 6
        except ImportError, e:
                          ^
    SyntaxError: invalid syntax
    make: *** [Makefile:115: keys-gcrypt.c] Error 1
    
  • lilypond: ERROR: Please install required programs: python3 < 3.0 (installed: 3.7.5) python3 < 3.0 (installed: 3.7.5) python3 < 3.0 (installed: 3.7.5) Python.h (python-devel, python-dev or libpython-dev package)

  • dblatex:

      File "./setup.py", line 86
        print self._package_base
                 ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print(self._package_base)?
    ``` https://sourceforge.net/p/dblatex/mailman/dblatex-devel/thread/CAA19uiQVNJezugn6t9BsL3rY481DOG65B2buw2hs2KmK6Z9wBg%40mail.gmail.com/#msg36759114
    
  • zziplib (handled in zziplib: 0.13.69 → 0.13.71 #85147) docs/makedocs.py is not compatible with python3 gdraheim/zziplib#47:

    make[3]: Entering directory '/build/zziplib-0.13.69/x86_64-pc-linux-gnu/docs'
    PYTHONDONTWRITEBYTECODE=1  /nix/store/5dbidajmgrvskv7kj6bwrkza8szxkgar-python3-3.7.5/bin/python  ../../docs/makedocs.py ../../zzip/*.c  \
                       "--package=zziplib" "--version=0.13.69" \
                       "--onlymainheader=zzip/lib.h" "--output=zziplib"
      File "../../docs/makedocs.py", line 40
        print t_fileheader.get_filename(), t_fileheader.src_mainheader()
                         ^
    SyntaxError: invalid syntax
    make[3]: *** [Makefile:584: zziplib.xml] Error 1
    
  • mercurial (handled in mercurial: 4.9.1 -> 5.2.1 + python3 🚀 #76126)

  • duplicity (does no support Python 3 in stable version)
  • backblaze-b2 (should be supported but cannot test it)
  • scons (handled in scons: Switch to Python 3 #75877)
  • subversion (via checkInputs, even when tests are disabled)
  • inkscape (fixed in upcoming release lib2geom: init at 1.0 #50286)
  • gimp (fixed in upcoming release gimp: Testing dev version with Meson #67576)
  • mypaint (fixed in upcoming release mypaint: 1.2.1 → 2.0.0-beta.0 #54677)
  • wafHook (???)
  • gitAndTools.git-bz (???)
  • nodejs (too big, ??? firefox depends on this)
  • firefox (too big)
  • chromium (too big)
  • v8
    ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned non-zero exit code.
        pkgresult = exec_script(pkg_config_script, args, "value")
                    ^----------
    Current dir: /build/source/out/Release/
    Command: python /build/source/build/config/linux/pkg-config.py glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0
    Returned 1.
    stderr:
    
      File "/build/source/build/config/linux/pkg-config.py", line 57
        print "You must specify an architecture via -a if using a sysroot."
                                                                          ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("You must specify an architecture via -a if using a sysroot.")?
    
    See //build/config/linux/BUILD.gn:89:3: whence it was called.
      pkg_config("glib") {
      ^-------------------
    See //build/config/compiler/BUILD.gn:228:18: which caused the file to be included.
        configs += [ "//build/config/linux:compiler" ]
                     ^------------------------------
    
  • tdesktop (error: gyp-2015-06-11 not supported for interpreter python3.7)
  • neard (GUI tools depend on PyGTK)
  • gitAndTools.git-hub (:disappointed: Port to Python3 sociomantic-tsunami/git-hub#224)

Introduced in 6449435, only Python 2 is supported and it does not seem to be used by anything.
@FRidh
Copy link
Member

FRidh commented Dec 29, 2019

Please restore the libplist bindings. Not building them by default is fine.

@FRidh FRidh added this to WIP in Staging via automation Dec 30, 2019
@FRidh FRidh moved this from WIP to Needs review in Staging Dec 30, 2019
@FRidh FRidh merged commit 8fff915 into NixOS:staging Jan 6, 2020
Staging automation moved this from Needs review to Done Jan 6, 2020
Python 2 deprecation automation moved this from Needs review to Done Jan 6, 2020
@jtojnar jtojnar deleted the more-python-cleanups branch January 6, 2020 12:17
@jtojnar jtojnar mentioned this pull request Apr 13, 2020
10 tasks
@Mic92
Copy link
Member

Mic92 commented Jun 18, 2020

Nodejs is fixed if using _latest instead of _lts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Staging
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants