Optimized Python package building
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -5,3 +5,6 @@ log.txt
|
||||
__pycache__/
|
||||
*.pyc
|
||||
.pytest_cache/
|
||||
dist/
|
||||
build/
|
||||
*.egg-info/
|
||||
|
||||
@@ -82,7 +82,6 @@ lim --type chroot
|
||||
|
||||
```
|
||||
main.py # entry point (the `lim` alias)
|
||||
distributions.yml # single point of truth for the image catalog
|
||||
lim/
|
||||
cli.py # argument parsing and command dispatch
|
||||
catalog.py # read-only access to distributions.yml
|
||||
@@ -92,14 +91,15 @@ lim/
|
||||
storage/ # single drive and RAID1 encryption setups
|
||||
image/ # image setup, backup, chroot, verification
|
||||
data/ # encfs lock/unlock and data import/export
|
||||
configuration/ # package collections used during image setup
|
||||
distributions.yml # single point of truth for the image catalog
|
||||
configuration/ # package collections used during image setup
|
||||
tests/unit/ # unit tests (all external commands mocked)
|
||||
tests/lint/ # architecture guards (e.g. max file length)
|
||||
```
|
||||
|
||||
## Configuration & Customization 🔧
|
||||
|
||||
Customize your environment in the `configuration/` folder:
|
||||
Customize your environment in the `lim/configuration/` folder:
|
||||
- **General Packages:** Contains common packages for all setup scripts.
|
||||
- **Server LUKS Packages:** Contains packages needed for setting up LUKS encryption on servers.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Read-only access to the image catalog (distributions.yml in the repo root)."""
|
||||
"""Read-only access to the image catalog (distributions.yml in the package)."""
|
||||
|
||||
from functools import cache
|
||||
|
||||
@@ -6,7 +6,7 @@ import yaml
|
||||
|
||||
from lim import config
|
||||
|
||||
CATALOG_PATH = config.REPOSITORY_PATH / "distributions.yml"
|
||||
CATALOG_PATH = config.CATALOG_PATH
|
||||
|
||||
|
||||
@cache
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
"""Repository paths shared by all modules."""
|
||||
"""Package and repository paths shared by all modules.
|
||||
|
||||
Configuration and the image catalog ship inside the package so that
|
||||
wheel installs work; the encfs data store stays repository-relative.
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
REPOSITORY_PATH = Path(__file__).resolve().parent.parent
|
||||
CONFIGURATION_PATH = REPOSITORY_PATH / "configuration"
|
||||
PACKAGE_ROOT = Path(__file__).resolve().parent
|
||||
CONFIGURATION_PATH = PACKAGE_ROOT / "configuration"
|
||||
PACKAGE_PATH = CONFIGURATION_PATH / "packages"
|
||||
CATALOG_PATH = PACKAGE_ROOT / "distributions.yml"
|
||||
|
||||
REPOSITORY_PATH = PACKAGE_ROOT.parent
|
||||
ENCRYPTED_PATH = REPOSITORY_PATH / ".encrypted"
|
||||
DECRYPTED_PATH = REPOSITORY_PATH / "decrypted"
|
||||
DATA_PATH = DECRYPTED_PATH / "data"
|
||||
|
||||
@@ -1,11 +1,35 @@
|
||||
[build-system]
|
||||
# 77+ for PEP 639 SPDX `license = "..."` + `license-files`.
|
||||
requires = ["setuptools>=77"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "linux-image-manager"
|
||||
version = "2.0.0"
|
||||
description = "Linux Image Manager — manages Linux images and encrypted storage"
|
||||
version = "1.0.0"
|
||||
description = "CLI (`lim`) for downloading, verifying and flashing Linux images, LUKS/Btrfs encrypted storage (single drive and RAID1), image backups and chroot maintenance"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
license = { file = "LICENSE.txt" }
|
||||
authors = [{ name = "Kevin Veen-Birkenbach", email = "kevin@veen.world" }]
|
||||
maintainers = [{ name = "Kevin Veen-Birkenbach", email = "kevin@veen.world" }]
|
||||
license = "GPL-3.0-only"
|
||||
license-files = ["LICENSE.txt"]
|
||||
urls = { Homepage = "https://veen.world", Repository = "https://github.com/kevinveenbirkenbach/linux-image-manager" }
|
||||
classifiers = [
|
||||
"Environment :: Console",
|
||||
"Operating System :: POSIX :: Linux",
|
||||
"Programming Language :: Python :: 3",
|
||||
]
|
||||
dependencies = ["PyYAML>=6"]
|
||||
|
||||
[project.scripts]
|
||||
lim = "lim.cli:main"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
include = ["lim*"]
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
lim = ["distributions.yml", "configuration/packages/**/*.txt"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user