Skip to content

Commit

Permalink
Merge pull request #2 from maxnoe/github_ci
Browse files Browse the repository at this point in the history
Use https repo-url, enable github actions, smaller general updates
  • Loading branch information
maxnoe authored Aug 18, 2023
2 parents 256743a + d35329f commit ac654d2
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 28 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
branches:
- main
tags:
- '**'
pull_request:

schedule:
- cron: '0 16 * * 1' # Build every monday, 16:00

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3

- name: Install
run: |
python --version
pip install .
- name: Test TL2022
run: |
python -m install_texlive -c="-a" -t 2022 -p $HOME/texlive -f tex-packages.txt -v
export PATH=$HOME/texlive/2022/bin/x86_64-linux:$PATH
latexmk -lualatex -halt-on-error -interaction=nonstopmode hello.tex
latexmk -c hello.tex
- name: Test TL current
run: |
python -m install_texlive -c="-a" -p $HOME/texlive -v -f tex-packages.txt
export PATH=$HOME/texlive/2023/bin/x86_64-linux:$PATH
latexmk -lualatex -halt-on-error -interaction=nonstopmode hello.tex
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Maximilian Linhoff <[email protected]> <[email protected]>
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# texlive batch install [![Build Status](https://travis-ci.org/MaxNoe/texlive-batch-installation.svg?branch=master)](https://travis-ci.org/MaxNoe/texlive-batch-installation)

The TeX Live installer does not allow for interaction less installation.
The TeX Live installer does not allow for interaction-less installation.

This is the reason why I created this project using pexpect to talk to the `install-tl`
script.

Expand Down Expand Up @@ -36,3 +37,20 @@ optional arguments:
--source Install the source tree
--docs Install the docs tree
```


For a minimal installation (e.g. for CI jobs building documents), it is recommended to
only install the bare minimum selection of package collections: `-c "-a"` and then
have a file `tex-packages.txt` with the actually needed packages to compile the document:

```
$ python -m install_texlive -p .texlive -t 2022 --collections='-a' --package-file tex-packages.txt --update
```

To find out which package provides which style file (e.g. to find out which CTAN package provides `scrartcl.cls`), this command is helpful:

```
$ tlmgr search --global --file '/scrartcl.cls'
koma-script:
texmf-dist/tex/latex/koma-script/scrartcl.cls
```
8 changes: 2 additions & 6 deletions install_texlive/__init__.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
import logging
import subprocess as sp
import os
import pexpect
import re
import requests
from io import BytesIO
import tarfile

__version__ = '0.3.1'
__version__ = '0.3.2'

log = logging.getLogger(__name__)

has_curl = sp.call(['which', 'curl'], stdout=sp.PIPE) == 0
has_wget = sp.call(['which', 'wget'], stdout=sp.PIPE) == 0

URL = 'http://mirror.ctan.org/systems/texlive/tlnet/'
URL = 'https://mirror.ctan.org/systems/texlive/tlnet/'
OLDURL = 'https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/{v}/tlnet-final/'


Expand Down
2 changes: 1 addition & 1 deletion install_texlive/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def main():
additional_packages.extend(f.read().splitlines())

if additional_packages:
log.info('Start installing addtional packages')
log.info('Start installing additional packages')
# tlmgr must always be up to date to install packages
sp.run(['tlmgr', 'update', '--self'], env=env, check=True)
sp.run(['tlmgr', 'install', *additional_packages], env=env, check=True)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
8 changes: 4 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ name = install_texlive
version = attr: install_texlive.__version__
description = Install texlive without human interaction in the process
url = http://github.com/maxnoe/texlive-batch-installation
author = Maximilian Noethe
author_email = maximilian.noethe@tu-dortmund.de
author = Maximilian Linhoff
author_email = maximilian.linhoff@tu-dortmund.de
license = MIT

[options]
packages = find:
install_requires =
install_requires =
pexpect
requests

[options.entry_points]
console_scripts =
console_scripts =
install_texlive = install_texlive.__main__:main
6 changes: 6 additions & 0 deletions tex-packages.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
luatex
latex
latex-bin
fontspec
latexmk
koma-script

0 comments on commit ac654d2

Please sign in to comment.