From 103ded1cb9236dd6494db0f878b5fdb3ca4ae466 Mon Sep 17 00:00:00 2001 From: Georgios Kafanas Date: Wed, 6 Aug 2025 14:17:11 +0200 Subject: [PATCH 1/7] adding easyconfigs: petsc4py-3.22.5-foss-2023b.eb --- .../p/petsc4py/petsc4py-3.22.5-foss-2023b.eb | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb diff --git a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb new file mode 100644 index 000000000000..fe2193c0a8a1 --- /dev/null +++ b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb @@ -0,0 +1,33 @@ +easyblock = 'PythonPackage' + +name = 'petsc4py' +version = '3.22.5' + +homepage = 'https://gitlab.com/petsc/petsc' +description = "petsc4py are Python bindings for PETSc, the Portable, Extensible Toolchain for Scientific Computation." + +toolchain = {'name': 'foss', 'version': '2023b'} + +sources = [ + { + 'source_urls': ['https://web.cels.anl.gov/projects/petsc/download/release-snapshots'], + 'filename': 'petsc-%(version)s.tar.gz', + } +] +checksums = ['984dba48bd26e7b17d42c078fc4f74d59e9cbc437ee25a8635865eeca9f5dd28'] + +dependencies = [ + ('Python', '3.11.5'), + ('SciPy-bundle', '2023.11'), + ('PETSc', version), +] + +download_dep_fail = True +use_pip = True +sanity_pip_check = True + +install_src = 'src/binding/petsc4py' + +sanity_check_commands = ["mpirun -N 1 python -c 'from petsc4py import PETSc'"] + +moduleclass = 'tools' From 78c873594874b5ca3b7ab9c6fe7facf39b541afb Mon Sep 17 00:00:00 2001 From: Georgios Kafanas Date: Wed, 6 Aug 2025 14:35:09 +0200 Subject: [PATCH 2/7] [STYLE] Avoid declaring default options --- .../easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb index fe2193c0a8a1..8f3d4b20d98c 100644 --- a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb +++ b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb @@ -22,10 +22,6 @@ dependencies = [ ('PETSc', version), ] -download_dep_fail = True -use_pip = True -sanity_pip_check = True - install_src = 'src/binding/petsc4py' sanity_check_commands = ["mpirun -N 1 python -c 'from petsc4py import PETSc'"] From e993d4f7fd00d2d7b1d51119826fc8f9d0f97953 Mon Sep 17 00:00:00 2001 From: Georgios Kafanas Date: Wed, 6 Aug 2025 15:13:33 +0200 Subject: [PATCH 3/7] [STYLE] Comment on the need to build from PETSc source --- easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb index 8f3d4b20d98c..d8855d036c01 100644 --- a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb +++ b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb @@ -8,6 +8,7 @@ description = "petsc4py are Python bindings for PETSc, the Portable, Extensible toolchain = {'name': 'foss', 'version': '2023b'} +# There is no release of v3.22.5 in PyPI. Build from the PETSc source bidnings directory. sources = [ { 'source_urls': ['https://web.cels.anl.gov/projects/petsc/download/release-snapshots'], @@ -15,6 +16,7 @@ sources = [ } ] checksums = ['984dba48bd26e7b17d42c078fc4f74d59e9cbc437ee25a8635865eeca9f5dd28'] +install_src = 'src/binding/petsc4py' dependencies = [ ('Python', '3.11.5'), @@ -22,7 +24,6 @@ dependencies = [ ('PETSc', version), ] -install_src = 'src/binding/petsc4py' sanity_check_commands = ["mpirun -N 1 python -c 'from petsc4py import PETSc'"] From c98cb3d86fedb0e26bb2396e84f3c64133cfec3b Mon Sep 17 00:00:00 2001 From: Georgios Kafanas Date: Wed, 6 Aug 2025 18:17:24 +0200 Subject: [PATCH 4/7] Fix comment typo Co-authored-by: Alexander Grund --- easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb index d8855d036c01..e45ceed80597 100644 --- a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb +++ b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb @@ -8,7 +8,7 @@ description = "petsc4py are Python bindings for PETSc, the Portable, Extensible toolchain = {'name': 'foss', 'version': '2023b'} -# There is no release of v3.22.5 in PyPI. Build from the PETSc source bidnings directory. +# There is no release of v3.22.5 in PyPI. Build from the PETSc source bindings directory. sources = [ { 'source_urls': ['https://web.cels.anl.gov/projects/petsc/download/release-snapshots'], From 252b303c549915ee2516ecf7d6f07f55dc3b9fc9 Mon Sep 17 00:00:00 2001 From: Georgios Kafanas Date: Wed, 6 Aug 2025 18:18:53 +0200 Subject: [PATCH 5/7] [STYLE] Use more succinct source definitions Co-authored-by: Alexander Grund --- .../easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb index e45ceed80597..b0b60e11b01e 100644 --- a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb +++ b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb @@ -9,12 +9,8 @@ description = "petsc4py are Python bindings for PETSc, the Portable, Extensible toolchain = {'name': 'foss', 'version': '2023b'} # There is no release of v3.22.5 in PyPI. Build from the PETSc source bindings directory. -sources = [ - { - 'source_urls': ['https://web.cels.anl.gov/projects/petsc/download/release-snapshots'], - 'filename': 'petsc-%(version)s.tar.gz', - } -] +source_urls = ['https://web.cels.anl.gov/projects/petsc/download/release-snapshots'] +sources = ['petsc-%(version)s.tar.gz'] checksums = ['984dba48bd26e7b17d42c078fc4f74d59e9cbc437ee25a8635865eeca9f5dd28'] install_src = 'src/binding/petsc4py' From 5d8453685f2e0a4732ace65f17b081a0a8b66cb4 Mon Sep 17 00:00:00 2001 From: Georgios Kafanas Date: Wed, 6 Aug 2025 20:55:34 +0200 Subject: [PATCH 6/7] [REFACTOR] Install from sources that were made available in PyPI --- .../easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb index b0b60e11b01e..c95d5daaa329 100644 --- a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb +++ b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb @@ -8,11 +8,9 @@ description = "petsc4py are Python bindings for PETSc, the Portable, Extensible toolchain = {'name': 'foss', 'version': '2023b'} -# There is no release of v3.22.5 in PyPI. Build from the PETSc source bindings directory. -source_urls = ['https://web.cels.anl.gov/projects/petsc/download/release-snapshots'] -sources = ['petsc-%(version)s.tar.gz'] -checksums = ['984dba48bd26e7b17d42c078fc4f74d59e9cbc437ee25a8635865eeca9f5dd28'] -install_src = 'src/binding/petsc4py' +source_urls = ['https://pypi.python.org/packages/source/p/petsc4py'] +sources = ['%(name)s-%(version)s.tar.gz'] +checksums = ['058478cdba163e162d17ad14a8f71d519049a7c84807cd33a14c7f852988ec2e'] dependencies = [ ('Python', '3.11.5'), @@ -20,7 +18,6 @@ dependencies = [ ('PETSc', version), ] - sanity_check_commands = ["mpirun -N 1 python -c 'from petsc4py import PETSc'"] moduleclass = 'tools' From 7a3886d346fc49552b10c9018f27eb30d8b2f35e Mon Sep 17 00:00:00 2001 From: Georgios Kafanas Date: Thu, 7 Aug 2025 11:36:17 +0200 Subject: [PATCH 7/7] [STYLE] Use default source for pip and EB source template constant Co-authored-by: Alexander Grund --- easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb index c95d5daaa329..2d4544ae03f2 100644 --- a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb +++ b/easybuild/easyconfigs/p/petsc4py/petsc4py-3.22.5-foss-2023b.eb @@ -8,8 +8,7 @@ description = "petsc4py are Python bindings for PETSc, the Portable, Extensible toolchain = {'name': 'foss', 'version': '2023b'} -source_urls = ['https://pypi.python.org/packages/source/p/petsc4py'] -sources = ['%(name)s-%(version)s.tar.gz'] +sources = [SOURCE_TAR_GZ] checksums = ['058478cdba163e162d17ad14a8f71d519049a7c84807cd33a14c7f852988ec2e'] dependencies = [