Skip to content

Commit 34cdf05

Browse files
EthanSteinbergtylerjereddy
authored andcommitted
MAINT: FFT pybind11 fixups
* remove the pybind11 version exclusion from Windows Meson job in GitHub actions * pin pybind11 to version `2.10.1` in `pyproject.toml` out of an abundance of caution re: recent issues with `2.10.2` (which has since been yanked from PyPI) * small adjustment to `pypocketfft.cxx` to defened against the segfault that occurs with pybind11 `2.10.2` (arguably not a bug, but safer way to initialize here)
1 parent 843500a commit 34cdf05

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.github/workflows/windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
gfortran --version
4747
- name: pip-packages
4848
run: |
49-
pip install numpy==1.22.2 cython "pybind11!=2.10.2" pythran meson ninja pytest pytest-xdist pytest-timeout pooch
49+
pip install numpy==1.22.2 cython pybind11 pythran meson ninja pytest pytest-xdist pytest-timeout pooch
5050
- name: openblas-libs
5151
run: |
5252
# Download and install pre-built OpenBLAS library

pyproject.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ build-backend = 'mesonpy'
1212
requires = [
1313
"meson-python>=0.11.0,<0.12.0",
1414
"Cython>=0.29.32,<3.0",
15-
"pybind11>=2.10.0,!=2.10.2,<2.11.0",
15+
# conservatively avoid issues from
16+
# https://github.com/pybind/pybind11/issues/4420
17+
"pybind11==2.10.1",
1618
"pythran>=0.12.0,<0.13.0",
1719
# `wheel` is needed for non-isolated builds, given that `meson-python`
1820
# doesn't list it as a runtime requirement (at least in 0.5.0)

scipy/fft/_pocketfft/pypocketfft.cxx

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ using clong = std::complex<ldbl_t>;
3737
using f32 = float;
3838
using f64 = double;
3939
using flong = ldbl_t;
40-
auto None = py::none();
4140

4241
shape_t copy_shape(const py::array &arr)
4342
{
@@ -717,6 +716,8 @@ PYBIND11_MODULE(pypocketfft, m)
717716
{
718717
using namespace pybind11::literals;
719718

719+
auto None = py::none();
720+
720721
m.doc() = pypocketfft_DS;
721722
m.def("c2c", c2c, c2c_DS, "a"_a, "axes"_a=None, "forward"_a=true,
722723
"inorm"_a=0, "out"_a=None, "nthreads"_a=1);

0 commit comments

Comments
 (0)