File tree Expand file tree Collapse file tree 5 files changed +50
-9
lines changed Expand file tree Collapse file tree 5 files changed +50
-9
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,4 @@ __pycache__
88/.tox
99/.cache
1010/dist /
11-
11+ / * .egg-info
Original file line number Diff line number Diff line change 1+ recursive-include examples *.py
2+ recursive-include ast *.py
3+ recursive-include graphql_parser *.pyx *.pxd
4+ recursive-exclude graphql_parser *.c *.h *.cpp
5+ include NEWS.rst
Original file line number Diff line number Diff line change 1+ News
2+ ----
3+
4+ v0.0.3
5+ ------
6+
7+ - fixed packaging and building
Original file line number Diff line number Diff line change 1- # libgraphql cython port
1+ Graphql parser based on libgraphqlparser
2+ =========================================
23
34Python2.7+ Python3.4+ class-based bindings to libgraphqlparser
45
@@ -7,7 +8,25 @@ See usage example in `examples/visitor_example.py`
78Still **EXPERIMENTAL **
89
910
10- ## Building from source
11+ Installing
12+ ----------
13+
14+ Prerequisites:
15+
16+ - Install `cython `
17+ - Download and build `libgraphqlparser `
18+
19+
20+ Install using pip
21+
22+ - set an env var `$GRAPHQL_HOME ` to libgraphqlparser dir
23+ - `LDFLAGS="-L$GRAPHQL_HOME" CFLAGS="-I$GRAPHQL_HOME/c -I$GRAPHQL_HOME" pip install graphqlparser `
24+
25+
26+ Building from source
27+ --------------------
28+
29+ Needed to rebuild the generate cython files from the libgraphql AST
1130
1231- download submodules with `git checkout --recursive `
1332- build libgraphql library in folder `./libgraphql ` (python2.7 required for building)
@@ -23,20 +42,23 @@ To package with wheel:
2342- build with `pip wheel --wheel-dir=.wheelhouse . `
2443
2544
26- ## Run
45+ Run
46+ ---
2747
2848Make sure `libgraphql ` is available to the loader in your `LD_LIBRARY_PATH `
2949
3050
31- ## Known issues
51+ Known issues
52+ ------------
3253
3354- Only (lightly) tested on python3
3455- Unicode string handling not yet complete (a mixture of bytes and strings all over)
3556- Exceptions in the visitor's class callbacks are ignored
3657- libgraphqlparser is **dynamically ** linked but It would be better if it was linked statically
3758
3859
39- ## TODO
60+ TODO
61+ ----
4062
41- - build and upload wheels to pypi
63+ - make wheels available on github
4264- build more wheel packages for linux 32 bit and other platforms
Original file line number Diff line number Diff line change 1+ # coding: utf-8
2+
13from setuptools import setup , Extension
24
35from Cython .Build import cythonize
1315
1416setup (
1517 name = 'graphqlparser' ,
16- version = '0.0.2 ' ,
18+ version = '0.0.3 ' ,
1719 author = 'Marco Paolini' ,
18201921 description = 'Python bindings for libgraphqlparser (Cython-based)' ,
20- long_description = 'Graphql parser based on libgraphql with Cython-based bindings' ,
22+ long_description = '\n \n ' .join ([open ('README.rst' , 'r' ).read (),
23+ '-----' , '-----' ,
24+ open ('NEWS.rst' , 'r' ).read ()]),
2125 url = 'https://github.com/elastic-coders/py-graphqlparser' ,
2226 packages = ['graphql_parser' ],
27+ install_requires = ['cython' ],
28+ package_data = {'graphql_parser' : ['*.pxd' , '*.pyx' ]},
29+ include_package_data = True ,
2330 ext_modules = extensions ,
2431 classifiers = [
2532 'Development Status :: 3 - Alpha' ,
You can’t perform that action at this time.
0 commit comments