From 04ed5156849fc9d1150d922e7efda37dfcec642b Mon Sep 17 00:00:00 2001 From: nbro Date: Fri, 6 Nov 2026 08:42:49 +0100 Subject: [PATCH] Document Tktable packages for more systems, split Linux and macOS --- CHANGELOG.md | 2 ++ docs/installation/index.md | 24 +++++++++++--- .../installation/{linux-macos.md => linux.md} | 31 ++++++++++++------ docs/installation/macos.md | 32 +++++++++++++++++++ docs/installation/other-systems.md | 29 +++++++++++++++++ 5 files changed, 103 insertions(+), 15 deletions(-) rename docs/installation/{linux-macos.md => linux.md} (50%) create mode 100644 docs/installation/macos.md create mode 100644 docs/installation/other-systems.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c5cda3..cedd414 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and the project uses [Semantic Versioning](https://semver.org/). ### Added +- Installation docs for more Linux distributions (Kali Linux, Gentoo, Slackware), FreeBSD, OpenBSD, + NetBSD and conda, with separate pages for Linux and macOS. - Links to the GitHub repository on the docs' home page and in the footer of every page. - A History page in the docs: where Tcl/Tk, `tkinter` and Tktable come from. diff --git a/docs/installation/index.md b/docs/installation/index.md index 2411291..09fe0d2 100644 --- a/docs/installation/index.md +++ b/docs/installation/index.md @@ -26,9 +26,15 @@ as a file pattern. This also installs [pytktable-binaries](https://github.com/nb [Tktable](https://wiki.tcl-lang.org/page/Tktable), the Tcl/Tk extension that provides the table widget, compiled for Tcl/Tk 8.6 and 9.0 for: -- Linux: x86_64 and ARM (aarch64), with glibc (most distributions) or musl (e.g. Alpine); -- macOS 11 and later: Intel and Apple silicon; -- Windows: x64, x86 and ARM. +| OS | Architectures | +|---|---| +| Linux with glibc 2.28 or newer (most distributions, e.g. Debian 10+, Ubuntu 20.04+, RHEL 8+) | x86_64, ARM (aarch64) | +| Linux with musl (e.g. Alpine) | x86_64, ARM (aarch64) | +| macOS 11 and later | Intel, Apple silicon | +| Windows | x64, x86, ARM | + +See [pytktable-binaries](https://github.com/nbro/pytktable-binaries) for where +they are tested. pytktable finds it automatically, so you don't need to install Tktable or set `TKTABLE_LIBRARY`. You only need tkinter, which the python.org installers for Windows and macOS include. On Linux, @@ -68,8 +74,14 @@ Then install these, which `pip install pytktable` does not install: How to install them depends on your OS: -- [Linux and macOS](linux-macos.md) +- [Linux](linux.md) +- [macOS](macos.md) - [Windows](windows.md) +- [Other systems](other-systems.md): FreeBSD, OpenBSD, NetBSD and conda + +Tktable from different sources isn't always the same version, so it can behave slightly +differently: e.g. the default colors of the title rows of the prebuilt Tktable (2.12) and of +Magicsplat's (2.11) differ. ## Check the installation @@ -129,6 +141,8 @@ Tktable is found but fails to load ```{toctree} :hidden: -linux-macos +linux +macos windows +other-systems ``` diff --git a/docs/installation/linux-macos.md b/docs/installation/linux.md similarity index 50% rename from docs/installation/linux-macos.md rename to docs/installation/linux.md index f393221..3380aca 100644 --- a/docs/installation/linux-macos.md +++ b/docs/installation/linux.md @@ -1,25 +1,38 @@ -# Installation on Linux and macOS +# Installation on Linux These instructions are for installing Tktable yourself, with `pip install pytktable`. With `pip install "pytktable[binary]"`, you don't need them: see {ref}`prebuilt-tktable`. -## Install tkinter and Tktable +## Install## Install tkinter and Tktable -On Debian and Ubuntu: +On Debian and its derivatives, e.g. Ubuntu, Linux Mint and Kali Linux: ```sh sudo apt install python3-tk tk-table ``` -Fedora has no Tktable package in its current releases (e.g. Fedora 45). - -On macOS, with [MacPorts](https://www.macports.org/): +On Gentoo, with Python built with the `tk` USE flag: ```sh -sudo port install tktable +sudo emerge dev-tcltk/tktable ``` -## Check the installation +On other distributions, look for a package called `tktable` or `tk-table`. These are the ones we +know of: + +| Distribution | Package | Version | Notes | +|---|---|---|---| +| Debian, Ubuntu, Linux Mint | [`tk-table`](https://community.linuxmint.com/software/view/tk-table) | | | +| Kali Linux | [`tk-table`](https://pkg.kali.org/pkg/tk-table) | 2.10.8 | From Debian | +| Gentoo | [`dev-tcltk/tktable`](https://packages.gentoo.org/packages/dev-tcltk/tktable) | 2.12.1 | | +| Slackware | [`tktable`](https://slackbuilds.org/repository/15.0/development/tktable/) (SlackBuild) | 2.10.8 | Built from source | +| Fedora, RHEL, CentOS, Rocky Linux | none | | Use the prebuilt Tktable | + +`perl-Tk-TableMatrix` (Fedora, Arch Linux, Manjaro) is a different table widget, for Perl/Tk, not +Tktable. For distributions without a package, use the prebuilt Tktable +({ref}`prebuilt-tktable`), [conda](other-systems.md#conda), or build Tktable from source. + +he installation ```sh python -m tktable @@ -63,5 +76,3 @@ Run the example: ```sh docker run --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix tktable-test:ubuntu python -m examples.planets ``` - -On macOS this needs an X server such as [XQuartz](https://www.xquartz.org/), and is untested. diff --git a/docs/installation/macos.md b/docs/installation/macos.md new file mode 100644 index 0000000..b7c5f27 --- /dev/null +++ b/docs/installation/macos.md @@ -0,0 +1,32 @@ +# Installation on macOS + +These instructions are for installing Tktable yourself, with `pip install pytktable`. With +`pip install "pytktable[binary]"`, you don't need them: see {ref}`prebuilt-tktable`. + +## Install tkinter and Tktable + +The python.org installers for macOS include tkinter. With [MacPorts](https://www.macports.org/), +install [Tktable](https://ports.macports.org/port/tktable/) (version 2.11): + +```sh +sudo port install tktable +``` + +[conda](other-systems.md#conda) also has Tktable. + +If tkinter doesn't work with a Python built by pyenv or Homebrew, see +[Troubleshooting](index.md#troubleshooting). + +## Check the installation + +```sh +python -m tktable +``` + +## Tktable in a non-standard location + +Set {ref}`TKTABLE_LIBRARY `, e.g.: + +```sh +TKTABLE_LIBRARY=/opt/local/lib/Tktable2.11 python -m tktable +``` diff --git a/docs/installation/other-systems.md b/docs/installation/other-systems.md new file mode 100644 index 0000000..f341526 --- /dev/null +++ b/docs/installation/other-systems.md @@ -0,0 +1,29 @@ +# Installation on other systems + +These instructions are for installing Tktable yourself, with `pip install pytktable`, on systems +without prebuilt Tktable, or if you prefer your system's own. Install tkinter for your Python from +the same package manager. + +## FreeBSD, OpenBSD and NetBSD + +| System | Command | Version | +|---|---|---| +| [FreeBSD](https://www.freshports.org/x11-toolkits/tktable/) | `sudo pkg install tktable` | 2.10 | +| [OpenBSD](https://openports.pl/search?file=tktable) | `doas pkg_add Tktable` | 2.10 | +| [NetBSD](https://pkgsrc.se/x11/tktable) (pkgsrc) | `pkgin install tktable` | 2.10 | + +(conda)= +## conda + +On Linux, macOS and Windows, [conda-forge](https://github.com/conda-forge/tktable-feedstock) has +Tktable, for the Tcl/Tk of a conda environment: + +```sh +conda install -c conda-forge tktable +``` + +## Check the installation + +```sh +python -m tktable +```