Skip to content

Commit

Permalink
Squashed 'src/phast/PhreeqcRM/' changes from cc711930..8a3a3813
Browse files Browse the repository at this point in the history
8a3a3813 Unpinned SWIG by updating numpy.i (#183)

git-subtree-dir: src/phast/PhreeqcRM
git-subtree-split: 8a3a381397c468840864d4b9611f23f97b2858b3
  • Loading branch information
Darth Vader committed Dec 19, 2024
1 parent 2043a65 commit 955b9c1
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 42 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-12, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022]
os: [macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022]
build_shared_libs: [OFF, ON]
phreeqcrm_with_yaml_cpp: [OFF, ON]
BUILD_TYPE: [Debug, Release]
Expand Down Expand Up @@ -400,10 +400,10 @@ jobs:
sudo apt-get -y update
sudo apt-get install -y ninja-build valgrind
- name: Install ninja (macOS)
- name: Install ninja swig (macOS)
if: ${{ runner.os == 'macOS' }}
run: |
brew install ninja
brew install ninja swig
ls -alR /usr/local/Cellar/
- name: Install yaml-cpp (Linux)
Expand Down Expand Up @@ -516,15 +516,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-12, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022]
os: [macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022]
build_shared_libs: [ON]
phreeqcrm_with_yaml_cpp: [ON]
mpi: ['mpich', 'ompi', 'impi', 'msmpi'] # see https://github.com/mpi4py/setup-mpi/blob/master/setup-mpi.sh
# BUILD_TYPE: [Debug, Release]
exclude:
- os: macos-12
- os: macos-13
mpi: 'impi'
- os: macos-12
- os: macos-13
mpi: 'msmpi'
- os: ubuntu-20.04
mpi: 'msmpi'
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
name: wheels

on: [push, pull_request]
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '.github/workflows/ci.yml'
- '.github/workflows/dist.yml'
- '.gitignore'
- 'build-all-presets.sh'
- 'CMakePresets.json'
push:
# branches:
# - master
paths-ignore:
- '.github/workflows/ci.yml'
- '.github/workflows/dist.yml'
- '.gitignore'
- 'build-all-presets.sh'
- 'CMakePresets.json'

jobs:
build_wheels:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build-system]
requires = [
"scikit-build-core",
"swig==4.2.1",
"swig",
"numpy"
]
build-backend = "scikit_build_core.build"
Expand Down
68 changes: 34 additions & 34 deletions swig/numpy.i
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,7 @@ void free_cap(PyObject * cap)
%typemap(argout)
(DATA_TYPE ARGOUT_ARRAY1[ANY])
{
$result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum);
$result = SWIG_AppendOutput($result,(PyObject*)array$argnum);
}

/* Typemap suite for (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1)
Expand Down Expand Up @@ -2018,7 +2018,7 @@ void free_cap(PyObject * cap)
%typemap(argout)
(DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1)
{
$result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum);
$result = SWIG_AppendOutput($result,(PyObject*)array$argnum);
}

/* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1)
Expand Down Expand Up @@ -2047,7 +2047,7 @@ void free_cap(PyObject * cap)
%typemap(argout)
(DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1)
{
$result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum);
$result = SWIG_AppendOutput($result,(PyObject*)array$argnum);
}

/* Typemap suite for (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY])
Expand All @@ -2065,7 +2065,7 @@ void free_cap(PyObject * cap)
%typemap(argout)
(DATA_TYPE ARGOUT_ARRAY2[ANY][ANY])
{
$result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum);
$result = SWIG_AppendOutput($result,(PyObject*)array$argnum);
}

/* Typemap suite for (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY])
Expand All @@ -2083,7 +2083,7 @@ void free_cap(PyObject * cap)
%typemap(argout)
(DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY])
{
$result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum);
$result = SWIG_AppendOutput($result,(PyObject*)array$argnum);
}

/* Typemap suite for (DATA_TYPE ARGOUT_ARRAY4[ANY][ANY][ANY][ANY])
Expand All @@ -2101,7 +2101,7 @@ void free_cap(PyObject * cap)
%typemap(argout)
(DATA_TYPE ARGOUT_ARRAY4[ANY][ANY][ANY][ANY])
{
$result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum);
$result = SWIG_AppendOutput($result,(PyObject*)array$argnum);
}

/*****************************/
Expand All @@ -2126,7 +2126,7 @@ void free_cap(PyObject * cap)
PyArrayObject* array = (PyArrayObject*) obj;

if (!array) SWIG_fail;
$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1)
Expand All @@ -2147,7 +2147,7 @@ void free_cap(PyObject * cap)
PyArrayObject* array = (PyArrayObject*) obj;

if (!array) SWIG_fail;
$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2)
Expand All @@ -2169,7 +2169,7 @@ void free_cap(PyObject * cap)
PyArrayObject* array = (PyArrayObject*) obj;

if (!array) SWIG_fail;
$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2)
Expand All @@ -2191,7 +2191,7 @@ void free_cap(PyObject * cap)
PyArrayObject* array = (PyArrayObject*) obj;

if (!array) SWIG_fail;
$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2)
Expand All @@ -2213,7 +2213,7 @@ void free_cap(PyObject * cap)
PyArrayObject* array = (PyArrayObject*) obj;

