Skip to content

Commit

Permalink
Merge pull request #1446 from basnijholt/kwant
Browse files Browse the repository at this point in the history
Added recipe for kwant
  • Loading branch information
jakirkham authored Nov 3, 2016
2 parents 233366f + 237610b commit 968efa5
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 0 deletions.
15 changes: 15 additions & 0 deletions recipes/kwant/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
platform='unknown'
unamestr=`uname`
if [[ "$unamestr" == 'Darwin' ]]; then
cp $RECIPE_DIR/build_mac.conf build.conf
else
cp $RECIPE_DIR/build_linux.conf build.conf
fi
sed -i -e "s:PREFIX:$PREFIX:g" build.conf

export LIBRARY_PATH="${PREFIX}/lib"
export LD_LIBRARY_PATH="${PREFIX}/lib"

$PYTHON setup.py build
$PYTHON setup.py install
9 changes: 9 additions & 0 deletions recipes/kwant/build_linux.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[lapack]
library_dirs = PREFIX/lib
libraries = openblas gfortran
extra_link_args = -Wl,-rpath=PREFIX/lib
[mumps]
include_dirs = PREFIX/include
library_dirs = PREFIX/lib
libraries = zmumps mumps_common pord metis esmumps scotch scotcherr mpiseq gfortran
extra_link_args = -Wl,-rpath=PREFIX/lib
9 changes: 9 additions & 0 deletions recipes/kwant/build_mac.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[lapack]
library_dirs = PREFIX/lib
libraries = openblas gfortran
extra_link_args = -Wl,-rpath,PREFIX/lib
[mumps]
include_dirs = PREFIX/include
library_dirs = PREFIX/lib
libraries = zmumps mumps_common pord metis esmumps scotch scotcherr mpiseq gfortran
extra_link_args = -Wl,-rpath,PREFIX/lib
78 changes: 78 additions & 0 deletions recipes/kwant/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{% set name = "kwant" %}
{% set version = "1.1.2" %}
{% set variant = "openblas" %}

package:
name: {{ name }}
version: {{ version }}

source:
fn: v{{ version }}.tar.gz
url: https://gitlab.kwant-project.org/kwant/kwant/repository/archive.tar.gz?ref=v{{ version }}
sha256: a47544a8416b19a56da3d511610c9e09ed3bf84f66461d9f95f0f6fefebd0179

build:
skip: true # [win or py3k]
number: 200
features:
- blas_{{ variant }}

requirements:
build:
- python
- toolchain
- gcc # [osx]
- blas 1.1 {{ variant }}
- openblas 0.2.18|0.2.18.*
- mumps
- numpy x.x
- scipy
- cython
- nose
- tinyarray
- libgfortran # [linux]

run:
- python
- blas 1.1 {{ variant }}
- openblas 0.2.18|0.2.18.*
- mumps
- numpy x.x
- matplotlib
- scipy
- cython
- nose
- tinyarray
- libgfortran

test:
imports:
- kwant
- kwant.graph
- kwant.graph.tests
- kwant.linalg
- kwant.linalg.tests
- kwant.physics
- kwant.physics.tests
- kwant.solvers
- kwant.solvers.tests
- kwant.tests

about:
home: http://kwant-project.org/
license: BSD 2-Clause
license_file: LICENSE.rst
license_family: BSD
summary: 'Package for numerical quantum transport calculations.'
description: |
Kwant is a free (open source) Python package for numerical calculations on
tight-binding models with a strong focus on quantum transport. It is designed to
be flexible and easy to use. Thanks to the use of innovative algorithms, Kwant
is often faster than other available codes, even those entirely written in the
low level FORTRAN and C/C++ languages.
doc_url: https://kwant-project.org/doc/1/
dev_url: https://gitlab.kwant-project.org/kwant/kwant/

extra:
recipe-maintainers:
- basnijholt
1 change: 1 addition & 0 deletions recipes/kwant/yum_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
devtoolset-2-gcc-gfortran

0 comments on commit 968efa5

Please sign in to comment.