Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
24 changes: 19 additions & 5 deletions docs/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -129,6 +141,8 @@ Tktable is found but fails to load
```{toctree}
:hidden:

linux-macos
linux
macos
windows
other-systems
```
31 changes: 21 additions & 10 deletions docs/installation/linux-macos.md → docs/installation/linux.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.
32 changes: 32 additions & 0 deletions docs/installation/macos.md
Original file line number Diff line number Diff line change
@@ -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 <tktable-library>`, e.g.:

```sh
TKTABLE_LIBRARY=/opt/local/lib/Tktable2.11 python -m tktable
```
29 changes: 29 additions & 0 deletions docs/installation/other-systems.md
Original file line number Diff line number Diff line change
@@ -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
```
Loading