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鈥檒l 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鈥檚 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 #85147) 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 #76126)

  • duplicity (does no support Python 3 in stable version)
  • backblaze-b2 (should be supported but cannot test it)
  • scons (handled in #75877)
  • subversion (via checkInputs, even when tests are disabled)
  • inkscape (fixed in upcoming release #50286)
  • gimp (fixed in upcoming release #67576)
  • mypaint (fixed in upcoming release #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 (馃槥 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 FRidh commented Dec 29, 2019

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

jtojnar added 9 commits Dec 25, 2019
Also remove no longer needed perl.
Nothing much seems to be using it and we do not want Python 2 in our closure.
It does not seem to be used by anything and we want to get rid of Python 2 from closure.
For some reason we depended on both.
jtojnar added 6 commits Dec 25, 2019
It does not appear to be actually necessary 鈥 wafHook will add it.
Nothing seems to use the Python bindings anyway.
@jtojnar jtojnar force-pushed the jtojnar:more-python-cleanups branch from 8bfffb0 to 4a583c8 Dec 29, 2019
@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
13 checks passed
13 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
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 jtojnar:more-python-cleanups branch Jan 6, 2020
@jtojnar jtojnar mentioned this pull request Apr 13, 2020
3 of 10 tasks complete
@Mic92
Copy link
Contributor

@Mic92 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can鈥檛 perform that action at this time.