Skip to content

Add PYOQS_VERSION env var to override auto-installed liboqs version#140

Merged
dstebila merged 1 commit into
mainfrom
version-env-var
May 14, 2026
Merged

Add PYOQS_VERSION env var to override auto-installed liboqs version#140
dstebila merged 1 commit into
mainfrom
version-env-var

Conversation

@dstebila
Copy link
Copy Markdown
Member

By default liboqs-python auto-installs the liboqs release matching its own version. Setting PYOQS_VERSION overrides that target:

PYOQS_VERSION=0.15.0 # install a specific liboqs release
PYOQS_VERSION=latest # install liboqs from main (HEAD)

The override applies only at the install site (OQS_VERSION). The oqs_python_version() helper is unchanged, so the liboqs vs. liboqs-python version-mismatch warning continues to report the actually-installed package version rather than the override.

Closes #132, #133.

By default liboqs-python auto-installs the liboqs release matching its
own version. Setting PYOQS_VERSION overrides that target:

  PYOQS_VERSION=0.15.0   # install a specific liboqs release
  PYOQS_VERSION=latest   # install liboqs from main (HEAD)

The override applies only at the install site (OQS_VERSION). The
oqs_python_version() helper is unchanged, so the liboqs vs.
liboqs-python version-mismatch warning continues to report the
actually-installed package version rather than the override.

Closes #132, #133.

Co-authored-by: Guiliano99 <guilianolehmann@live.de>

Signed-off-by: Douglas Stebila <dstebila@uwaterloo.ca>
@dstebila
Copy link
Copy Markdown
Member Author

@Guiliano99 I'm preparing the repository for a new release, to match the forthcoming liboqs 0.16.0. I extracted the PYOQS_VERSION code from your PR #132 into a separate PR.

@Guiliano99
Copy link
Copy Markdown
Contributor

@dstebila Hi, thanks — and thanks for fixing #136. I do not have access to a Windows machine, so I did not catch that issue.

Regarding the STFL caching: I added keyutils-py to make key interactions easier, especially for PKIX-related environments.

Would it make sense to open a separate PR where the XMSS/XMSS^MT keys are loaded through that package instead of being cached directly? The package still relies on the liboqs code for these keys, so it would mainly simplify the setup in the pipeline.

@dstebila
Copy link
Copy Markdown
Member Author

Regarding the STFL caching: I added keyutils-py to make key interactions easier, especially for PKIX-related environments.

Would it make sense to open a separate PR where the XMSS/XMSS^MT keys are loaded through that package instead of being cached directly? The package still relies on the liboqs code for these keys, so it would mainly simplify the setup in the pipeline.

I wouldn't want to add a new dependency to liboqs-python in general. Would this be only for testing? And perhaps we should move the discussion over to #130.

@dstebila dstebila merged commit 87d689c into main May 14, 2026
8 checks passed
@dstebila dstebila deleted the version-env-var branch May 14, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants