Description
envstack currently uses a legacy setup.py-based packaging configuration.
To improve standards compliance, tooling compatibility, and discoverability, we should migrate packaging metadata to pyproject.toml (PEP 517 / PEP 621).
This migration should be packaging-only and must not change runtime behavior.
Current setup.py for reference:
- name: envstack
- version: 0.9.x
- package root:
lib/
- console scripts:
envstack=envstack.cli:main
whichenv=envstack.cli:whichenv
- dependencies:
- PyYAML>=5.1.2
- cryptography>=43.0.1
- Python requirement: >=3.6
Scope
1. Add pyproject.toml
- Define build system (
setuptools + wheel)
- Migrate all metadata currently defined in
setup.py:
- name
- version
- description
- license
- authors
- classifiers
- Python version requirement
- dependencies
- console scripts
- Use
README.md as the long description
2. Preserve existing package layout
- Continue using
lib/ as the package root
- Ensure
find_packages() equivalent behavior is preserved
3. Verify packaging behavior
pip install .
pip install -e .
python -m build (sdist + wheel)
- Console entrypoints work:
4. Handle setup.py
- Either:
- Remove
setup.py entirely, or
- Keep a minimal compatibility shim if required
- Decision should favor simplicity and standards compliance
Acceptance Criteria
pyproject.toml fully replaces setup.py for packaging metadata
- No change in runtime behavior or CLI interface
- Editable installs work as before
- Wheel and sdist build successfully
- PyPI metadata renders correctly (README, classifiers, URLs)
Notes
- This change is intended to improve modern tooling support and discoverability
- Keep the migration strictly scoped to packaging
- Do not refactor code, imports, or CLI logic as part of this issue
Description
envstack currently uses a legacy
setup.py-based packaging configuration.To improve standards compliance, tooling compatibility, and discoverability, we should migrate packaging metadata to
pyproject.toml(PEP 517 / PEP 621).This migration should be packaging-only and must not change runtime behavior.
Current
setup.pyfor reference:lib/envstack=envstack.cli:mainwhichenv=envstack.cli:whichenvScope
1. Add
pyproject.tomlsetuptools+wheel)setup.py:README.mdas the long description2. Preserve existing package layout
lib/as the package rootfind_packages()equivalent behavior is preserved3. Verify packaging behavior
pip install .pip install -e .python -m build(sdist + wheel)envstack --helpwhichenv4. Handle
setup.pysetup.pyentirely, orAcceptance Criteria
pyproject.tomlfully replacessetup.pyfor packaging metadataNotes