Installation#
- Python Versions: py_gql supports CPython 3.5 and newer. We aim to support all currently supported python versions.
- Platforms: Unix/Posix, MacOS X.
- Dependencies: py_gql has no direct dependency.
Installing from PyPI#
The source distribution and wheel are available on PyPI.
To install, run:
$ pip install py-gql
Cython#
Warning
This is experimental and might be removed in the future. It may also present some rough edges.
The default pip install should install the universal wheel, however for some
extra performance in production py-gql’s setup.py
can detect the presence
of Cython and compile (i.e. cythonize) the code in pure
python mode for significant performance improvements. This requires a C compiler
to be available on the system.
To benefit from this, run:
$ pip install cython
$ PY_GQL_USE_CYTHON=1 pip install --no-binary :all: py-gql
Notes
- The code is not written or optimized for Cython i.e. we use the pure python compilation mode.
- Setting the
CYTHON_TRACE
environment variable will instruct Cython to compile with line trace information useful for profiling and debugging. See this document for more details. - You need Xcode Command Line Tools installed on MaxOS X for this to work.
- Pre-built, platform specific wheels are not available at the moment although it is under consideration.
Installing from source#
py-gql’s source code is hosted on Github.
You can install the development version from source after cloning locally:
$ git clone git@github.com:lirsacc/py-gql.git py_gql
$ cd py-gql
$ pip install -e .
Or you can directly install through pip VCS support:
$ pip install git+ssh://git@github.com/lirsacc/py-gql.git@master
To use Cython mode:
When installing from source:
$ pip install cython
$ PY_GQL_USE_CYTHON=1 pip install --no-build-isolation -e .