Skip to content

Commit

Permalink
Merge pull request #12 from ITISFoundation/fix_numpy
Browse files Browse the repository at this point in the history
Fixes for newer numpy api, upgrade to dakota 6.20
  • Loading branch information
wvangeit authored Jul 29, 2024
2 parents ef6bf55 + 54540b3 commit 79e2906
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-20.04]
python: [cp38,cp39,cp310,cp311]
python: [cp38,cp39,cp310,cp311,cp312]
arch: [x86_64]
env:
SCCACHE_GHA_ENABLED: "true"
Expand All @@ -20,9 +20,9 @@ jobs:
with:
fetch-depth: 0
- name: Set up sccache
uses: mozilla-actions/[email protected].3
uses: mozilla-actions/[email protected].5
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Get dakota src
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ all:


wheel: cache-clean clean
CIBW_BUILD=cp38*x86_64 cibuildwheel --platform linux
CIBW_BUILD=cp311*x86_64 cibuildwheel --platform linux

install:
pip install -v .
Expand All @@ -15,11 +15,11 @@ cache-clean:

get-dakota-src:
rm -rf dakota
git clone -j4 --branch v6.19.0 --depth 1 https://github.com/snl-dakota/dakota.git
git clone -j4 --branch v6.20.0 --depth 1 https://github.com/snl-dakota/dakota.git
cd dakota && \
git submodule update --init packages/external && \
git submodule update --init packages/pecos && \
git submodule update --init packages/surfpack && \
git apply ../dakota-src.patch && \
git apply ../src_patches/dakota-src.patch && \
find . \( -name \*.cpp -o -name \*.hpp -o -name \*.c -o -name \*.h \) -exec \
sed -i -f ../replace_old_macros_numpy.sed {} + ;
sed -i -E -f ../src_patches/replace_old_macros_numpy.sed {} +
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,4 @@ s/\bPyArray_MAX_ELSIZE\b/NPY_MAX_ELSIZE/g
s/\bPyArray_USE_PYMEM\b/NPY_USE_PYMEM/g
s/\bPyArray_RemoveLargest\b/PyArray_RemoveSmallest/g
s/\bPyArray_UCS4\b/npy_ucs4/g
s/PyArray_(DIM|NDIM)\(([[:alpha:]]*)([^)]*)\)/PyArray_\1(reinterpret_cast<PyArrayObject*>(\2)\3)/g

0 comments on commit 79e2906

Please sign in to comment.