From 654b96e4386c726ac47559365d285bb1c9f7eea2 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Thu, 1 Jan 2026 20:18:52 +0100 Subject: [PATCH 1/4] Introduce simple pyproject.toml packaging --- .gitignore | 2 ++ pyproject.toml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .gitignore create mode 100644 pyproject.toml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..18390bf --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/dist/ +/pydf.egg-info/ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..c2fb969 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = "pydf" +description = "df(1) clone with colour output" +version = "15" +readme = { file = "README", content-type = "text/plain" } +license = "CC-PDDC" +license-files = ["COPYING"] +authors = [ + { name = "Radovan GarabĂ­k", email = "garabik@kassiopeia.juls.savba.sk" }, +] +requires-python = ">=3.10" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: End Users/Desktop", + "Intended Audience :: System Administrators", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3 :: Only", + "Topic :: System", + "Topic :: System :: Filesystems", + "Topic :: System :: Systems Administration", + "Topic :: Utilities", +] +keywords = ["df", "disk space", "colours", "filesystems"] + +[project.urls] +"Homepage" = "https://github.com/garabik/pydf" +"Git Repository" = "https://github.com/garabik/pydf" +"Issue Tracker" = "https://github.com/garabik/pydf/issues" + +[tool.setuptools.data-files] +"bin" = ["pydf"] +"etc" = ["pydfrc"] # best effort +"share/man/man1" = ["pydf.1"] + +[tool.setuptools.packages.find] +include = [] + +[build-system] +requires = ["setuptools>=77"] +build-backend = "setuptools.build_meta" From 79750ba47c9ed843efb21080408bcd83e88ab7fc Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Thu, 1 Jan 2026 20:28:19 +0100 Subject: [PATCH 2/4] smoke-tests.yml: Build and install Python package --- .github/workflows/smoke-tests.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index f9f11ed..e067c2d 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -33,6 +33,26 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Install runtime dependencies + run: | + pip3 install --user \ + build \ + twine + + - name: Build Python package + run: | + set -x + python3 -m build + tar tvf dist/pydf-*.tar.gz + unzip -l dist/pydf-*-py3-none-any.whl + twine check --strict dist/pydf-* + + - name: Install Python package + run: | + set -x + pip3 install --user . + echo ~/.local/bin | tee "${GITHUB_PATH}" + - name: Run smoke tests run: | export PS4=$'\n# ' From 6676ac6143295e0c10be8cfb2376061ca9a40ad9 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Thu, 1 Jan 2026 20:28:38 +0100 Subject: [PATCH 3/4] smoke-tests.yml: Start using installed pydf for smoke testing --- .github/workflows/smoke-tests.yml | 34 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index e067c2d..5f7db8e 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -57,20 +57,20 @@ jobs: run: | export PS4=$'\n# ' set -x - ./pydf - ./pydf --help - ./pydf --version - ./pydf --all - ./pydf --human-readable - ./pydf --si - ./pydf --block-size=1 - ./pydf --local - ./pydf --kilobytes - ./pydf --megabytes - ./pydf --gigabytes - ./pydf --blocks - ./pydf --bw - ./pydf --scale-bars - ./pydf --mounts=/etc/mtab - ./pydf --show-binds - ./pydf --inodes + pydf + pydf --help + pydf --version + pydf --all + pydf --human-readable + pydf --si + pydf --block-size=1 + pydf --local + pydf --kilobytes + pydf --megabytes + pydf --gigabytes + pydf --blocks + pydf --bw + pydf --scale-bars + pydf --mounts=/etc/mtab + pydf --show-binds + pydf --inodes From f441f6797e908ad1c411114a7654ca236208e1cb Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Thu, 1 Jan 2026 20:37:08 +0100 Subject: [PATCH 4/4] Add two "keep in sync" markers --- pydf | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pydf b/pydf index 549f993..a4c7aeb 100755 --- a/pydf +++ b/pydf @@ -302,7 +302,7 @@ def makecolour(clist): return s def version(): - return '15' + return '15' # keep in sync with file "pyproject.toml" def get_all_mountpoints(): "return all mountpoints in fs" diff --git a/pyproject.toml b/pyproject.toml index c2fb969..d2ba2e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "pydf" description = "df(1) clone with colour output" -version = "15" +version = "15" # keep in sync with function "version" in file "pydf" readme = { file = "README", content-type = "text/plain" } license = "CC-PDDC" license-files = ["COPYING"]