Skip to content

Commit

Permalink
Python Client: add instructions that set DEEPHAVEN_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
kosak committed Mar 19, 2024
1 parent 38fc912 commit 164d42e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
23 changes: 12 additions & 11 deletions py/client-ticking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,40 @@ you will continue to use that venv here.
### Install Cython in the venv

If you've exited your venv, re-activate it with something like:
```
``` shell
source ~/py/cython/bin/activate
```

Then run
```
``` shell
pip3 install cython
```

### Build the shared library:

```
cd ${DHROOT}/py/client-ticking
``` shell
cd ${DHROOT}
cd py/client-ticking
```

```
``` shell
# Ensure the DHCPP environment variable is set per the instructions above
rm -rf build # Ensure we clean the remnants of any pre-existing build.
CFLAGS="-I${DHCPP}/include" LDFLAGS="-L${DHCPP}/lib" python3 setup.py build_ext -i
rm -rf build dist # Ensure we clean the remnants of any pre-existing build.
DEEPHAVEN_VERSION=$(../../gradlew :printVersion -q) CFLAGS="-I${DHCPP}/include" LDFLAGS="-L${DHCPP}/lib" python3 setup.py build_ext -i
```

### Install pydeephaven-ticking

Build the wheel with

```
python3 setup.py bdist_wheel
``` shell
DEEPHAVEN_VERSION=$(../../gradlew :printVersion -q) python3 setup.py bdist_wheel
```

Then install the package.
Note the actual name of the `.whl` file may be different depending on system details.

```
``` shell
pip3 install --force --no-deps dist/pydeephaven_ticking-<x.y.z>-cp310-cp310-linux_x86_64.whl
```

Expand All @@ -78,7 +79,7 @@ one from the PyPI repository.

Run python from the venv while in this directory, and try this sample Python program:

```
``` python
import pydeephaven as dh
import time
session = dh.Session() # assuming Deephaven Community Edition is running locally with the default configuration
Expand Down
8 changes: 6 additions & 2 deletions py/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@ Deephaven Python Client is a Python package created by Deephaven Data Labs. It i

## Source Directory

### From the deephaven-core repository root
### From the deephaven-core repository root
(clone from https://github.com/deephaven/deephaven-core)

## Change to py/client directory
``` shell
$ cd py/client
```

## Dev environment setup
``` shell
$ pip3 install -r requirements-dev.txt
```

## Build
``` shell
$ python3 setup.py bdist_wheel
$ DEEPHAVEN_VERSION=$(../../gradlew :printVersion -q) python3 setup.py bdist_wheel
```

## Run tests
``` shell
$ python3 -m unittest discover tests
Expand Down

0 comments on commit 164d42e

Please sign in to comment.