kmpkg 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kmpkg-0.1.0/PKG-INFO +176 -0
- kmpkg-0.1.0/README.md +150 -0
- kmpkg-0.1.0/kmpkg/__init__.py +16 -0
- kmpkg-0.1.0/kmpkg/__main__.py +20 -0
- kmpkg-0.1.0/kmpkg/cli/__init__.py +16 -0
- kmpkg-0.1.0/kmpkg/cli/commands/__init__.py +152 -0
- kmpkg-0.1.0/kmpkg/cli/commands/basic.py +56 -0
- kmpkg-0.1.0/kmpkg/cli/commands/build.py +128 -0
- kmpkg-0.1.0/kmpkg/cli/commands/config.py +116 -0
- kmpkg-0.1.0/kmpkg/cli/commands/export.py +97 -0
- kmpkg-0.1.0/kmpkg/cli/commands/gitlog.py +88 -0
- kmpkg-0.1.0/kmpkg/cli/commands/help_cmd.py +45 -0
- kmpkg-0.1.0/kmpkg/cli/commands/info.py +222 -0
- kmpkg-0.1.0/kmpkg/cli/commands/install.py +368 -0
- kmpkg-0.1.0/kmpkg/cli/commands/integrate.py +288 -0
- kmpkg-0.1.0/kmpkg/cli/commands/manifest.py +307 -0
- kmpkg-0.1.0/kmpkg/cli/commands/misc.py +160 -0
- kmpkg-0.1.0/kmpkg/cli/commands/registry.py +252 -0
- kmpkg-0.1.0/kmpkg/cli/commands/repo.py +404 -0
- kmpkg-0.1.0/kmpkg/cli/commands/version.py +34 -0
- kmpkg-0.1.0/kmpkg/cli/main.py +33 -0
- kmpkg-0.1.0/kmpkg/core/__init__.py +16 -0
- kmpkg-0.1.0/kmpkg/core/archives.py +87 -0
- kmpkg-0.1.0/kmpkg/core/binary_cache.py +224 -0
- kmpkg-0.1.0/kmpkg/core/binary_paragraph.py +150 -0
- kmpkg-0.1.0/kmpkg/core/builder.py +304 -0
- kmpkg-0.1.0/kmpkg/core/configuration.py +118 -0
- kmpkg-0.1.0/kmpkg/core/dependencies.py +141 -0
- kmpkg-0.1.0/kmpkg/core/dependency_resolver.py +223 -0
- kmpkg-0.1.0/kmpkg/core/downloads.py +255 -0
- kmpkg-0.1.0/kmpkg/core/kmpkgpaths.py +153 -0
- kmpkg-0.1.0/kmpkg/core/manifest.py +54 -0
- kmpkg-0.1.0/kmpkg/core/packagespec.py +108 -0
- kmpkg-0.1.0/kmpkg/core/platform_expression.py +184 -0
- kmpkg-0.1.0/kmpkg/core/source_paragraph.py +227 -0
- kmpkg-0.1.0/kmpkg/core/status_paragraph.py +115 -0
- kmpkg-0.1.0/kmpkg/core/statusdb.py +130 -0
- kmpkg-0.1.0/kmpkg/core/triplet.py +75 -0
- kmpkg-0.1.0/kmpkg/core/versions.py +157 -0
- kmpkg-0.1.0/kmpkg/registry/__init__.py +16 -0
- kmpkg-0.1.0/kmpkg/registry/base.py +72 -0
- kmpkg-0.1.0/kmpkg/registry/builtin.py +85 -0
- kmpkg-0.1.0/kmpkg/registry/filesystem.py +155 -0
- kmpkg-0.1.0/kmpkg/registry/git.py +158 -0
- kmpkg-0.1.0/kmpkg/registry/port_provider.py +117 -0
- kmpkg-0.1.0/kmpkg/registry/registry_set.py +96 -0
- kmpkg-0.1.0/kmpkg/tests/__init__.py +16 -0
- kmpkg-0.1.0/kmpkg/tests/test_archives.py +125 -0
- kmpkg-0.1.0/kmpkg/tests/test_binary_cache.py +210 -0
- kmpkg-0.1.0/kmpkg/tests/test_core.py +149 -0
- kmpkg-0.1.0/kmpkg/tests/test_dependency_resolver.py +143 -0
- kmpkg-0.1.0/kmpkg/tests/test_downloads.py +82 -0
- kmpkg-0.1.0/kmpkg/tests/test_real_format.py +90 -0
- kmpkg-0.1.0/kmpkg/tests/test_registry.py +90 -0
- kmpkg-0.1.0/kmpkg/tests/test_registry_ops.py +95 -0
- kmpkg-0.1.0/kmpkg/tests/test_statusdb.py +90 -0
- kmpkg-0.1.0/kmpkg/tests/test_version.py +27 -0
- kmpkg-0.1.0/kmpkg/util/__init__.py +16 -0
- kmpkg-0.1.0/kmpkg.egg-info/PKG-INFO +176 -0
- kmpkg-0.1.0/kmpkg.egg-info/SOURCES.txt +64 -0
- kmpkg-0.1.0/kmpkg.egg-info/dependency_links.txt +1 -0
- kmpkg-0.1.0/kmpkg.egg-info/entry_points.txt +2 -0
- kmpkg-0.1.0/kmpkg.egg-info/requires.txt +2 -0
- kmpkg-0.1.0/kmpkg.egg-info/top_level.txt +1 -0
- kmpkg-0.1.0/pyproject.toml +61 -0
- kmpkg-0.1.0/setup.cfg +4 -0
kmpkg-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kmpkg
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: vcpkg-compatible package manager with C++ project scaffolding
|
|
5
|
+
Author-email: "Kumo Inc." <dev@kumose.cc>
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/kumose/kmpkg
|
|
8
|
+
Project-URL: Repository, https://github.com/kumose/kmpkg.git
|
|
9
|
+
Project-URL: Documentation, https://github.com/kumose/kmpkg
|
|
10
|
+
Keywords: vcpkg,package-manager,c++,cmake,kmpkg
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
22
|
+
Requires-Python: >=3.8
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
Requires-Dist: click>=8.0
|
|
25
|
+
Requires-Dist: rich>=12.0
|
|
26
|
+
|
|
27
|
+
# kmpkg
|
|
28
|
+
|
|
29
|
+
A Python reimplementation of the vcpkg package manager, with built-in C++ project scaffolding via kmcmake templates.
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install kmpkg
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Requires Python >= 3.8 and `cmake` on PATH.
|
|
38
|
+
|
|
39
|
+
## Quick Start
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Create a C++ project from kmcmake template
|
|
43
|
+
kmpkg new --project --name myapp -o ./myapp
|
|
44
|
+
|
|
45
|
+
# Install a port
|
|
46
|
+
kmpkg install fmt
|
|
47
|
+
|
|
48
|
+
# Search available ports
|
|
49
|
+
kmpkg search fmt
|
|
50
|
+
|
|
51
|
+
# List installed ports
|
|
52
|
+
kmpkg list
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Configuration
|
|
56
|
+
|
|
57
|
+
kmpkg reads `kmpkg-configuration.json` from the current directory or kmpkg root:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"default-registry": {
|
|
62
|
+
"kind": "git",
|
|
63
|
+
"baseline": "d5c94a00e9d3d27a88399368d789971bc7e4fca8",
|
|
64
|
+
"repository": "https://github.com/kumose/kmpkgcore.git"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The root directory defaults to `$KMPKG_ROOT` or `/home/jeff/kmpkgcore`.
|
|
70
|
+
|
|
71
|
+
## Commands
|
|
72
|
+
|
|
73
|
+
### Project Creation
|
|
74
|
+
|
|
75
|
+
| Command | Description |
|
|
76
|
+
|---------|-------------|
|
|
77
|
+
| `kmpkg new --project --name X -o path` | Create C++ project from kmcmake template |
|
|
78
|
+
| `kmpkg new --name X --version Y` | Create a new `kmpkg.json` manifest |
|
|
79
|
+
| `kmpkg add fmt` | Add dependency to manifest |
|
|
80
|
+
|
|
81
|
+
### Package Management
|
|
82
|
+
|
|
83
|
+
| Command | Description |
|
|
84
|
+
|---------|-------------|
|
|
85
|
+
| `kmpkg install fmt` | Build and install a port |
|
|
86
|
+
| `kmpkg install` | Install all dependencies from `kmpkg.json` |
|
|
87
|
+
| `kmpkg remove fmt` | Uninstall a port |
|
|
88
|
+
| `kmpkg update` | List upgradable packages |
|
|
89
|
+
| `kmpkg upgrade` | Rebuild outdated packages |
|
|
90
|
+
|
|
91
|
+
### Build
|
|
92
|
+
|
|
93
|
+
| Command | Description |
|
|
94
|
+
|---------|-------------|
|
|
95
|
+
| `kmpkg build fmt` | Build a single port |
|
|
96
|
+
| `kmpkg build fmt --overrides fmt=10.0.0` | Build with version overrides |
|
|
97
|
+
| `kmpkg ci --all` | CI build all ports |
|
|
98
|
+
| `kmpkg test-features fmt` | Test all feature combinations |
|
|
99
|
+
| `kmpkg check-support fmt` | Check if port is supported |
|
|
100
|
+
|
|
101
|
+
### Information
|
|
102
|
+
|
|
103
|
+
| Command | Description |
|
|
104
|
+
|---------|-------------|
|
|
105
|
+
| `kmpkg list` | List all available ports |
|
|
106
|
+
| `kmpkg search fmt` | Search ports by pattern |
|
|
107
|
+
| `kmpkg find fmt` | Alias for search |
|
|
108
|
+
| `kmpkg package-info fmt` | Show port details |
|
|
109
|
+
| `kmpkg depend-info fmt` | Show dependency tree |
|
|
110
|
+
| `kmpkg owns file.h` | Find which package owns a file |
|
|
111
|
+
| `kmpkg license-report` | Show licenses of installed packages |
|
|
112
|
+
|
|
113
|
+
### Registry Management
|
|
114
|
+
|
|
115
|
+
| Command | Description |
|
|
116
|
+
|---------|-------------|
|
|
117
|
+
| `kmpkg clone -i <src> -o <dst> -p fmt` | Clone ports with recursive deps |
|
|
118
|
+
| `kmpkg publish fmt` | Publish port changes |
|
|
119
|
+
| `kmpkg update-registry` | Fetch latest from git registry |
|
|
120
|
+
| `kmpkg regenerate` | Regenerate version DB from ports/ |
|
|
121
|
+
| `kmpkg x-add-version fmt` | Update version database |
|
|
122
|
+
| `kmpkg x-update-baseline --add fmt=1.0` | Add baseline entry |
|
|
123
|
+
| `kmpkg gitlog` | Show registry git log |
|
|
124
|
+
| `kmpkg gitlog -p fmt` | Show port change history |
|
|
125
|
+
|
|
126
|
+
### Integration
|
|
127
|
+
|
|
128
|
+
| Command | Description |
|
|
129
|
+
|---------|-------------|
|
|
130
|
+
| `kmpkg integrate install` | Set up CMake integration |
|
|
131
|
+
| `kmpkg integrate remove` | Remove CMake integration |
|
|
132
|
+
| `kmpkg autocomplete bash` | Install shell completion |
|
|
133
|
+
| `kmpkg autocomplete bash --remove` | Remove shell completion |
|
|
134
|
+
| `kmpkg env --bin` | Create build environment |
|
|
135
|
+
|
|
136
|
+
### Export & Config
|
|
137
|
+
|
|
138
|
+
| Command | Description |
|
|
139
|
+
|---------|-------------|
|
|
140
|
+
| `kmpkg export fmt` | Export installed packages |
|
|
141
|
+
| `kmpkg config show` | Show configuration |
|
|
142
|
+
| `kmpkg config default-triplet x64-linux` | Set default triplet |
|
|
143
|
+
| `kmpkg version` | Show version |
|
|
144
|
+
|
|
145
|
+
## Architecture
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
kmpkg/
|
|
149
|
+
cli/ -- Click-based CLI (54 commands)
|
|
150
|
+
core/ -- Core modules
|
|
151
|
+
builder.py -- PortBuilder (cmake -P portfile.cmake)
|
|
152
|
+
dependency_resolver.py -- Transitive dependency resolution
|
|
153
|
+
statusdb.py -- Installed package tracking
|
|
154
|
+
binary_cache.py -- ABI-hash based binary cache
|
|
155
|
+
download_manager.py -- Download with SHA512 verification
|
|
156
|
+
kmpkgpaths.py -- Path discovery + registry configuration
|
|
157
|
+
registry/
|
|
158
|
+
builtin.py -- Local files registry
|
|
159
|
+
git.py -- Git registry (remote clone/fetch)
|
|
160
|
+
registry_set.py -- Registry routing
|
|
161
|
+
port_provider.py -- Port file provider
|
|
162
|
+
tests/ -- 74 pytest tests
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Development
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
git clone https://github.com/kumose/kmpkg
|
|
169
|
+
cd kmpkg
|
|
170
|
+
pip install -e .
|
|
171
|
+
pytest
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## License
|
|
175
|
+
|
|
176
|
+
Apache 2.0
|
kmpkg-0.1.0/README.md
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# kmpkg
|
|
2
|
+
|
|
3
|
+
A Python reimplementation of the vcpkg package manager, with built-in C++ project scaffolding via kmcmake templates.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install kmpkg
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Requires Python >= 3.8 and `cmake` on PATH.
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Create a C++ project from kmcmake template
|
|
17
|
+
kmpkg new --project --name myapp -o ./myapp
|
|
18
|
+
|
|
19
|
+
# Install a port
|
|
20
|
+
kmpkg install fmt
|
|
21
|
+
|
|
22
|
+
# Search available ports
|
|
23
|
+
kmpkg search fmt
|
|
24
|
+
|
|
25
|
+
# List installed ports
|
|
26
|
+
kmpkg list
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Configuration
|
|
30
|
+
|
|
31
|
+
kmpkg reads `kmpkg-configuration.json` from the current directory or kmpkg root:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"default-registry": {
|
|
36
|
+
"kind": "git",
|
|
37
|
+
"baseline": "d5c94a00e9d3d27a88399368d789971bc7e4fca8",
|
|
38
|
+
"repository": "https://github.com/kumose/kmpkgcore.git"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The root directory defaults to `$KMPKG_ROOT` or `/home/jeff/kmpkgcore`.
|
|
44
|
+
|
|
45
|
+
## Commands
|
|
46
|
+
|
|
47
|
+
### Project Creation
|
|
48
|
+
|
|
49
|
+
| Command | Description |
|
|
50
|
+
|---------|-------------|
|
|
51
|
+
| `kmpkg new --project --name X -o path` | Create C++ project from kmcmake template |
|
|
52
|
+
| `kmpkg new --name X --version Y` | Create a new `kmpkg.json` manifest |
|
|
53
|
+
| `kmpkg add fmt` | Add dependency to manifest |
|
|
54
|
+
|
|
55
|
+
### Package Management
|
|
56
|
+
|
|
57
|
+
| Command | Description |
|
|
58
|
+
|---------|-------------|
|
|
59
|
+
| `kmpkg install fmt` | Build and install a port |
|
|
60
|
+
| `kmpkg install` | Install all dependencies from `kmpkg.json` |
|
|
61
|
+
| `kmpkg remove fmt` | Uninstall a port |
|
|
62
|
+
| `kmpkg update` | List upgradable packages |
|
|
63
|
+
| `kmpkg upgrade` | Rebuild outdated packages |
|
|
64
|
+
|
|
65
|
+
### Build
|
|
66
|
+
|
|
67
|
+
| Command | Description |
|
|
68
|
+
|---------|-------------|
|
|
69
|
+
| `kmpkg build fmt` | Build a single port |
|
|
70
|
+
| `kmpkg build fmt --overrides fmt=10.0.0` | Build with version overrides |
|
|
71
|
+
| `kmpkg ci --all` | CI build all ports |
|
|
72
|
+
| `kmpkg test-features fmt` | Test all feature combinations |
|
|
73
|
+
| `kmpkg check-support fmt` | Check if port is supported |
|
|
74
|
+
|
|
75
|
+
### Information
|
|
76
|
+
|
|
77
|
+
| Command | Description |
|
|
78
|
+
|---------|-------------|
|
|
79
|
+
| `kmpkg list` | List all available ports |
|
|
80
|
+
| `kmpkg search fmt` | Search ports by pattern |
|
|
81
|
+
| `kmpkg find fmt` | Alias for search |
|
|
82
|
+
| `kmpkg package-info fmt` | Show port details |
|
|
83
|
+
| `kmpkg depend-info fmt` | Show dependency tree |
|
|
84
|
+
| `kmpkg owns file.h` | Find which package owns a file |
|
|
85
|
+
| `kmpkg license-report` | Show licenses of installed packages |
|
|
86
|
+
|
|
87
|
+
### Registry Management
|
|
88
|
+
|
|
89
|
+
| Command | Description |
|
|
90
|
+
|---------|-------------|
|
|
91
|
+
| `kmpkg clone -i <src> -o <dst> -p fmt` | Clone ports with recursive deps |
|
|
92
|
+
| `kmpkg publish fmt` | Publish port changes |
|
|
93
|
+
| `kmpkg update-registry` | Fetch latest from git registry |
|
|
94
|
+
| `kmpkg regenerate` | Regenerate version DB from ports/ |
|
|
95
|
+
| `kmpkg x-add-version fmt` | Update version database |
|
|
96
|
+
| `kmpkg x-update-baseline --add fmt=1.0` | Add baseline entry |
|
|
97
|
+
| `kmpkg gitlog` | Show registry git log |
|
|
98
|
+
| `kmpkg gitlog -p fmt` | Show port change history |
|
|
99
|
+
|
|
100
|
+
### Integration
|
|
101
|
+
|
|
102
|
+
| Command | Description |
|
|
103
|
+
|---------|-------------|
|
|
104
|
+
| `kmpkg integrate install` | Set up CMake integration |
|
|
105
|
+
| `kmpkg integrate remove` | Remove CMake integration |
|
|
106
|
+
| `kmpkg autocomplete bash` | Install shell completion |
|
|
107
|
+
| `kmpkg autocomplete bash --remove` | Remove shell completion |
|
|
108
|
+
| `kmpkg env --bin` | Create build environment |
|
|
109
|
+
|
|
110
|
+
### Export & Config
|
|
111
|
+
|
|
112
|
+
| Command | Description |
|
|
113
|
+
|---------|-------------|
|
|
114
|
+
| `kmpkg export fmt` | Export installed packages |
|
|
115
|
+
| `kmpkg config show` | Show configuration |
|
|
116
|
+
| `kmpkg config default-triplet x64-linux` | Set default triplet |
|
|
117
|
+
| `kmpkg version` | Show version |
|
|
118
|
+
|
|
119
|
+
## Architecture
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
kmpkg/
|
|
123
|
+
cli/ -- Click-based CLI (54 commands)
|
|
124
|
+
core/ -- Core modules
|
|
125
|
+
builder.py -- PortBuilder (cmake -P portfile.cmake)
|
|
126
|
+
dependency_resolver.py -- Transitive dependency resolution
|
|
127
|
+
statusdb.py -- Installed package tracking
|
|
128
|
+
binary_cache.py -- ABI-hash based binary cache
|
|
129
|
+
download_manager.py -- Download with SHA512 verification
|
|
130
|
+
kmpkgpaths.py -- Path discovery + registry configuration
|
|
131
|
+
registry/
|
|
132
|
+
builtin.py -- Local files registry
|
|
133
|
+
git.py -- Git registry (remote clone/fetch)
|
|
134
|
+
registry_set.py -- Registry routing
|
|
135
|
+
port_provider.py -- Port file provider
|
|
136
|
+
tests/ -- 74 pytest tests
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Development
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
git clone https://github.com/kumose/kmpkg
|
|
143
|
+
cd kmpkg
|
|
144
|
+
pip install -e .
|
|
145
|
+
pytest
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## License
|
|
149
|
+
|
|
150
|
+
Apache 2.0
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Copyright (C) Kumo inc. and its affiliates.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Copyright (C) Kumo inc. and its affiliates.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
from kmpkg.cli.main import main
|
|
18
|
+
|
|
19
|
+
if __name__ == "__main__":
|
|
20
|
+
main()
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Copyright (C) Kumo inc. and its affiliates.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Copyright (C) Kumo inc. and its affiliates.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
from kmpkg.cli.commands.basic import (
|
|
18
|
+
bootstrap_standalone,
|
|
19
|
+
contact,
|
|
20
|
+
download_tool,
|
|
21
|
+
format_feature_baseline,
|
|
22
|
+
hash_cmd,
|
|
23
|
+
init_registry,
|
|
24
|
+
)
|
|
25
|
+
from kmpkg.cli.commands.build import (
|
|
26
|
+
build,
|
|
27
|
+
build_external,
|
|
28
|
+
check_support,
|
|
29
|
+
ci,
|
|
30
|
+
)
|
|
31
|
+
from kmpkg.cli.commands.config import config
|
|
32
|
+
from kmpkg.cli.commands.export import (
|
|
33
|
+
export,
|
|
34
|
+
generate_msbuild_props,
|
|
35
|
+
)
|
|
36
|
+
from kmpkg.cli.commands.gitlog import gitlog
|
|
37
|
+
from kmpkg.cli.commands.help_cmd import help_cmd
|
|
38
|
+
from kmpkg.cli.commands.info import (
|
|
39
|
+
depend_info,
|
|
40
|
+
find,
|
|
41
|
+
license_report,
|
|
42
|
+
owns,
|
|
43
|
+
package_info,
|
|
44
|
+
portsdiff,
|
|
45
|
+
)
|
|
46
|
+
from kmpkg.cli.commands.install import (
|
|
47
|
+
install,
|
|
48
|
+
list_cmd,
|
|
49
|
+
remove,
|
|
50
|
+
search,
|
|
51
|
+
update_cmd,
|
|
52
|
+
upgrade,
|
|
53
|
+
)
|
|
54
|
+
from kmpkg.cli.commands.integrate import (
|
|
55
|
+
autocomplete,
|
|
56
|
+
env_cmd,
|
|
57
|
+
fetch,
|
|
58
|
+
integrate,
|
|
59
|
+
)
|
|
60
|
+
from kmpkg.cli.commands.manifest import (
|
|
61
|
+
add,
|
|
62
|
+
create,
|
|
63
|
+
edit,
|
|
64
|
+
format_manifest,
|
|
65
|
+
new,
|
|
66
|
+
)
|
|
67
|
+
from kmpkg.cli.commands.misc import (
|
|
68
|
+
acquire,
|
|
69
|
+
acquire_project,
|
|
70
|
+
activate,
|
|
71
|
+
ci_clean,
|
|
72
|
+
ci_verify_versions,
|
|
73
|
+
deactivate,
|
|
74
|
+
set_installed,
|
|
75
|
+
test_features,
|
|
76
|
+
use,
|
|
77
|
+
z_print_config,
|
|
78
|
+
)
|
|
79
|
+
from kmpkg.cli.commands.registry import (
|
|
80
|
+
regenerate,
|
|
81
|
+
update_registry,
|
|
82
|
+
x_add_version,
|
|
83
|
+
x_update_baseline,
|
|
84
|
+
)
|
|
85
|
+
from kmpkg.cli.commands.repo import clone, publish
|
|
86
|
+
from kmpkg.cli.commands.version import version
|
|
87
|
+
|
|
88
|
+
all_commands = [
|
|
89
|
+
# basic
|
|
90
|
+
version,
|
|
91
|
+
help_cmd,
|
|
92
|
+
config,
|
|
93
|
+
contact,
|
|
94
|
+
hash_cmd,
|
|
95
|
+
download_tool,
|
|
96
|
+
format_feature_baseline,
|
|
97
|
+
bootstrap_standalone,
|
|
98
|
+
init_registry,
|
|
99
|
+
# install
|
|
100
|
+
install,
|
|
101
|
+
remove,
|
|
102
|
+
list_cmd,
|
|
103
|
+
search,
|
|
104
|
+
update_cmd,
|
|
105
|
+
upgrade,
|
|
106
|
+
# manifest
|
|
107
|
+
add,
|
|
108
|
+
new,
|
|
109
|
+
format_manifest,
|
|
110
|
+
edit,
|
|
111
|
+
create,
|
|
112
|
+
# registry
|
|
113
|
+
x_add_version,
|
|
114
|
+
x_update_baseline,
|
|
115
|
+
update_registry,
|
|
116
|
+
regenerate,
|
|
117
|
+
# build
|
|
118
|
+
build,
|
|
119
|
+
build_external,
|
|
120
|
+
check_support,
|
|
121
|
+
ci,
|
|
122
|
+
# info
|
|
123
|
+
find,
|
|
124
|
+
depend_info,
|
|
125
|
+
package_info,
|
|
126
|
+
owns,
|
|
127
|
+
license_report,
|
|
128
|
+
portsdiff,
|
|
129
|
+
# integrate
|
|
130
|
+
integrate,
|
|
131
|
+
env_cmd,
|
|
132
|
+
autocomplete,
|
|
133
|
+
fetch,
|
|
134
|
+
# export
|
|
135
|
+
export,
|
|
136
|
+
generate_msbuild_props,
|
|
137
|
+
# repo
|
|
138
|
+
clone,
|
|
139
|
+
publish,
|
|
140
|
+
gitlog,
|
|
141
|
+
# misc
|
|
142
|
+
acquire,
|
|
143
|
+
acquire_project,
|
|
144
|
+
activate,
|
|
145
|
+
deactivate,
|
|
146
|
+
use,
|
|
147
|
+
set_installed,
|
|
148
|
+
test_features,
|
|
149
|
+
ci_clean,
|
|
150
|
+
ci_verify_versions,
|
|
151
|
+
z_print_config,
|
|
152
|
+
]
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Copyright (C) Kumo inc. and its affiliates.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
from typing import Optional
|
|
18
|
+
|
|
19
|
+
import click
|
|
20
|
+
from rich.console import Console
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@click.command(name="contact", help="Display contact information")
|
|
24
|
+
def contact() -> None:
|
|
25
|
+
Console().print("[cyan]contact[/cyan] stub")
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@click.command(name="hash", help="Compute file hashes")
|
|
29
|
+
@click.argument("files", nargs=-1, required=True)
|
|
30
|
+
def hash_cmd(files: tuple[str, ...]) -> None:
|
|
31
|
+
Console().print("[cyan]hash[/cyan] stub: {}".format(" ".join(files)))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@click.command(name="download", help="Download a specific tool")
|
|
35
|
+
@click.argument("tool", required=True)
|
|
36
|
+
def download_tool(tool: str) -> None:
|
|
37
|
+
Console().print(f"[cyan]download[/cyan] stub: {tool}")
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@click.command(name="format-feature-baseline", help="Format CI feature baseline file")
|
|
41
|
+
@click.argument("path", required=False)
|
|
42
|
+
def format_feature_baseline(path: Optional[str] = None) -> None:
|
|
43
|
+
msg = "[cyan]format-feature-baseline[/cyan] stub"
|
|
44
|
+
if path:
|
|
45
|
+
msg += f" {path}"
|
|
46
|
+
Console().print(msg)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@click.command(name="bootstrap-standalone", help="Bootstrap standalone kmpkg")
|
|
50
|
+
def bootstrap_standalone() -> None:
|
|
51
|
+
Console().print("[cyan]bootstrap-standalone[/cyan] stub")
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
@click.command(name="init-registry", help="Initialize a new registry")
|
|
55
|
+
def init_registry() -> None:
|
|
56
|
+
Console().print("[cyan]init-registry[/cyan] stub")
|