Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
54 changes: 54 additions & 0 deletions easybuild/easyconfigs/u/uv/uv-0.9.7.eb
Original file line number Diff line number Diff line change
@@ -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

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'},
]
source_urls = ['https://github.com/astral-sh/uv/releases/download/%(version)s']
checksums = [
'611d1e4d340c6b78519891d37d512c184f58b5424aebecdbd983585ff659ff16',
'9f50bcb34466d1f2a1d96011ebf4a87db7e559d7de6a3af48ab34a7fd1e35502',
'32ea5755edbdfd491f7d1860d6151237a25b26446c46da1f5e1713803a165817',
]

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'
10 changes: 10 additions & 0 deletions easybuild/easyconfigs/u/uv/uv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

UV_BIN=".exe"

# 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

32 changes: 32 additions & 0 deletions easybuild/easyconfigs/u/uv/uv.toml
Original file line number Diff line number Diff line change
@@ -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