flake.nix: switch to generic python3 and remove side-effects from pkgmgr package root

- Replace hardcoded python311 references with generic python3 to avoid minor
  version pinning and ensure consistent interpreter selection across systems.
- Use python.pkgs instead of python311Packages in the build pipeline.
- Update devShell to use python3.withPackages, including pip and pyyaml.
- Add Python version echo in shellHook for improved debugging.
- Remove cli re-export from src/pkgmgr/__init__.py to eliminate heavy
  side-effects during import and prevent premature config loading in tests.
This commit is contained in:
Kevin Veen-Birkenbach
2025-12-11 10:30:19 +01:00
parent 5a8b1b11de
commit 0f74907f82
2 changed files with 9 additions and 17 deletions

View File

@@ -1,14 +0,0 @@
from __future__ import annotations
"""
Top-level package for Kevin's package manager (pkgmgr).
We re-export the CLI subpackage as the attribute ``cli`` so that
``pkgutil.resolve_name("pkgmgr.cli.commands.release")`` and similar
lookups work reliably under Python 3.13+.
"""
# Re-export the CLI subpackage as an attribute on the package.
from . import cli as cli # type: ignore[F401]
__all__ = ["cli"]