Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new PEP 600 tagging for Python wheels #150

Merged
merged 3 commits into from
Jan 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
os: [ubuntu-22.04, macos-12]
os: [ubuntu-22.04, ubuntu-20.04, macos-12]
steps:
- uses: actions/checkout@v3
- name: Set up Python
Expand Down
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Version 1.0.3

Bugfix:

- The Python builds were using the older `manylinux2014` tagging convention which was causing issues on systems that expected a specific glibc version (Ubuntu 20.04 uses [2.31](https://launchpad.net/ubuntu/+source/glibc)). We now use the latest `manylinux_x_y` tagging convention to accomodate different glibc versions across linux when building wheels. This means we must support `python 3.8.10+, 3.9.5+, 3.10.0+` and `pip >= 20.3` in accordance with [PEP 600](https://github.com/pypa/manylinux)

# Version 1.0.2

Feat:
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openmined/psi.js",
"version": "1.0.2",
"version": "1.0.3",
"description": "Private Set Intersection for JavaScript",
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions private_set_intersection/python/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ py_wheel(
"@bazel_tools//src/conditions:windows_arm64": "win_arm64",
"@bazel_tools//src/conditions:darwin_x86_64": "macosx_12_0_x86_64",
"@bazel_tools//src/conditions:darwin_arm64": "macosx_12_0_arm64",
"@bazel_tools//src/conditions:linux_x86_64": "manylinux2014_x86_64",
"@bazel_tools//src/conditions:linux_aarch64": "manylinux2014_aarch64",
"@bazel_tools//src/conditions:linux_x86_64": "manylinux_GLIBC_x86_64",
"@bazel_tools//src/conditions:linux_aarch64": "manylinux_GLIBC_aarch64",
}),
python_requires = ">=3.8",
python_requires = ">=3.8.10", # Required for linux's wheel naming convention
python_tag = "INTERPRETER",
requires = ["protobuf>=3.20"],
version = VERSION_LABEL,
Expand Down
9 changes: 8 additions & 1 deletion private_set_intersection/python/rename.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is used to rename the wheel generated via py_wheel with values
# determined at runtime
import sys, os, re
import sys, os, re, platform
from packaging import tags


Expand All @@ -21,6 +21,13 @@ def main():
# INTERPRETER and ABI should be the same value
outfile = re.sub(r"INTERPRETER", abi_tag, inputfile)
outfile = re.sub(r"ABI", abi_tag, outfile)
system = platform.system()

# Rename the wheel depending on the version of glibc
if system.lower() == "linux":
version = platform.libc_ver()[1]
glibc_version = version.replace(".", "_")
outfile = re.sub(r"GLIBC", glibc_version, outfile)

print("renaming ", inputfile, outfile)
os.rename(inputfile, outfile)
Expand Down
2 changes: 1 addition & 1 deletion tools/package.bzl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
""" Version of the current release """
VERSION_LABEL = "1.0.2"
VERSION_LABEL = "1.0.3"