Installation
pyudbm combines a Python package with native UDBM and UUtils
dependencies. The intended end-user path is prebuilt wheels, while repository
development is currently most reliable from a source checkout.
Install from a wheel
If a published wheel is available for your platform, install it with:
pip install pyudbm
Build from source
For local development, start from a repository checkout:
git clone https://github.com/HansBug/pyudbm.git
cd pyudbm
git submodule update --init --recursive
Create an isolated Python environment and install the repository requirements:
python -m venv venv
source venv/bin/activate
python -m pip install -U pip setuptools wheel
python -m pip install -r requirements.txt
python -m pip install -r requirements-test.txt
python -m pip install -r requirements-build.txt
Build the vendored native dependencies and then the Python extension:
make bin
make build
Run the binding-focused unit tests:
make unittest RANGE_DIR=binding
Smoke Check
The shell snippet below verifies that the package imports correctly:
1python -c "import pyudbm; print(pyudbm.__version__)"
Example output:
10.0.1
The Python snippet below exercises the restored high-level API:
1from pyudbm import Context, IntValuation, __version__
2
3print(__version__)
4
5context = Context(["x", "y"], name="c")
6zone = (context.x < 10) & (context.x - context.y <= 1)
7
8valuation = IntValuation(context)
9valuation["x"] = 3
10valuation["y"] = 2
11
12print(zone.contains(valuation))
Example output:
10.0.1
2True
Notes
The repository is still unfinished. For source builds, the repository-level
make flow remains the most reliable path because it keeps the vendored
native libraries, Python extension, and test environment aligned.