Fairly recently, it's become possible to write Python packages without a setup.py
! This is an example of how to do that.
From: https://setuptools.pypa.io/en/latest/userguide/quickstart.html
Create venv and run tests
cd example-python-cli # this README's directory
./run.sh test # setup venv and run tests
Activate the venv and run the CLI
source venv/bin/activate
# run entrypoint script to confirm it all works
example-python-cli
This package can also be installed globally without polluting the global python package installation with pipx
pipx install -e .
This can be necessary when I screw up scripts/run.sh
.
- Find location of a package:
python3 -m pip show black
- rm the parent folder:
rm -rf /usr/local/lib/python3.10/site-packages
- Reinstall Python:
brew reinstall python3
- Try out ruff - blocked on astral-sh/ruff#282
- Figure out how to get requirements files working and update dependencies?
- CI/CD?
- Get https://github.com/octodns/octodns-ns1/tree/main/script functionality
- test coverage
- I'd like to read TOML using the new stdlib tomlreader lib, but that's only in Python 3.11 and brew hasn't made that default yet - see Homebrew/homebrew-core#114154