Skip to content

Commit 218e4c8

Browse files
authored
Issue #388 - Fix python driver build from source (#389)
* Fixed a bug where python driver throws error when build from source * Moved required packages to requirements.txt * Update Readme Rearranged instructions and added instructions to install from requirements.txt * Fixed a typo in exceptions.py file Fixed a typo 'SqlExcution' on line 62 in exceptions.py file
1 parent 0e96fbb commit 218e4c8

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

drivers/python/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ AGType parser and driver support for [Apache AGE](https://age.apache.org/), grap
1111
```
1212
sudo apt-get update
1313
sudo apt-get install python3-dev libpq-dev
14-
pip install --no-binary :all: psycopg2
15-
pip install antlr4-python3-runtime==4.9.2
14+
git clone https://github.com/apache/age.git
15+
cd age/drivers/python
16+
```
17+
18+
### Install required packages
19+
```
20+
pip install -r requirements.txt
1621
```
22+
1723
### Test
1824
```
1925
python -m unittest -v test_age_py.py
@@ -22,18 +28,13 @@ python -m unittest -v test_agtypes.py
2228

2329
### Build from source
2430
```
25-
git clone https://github.com/apache/age.git
26-
cd age/drivers/python
27-
2831
python setup.py install
29-
3032
```
3133

3234
### Install from PyPi
3335

3436
```
3537
pip install apache-age-python
36-
3738
```
3839

3940
### For more information about [Apache AGE](https://age.apache.org/)

drivers/python/requirements.txt

158 Bytes
Binary file not shown.

drivers/python/setup.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@
2929
author_email = 'rhizome.ai@gmail.com',
3030
url = 'https://github.com/apache/age',
3131
license = 'Apache2.0',
32-
install_requires = [ 'psycopg2', 'antlr4-python3-runtime' ],
32+
install_requires = [ 'psycopg2', 'antlr4-python3-runtime==4.9.3'],
3333
packages = ['age', 'age.gen'],
3434
keywords = ['Graph Database', 'Apache AGE', 'PostgreSQL'],
3535
python_requires = '>=3.9',
36-
# package_data = {},
37-
# zip_safe=False,
3836
classifiers = [
3937
'Programming Language :: Python :: 3.9'
4038
]

0 commit comments

Comments
 (0)