Modernize build setup for Julia 1.10 + TeX Live 2025+#37
Modernize build setup for Julia 1.10 + TeX Live 2025+#37duncaneddy wants to merge 2 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernizes the build setup for tufte_algorithms_book, addressing the issue (#30) of broken builds due to incompatibilities between modern Python (Pygments 2.7+) and the custom Julia Pygments lexer, and between modern Julia versions and Weave.jl. The PR pins Julia to 1.10, bumps the vendored pythontex.sty to v0.19, migrates from makefile to a justfile, introduces a uv-managed Python virtual environment, and adds a [compat] section to Project.toml.
Changes:
- Introduces
Justfilewithsetup,compile,chapter,test, andcleanrecipes replacing the oldmakefile - Updates
Project.tomlwith a[compat]section and regeneratesManifest.tomlfor Julia 1.10 - Bumps
pythontex.styfrom v0.18 to v0.19 and updatesREADME.md
Reviewed changes
Copilot reviewed 3 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
Justfile |
New just-based command runner replacing makefile, with setup/compile/test/clean targets |
README.md |
Modernized prerequisites (juliaup, uv, just) and updated usage instructions |
Project.toml |
Added [compat] section pinning Julia 1.10 and package version bounds |
Manifest.toml |
Regenerated for Julia 1.10 with updated package versions |
pythontex.sty |
Version bumped from v0.18 to v0.19 to match TeX Live 2025+ |
.gitignore |
Added .venv/ to ignored paths |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # the PDF is still produced correctly. | ||
| compile: pull-code _ensure-venv | ||
| -lualatex -interaction=nonstopmode book | ||
| .venv/bin/python "$(which pythontex)" --interpreter "julia:julia +1.10" book |
There was a problem hiding this comment.
The $(which pythontex) invocation will silently produce an empty string if pythontex is not found on the system PATH (e.g., under a non-standard TeX Live installation). In that case, the command reduces to .venv/bin/python "", which fails with a confusing error like can't open file ''. Consider using command -v pythontex with an explicit error check, or documenting that pythontex must be accessible via PATH after TeX Live installation. The same issue exists on line 25.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description
There are a number of issues trying to setup a current version of this repo while it doesn't compile and run from initial checkout currently. Although discussed in #30 the packages and setup used have incompatibilities with current versions of Weave.jl and julia itself. Although this PR does not fully address the issues of modernizing/fixing the required dependencies, it does pin the required packages to ensure that it can be easily, and reproducibly installed.
Additionally, this PR modernizes the build system to use just and creates a one-command setup setup making it even easier to setup this package. Users can now just run
just setup && just compileto get started with current package management tooling (juliaup, uv, TeX Live 2025+).Changelog
Added
Changed
makefiletojustfileto avoid using a build-system tool for command execution.[compat]section toProject.toml— pins Julia 1.10 and package version bounds for reproducible installsManifest.tomlfor Julia 1.10 with modern package versionspythontex.styfrom v0.18 to v0.19 — matches the script version shipped with TeX Live 2025+.venv/bin/pythonwith--interpreter "julia:julia +1.10"— ensures custom Pygments lexer/style are available and Julia 1.10 is usedsubmodule init—git submodule update --initreplaces separate init + update commandsFixed
pygments.util.unirangeimport with inlined Unicode range, fixing compatibility with Pygments 2.7+ (in Fix unirange import pygments-julia#11)