if (!array || !require_fortran(array)) SWIG_fail;
$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2)
Expand All @@ -2235,7 +2235,7 @@ void free_cap(PyObject * cap)
PyArrayObject* array = (PyArrayObject*) obj;

if (!array || !require_fortran(array)) SWIG_fail;
$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2,
Expand All @@ -2259,7 +2259,7 @@ void free_cap(PyObject * cap)
PyArrayObject* array = (PyArrayObject*) obj;

if (!array) SWIG_fail;
$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3,
Expand All @@ -2283,7 +2283,7 @@ void free_cap(PyObject * cap)
PyArrayObject* array = (PyArrayObject*) obj;

if (!array) SWIG_fail;
$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2,
Expand All @@ -2307,7 +2307,7 @@ void free_cap(PyObject * cap)
PyArrayObject* array = (PyArrayObject*) obj;

if (!array || !require_fortran(array)) SWIG_fail;
$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3,
Expand All @@ -2331,7 +2331,7 @@ void free_cap(PyObject * cap)
PyArrayObject* array = (PyArrayObject*) obj;

if (!array || !require_fortran(array)) SWIG_fail;
$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2,
Expand All @@ -2356,7 +2356,7 @@ void free_cap(PyObject * cap)
PyArrayObject* array = (PyArrayObject*) obj;

if (!array) SWIG_fail;
$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4,
Expand All @@ -2381,7 +2381,7 @@ void free_cap(PyObject * cap)
PyArrayObject* array = (PyArrayObject*) obj;

if (!array) SWIG_fail;
$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2,
Expand All @@ -2406,7 +2406,7 @@ void free_cap(PyObject * cap)
PyArrayObject* array = (PyArrayObject*) obj;

if (!array || !require_fortran(array)) SWIG_fail;
$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4,
Expand All @@ -2431,7 +2431,7 @@ void free_cap(PyObject * cap)
PyArrayObject* array = (PyArrayObject*) obj;

if (!array || !require_fortran(array)) SWIG_fail;
$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/*************************************/
Expand Down Expand Up @@ -2465,7 +2465,7 @@ PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap);
PyArray_SetBaseObject(array,cap);
%#endif

$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEWM_ARRAY1)
Expand Down Expand Up @@ -2495,7 +2495,7 @@ PyObject* cap = PyCapsule_New((void*)(*$2), SWIGPY_CAPSULE_NAME, free_cap);
PyArray_SetBaseObject(array,cap);
%#endif

$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2)
Expand Down Expand Up @@ -2526,7 +2526,7 @@ PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap);
PyArray_SetBaseObject(array,cap);
%#endif

$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_ARRAY2)
Expand Down Expand Up @@ -2557,7 +2557,7 @@ PyObject* cap = PyCapsule_New((void*)(*$3), SWIGPY_CAPSULE_NAME, free_cap);
PyArray_SetBaseObject(array,cap);
%#endif

$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2)
Expand Down Expand Up @@ -2588,7 +2588,7 @@ PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap);
PyArray_SetBaseObject(array,cap);
%#endif

$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_FARRAY2)
Expand Down Expand Up @@ -2619,7 +2619,7 @@ PyObject* cap = PyCapsule_New((void*)(*$3), SWIGPY_CAPSULE_NAME, free_cap);
PyArray_SetBaseObject(array,cap);
%#endif

$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2,
Expand Down Expand Up @@ -2652,7 +2652,7 @@ PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap);
PyArray_SetBaseObject(array,cap);
%#endif

$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3,
Expand Down Expand Up @@ -2685,7 +2685,7 @@ PyObject* cap = PyCapsule_New((void*)(*$4), SWIGPY_CAPSULE_NAME, free_cap);
PyArray_SetBaseObject(array,cap);
%#endif

$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2,
Expand Down Expand Up @@ -2718,7 +2718,7 @@ PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap);
PyArray_SetBaseObject(array,cap);
%#endif

$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3,
Expand Down Expand Up @@ -2751,7 +2751,7 @@ PyObject* cap = PyCapsule_New((void*)(*$4), SWIGPY_CAPSULE_NAME, free_cap);
PyArray_SetBaseObject(array,cap);
%#endif

$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2,
Expand Down Expand Up @@ -2785,7 +2785,7 @@ PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap);
PyArray_SetBaseObject(array,cap);
%#endif

$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4,
Expand Down Expand Up @@ -2819,7 +2819,7 @@ PyObject* cap = PyCapsule_New((void*)(*$5), SWIGPY_CAPSULE_NAME, free_cap);
PyArray_SetBaseObject(array,cap);
%#endif

$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2,
Expand Down Expand Up @@ -2853,7 +2853,7 @@ PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap);
PyArray_SetBaseObject(array,cap);
%#endif

$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4,
Expand Down Expand Up @@ -2887,7 +2887,7 @@ PyObject* cap = PyCapsule_New((void*)(*$5), SWIGPY_CAPSULE_NAME, free_cap);
PyArray_SetBaseObject(array,cap);
%#endif

$result = SWIG_Python_AppendOutput($result,obj);
$result = SWIG_AppendOutput($result,obj);
}

/**************************************/
Expand Down

0 comments on commit 955b9c1

Please # to comment.