diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-04 05:48:38 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-04 05:48:38 -0500 |
| commit | bfd9c39e4712ebdb442d4ca0673061faed1e70e1 (patch) | |
| tree | 0d7a74b4463ee387f9cf9368ceb1b757f694f72a /dev-python/mpi4py | |
| parent | f716a9fe6455d39eef01e718aae68dae61c19704 (diff) | |
| download | baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.gz baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.xz baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.zip | |
Revert "Adding metadata"
This reverts commit f716a9fe6455d39eef01e718aae68dae61c19704.
Diffstat (limited to 'dev-python/mpi4py')
| -rw-r--r-- | dev-python/mpi4py/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/mpi4py/files/mpi4py-4-mpich-no-fortran-fix.patch | 20 | ||||
| -rw-r--r-- | dev-python/mpi4py/files/mpi4py-4-use-mesonpy.patch | 11 | ||||
| -rw-r--r-- | dev-python/mpi4py/metadata.xml | 28 | ||||
| -rw-r--r-- | dev-python/mpi4py/mpi4py-4.0.1.ebuild | 80 |
5 files changed, 140 insertions, 0 deletions
diff --git a/dev-python/mpi4py/Manifest b/dev-python/mpi4py/Manifest new file mode 100644 index 000000000000..de66a3a0886f --- /dev/null +++ b/dev-python/mpi4py/Manifest @@ -0,0 +1 @@ +DIST mpi4py-4.0.1.tar.gz 466179 BLAKE2B 4e678f08c257a32922914448c82d13c0a1e29aa1e39a1f669d8c2d766a1ecbd8bdf2bf3b12dae8eca9bf3846c096d0ecb0bbdb9147b3048acfe48e067d72161f SHA512 7721ef4f0859e90ca91d6911c3e5a897249f57c8b575065cdb1d537602ce0b30909f144b292c7d74013361cdf9e464cb0c16e408f37fd6c8c1554cbbe9785c05 diff --git a/dev-python/mpi4py/files/mpi4py-4-mpich-no-fortran-fix.patch b/dev-python/mpi4py/files/mpi4py-4-mpich-no-fortran-fix.patch new file mode 100644 index 000000000000..82415dae491d --- /dev/null +++ b/dev-python/mpi4py/files/mpi4py-4-mpich-no-fortran-fix.patch @@ -0,0 +1,20 @@ +diff --git a/src/lib-mpi/compat/mpich.h b/src/lib-mpi/compat/mpich.h +index 2cd50c1..3ea9510 100644 +--- a/src/lib-mpi/compat/mpich.h ++++ b/src/lib-mpi/compat/mpich.h +@@ -123,7 +123,6 @@ static int PyMPI_MPICH_MPI_Reduce_c(const void *sendbuf, void *recvbuf, + + /* -------------------------------------------------------------------------- */ + +-#if defined(CIBUILDWHEEL) + + #define PyMPI_MPICH_CALL_WEAK_SYMBOL(function, ...) \ + if (function) return function(__VA_ARGS__); \ +@@ -159,7 +158,6 @@ static int PyMPI_MPICH_MPI_Status_f2c(const MPI_Fint *fs, MPI_Status *cs) + { PyMPI_MPICH_CALL_WEAK_SYMBOL(MPI_Status_f2c, fs, cs); } + #define MPI_Status_f2c PyMPI_MPICH_MPI_Status_f2c + +-#endif + + /* -------------------------------------------------------------------------- */ + diff --git a/dev-python/mpi4py/files/mpi4py-4-use-mesonpy.patch b/dev-python/mpi4py/files/mpi4py-4-use-mesonpy.patch new file mode 100644 index 000000000000..f8ba9bd474f5 --- /dev/null +++ b/dev-python/mpi4py/files/mpi4py-4-use-mesonpy.patch @@ -0,0 +1,11 @@ +diff --git a/pyproject.toml b/pyproject.toml +index 8585f6d..5b0b2d8 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,4 +1,3 @@ + [build-system] +-requires = ["setuptools >= 42", "build"] +-build-backend = "builder" +-backend-path = ["conf"] ++requires = ["meson-python", "Cython"] ++build-backend = "mesonpy" diff --git a/dev-python/mpi4py/metadata.xml b/dev-python/mpi4py/metadata.xml new file mode 100644 index 000000000000..11c562b3c581 --- /dev/null +++ b/dev-python/mpi4py/metadata.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>alex.fan.q@gmail.com</email> + <name>Alex Fan</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + MPI for Python (mpi4py) provides bindings of the Message Passing + Interface (MPI) standard for the Python programming language, + allowing any Python program to exploit multiple processors. + This package is constructed on top of the MPI-1/MPI-2 specification + and provides an object oriented interface which closely follows + MPI-2 C++ bindings. It supports point-to-point (sends, receives) and + collective (broadcasts, scatters, gathers) communications of any + picklable Python object as well as optimized communications of + Python object exposing the single-segment buffer interface (NumPy + arrays, builtin bytes/string/array objects). + </longdescription> + <upstream> + <remote-id type="github">mpi4py/mpi4py</remote-id> + <remote-id type="pypi">mpi4py</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/mpi4py/mpi4py-4.0.1.ebuild b/dev-python/mpi4py/mpi4py-4.0.1.ebuild new file mode 100644 index 000000000000..fd474ebb5b16 --- /dev/null +++ b/dev-python/mpi4py/mpi4py-4.0.1.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=meson-python +inherit distutils-r1 pypi + +DESCRIPTION="Message Passing Interface for Python" +HOMEPAGE=" + https://github.com/mpi4py/mpi4py + https://pypi.org/project/mpi4py/ +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" +IUSE="doc examples" + +RDEPEND=" + dev-python/numpy[${PYTHON_USEDEP}] + virtual/mpi +" +DEPEND="${RDEPEND}" + +BDEPEND=" + dev-python/cython[${PYTHON_USEDEP}] + >=dev-build/meson-1.0.0 + virtual/mpi +" + +PATCHES=( + "${FILESDIR}/${PN}-4-use-mesonpy.patch" + "${FILESDIR}/${PN}-4-mpich-no-fortran-fix.patch" +) + +python_prepare_all() { + # not needed on install + rm -vr docs/source || die + rm test/test_pickle.py || die # disabled by Gentoo-bug #659348 + distutils-r1_python_prepare_all +} + +python_compile() { + export CC=mpicc + distutils-r1_python_compile +} + +python_test() { + echo "Beginning test phase" + local -x PYTHONPATH="${BUILD_DIR}/install$(python_get_sitedir)" + + # python want's all arguments as separate strings + local mpi_opts=( + "-n" "1" + ) + if has_version sys-cluster/openmpi; then + local mpi_opts+=( + "--use-hwthread-cpus" + # allow test in systemd-nspawn container + "--mca" "btl" "tcp,self" + "--mca" "oob_tcp_if_include" "lo" + # disable openmpi OSC UCX component + # https://github.com/open-mpi/ompi/issues/12517 + "--mca" "osc" "^ucx" + ) + fi + mpiexec \ + "${mpi_opts[@]}" \ + "${PYTHON}" -B -v ./test/runtests.py -v || + die "Testsuite failed under ${EPYTHON}" +} + +python_install_all() { + use doc && local HTML_DOCS=( docs/. ) + use examples && local DOCS=( demo ) + distutils-r1_python_install_all +} |
