Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update numpy recipe in Python examples page #1015

Merged
merged 1 commit into from
Aug 12, 2024
Merged
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
20 changes: 13 additions & 7 deletions docs/tutorials/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,31 +85,35 @@ This will replace any `python` found in the recipe with the versions specified i

```yaml title="recipe.yaml"
context:
version: 1.26.4
version: 2.0.1
default_abi_level: 1.21

package:
name: numpy
version: ${{ version }}

source:
- url: https://github.com/numpy/numpy/releases/download/v${{ version }}/numpy-${{ version }}.tar.gz
sha256: 2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010
sha256: 485b87235796410c3519a699cfe1faab097e509e90ebb05dcd098db2ae87e7b3

build:
python:
entry_points:
- f2py = numpy.f2py.f2py2e:main # [win]
- numpy-config = numpy._configtool:main

requirements:
build:
- ${{ compiler('c') }}
- ${{ compiler('cxx') }}
# note: some `host` dependencies that run at build time (e.g., `cython`, `meson-python`)
# should ideally be in `build` instead, this is because cross compilation of
# Python packages in conda-forge uses `crossenv` rather than regular cross compilation.
host:
# note: variant is injected here!
- python
- pip
- meson-python
- ninja
- pkg-config
- python-build
- cython
Expand All @@ -119,18 +123,20 @@ requirements:
run:
- python
run_exports:
- ${{ pin_subpackage("numpy") }}
- numpy >=${{ default_abi_level }},<3.0.0a0

tests:
- python:
imports:
- numpy
- numpy.array_api
- numpy.array_api.linalg
- numpy.fft
- numpy.linalg
- numpy.random
- numpy.ctypeslib

- script:
- f2py -h
- f2py -v
- numpy-config --cflags

about:
homepage: http://numpy.org/
Expand Down
Loading