From 86740a7fb51bb13bafc730b92d1e83c0ec35ea03 Mon Sep 17 00:00:00 2001 From: Hunaid Sohail <76044242+Hunaid2000@users.noreply.github.com> Date: Tue, 13 Dec 2022 23:18:00 +0500 Subject: [PATCH 1/4] Fixed a bug where python driver throws error when build from source --- drivers/python/setup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/python/setup.py b/drivers/python/setup.py index 7d8981fab..a7979a262 100644 --- a/drivers/python/setup.py +++ b/drivers/python/setup.py @@ -29,12 +29,10 @@ author_email = 'rhizome.ai@gmail.com', url = 'https://github.com/apache/age', license = 'Apache2.0', - install_requires = [ 'psycopg2', 'antlr4-python3-runtime' ], + install_requires = [ 'psycopg2', 'antlr4-python3-runtime==4.9.3'], packages = ['age', 'age.gen'], keywords = ['Graph Database', 'Apache AGE', 'PostgreSQL'], python_requires = '>=3.9', - # package_data = {}, - # zip_safe=False, classifiers = [ 'Programming Language :: Python :: 3.9' ] From 97ab5f9d0cd2a1c2cd6a031591b871cbde891fd5 Mon Sep 17 00:00:00 2001 From: Hunaid Sohail <76044242+Hunaid2000@users.noreply.github.com> Date: Tue, 13 Dec 2022 23:20:28 +0500 Subject: [PATCH 2/4] Moved required packages to requirements.txt --- drivers/python/requirements.txt | Bin 0 -> 158 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 drivers/python/requirements.txt diff --git a/drivers/python/requirements.txt b/drivers/python/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..918763cbfe5163b75d9480c93ffd02331959529e GIT binary patch literal 158 zcmZ9EK?;LF5CrQS@DF}K59%dC9-~1L!K}-=9{hY_CCAXr&^_HfpLb;A;Lb|qK|@I; zg1Ta4mJK8mCB1ABz5KsbaM2B9{X}Os+Q~fq6KK_m{pZiTn7E0Knyb_DZEs$)ndn}{ G;^hRA Date: Tue, 13 Dec 2022 23:27:13 +0500 Subject: [PATCH 3/4] Update Readme Rearranged instructions and added instructions to install from requirements.txt --- drivers/python/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/python/README.md b/drivers/python/README.md index d01b88593..9f365af08 100644 --- a/drivers/python/README.md +++ b/drivers/python/README.md @@ -11,10 +11,15 @@ AGType parser and driver support for [Apache AGE](https://age.apache.org/), grap ``` sudo apt-get update sudo apt-get install python3-dev libpq-dev -pip install --no-binary :all: psycopg2 -pip install antlr4-python3-runtime +git clone https://github.com/apache/age.git +cd age/drivers/python +``` +### Install required packages ``` +pip install -r requirements.txt +``` + ### Test ``` python -m unittest -v test_age_py.py @@ -23,18 +28,13 @@ python -m unittest -v test_agtypes.py ### Build from source ``` -git clone https://github.com/apache/age.git -cd age/drivers/python - python setup.py install - ``` ### Install from PyPi ``` pip install apache-age-python - ``` ### For more information about [Apache AGE](https://age.apache.org/) From 4919d9d2be825a4c1dd826316c1c1be7f57d486d Mon Sep 17 00:00:00 2001 From: Hunaid Sohail <76044242+Hunaid2000@users.noreply.github.com> Date: Tue, 27 Dec 2022 22:44:56 +0500 Subject: [PATCH 4/4] Fixed a typo in exceptions.py file Fixed a typo 'SqlExcution' on line 62 in exceptions.py file --- drivers/python/age/exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/python/age/exceptions.py b/drivers/python/age/exceptions.py index 7bbb5b4be..cee9cc3be 100644 --- a/drivers/python/age/exceptions.py +++ b/drivers/python/age/exceptions.py @@ -59,7 +59,7 @@ def __init__(self, msg, cause): super().__init__(msg, cause) def __repr__(self) : - return 'SqlExcution [' + self.msg + ']' + return 'SqlExecution [' + self.msg + ']' class AGTypeError(Exception): def __init__(self, msg, cause):