This section covers the basics of how to download and install PyCTest.
PyCTest is tested, built, and distributed for python 2.7, 3.6, and 3.7 on Linux/macOS through conda-forge.
Windows support is possible but Anaconda compiler issues within conda-forge with respect to
are currently causing issues.
First, you must have Conda installed, then open a terminal or a command prompt window and run:
$ conda install -c conda-forge pyctest
This will install PyCTest and all the dependencies from the conda-forge channel.
Sometimes an adventurous user may want to get the source code, which is always more up-to-date than the one provided by Conda (with more bugs of course!).
For this you need to get the source from the PyCTest repository on GitHub. Download the source to your local computer using git by opening a terminal and running:
$ git clone https://github.com/jrmadsen/pyctest.git
in the folder where you want the source code. This will create a folder called pyctest which contains a copy of the source code.
Source installation is also available through PyPi:
$ pip install -vvv pyctest
You will need a C compiler, C++ compiler, CMake, Git, OpenSSL, and Curl
on your system. Generally, these packages already exist on your system. The C++
compiler requires support for C++11, in particular it needs to support lambdas and
After navigating to inside the pyctest directory, you can install PyCTest by building/compiling the shared libraries and either of the following standard Python installation commands:
$ pip install -vvv . $ python setup.py install
In general, the base module is not utilized directly. The following import scheme is generally simplest:
import pyctest as _pyctest import pyctest.pyctest as pyctest import pyctest.pycmake as pycmake import pyctest.helpers as helpers from pyctest.cmake import CMake from pyctest.ctest import CTest from pyctest.cpack import CPack print(_pyctest.version) CMake('--version') CTest('--version') CPack('--version')