From 29b82676a5df7fc316a5b5c080ed1916be0ebc86 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 8 Jan 2025 14:11:55 +0800 Subject: [PATCH] add cryolo 1.9.9 --- .../c/cryolo/cryolo-1.9.9-foss-2022a.eb | 39 +++++++++++++++++++ .../fix_cryolo_gui_no_attribute_version.patch | 14 +++++++ .../c/cryolo/requirements-1.9.9.txt | 37 ++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 easybuild/easyconfigs/c/cryolo/cryolo-1.9.9-foss-2022a.eb create mode 100644 easybuild/easyconfigs/c/cryolo/fix_cryolo_gui_no_attribute_version.patch create mode 100644 easybuild/easyconfigs/c/cryolo/requirements-1.9.9.txt diff --git a/easybuild/easyconfigs/c/cryolo/cryolo-1.9.9-foss-2022a.eb b/easybuild/easyconfigs/c/cryolo/cryolo-1.9.9-foss-2022a.eb new file mode 100644 index 00000000000..8583d5bb5f4 --- /dev/null +++ b/easybuild/easyconfigs/c/cryolo/cryolo-1.9.9-foss-2022a.eb @@ -0,0 +1,39 @@ +easyblock = 'PythonPackage' + +name = 'cryolo' +version = '1.9.9' + +homepage = 'https://cryolo.readthedocs.io/' + +description = """an application for fast and accurate cryo-EM particle picking. +It’s based on convolutional neural networks and utilizes the popular You Only Look Once (YOLO) object detection system.""" + +toolchain = {'name': 'foss', 'version': '2022a'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '3.8.10'), + ('LibTIFF', '4.3.0'), + ('GTK3', '3.24.33'), +] + +multi_deps_load_default = False +installopts = '--no-index' +sources = ['requirements-%(version)s.txt'] +patches = ['fix_cryolo_gui_no_attribute_version.patch'] +checksums = [ + 'c1d6b4161875fbe7553578c5d1eebc58db8a5977c9db488c0ef9e6fbc3b75f6a', + 'f3bc9feb225293d2608c40c9a33c8d1177c1243f610acb18f16ad1bc4e500382' +] + + +unpack_sources = False +use_pip = True +use_pip_for_deps = True +use_pip_requirement = True +fix_python_shebang_for = ['bin/*'] +sanity_pip_check = True + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/c/cryolo/fix_cryolo_gui_no_attribute_version.patch b/easybuild/easyconfigs/c/cryolo/fix_cryolo_gui_no_attribute_version.patch new file mode 100644 index 00000000000..95fff6d7acf --- /dev/null +++ b/easybuild/easyconfigs/c/cryolo/fix_cryolo_gui_no_attribute_version.patch @@ -0,0 +1,14 @@ +# fix AttributeError: module 'cryolo.__init__' has no attribute '__version__' +# Author: Eric Wong + +--- lib/python3.8/site-packages/cryolo/cryolo_main.py.old 2025-01-07 14:25:10.536352020 +0800 ++++ lib/python3.8/site-packages/cryolo/cryolo_main.py 2025-01-07 14:28:18.826209903 +0800 +@@ -461,7 +461,7 @@ + + Gooey( + main, +- program_name="crYOLO " + ini.__version__, ++ program_name="crYOLO " + getattr(ini, '__version__', getattr(ini, 'version', '1.9.9')), + image_dir=os.path.join(os.path.abspath(os.path.dirname(__file__)), "../icons"), + progress_regex=r"^.* \( Progress:\s+(-?\d+) % \)$", + disable_progress_bar_animation=True, diff --git a/easybuild/easyconfigs/c/cryolo/requirements-1.9.9.txt b/easybuild/easyconfigs/c/cryolo/requirements-1.9.9.txt new file mode 100644 index 00000000000..6a0b4fe81b8 --- /dev/null +++ b/easybuild/easyconfigs/c/cryolo/requirements-1.9.9.txt @@ -0,0 +1,37 @@ +--index-url https://mirrors.aliyun.com/pypi/simple/ +--extra-index-url https://pypi.ngc.nvidia.com +setuptools<66 +pip +Brotli==1.1.0 +certifi==2024.8.30 +cffi==1.17.0 +charset-normalizer==3.4.0 +h2==4.1.0 +hpack==4.0.0 +hyperframe==6.0.1 +idna==3.10 +numpy==1.18.5 +scikit-image==0.19.3 +scikit-learn==0.23.2 +scipy==1.9.3 +tifffile==2020.9.3 +imageio==2.15.0 +packaging==24.2 +pathlib2==2.3.7.post1 +Pillow==9.4.0 +ply==3.11 +pycparser==2.22 +Pypubsub==4.0.3 +PyQt5==5.15.7 +PyQt5-sip==12.11.0 +PySocks==1.7.1 +requests==2.32.3 +sip==6.7.12 +six==1.16.0 +toml==0.10.2 +tomli==2.0.2 +urllib3==2.2.3 +wheel==0.45.1 +wxPython==4.1.1 +zstandard==0.23.0 +cryolo[c11]==1.9.9