Skip to main content

Personal collection of mostly QT related stuff

Project description

Publishing a New Release

Prerequisites

  • Maintain project metadata in pyproject.toml.
  • Keep the project in a dedicated virtual environment (.venv).
  • Runtime dependencies are declared in pyproject.toml under dependencies, not by freezing the virtual environment.
  • The GitHub repository is connected to the existing PyPI project via Trusted Publishing.

Local Build

Build the package locally before creating a release:

python -m build

This creates:

dist/
    package_name-x.y.z.tar.gz
    package_name-x.y.z-py3-none-any.whl

Optionally verify the package:

python -m twine check dist/*

Releasing

  1. Update the version in pyproject.toml.

    Example:

    version = "1.2.3"
    
  2. Commit and push the changes.

    git add .
    git commit -m "Release 1.2.3"
    git push
    
  3. Create a matching Git tag.

    git tag v1.2.3
    git push origin v1.2.3
    
  4. GitHub Actions builds the package and publishes it to PyPI.


Important Caveats

Always increase the version

PyPI does not allow uploading a package with the same version twice.

Every release must have a unique version number.


If the GitHub Action fails because the version was wrong

Simply pressing Re-run jobs is not sufficient if the commit itself is incorrect.

Instead:

  1. Fix pyproject.toml.

  2. Commit and push the fix.

  3. Delete the old tag locally.

    git tag -d v1.2.3
    
  4. Delete the tag on GitHub.

    git push origin :refs/tags/v1.2.3
    
  5. Create the tag again on the corrected commit.

    git tag v1.2.3
    git push origin v1.2.3
    

This triggers the workflow again using the corrected source.


Common Build Issues

Missing README

If pyproject.toml contains

readme = "README.md"

then README.md must exist.


License configuration

Use the modern license expression, for example:

license = "MIT"

Do not also include the old license classifier:

"License :: OSI Approved :: MIT License"

Modern versions of setuptools reject this combination.


Useful Commands

Build:

python -m build

Check package:

python -m twine check dist/*

Delete local release tag:

git tag -d vX.Y.Z

Delete remote release tag:

git push origin :refs/tags/vX.Y.Z

Create and push release tag:

git tag vX.Y.Z
git push origin vX.Y.Z

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

michis_python_sammlung-0.8.1.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

michis_python_sammlung-0.8.1-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file michis_python_sammlung-0.8.1.tar.gz.

File metadata

  • Download URL: michis_python_sammlung-0.8.1.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for michis_python_sammlung-0.8.1.tar.gz
Algorithm Hash digest
SHA256 59ee60f922546ca953db2846d0b02d1522e659ed33762a0abc7256aafc08f19e
MD5 6a3f687bab0ab800a23bc1d9a54f06c1
BLAKE2b-256 dd1429ffd4da4b2ecd398c4cca2e72c513d023f06942bc147e07bdb733d3868c

See more details on using hashes here.

Provenance

The following attestation bundles were made for michis_python_sammlung-0.8.1.tar.gz:

Publisher: publish.yaml on mischkomichael/Michis_python_sammlung

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file michis_python_sammlung-0.8.1-py3-none-any.whl.

File metadata

File hashes

Hashes for michis_python_sammlung-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 55ab106a898c6d5623c77b37b5d77741b7a127184a5f41f053b04dc651775889
MD5 3ee361202670bddd3a295d5f1dd56d04
BLAKE2b-256 5a43639f45fe9907669e3a8aa4794f9693701b784aec491ae03d4e68c7a12c50

See more details on using hashes here.

Provenance

The following attestation bundles were made for michis_python_sammlung-0.8.1-py3-none-any.whl:

Publisher: publish.yaml on mischkomichael/Michis_python_sammlung

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page