feat(packaging): make setup-hibernate a pip-installable Python package

- add pyproject.toml with setuptools build system
- add console script entry point `setup-hibernate`
- migrate main.py to src/setup_hibernate/__main__.py
- add MIRRORS file with Git and PyPI endpoints
- enable PEP 621 metadata and src layout

https://chatgpt.com/share/6964c8c0-8b94-800f-be8e-10c4fc8a2f30
This commit is contained in:
2026-01-12 11:11:03 +01:00
parent a01d63fc9e
commit 25d0a7a678
4 changed files with 38 additions and 0 deletions

4
MIRRORS Normal file
View File

@@ -0,0 +1,4 @@
git@github.com:kevinveenbirkenbach/setup-hibernate.git
ssh://git@git.veen.world:2201/kevinveenbirkenbach/setup-hibernate.git
ssh://git@code.infinito.nexus:2201/kevinveenbirkenbach/setup-hibernate.git
https://pypi.org/project/setup-hibernate/

34
pyproject.toml Normal file
View File

@@ -0,0 +1,34 @@
[build-system]
requires = ["setuptools>=69", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "setup-hibernate"
version = "0.1.0"
description = "Configure Linux hibernation (swapfile, GRUB resume, mkinitcpio resume hook)."
readme = "README.md"
requires-python = ">=3.8"
license = { file = "LICENSE" }
authors = [{ name = "Kevin Veen-Birkenbach" }]
keywords = ["hibernate", "hibernation", "swap", "grub", "mkinitcpio", "linux", "arch", "manjaro"]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Operating System :: POSIX :: Linux",
"Environment :: Console",
]
[project.urls]
Homepage = "https://www.veen.world"
Repository = "https://github.com/kevinveenbirkenbach/setup-hibernate"
Issues = "https://github.com/kevinveenbirkenbach/setup-hibernate/issues"
[project.scripts]
setup-hibernate = "setup_hibernate.__main__:main"
[tool.setuptools]
package-dir = { "" = "src" }
[tool.setuptools.packages.find]
where = ["src"]

View File