Skip to content

Commit da73131

Browse files
authored
Fix segfault issue with newest shapely and esmpy (#715)
* Import shapely before esmpy This avoids a multiprocessing issue with shapely >=2.0.0 and esmpy >=8.4.2 * Add constraints on esmpy and shapely
1 parent ff79c2f commit da73131

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

conda-env/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ dependencies:
1717
- cdms2 3.1.5
1818
- cdutil 8.2.1
1919
- dask
20+
- esmpy >=8.4.0
2021
- genutil 8.2.1
2122
- lxml
2223
- mache >=0.15.0
2324
- matplotlib-base
2425
- netcdf4
2526
- numpy >=1.23.0
27+
- shapely >=2.0.0,<3.0.0
2628
- xarray >=2023.02.0
2729
# Testing
2830
# ==================

conda-env/dev.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ dependencies:
1515
- cdms2 3.1.5
1616
- cdutil 8.2.1
1717
- dask
18+
- esmpy >=8.4.0
1819
- genutil 8.2.1
1920
- lxml
2021
- mache >=0.15.0
2122
- matplotlib-base
2223
- netcdf4
2324
- numpy >=1.23.0
25+
- shapely >=2.0.0,<3.0.0
2426
- xarray >=2023.02.0
2527
# Testing
2628
# ==================

e3sm_diags/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import os
22
import sys
33

4+
# import shapely before esmpy to prevent a segfault related to multiprocessing
5+
import shapely # isort: skip
6+
import esmpy # isort: skip
7+
48
__version__ = "v2.9.0rc2"
59
INSTALL_PATH = os.path.join(sys.prefix, "share/e3sm_diags/")
610

0 commit comments

Comments
 (0)