pantry/projects/numpy.org/package.yml
Andrew eab75c3bf6
+numpy.org (#4526)
* new file:   projects/numpy.org/package.yml
	new file:   projects/numpy.org/test.f90
	new file:   projects/numpy.org/test.py

* remove PYTHONPATH from test
2023-12-21 15:39:14 -05:00

51 lines
No EOL
1.6 KiB
YAML

distributable:
url: https://github.com/numpy/numpy/releases/download/v{{version}}/numpy-{{version}}.tar.gz
strip-components: 1
versions:
github: numpy/numpy
dependencies:
openblas.net: ^0.3
python.org: ^3.11
gnu.org/gcc: ^13 #gfortran (no Fortran compiler found)
runtime:
env:
PYTHONPATH: $PYTHONPATH:{{prefix}}/lib/python{{deps.python.org.version.major}}/site-packages
build:
dependencies:
cython.org/libcython: '*'
llvm.org: '*' # fails with gcc
script:
- run: |
cat <<EOF > site.cfg
[openblas]
libraries = openblas
library_dirs = {{deps.openblas.net.prefix}}/lib
include_dirs = {{deps.openblas.net.prefix}}/include
EOF
- python -m pip install --prefix={{prefix}} .
- run: ln -s python{{deps.python.org.version.marketing}} python{{deps.python.org.version.major}}
working-directory: ${{prefix}}/lib
- run: |
sed -i.bak "s|{{deps.python.org.prefix}}/bin/python|/usr/bin/env python|g" f2py
rm f2py.bak
working-directory: ${{prefix}}/bin
env:
# ld unrecognized option '--version'
CC: clang
CXX: clang++
LD: clang
ATLAS: None
darwin:
BLAS: ${{deps.openblas.net.prefix}}/lib/libopenblas.dylib
LAPACK: ${{deps.openblas.net.prefix}}/lib/libopenblas.dylib
linux:
BLAS: ${{deps.openblas.net.prefix}}/lib/libopenblas.so
LAPACK: ${{deps.openblas.net.prefix}}/lib/libopenblas.so
provides:
- bin/f2py
test:
script:
- python test.py
- f2py -v | grep {{version}}
- f2py -c -m test test.f90
- ls | grep test.cpython