diff --git a/easybuild/easyconfigs/u/uv/uv-0.9.7.eb b/easybuild/easyconfigs/u/uv/uv-0.9.7.eb new file mode 100644 index 00000000000..45c87924d87 --- /dev/null +++ b/easybuild/easyconfigs/u/uv/uv-0.9.7.eb @@ -0,0 +1,54 @@ +easyblock = 'Binary' + +name = 'uv' +version = '0.9.7' + +homepage = 'https://github.com/astral-sh/uv' +description = """An extremely fast Python package installer and resolver, written in Rust.""" + +toolchain = SYSTEM + +source_urls = ['https://github.com/astral-sh/uv/releases/download/%(version)s'] +sources = [ + '%(name)s-x86_64-unknown-linux-musl.tar.gz', + {'filename': '%(name)s.toml', 'extract_cmd': 'cp -v %s uv.toml'}, + {'filename': '%(name)s.sh', 'extract_cmd': 'cp -v %s uv.sh'}, +] +checksums = [ + {'uv-x86_64-unknown-linux-musl.tar.gz': '611d1e4d340c6b78519891d37d512c184f58b5424aebecdbd983585ff659ff16'}, + {'uv.toml': '9f50bcb34466d1f2a1d96011ebf4a87db7e559d7de6a3af48ab34a7fd1e35502'}, + {'uv.sh': '886d76cfdd2816194dbaaf766ca767d7397e1684eaa15ae87cac063101fa552a'}, +] + +extract_sources = True +install_cmd = " && ".join([ + "cp -v %(builddir)s/%(name)s.sh %(installdir)s/uv", + "cp -v %(builddir)s/%(name)s.toml %(installdir)s", + "cp -v %(builddir)s/%(name)s-x86_64-unknown-linux-musl/%(name)s %(installdir)s/.exe", +]) + +postinstallcmds = [ + 'setrpaths.sh --path %(installdir)s --any_interpreter', + 'chmod +x %(installdir)s/uv', +] + +sanity_check_paths = { + 'files': ['uv', 'uv.toml'], + 'dirs': [], +} + +sanity_check_commands = [ + 'uv --version', +] + +modextrapaths = { + 'PATH': '', + 'UV_CONFIG_FILE': '%(installdir)s/uv.toml', +} + +modluafooter = """ +if convertToCanonical(LmodVersion()) >= convertToCanonical("8.2.9") then + depends_on("python") +end +""" +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/u/uv/uv.sh b/easybuild/easyconfigs/u/uv/uv.sh new file mode 100644 index 00000000000..bbca4697d94 --- /dev/null +++ b/easybuild/easyconfigs/u/uv/uv.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +UV_BIN=".exe" + +# Check if --no-config is present +if [[ " $* " == *" --no-config "* ]]; then + echo "Warning: '--no-config' was provided but will be ignored." +fi + +# Take all arguments, remove --no-config, collapse spaces, trim edges +FILTERED_ARGS=$(echo "$@" | sed -e 's/--no-config//') + +# Call uv with the cleaned arguments +exec "$UV_BIN" $FILTERED_ARGS diff --git a/easybuild/easyconfigs/u/uv/uv.toml b/easybuild/easyconfigs/u/uv/uv.toml new file mode 100644 index 00000000000..5bc9bef16ea --- /dev/null +++ b/easybuild/easyconfigs/u/uv/uv.toml @@ -0,0 +1,32 @@ +python-downloads = "never" +python-preference = "only-system" + +no-cache = true +concurrent-builds = 1 + +index-strategy = "unsafe-first-match" + +[pip] +only-binary = ['numpy','scipy','mpi5py','pandas','h5py','Cython','grpcio'] + + +[[index]] +name = "gentoo2023-x86-64-v3" +url = "/cvmfs/soft.computecanada.ca/custom/python/wheelhouse/gentoo2023/x86-64-v3" +format = "flat" + +[[index]] +name = "gentoo2023-generic" +url = "/cvmfs/soft.computecanada.ca/custom/python/wheelhouse/gentoo2023/generic" +format = "flat" + +[[index]] +name = "generic" +url = "/cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic" +format = "flat" + +[[index]] +name = "PyPI" +url = "https://pypi.org/simple" +default = true +