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

texlive: use python3 by default #107119

Merged
merged 1 commit into from Jan 27, 2021
Merged

texlive: use python3 by default #107119

merged 1 commit into from Jan 27, 2021

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Dec 17, 2020

There is one python helper script still written for: Utility for writing
Bengali in Rapid Roman Format. But this one does not seem super relevant

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added the 6.topic: TeX Issues regarding texlive and TeX in general label Dec 17, 2020
@ofborg ofborg bot requested a review from veprbl December 17, 2020 21:07
@TredwellGit
Copy link
Member

PygmenTeX does not work with Python 3.
#75730 (comment)

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Dec 17, 2020

PygmenTeX does not work with Python 3.

Argh, texlive is one of the last remaining piece of python2 on my computer.
The software hasn't been updated since 2014 (when added to CTAN), so it doesn't look like it's getting a python3 port :(

@veprbl
Copy link
Member

veprbl commented Dec 17, 2020

PygmenTeX does not work with Python 3.
#75730 (comment)

Perhaps a matter of getting version 0.9 to CTAN
https://bitbucket.org/romildo/pygmentex/commits/de3f9f62a3306bc858a819cd16386a94acfcda9a
сс @romildo regarding the status of that

@Mic92
Copy link
Member Author

Mic92 commented Dec 18, 2020

Can we somehow override texlive here and provide the new version of pygmentex?

@veprbl
Copy link
Member

veprbl commented Dec 18, 2020

Can we somehow override texlive here and provide the new version of pygmentex?

Since it's only python script that has changes, we can just update the texlive.bin.pygmentex part. Please leave a TODO comment to try to revert for texlive 2021.

@veprbl
Copy link
Member

veprbl commented Dec 18, 2020

A list of other scripts, not sure how up to date this is now: https://tug.org/pipermail/tex-live/2019-November/044366.html

@r-burns
Copy link
Contributor

r-burns commented Dec 21, 2020

According to this fedora tracker, pygmentex is the only remaining script https://fedora.portingdb.xyz/pkg/texlive-base/

@romildo
Copy link
Contributor

romildo commented Dec 21, 2020

PygmenTeX does not work with Python 3.
#75730 (comment)

Perhaps a matter of getting version 0.9 to CTAN
https://bitbucket.org/romildo/pygmentex/commits/de3f9f62a3306bc858a819cd16386a94acfcda9a
сс @romildo regarding the status of that

I have just submitted version 0.10 to CTAN.

@Mic92
Copy link
Member Author

Mic92 commented Jan 2, 2021

PygmenTeX does not work with Python 3.
#75730 (comment)

Perhaps a matter of getting version 0.9 to CTAN
bitbucket.org/romildo/pygmentex/commits/de3f9f62a3306bc858a819cd16386a94acfcda9a
сс @romildo regarding the status of that

I have just submitted version 0.10 to CTAN.

Is it possible to pull this ahead of time or do we have to wait for a texlive release?

@veprbl
Copy link
Member

veprbl commented Jan 2, 2021

I suppose we could just hack it in here:

inherit (src) version;
src = stdenv.lib.head (builtins.filter (p: p.tlType == "run") texlive.pygmentex.pkgs);

@veprbl
Copy link
Member

veprbl commented Jan 3, 2021

Actually, we might as well update the whole snapshot. I see pygmentex 0.10 provided by today's texlive https://texlive.info/tlnet-archive/2021/01/03/tlnet/archive/pygmentex.r57190.tar.xz

@romildo
Copy link
Contributor

romildo commented Jan 27, 2021

Is there anything missing to merge this PR?

@Mic92
Copy link
Member Author

Mic92 commented Jan 27, 2021

Is there anything missing to merge this PR?

Updating texlive snapshot unless this has been done in the meantime?

There is one python helper script still written for: Utility for writing
Bengali in Rapid Roman Format. But this one does not seem super relevant
@Mic92 Mic92 reopened this Jan 27, 2021
@romildo
Copy link
Contributor

romildo commented Jan 27, 2021

Is there anything missing to merge this PR?

Updating texlive snapshot unless this has been done in the meantime?

I think it has. Currently in unstable it has pygmentex-0.10, which needs python3.

@Mic92
Copy link
Member Author

Mic92 commented Jan 27, 2021

I guess than it is good to go?

@romildo
Copy link
Contributor

romildo commented Jan 27, 2021

I guess than it is good to go?

pygmentex works for me with this PR merged into unstable.

$ cat ../../shell.nix
{ nixpkgs ? import  {} } :
let
  pkgs = import /alt/nixpkgs-channels {
    config.allowUnfree = true;
  };
in
pkgs.stdenv.mkDerivation {
  name = "my-texlive-env-0";
  buildInputs = with pkgs; [
    (texlive.combine {
      inherit (texlive)
        scheme-basic
        collection-langportuguese
        babel-portuges
        caption
        efbox
        fancyvrb
        framed
        latexmk
        lualatex-math
        luatexbase
        mdframed
        needspace
        newfloat
        pgf
        pygmentex
        selnolig
        unicode-math
        xcolor
        zref
      ;
    } )
  ];
}

$ nix-shell ../../shell.nix

$ ls -l _build/formatação.{snippets,pygmented}
ls: cannot access '_build/formatação.pygmented': No such file or directory
-rw-r--r-- 1 romildo romildo 1221 Jan 27 08:30 _build/formatação.snippets

$ readlink -f $(which pygmentex)
/nix/store/lgg0f0hy62f551illb7s8ziy07c32w99-texlive-combined-2020/bin/pygmentex

$ pygmentex -V
PygmenTeX version 0.10, (c) 2020 by José Romildo.

$ pygmentex _build/formatação.snippets

$ ls -l _build/formatação.{snippets,pygmented}
-rw-r--r-- 1 romildo romildo 14425 Jan 27 08:32 _build/formatação.pygmented
-rw-r--r-- 1 romildo romildo 1221 Jan 27 08:30 _build/formatação.snippets

I was able to compile my document.

@veprbl veprbl merged commit 34dea03 into NixOS:master Jan 27, 2021
@Mic92 Mic92 deleted the texlive branch January 27, 2021 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: TeX Issues regarding texlive and TeX in general 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants