Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 0090d65

Browse files
author
Juanjo Alvarez
committed
Update README to point to bblfshd
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
1 parent a000ef1 commit 0090d65

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## client-python [![Build Status](https://travis-ci.org/bblfsh/client-python.svg?branch=master)](https://travis-ci.org/bblfsh/client-python) [![PyPI](https://img.shields.io/pypi/v/bblfsh.svg)](https://pypi.python.org/pypi/bblfsh)
22

33
[Babelfish](https://doc.bblf.sh) Python client library provides functionality to both
4-
connect to the Babelfish server to parse code
4+
connect to the Babelfish bblfshd to parse code
55
(obtaining an [UAST](https://doc.bblf.sh/uast/specification.html) as a result)
66
and to analyse UASTs with the functionality provided by [libuast](https://github.com/bblfsh/libuast).
77

@@ -37,10 +37,11 @@ A small example of how to parse a Python file and extract the import declaration
3737
If you don't have a bblfsh server running you can execute it using the following command:
3838

3939
```sh
40-
docker run --privileged --rm -it -p 9432:9432 --name bblfsh bblfsh/server
40+
docker run --privileged --rm -it -p 9432:9432 -v bblfsh_cache:/var/lib/bblfshd --name bblfshd bblfsh/bblfshd
41+
docker exec -it bblfshd bblfshctl driver install python bblfsh/python-driver:latest
4142
```
4243

43-
Please, read the [getting started](https://doc.bblf.sh/user/getting-started.html) guide to learn more about how to use and deploy a bblfsh server.
44+
Please, read the [getting started](https://doc.bblf.sh/user/getting-started.html) guide to learn more about how to use and deploy a bblfshd.
4445

4546
```python
4647
from bblfsh import BblfshClient, filter

bblfsh/test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import unittest
23

34
import docker
@@ -117,7 +118,10 @@ def testFilterBadQuery(self):
117118
self.assertRaises(RuntimeError, filter, node, "//*roleModule")
118119

119120
def testIssue60(self):
120-
rep = self.client.parse("fixtures/issue60.py")
121+
fixtures_dir = os.path.join(
122+
os.path.dirname(os.path.realpath(__file__)),
123+
"fixtures")
124+
rep = self.client.parse(os.path.join(fixtures_dir, "issue60.py"))
121125
assert(rep.uast)
122126
self.assertFalse(any(filter(rep.uast, "//@roleLiteral")))
123127

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
SDK_MAJOR = SDK_VERSION.split('.')[0]
1111
PYTHON = "python3"
1212

13-
13+
os.environ["CC"] = "g++"
14+
os.environ["CXX"] = "g++"
1415
libraries = ['xml2']
1516
sources = ['bblfsh/pyuast.c']
1617

0 commit comments

Comments
 (0)