diff --git a/README.md b/README.md index 170ca32..1c356ad 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/VERSION b/VERSION index 15b989e..bf0805c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.16.0 +1.15.0.post1 diff --git a/python/libucx/libucx/load.py b/python/libucx/libucx/load.py index 72fe564..7264544 100644 --- a/python/libucx/libucx/load.py +++ b/python/libucx/libucx/load.py @@ -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 diff --git a/python/libucx/pyproject.toml b/python/libucx/pyproject.toml index ad1f81c..c416168 100644 --- a/python/libucx/pyproject.toml +++ b/python/libucx/pyproject.toml @@ -1,6 +1,7 @@ [build-system] build-backend = "setuptools.build_meta" requires = [ + "packaging", "setuptools>=64.0.0", "wheel", ] diff --git a/python/libucx/setup.py b/python/libucx/setup.py index 5b15831..f59a566 100644 --- a/python/libucx/setup.py +++ b/python/libucx/setup.py @@ -5,6 +5,7 @@ import os import tempfile import glob +import packaging.version @contextmanager @@ -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",