Skip to content

Install setuptools before t-encrypt version resolution#304

Merged
PropzSaladaz merged 2 commits into
developfrom
302-openssl-3-for-python-builds
Jul 16, 2026
Merged

Install setuptools before t-encrypt version resolution#304
PropzSaladaz merged 2 commits into
developfrom
302-openssl-3-for-python-builds

Conversation

@oleksandrSydorenkoJ

Copy link
Copy Markdown
Contributor

What:

Fix the t-encrypt Python wheel build so the bundled native libencrypt.so is built against OpenSSL 3 and validated before publish.

Why:

The previously published wheel could depend on libcrypto.so.1.1, which is not available in some Ubuntu environments and causes import t_encrypt to fail at runtime.

The wheel also bundles a native Linux .so, so it must be platform-tagged and must not be published as py3-none-any.

How:

  • Added OPENSSL_GIT_REF support in deps/build.sh, while keeping the default OpenSSL version unchanged.
  • Set OPENSSL_GIT_REF=openssl-3.0.15 only for the Python t-encrypt wheel build.
  • Replaced the OpenSSL checkout with a direct quoted git checkout --detach "$OPENSSL_GIT_REF" instead of eval.
  • Marked the t-encrypt distribution as binary so wheels containing libencrypt.so are platform-specific.
  • Added wheel validation gates for:
    • rejecting py3-none-any;
    • running auditwheel show;
    • checking that t_encrypt/libencrypt.so is bundled;
    • ensuring the bundled library does not depend on libssl.so.1.1 or libcrypto.so.1.1.
  • Updated CI to build one t-encrypt wheel artifact and validate that same artifact on Ubuntu 22.04 and Ubuntu 24.04.
  • Installed setuptools before reading the package version because Python 3.13 runners do not guarantee it is available by default.

Checklist:

  • Documentation N/A
  • Tests
  • Ready to be merged

Copilot AI review requested due to automatic review settings July 16, 2026 17:30
@oleksandrSydorenkoJ oleksandrSydorenkoJ linked an issue Jul 16, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the publish workflow to ensure Python packaging tooling is available before resolving the t-encrypt package version, preventing failures on newer runners (e.g., Python 3.13 where setuptools may not be preinstalled).

Changes:

  • Install/upgrade pip and setuptools before running the version-resolution step in the publish workflow.
Comments suppressed due to low confidence (1)

.github/workflows/publish.yml:140

  • This step mixes python3 and python invocations in the same workflow. On GitHub-hosted runners this is usually the same interpreter, but it’s not guaranteed; using a single interpreter (python) ensures the pip install (setuptools) and the version resolution run against the exact same Python configured by actions/setup-python.
      run: |
        lib_path="${PWD}/build_t_encrypt_python/threshold_encryption/libt_encrypt_python.so"
        echo "T_ENCRYPT_LIB_PATH=${lib_path}" >> "$GITHUB_ENV"
        python3 -m pip install --upgrade pip setuptools

        # Calculate Python package version
        cd python
        BASE_VERSION=$(python3 setup_t_encrypt.py --version)

@PropzSaladaz
PropzSaladaz merged commit 0c17ec6 into develop Jul 16, 2026
9 checks passed
@PropzSaladaz
PropzSaladaz deleted the 302-openssl-3-for-python-builds branch July 16, 2026 18:05
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenSSL 3 for Python Builds

3 participants