Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 9 additions & 18 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: [9.13.0]
version: [9.15.0]
abi: [cp39, cp310, cp311, cp312, cp313]
steps:
- uses: actions/checkout@v4
Expand All @@ -17,13 +17,8 @@ jobs:
docker run --rm -e MAKEFLAGS='-j2' -v `pwd`:/io medcoupling/manylinux /io/build-wheels-linux.sh ${{ matrix.version }} ${{ matrix.abi }}
- uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: true
activate-environment: ""
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: wheelhouse/medcoupling-${{ matrix.version }}-${{ matrix.abi }}-${{ matrix.abi }}-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
miniforge-version: latest
conda-remove-defaults: true
- name: Upload
if: startsWith(github.ref, 'refs/tags/')
shell: bash -l {0}
Expand All @@ -43,19 +38,19 @@ jobs:
include:
- abi: cp39
python-version: '3.9'
version: 9.13.0
version: 9.15.0
- abi: cp310
python-version: '3.10'
version: 9.13.0
version: 9.15.0
- abi: cp311
python-version: '3.11'
version: 9.13.0
version: 9.15.0
- abi: cp312
python-version: '3.12'
version: 9.13.0
version: 9.15.0
- abi: cp313
python-version: '3.13'
version: 9.13.0
version: 9.15.0
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
Expand All @@ -68,11 +63,7 @@ jobs:
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: wheelhouse/medcoupling-${{ matrix.version }}-${{ matrix.abi }}-${{ matrix.abi }}-win_amd64.whl
conda-remove-defaults: true
- name: Upload
if: startsWith(github.ref, 'refs/tags/')
shell: bash -l {0}
Expand Down
27 changes: 11 additions & 16 deletions METADATA.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,24 @@ Classifier: Intended Audience :: Science/Research
Requires-Dist: scipy


# MEDCoupling
MEDCoupling
===========

