Skip to content

Commit 70d2e93

Browse files
papazofananos
authored andcommitted
docs: Update README.md with latest instructions
Update `README.md` with latest instructions PR: #16 Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com> Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk> Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
1 parent b29d1b8 commit 70d2e93

1 file changed

Lines changed: 48 additions & 75 deletions

File tree

README.md

Lines changed: 48 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,75 @@
1-
# python bindings for vaccel
1+
# Python bindings for vAccel
22

3-
This repo defines and builds the vaccel bindings for python. It is WiP and only
4-
defines a subset of the vAccel API.
3+
[Python](https://www.python.org/) bindings for vAccel wrap the vAccel C API and
4+
provide a native Python API to vAccel operations. The bindings are currently a
5+
WiP, supporting a subset of the vAccel operations.
56

7+
You can find more information about these bindings and everything vAccel in the
8+
[Documentation](https://docs.vaccel.org).
69

7-
## building
10+
## Installation
811

9-
To build, first clone the repo:
12+
The bindings are implemented in the `vaccel` Python package. The package is
13+
installable with `pip` by using the provided Wheels or from source.
1014

11-
```bash
12-
git clone https://github.com/nubificus/python-vaccel
13-
```
15+
### Requirements
1416

15-
## vAccel
17+
- To use the `vaccel` Python package you need a valid vAccel installation. You
18+
can find more information on how to install vAccel in the
19+
[Installation](https://docs.vaccel.org/latest/getting-started/installation)
20+
page.
1621

17-
In order to build the python bindings for vAccel, we first need a vAccel
18-
installation. We can either build it from source, or get the latest binary
19-
release:
22+
- This package requires Python 3.10 or newer. Verify your Python version with:
23+
```sh
24+
python3 --version
25+
```
26+
and update Python as needed using the
27+
[official instructions](https://docs.python.org/3/using/index.html)
2028

21-
### Build from source
29+
### Wheel
2230

23-
```bash
24-
git clone https://github.com/nubificus/vaccel --recursive
25-
cd vaccel
26-
meson setup -Dplugin-noop=enabled build
27-
meson compile -C build
28-
meson install -C build
31+
You can get the latest `vaccel` Wheel package from the
32+
[Releases](https://github.com/nubificus/vaccel-python/releases) page.
2933

34+
```sh
35+
# Replace `x86_64` with `aarch64` or `armv7l` to get packages for the relevant
36+
# architectures
37+
wget https://github.com/nubificus/vaccel-python/releases/download/v0.1.0/vaccel-0.1.0-cp310-abi3-linux_x86_64.whl
38+
pip install vaccel-0.1.0-cp310-abi3-linux_x86_64.whl
3039
```
3140

32-
The relevant libs & plugins should be in `/usr/local/lib/x86_64-linux-gnu`, along with include
33-
files in `/usr/local/include`.
34-
35-
### Get the binary release
41+
### Latest artifacts
3642

37-
Get the latest vAccel binaries:
43+
To install the Wheel artifact of the latest `vaccel` revision:
3844

39-
```bash
40-
wget https://s3.nbfc.io/nbfc-assets/github/vaccel/rev/main/x86_64/release/vaccel-latest-bin.tar.gz
45+
```sh
46+
# Replace `x86_64` with `aarch64` or `armv7l` to get packages for the relevant
47+
# architectures
48+
wget https://s3.nbfc.io/nbfc-assets/github/python-vaccel/main/x86_64/vaccel-latest-cp310-abi3-linux_x86_64.whl
49+
pip install vaccel-latest-cp310-abi3-linux_x86_64.whl
4150
```
4251

43-
and install it:
44-
45-
```bash
46-
sudo tar xfv vaccel-latest-bin.tar.gz --strip-components=2 -C /usr/local
47-
```
48-
49-
## python bindings
50-
51-
Finally, call the `builder.py` to build the bindings. The required python
52-
packages to build are: `datestamp cffi wheel setuptools cmake_build_extension`.
53-
To install them use:
54-
55-
```bash
56-
pip3 install datestamp cffi wheel setuptools cmake_build_extension
57-
```
52+
### Building from source
5853

59-
and run the builder:
54+
You can build the package from source directly and install it using `pip`:
6055

61-
```bash
62-
python3 builder.py
56+
```sh
57+
pip install git+https://github.com/nubificus/vaccel-python
6358
```
6459

65-
The module should be ready. To test run:
66-
67-
```bash
68-
export VACCEL_PLUGINS=/usr/local/lib/x86_64-linux-gnu/libvaccel-noop.so
69-
export LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu
70-
export PYTHONPATH=$PYTHONPATH:.
71-
python3 vaccel/test.py
72-
```
73-
Alternatively, you could build the pip package:
60+
## Running the examples
7461

75-
```bash
76-
pip3 install build
77-
python3 -m build
78-
```
62+
Examples of using the package are provided in the `examples` directory.
7963

80-
and install it:
64+
After cloning the repo:
8165

82-
```bash
83-
pip install dist/vaccel*.tar.gz
66+
```sh
67+
git clone https://github.com/nubificus/vaccel-python
68+
cd vaccel-python
8469
```
8570

86-
## Test
87-
88-
To run the tests:
89-
90-
```bash
91-
export VACCEL_PLUGINS=/usr/local/lib/x86_64-linux-gnu/libvaccel-noop.so
92-
export LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu
93-
export PYTHONPATH=$PYTHONPATH:.
94-
pytest
95-
71+
you can run all the available examples with sample arguments using:
9672

97-
# Test coverage
98-
export VACCEL_PLUGINS=/usr/local/lib/x86_64-linux-gnu/libvaccel-noop.so
99-
export LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu
100-
export PYTHONPATH=$PYTHONPATH:.
101-
pytest --cov=vaccel tests/
73+
```sh
74+
python3 run-examples.py
10275
```

0 commit comments

Comments
 (0)