Skip to main content

Typing stubs for PyGObject

Project description

Typing Stubs for PyGObject

PyPI

Installation

With uv:

uv add --dev pygobject-stubs

With pip:

pip install pygobject-stubs

Configuration

Some libraries exist in multiple versions like Gtk3/4. As both libraries are currently imported under the namespace Gtk only stubs for one can be installed.

You need to decide this at install time either by using the --config-settings option with pip:

pip install pygobject-stubs --no-cache-dir --config-settings=config=Gtk3,Gdk3,Soup2

or by setting the PYGOBJECT_STUB_CONFIG env variable:

PYGOBJECT_STUB_CONFIG=Gtk3,Gdk3,Soup2 pip install --no-cache-dir pygobject-stubs

If no configuration is set, the most recent version of each library is installed.

--no-cache-dir is only necessary on subsequent reinstalls, otherwise the stubs will not be rebuild and a cache of a previous installation is used.

uv

[tool.uv]
config-settings-package = { pygobject-stubs = { config = "Gtk3,Gdk3,Soup2" } }

poetry

https://python-poetry.org/docs/configuration/#installerbuild-config-settingspackage-name

Project Integration

Usually you want the stubs to be installed as part of the development dependencies. pyproject.toml does not allow to pass config-settings to requirements. If you need specific versions of some libraries you can use a requirements.txt file instead, which allows to pass config-settings per requirement as of pip >= 23.1.0.

pip install . -r dev.txt

Contributing

Guide

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

pygobject_stubs-2.16.0.tar.gz (934.8 kB view details)

Uploaded Source

File details

Details for the file pygobject_stubs-2.16.0.tar.gz.

File metadata

  • Download URL: pygobject_stubs-2.16.0.tar.gz
  • Upload date:
  • Size: 934.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pygobject_stubs-2.16.0.tar.gz
Algorithm Hash digest
SHA256 a97574616e92ef458605f9520d8d9db4c2a131affcd12fdd51db0b42395291e9
MD5 cf6316efa234db02fd84dc3f5babad08
BLAKE2b-256 2d1c317ccaaa6a3ddce270652781cf09d3b1d5d343b1a1dabca304fe5c218474

See more details on using hashes here.

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