Skip to content

Latest commit

 

History

History
88 lines (64 loc) · 2.72 KB

File metadata and controls

88 lines (64 loc) · 2.72 KB

Publishing to PyPI

✅ Build Complete

The package has been built successfully:

  • nexus_client-0.1.0-py3-none-any.whl (68KB)
  • nexus_client-0.1.0.tar.gz (70KB)

Both packages passed twine check validation.

Publishing Steps

Option 1: Test on TestPyPI First (Recommended)

  1. Create a TestPyPI account (if you don't have one):

  2. Upload to TestPyPI:

    python3 -m twine upload --repository testpypi dist/*
  3. Test installation from TestPyPI:

    pip install --index-url https://test.pypi.org/simple/ nexus-client

Option 2: Publish to Production PyPI

  1. Create a PyPI account (if you don't have one):

  2. Create an API token:

  3. Publish to PyPI:

    python3 -m twine upload dist/*
    • Username: __token__
    • Password: Your PyPI API token (e.g., pypi-AgEIcHJ...)

    Or set environment variables:

    export TWINE_USERNAME=__token__
    export TWINE_PASSWORD=pypi-your-api-token-here
    python3 -m twine upload dist/*
  4. Verify publication:

Quick Publish Script

You can also use the provided script:

./publish_to_pypi.sh

Important Notes

  1. Version Number: Current version is 0.1.0. To publish updates:

    • Update version = "0.1.0" in pyproject.toml
    • Rebuild: python3 -m build
    • Republish: python3 -m twine upload dist/*
  2. Package Name: The package name is nexus-client (with hyphen), but imports use nexus_client (with underscore).

  3. License: Fixed to use SPDX format (license = "Apache-2.0" instead of table format).

  4. After Publishing:

    • Package will be available at: https://pypi.org/project/nexus-client/
    • Installation: pip install nexus-client or pip install nexus-client[langgraph]
    • It may take a few minutes for the package to be indexed and searchable

Troubleshooting

  • "Package already exists": Version 0.1.0 is already published. Increment version in pyproject.toml.
  • Authentication errors: Make sure you're using __token__ as username and the full token (including pypi- prefix) as password.
  • Upload errors: Check your internet connection and PyPI status.