|
1 | 1 | Graphql parser based on libgraphqlparser
|
2 | 2 | =========================================
|
3 | 3 |
|
4 |
| -Python2.7+ Python3.4+ class-based bindings to libgraphqlparser |
| 4 | +Python2.7+ Python3.4+ class-based bindings to libgraphqlparser; just a thin layer on top of ``libgraphqlparser`` C API. |
5 | 5 |
|
6 | 6 | Still **EXPERIMENTAL**
|
7 | 7 |
|
8 | 8 |
|
9 | 9 | Installing
|
10 | 10 | ----------
|
11 | 11 |
|
12 |
| -Precompiled wheels are usually available on github https://github.com/elastic-coders/py-graphqlparser/releases/ |
| 12 | +First install ``libgraphqlparser`` following instructions on `libgraphqlparser github page`_ . |
13 | 13 |
|
14 |
| -Make sure you pick the right wheel for your platform and python version, then install them using pip:: |
| 14 | +Next you can install ``graphqlparser``. The easiest way is using precompiled wheels which are usually available |
| 15 | +on `graphqlparser github releases`_ |
| 16 | + |
| 17 | +Pick the right wheel for your platform and python version, then install it using pip:: |
15 | 18 |
|
16 | 19 | pip install https://github.com/elastic-coders/py-graphqlparser/releases/download/v0.0.3/graphqlparser-0.0.3-cp27-none-linux_x86_64.whl
|
17 | 20 |
|
18 | 21 |
|
19 |
| -Installing from source is a bit more complex. The main steps are |
| 22 | +As an alternative you can install ``graphqlparser`` from source distribution: |
20 | 23 |
|
21 | 24 | - Install ``cython``
|
22 |
| -- Download and build ``libgraphqlparser`` |
23 |
| -- set an env var ``$GRAPHQL_HOME`` to the folder where libgraphqlparser is |
24 |
| -- compile with:: |
| 25 | +- Set an env var ``$GRAPHQL_HOME`` to the folder where ``libgraphqlparser.so`` and ``Ast.h`` are |
| 26 | +- Install ``graphqlparser`` with pip:: |
25 | 27 |
|
26 | 28 | LDFLAGS="-L$GRAPHQL_HOME" CFLAGS="-I$GRAPHQL_HOME/c -I$GRAPHQL_HOME" pip install graphqlparser
|
27 | 29 |
|
@@ -73,7 +75,7 @@ Rebuild the generated cython files from the libgraphql AST (usually not needed)
|
73 | 75 | - install ``cython``
|
74 | 76 | - run::
|
75 | 77 |
|
76 |
| - LDFLAGS="-L./libgraphqlparser" CFLAGS="-Ilibgraphqlparser/c -Ilibgraphqlparser" python setup.py build_extx |
| 78 | + LDFLAGS="-L./libgraphqlparser" CFLAGS="-Ilibgraphqlparser/c -Ilibgraphqlparser" python setup.py build_ext |
77 | 79 |
|
78 | 80 |
|
79 | 81 | To create a wheel distribution:
|
|
96 | 98 | ----
|
97 | 99 |
|
98 | 100 | - build more wheel packages for linux 32 bit and other platforms
|
| 101 | + |
| 102 | + |
| 103 | +.. _libgraphqlparser github page: https://github.com/graphql/libgraphqlparser |
| 104 | +.. _graphqlparser github releases: https://github.com/elastic-coders/py-graphqlparser/releases/ |
0 commit comments