Registry / devops / colcon-package-information

colcon-package-information

JSON →
library0.4.1pypypi✓ verified 86d ago

colcon-package-information is an extension for the `colcon` build tool, providing the `info` verb. It allows users to inspect and display various details about packages within a `colcon` workspace, such as their source, version, and dependencies. The current version is 0.4.1, and it follows the stable release cadence of the `colcon` ecosystem, with updates typically coinciding with major `colcon-core` releases or bug fixes.

pip install colcon-package-information
INSTALL
IMPORT
SIG · COLCON-PACKAGE-INF
C
colcon-package-information
devopspythonv0.4.1
Install
5.1s avg
Import
132ms
Disk
40MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.4.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.133s · 37.5MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 5.1s · import 0.130s · 38MB
40MB installed
● package 40MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

InfoVerb
from colcon_package_information.verb.info import InfoVerb
This library is primarily a `colcon` command-line extension; direct programmatic import of its internal components like `InfoVerb` is typically not done by end-users. Its functionality is accessed via the `colcon info` command.

This quickstart demonstrates how to install and use `colcon-package-information` via the `colcon` command-line interface. It creates a temporary `colcon` workspace with a dummy package, then executes `colcon info` to display the package's metadata. This highlights the primary interaction model, which is through the `colcon` CLI, not direct Python imports.

import os import shutil # Ensure colcon-core and colcon-package-information are installed os.system("pip install colcon-core colcon-package-information") workspace_path = "my_colcon_workspace" package_path = os.path.join(workspace_path, "src", "my_package") # Create a dummy colcon workspace and a simple package os.makedirs(package_path, exist_ok=True) package_xml_content = """ <package format='3'> <name>my_package</name> <version>0.1.0</version> <description>A dummy package for colcon info demonstration.</description> <maintainer email='dev@example.com'>Developer</maintainer> <license>Apache-2.0</license> </package> """ with open(os.path.join(package_path, "package.xml"), "w") as f: f.write(package_xml_content) print(f"\nCreated dummy workspace at: {workspace_path}") print(f"Created dummy package 'my_package' at: {package_path}") # Navigate into the workspace for colcon to find it original_cwd = os.getcwd() os.chdir(workspace_path) # Run the colcon info command print("\n--- Running colcon info for 'my_package' ---") os.system("colcon info --packages-select my_package") print("\n--- Running colcon info for all packages (if more existed) ---") os.system("colcon info") # Clean up os.chdir(original_cwd) shutil.rmtree(workspace_path) print(f"\nCleaned up dummy workspace: {workspace_path}")
colcon --version
Debug
Known issues
gotchaThis package is a `colcon` extension and provides a new `colcon` verb (`info`). Its functionality is primarily accessed via the `colcon` command-line interface (e.g., `colcon info`), not by importing Python modules and calling functions directly within Python scripts for end-user tasks.
fix
Always invoke `colcon-package-information` via the `colcon` executable on the command line. For programmatic access to its *output*, consider using Python's `subprocess` module to run `colcon info` and parse its stdout.
affects: all
gotcha`colcon-package-information` requires `colcon-core` to be installed and available in the environment for the `colcon info` verb to be discovered and function correctly. Installing `colcon-package-information` alone without `colcon-core` will not expose the `info` verb.
fix
Ensure `colcon-core` is installed via `pip install colcon-core` alongside `colcon-package-information`.
affects: all
Errors
Common errors & fixes
colcon: error: argument {build,test,install,package,help}: invalid choice: 'info' (choose from 'build', 'test', 'install', 'package', 'help')
The `colcon info` verb is not recognized by `colcon`. This typically happens if `colcon-package-information` is not installed, or if `colcon-core` (its primary dependency) is missing or not discoverable by your Python environment.
fix
Ensure both `colcon-core` and `colcon-package-information` are installed in the active Python environment: `pip install colcon-core colcon-package-information`. Verify `colcon` is in your system's `PATH`.
ModuleNotFoundError: No module named 'colcon_package_information'
Attempting to import `colcon_package_information` directly as a regular Python library for end-user functionality. While the package *can* be imported, its primary purpose is as a `colcon` command-line extension, not a library for direct function calls.
fix
Instead of importing and calling functions, use the `colcon` command-line tool. For example, run `colcon info` in your terminal. If you need to interact with its output from Python, use `subprocess.run(['colcon', 'info'], capture_output=True)` and parse the result.
Upgrade
Version history
0.4.1latest on PyPI · released Mar 27, 2026
Audit
Dependencies
colcon-corerequiredRequired for `colcon-package-information` to register and provide its 'info' verb within the `colcon` CLI framework.
Agent activity
5 hits · last 30 days
node
4
Resources
colcon-package-information — pip install colcon-package-information · libregistry