rename abx-pkg to abxpkg

This commit is contained in:
Nick Sweeting
2026-04-17 10:48:40 -07:00
parent ee5685353b
commit 7d8c468659
8 changed files with 39 additions and 39 deletions
+4 -4
View File
@@ -6,7 +6,7 @@ on:
env:
UV_NO_SOURCES: "1"
PYTHONPATH: ${{ github.workspace }}/abx-pkg:${{ github.workspace }}/abx-plugins:${{ github.workspace }}/abx-dl
PYTHONPATH: ${{ github.workspace }}/abxpkg:${{ github.workspace }}/abx-plugins:${{ github.workspace }}/abx-dl
jobs:
lint:
@@ -17,8 +17,8 @@ jobs:
submodules: true
fetch-depth: 1
- name: Clone abx-pkg
run: git clone --depth=1 https://github.com/ArchiveBox/abx-pkg.git abx-pkg
- name: Clone abxpkg
run: git clone --depth=1 https://github.com/ArchiveBox/abxpkg.git abxpkg
- name: Clone abx-plugins
run: git clone --depth=1 https://github.com/ArchiveBox/abx-plugins.git abx-plugins
@@ -40,7 +40,7 @@ jobs:
- name: Install dependencies with uv
run: |
uv sync --all-extras --all-groups --no-sources --no-cache
uv pip install -e ./abx-pkg -e ./abx-plugins[dev] -e ./abx-dl
uv pip install -e ./abxpkg -e ./abx-plugins[dev] -e ./abx-dl
- name: Run prek
run: uv run --no-sync --no-sources prek run --all-files
+8 -8
View File
@@ -57,7 +57,7 @@ jobs:
runs-on: ubuntu-22.04
needs: discover-tests
env:
PYTHONPATH: ${{ github.workspace }}/abx-pkg:${{ github.workspace }}/abx-plugins:${{ github.workspace }}/abx-dl
PYTHONPATH: ${{ github.workspace }}/abxpkg:${{ github.workspace }}/abx-plugins:${{ github.workspace }}/abx-dl
strategy:
fail-fast: false
@@ -71,8 +71,8 @@ jobs:
submodules: true
fetch-depth: 1
- name: Clone abx-pkg
run: git clone --depth=1 https://github.com/ArchiveBox/abx-pkg.git abx-pkg
- name: Clone abxpkg
run: git clone --depth=1 https://github.com/ArchiveBox/abxpkg.git abxpkg
- name: Clone abx-plugins
run: git clone --depth=1 https://github.com/ArchiveBox/abx-plugins.git abx-plugins
@@ -112,7 +112,7 @@ jobs:
- name: Install dependencies with uv
run: |
uv sync --dev --all-extras --no-sources
uv pip install -e ./abx-pkg -e ./abx-plugins[dev] -e ./abx-dl
uv pip install -e ./abxpkg -e ./abx-plugins[dev] -e ./abx-dl
- name: Run test - ${{ matrix.test.name }}
run: |
@@ -123,7 +123,7 @@ jobs:
name: Plugin tests
runs-on: ubuntu-22.04
env:
PYTHONPATH: ${{ github.workspace }}/abx-pkg:${{ github.workspace }}/abx-plugins:${{ github.workspace }}/abx-dl
PYTHONPATH: ${{ github.workspace }}/abxpkg:${{ github.workspace }}/abx-plugins:${{ github.workspace }}/abx-dl
steps:
- uses: actions/checkout@v4
@@ -131,8 +131,8 @@ jobs:
submodules: true
fetch-depth: 1
- name: Clone abx-pkg
run: git clone --depth=1 https://github.com/ArchiveBox/abx-pkg.git abx-pkg
- name: Clone abxpkg
run: git clone --depth=1 https://github.com/ArchiveBox/abxpkg.git abxpkg
- name: Clone abx-plugins
run: git clone --depth=1 https://github.com/ArchiveBox/abx-plugins.git abx-plugins
@@ -172,7 +172,7 @@ jobs:
- name: Install dependencies with uv
run: |
uv sync --dev --all-extras --no-sources
uv pip install -e ./abx-pkg -e ./abx-plugins[dev] -e ./abx-dl
uv pip install -e ./abxpkg -e ./abx-plugins[dev] -e ./abx-dl
- name: Run plugin tests
env:
+4 -4
View File
@@ -12,7 +12,7 @@ jobs:
python_tests:
runs-on: ${{ matrix.os }}
env:
PYTHONPATH: ${{ github.workspace }}/abx-pkg:${{ github.workspace }}/abx-plugins:${{ github.workspace }}/abx-dl
PYTHONPATH: ${{ github.workspace }}/abxpkg:${{ github.workspace }}/abx-plugins:${{ github.workspace }}/abx-dl
strategy:
matrix:
@@ -26,8 +26,8 @@ jobs:
submodules: true
fetch-depth: 1
- name: Clone abx-pkg
run: git clone --depth=1 https://github.com/ArchiveBox/abx-pkg.git abx-pkg
- name: Clone abxpkg
run: git clone --depth=1 https://github.com/ArchiveBox/abxpkg.git abxpkg
- name: Clone abx-plugins
run: git clone --depth=1 https://github.com/ArchiveBox/abx-plugins.git abx-plugins
@@ -69,7 +69,7 @@ jobs:
- name: Install dependencies with uv
run: |
uv sync --dev --all-extras --no-sources
uv pip install -e ./abx-pkg -e ./abx-plugins[dev] -e ./abx-dl
uv pip install -e ./abxpkg -e ./abx-plugins[dev] -e ./abx-dl
### Run the tests
- name: Directory listing for debugging
+2 -2
View File
@@ -796,7 +796,7 @@ ArchiveBox bundles industry-standard tools like [Google Chrome](https://github.c
<li>Database: <a href="https://docs.djangoproject.com/en/6.0/ref/databases/#sqlite-notes">Django ORM</a> saving to <a href="https://www.sqlite.org/mostdeployed.html">SQLite3</a> <code>./data/index.sqlite3</code></li>
<li>Job Queue: Custom orchestrator using <code>supervisord</code> for worker management</li>
<li>Build/test/lint: <a href="https://github.com/astral-sh/uv"><code>uv</code></a> / <code>pyright</code>+<code>ty</code>+<code>pytest</code> / <code>ruff</code></li>
<li>Subdependencies: <a href="https://github.com/ArchiveBox/abx-pkg"><code>abx-pkg</code></a> installs apt/brew/pip/npm pkgs at runtime (e.g. <code>yt-dlp</code>, <code>singlefile</code>, <code>readability</code>, <code>git</code>)</li>
<li>Subdependencies: <a href="https://github.com/ArchiveBox/abxpkg"><code>abxpkg</code></a> installs apt/brew/pip/npm pkgs at runtime (e.g. <code>yt-dlp</code>, <code>singlefile</code>, <code>readability</code>, <code>git</code>)</li>
</ul>
@@ -1359,7 +1359,7 @@ cd archivebox
Repos included in monorepo setup:
- https://github.com/ArchiveBox/abxbus
- https://github.com/ArchiveBox/abx-pkg
- https://github.com/ArchiveBox/abxpkg
- https://github.com/ArchiveBox/abx-plugins
- https://github.com/ArchiveBox/abx-dl
- https://github.com/ArchiveBox/ArchiveBox
+2 -2
View File
@@ -150,7 +150,7 @@ update_internal_dependencies() {
local abxbus_version abxpkg_version abx_plugins_version abx_dl_version
abxbus_version="$(read_repo_version "${WORKSPACE_DIR}/abxbus" || true)"
abxpkg_version="$(read_repo_version "${WORKSPACE_DIR}/abx-pkg" || true)"
abxpkg_version="$(read_repo_version "${WORKSPACE_DIR}/abxpkg" || true)"
abx_plugins_version="$(read_repo_version "${WORKSPACE_DIR}/abx-plugins" || true)"
abx_dl_version="$(read_repo_version "${WORKSPACE_DIR}/abx-dl" || true)"
@@ -163,7 +163,7 @@ path = Path('pyproject.toml')
text = path.read_text()
for name, version in (
('abxbus', sys.argv[1]),
('abx-pkg', sys.argv[2]),
('abxpkg', sys.argv[2]),
('abx-plugins', sys.argv[3]),
('abx-dl', sys.argv[4]),
):
+7 -7
View File
@@ -55,9 +55,9 @@ Crawl.run()
run_hooks(event_name=f'Dependency__install_using_{provider}_provider', ...)
```
5. **Trust abx-pkg** - Never use `shutil.which()`, `subprocess.run([bin, '--version'])`, or manual hash calculation.
5. **Trust abxpkg** - Never use `shutil.which()`, `subprocess.run([bin, '--version'])`, or manual hash calculation.
```python
# ✅ CORRECT - abx-pkg handles everything
# ✅ CORRECT - abxpkg handles everything
from abxpkg import Binary, PipProvider, EnvProvider
binary = Binary(name='wget', binproviders=[PipProvider(), EnvProvider()]).load()
# binary.abspath, binary.version, binary.sha256 are all populated automatically
@@ -128,7 +128,7 @@ import sys
import json
def find_wget() -> dict | None:
"""Find wget binary using abx-pkg."""
"""Find wget binary using abxpkg."""
try:
from abxpkg import Binary, AptProvider, BrewProvider, EnvProvider
@@ -185,10 +185,10 @@ if __name__ == '__main__':
```
**Rules:**
- ✅ Use `Binary(...).load()` from abx-pkg - handles finding binary, version, hash automatically
- ✅ Use `Binary(...).load()` from abxpkg - handles finding binary, version, hash automatically
- ✅ Emit `Binary` JSONL if found
- ✅ Emit `Dependency` JSONL if not found
- ✅ Use `overrides` field matching abx-pkg format: `{'pip': {'packages': ['pkg']}, 'apt': {'packages': ['pkg']}}`
- ✅ Use `overrides` field matching abxpkg format: `{'pip': {'packages': ['pkg']}, 'apt': {'packages': ['pkg']}}`
- ❌ NEVER use `shutil.which()`, `subprocess.run()`, manual version detection, or hash calculation
- ❌ NEVER call package managers (apt, brew, pip, npm) directly
@@ -225,7 +225,7 @@ def main(dependency_id: str, bin_name: str, bin_providers: str, overrides: str |
except json.JSONDecodeError:
pass
# Install using abx-pkg
# Install using abxpkg
provider = PipProvider()
try:
binary = Binary(name=bin_name, binproviders=[provider], overrides=overrides_dict or {}).install()
@@ -256,7 +256,7 @@ if __name__ == '__main__':
**Rules:**
- ✅ Check `bin_providers` parameter - exit cleanly (code 0) if can't handle
- ✅ Parse `overrides` parameter as full dict, extract your provider's section
- ✅ Use `Binary(...).install()` from abx-pkg - handles actual installation
- ✅ Use `Binary(...).install()` from abxpkg - handles actual installation
- ✅ Emit `Binary` JSONL on success
- ❌ NEVER hardcode provider names in Model.run() or anywhere else
- ❌ NEVER skip the bin_providers check
+3 -3
View File
@@ -1,6 +1,6 @@
[project]
name = "archivebox"
version = "0.9.29rc1"
version = "0.9.30rc1"
requires-python = ">=3.13"
description = "Self-hosted internet archiving solution."
authors = [{name = "Nick Sweeting", email = "pyproject.toml@archivebox.io"}]
@@ -80,8 +80,8 @@ dependencies = [
### Binary/Package Management
"abxbus>=2.4.9", # explicit direct dep so local dev env resolves sibling abxbus repo, matching abx-dl EventBus API
"abxpkg>=1.10.4", # for: detecting, versioning, and installing binaries via apt/brew/pip/npm
"abx-plugins>=1.10.29", # shared ArchiveBox plugin package with install_args-only overrides
"abx-dl>=1.10.29", # shared ArchiveBox downloader package with install_args-only overrides
"abx-plugins>=1.10.30", # shared ArchiveBox plugin package with install_args-only overrides
"abx-dl>=1.10.30", # shared ArchiveBox downloader package with install_args-only overrides
### UUID7 backport for Python <3.14
"uuid7>=0.1.0; python_version < '3.14'", # provides the uuid_extensions module on Python 3.13
]
Generated
+9 -9
View File
@@ -17,7 +17,7 @@ name = "abx-dl"
version = "1.10.20"
source = { editable = "../abx-dl" }
dependencies = [
{ name = "abx-pkg", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
{ name = "abxpkg", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
{ name = "abx-plugins", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
{ name = "abxbus", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
{ name = "jambo", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
@@ -32,7 +32,7 @@ dependencies = [
[package.metadata]
requires-dist = [
{ name = "abx-pkg", editable = "../abx-pkg" },
{ name = "abxpkg", editable = "../abxpkg" },
{ name = "abx-plugins", editable = "../abx-plugins" },
{ name = "abxbus", specifier = ">=2.4.9" },
{ name = "flake8", marker = "extra == 'dev'", specifier = ">=7.1.1" },
@@ -63,9 +63,9 @@ dev = [
]
[[package]]
name = "abx-pkg"
name = "abxpkg"
version = "1.9.19"
source = { editable = "../abx-pkg" }
source = { editable = "../abxpkg" }
dependencies = [
{ name = "pip", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
{ name = "platformdirs", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
@@ -75,7 +75,7 @@ dependencies = [
[package.metadata]
requires-dist = [
{ name = "abx-pkg", extras = ["rich", "pyinfra", "ansible"], marker = "extra == 'all'" },
{ name = "abxpkg", extras = ["rich", "pyinfra", "ansible"], marker = "extra == 'all'" },
{ name = "ansible", marker = "extra == 'ansible'", specifier = ">=12.3.0" },
{ name = "ansible-core", marker = "extra == 'ansible'", specifier = ">=2.0.0" },
{ name = "ansible-runner", marker = "extra == 'ansible'", specifier = ">=2.4.2" },
@@ -109,7 +109,7 @@ name = "abx-plugins"
version = "1.10.20"
source = { editable = "../abx-plugins" }
dependencies = [
{ name = "abx-pkg", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
{ name = "abxpkg", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
{ name = "abxbus", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
{ name = "jambo", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
{ name = "rich-click", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
@@ -117,7 +117,7 @@ dependencies = [
[package.metadata]
requires-dist = [
{ name = "abx-pkg", specifier = ">=1.9.19" },
{ name = "abxpkg", specifier = ">=1.9.19" },
{ name = "abxbus", specifier = ">=2.4.9" },
{ name = "feedparser", marker = "extra == 'dev'", specifier = ">=6.0.0" },
{ name = "jambo", specifier = ">=0.1.7" },
@@ -197,7 +197,7 @@ version = "0.9.12rc1"
source = { editable = "." }
dependencies = [
{ name = "abx-dl", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
{ name = "abx-pkg", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
{ name = "abxpkg", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
{ name = "abx-plugins", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
{ name = "abxbus", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
{ name = "atomicwrites", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },
@@ -291,7 +291,7 @@ dev = [
[package.metadata]
requires-dist = [
{ name = "abx-dl", editable = "../abx-dl" },
{ name = "abx-pkg", editable = "../abx-pkg" },
{ name = "abxpkg", editable = "../abxpkg" },
{ name = "abx-plugins", editable = "../abx-plugins" },
{ name = "abxbus", specifier = ">=2.4.9" },
{ name = "archivebox", extras = ["sonic", "ldap", "debug"], marker = "extra == 'all'" },