-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from elastic-coders/release_0.0.4
Release 0.0.4
- Loading branch information
Showing
16 changed files
with
119 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
version: 2 | ||
|
||
jobs: | ||
build: | ||
working_directory: ~/py-graphqlparser | ||
docker: | ||
- image: ubuntu:16.04 | ||
steps: | ||
- checkout | ||
- run: | ||
name: apt update | ||
command: apt-get -q update | ||
- run: | ||
name: apt required packages | ||
command: apt-get install -qy build-essential python python3 python3-pip python3-dev git cmake bison flex pkg-config | ||
- run: | ||
name: install cython | ||
command: pip3 install -q cython==0.27.3 | ||
- run: | ||
name: git submodules | ||
command: | | ||
mkdir -p -m 700 ~/.ssh | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
git submodule -q sync | ||
git submodule -q update -f --init | ||
- run: | ||
name: build libgraphqlparser | ||
command: | | ||
cd libgraphqlparser | ||
cmake . | ||
make | ||
- run: | ||
name: ast | ||
command: python2 ast/build_ast.py | ||
- run: | ||
name: build ext | ||
command: LDFLAGS="-L./libgraphqlparser" CFLAGS="-Ilibgraphqlparser/c -Ilibgraphqlparser" python3 setup.py build_ext | ||
- run: | ||
name: install package | ||
command: pip3 install -e . | ||
- run: | ||
name: install pytest | ||
command: pip3 install pytest | ||
- run: | ||
name: test | ||
command: python3 -m pytest | ||
environment: | ||
LD_LIBRARY_PATH: "./libgraphqlparser" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
**/.git/ | ||
**/__pycache__/ | ||
.circleci/ | ||
.pytest_cache/ | ||
.tox/ | ||
.wheelhouse/ | ||
**/CMakeCache.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ __pycache__ | |
/.cache | ||
/dist/ | ||
/*.egg-info | ||
.pytest_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM ubuntu:16.04 | ||
|
||
RUN apt-get update -qy | ||
RUN apt-get install -qy build-essential python python3 python3-pip python3-dev git cmake bison flex pkg-config | ||
RUN pip3 install cython | ||
|
||
RUN mkdir /tmp/build | ||
COPY libgraphqlparser /tmp/build/libgraphqlparser | ||
COPY ast /tmp/build/ast | ||
COPY examples /tmp/build/examples | ||
COPY graphql_parser /tmp/build/graphql_parser | ||
COPY setup.py *.rst /tmp/build/ | ||
|
||
|
||
RUN cd /tmp/build/libgraphqlparser && \ | ||
cmake . && \ | ||
make && \ | ||
cp libgraphqlparser.so /usr/local/lib | ||
RUN cd /tmp/build && \ | ||
python2 ast/build_ast.py && \ | ||
LDFLAGS="-L./libgraphqlparser" CFLAGS="-Ilibgraphqlparser/c -Ilibgraphqlparser" \ | ||
python3 setup.py build_ext && \ | ||
pip3 install . | ||
ENV LD_LIBRARY_PATH=/usr/local/lib | ||
|
||
ENTRYPOINT ["python3", "/tmp/build/examples/visitor_example.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,6 @@ GraphQLAstVisitor.pyx | |
*~ | ||
*.c | ||
.python-version | ||
*.so | ||
*.html | ||
.pytest_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule libgraphqlparser
updated
38 files
+5 −0 | .gitignore | |
+10 −4 | .travis.yml | |
+1 −1 | AstNode.h | |
+36 −5 | CMakeLists.txt | |
+26 −6 | GraphQLParser.cpp | |
+14 −0 | GraphQLParser.h | |
+77 −422 | JsonVisitor.cpp | |
+72 −85 | JsonVisitor.h | |
+20 −2 | README.md | |
+82 −4 | ast/ast.ast | |
+1 −1 | ast/cxx.py | |
+2 −2 | ast/cxx_impl.py | |
+43 −0 | ast/cxx_json_visitor_header.py | |
+81 −0 | ast/cxx_json_visitor_impl.py | |
+2 −2 | ast/license.py | |
+11 −0 | c/GraphQLParser.cpp | |
+8 −2 | c/GraphQLParser.h | |
+14 −0 | cmake/version.cmake | |
+3 −1 | dump_json_ast.cpp | |
+20 −9 | go/README.md | |
+6 −6 | go/gotest.go | |
+637 −435 | lexer.cpp | |
+72 −64 | lexer.h | |
+138 −60 | lexer.lpp | |
+11 −0 | libgraphqlparser.pc.in | |
+1,929 −523 | parser.tab.cpp | |
+97 −54 | parser.tab.hpp | |
+267 −51 | parser.ypp | |
+2 −0 | test/.gitignore | |
+4 −0 | test/BuildCAPI.c | |
+12 −2 | test/CMakeLists.txt | |
+31 −0 | test/JsonVisitorTests.cpp | |
+229 −21 | test/ParserTests.cpp | |
+57 −0 | test/kitchen-sink.graphql | |
+1 −0 | test/kitchen-sink.json | |
+78 −0 | test/schema-kitchen-sink.graphql | |
+1 −0 | test/schema-kitchen-sink.json | |
+33 −0 | test/valgrind.supp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
|
||
setup( | ||
name='graphqlparser', | ||
version='0.0.3', | ||
version='0.0.4', | ||
author='Marco Paolini', | ||
author_email='[email protected]', | ||
description='Python bindings for libgraphqlparser (Cython-based)', | ||
|