INNER CODE UNIT · Python
_install_liboqs
open-quantum-safe/liboqs-python · oqs/oqs.py:172
def _install_liboqs(
target_directory: Path,
oqs_version_to_install: Union[str, None] = None,
) -> None:
"""Install liboqs version oqs_version (if None, installs latest at HEAD) in the target_directory.""" # noqa: E501
# Set explicit to `None` to install the lastest `liboqs` code.
if oqs_version_to_install is None:
pass
elif "dev" in oqs_version_to_install:
# Pre-release dev versions of liboqs-python (e.g. 0.16.0.dev0,
# 0.16.0-dev) track liboqs main, since no matching tag exists.
oqs_version_to_install = None
elif "rc" in oqs_version_to_install:
# removed the "-" from the version string
tmp = oqs_version_to_install.split("rc")
oqs_version_to_install = tmp[0] + "-rc" + tmp[1]