[![pypi](https://img.shields.io/pypi/v/medcoupling.svg?style=flat-square)](https://pypi.org/project/medcoupling)
https://github.com/jschueller/medcoupling-wheels
[![github](https://github.com/jschueller/medcoupling-wheels/actions/workflows/stable.yml/badge.svg?branch=master)](https://github.com/jschueller/medcoupling-wheels/actions/workflows/stable.yml)
MEDCoupling is a powerful library to manipulate meshes and fields from the `SALOME <https://www.salome-platform.org/>`_ platform.

Refer to the `documentation <https://docs.salome-platform.org/latest/dev/MEDCoupling/developer/index.html>`_.

MEDCoupling is a powerful library to manipulate meshes and fields from the [SALOME](https://www.salome-platform.org/) platform.
Built from `github <https://github.com/jschueller/medcoupling-wheels>`_.

Refer to the [documentation](https://docs.salome-platform.org/latest/dev/MEDCoupling/developer/index.html).
Installation from PyPI
----------------------

## Installation from PyPI
To install MEDCoupling, you can now simply do::

To install MEDCoupling, you can now simply do

```
pip install -U medcoupling
```
pip install -U medcoupling

Binary wheels are available for 64-bit Windows (`win_amd64`) and Linux-like platforms (`manylinux2014_x86_64`).

To ensure that MEDCoupling is well installed, try importing it with:
To ensure that MEDCoupling is well installed, try importing it with::

```
import medcoupling # should not raise error
```
import medcoupling # should not raise error
20 changes: 11 additions & 9 deletions build-wheels-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,20 @@ export PATH=/opt/python/${PYTAG}-${ABI}/bin/:$PATH
cd /tmp

# configuration
git clone --depth 1 -b V`echo ${VERSION}|sed "s|\.|_|g"` https://git.salome-platform.org/gitpub/tools/configuration.git
git clone --depth 1 -b V`echo ${VERSION}|sed "s|\.|_|g"` https://github.com/SalomePlatform/configuration.git

# medcoupling
pip install scipy
git clone --depth 1 -b V`echo ${VERSION}|sed "s|\.|_|g"` https://git.salome-platform.org/gitpub/tools/medcoupling.git
patch -p1 -i /io/medcoupling913-numpy2.patch -d medcoupling
sed -i "s|PYTHON_LIBRARIES|ZZZ|g" medcoupling/src/{MEDCoupling_Swig,MEDPartitioner_Swig,MEDLoader/Swig,PyWrapping,RENUMBER_Swig,ParaMEDMEM_Swig}/CMakeLists.txt # dont explicitely link Python libs for Unix wheels
cmake -S medcoupling -B build_medcoupling -LAH -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install \
git clone --depth 1 -b V`echo ${VERSION}|sed "s|\.|_|g"` https://github.com/SalomePlatform/medcoupling.git
cmake -LAH -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$PWD/install \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DMEDCOUPLING_BUILD_DOC=OFF -DMEDCOUPLING_BUILD_TESTS=OFF -DCONFIGURATION_ROOT_DIR=$PWD/configuration \
-DPYTHON_EXECUTABLE=/opt/python/${PYTAG}-${ABI}/bin/python \
-DPYTHON_INCLUDE_DIR=/opt/python/${PYTAG}-${ABI}/include/python${PYVERD} -DPYTHON_LIBRARY=dummy \
-DMEDCOUPLING_PARTITIONER_SCOTCH=OFF -DMEDCOUPLING_USE_64BIT_IDS=OFF \
-DCMAKE_INSTALL_RPATH="${PWD}/install/lib;/usr/local/lib" -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON
-DMEDCOUPLING_PARTITIONER_SCOTCH=OFF -DMEDCOUPLING_USE_64BIT_IDS=ON \
-DCMAKE_INSTALL_RPATH="${PWD}/install/lib;/usr/local/lib" -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
-B build_medcoupling -S medcoupling
cmake --build build_medcoupling --target install

cd install/lib/python*/site-packages
Expand All @@ -52,6 +53,7 @@ auditwheel repair medcoupling-${VERSION}-${TAG}.whl -w /io/wheelhouse/
cd /tmp
pip install medcoupling --pre --no-index -f /io/wheelhouse
python -c "import medcoupling as mc; print(mc.__version__); mc.ShowAdvancedExtensions()"
python -c "import medcoupling as mc; print(mc.MEDCouplingHasNumPyBindings())"
python -c "import medcoupling as mc; print(mc.MEDCouplingHasSciPyBindings())"
python -c "import medcoupling as mc; assert mc.MEDCouplingHasNumPyBindings()"
python -c "import medcoupling as mc; assert mc.MEDCouplingHasSciPyBindings()"
python -c "import medcoupling as mc; assert mc.MEDCouplingSizeOfIDs() == 64"
python ./medcoupling/src/MEDCoupling_Swig/MEDCouplingNumPyTest.py
18 changes: 9 additions & 9 deletions build-wheels-windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ popd

:: boost
set "BOOST_VERSION=1.80.0"
curl -LO https://boostorg.jfrog.io/artifactory/main/release/%BOOST_VERSION%/source/boost_%BOOST_VERSION:.=_%.zip
curl -LO https://archives.boost.io/release/%BOOST_VERSION%/source/boost_%BOOST_VERSION:.=_%.zip
7z x boost_%BOOST_VERSION:.=_%.zip > nul
pushd boost_%BOOST_VERSION:.=_%
call bootstrap.bat
Expand Down Expand Up @@ -75,21 +75,21 @@ cmake -LAH -S hdf5 -B build_hdf5 -DCMAKE_INSTALL_PREFIX=C:/Libraries/hdf5 -DBUIL
cmake --build build_hdf5 --config Release --target install

:: med
set "MED_VERSION=4.1.1"
curl -LO https://www.code-saturne.org/releases/external/med-%MED_VERSION%.tar.gz
set "MED_VERSION=4.2.0"
::https://files.salome-platform.org/Salome/medfile/med-4.2.0.tar.gz
curl -L -o med-%MED_VERSION%.tar.gz https://files.catbox.moe/zm3to1.gz
7z x med-%MED_VERSION%.tar.gz > nul
7z x med-%MED_VERSION%.tar > nul
cmake -LAH -S med-%MED_VERSION%_SRC -B build_med -DCMAKE_INSTALL_PREFIX=C:/Libraries/med -DHDF5_ROOT_DIR=C:/Libraries/hdf5 ^
cmake -LAH -S med-%MED_VERSION% -B build_med -DCMAKE_INSTALL_PREFIX=C:/Libraries/med -DHDF5_ROOT_DIR=C:/Libraries/hdf5 ^
-DMEDFILE_BUILD_TESTS=OFF -DMEDFILE_INSTALL_DOC=OFF
cmake --build build_med --config Release --target install

:: configuration
git clone --depth 1 -b V%VERSION:.=_% https://git.salome-platform.org/gitpub/tools/configuration.git
git clone --depth 1 -b V%VERSION:.=_% https://github.com/SalomePlatform/configuration.git

:: medcoupling
pip install scipy
git clone --depth 1 -b V%VERSION:.=_% https://git.salome-platform.org/gitpub/tools/medcoupling.git
patch -p1 -i %GITHUB_WORKSPACE%\medcoupling913-numpy2.patch -d medcoupling
git clone --depth 1 -b V%VERSION:.=_% https://github.com/SalomePlatform/medcoupling.git
cmake -LAH -S medcoupling -B build_medcoupling -DCMAKE_INSTALL_PREFIX=C:/Libraries/medcoupling ^
-DMEDFILE_ROOT_DIR=C:/Libraries/med ^
-DMETIS_ROOT_DIR=C:/Libraries/metis ^
Expand Down Expand Up @@ -127,6 +127,6 @@ pip install %GITHUB_WORKSPACE%\wheelhouse\medcoupling-%VERSION%-%ABI%-%ABI%-win_
pushd %GITHUB_WORKSPACE%

python -c "import medcoupling as mc; print(mc.__version__); mc.ShowAdvancedExtensions()"
python -c "import medcoupling as mc; print(mc.MEDCouplingHasNumPyBindings())"
python -c "import medcoupling as mc; print(mc.MEDCouplingHasSciPyBindings())"
python -c "import medcoupling as mc; assert mc.MEDCouplingHasNumPyBindings()"
python -c "import medcoupling as mc; assert mc.MEDCouplingHasSciPyBindings()"
python .\medcoupling\src\MEDCoupling_Swig\MEDCouplingNumPyTest.py
3 changes: 2 additions & 1 deletion build_locally.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh
set -xe
docker build docker/manylinux -t medcoupling/manylinux
docker run --rm -e MAKEFLAGS='-j8' -v `pwd`:/io medcoupling/manylinux /io/build-wheels-linux.sh 9.13.0 cp310
docker run --rm -e MAKEFLAGS='-j8' -v `pwd`:/io medcoupling/manylinux /io/build-wheels-linux.sh 9.15.0 cp310
13 changes: 6 additions & 7 deletions docker/manylinux/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

FROM quay.io/pypa/manylinux2014_x86_64
MAINTAINER jschueller

ENV MAKEFLAGS -j8
WORKDIR /usr/local/src
Expand All @@ -11,10 +9,10 @@ RUN yum install -y zip
RUN curl -fsSL https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.3/src/hdf5-1.10.3.tar.bz2 | tar xj && cd hdf5-1.10.3 && ./configure --enable-cxx --prefix=/usr/local --disable-tests --disable-tools && make > /dev/null 2>&1 && make install > /dev/null 2>&1 && cd - && rm -r hdf5*

# metis
RUN curl -fsSL https://bitbucket.org/petsc/pkg-metis/get/v5.1.0-p10.tar.bz2 | tar xj && cd petsc-pkg-metis-* && make config shared=1 > /dev/null 2>&1 && make install > /dev/null 2>&1 && cd - && rm -r petsc*
RUN curl -fsSL https://bitbucket.org/petsc/pkg-metis/get/v5.1.0-p10.tar.bz2 | tar xj && cd petsc-pkg-metis-* && CMAKE_POLICY_VERSION_MINIMUM=3.5 make config shared=1 > /dev/null 2>&1 && make install > /dev/null 2>&1 && cd - && rm -r petsc*

# boost
RUN curl -fSsL https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.bz2 | tar xj && cd boost_1_81_0 \
RUN curl -fSsL https://archives.boost.io/release/1.81.0/source/boost_1_81_0.tar.bz2 | tar xj && cd boost_1_81_0 \
&& ./bootstrap.sh --with-toolset=gcc --with-icu --with-python=/usr/local/bin/python \
&& ./b2 -q variant=release address-model=64 architecture=x86 debug-symbols=off threading=multi runtime-link=shared link=shared toolset=gcc --layout=system ${MAKEFLAGS} install --with-serialization --with-filesystem --with-date_time --with-chrono --with-thread --with-regex --with-system > /dev/null 2>&1 && cd - && rm -r boost*

Expand All @@ -23,7 +21,8 @@ RUN curl -fsSL https://download.gnome.org/sources/libxml2/2.10/libxml2-2.10.3.ta
&& ./configure --without-python && make > /dev/null 2>&1 && make install > /dev/null 2>&1 && cd - && rm -r libxml2*

# med
RUN curl -fSsL https://www.code-saturne.org/releases/external/med-4.1.1.tar.gz | tar xz \
&& cmake -S med-4.1.1_SRC -B build_med -LAH -DCMAKE_BUILD_TYPE=Release \
-DMEDFILE_BUILD_TESTS=OFF -DMEDFILE_INSTALL_DOC=OFF -DHDF5_DIR=$PWD/install/share/cmake/hdf5 \
# https://files.salome-platform.org/Salome/medfile/med-4.2.0.tar.gz
RUN curl -fSsL https://files.catbox.moe/zm3to1.gz | tar xz \
&& cmake -S med-4.2.0 -B build_med -LAH -DCMAKE_BUILD_TYPE=Release \
-DMEDFILE_BUILD_TESTS=OFF -DMEDFILE_INSTALL_DOC=OFF -DHDF5_DIR=$PWD/install/share/cmake/hdf5 -DCMAKE_Fortran_FLAGS="-fdefault-integer-8" \
&& cmake --build build_med --target install
144 changes: 0 additions & 144 deletions medcoupling913-numpy2.patch

This file was deleted.