macOS (Homebrew):
brew install pyenvLinux:
curl https://pyenv.run | bashAdd the following to your shell config (~/.zshrc or ~/.bashrc):
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"Reload your shell:
source ~/.zshrc # or source ~/.bashrcpyenv install 3.12.10pyenv shell 3.12.10
python -m venv .venv
source .venv/bin/activateConfirm the Python version:
python --version
# Python 3.12.10With the virtual environment active:
pip install --upgrade pip
pip install build twineBefore every release, update the version in two places so they stay in sync.
pyproject.toml:
[project]
name = "onefuse"
version = "2026.2.0" # <-- update thisonefuse/__init__.py:
__version__ = "2026.2.0" # <-- update this to matchThe version scheme used in this project is YYYY.MINOR.PATCH (e.g. 2026.1.0, 2026.1.1, 2026.2.0).
Note: PyPI does not allow re-uploading the same version. Always bump before building.
Use TestPyPI to verify the package before publishing to the real index.
- Register at https://test.pypi.org
- Go to Account Settings → API tokens
- Create a token scoped to Entire account
Add the following to ~/.pypirc to avoid being prompted each time:
[testpypi]
username = __token__
password = pypi-your-testpypi-token-hererm -rf dist/
python -m buildtwine check dist/*twine upload --repository testpypi dist/*When prompted:
- Username:
__token__ - Password: your TestPyPI API token
pip install --index-url https://test.pypi.org/simple/ onefuseVerify the installed version:
python -c "import onefuse; print(onefuse.__version__)"Only proceed here after successfully verifying the package on TestPyPI.
- Register at https://pypi.org
- Go to Account Settings → API tokens
- Create a token scoped to Entire account (or to the
onefuseproject once it exists)
Add the following to ~/.pypirc:
[pypi]
username = __token__
password = pypi-your-pypi-token-hererm -rf dist/
python -m buildtwine check dist/*twine upload dist/*When prompted:
- Username:
__token__ - Password: your PyPI API token
pip install onefuseVerify the installed version:
python -c "import onefuse; print(onefuse.__version__)"Note: PyPI does not allow re-uploading the same version. If a release needs to be corrected after uploading, return to Section 3 to bump the version before building and uploading again.