Add template for conda packaging

This commit is contained in:
Nils Wentzell 2020-08-06 13:36:09 -04:00
parent eb68c32562
commit 7047ac8373
3 changed files with 82 additions and 0 deletions

22
packaging/conda/build.sh Normal file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env bash
mkdir build
cd build
# Openmpi Specific environment setup - Cf. https://github.com/conda-forge/libnetcdf-feedstock/pull/80
export OMPI_MCA_btl=self,tcp
export OMPI_MCA_plm=isolated
export OMPI_MCA_rmaps_base_oversubscribe=yes
export OMPI_MCA_btl_vader_single_copy_mechanism=none
mpiexec="mpiexec --allow-run-as-root"
source $PREFIX/share/triqsvars.sh
cmake \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_BUILD_TYPE=Release \
..
make -j${CPU_COUNT} VERBOSE=1
CTEST_OUTPUT_ON_FAILURE=1 ctest
make install

View File

@ -0,0 +1,3 @@
mpi:
- mpich
- openmpi

57
packaging/conda/meta.yaml Normal file
View File

@ -0,0 +1,57 @@
{% set version = "3.0.0" %}
package:
name: app4triqs
version: {{ version }}
source:
url: https://github.com/TRIQS/app4triqs/releases/download/{{ version }}/app4triqs-{{ version }}.tar.gz
sha256: PUT HERE THE SHA256 OF YOUR RELEASE TARBALL
build:
number: 0
skip: True # [win or py<30]
requirements:
build:
- cmake
- make
- {{ compiler('c') }}
- {{ compiler('cxx') }}
host:
- triqs {{ '.'.join(version.split('.')[:2]) }}
- boost-cpp
- hdf5
- {{ mpi }}
- libblas
- liblapack
- python
run:
- {{ pin_compatible("triqs", max_pin="x.x") }}
- boost-cpp
- hdf5
- {{ mpi }}
- libblas
- liblapack
- python
test:
commands:
- export OMPI_MCA_btl=self,tcp
- export OMPI_MCA_plm=isolated
- export OMPI_MCA_rmaps_base_oversubscribe=yes
- export OMPI_MCA_btl_vader_single_copy_mechanism=none
- export mpiexec="mpiexec --allow-run-as-root"
- python -c "import app4triqs"
about:
home: https://triqs.github.io/app4triqs
license: GPL-3.0-or-later
license_family: GPL
license_file: LICENSE.txt
summary: 'An application based on the TRIQS library'
extra:
recipe-maintainers:
- wentzell
- pgunn