Skip to main content

kmpkg

A Python reimplementation of the vcpkg package manager, with built-in C++ project scaffolding via kmcmake templates.

Installation

pip install kmpkg

Requires Python >= 3.8 and cmake on PATH.

Quick Start

# Create a C++ project from kmcmake template
kmpkg new --project --name myapp -o ./myapp

# Install a port
kmpkg install fmt

# Search available ports
kmpkg search fmt

# List installed ports
kmpkg list

Configuration

kmpkg reads kmpkg-configuration.json from the current directory or kmpkg root:

{
  "default-registry": {
    "kind": "git",
    "baseline": "d5c94a00e9d3d27a88399368d789971bc7e4fca8",
    "repository": "https://github.com/kumose/kmpkgcore.git"
  }
}

The root directory defaults to $KMPKG_ROOT or /home/jeff/kmpkgcore.

Commands

Project Creation

Command Description
kmpkg new --project --name X -o path Create C++ project from kmcmake template
kmpkg new --name X --version Y Create a new kmpkg.json manifest
kmpkg add fmt Add dependency to manifest

Package Management

Command Description
kmpkg install fmt Build and install a port
kmpkg install Install all dependencies from kmpkg.json
kmpkg remove fmt Uninstall a port
kmpkg update List upgradable packages
kmpkg upgrade Rebuild outdated packages

Build

Command Description
kmpkg build fmt Build a single port
kmpkg build fmt --overrides fmt=10.0.0 Build with version overrides
kmpkg ci --all CI build all ports
kmpkg test-features fmt Test all feature combinations
kmpkg check-support fmt Check if port is supported

Information

Command Description
kmpkg list List all available ports
kmpkg search fmt Search ports by pattern
kmpkg find fmt Alias for search
kmpkg package-info fmt Show port details
kmpkg depend-info fmt Show dependency tree
kmpkg owns file.h Find which package owns a file
kmpkg license-report Show licenses of installed packages

Registry Management

Command Description
kmpkg clone -i <src> -o <dst> -p fmt Clone ports with recursive deps
kmpkg publish fmt Publish port changes
kmpkg update-registry Fetch latest from git registry
kmpkg regenerate Regenerate version DB from ports/
kmpkg x-add-version fmt Update version database
kmpkg x-update-baseline --add fmt=1.0 Add baseline entry
kmpkg gitlog Show registry git log
kmpkg gitlog -p fmt Show port change history

Integration

Command Description
kmpkg integrate install Set up CMake integration
kmpkg integrate remove Remove CMake integration
kmpkg autocomplete bash Install shell completion
kmpkg autocomplete bash --remove Remove shell completion
kmpkg env --bin Create build environment

Export & Config

Command Description
kmpkg export fmt Export installed packages
kmpkg config show Show configuration
kmpkg config default-triplet x64-linux Set default triplet
kmpkg version Show version

Architecture

kmpkg/
  cli/              -- Click-based CLI (54 commands)
  core/             -- Core modules
    builder.py      -- PortBuilder (cmake -P portfile.cmake)
    dependency_resolver.py  -- Transitive dependency resolution
    statusdb.py     -- Installed package tracking
    binary_cache.py -- ABI-hash based binary cache
    download_manager.py     -- Download with SHA512 verification
    kmpkgpaths.py   -- Path discovery + registry configuration
  registry/
    builtin.py      -- Local files registry
    git.py          -- Git registry (remote clone/fetch)
    registry_set.py -- Registry routing
    port_provider.py -- Port file provider
  tests/            -- 74 pytest tests

Development

git clone https://github.com/kumose/kmpkg
cd kmpkg
pip install -e .
pytest

License

Apache 2.0

Metadata

Release files for kmpkg 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kmpkg 0.4.1
File Size Uploaded Provenance Actions
kmpkg-0.4.1.tar.gz 56.8 kB Without provenance Details for kmpkg-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kmpkg 0.4.1
File Interpreter ABI Platform Actions
kmpkg-0.4.1-py3-none-any.whl Python 3 none any Details for kmpkg-0.4.1-py3-none-any.whl

Total release size: 154.9 kB

Release files / kmpkg-0.4.1.tar.gz

Download URL kmpkg-0.4.1.tar.gz
Size 56.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bf8e0365342977ab6282cfb2e1a24545c30ca002ce35f10e97372136bbc6c9eb
BLAKE2b-256 checksum
How to use checksums
d7e018d6999d004bfe8a15a808a8bafdb0b2d390fe85102f4341d4a46c5d3f37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / kmpkg-0.4.1-py3-none-any.whl

Download URL kmpkg-0.4.1-py3-none-any.whl
Size 98.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3204593ef9fe0aa77deaf3450d762f9375a2bd17e3bd5e9e0003ba934155c2b9
BLAKE2b-256 checksum
How to use checksums
1e175d1e505c16aaa43b68e5097dc4354134184cbf8b1165897739a8927062e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Security for kmpkg 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page