Skip to content

Commit

Permalink
Python Client: add instructions that set DEEPHAVEN_VERSION (deephaven…
Browse files Browse the repository at this point in the history
  • Loading branch information
kosak authored Mar 20, 2024
1 parent 24facb1 commit d22197e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
20 changes: 10 additions & 10 deletions py/client-ticking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,39 @@ 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:

```
``` shell
cd ${DHROOT}/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 +78,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 the py/client directory inside the deephaven-core repository
``` 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 d22197e

Please sign in to comment.