File tree 5 files changed +50
-9
lines changed
5 files changed +50
-9
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,4 @@ __pycache__
8
8
/.tox
9
9
/.cache
10
10
/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
+ =========================================
2
3
3
4
Python2.7+ Python3.4+ class-based bindings to libgraphqlparser
4
5
@@ -7,7 +8,25 @@ See usage example in `examples/visitor_example.py`
7
8
Still **EXPERIMENTAL **
8
9
9
10
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
11
30
12
31
- download submodules with `git checkout --recursive `
13
32
- build libgraphql library in folder `./libgraphql ` (python2.7 required for building)
@@ -23,20 +42,23 @@ To package with wheel:
23
42
- build with `pip wheel --wheel-dir=.wheelhouse . `
24
43
25
44
26
- ## Run
45
+ Run
46
+ ---
27
47
28
48
Make sure `libgraphql ` is available to the loader in your `LD_LIBRARY_PATH `
29
49
30
50
31
- ## Known issues
51
+ Known issues
52
+ ------------
32
53
33
54
- Only (lightly) tested on python3
34
55
- Unicode string handling not yet complete (a mixture of bytes and strings all over)
35
56
- Exceptions in the visitor's class callbacks are ignored
36
57
- libgraphqlparser is **dynamically ** linked but It would be better if it was linked statically
37
58
38
59
39
- ## TODO
60
+ TODO
61
+ ----
40
62
41
- - build and upload wheels to pypi
63
+ - make wheels available on github
42
64
- 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
+
1
3
from setuptools import setup , Extension
2
4
3
5
from Cython .Build import cythonize
13
15
14
16
setup (
15
17
name = 'graphqlparser' ,
16
- version = '0.0.2 ' ,
18
+ version = '0.0.3 ' ,
17
19
author = 'Marco Paolini' ,
18
20
19
21
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 ()]),
21
25
url = 'https://github.com/elastic-coders/py-graphqlparser' ,
22
26
packages = ['graphql_parser' ],
27
+ install_requires = ['cython' ],
28
+ package_data = {'graphql_parser' : ['*.pxd' , '*.pyx' ]},
29
+ include_package_data = True ,
23
30
ext_modules = extensions ,
24
31
classifiers = [
25
32
'Development Status :: 3 - Alpha' ,
You can’t perform that action at this time.
0 commit comments