Assuming the prerequisite tools and configuration described in the top-level
README, to build tket
with the required configuration (from the root directory
of the repo):
conan create tket --user=tket --channel=stable --build=missing -o "boost/*":header_only=True -o "tklog/*":shared=True -o "tket/*":shared=True -tf ""
Then build the pytket module:
cd pytket
pip install -e . -v
The Python tests require a few more packages. These can be installed with:
pip install -r tests/requirements.txt
And then to run the Python tests:
cd tests
pytest
To generate a test coverage report:
pytest --hypothesis-seed=1 --cov=../pytket --cov-branch --cov-report=html --cov-report=xml:htmlcov/cov.xml
Python type stubs are generated from the pybind11
modules using mypy's stubgen
. Changes to the
binding code under binders (or, in some cases, to tket
itself) may require stub regeneration.
See stub_generation/README.md for more information.
It is possible to build pytket without using conan at all: see here for instructions.