Files
pkgmgr/pyproject.toml

52 lines
1.1 KiB
TOML
Raw Normal View History

Use pyproject-based Nix flake build and fix install logic for pkgmgr - Add pyproject.toml to define package-manager as a Python application - Declare setuptools build backend (setuptools.build_meta) and wheel - Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main` - Define PyYAML as a base runtime dependency - Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication - Use format = "pyproject" and src = ./. (current git checkout) - Add setuptools and wheel to nativeBuildInputs for the backend - Add pyyaml to propagatedBuildInputs to match pyproject dependencies - Provide a devShell that includes the built pkgmgr, git, and Ansible - Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps - Fix Makefile install target for Nix shells - Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip) - In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and wire automatic activation into shell rc files - Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check - Adjust PKGBUILD prepare() to correctly copy the full project tree - Stop excluding the top-level src directory from rsync - Still exclude .git, .github, pkg, and srcpkg This unifies the installation workflow across Arch, Nix, and local venvs, and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests. Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07. https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
[build-system]
requires = [
"setuptools>=68",
"wheel"
]
build-backend = "setuptools.build_meta"
[project]
name = "package-manager"
2025-12-10 18:38:10 +01:00
version = "0.9.0"
Use pyproject-based Nix flake build and fix install logic for pkgmgr - Add pyproject.toml to define package-manager as a Python application - Declare setuptools build backend (setuptools.build_meta) and wheel - Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main` - Define PyYAML as a base runtime dependency - Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication - Use format = "pyproject" and src = ./. (current git checkout) - Add setuptools and wheel to nativeBuildInputs for the backend - Add pyyaml to propagatedBuildInputs to match pyproject dependencies - Provide a devShell that includes the built pkgmgr, git, and Ansible - Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps - Fix Makefile install target for Nix shells - Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip) - In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and wire automatic activation into shell rc files - Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check - Adjust PKGBUILD prepare() to correctly copy the full project tree - Stop excluding the top-level src directory from rsync - Still exclude .git, .github, pkg, and srcpkg This unifies the installation workflow across Arch, Nix, and local venvs, and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests. Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07. https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
description = "Kevin's package-manager tool (pkgmgr)"
readme = "README.md"
requires-python = ">=3.11"
license = { text = "MIT" }
authors = [
{ name = "Kevin Veen-Birkenbach", email = "info@veen.world" }
]
# Base runtime dependencies
dependencies = [
"PyYAML>=6.0"
]
[project.urls]
Homepage = "https://github.com/kevinveenbirkenbach/package-manager"
Source = "https://github.com/kevinveenbirkenbach/package-manager"
[project.optional-dependencies]
dev = [
"pytest",
"mypy"
]
# CLI entrypoint: this is the "pkgmgr" command
[project.scripts]
pkgmgr = "pkgmgr.cli:main"
# -----------------------------
# setuptools configuration
# -----------------------------
# We use find_packages(), not a fixed list,
# and explicitly include pkgmgr* and config*
Use pyproject-based Nix flake build and fix install logic for pkgmgr - Add pyproject.toml to define package-manager as a Python application - Declare setuptools build backend (setuptools.build_meta) and wheel - Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main` - Define PyYAML as a base runtime dependency - Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication - Use format = "pyproject" and src = ./. (current git checkout) - Add setuptools and wheel to nativeBuildInputs for the backend - Add pyyaml to propagatedBuildInputs to match pyproject dependencies - Provide a devShell that includes the built pkgmgr, git, and Ansible - Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps - Fix Makefile install target for Nix shells - Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip) - In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and wire automatic activation into shell rc files - Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check - Adjust PKGBUILD prepare() to correctly copy the full project tree - Stop excluding the top-level src directory from rsync - Still exclude .git, .github, pkg, and srcpkg This unifies the installation workflow across Arch, Nix, and local venvs, and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests. Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07. https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
[tool.setuptools.packages.find]
where = ["."]
include = ["pkgmgr*", "config*"]
# Ensure defaults.yaml is shipped inside wheels & nix builds
[tool.setuptools.package-data]
"config" = ["defaults.yaml"]