Skip to content

Commit

Permalink
chore: Move Cython sources
Browse files Browse the repository at this point in the history
If using an editable install, prevent mpi4py.MPI being interpreted as a
namespace package when the extension module is not available in-place.
  • Loading branch information
dalcinl committed May 1, 2024
1 parent 9d3287e commit f83beef
Show file tree
Hide file tree
Showing 42 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ file(
GLOB_RECURSE MPI.deps
${SRCDIR}/mpi4py/*.pyx
${SRCDIR}/mpi4py/*.pxd
${SRCDIR}/mpi4py/MPI/*.pyx
${SRCDIR}/mpi4py/MPI/*.pxi
${SRCDIR}/mpi4py/MPI.src/*.pyx
${SRCDIR}/mpi4py/MPI.src/*.pxi
)
set(MPI.c ${BINDIR}/MPI.c)
set(MPI.h ${BINDIR}/MPI.h ${BINDIR}/MPI_api.h)
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ def sources():
depends=[
'src/mpi4py/*.pyx',
'src/mpi4py/*.pxd',
'src/mpi4py/MPI/*.pyx',
'src/mpi4py/MPI/*.pxd',
'src/mpi4py/MPI/*.pxi',
'src/mpi4py/MPI.src/*.pyx',
'src/mpi4py/MPI.src/*.pxi',
],
)
#
Expand Down
2 changes: 1 addition & 1 deletion src/mpi4py/MPI.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
from __future__ import annotations
cimport cython # no-cython-lint

include "MPI/MPI.pyx"
include "MPI.src/MPI.pyx"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f83beef

Please sign in to comment.