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 post-release versions, publish v1.15.0.post1 #5

Merged
merged 2 commits into from
May 9, 2024
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@ While this approach can still be problematic if other libraries loaded on the sy

UCX wheels in this repository are built by using a custom build command for setuptools to trigger the build of the UCX library.
The library is then bundled and installed directly into the output directories.

`{major}.{minor}.{patch}` versions of this library exactly correspond to versions of UCX.
For example, `libucx==1.16.0` contains libraries built from https://github.com/openucx/ucx/releases/tag/v1.16.0.

When the packaging logic itself changes, post-release versions like `libucx==1.16.0.post1` are released.
See "Post-releases" in the Python packaging docs ([link](https://packaging.python.org/en/latest/specifications/version-specifiers/#post-releases)) for details.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.16.0
1.15.0.post1
16 changes: 0 additions & 16 deletions python/libucx/libucx/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,6 @@
]

def load_library():
# First validate if libcuda.so and libnvidia-ml.so are present. These cannot be
# bundled, so we want to provide the user with a reasonable error if they are not
# available rather than a loader error on import.
try:
ctypes.CDLL("libcuda.so.1", ctypes.RTLD_GLOBAL)
except OSError:
raise RuntimeError("The CUDA driver library libcuda.so.1 was not found "
"on your system. This library cannot be provided by the libucx "
"wheel and must be installed separately.")

try:
ctypes.CDLL("libnvidia-ml.so.1", ctypes.RTLD_GLOBAL)
except OSError:
raise RuntimeError("The library libnvidia-ml.so.1 was not found on your "
"system. This library cannot be provided by the libucx wheel and "
"must be installed separately.")

# Dynamically load libucx.so. Prefer a system library if one is present to
# avoid clobbering symbols that other packages might expect, but if no
Expand Down
1 change: 1 addition & 0 deletions python/libucx/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"packaging",
"setuptools>=64.0.0",
"wheel",
]
Expand Down
9 changes: 7 additions & 2 deletions python/libucx/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
import tempfile
import glob
import packaging.version


@contextmanager
Expand All @@ -22,13 +23,17 @@ def run(self):
super().run()

with open("VERSION") as f:
version = f.read().strip()
package_version = f.read().strip()

# strip off any other non-UCX version components, like ".post1"
ucx_semver = packaging.version.parse(package_version).base_version
ucx_tag = f"v{ucx_semver}"

install_prefix = os.path.abspath(os.path.join(self.build_lib, "libucx"))

with tempfile.TemporaryDirectory() as tmpdir:
with chdir(tmpdir):
subprocess.run(["git", "clone", "-b", f"v{version}", "https://github.com/openucx/ucx.git", "ucx"])
subprocess.run(["git", "clone", "-b", f"{ucx_tag}", "https://github.com/openucx/ucx.git", "ucx"])
with chdir("ucx"):
subprocess.run(["./autogen.sh"])
subprocess.run(["./contrib/configure-release",
Expand Down